update_conversation_messages
Replace the stored message history for a conversation, overwriting transcripts with a provided turns array. Requires confirmReplace and can update metadata like message count and timestamps.
Instructions
Replace the stored message turn history for a conversation using PATCH /agents/{agentId}/convos/{convoId}/messages. This overwrites voiceglow/{agentId}/convos/{convoId}/convo/JSON_STRING with the provided turns array. Set updateConversationMetadata=true (default) to also refresh messagesNum, lastMessage, firstMessageTS, lastMessageTS, and lastModified on the light conversation doc. Because this is a full replacement, confirmReplace must be true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| turns | Yes | Complete replacement turn history. Each turn requires from + messages. This array becomes the stored transcript history. | |
| agentId | Yes | The agent ID. | |
| convoId | Yes | The conversation ID. | |
| lgMessages | No | Optional LangGraph/langchain message array passthrough. | |
| confirmReplace | Yes | Must be true because this replaces the stored conversation message history. | |
| updateConversationMetadata | No | Default true. Refreshes messagesNum, lastMessage, firstMessageTS, lastMessageTS, and lastModified on the light conversation document. |