Conversation
Create and manage saved conversations. Use the returned ID as conversationId to save participant messages, and as sessionId to analyze them. The SDKs manage message persistence automatically when enabled.
Get a saved conversation
Returns a conversation with saved transcript messages and analysis results in analyses[]. This includes customer messages, agent replies, and greetings appended through POST /api/conversation/messages. Each entry contains its saved text and any analysis under analysisJsonOpenai. You can retrieve your own conversations and those covered by team-creator permissions; team permissions do not grant access to widget conversations.
Create a conversation
Creates a conversation owned by the authenticated account. Send the returned id as sessionId to POST /api/analyze to save analyses. The conversation inherits the account’s configured default call type. Requires at least 100 available credits; this is a balance requirement, not a fixed creation fee. The name is optional.
Rename a conversation
Updates the display name of a saved conversation. You can rename your own conversations and those covered by team-creator permissions. Widget history is read-only through this endpoint.
Delete a conversation
Permanently deletes the conversation and its saved transcript messages and analyses. You can delete your own conversations and those covered by team-creator permissions; team permissions do not grant access to widget conversations. Send id in the JSON request body.
Get the next conversation message ID
Owner-only initialization for a conversation message counter. Widget conversations are excluded. This operation makes no model call and requires no credit balance. Returns one greater than the highest saved numeric message ID, or 1 for an empty conversation. This does not reserve an ID. Coordinate writers; conflicting writes return 409 without replacing dialogue.
Append completed 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.