{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "#/components/schemas/ClientMessageConversationUpdate", "title": "ClientMessageConversationUpdate", "type": "object", "properties": { "phoneNumber": { "description": "This is the phone number that the message is associated with.", "oneOf": [ { "$ref": "#/components/schemas/CreateByoPhoneNumberDTO", "title": "ByoPhoneNumber" }, { "$ref": "#/components/schemas/CreateTwilioPhoneNumberDTO", "title": "TwilioPhoneNumber" }, { "$ref": "#/components/schemas/CreateVonagePhoneNumberDTO", "title": "VonagePhoneNumber" }, { "$ref": "#/components/schemas/CreateVapiPhoneNumberDTO", "title": "VapiPhoneNumber" }, { "$ref": "#/components/schemas/CreateTelnyxPhoneNumberDTO", "title": "TelnyxPhoneNumber" } ] }, "type": { "type": "string", "description": "This is the type of the message. \"conversation-update\" is sent when an update is committed to the conversation history.", "enum": [ "conversation-update" ] }, "messages": { "type": "array", "description": "This is the most up-to-date conversation history at the time the message is sent.", "items": { "oneOf": [ { "$ref": "#/components/schemas/UserMessage", "title": "UserMessage" }, { "$ref": "#/components/schemas/SystemMessage", "title": "SystemMessage" }, { "$ref": "#/components/schemas/BotMessage", "title": "BotMessage" }, { "$ref": "#/components/schemas/ToolCallMessage", "title": "ToolCallMessage" }, { "$ref": "#/components/schemas/ToolCallResultMessage", "title": "ToolCallResultMessage" } ] } }, "messagesOpenAIFormatted": { "description": "This is the most up-to-date conversation history at the time the message is sent, formatted for OpenAI.", "type": "array", "items": { "$ref": "#/components/schemas/OpenAIMessage" } }, "timestamp": { "type": "number", "description": "This is the timestamp of the message." }, "call": { "description": "This is the call that the message is associated with.", "allOf": [ { "$ref": "#/components/schemas/Call" } ] }, "customer": { "description": "This is the customer that the message is associated with.", "allOf": [ { "$ref": "#/components/schemas/CreateCustomerDTO" } ] }, "assistant": { "description": "This is the assistant that the message is associated with.", "allOf": [ { "$ref": "#/components/schemas/CreateAssistantDTO" } ] } }, "required": [ "type", "messagesOpenAIFormatted" ] }