Skip to content
AISARAISAR
Channels

Channels

Channel banned

channel.banned

Fires when a channel is banned by the upstream provider (e.g. Meta blocks the WhatsApp number, Telegram revokes the bot). While the ban stands, no further `message.created` events are emitted for the channel and `resume` returns 422 with code `channel_banned`. The state is not terminal: once the provider lifts the account ban, the channel can be brought back via `reconnect` (a regular re-pairing for QR channels); if the ban still stands, the provider rejects the connection and the channel returns to `banned`.

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": "channel.banned",
  "event_id": "evt_01JXXXXXXXXXXXXXXXXXXXXX",
  "timestamp": "2026-03-26T12:00:00.000000Z",
  "company_id": 1,
  "data": {
    "channel": {
      "id": 2,
      "type": "whatsapp",
      "name": "Main WhatsApp",
      "status": "banned",
      "account_name": "+77001234567",
      "connected_at": "2026-03-26T10:00:00.000000Z",
      "disconnected_at": "2026-03-26T12:00: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": "channel.banned",
  "event_id": "evt_01JXXXXXXXXXXXXXXXXXXXXX",
  "timestamp": "2026-03-26T12:00:00.000000Z",
  "company_id": 1,
  "data": {
    "channel": {
      "id": 2,
      "type": "whatsapp",
      "name": "Main WhatsApp",
      "status": "banned",
      "account_name": "+77001234567",
      "connected_at": "2026-03-26T10:00:00.000000Z",
      "disconnected_at": "2026-03-26T12:00:00.000000Z"
    }
  }
}

Payload fields

FieldTypeDescription
channel.idintegerChannel ID
channel.typestringChannel type: `whatsapp`, `whatsapp_business`, `instagram`, `instagram_business`, `telegram_bot`, `live_chat`
channel.namestringChannel name
channel.statusstringAlways `banned`
channel.account_namestring|nullPlatform account name or phone number
channel.connected_atstring|nullISO 8601 timestamp of last successful connection
channel.disconnected_atstring|nullISO 8601 timestamp when the ban was detected