跳到主要内容

aiThreadsDeleteMessage

AiSuccessResponse aiThreadsDeleteMessage(AiThreadsDeleteMessageRequest)

DELETE /api/2.0/ai/threads/delete-message

Delete message

Deletes one message and leaves the rest of the thread untouched. messageId is required and may be sent either in the body or as a query parameter. An unknown ID is not reported: the call answers success without having deleted anything, so verify with GET api/2.0/ai/threads/read-messages when it matters. The deletion is permanent.

Parameters​

NameInTypeDescriptionNotes
AiThreadsDeleteMessageRequestbodyStringThe ID of the message to delete, as a bare JSON string.[required]

Responses​

Status codeDescriptionTypeResponse headers
200Confirms the request was accepted, whether or not a message was deleted.AiSuccessResponse-
400messageId is missing.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI 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-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiSuccessResponse

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json