Channels
A channel is a connected messaging source: WhatsApp, Telegram, Instagram, SIP telephony, etc. Connecting and provisioning a new channel (QR pairing, Meta OAuth, SIP setup) happens through the onboarding wizard in the client dashboard (my.aisar.app/settings/channels/add) rather than directly through this API — the wizard uses separate, provider-specific setup endpoints. Through the public REST API you read the channel list and its connection state, manage the lifecycle of an already-connected channel (pause/resume/reconnect/disconnect), and configure operator access rules for it.
Endpoints
| Method | Path | Summary |
|---|---|---|
| GET | /v1/channelsList the company's channels (setup drafts excluded by default). | List the company's channels (setup drafts excluded by default). |
| GET | /v1/channels/{channel}Get a channel by id along with its provider configuration. | Get a channel by id along with its provider configuration. |
| GET | /v1/channel-typesReference list of channel types with their capabilities and providers. | Reference list of channel types with their capabilities and providers. |
| POST | /v1/channels/{channel}/disconnectDisconnect a channel (stop sending/receiving messages). | Disconnect a channel (stop sending/receiving messages). |
| POST | /v1/channels/{channel}/reconnectReconnect a previously disconnected channel. | Reconnect a previously disconnected channel. |
| POST | /v1/channels/{channel}/pausePause a channel (temporarily, without tearing down the session). | Pause a channel (temporarily, without tearing down the session). |
| POST | /v1/channels/{channel}/resumeResume a paused channel. | Resume a paused channel. |
| DELETE | /v1/channels/{channel}Delete a channel (soft delete). | Delete a channel (soft delete). |
| GET | /v1/channels/{channel}/accessOperator/team access rules for the channel. | Operator/team access rules for the channel. |
| POST | /v1/channels/{channel}/accessUpdate channel access rules (allow/block per team or user). | Update channel access rules (allow/block per team or user). |
Examples
List connected channels
Request
curl -X GET "https://api.aisar.app/v1/channels?status=connected" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"Response
{
"data": [
{
"id": 3,
"company_id": 1,
"channel_type_id": 1,
"provider_key": "whatsapp",
"name": "Основной WhatsApp",
"account_name": "+77001234567",
"status": "connected",
"setup_state": "ready",
"allow_broadcasts": true,
"allow_automations": true,
"allow_inbound_handling": true,
"connected_at": "2026-01-15T09:00:00Z",
"last_inbound_at": "2026-02-09T18:00:00Z",
"channel_type": { "id": 1, "key": "whatsapp", "name": "WhatsApp" }
}
]
}Pause a channel
Request
curl -X POST "https://api.aisar.app/v1/channels/3/pause" \
-H "Authorization: Bearer YOUR_API_TOKEN"Response
{
"data": {
"message": "Channel status updated.",
"channel": {
"id": 3,
"status": "paused",
"status_changed_at": "2026-02-09T18:30:00Z"
}
}
}