Add
[POST] .../v1/channel/add
Creates a CRM channel. Create a CRM channel that can later receive operators, working intervals and lead routing settings. The method stores the channel, sends the ChannelAdded webhook and returns new_id. The request body is required; name must be provided and is limited to 200 characters, queue_mode must not be Default and routing_strategy must not be Default. The caller must have CRM channel add permission; missing body or required fields, denied access, storage errors are returned as HTTP 200 ErrorResult.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| active | Boolean | Optional | Indicates whether the channel is active. |
| end_message | String | Optional | Conversation closing message. |
| first_response_sec | Int32 | Optional | First response SLA in seconds. |
| name | String | Required | Channel name. Maximum length is 200 characters. |
| next_response_sec | Int32 | Optional | Next response SLA in seconds. |
| off_hours_message | String | Optional | Message shown outside working hours. |
| pause_on_waiting_client | Boolean | Optional | Pauses SLA timers while the lead is waiting for the client. |
| queue_mode | String | Required | Queue mode: Pool or Direct. Allowed values: Default, Pool, Direct. |
| rating_enabled | Boolean | Optional | Enables conversation rating. |
| rating_message | String | Optional | Rating request text. |
| rating_negative_message | String | Optional | Text shown after a negative rating. |
| rating_positive_message | String | Optional | Text shown after a positive rating. |
| resolve_sec | Int32 | Optional | Resolution SLA in seconds. |
| routing_strategy | String | Required | Routing strategy: RoundRobin, LeastLoaded or Manual. Allowed values: Default, RoundRobin, LeastLoaded, Manual. |
| start_message | String | Optional | Greeting message. |
Request Example
{
"name": "Telegram support",
"queue_mode": "Pool",
"routing_strategy": "RoundRobin",
"first_response_sec": 300,
"next_response_sec": 900,
"resolve_sec": 86400,
"pause_on_waiting_client": true,
"start_message": "Hello, we will reply soon.",
"end_message": "Thank you for contacting us.",
"off_hours_message": "We are offline now and will reply during working hours.",
"rating_enabled": true,
"rating_message": "Please rate this conversation.",
"rating_positive_message": "Thank you for the feedback.",
"rating_negative_message": "We will review this conversation.",
"active": true
}
Response Parameters
| Name | Type | Description |
|---|---|---|
| ok | Boolean | Indicates whether the request completed successfully. |
| result | Insert | Created record result. |
Response Example
{
"ok": true,
"result": {
"new_id": 3
}
}