AIChatDeleteConversation¶
DELETE ai/chat/conversation
Deletes a conversation. By default the record is marked as deleted and disappears from the
lists; with hard the messages and runs are removed from the database as well.
A conversation contains customer data, so a real deletion request has to be honoured
properly — that is what hard is for. Everything else is a normal cleanup of the list.
Access Control¶
Allowed: client, manager, admin. Only conversations of the current session.
Request¶
DELETE request
DELETE https://{broker_domain}/ai/chat/conversation
Authorization: <JWT_TOKEN>
Content-Type: application/json
{ "conversationId": "cnv_8f3a…", "hard": false }
{
"command": "AIChatDeleteConversation",
"extID": "1",
"data": { "conversationId": "cnv_8f3a…" }
}
await platform.AIChatDeleteConversation({ conversationId });
Parameters¶
| Parameter | Type | Description |
|---|---|---|
conversationId |
string | Conversation id |
hard |
bool | Optional. Permanently delete messages and runs |
accountLogin |
int | Account context. Required for a client session of an account owner |
Response Data¶
{ "id": "cnv_8f3a…", "deleted": true, "hard": false }
Errors¶
| Code | Error | Description |
|---|---|---|
403 |
AI_ACCESS_DENIED |
The session may not use the assistant |
404 |
AI_CONVERSATION_NOT_FOUND |
Unknown conversation, or one of another session |