跳到主要内容

aiThreadsAppendUserMessage

aiThreadsAppendUserMessage_200_response aiThreadsAppendUserMessage(AiThreadsAppendUserMessageRequest)

POST /api/2.0/ai/threads/append-user-message

Append user message

Stores a user message in a thread and bumps its last-edit date so the thread resurfaces at the top of the list. The per-kind attachment cap of the composer is enforced here as well, so a direct API call cannot exceed what the UI allows. Passing profileId rebinds the thread to another model, which is how a mid-conversation model switch is recorded. The answer carries the new message's ID; the message is stored as sent and no reply is generated - run a round with POST api/2.0/ai/ai/send-with-stream for that.

Parameters​

NameInTypeDescriptionNotes
AiThreadsAppendUserMessageRequestbodyAiThreadsAppendUserMessageRequest[required]

Responses​

Status codeDescriptionTypeResponse headers
200The stored message, with the ID storage assigned to it.aiThreadsAppendUserMessage_200_response-
400The message is longer than the limit allows.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​

aiThreadsAppendUserMessage_200_response

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

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