| Method | delete.chats |
|---|---|
| Description | Deleting a chat |
| Available to | Agent, Client |
| Necessary components for working with the method | Data API, Loading offline applications from an external system |
Only chats downloaded via the Data API are available for deletion.
In the report "Getting information about chats" get.chats_report are marked as "chat_channel_type": "dataapi"
Request parameters
| Title | Type | Required | Description | |
|---|---|---|---|---|
access_token |
string | yes | Authentication session key | |
user_id |
number | no | Unique user identifier of the agent client on behalf of which the request is made Is required for the agentTo obtain a list of client users, you must use the method "get.customer_users" |
|
id |
number | yes | Unique chat ID |
JSON request structure```json
{ "jsonrpc": "2.0", "id": "number", "method": "delete.chats", "params": { "access_token": "string", "user_id": "number", "id": "number" } }
### JSON response structure```JSON
{
"jsonrpc": "2.0",
"id": "number",
"result": {
"success": "true"
}
}
List of returned errors
See the section "List of errors for methods with the delete verb"