aiThreadsDelete
AiSuccessResponse aiThreadsDelete(AiThreadsDeleteRequest)
DELETE /api/2.0/ai/threads/delete
Delete a chat thread
Deletes a thread together with every message in it. The thread has to exist: unlike the other operations that take a threadId, this one checks first and answers 404 for an unknown or already-deleted thread rather than reporting success. The deletion is permanent and the messages cannot be recovered. To empty a thread but keep it, use DELETE api/2.0/ai/threads/clear-messages.
Parameters
| Name | In | Type | Description | Notes |
|---|---|---|---|---|
| AiThreadsDeleteRequest | body | String | The ID of the thread to delete, as a bare JSON string. | [required] |
Responses
| Status code | Description | Type | Response headers |
|---|---|---|---|
| 200 | Confirms the thread and its messages are gone. | AiSuccessResponse | - |
| 400 | threadId is missing. | AiErrorResponse | - |
| 401 | Missing asc_auth_key cookie or Authorization header. | AiErrorResponse | - |
| 403 | AI is disabled for this portal, the caller is a guest, or the room named by entityId is one the caller cannot open. Relayed from the DocSpace AI service or the Files API. | AiErrorResponse | - |
| 404 | No thread has this ID. | AiErrorResponse | - |
| 413 | The request body is larger than 100 KB, the JSON parser's limit on this route. | AiErrorResponse | - |
| 500 | Unhandled failure. The reason is logged server-side and never echoed back. | AiErrorResponse | - |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json