SLA
SLA
SLA deadline approaching
sla.warningFires when an SLA cycle (first reply, next reply, resolution or callback) has used the share of the norm set in the level `warning_pct` and the deadline is not yet missed. The event is periodic: it is produced by a check that runs once a minute, not by a user action, so delivery may lag by about a minute. It arrives once per cycle. The body carries no message text, contact name or phone.
HTTP request
AISAR sends a signed POST request to your webhook_url:
http
POST {webhook_url}
Content-Type: application/json
X-AISAR-Signature: sha256=...
{
"event": "sla.warning",
"event_id": "evt_01JXXXXXXXXXXXXXXXXXXXXX",
"timestamp": "2026-11-10T09:15:00.000000Z",
"company_id": 1,
"data": {
"cycle_id": 5120,
"conversation_id": 8841,
"contact_id": 3307,
"channel_id": 42,
"metric": "first_response",
"priority": { "id": 31, "name": "VIP" },
"level": { "id": 14, "name": "Key accounts" },
"calendar": "business",
"started_at": "2026-11-10T09:00:00.000000Z",
"due_at": "2026-11-10T09:20:00.000000Z",
"assigned_user_id": 12,
"warned_at": "2026-11-10T09:15:00.000000Z"
}
}The X-AISAR-Signature header carries an HMAC-SHA256 signature of the request body — use it to verify the request came from AISAR.
Example payload
json
{
"event": "sla.warning",
"event_id": "evt_01JXXXXXXXXXXXXXXXXXXXXX",
"timestamp": "2026-11-10T09:15:00.000000Z",
"company_id": 1,
"data": {
"cycle_id": 5120,
"conversation_id": 8841,
"contact_id": 3307,
"channel_id": 42,
"metric": "first_response",
"priority": { "id": 31, "name": "VIP" },
"level": { "id": 14, "name": "Key accounts" },
"calendar": "business",
"started_at": "2026-11-10T09:00:00.000000Z",
"due_at": "2026-11-10T09:20:00.000000Z",
"assigned_user_id": 12,
"warned_at": "2026-11-10T09:15:00.000000Z"
}
}Payload fields
| Field | Type | Description |
|---|---|---|
cycle_id | integer | ID of the SLA cycle (one countdown of one norm for a conversation) |
conversation_id | integer|null | Conversation ID |
contact_id | integer|null | Conversation contact ID |
channel_id | integer|null | Conversation channel ID |
metric | string | Norm: `first_response`, `next_response`, `resolution` or `callback` |
priority | object | Cycle priority: `{id, name}`; the name is set by the company itself |
level | object|null | Level the norm is taken from: `{id, name}`, or `null` |
calendar | string | Counting calendar: `business` (working hours) or `always` (round the clock) |
started_at | string | Start of the countdown, ISO 8601 |
due_at | string|null | Deadline of the norm, ISO 8601 |
assigned_user_id | integer|null | ID of the assigned employee at the moment of the event, or `null` |
warned_at | string | Moment the cycle entered the warning zone, ISO 8601 |