Append completed conversation messages
POST/api/conversation/messages
Owner-only dialogue persistence without model calls or credit requirements. Widget conversations cannot be modified through this endpoint. Use the nextMessageId counter from GET /api/conversation/messages and coordinate one writer per conversation. Numeric message IDs are unique within a conversation. Identical retries preserve the original row; changed text or speakerIndex returns 409 and rolls back the batch. Send complete messages, including greetings and replies. Tools and internal context are not dialogue. Speaker indexes identify participants; role uses the model conversation convention (user for a customer, assistant for an agent) and supplies the default index (user 1, assistant 0) when no index is provided. This differs from /api/analyze, where all transcript participants use speakerRole:user and assistant denotes previous analyses. Analyze a saved message with transcriptMessageId and its matching speakerIndex.
Request
Responses
- 200
- 400
- 401
- 403
- 409
- 429
- 500
Default Response
Invalid message payload.
Not authenticated or invalid API key.
Access denied or required terms of service have not been accepted.
Message ID already has different text or speaker.
Too many requests.
Failed to save messages.