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
| Name | In | Type | Description | Notes |
|---|---|---|---|---|
| AiThreadsAppendUserMessageRequest | body | AiThreadsAppendUserMessageRequest | [required] |
Responses
| Status code | Description | Type | Response headers |
|---|---|---|---|
| 200 | The stored message, with the ID storage assigned to it. | aiThreadsAppendUserMessage_200_response | - |
| 400 | The message is longer than the limit allows. | 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 | - |
| 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
aiThreadsAppendUserMessage_200_response
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json