# Create conversation message

When sending messages through the Conversations API, the participant type must always be one of `accessKey`, `flow`, or `contact`, with `accessKey` being the most common usage. The value of `participantId` depends on `participantType` as shown below:

<table><thead><tr><th width="207">Participant type</th><th width="315">Description</th><th>Meaning of participant ID</th></tr></thead><tbody><tr><td><code>accessKey</code></td><td>A Bird API access key. This is what you'll commonly use when sending messages through the Conversations API</td><td>Access key ID</td></tr><tr><td><code>contact</code></td><td>A Bird contact</td><td>Contact ID</td></tr><tr><td><code>flow</code></td><td>A Bird flow</td><td>Flow ID</td></tr></tbody></table>

## Create message in conversation

> Sends a message in a conversation. The message content can be comprised of either \`body\` or \`template\`. Attempting to send as a participant that hasn't been added to the conversation results in an error unless the option \`addMissingParticipants\` is set to \`true\`. Attempting to send messages in a closed conversation results in an error.<br>

```json
{"openapi":"3.0.3","info":{"title":"Conversations","version":"v1"},"tags":[{"name":"conversation_message","description":"Manage the messages of a conversation."}],"servers":[{"url":"https://api.bird.com","description":"Production API"}],"security":[{"accessKey":[]}],"components":{"securitySchemes":{"accessKey":{"description":"Uses the Authorization header: 'AccessKey ' followed by your access key token","scheme":"AccessKey","type":"http"}},"parameters":{"conversationIdOrNil":{"name":"conversationId","description":"The conversation ID","in":"path","required":true,"schema":{"type":"string"}}},"schemas":{"CreateMessage":{"oneOf":[{"type":"object","description":"A message specifying its contents through a `body` field.","title":"Message with body","additionalProperties":false,"required":["body","participantId","participantType"],"properties":{"draft":{"type":"boolean","description":"Whether this message is a draft."},"reference":{"$ref":"#/components/schemas/MessageReference"},"sender":{"$ref":"#/components/schemas/MessageSender"},"participantId":{"$ref":"#/components/schemas/ParticipantId"},"replyToMessageId":{"$ref":"#/components/schemas/MessageReplyToMessageId"},"participantType":{"$ref":"#/components/schemas/CreateMessageParticipantType"},"participantContactIdentifierKey":{"type":"string","description":"The key of the contact identifier to use for the participant. This is used when the participant is not a user in the system.\n"},"participantContactIdentifierValue":{"type":"string"},"recipients":{"$ref":"#/components/schemas/CreateMessageRecipients"},"addMissingParticipants":{"type":"boolean","description":"If enabled, conveniently adds missing participants to the conversation without requiring additional API calls to `/participants`. It's recommended to set this to `true`.\n"},"body":{"$ref":"#/components/schemas/channels.messages.body.body"},"replyTo":{"$ref":"#/components/schemas/channels.messages.reply_to"},"appendPreviousMessage":{"type":"boolean","default":true},"channelId":{"$ref":"#/components/schemas/ChannelId"},"participants":{"type":"array","description":"When creating a new conversation, this is the list of participants.","items":{"$ref":"#/components/schemas/ParticipantRef"}},"name":{"type":"string","description":"When creating a new conversation, this is the subject of the email."},"description":{"type":"string","description":"When creating a new conversation, this is the description associated with it."},"visibility":{"$ref":"#/components/schemas/inbox.conversations.visibility"},"accessibility":{"$ref":"#/components/schemas/inbox.conversations.accessibility"},"attributes":{"type":"object","description":"A free-form object containing conversation attributes. You can use this field to store custom information along with the conversation.\n","nullable":true,"additionalProperties":true},"meta":{"$ref":"#/components/schemas/MessageMeta"}}},{"type":"object","description":"A message specifying its contents through a `template` field.","title":"Message with template","additionalProperties":false,"required":["template","participantId","participantType"],"properties":{"draft":{"type":"boolean","description":"Whether this message is a draft."},"reference":{"$ref":"#/components/schemas/MessageReference"},"sender":{"$ref":"#/components/schemas/MessageSender"},"participantId":{"$ref":"#/components/schemas/ParticipantId"},"replyToMessageId":{"$ref":"#/components/schemas/MessageReplyToMessageId"},"participantType":{"$ref":"#/components/schemas/CreateMessageParticipantType"},"recipients":{"$ref":"#/components/schemas/CreateMessageRecipients"},"addMissingParticipants":{"type":"boolean","description":"If enabled, conveniently adds missing participants to the conversation without requiring additional API calls to `/participants`. It's recommended to set this to `true`.\n"},"template":{"$ref":"#/components/schemas/channels.messages.template"},"appendPreviousMessage":{"type":"boolean","default":true},"channelId":{"$ref":"#/components/schemas/ChannelId"},"participants":{"type":"array","description":"When creating a new conversation, this is the list of participants.","items":{"$ref":"#/components/schemas/ParticipantRef"}},"name":{"type":"string","description":"When creating a new conversation, this is the subject of the email."},"description":{"type":"string","description":"When creating a new conversation, this is the description associated with it."},"visibility":{"$ref":"#/components/schemas/inbox.conversations.visibility"},"accessibility":{"$ref":"#/components/schemas/inbox.conversations.accessibility"},"attributes":{"type":"object","description":"A free-form object containing conversation attributes. You can use this field to store custom information along with the conversation.\n","nullable":true,"additionalProperties":true},"meta":{"$ref":"#/components/schemas/MessageMeta"}}}]},"MessageReference":{"type":"string","description":"A customizable ID assigned to messages you send. This can be used to correlate messages with data from your own integrating services. Must be globally unique within a workspace.\n","minLength":1,"maxLength":60,"nullable":true},"MessageSender":{"type":"object","description":"Message sender information for email.","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string","description":"Sender name shown in the email \"From\" header."},"email":{"type":"string","description":"Sender email address."},"emailReplyToAddress":{"type":"string","description":"Sender email address to reply to."}}},"ParticipantId":{"type":"string","description":"Participant ID.","maxLength":255},"MessageReplyToMessageId":{"type":"string","format":"uuid","description":"Message ID to reply to. Only used for email channels, other channel types must use `replyTo`."},"CreateMessageParticipantType":{"type":"string","description":"Participant type. When sending messages through the Conversations API, the participant be one of `accessKey`, `flow`, or `contact`.\n","enum":["user","contact","agent","flow","bot","accessKey","channel","connector","collaborationAutomation"]},"CreateMessageRecipients":{"type":"array","description":"List of recipients.","nullable":true,"items":{"$ref":"#/components/schemas/CreateMessageRecipient"}},"CreateMessageRecipient":{"type":"object","nullable":true,"oneOf":[{"type":"object","title":"MessageRecipientWithoutContact","description":"Create a new recipient by specifying an identifier key and identifier value.\nFor more information on identifier keys and values, please refer to the \"Conversation Participants\" page.\n","additionalProperties":false,"required":["identifierValue","type"],"properties":{"identifierKey":{"type":"string","description":"Identifier key of the contact depending on which channel is being used."},"identifierValue":{"type":"string","description":"Identifier of the contact, such as a phone number or email address."},"platformAddressSelector":{"type":"string","description":"An expression to determine the contact's platform address (such as email or phone number) dynamically when sending messages in advanced use cases.","maxLength":100},"type":{"type":"string","description":"Whether the email address is in the email's \"To\", \"CC\", or \"BCC\" headers.","enum":["to","cc","bcc"]}}},{"type":"object","title":"MessageRecipientWithContact","description":"Create a new recipient for a message.\n","additionalProperties":false,"required":["id","type"],"properties":{"id":{"type":"string","description":"Contact ID."},"identifierKey":{"type":"string","description":"Identifier key of the contact depending on which channel is being used.","nullable":true},"identifierValue":{"type":"string","description":"Identifier of the contact, such as a phone number or email address","nullable":true},"platformAddressSelector":{"type":"string","description":"An expression to determine the contact's platform address (such as email or phone number) dynamically when sending messages in advanced use cases.","maxLength":100,"nullable":true},"type":{"type":"string","description":"Whether the email address is in the email's \"To\", \"CC\", or \"BCC\" headers.","enum":["to","cc","bcc"]}}}]},"channels.messages.body.body":{"discriminator":{"mapping":{"action":"#/components/schemas/channels.messages.body.body__variant__action","authentication":"#/components/schemas/channels.messages.body.body__variant__authentication","carousel":"#/components/schemas/channels.messages.body.body__variant__carousel","file":"#/components/schemas/channels.messages.body.body__variant__file","gif":"#/components/schemas/channels.messages.body.body__variant__gif","html":"#/components/schemas/channels.messages.body.body__variant__html","image":"#/components/schemas/channels.messages.body.body__variant__image","list":"#/components/schemas/channels.messages.body.body__variant__list","location":"#/components/schemas/channels.messages.body.body__variant__location","section":"#/components/schemas/channels.messages.body.body__variant__section","text":"#/components/schemas/channels.messages.body.body__variant__text"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/channels.messages.body.body__variant__text"},{"$ref":"#/components/schemas/channels.messages.body.body__variant__html"},{"$ref":"#/components/schemas/channels.messages.body.body__variant__image"},{"$ref":"#/components/schemas/channels.messages.body.body__variant__gif"},{"$ref":"#/components/schemas/channels.messages.body.body__variant__file"},{"$ref":"#/components/schemas/channels.messages.body.body__variant__location"},{"$ref":"#/components/schemas/channels.messages.body.body__variant__carousel"},{"$ref":"#/components/schemas/channels.messages.body.body__variant__list"},{"$ref":"#/components/schemas/channels.messages.body.body__variant__section"},{"$ref":"#/components/schemas/channels.messages.body.body__variant__authentication"},{"$ref":"#/components/schemas/channels.messages.body.body__variant__action"}],"title":"Message Body"},"channels.messages.body.body__variant__text":{"properties":{"text":{"$ref":"#/components/schemas/channels.messages.body.text"},"type":{"enum":["text"],"type":"string"}},"required":["text","type"],"type":"object"},"channels.messages.body.text":{"properties":{"actions":{"items":{"$ref":"#/components/schemas/channels.messages.actions.action"},"type":"array"},"attachments":{"items":{"$ref":"#/components/schemas/channels.messages.body.text_attachment"},"type":"array"},"metadata":{"$ref":"#/components/schemas/channels.messages.metadata.text"},"text":{"type":"string"}},"required":["text"],"type":"object"},"channels.messages.actions.action":{"discriminator":{"mapping":{"buy":"#/components/schemas/channels.messages.actions.action__variant__buy","link":"#/components/schemas/channels.messages.actions.action__variant__link","locationRequest":"#/components/schemas/channels.messages.actions.action__variant__locationRequest","postback":"#/components/schemas/channels.messages.actions.action__variant__postback","reply":"#/components/schemas/channels.messages.actions.action__variant__reply"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/channels.messages.actions.action__variant__link"},{"$ref":"#/components/schemas/channels.messages.actions.action__variant__reply"},{"$ref":"#/components/schemas/channels.messages.actions.action__variant__locationRequest"},{"$ref":"#/components/schemas/channels.messages.actions.action__variant__buy"},{"$ref":"#/components/schemas/channels.messages.actions.action__variant__postback"}]},"channels.messages.actions.action__variant__link":{"properties":{"link":{"$ref":"#/components/schemas/channels.messages.actions.link"},"type":{"enum":["link"],"type":"string"}},"required":["link","type"],"type":"object"},"channels.messages.actions.link":{"properties":{"metadata":{"$ref":"#/components/schemas/channels.messages.metadata.action_link"},"text":{"type":"string"},"url":{"type":"string"}},"required":["text","url"],"type":"object"},"channels.messages.metadata.action_link":{"properties":{"description":{"$ref":"#/components/schemas/channels.messages.metadata.action_description"}},"type":"object"},"channels.messages.metadata.action_description":{"properties":{"label":{"type":"string"}},"required":["label"],"type":"object"},"channels.messages.actions.action__variant__reply":{"properties":{"reply":{"$ref":"#/components/schemas/channels.messages.actions.reply"},"type":{"enum":["reply"],"type":"string"}},"required":["reply","type"],"type":"object"},"channels.messages.actions.reply":{"properties":{"imageUrl":{"type":"string"},"metadata":{"$ref":"#/components/schemas/channels.messages.metadata.action_reply"},"text":{"type":"string"}},"required":["text"],"type":"object"},"channels.messages.metadata.action_reply":{"properties":{"description":{"$ref":"#/components/schemas/channels.messages.metadata.action_description"}},"type":"object"},"channels.messages.actions.action__variant__locationRequest":{"properties":{"locationRequest":{"$ref":"#/components/schemas/channels.messages.actions.location_request"},"type":{"enum":["locationRequest"],"type":"string"}},"required":["type"],"type":"object"},"channels.messages.actions.location_request":{"properties":{"text":{"type":"string"}},"type":"object"},"channels.messages.actions.action__variant__buy":{"properties":{"buy":{"$ref":"#/components/schemas/channels.messages.actions.buy"},"type":{"enum":["buy"],"type":"string"}},"required":["buy","type"],"type":"object"},"channels.messages.actions.buy":{"properties":{"amountCents":{"format":"int64","type":"integer"},"currency":{"type":"string"},"text":{"type":"string"}},"required":["text","amountCents","currency"],"type":"object"},"channels.messages.actions.action__variant__postback":{"properties":{"postback":{"$ref":"#/components/schemas/channels.messages.actions.postback"},"type":{"enum":["postback"],"type":"string"}},"required":["postback","type"],"type":"object"},"channels.messages.actions.postback":{"properties":{"handshake":{"$ref":"#/components/schemas/channels.messages.actions.postback_handshake"},"imageUrl":{"type":"string"},"metadata":{"$ref":"#/components/schemas/channels.messages.metadata.action_postback"},"otpType":{"type":"string"},"payload":{"type":"string"},"text":{"type":"string"}},"required":["text"],"type":"object"},"channels.messages.actions.postback_handshake":{"properties":{"packageName":{"type":"string"},"signatureHash":{"type":"string"},"supportedApps":{"items":{"$ref":"#/components/schemas/channels.messages.actions.postback_handshake_supported_app"},"type":"array"},"text":{"type":"string"},"zeroTapTermsAccepted":{"type":"boolean"}},"required":["text","packageName","signatureHash","zeroTapTermsAccepted"],"type":"object"},"channels.messages.actions.postback_handshake_supported_app":{"properties":{"packageName":{"type":"string"},"signatureHash":{"type":"string"}},"required":["packageName","signatureHash"],"type":"object"},"channels.messages.metadata.action_postback":{"properties":{"description":{"$ref":"#/components/schemas/channels.messages.metadata.action_description"}},"type":"object"},"channels.messages.body.text_attachment":{"properties":{"content":{"type":"string"},"contentId":{"type":"string"},"contentType":{"type":"string"},"filename":{"type":"string"},"inline":{"type":"boolean"},"mediaUrl":{"type":"string"}},"required":["mediaUrl","filename"],"type":"object"},"channels.messages.metadata.text":{"properties":{"apple":{"$ref":"#/components/schemas/channels.messages.metadata.text_apple"},"headers":{"additionalProperties":{"type":"string"},"type":"object"},"line":{"$ref":"#/components/schemas/channels.messages.metadata.text_line"},"paymentDetails":{"$ref":"#/components/schemas/channels.messages.metadata.text_payment_details"},"subject":{"type":"string"},"telegram":{"$ref":"#/components/schemas/channels.messages.metadata.text_telegram"},"whatsapp":{"$ref":"#/components/schemas/channels.messages.metadata.text_whatsapp"}},"type":"object"},"channels.messages.metadata.text_apple":{"properties":{"appClipPreview":{"type":"boolean"},"appClipRegion":{"type":"string"},"summaryText":{"type":"string"}},"type":"object"},"channels.messages.metadata.text_line":{"properties":{"emoji":{"$ref":"#/components/schemas/channels.messages.metadata.text_line_emoji"}},"type":"object"},"channels.messages.metadata.text_line_emoji":{"properties":{"items":{"items":{"$ref":"#/components/schemas/channels.messages.metadata.text_line_emoji_item"},"type":"array"}},"type":"object"},"channels.messages.metadata.text_line_emoji_item":{"properties":{"emojiId":{"type":"string"},"index":{"format":"uint32","type":"integer"},"length":{"format":"uint32","type":"integer"},"productId":{"type":"string"}},"required":["index","productId","emojiId"],"type":"object"},"channels.messages.metadata.text_payment_details":{"properties":{"amount":{"type":"string"},"currency":{"type":"string"},"sessionIdentifier":{"type":"string"},"state":{"type":"string"}},"required":["amount","state","currency"],"type":"object"},"channels.messages.metadata.text_telegram":{"properties":{"parseMode":{"type":"string"}},"type":"object"},"channels.messages.metadata.text_whatsapp":{"properties":{"callPermissionExpiration":{"format":"date-time","type":"string"},"callPermissionResponse":{"$ref":"#/components/schemas/channels.messages.metadata.text_whatsapp_call_permission_response"},"previewUrl":{"type":"boolean"}},"required":["previewUrl"],"type":"object"},"channels.messages.metadata.text_whatsapp_call_permission_response":{"enum":["accept","reject"],"type":"string"},"channels.messages.body.body__variant__html":{"properties":{"html":{"$ref":"#/components/schemas/channels.messages.body.html"},"type":{"enum":["html"],"type":"string"}},"required":["html","type"],"type":"object"},"channels.messages.body.html":{"properties":{"actions":{"items":{"$ref":"#/components/schemas/channels.messages.actions.action"},"type":"array"},"attachments":{"items":{"$ref":"#/components/schemas/channels.messages.body.html_attachment"},"type":"array"},"html":{"type":"string"},"metadata":{"$ref":"#/components/schemas/channels.messages.metadata.html"},"text":{"type":"string"}},"type":"object"},"channels.messages.body.html_attachment":{"properties":{"content":{"type":"string"},"contentId":{"type":"string"},"contentType":{"type":"string"},"filename":{"type":"string"},"inline":{"type":"boolean"},"mediaUrl":{"type":"string"}},"required":["filename"],"type":"object"},"channels.messages.metadata.html":{"properties":{"clickTracking":{"type":"boolean"},"from":{"$ref":"#/components/schemas/channels.messages.metadata.email_from"},"headers":{"additionalProperties":{"type":"string"},"type":"object"},"initialOpenTracking":{"type":"boolean"},"openTracking":{"type":"boolean"},"subject":{"type":"string"}},"type":"object"},"channels.messages.metadata.email_from":{"properties":{"displayName":{"type":"string"},"username":{"type":"string"}},"type":"object"},"channels.messages.body.body__variant__image":{"properties":{"image":{"$ref":"#/components/schemas/channels.messages.body.images"},"type":{"enum":["image"],"type":"string"}},"required":["image","type"],"type":"object"},"channels.messages.body.images":{"properties":{"actions":{"items":{"$ref":"#/components/schemas/channels.messages.actions.action"},"type":"array"},"images":{"items":{"$ref":"#/components/schemas/channels.messages.body.image"},"type":"array"},"metadata":{"$ref":"#/components/schemas/channels.messages.metadata.images"},"text":{"type":"string"}},"required":["images"],"type":"object"},"channels.messages.body.image":{"properties":{"altText":{"type":"string"},"mediaPreviewUrl":{"type":"string"},"mediaUrl":{"type":"string"}},"required":["mediaUrl"],"type":"object"},"channels.messages.metadata.images":{"properties":{"fallbackText":{"type":"string"},"storyType":{"$ref":"#/components/schemas/channels.messages.metadata.story_type"},"subject":{"type":"string"},"telegram":{"$ref":"#/components/schemas/channels.messages.metadata.images_telegram"}},"type":"object"},"channels.messages.metadata.story_type":{"enum":["mention","reply"],"type":"string"},"channels.messages.metadata.images_telegram":{"properties":{"parseMode":{"type":"string"}},"type":"object"},"channels.messages.body.body__variant__gif":{"properties":{"gif":{"$ref":"#/components/schemas/channels.messages.body.gif"},"type":{"enum":["gif"],"type":"string"}},"required":["gif","type"],"type":"object"},"channels.messages.body.gif":{"properties":{"actions":{"items":{"$ref":"#/components/schemas/channels.messages.actions.action"},"type":"array"},"altText":{"type":"string"},"mediaUrl":{"type":"string"},"metadata":{"$ref":"#/components/schemas/channels.messages.metadata.gif"},"text":{"type":"string"}},"required":["mediaUrl"],"type":"object"},"channels.messages.metadata.gif":{"properties":{"telegram":{"$ref":"#/components/schemas/channels.messages.metadata.gif_telegram"}},"type":"object"},"channels.messages.metadata.gif_telegram":{"properties":{"parseMode":{"type":"string"}},"type":"object"},"channels.messages.body.body__variant__file":{"properties":{"file":{"$ref":"#/components/schemas/channels.messages.body.files"},"type":{"enum":["file"],"type":"string"}},"required":["file","type"],"type":"object"},"channels.messages.body.files":{"properties":{"actions":{"items":{"$ref":"#/components/schemas/channels.messages.actions.action"},"type":"array"},"files":{"items":{"$ref":"#/components/schemas/channels.messages.body.file"},"type":"array"},"metadata":{"$ref":"#/components/schemas/channels.messages.metadata.files"},"text":{"type":"string"}},"required":["files"],"type":"object"},"channels.messages.body.file":{"properties":{"altText":{"type":"string"},"contentType":{"type":"string"},"filename":{"type":"string"},"mediaUrl":{"type":"string"},"metadata":{"$ref":"#/components/schemas/channels.messages.metadata.file"}},"required":["contentType","mediaUrl"],"type":"object"},"channels.messages.metadata.file":{"properties":{"isAnimated":{"type":"boolean"}},"type":"object"},"channels.messages.metadata.files":{"properties":{"fallbackText":{"type":"string"},"storyType":{"$ref":"#/components/schemas/channels.messages.metadata.story_type"},"subject":{"type":"string"},"telegram":{"$ref":"#/components/schemas/channels.messages.metadata.files_telegram"}},"type":"object"},"channels.messages.metadata.files_telegram":{"properties":{"parseMode":{"type":"string"}},"type":"object"},"channels.messages.body.body__variant__location":{"properties":{"location":{"$ref":"#/components/schemas/channels.messages.body.location"},"type":{"enum":["location"],"type":"string"}},"required":["location","type"],"type":"object"},"channels.messages.body.location":{"properties":{"coordinates":{"$ref":"#/components/schemas/channels.messages.body.location_coordinates"},"location":{"$ref":"#/components/schemas/channels.messages.body.location_location"}},"required":["coordinates","location"],"type":"object"},"channels.messages.body.location_coordinates":{"properties":{"latitude":{"format":"double","type":"number"},"longitude":{"format":"double","type":"number"}},"required":["latitude","longitude"],"type":"object"},"channels.messages.body.location_location":{"properties":{"address":{"type":"string"},"label":{"type":"string"}},"required":["address","label"],"type":"object"},"channels.messages.body.body__variant__carousel":{"properties":{"carousel":{"$ref":"#/components/schemas/channels.messages.body.carousel"},"type":{"enum":["carousel"],"type":"string"}},"required":["carousel","type"],"type":"object"},"channels.messages.body.carousel":{"properties":{"items":{"items":{"$ref":"#/components/schemas/channels.messages.body.item"},"type":"array"},"text":{"description":"Optional text displayed above the carousel cards.","type":"string"}},"type":"object"},"channels.messages.body.item":{"properties":{"actions":{"items":{"$ref":"#/components/schemas/channels.messages.actions.action"},"type":"array"},"altText":{"type":"string"},"description":{"type":"string"},"mediaUrl":{"type":"string"},"size":{"format":"int64","type":"integer"},"title":{"type":"string"}},"type":"object"},"channels.messages.body.body__variant__list":{"properties":{"list":{"$ref":"#/components/schemas/channels.messages.body.list"},"type":{"enum":["list"],"type":"string"}},"required":["list","type"],"type":"object"},"channels.messages.body.list":{"properties":{"actions":{"items":{"$ref":"#/components/schemas/channels.messages.actions.action"},"type":"array"},"altText":{"type":"string"},"items":{"items":{"$ref":"#/components/schemas/channels.messages.body.item"},"type":"array"},"metadata":{"$ref":"#/components/schemas/channels.messages.metadata.list"},"text":{"type":"string"},"title":{"type":"string"}},"type":"object"},"channels.messages.metadata.list":{"properties":{"button":{"$ref":"#/components/schemas/channels.messages.metadata.action_list_button"},"replyMessage":{"$ref":"#/components/schemas/channels.messages.metadata.action_list_reply_message"}},"type":"object"},"channels.messages.metadata.action_list_button":{"properties":{"label":{"type":"string"}},"required":["label"],"type":"object"},"channels.messages.metadata.action_list_reply_message":{"properties":{"text":{"type":"string"},"title":{"type":"string"}},"required":["title","text"],"type":"object"},"channels.messages.body.body__variant__section":{"properties":{"section":{"$ref":"#/components/schemas/channels.messages.body.section"},"type":{"enum":["section"],"type":"string"}},"required":["section","type"],"type":"object"},"channels.messages.body.section":{"properties":{"configurations":{"additionalProperties":{"type":"string"},"type":"object"},"items":{"items":{"$ref":"#/components/schemas/channels.messages.body.body"},"type":"array"}},"title":"Message Body Section","type":"object"},"channels.messages.body.body__variant__authentication":{"properties":{"authentication":{"$ref":"#/components/schemas/channels.messages.body.authentication"},"type":{"enum":["authentication"],"type":"string"}},"required":["authentication","type"],"type":"object"},"channels.messages.body.authentication":{"properties":{"otp":{"$ref":"#/components/schemas/channels.messages.body.authentication_otp"}},"type":"object"},"channels.messages.body.authentication_otp":{"properties":{"actions":{"items":{"$ref":"#/components/schemas/channels.messages.actions.action"},"type":"array"},"disclaimer":{"description":"Whether to add a security disclaimer to the authentication body.","type":"boolean"},"expirationTime":{"description":"The number of seconds after which the authentication code expires. If not set, no expiration notification is sent.","format":"uint32","type":"integer"}},"required":["disclaimer"],"type":"object"},"channels.messages.body.body__variant__action":{"properties":{"action":{"$ref":"#/components/schemas/channels.messages.body.action"},"type":{"enum":["action"],"type":"string"}},"required":["action","type"],"type":"object"},"channels.messages.body.action":{"allOf":[{"properties":{"action":{"$ref":"#/components/schemas/channels.messages.body.action_type"}},"required":["action"],"type":"object"},{"oneOf":[{"properties":{"permissionRequest":{"$ref":"#/components/schemas/channels.messages.body.action_permission_request"}},"required":["permissionRequest"],"type":"object"}]}]},"channels.messages.body.action_type":{"enum":["permissionRequest"],"type":"string"},"channels.messages.body.action_permission_request":{"properties":{"resource":{"$ref":"#/components/schemas/channels.messages.body.permission_resource"}},"required":["resource"],"type":"object"},"channels.messages.body.permission_resource":{"enum":["call"],"type":"string"},"channels.messages.reply_to":{"properties":{"id":{"description":"The ID of the message that is being replied to.","format":"uuid","type":"string"},"order":{"description":"The order of the message part in the conversation.","format":"int32","type":"integer"},"platformReference":{"type":"string"},"type":{"$ref":"#/components/schemas/channels.messages.reply_to_type"}},"type":"object"},"channels.messages.reply_to_type":{"enum":["message","click"],"type":"string"},"ChannelId":{"type":"string","description":"Channel ID.","format":"uuid"},"ParticipantRef":{"type":"object","description":"The participantRef is used for creating participants.\n","oneOf":[{"type":"object","title":"Non-contact participant with ID","description":"Create a participant of the type user, access key, flow, agent, bot, or action rule.\n","additionalProperties":false,"required":["id","type"],"properties":{"id":{"type":"string","description":"The ID of the user, access key, flow, agent, bot, or action rule."},"type":{"type":"string","description":"Participant type.","enum":["user","accessKey","flow","agent","bot","collaborationAutomation"]}}},{"type":"object","title":"Participant with identifier","description":"Create a participant of the type contact and user the identifier to find the contact.\nFor more information on identifier keys and values, please refer to the \"Conversation Participants\" page.\nWhen platformAddressSelector is provided, the identifierKey/identifierValue will be used to find the contact, and the platformAddressSelector to select the attribute used for the platform communication.\n","additionalProperties":false,"required":["type","identifierValue"],"properties":{"id":{"type":"string","description":"The contact ID.","format":"uuid"},"identifierKey":{"type":"string","description":"Identifier key of the contact depending on which channel is being used."},"identifierValue":{"type":"string","description":"Identifier of the contact, such as a phone number or email address."},"platformAddressSelector":{"type":"string","description":"An expression to determine the contact's platform address (such as email or phone number) dynamically when sending messages in advanced use cases.","maxLength":100},"type":{"type":"string","description":"Participant type.","enum":["contact"]}}},{"type":"object","title":"Participant with contact ID","description":"Create a participant based on an existing contact. It is optional to set the platformAddressSelector for a given contact to select the attribute used for the platform communication.\n","additionalProperties":false,"required":["id","type"],"properties":{"id":{"type":"string","description":"The contact ID.","format":"uuid"},"platformAddressSelector":{"type":"string","description":"An expression to determine the contact's platform address (such as email or phone number) dynamically when sending messages in advanced use cases.","maxLength":100},"type":{"type":"string","description":"Participant type.","enum":["contact"]}}}]},"inbox.conversations.visibility":{"enum":["public","private","direct","group"],"type":"string"},"inbox.conversations.accessibility":{"enum":["open","invite-only","request-to-join","private"],"type":"string"},"MessageMeta":{"type":"object","description":"Message metadata fields that might be populated depending on the channel being used.","title":"MessageMeta","additionalProperties":false,"properties":{"email":{"type":"object","description":"Metadata fields for email messages.","additionalProperties":false,"properties":{"subject":{"type":"string","description":"Email subject line."},"headers":{"type":"object","description":"Additional email headers.","additionalProperties":{"type":"string"}},"from":{"type":"object","description":"Email From address.","additionalProperties":false,"properties":{"username":{"type":"string","description":"The username part of the adress, e.g. for the address `john.doe@bird.com`, this value will be `john.doe`.\n","pattern":"[\\w\\d.-/+]+"},"displayName":{"type":"string","description":"The display name of an email participant."}}}}},"extraInformation":{"type":"object","description":"A free-form object that might contain additional metadata fields.","additionalProperties":true},"referral":{"type":"object","description":"This represents a social media post or an ad that was referenced when starting the conversation.","additionalProperties":false,"properties":{"source":{"type":"string"},"title":{"type":"string"},"text":{"type":"string"},"group":{"type":"string"},"metadata":{"type":"object","additionalProperties":false,"properties":{"sourceId":{"type":"string","description":"The ID of the social media post or ad."},"sourceUrl":{"type":"string","description":"The URL of the social media post or ad."},"mediaType":{"type":"string","description":"Type of media used in the post or ad."},"mediaUrl":{"type":"string","description":"Link to the media associated with the referral post or ad."},"caption":{"type":"string","description":"Caption associated with the referral post or ad."},"username":{"type":"string","description":"Username who created the referral post or ad."},"timestamp":{"type":"string","description":"Timestamp when the referral post or ad was created.","format":"date-time"},"trackingId":{"type":"string"}}}}}}},"channels.messages.template":{"properties":{"attachments":{"items":{"$ref":"#/components/schemas/channels.messages.template_attachment"},"type":"array"},"deployment":{"additionalProperties":{"type":"string"},"type":"object"},"locale":{"type":"string"},"name":{"description":"The platform name of the template.","type":"string"},"parameters":{"items":{"$ref":"#/components/schemas/channels.messages.template_parameter"},"type":"array"},"projectId":{"description":"The ID of the project from Studio.","format":"uuid","type":"string"},"settings":{"$ref":"#/components/schemas/channels.messages.template_settings"},"shortLinks":{"$ref":"#/components/schemas/channels.messages.short_links"},"templateBody":{"$ref":"#/components/schemas/channels.messages.body.body"},"utmParameters":{"items":{"$ref":"#/components/schemas/channels.messages.utm_parameter"},"type":"array"},"variables":{"additionalProperties":{"type":"string"},"type":"object"},"version":{"description":"The version of the template.","type":"string"}},"required":["projectId","version","locale"],"type":"object"},"channels.messages.template_attachment":{"properties":{"content":{"type":"string"},"contentType":{"type":"string"},"filename":{"type":"string"},"inline":{"type":"boolean"},"mediaUrl":{"type":"string"}},"required":["mediaUrl","filename","inline"],"type":"object"},"channels.messages.template_parameter":{"properties":{"key":{"type":"string"},"sourceUrl":{"$ref":"#/components/schemas/channels.messages.source_url"},"type":{"$ref":"#/components/schemas/channels.messages.template_parameter_type"},"value":{"nullable":true,"oneOf":[{"type":"object"},{"items":{},"type":"array"},{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["type","key","value"],"type":"object"},"channels.messages.source_url":{"properties":{"fullyReplaced":{"type":"boolean"},"value":{"type":"string"}},"required":["value","fullyReplaced"],"type":"object"},"channels.messages.template_parameter_type":{"enum":["string","timeslotList","productSections","productList","number","boolean","sectionList","shippingMethodList","lineItemList","whatsappProductSections","whatsappProductItems","shortLink","object","carouselCards","appleFormPageItems"],"type":"string"},"channels.messages.template_settings":{"properties":{"disallowMmLite":{"type":"boolean"}},"type":"object"},"channels.messages.short_links":{"properties":{"domain":{"description":"The domain to use when shortening links. When set to `default`, uses the default link shortening domain for the workspace.","type":"string"},"enabled":{"description":"Enables link shortening for SMS messages.","type":"boolean"}},"required":["enabled","domain"],"type":"object"},"channels.messages.utm_parameter":{"allOf":[{"properties":{"key":{"type":"string"}},"required":["key"],"type":"object"},{"oneOf":[{"properties":{"value":{"type":"string"}},"required":["value"],"type":"object"},{"properties":{"reference":{"$ref":"#/components/schemas/channels.messages.utm_parameter_reference"}},"required":["reference"],"type":"object"}]}]},"channels.messages.utm_parameter_reference":{"enum":["platform_name","channel_name"],"type":"string"},"inbox.conversations.message":{"properties":{"body":{"$ref":"#/components/schemas/channels.messages.body.body"},"channelId":{"format":"uuid","type":"string"},"conversationCreatedAt":{"format":"date-time","type":"string"},"conversationId":{"format":"uuid","type":"string"},"createdAt":{"format":"date-time","type":"string"},"draft":{"description":"Whether this message is a draft.","type":"boolean"},"draftMeta":{"$ref":"#/components/schemas/inbox.conversations.draft_message_meta"},"id":{"description":"A unique identifier for this message.","format":"uuid","type":"string"},"interactions":{"description":"A list of interactions associated with the message (e.g. read receipts, clicks, reactions).","items":{"$ref":"#/components/schemas/channels.messages.interactions.interaction"},"type":"array"},"meta":{"$ref":"#/components/schemas/channels.messages.metadata"},"reason":{"description":"Failure reason. Populated when status is `sending_failed` or `delivery_failed`.","type":"string"},"receiver":{"$ref":"#/components/schemas/channels.participants.receiver"},"receiverTypes":{"description":"Receiver types for the message (to/cc/bcc). Currently only used for inbound email messages.","items":{"enum":["to","cc","bcc"],"type":"string"},"type":"array"},"recipients":{"items":{"$ref":"#/components/schemas/channels.participants.contact"},"type":"array"},"reference":{"description":"A customizable ID assigned to messages you send. Can be used to correlate messages with data from your own services. Must be globally unique within a workspace.","type":"string"},"replyTo":{"$ref":"#/components/schemas/channels.messages.reply_to"},"resourceUri":{"type":"string"},"sender":{"$ref":"#/components/schemas/inbox.conversations.message_sender"},"source":{"$ref":"#/components/schemas/inbox.conversations.message_source"},"status":{"$ref":"#/components/schemas/inbox.conversations.message_status"},"template":{"$ref":"#/components/schemas/channels.messages.template"},"type":{"enum":["text","html","image","file","gif","location","carousel","list","section","authentication","action"],"type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","reference","sender","conversationId","draft","status","source","createdAt","updatedAt"],"title":"Conversation Message","type":"object"},"inbox.conversations.draft_message_meta":{"description":"Metadata for draft messages.","properties":{"creatorType":{"$ref":"#/components/schemas/inbox.conversations.draft_message_creator_type"}},"required":["creatorType"],"type":"object"},"inbox.conversations.draft_message_creator_type":{"enum":["user","bot"],"type":"string"},"channels.messages.interactions.interaction":{"properties":{"bodyTemplateProjectId":{"format":"uuid","type":"string"},"channelId":{"format":"uuid","type":"string"},"context":{"$ref":"#/components/schemas/channels.messages.context"},"createdAt":{"format":"date-time","type":"string"},"details":{"type":"string"},"id":{"format":"uuid","type":"string"},"isFirstInteraction":{"type":"boolean"},"isFirstInteractionIncludingBots":{"type":"boolean"},"journey":{"$ref":"#/components/schemas/channels.messages.metadata.flow"},"messageCreatedAt":{"format":"date-time","type":"string"},"messageId":{"format":"uuid","type":"string"},"messagePartsCount":{"format":"int32","type":"integer"},"messageReference":{"type":"string"},"messageTags":{"items":{"type":"string"},"type":"array"},"metadata":{"$ref":"#/components/schemas/channels.messages.interactions.metadata"},"notification":{"$ref":"#/components/schemas/channels.notifications.message_notification"},"platformId":{"type":"string"},"platformReferenceId":{"type":"string"},"receiver":{"$ref":"#/components/schemas/channels.participants.receiver"},"type":{"$ref":"#/components/schemas/channels.messages.interactions.type"},"useCaseType":{"$ref":"#/components/schemas/channels.use_case_type"}},"required":["id","type","createdAt","messageId","channelId","platformId","messageReference","messagePartsCount","receiver","context"],"type":"object"},"channels.messages.context":{"properties":{"id":{"type":"string"},"tagIds":{"items":{"format":"uuid","type":"string"},"type":"array"},"type":{"type":"string"}},"type":"object"},"channels.messages.metadata.flow":{"properties":{"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"runId":{"format":"uuid","type":"string"},"scheduleExecutionId":{"format":"uuid","type":"string"},"stepId":{"type":"string"}},"title":"Message Flow Meta","type":"object"},"channels.messages.interactions.metadata":{"properties":{"button":{"$ref":"#/components/schemas/channels.messages.interactions.metadata.button"},"conversion":{"$ref":"#/components/schemas/channels.messages.interactions.metadata.conversion"},"extraInformation":{"additionalProperties":{"type":"string"},"type":"object"},"link":{"$ref":"#/components/schemas/channels.messages.interactions.metadata.link"},"prefetched":{"type":"boolean"},"reaction":{"$ref":"#/components/schemas/channels.messages.interactions.metadata.reaction"},"renderedContentBlocks":{"items":{"type":"string"},"type":"array"},"subscriptionList":{"$ref":"#/components/schemas/channels.messages.interactions.metadata.subscription_list"}},"type":"object"},"channels.messages.interactions.metadata.button":{"properties":{"payload":{"type":"string"}},"required":["payload"],"type":"object"},"channels.messages.interactions.metadata.conversion":{"properties":{"method":{"$ref":"#/components/schemas/channels.messages.interactions.metadata.conversion_method"},"status":{"$ref":"#/components/schemas/channels.messages.interactions.metadata.conversion_status"},"timestamp":{"description":"Timestamp of when the conversion was recorded","format":"date-time","type":"string"},"type":{"$ref":"#/components/schemas/channels.messages.interactions.metadata.conversion_type"}},"title":"Channel Message Conversion","type":"object"},"channels.messages.interactions.metadata.conversion_method":{"description":"Method of entering the code","enum":["unknown","manual","auto"],"title":"Message Interaction Conversion Method","type":"string"},"channels.messages.interactions.metadata.conversion_status":{"description":"Status of the conversion","enum":["converted","canceled","not_converted","incorrect_code","resent","received_after_expiration"],"title":"Message Interaction Conversion Status","type":"string"},"channels.messages.interactions.metadata.conversion_type":{"description":"Type of conversion","enum":["otp","url","promo_code"],"title":"Message Interaction Conversion Type","type":"string"},"channels.messages.interactions.metadata.link":{"properties":{"clickType":{"$ref":"#/components/schemas/channels.messages.interactions.metadata.link_click_type"},"name":{"type":"string"},"url":{"type":"string"}},"required":["name","url"],"type":"object"},"channels.messages.interactions.metadata.link_click_type":{"enum":["link","button"],"title":"Message Interaction Link Click Type","type":"string"},"channels.messages.interactions.metadata.reaction":{"properties":{"action":{"$ref":"#/components/schemas/channels.messages.interactions.metadata.reaction_action"},"emoji":{"type":"string"}},"required":["emoji","action"],"type":"object"},"channels.messages.interactions.metadata.reaction_action":{"enum":["react","unreact"],"title":"Message Interaction Reaction Action","type":"string"},"channels.messages.interactions.metadata.subscription_list":{"properties":{"subscriptionListId":{"format":"uuid","type":"string"}},"required":["subscriptionListId"],"type":"object"},"channels.notifications.message_notification":{"properties":{"template":{"type":"string"},"url":{"type":"string"}},"required":["url"],"type":"object"},"channels.participants.receiver":{"properties":{"connector":{"$ref":"#/components/schemas/channels.participants.connector"},"contacts":{"items":{"$ref":"#/components/schemas/channels.participants.contact"},"type":"array"},"device":{"$ref":"#/components/schemas/channels.participants.device"},"inbox":{"$ref":"#/components/schemas/channels.participants.inbox"},"userContacts":{"items":{"$ref":"#/components/schemas/channels.participants.user_contact"},"type":"array"}},"type":"object"},"channels.participants.connector":{"properties":{"annotations":{"$ref":"#/components/schemas/channels.participants.contact_annotation"},"id":{"format":"uuid","type":"string"},"identifierValue":{"description":"The identifier value of the sender or receiver connector (e.g. email address or phone number).","type":"string"},"types":{"items":{"type":"string"},"type":"array"}},"required":["id"],"type":"object"},"channels.participants.contact_annotation":{"description":"Annotations add extra information to a sender or receiver. For email messages, the name annotation overrides the display name.","properties":{"name":{"type":"string"}},"type":"object"},"channels.participants.contact":{"properties":{"contactAnnotation":{"$ref":"#/components/schemas/channels.participants.contact_annotation"},"countryCode":{"type":"string"},"id":{"description":"The ID of the contact.","format":"uuid","type":"string"},"identifierKey":{"description":"The identifier key for finding the contact (e.g. emailaddress, phonenumber). For WhatsApp channels with BSUID support, use `whatsappbsuid` to send to a contact by their Business-Scoped User ID.","type":"string"},"identifierValue":{"description":"The identifier value for finding the contact.","type":"string"},"identifiers":{"description":"Additional identifiers to augment the contact during resolution.","items":{"$ref":"#/components/schemas/channels.participants.identifier"},"type":"array"},"platformAddress":{"description":"The resolved platform address used to deliver the message (e.g. phone number or email address).","type":"string"},"platformAddressSelector":{"description":"An expression that defines how we resolve the platform address from a contact. Optional override for the default resolution logic.","type":"string"},"receiverExpression":{"type":"string"},"receiverValue":{"type":"string"},"type":{"description":"The type of the receiver (e.g. to, cc, bcc for email).","type":"string"}},"type":"object"},"channels.participants.identifier":{"properties":{"identifierKey":{"description":"The identifier key for finding the contact (e.g. emailaddress, phonenumber).","type":"string"},"identifierValue":{"description":"The identifier value for finding the contact.","type":"string"}},"required":["identifierKey","identifierValue"],"type":"object"},"channels.participants.device":{"properties":{"gateway":{"$ref":"#/components/schemas/channels.participants.push_notification_gateway"},"id":{"format":"uuid","type":"string"},"identifierValue":{"type":"string"}},"required":["id","identifierValue","gateway"],"type":"object"},"channels.participants.push_notification_gateway":{"enum":["firebase","apns","web"],"type":"string"},"channels.participants.inbox":{"properties":{"emailRecipientType":{"type":"string"},"id":{"format":"uuid","type":"string"},"identifierKey":{"type":"string"},"identifierValue":{"type":"string"},"type":{"$ref":"#/components/schemas/channels.inbox_type"}},"required":["id","type","identifierKey","identifierValue"],"type":"object"},"channels.inbox_type":{"enum":["user","group"],"type":"string"},"channels.participants.user_contact":{"properties":{"id":{"format":"uuid","type":"string"},"identifierKey":{"type":"string"},"identifierValue":{"type":"string"},"type":{"type":"string"}},"required":["id","identifierKey","identifierValue"],"type":"object"},"channels.messages.interactions.type":{"enum":["invalid","read","opened","clicked","reported-as-spam","unsubscribe-request","delete","reaction","subscribe-request","subscribe-consent","conversion"],"title":"Message Interaction Type","type":"string"},"channels.use_case_type":{"enum":["unspecified","marketing","otp","transactional","conversation","test"],"type":"string"},"channels.messages.metadata":{"properties":{"campaign":{"$ref":"#/components/schemas/channels.messages.metadata.campaign"},"campaignId":{"format":"uuid","type":"string"},"chargeOnceDelivered":{"type":"boolean"},"email":{"$ref":"#/components/schemas/channels.messages.metadata.meta_email"},"extraInformation":{"additionalProperties":{"type":"string"},"type":"object"},"flow":{"$ref":"#/components/schemas/channels.messages.metadata.flow"},"formResponse":{"$ref":"#/components/schemas/channels.messages.metadata.form_response"},"ignoreGlobalHoldout":{"type":"boolean"},"ignoreQuietHours":{"type":"boolean"},"journey":{"$ref":"#/components/schemas/channels.messages.metadata.flow"},"longToShortLinks":{"additionalProperties":{"type":"string"},"type":"object"},"metaThreadId":{"type":"string"},"navigatorId":{"format":"uuid","type":"string"},"navigatorMessageId":{"format":"uuid","type":"string"},"order":{"$ref":"#/components/schemas/channels.messages.metadata.order"},"pushNotifications":{"$ref":"#/components/schemas/channels.messages.metadata.push_notifications"},"referral":{"$ref":"#/components/schemas/channels.messages.referral"},"referredProduct":{"$ref":"#/components/schemas/channels.messages.metadata.referred_product"},"renderedContentBlocks":{"items":{"type":"string"},"type":"array"},"shortToLongLinks":{"additionalProperties":{"type":"string"},"type":"object"},"skipThisMessage":{"$ref":"#/components/schemas/channels.messages.skip_reason"},"sms":{"$ref":"#/components/schemas/channels.metadata.sms"},"useFallback":{"type":"boolean"}},"title":"Message Meta","type":"object"},"channels.messages.metadata.campaign":{"properties":{"id":{"format":"uuid","type":"string"},"name":{"type":"string"}},"title":"Message Campaign Meta","type":"object"},"channels.messages.metadata.meta_email":{"properties":{"from":{"$ref":"#/components/schemas/channels.messages.metadata.email_from"},"headers":{"additionalProperties":{"type":"string"},"type":"object"},"subject":{"type":"string"}},"title":"Message Email Meta","type":"object"},"channels.messages.metadata.form_response":{"properties":{"id":{"format":"uuid","type":"string"},"jsonResponse":{"type":"string"},"requestIdentifier":{"format":"uuid","type":"string"},"selections":{"items":{"$ref":"#/components/schemas/channels.messages.metadata.form_response_selection"},"type":"array"},"sessionIdentifier":{"format":"uuid","type":"string"},"template":{"type":"string"},"version":{"type":"string"}},"required":["id","template","version","sessionIdentifier","requestIdentifier","jsonResponse"],"title":"Form Response","type":"object"},"channels.messages.metadata.form_response_selection":{"properties":{"items":{"items":{"$ref":"#/components/schemas/channels.messages.metadata.form_response_selection_tem"},"type":"array"},"pageIdentifier":{"type":"string"},"subtitle":{"type":"string"},"title":{"type":"string"}},"required":["pageIdentifier","subtitle","title"],"title":"Form Response Selection","type":"object"},"channels.messages.metadata.form_response_selection_tem":{"properties":{"identifier":{"type":"string"},"title":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}},"required":["identifier","value","type","title"],"title":"Form Response Selection Item","type":"object"},"channels.messages.metadata.order":{"description":"The order object contains information about the purchase order associated with the message.","properties":{"products":{"items":{"$ref":"#/components/schemas/channels.messages.metadata.order_product"},"type":"array"}},"title":"Message Order","type":"object"},"channels.messages.metadata.order_product":{"properties":{"externalCatalogId":{"description":"The platform-specific catalog ID of the product.","type":"string"},"externalProductId":{"description":"The platform-specific product ID.","type":"string"},"price":{"$ref":"#/components/schemas/semantic.money"},"quantity":{"description":"The number of items purchased.","format":"int32","type":"integer"}},"required":["externalProductId","quantity","price"],"title":"Message Order Product","type":"object"},"semantic.money":{"properties":{"amount":{"format":"int64","type":"integer"},"currencyCode":{"type":"string"},"exponent":{"format":"int32","type":"integer"}},"required":["amount","exponent","currencyCode"],"type":"object"},"channels.messages.metadata.push_notifications":{"properties":{"gatewayTypeOverride":{"$ref":"#/components/schemas/channels.participants.push_notification_gateway"}},"title":"Message Push Notifications Meta","type":"object"},"channels.messages.referral":{"properties":{"group":{"type":"string"},"metadata":{"$ref":"#/components/schemas/channels.messages.metadata.referral"},"source":{"type":"string"},"text":{"type":"string"},"title":{"type":"string"}},"required":["source"],"title":"Message Referral","type":"object"},"channels.messages.metadata.referral":{"properties":{"caption":{"type":"string"},"mediaType":{"type":"string"},"mediaUrl":{"type":"string"},"sourceId":{"type":"string"},"sourceUrl":{"type":"string"},"timestamp":{"format":"date-time","type":"string"},"trackingId":{"type":"string"},"username":{"type":"string"}},"required":["sourceId"],"title":"Message Referral Metadata","type":"object"},"channels.messages.metadata.referred_product":{"description":"Referred product in an incoming message (e.g. a product shared in a WhatsApp catalog message).","properties":{"externalCatalogId":{"description":"The platform-specific catalog ID of the product.","type":"string"},"externalProductId":{"description":"The platform-specific product ID.","type":"string"}},"required":["externalProductId"],"title":"Referred Product","type":"object"},"channels.messages.skip_reason":{"enum":["campaignHoldout","globalHoldout","journeyHoldout"],"title":"Skip Reason","type":"string"},"channels.metadata.sms":{"properties":{"gatewayId":{"format":"int32","type":"integer"},"registeredDelivery":{"$ref":"#/components/schemas/channels.sms.registered_delivery"},"smartEncoding":{"description":"When enabled, attempts to transliterate Unicode characters to GSM-7 equivalents. If the resulting text is fully GSM-7 compatible, fewer message segments may be required. The original message body is preserved; transliteration is only applied when sending.","type":"boolean"},"smpp":{"$ref":"#/components/schemas/channels.metadata.sms_smpp"},"validity":{"format":"date-time","type":"string"}},"type":"object"},"channels.sms.registered_delivery":{"enum":["final","intermediate","all","noDlr"],"type":"string"},"channels.metadata.sms_smpp":{"properties":{"segments":{"items":{"$ref":"#/components/schemas/channels.metadata.sms_segment"},"type":"array"},"userId":{"format":"uuid","type":"string"}},"required":["userId"],"type":"object"},"channels.metadata.sms_segment":{"properties":{"id":{"format":"uuid","type":"string"},"registeredDelivery":{"$ref":"#/components/schemas/channels.sms.registered_delivery"}},"required":["id","registeredDelivery"],"type":"object"},"inbox.conversations.message_sender":{"allOf":[{"properties":{"email":{"type":"string"},"name":{"type":"string"}},"type":"object"},{"$ref":"#/components/schemas/inbox.conversations.participant"}]},"inbox.conversations.participant":{"properties":{"avatarUrl":{"type":"string"},"contact":{"$ref":"#/components/schemas/inbox.conversations.participant_contact"},"conversationId":{"format":"uuid","type":"string"},"createdAt":{"format":"date-time","type":"string"},"displayName":{"type":"string"},"id":{"type":"string"},"resourceUri":{"type":"string"},"status":{"$ref":"#/components/schemas/inbox.conversations.participant_status"},"type":{"$ref":"#/components/schemas/inbox.conversations.participant_type"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","type"],"title":"Conversation Participant","type":"object"},"inbox.conversations.participant_contact":{"properties":{"identifierKey":{"type":"string"},"identifierValue":{"type":"string"},"platformAddress":{"type":"string"},"platformAddressSelector":{"type":"string"}},"required":["identifierKey","identifierValue"],"type":"object"},"inbox.conversations.participant_status":{"enum":["invited","pending","active","inactive"],"type":"string"},"inbox.conversations.participant_type":{"enum":["user","contact","agent","flow","bot","accessKey","channel","connector","collaborationAutomation"],"type":"string"},"inbox.conversations.message_source":{"enum":["conversations","channels","bots","external"],"type":"string"},"inbox.conversations.message_status":{"enum":["accepted","processing","sent","sending_failed","delivered","delivery_failed","deleted"],"type":"string"},"error.detailed":{"additionalProperties":false,"description":"An error returned from the API that includes additional details about the error. The `details` property can contain any additional information about the error that may be helpful for debugging or understanding the error.\n","properties":{"code":{"description":"A unique code that identifies the error. This code can be used to programmatically identify the error.","minLength":3,"type":"string"},"details":{"additionalProperties":true,"description":"Any additional information about the error that may be helpful for debugging or understanding the error.","type":"object"},"message":{"description":"A human-readable message that describes the error.","minLength":1,"type":"string"}},"required":["code","message"],"title":"DetailedError","type":"object"},"error.validation":{"additionalProperties":false,"description":"A validation error returned from the API. The `details` map keys are JSON paths\npointing into the request body / parameters; values are arrays of human-readable\nmessages describing each problem with that path.\n","properties":{"code":{"description":"A unique code that identifies the error. This code can be used to programmatically identify the error.","minLength":3,"type":"string"},"details":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"description":"Per-field validation messages keyed by JSON path.","type":"object"},"message":{"description":"A human-readable message that describes the error.","minLength":1,"type":"string"}},"required":["code","message"],"title":"ValidationError","type":"object"}},"responses":{"forbidden":{"$ref":"#/components/responses/error.response.forbidden"},"error.response.forbidden":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.detailed"}}},"description":"The caller is not allowed to access the resource."},"notFound":{"$ref":"#/components/responses/error.response.not_found"},"error.response.not_found":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.detailed"}}},"description":"The requested resource was not found."},"duplicate":{"$ref":"#/components/responses/error.response.conflict"},"error.response.conflict":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.detailed"}}},"description":"The request conflicts with the current state of the resource."},"validationFailed":{"$ref":"#/components/responses/error.response.invalid_request"},"error.response.invalid_request":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.validation"}}},"description":"The request contains invalid parameters or body fields."}}},"paths":{"/workspaces/{workspaceId}/conversations/{conversationId}/messages":{"post":{"summary":"Create message in conversation","operationId":"createConversationMessage","description":"Sends a message in a conversation. The message content can be comprised of either `body` or `template`. Attempting to send as a participant that hasn't been added to the conversation results in an error unless the option `addMissingParticipants` is set to `true`. Attempting to send messages in a closed conversation results in an error.\n","tags":["conversation_message"],"parameters":[{"$ref":"#/components/parameters/conversationIdOrNil"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMessage"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inbox.conversations.message"}}}},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"},"409":{"$ref":"#/components/responses/duplicate"},"422":{"$ref":"#/components/responses/validationFailed"}}}}}}
```

## Examples

### Sending a simple message

{% tabs %}
{% tab title="Request" %}

```bash
curl -X POST "https://api.bird.com/workspaces/a1405560-c8d3-4b1a-877d-3f449ad95352/conversations/16e1df9e-c6ac-406b-b1ce-13f34d0dea08/messages" \
-H "Content-Type: application/json" \
-H "Authorization: AccessKey abcd" \
-d '{
  "participantType": "accessKey",
  "participantId": "0c0defe3-c98d-46d9-a9bf-febc1e08aa0c",
  "addMissingParticipants": true,
  "recipients": [
    {
      "type": "to",
      "identifierKey": "emailaddress",
      "identifierValue": "some.customer@example.com"
    }
  ],
  "body": {
    "type": "text",
    "text": {
      "text": "Hey, listen!"
    }
  }
}'
```

{% endtab %}

{% tab title="Response (201 - Created)" %}

```json
{
  "id": "0c854061-6026-48c7-a2e8-bffb6458727b",
  "conversationId": "16e1df9e-c6ac-406b-b1ce-13f34d0dea08",
  "reference": "",
  "sender": {
    "id": "0c0defe3-c98d-46d9-a9bf-febc1e08aa0c",
    "type": "accessKey",
    "status": "active",
    "displayName": "My first email key",
    "avatarUrl": ""
  },
  "draft": false,
  "recipients": [
    {
      "type": "to",
      "id": "8f0b5377-2edc-4116-a8e8-6a475f245a04",
      "identifierKey": "emailaddress",
      "identifierValue": "some.customer@example.com",
      "platformAddress": "some.customer@example.com",
      "contactAnnotation": {
        "name": "John Doe"
      }
    }
  ],
  "status": "accepted",
  "source": "conversations",
  "body": {
    "type": "text",
    "text": {
      "text": "Hey, listen!"
    }
  },
  "interactions": null,
  "createdAt": "2024-11-25T20:12:10.514Z",
  "updatedAt": "2024-11-25T20:12:10.514Z"
}
```

{% endtab %}
{% endtabs %}

### Sending a template message

{% tabs %}
{% tab title="Request" %}

```bash
curl -X POST "https://api.bird.com/workspaces/a1405560-c8d3-4b1a-877d-3f449ad95352/conversations/16e1df9e-c6ac-406b-b1ce-13f34d0dea08/messages" \
-H "Content-Type: application/json" \
-H "Authorization: AccessKey abcd" \
-d '{
  "participantType": "accessKey",
  "participantId": "68b80b8d-8060-42df-bda3-73505a8fdb84",
  "recipients": [
    {
      "identifierKey": "emailaddress",
      "identifierValue": "john.doe@bird.com",
      "type": "to"
    }
  ],
  "template": {
    "projectId": "5d9084b3-7cdb-4c87-bf7c-8871a1f21695",
    "version": "b33761d9-ece1-48e3-b542-b5bbf93bd8c3",
    "locale": "en",
    "parameters": [
      {
        "type": "string",
        "key": "myVariable",
        "value": "yay"
      }
    ]
  },
  "addMissingParticipants": true
}'
```

{% endtab %}

{% tab title="Response (201 - Created)" %}

```json
{
  "id": "cfd0877a-bc16-4e85-9f20-8996f2ebfa15",
  "conversationId": "907798f8-fd72-44d5-8042-fcc05c1bb570",
  "reference": "",
  "sender": {
    "id": "68b80b8d-8060-42df-bda3-73505a8fdb84",
    "type": "accessKey",
    "status": "active",
    "displayName": "My first email key",
    "avatarUrl": ""
  },
  "draft": true,
  "recipients": [
    {
      "type": "to",
      "id": "8f0b5377-2edc-4116-a8e8-6a475f245a04",
      "identifierKey": "emailaddress",
      "identifierValue": "john.doe@bird.com",
      "platformAddress": "john.doe@bird.com",
      "contactAnnotation": {
        "name": "John Doe"
      }
    }
  ],
  "status": "accepted",
  "source": "conversations",
  "template": {
    "projectId": "5d9084b3-7cdb-4c87-bf7c-8871a1f21695",
    "version": "b33761d9-ece1-48e3-b542-b5bbf93bd8c3",
    "name": "",
    "locale": "en",
    "variables": null,
    "shortLinks": null,
    "parameters": [
      {
        "type": "string",
        "key": "myVariable",
        "value": "yay"
      }
    ]
  },
  "body": {
    "type": "html",
    "html": {
      "html": "<!DOCTYPE html><body><div>Hello, this is a test template with a variable: {{ myVariable | default: 'some default value' }}</div></body></html>",
      "metadata": {
        "subject": "Your email subject goes here."
      }
    }
  },
  "interactions": null,
  "createdAt": "2024-12-02T13:22:45.736Z",
  "updatedAt": "2024-12-02T13:22:45.736Z"
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bird.com/api/conversations-api/api-reference/conversations-messaging/create-conversation-message.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
