Skip to main content

aiThreadsGetMessageById

AiThreadMessageLike aiThreadsGetMessageById(messageId)

GET /api/2.0/ai/threads/get-message-by-id

Get one chat message

Returns one message by its ID, wherever it sits, without needing the thread it belongs to. messageId is required and, as with GET api/2.0/ai/threads/get-by-id, an unknown or deleted ID answers 404, so the result is never an empty body. Message IDs come from the thread history or from the answer of POST api/2.0/ai/threads/append-user-message.

Parameters​

NameInTypeDescriptionNotes
messageIdqueryStringThe globally unique chat message identifier.[required] [example: 22222222-2222-2222-2222-222222222222]

Responses​

Status codeDescriptionTypeResponse headers
200The message.AiThreadMessageLike-
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-
404No message has this ID.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiThreadMessageLike

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

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