跳到主要内容

aiThreadsUpdateMessage

AiSuccessResponse aiThreadsUpdateMessage(AiThreadsUpdateMessageRequest)

PUT /api/2.0/ai/threads/update-message

Update message

Replaces the content of one stored message, which is how the edit and regenerate flows change a message outside the streaming lifecycle. The whole message is overwritten by the one supplied rather than merged, so send a complete object. Neither the ID nor the payload is validated here, so a malformed request surfaces as an error relayed from storage rather than as a 400. The answer only confirms the write.

Parameters​

NameInTypeDescriptionNotes
AiThreadsUpdateMessageRequestbodyAiThreadsUpdateMessageRequest[required]

Responses​

Status codeDescriptionTypeResponse headers
200Confirms the replacement was stored.AiSuccessResponse-
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