Send every request to the base URL below with the X-Api-Key header. Bodies are JSON.
Chats
GET/chats
List chats, paginated.
Query parameters
| Field | Type | Required |
|---|
limit | integer | No |
page | integer | No |
operator_id | string | No |
status | "open" | "closed" | No |
has_owner | boolean | No |
GET/chats/{chat_id}/messages
Messages of a chat, newest first.
Alternate paths: GET /chats/messages
Path parameters
| Field | Type | Required |
|---|
chat_id | string | Yes |
Query parameters
| Field | Type | Required |
|---|
limit | integer | No |
page | integer | No |
from_date | string (date-time) | string | No |
to_date | string (date-time) | string | No |
POST/chats
Start a chat for a user with a user or an operator message. Uses the contact quota.
Body
| Field | Type | Required |
|---|
user_id | string | Yes |
user_message | string | No |
operator_message | string | No |
operator_id | string | No |
DELETE/chats/{chat_id}
Delete a chat permanently.
Path parameters
| Field | Type | Required |
|---|
chat_id | string | Yes |
POST/chats/{chat_id}/messages
Send an operator message. Button codes in the text become buttons. Uses the contact quota.
Path parameters
| Field | Type | Required |
|---|
chat_id | string | Yes |
Body
| Field | Type | Required |
|---|
operator_id | string | Yes |
message | string | Yes |
reply_id | string | No |
POST/chats/{chat_id}/files
Send a file from a public URL; the server fetches and checks it. Uses the contact quota.
Path parameters
| Field | Type | Required |
|---|
chat_id | string | Yes |
Body
| Field | Type | Required |
|---|
operator_id | string | Yes |
file_url | string (uri) | Yes |
file_name | string | Yes |
file_size | integer | Yes |
file_duration | number | No |
POST/chats/{chat_id}/notes
A private note the user cannot see.
Path parameters
| Field | Type | Required |
|---|
chat_id | string | Yes |
Body
| Field | Type | Required |
|---|
operator_id | string | Yes |
message | string | Yes |
POST/chats/{chat_id}/user-messages
Record a message from the user.
Path parameters
| Field | Type | Required |
|---|
chat_id | string | Yes |
Body
| Field | Type | Required |
|---|
message | string | Yes |
reply_id | string | No |
POST/chats/{chat_id}/typing
Show or hide “typing” to the user.
Path parameters
| Field | Type | Required |
|---|
chat_id | string | Yes |
Body
| Field | Type | Required |
|---|
operator_id | string | Yes |
typing_status | boolean | Yes |
POST/chats/{chat_id}/close
Close a chat.
Path parameters
| Field | Type | Required |
|---|
chat_id | string | Yes |
Body
| Field | Type | Required |
|---|
operator_id | string | Yes |
POST/chats/{chat_id}/assign
Transfer a chat to other operators.
Path parameters
| Field | Type | Required |
|---|
chat_id | string | Yes |
Body
| Field | Type | Required |
|---|
from_operator | string | Yes |
to_operator | string[] | Yes |
POST/chats/{chat_id}/unassign
Remove the chat owner.
Path parameters
| Field | Type | Required |
|---|
chat_id | string | Yes |
Body
| Field | Type | Required |
|---|
from_operator | string | Yes |
GET/chats/{chat_id}/unread
Unread message counts.
Alternate paths: GET /chats/unread
Path parameters
| Field | Type | Required |
|---|
chat_id | string | Yes |
POST/chats/{chat_id}/poll
Send the satisfaction survey to the user.
Path parameters
| Field | Type | Required |
|---|
chat_id | string | Yes |
POST/chats/{chat_id}/widget
Open or close the user's widget.
Path parameters
| Field | Type | Required |
|---|
chat_id | string | Yes |
Body
| Field | Type | Required |
|---|
action | "open" | "close" | Yes |
POST/chats/{chat_id}/js-event
Fire a JavaScript event on the user's page.
Path parameters
| Field | Type | Required |
|---|
chat_id | string | Yes |
Body
| Field | Type | Required |
|---|
event | string | Yes |