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. Unlike GET api/2.0/ai/threads/get-by-id an unknown ID is not reported as 404: the answer is an empty body with status 200, so a client has to treat a missing payload as no such message. 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, or an empty body when no message has that ID.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-
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