# Messaging

## Sending messages

In order to send a message you must have an active channel and perform an HTTP request to the following endpoint with a valid [access key](https://docs.bird.com/api/api-access/api-authorization)

{% hint style="info" %}
When you send a message, a contact is automatically created with a `contactId` matching the receiver's identifier if one doesn't already exist. For instance, sending an email generates a contact with an email identifier, while sending an SMS creates one with a phone number identifier.
{% endhint %}

## Send a message

> Send a message to a channel

```json
{"openapi":"3.0.3","info":{"title":"Channels","version":"v1"},"tags":[{"name":"channel_message","description":"Messages are the data sent and received through channels."}],"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 (e.g., 'Authorization: AccessKey AbCdEfGhIjKlMnOpQrStUvWxYzAbCdEfGhIj')","scheme":"AccessKey","type":"http"}},"schemas":{"CreateMessage":{"allOf":[{"type":"object","title":"CreateChannelMessage","additionalProperties":false,"required":["receiver"],"properties":{"sender":{"$ref":"#/components/schemas/Sender"},"receiver":{"$ref":"#/components/schemas/Receiver"},"reference":{"$ref":"#/components/schemas/Reference"},"template":{"$ref":"#/components/schemas/Template"},"meta":{"$ref":"#/components/schemas/Meta"},"replyTo":{"$ref":"#/components/schemas/ReplyTo"},"body":{"$ref":"#/components/schemas/Body"},"notification":{"$ref":"#/components/schemas/Notification"},"capFrequency":{"type":"boolean","description":"If set to true, the frequency capping settings of the platform will be used\nto either allow or reject the message to a contact. Can only be set to true\nif the message is sent to a contact and `.meta.extraInformation.useCase` is `marketing`.\n"},"enableLinkTracking":{"type":"boolean","description":"If set to true, UTM parameters will be appended to the links in the message.\nFor SMS channels, the `shortLinks` property must also be included in the request to enable link tracking.\n"},"ignoreQuietHours":{"type":"boolean","description":"If set to true, quiet hours settings will be ignored and the message will be sent as soon as possible."},"ignoreGlobalHoldout":{"type":"boolean","description":"Do not check if the recipient is part of global holdout. To be used to send transactional messages."},"tags":{"$ref":"#/components/schemas/Tags"},"shortLinks":{"$ref":"#/components/schemas/ShortLinks"},"scheduledFor":{"$ref":"#/components/schemas/ScheduledFor"},"validity":{"$ref":"#/components/schemas/Validity"}}},{"anyOf":[{"type":"object","title":"ChannelMessageCreateWithTemplate","required":["template"]},{"type":"object","title":"ChannelMessageCreateWithBody","required":["body"]}]}]},"Sender":{"type":"object","additionalProperties":false,"properties":{"connector":{"type":"object","description":"The sender of the message. For email messages, the sender is used to override the default sender username.\n","properties":{"identifierValue":{"type":"string","description":"The identifier value of the sender.\n"},"annotations":{"$ref":"#/components/schemas/MessageAnnotations"}},"required":["identifierValue"]}},"required":["connector"]},"MessageAnnotations":{"type":"object","title":"MessageAnnotations","description":"Annotations are used to add additional information to a message.\nFor email messages, it can be used to specify a custom sender name.\n","additionalProperties":false,"properties":{"name":{"type":"string"}}},"Receiver":{"type":"object","additionalProperties":false,"properties":{"contacts":{"type":"array","minLength":1,"items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","description":"The ID of the receiver. This is a reference to a contact."},"identifierKey":{"type":"string","description":"The identifier key for finding the contact.\nFor WhatsApp channels with BSUID support, use `whatsappbsuid` to send\nto a contact by their Business-Scoped User ID without needing to know\nthe channel's portfolio ID.\n"},"identifierValue":{"type":"string","description":"The identifier value for finding the contact."},"type":{"type":"string","description":"The type of the receiver.","enum":["cc","bcc","to"]},"identifiers":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["identifierKey","identifierValue"],"properties":{"identifierKey":{"type":"string","description":"The identifier key for finding the contact."},"identifierValue":{"type":"string","description":"The identifier value for finding the contact."}}}},"platformAddress":{"type":"string","description":"The value that is used to send the message to the platform.\n"},"platformAddressSelector":{"type":"string","nullable":true,"description":"An expression that defines how we resolve the platform address (e.g. phone number or email address) from a contact.\nThis is an optional override for the default resolution logic (i.e. sending to the first\nidentifier key-value pair for the relevant platform).\n"}}}}}},"Reference":{"type":"string","description":"A reference to the message. This can be used to identify the message in the channel.\n"},"Template":{"type":"object","nullable":true,"additionalProperties":false,"properties":{"name":{"type":"string","description":"The platform name of the template."},"projectId":{"type":"string","description":"the ID of the project from the project from Studio"},"version":{"type":"string","description":"The version of the template."},"locale":{"type":"string","format":"locale-bcp47"},"attachments":{"type":"array","nullable":true,"items":{"type":"object","additionalProperties":false,"required":["mediaUrl","filename"],"properties":{"mediaUrl":{"type":"string","format":"uri","description":"The URL of the attachment."},"filename":{"type":"string","description":"The filename of the attachment."},"inline":{"type":"boolean"}}}},"shortLinks":{"nullable":true,"type":"object","description":"SMS link shortening options.","properties":{"enabled":{"type":"boolean","description":"Enables link shortening for SMS messages."},"domain":{"type":"string","description":"The domain to use when shortening links. When set to `default`,\nuses the default link shortening domain for the workspace.\n"}}},"variables":{"nullable":true,"deprecated":true,"description":"Deprecated: Use `parameters` instead (string parameter for variables). This property is maintained for backward compatibility but will be removed in a future version.\n","type":"object","properties":{"default":{"type":"string"}},"additionalProperties":{"type":"string"}},"utmParameters":{"nullable":true,"type":"array","description":"The list of UTM parameters.","minItems":1,"maxItems":8,"items":{"oneOf":[{"type":"object","required":["key","value"],"additionalProperties":false,"properties":{"key":{"type":"string","description":"The name of the parameter in the query string.","minLength":1,"maxLength":20},"value":{"type":"string","description":"The static value of the parameter. Mutually exclusive with Reference.","minLength":1,"maxLength":100}}},{"type":"object","required":["key","reference"],"additionalProperties":false,"properties":{"key":{"type":"string","description":"The name of the parameter in the query string.","minLength":1,"maxLength":20},"reference":{"type":"string","description":"The reference to a dynamic value. Mutually exclusive with Value.","enum":["platform_name","channel_name"]}}}]}},"parameters":{"nullable":true,"type":"array","minLength":1,"items":{"$ref":"#/components/schemas/TemplateParameter"}},"settings":{"nullable":true,"type":"object","properties":{"disallowMmLite":{"type":"boolean","nullable":true,"description":"This is specific for WhatsApp marketing templates and requires MM Lite to be disabled for the WABAID.\n"}}}}},"TemplateParameter":{"oneOf":[{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["string"]},"key":{"type":"string","minLength":1},"value":{"type":"string"}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["number"]},"key":{"type":"string","minLength":1},"value":{"type":"number"}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["boolean"]},"key":{"type":"string","minLength":1},"value":{"type":"boolean"}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["object"]},"key":{"type":"string","minLength":1},"value":{"type":"object","additionalProperties":true}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["sectionList"]},"key":{"type":"string","minLength":1},"value":{"type":"object","required":["sections"],"additionalProperties":false,"properties":{"sections":{"$ref":"#/components/schemas/Sections"}}}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["timeslotList"]},"key":{"type":"string","minLength":1},"value":{"type":"object","required":["timeslots"],"additionalProperties":false,"properties":{"timeslots":{"$ref":"#/components/schemas/Timeslots"}}}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["productSections"]},"key":{"type":"string","minLength":1},"value":{"type":"object","required":["productSections"],"additionalProperties":false,"properties":{"productSections":{"$ref":"#/components/schemas/ProductSections"}}}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["productList"]},"key":{"type":"string","minLength":1},"value":{"type":"object","required":["products"],"additionalProperties":false,"properties":{"products":{"$ref":"#/components/schemas/ProductList"}}}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["shippingMethodList"]},"key":{"type":"string","minLength":1},"value":{"type":"object","required":["shippingMethods"],"additionalProperties":false,"properties":{"shippingMethods":{"$ref":"#/components/schemas/AppleShippingMethods"}}}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["lineItemList"]},"key":{"type":"string","minLength":1},"value":{"type":"object","required":["lineItems"],"additionalProperties":false,"properties":{"lineItems":{"$ref":"#/components/schemas/AppleLineItems"}}}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["whatsappProductSections"]},"key":{"type":"string","minLength":1},"value":{"type":"object","required":["sections"],"additionalProperties":false,"properties":{"sections":{"$ref":"#/components/schemas/WhatsappProductSections"}}}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["whatsappProductItems"]},"key":{"type":"string","minLength":1},"value":{"type":"object","required":["products"],"additionalProperties":false,"properties":{"products":{"type":"array","items":{"$ref":"#/components/schemas/WhatsappProductItem"}}}}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["carouselCards"]},"key":{"type":"string","minLength":1},"value":{"type":"object","required":["cards"],"additionalProperties":false,"properties":{"cards":{"type":"array","items":{"$ref":"#/components/schemas/WhatsappCarouselCard"}}}}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["appleFormPageItems"]},"key":{"type":"string","minLength":1},"value":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"$ref":"#/components/schemas/AppleFormPageItems"}}}}}]},"Sections":{"type":"array","nullable":true,"items":{"type":"object","additionalProperties":false,"required":["title","items"],"properties":{"id":{"type":"string","nullable":true},"multipleSelection":{"type":"boolean"},"title":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/ReplyAction"}}}}},"ReplyAction":{"type":"object","required":["type","replyAction"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["reply-action"]},"reference":{"type":"string"},"role":{"type":"string"},"hidden":{"type":"boolean"},"replyAction":{"type":"object","properties":{"text":{"type":"string"},"imageUrl":{"type":"string"},"payload":{"type":"string"},"subTitle":{"type":"string"}},"required":["text"]}}},"Timeslots":{"type":"array","nullable":false,"items":{"type":"object","additionalProperties":false,"required":["startTime","duration"],"properties":{"id":{"type":"string","nullable":true},"startTime":{"type":"string","format":"date-time"},"duration":{"type":"number"}}}},"ProductSections":{"type":"array","nullable":false,"items":{"type":"object","additionalProperties":false,"required":["title","products"],"properties":{"title":{"type":"string","minLength":1,"maxLength":24},"products":{"type":"array","items":{"$ref":"#/components/schemas/Product"}}}}},"Product":{"type":"object","additionalProperties":false,"required":["externalProductId"],"properties":{"externalProductId":{"type":"string"},"amount":{"type":"string"},"text":{"type":"string"}}},"ProductList":{"type":"array","nullable":false,"items":{"type":"object","additionalProperties":false,"required":["type","product"],"properties":{"type":{"type":"string","enum":["product"]},"product":{"$ref":"#/components/schemas/Product"}}}},"AppleShippingMethods":{"type":"array","nullable":true,"items":{"type":"object","additionalProperties":false,"required":["amount","label","identifier","detail"],"properties":{"amount":{"type":"string"},"label":{"type":"string"},"identifier":{"type":"string"},"detail":{"type":"string"}}}},"AppleLineItems":{"type":"array","nullable":true,"items":{"type":"object","additionalProperties":false,"required":["amount","text"],"properties":{"amount":{"type":"string"},"text":{"type":"string"},"type":{"type":"string","enum":["pending","final"]}}}},"WhatsappProductSections":{"type":"array","nullable":false,"items":{"$ref":"#/components/schemas/WhatsappProductSection"}},"WhatsappProductSection":{"type":"object","additionalProperties":false,"required":["type","whatsappProductSection"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["whatsapp-product-section"]},"reference":{"type":"string"},"role":{"type":"string"},"hidden":{"type":"boolean"},"whatsappProductSection":{"type":"object","additionalProperties":false,"required":["title","products"],"properties":{"title":{"type":"string","minLength":1,"maxLength":24},"products":{"type":"array","items":{"$ref":"#/components/schemas/WhatsappProductItem"}}}}}},"WhatsappProductItem":{"type":"object","additionalProperties":false,"required":["type","whatsappProductItem"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["whatsapp-product-item"]},"reference":{"type":"string"},"role":{"type":"string"},"hidden":{"type":"boolean"},"whatsappProductItem":{"type":"object","additionalProperties":false,"required":["externalProductId"],"properties":{"externalProductId":{"type":"string"}}}}},"WhatsappCarouselCard":{"type":"object","additionalProperties":false,"required":["type","whatsappCarouselCard"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["whatsapp-carousel-card"]},"reference":{"type":"string"},"role":{"type":"string"},"hidden":{"type":"boolean"},"whatsappCarouselCard":{"type":"object","additionalProperties":false,"required":["header","body","actions"],"properties":{"header":{"oneOf":[{"type":"object","additionalProperties":false,"required":["type","image"],"properties":{"type":{"type":"string","enum":["image"]},"image":{"type":"object","additionalProperties":false,"required":["mediaUrl"],"properties":{"mediaUrl":{"type":"string"},"altText":{"type":"string"}}}}},{"type":"object","additionalProperties":false,"required":["type","file"],"properties":{"type":{"type":"string","enum":["file"]},"file":{"type":"object","additionalProperties":false,"required":["mediaUrl"],"properties":{"mediaUrl":{"type":"string"},"contentType":{"type":"string"}}}}}]},"body":{"type":"object","additionalProperties":false,"required":["type","text"],"properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"object","additionalProperties":false,"required":["text"],"properties":{"text":{"type":"string"}}}}},"actions":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["type","linkAction"],"properties":{"type":{"type":"string","enum":["link-action"]},"linkAction":{"type":"object","additionalProperties":false,"required":["text","url"],"properties":{"text":{"type":"string"},"url":{"type":"string"}}}}},"minItems":1,"maxItems":1,"description":"Session carousels only support one link action per card."}}}}},"AppleFormPageItems":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["identifier","title","value"],"properties":{"identifier":{"type":"string","description":"Unique identifier for the item"},"title":{"type":"string","description":"Display text shown to the user"},"value":{"type":"string","description":"Value submitted when the item is selected"},"imageUrl":{"type":"string","nullable":true,"description":"Optional URL of an image to display alongside the item title"},"nextPageIdentifier":{"type":"string","nullable":true,"description":"Identifier of the next page to navigate to when this item is selected"}}}},"Meta":{"type":"object","additionalProperties":false,"properties":{"extraInformation":{"type":"object","additionalProperties":true,"description":"Additional information about the message.\n"},"referral":{"$ref":"#/components/schemas/MessageReferral"},"order":{"$ref":"#/components/schemas/MessageOrder"},"referredProduct":{"$ref":"#/components/schemas/ReferredProduct"},"email":{"$ref":"#/components/schemas/MetaEmail"},"sms":{"$ref":"#/components/schemas/MetaSMS"},"pushNotifications":{"$ref":"#/components/schemas/MetaPushNotifications"},"navigatorId":{"$ref":"#/components/schemas/Id-2"},"navigatorMessageId":{"$ref":"#/components/schemas/Id-2"},"flow":{"$ref":"#/components/schemas/MetaFlow"},"journey":{"$ref":"#/components/schemas/MetaFlow"},"campaign":{"$ref":"#/components/schemas/MetaCampaign"}}},"MessageReferral":{"type":"object","additionalProperties":false,"properties":{"source":{"type":"string"},"title":{"type":"string","nullable":true},"text":{"type":"string","nullable":true},"group":{"type":"string","nullable":true},"metadata":{"type":"object","nullable":true,"additionalProperties":false,"properties":{"source_id":{"type":"string"},"source_url":{"type":"string","nullable":true},"media_url":{"type":"string","nullable":true},"tracking_id":{"type":"string","nullable":true}}}}},"MessageOrder":{"type":"object","additionalProperties":false,"description":"The order object contains information about the purchase order.","properties":{"products":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"externalCatalogId":{"type":"string","description":"The platform-specific catalog ID of the product."},"externalProductId":{"type":"string","description":"The platform-specific product ID."},"quantity":{"type":"integer","description":"The number of items purchased."},"price":{"type":"object","description":"The price of the product.","additionalProperties":false,"properties":{"amount":{"type":"integer"},"exponent":{"type":"integer"},"currencyCode":{"type":"string"}}}}}}}},"ReferredProduct":{"type":"object","additionalProperties":false,"description":"Referred product in an incoming message.","nullable":true,"properties":{"externalCatalogId":{"type":"string","description":"The platform-specific catalog ID of the product."},"externalProductId":{"type":"string","description":"The platform-specific product ID."}}},"MetaEmail":{"type":"object","additionalProperties":false,"properties":{"subject":{"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"from":{"type":"object","additionalProperties":false,"properties":{"username":{"type":"string","pattern":"[\\w\\d.-/+]+"},"displayName":{"type":"string"}}}}},"MetaSMS":{"type":"object","additionalProperties":false,"properties":{"smartEncoding":{"type":"boolean","description":"When enabled, attempts to transliterate Unicode characters to GSM-7 equivalents.\nIf the resulting text is fully GSM-7 compatible, fewer message segments may be required.\nThe original message body is preserved; transliteration is only applied when sending.\n"}}},"MetaPushNotifications":{"type":"object","additionalProperties":false,"properties":{"gatewayTypeOverride":{"type":"string","enum":["apns","firebase","web"]}}},"Id-2":{"type":"string","format":"uuid"},"MetaFlow":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid","nullable":true},"name":{"type":"string","nullable":true},"stepId":{"type":"string","nullable":true},"runId":{"type":"string","format":"uuid","nullable":true}}},"MetaCampaign":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid","nullable":true},"name":{"type":"string","nullable":true}}},"ReplyTo":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","description":"The ID of the message that is being replied to."},"order":{"type":"integer","description":"The order of the message in the conversation."},"type":{"type":"string","enum":["message","click","referrals"]}},"required":["id","type"]},"Body":{"type":"object","title":"MessageBody","nullable":true,"allOf":[{"type":"object","required":["type"],"properties":{"type":{"$ref":"#/components/schemas/BodyTypes"}}},{"oneOf":[{"$ref":"#/components/schemas/TypeText"},{"$ref":"#/components/schemas/TypeHTML"},{"$ref":"#/components/schemas/TypeImage"},{"$ref":"#/components/schemas/TypeFile"},{"$ref":"#/components/schemas/TypeGif"},{"$ref":"#/components/schemas/TypeLocation"},{"$ref":"#/components/schemas/TypeCarousel"},{"$ref":"#/components/schemas/TypeList"},{"$ref":"#/components/schemas/TypeSection"},{"$ref":"#/components/schemas/TypeAuthentication"},{"$ref":"#/components/schemas/TypeAction"}],"discriminator":{"propertyName":"type","mapping":{"text":"#/components/schemas/TypeText","html":"#/components/schemas/TypeHTML","image":"#/components/schemas/TypeImage","file":"#/components/schemas/TypeFile","gif":"#/components/schemas/TypeGif","location":"#/components/schemas/TypeLocation","carousel":"#/components/schemas/TypeCarousel","list":"#/components/schemas/TypeList","section":"#/components/schemas/TypeSection","authentication":"#/components/schemas/TypeAuthentication","action":"#/components/schemas/TypeAction"}}}]},"BodyTypes":{"type":"string","enum":["text","html","image","file","gif","location","carousel","list","section","authentication","template","action"]},"TypeText":{"type":"object","required":["text","type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"object","additionalProperties":false,"required":["text"],"properties":{"text":{"type":"string","minLength":1},"attachments":{"type":"array","nullable":true,"items":{"type":"object","additionalProperties":false,"required":["mediaUrl","filename"],"properties":{"mediaUrl":{"type":"string","format":"uri"},"filename":{"type":"string"},"inline":{"type":"boolean"},"contentId":{"type":"string"}}}},"actions":{"$ref":"#/components/schemas/Actions"},"metadata":{"type":"object","additionalProperties":false,"properties":{"subject":{"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"whatsapp":{"type":"object","additionalProperties":false,"properties":{"previewUrl":{"type":"boolean","description":"When set to `true`, preview will be displayed within whatsapp chat."}}},"line":{"type":"object","additionalProperties":false,"properties":{"emoji":{"type":"object","additionalProperties":false,"properties":{"items":{"type":"array","nullable":true,"items":{"type":"object","additionalProperties":false,"required":["index","productId","emojiId"],"properties":{"index":{"type":"integer"},"productId":{"type":"string"},"emojiId":{"type":"string"},"length":{"type":"integer","nullable":true,"readOnly":true}}}}}}}},"telegram":{"$ref":"#/components/schemas/MetadataTelegram"},"apple":{"$ref":"#/components/schemas/MetadataApple"}}}}}}},"Actions":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/Action"}},"Action":{"allOf":[{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["link","reply","locationRequest","buy","postback"]}}},{"oneOf":[{"$ref":"#/components/schemas/ActionLink"},{"$ref":"#/components/schemas/ActionReply"},{"$ref":"#/components/schemas/ActionLocationRequest"},{"$ref":"#/components/schemas/ActionBuy"},{"$ref":"#/components/schemas/ActionPostback"}],"discriminator":{"propertyName":"type","mapping":{"link":"#/components/schemas/ActionLink","reply":"#/components/schemas/ActionReply","locationRequest":"#/components/schemas/ActionLocationRequest","buy":"#/components/schemas/ActionBuy","postback":"#/components/schemas/ActionPostback"}}}]},"ActionLink":{"type":"object","required":["link","type"],"properties":{"type":{"type":"string","enum":["link"]},"link":{"type":"object","required":["text","url"],"properties":{"text":{"type":"string"},"url":{"anyOf":[{"type":"string","pattern":"{{[^{}]+}}"},{"type":"string","format":"uri"}]}}}}},"ActionReply":{"type":"object","required":["reply","type"],"properties":{"type":{"type":"string","enum":["reply"]},"reply":{"type":"object","properties":{"text":{"type":"string"},"imageUrl":{"type":"string"},"metadata":{"$ref":"#/components/schemas/ActionReplyMetadata"}},"required":["text"]}}},"ActionReplyMetadata":{"type":"object","properties":{"description":{"$ref":"#/components/schemas/ActionDescription"}}},"ActionDescription":{"type":"object","description":"Sets the description in the row objects for Whatsapp list messages. Only available usage for Whatsapp platform","additionalProperties":false,"properties":{"label":{"type":"string","maxLength":72}}},"ActionLocationRequest":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["locationRequest"]},"locationRequest":{"type":"object","nullable":true,"properties":{"text":{"type":"string","default":"Send location"}}}}},"ActionBuy":{"type":"object","required":["buy","type"],"properties":{"type":{"type":"string","enum":["buy"]},"buy":{"type":"object","properties":{"text":{"type":"string"},"amountCents":{"type":"integer"},"currency":{"type":"string","minLength":3,"maxLength":3}},"required":["text","amountCents","currency"]}}},"ActionPostback":{"type":"object","required":["postback","type"],"properties":{"type":{"type":"string","enum":["postback"]},"postback":{"type":"object","properties":{"text":{"type":"string"},"payload":{"type":"string"},"imageUrl":{"type":"string"},"metadata":{"$ref":"#/components/schemas/ActionPostbackMetadata"}},"required":["text"]}}},"ActionPostbackMetadata":{"type":"object","properties":{"description":{"$ref":"#/components/schemas/ActionDescription"}}},"MetadataTelegram":{"type":"object","description":"The property is specific to Telegram, indicating the markup type to be used for message formatting","additionalProperties":false,"properties":{"parseMode":{"type":"string","enum":["Markdown","MarkdownV2"]}}},"MetadataApple":{"type":"object","description":"The property is specific to Apple Business Chat, containing Apple-specific metadata","additionalProperties":false,"properties":{"summaryText":{"type":"string","description":"Summary text for Apple Business Chat messages"},"appClipPreview":{"type":"boolean","description":"Indicates if the message includes an App Clip link"},"appClipRegion":{"type":"string","description":"AppClipRegion is the ISO 3166 alpha-2 country code for the App Store region."}}},"TypeHTML":{"type":"object","required":["html","type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["html"]},"html":{"type":"object","additionalProperties":false,"anyOf":[{"required":["text"]},{"required":["html"]}],"properties":{"text":{"type":"string","minLength":1},"html":{"type":"string","minLength":1},"attachments":{"type":"array","nullable":true,"items":{"type":"object","additionalProperties":false,"anyOf":[{"required":["mediaUrl","filename"]},{"required":["content","contentType","filename"]}],"properties":{"mediaUrl":{"type":"string","format":"uri"},"filename":{"type":"string"},"inline":{"type":"boolean"},"content":{"type":"string","minLength":1},"contentType":{"type":"string","minLength":1},"contentId":{"type":"string"}}}},"actions":{"$ref":"#/components/schemas/Actions"},"metadata":{"type":"object","additionalProperties":false,"properties":{"subject":{"type":"string"},"emailFrom":{"type":"object","additionalProperties":false,"properties":{"username":{"type":"string","pattern":"[\\w\\d.-/+]+"},"displayName":{"type":"string"}}},"headers":{"type":"object","additionalProperties":{"type":"string"}},"initialOpenTracking":{"type":"boolean"},"clickTracking":{"type":"boolean"},"openTracking":{"type":"boolean"}}}}}}},"TypeImage":{"type":"object","required":["image","type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["image"]},"image":{"type":"object","additionalProperties":false,"required":["images"],"properties":{"text":{"type":"string"},"images":{"type":"array","minLength":1,"items":{"type":"object","additionalProperties":false,"required":["mediaUrl"],"properties":{"mediaUrl":{"type":"string","format":"uri","minLength":1},"altText":{"type":"string"}}}},"metadata":{"type":"object","properties":{"subject":{"type":"string","description":"The property is specific mms file, shows the subject of the mms."},"fallbackText":{"type":"string","description":"The property is specific mms file, when a mms is not supported, it will fallback to show content with the fallbackText."},"storyType":{"type":"string","description":"The property is specific instagram file, shows the story type."},"telegram":{"$ref":"#/components/schemas/MetadataTelegram"}}},"actions":{"$ref":"#/components/schemas/Actions"}}}}},"TypeFile":{"type":"object","required":["file","type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["file"]},"file":{"type":"object","additionalProperties":false,"required":["files"],"properties":{"text":{"type":"string"},"files":{"type":"array","minLength":1,"items":{"type":"object","additionalProperties":false,"required":["mediaUrl","contentType"],"properties":{"mediaUrl":{"type":"string","format":"uri","minLength":1},"contentType":{"type":"string","minLength":1},"filename":{"type":"string"},"altText":{"type":"string"},"metadata":{"type":"object","properties":{"isAnimated":{"type":"boolean","description":"The property is specific the sticker file, shows that if the sticker is animated or not."}}}}}},"metadata":{"type":"object","properties":{"subject":{"type":"string","description":"The property is specific mms file, shows the subject of the mms."},"fallbackText":{"type":"string","description":"The property is specific mms file, when a mms is not supported, it will fallback to show content with the fallbackText."},"storyType":{"type":"string","description":"The property is specific instagram file, shows the story type."},"telegram":{"$ref":"#/components/schemas/MetadataTelegram"}}},"actions":{"$ref":"#/components/schemas/Actions"}}}}},"TypeGif":{"type":"object","required":["gif","type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["gif"]},"gif":{"type":"object","additionalProperties":false,"required":["mediaUrl"],"properties":{"text":{"type":"string"},"mediaUrl":{"type":"string","format":"uri","minLength":1},"altText":{"type":"string"},"actions":{"$ref":"#/components/schemas/Actions"},"metadata":{"type":"object","properties":{"telegram":{"$ref":"#/components/schemas/MetadataTelegram"}}}}}}},"TypeLocation":{"type":"object","required":["location","type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["location"]},"location":{"type":"object","additionalProperties":false,"required":["coordinates"],"properties":{"coordinates":{"type":"object","additionalProperties":false,"properties":{"latitude":{"type":"number","format":"float","minimum":-90,"maximum":90},"longitude":{"type":"number","format":"float","minimum":-180,"maximum":180}}},"location":{"type":"object","additionalProperties":false,"properties":{"address":{"type":"string"},"label":{"type":"string"}}}}}}},"TypeCarousel":{"type":"object","required":["carousel","type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["carousel"]},"carousel":{"type":"object","additionalProperties":false,"required":["items"],"properties":{"text":{"type":"string","description":"Optional text displayed above the carousel cards","maxLength":1024},"items":{"$ref":"#/components/schemas/Items"}}}}},"Items":{"type":"array","nullable":true,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string"},"mediaUrl":{"type":"string","format":"uri","nullable":true},"description":{"type":"string"},"altText":{"type":"string"},"actions":{"$ref":"#/components/schemas/Actions"}}}},"TypeList":{"type":"object","required":["list","type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["list"]},"list":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string"},"text":{"type":"string"},"altText":{"type":"string"},"items":{"$ref":"#/components/schemas/Items"},"actions":{"$ref":"#/components/schemas/Actions"},"metadata":{"type":"object","properties":{"button":{"type":"object","description":"Sets a button name for whatsapp list messages. Only available usage for Whatsapp platform","additionalProperties":false,"properties":{"label":{"type":"string","maxLength":20}}},"replyMessage":{"type":"object","description":"Sets the reply message to be used when a list item is picked. Used for Apple Business Chat.","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":512},"text":{"type":"string","maxLength":512}}}}}},"required":["text"]}}},"TypeSection":{"type":"object","required":["section","type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["section"]},"section":{"type":"object","additionalProperties":false,"properties":{"items":{"type":"array","items":{"minLength":1,"$ref":"#/components/schemas/SectionBody"}},"configurations":{"type":"object","additionalProperties":{"type":"string"}}}}}},"SectionBody":{"type":"object","title":"MessageBody","allOf":[{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["text","image","file","gif","location","carousel","list","section"]}}},{"oneOf":[{"$ref":"#/components/schemas/TypeText"},{"$ref":"#/components/schemas/TypeImage"},{"$ref":"#/components/schemas/TypeFile"},{"$ref":"#/components/schemas/TypeGif"},{"$ref":"#/components/schemas/TypeLocation"},{"$ref":"#/components/schemas/TypeCarousel"},{"$ref":"#/components/schemas/TypeList"},{"$ref":"#/components/schemas/TypeSectionNested"}],"discriminator":{"propertyName":"type","mapping":{"text":"#/components/schemas/TypeText","image":"#/components/schemas/TypeImage","file":"#/components/schemas/TypeFile","gif":"#/components/schemas/TypeGif","location":"#/components/schemas/TypeLocation","carousel":"#/components/schemas/TypeCarousel","list":"#/components/schemas/TypeList","section":"#/components/schemas/TypeSectionNested"}}}]},"TypeSectionNested":{"type":"object","required":["section","type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["section"]},"section":{"type":"object","additionalProperties":false,"properties":{"items":{"type":"array","items":{"minLength":1,"$ref":"#/components/schemas/SectionBodyNested"}},"configurations":{"type":"object","properties":{"default":{"type":"string"}},"additionalProperties":{"type":"string"}}}}}},"SectionBodyNested":{"type":"object","title":"MessageBody","allOf":[{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["text","image","file","gif","location","carousel","list"]}}},{"oneOf":[{"$ref":"#/components/schemas/TypeText"},{"$ref":"#/components/schemas/TypeImage"},{"$ref":"#/components/schemas/TypeFile"},{"$ref":"#/components/schemas/TypeGif"},{"$ref":"#/components/schemas/TypeLocation"},{"$ref":"#/components/schemas/TypeCarousel"},{"$ref":"#/components/schemas/TypeList"}],"discriminator":{"propertyName":"type","mapping":{"text":"#/components/schemas/TypeText","image":"#/components/schemas/TypeImage","file":"#/components/schemas/TypeFile","gif":"#/components/schemas/TypeGif","location":"#/components/schemas/TypeLocation","carousel":"#/components/schemas/TypeCarousel","list":"#/components/schemas/TypeList"}}}]},"TypeAuthentication":{"type":"object","required":["authentication","type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["authentication"]},"authentication":{"type":"object","additionalProperties":false,"properties":{"otp":{"type":"object","additionalProperties":false,"required":["disclaimer"],"properties":{"disclaimer":{"type":"boolean","description":"Whether to add a security disclaimer to the authentication body.","nullable":false},"expirationTime":{"type":"integer","minimum":1,"maximum":90,"nullable":true,"description":"The number of seconds after which the authentication body will expire. If not set, no expiration notification will be sent."},"actions":{"$ref":"#/components/schemas/Actions"}}}}}}},"TypeAction":{"type":"object","required":["type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["permission_request"]},"permission_request":{"type":"object","required":["resource"],"properties":{"resource":{"type":"string","enum":["call"]}}}}},"Notification":{"type":"object","title":"ChannelNotification","properties":{"url":{"type":"string","description":"A custom webhook url to send events to. Note: you should have a created webhook subscription.\nRefer to the Notifications API to learn how to create a webhook subscription.\n"}}},"Tags":{"type":"array","description":"Tags to associate with the message. Tags are converted to lower case and tags\nthat do not exist are automatically created. You can view your created tags\nin the UI. You can specify up to 10 tags per message.\n","maxItems":10,"items":{"$ref":"#/components/schemas/Name-3"}},"Name-3":{"type":"string","pattern":"^[a-zA-Z0-9-_ ]+$","minLength":1,"maxLength":50,"description":"Tag name. Must be between 1 and 50 characters and must only contain\nalphanumeric characters, hyphens, underscores, and spaces.\n"},"ShortLinks":{"nullable":true,"type":"object","description":"SMS link shortening options. Must be included in the request for SMS channels\nwhen `enableLinkTracking` is set to true. When using templates, please refer\nto the template level `shortLinks` instead.\n","additionalProperties":false,"required":["domain"],"properties":{"domain":{"type":"string","maxLength":128,"description":"The domain to use when shortening links. When set to `default`,\nuses the default link shortening domain for the workspace.\n"}}},"ScheduledFor":{"type":"string","format":"date-time","description":"Scheduled time to send message at. Must be formated as RFC3339 timestamp. When\nset, the message status will be `scheduled` until it's sent. Messages scheduled\nfor a time in the past or within 10 minutes of the request may be sent\nimmediately. Messages scheduled farther than 35 days will be rejected.\n"},"Validity":{"type":"integer","description":"Validity determines for how many seconds a message is valid. If none is provided, the channel message type will be used to determine it.\nA promotional, conversational or transactional channel message is valid for 36 hours (129600 seconds). A message sent from a 2FA channel is valid for 10 minutes (600 seconds).\n","minimum":0},"Message":{"type":"object","title":"ChannelMessage","allOf":[{"type":"object","properties":{"id":{"$ref":"#/components/schemas/Id-2"},"channelId":{"$ref":"#/components/schemas/ChannelId"},"sender":{"oneOf":[{"$ref":"#/components/schemas/Connector"},{"$ref":"#/components/schemas/Contact"}]},"receiver":{"oneOf":[{"$ref":"#/components/schemas/Connector"},{"$ref":"#/components/schemas/Contacts"}]},"meta":{"$ref":"#/components/schemas/Meta"},"reference":{"$ref":"#/components/schemas/Reference"},"parts":{"$ref":"#/components/schemas/Parts"},"status":{"$ref":"#/components/schemas/Status-3"},"reason":{"type":"string"},"direction":{"$ref":"#/components/schemas/Direction"},"origin":{"$ref":"#/components/schemas/Origin"},"replyTo":{"$ref":"#/components/schemas/ReplyTo"},"lastStatusAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"details":{"description":"This field is used to store additional information related to the message status.\n","type":"string"},"failure":{"$ref":"#/components/schemas/Failure"},"tags":{"$ref":"#/components/schemas/Tags"},"shortLinks":{"$ref":"#/components/schemas/ShortLinks"},"scheduledFor":{"$ref":"#/components/schemas/ScheduledFor"}},"required":["id","channelId","sender","receiver","status","lastStatusAt","createdAt","updatedAt"]},{"anyOf":[{"type":"object","properties":{"body":{"$ref":"#/components/schemas/Body"}},"required":["body"]},{"type":"object","properties":{"template":{"$ref":"#/components/schemas/Template"}},"required":["template"]}]}]},"ChannelId":{"type":"string","format":"uuid"},"Connector":{"type":"object","title":"ChannelConnector","additionalProperties":false,"properties":{"connector":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"identifierValue":{"type":"string"},"annotations":{"$ref":"#/components/schemas/MessageAnnotations"},"types":{"type":"array","items":{"type":"string"}}},"required":["id"]}},"required":["connector"]},"Contact":{"type":"object","title":"ChannelContact","additionalProperties":false,"properties":{"contact":{"type":"object","properties":{"id":{"type":"string"},"identifierKey":{"type":"string"},"identifierValue":{"type":"string"},"type":{"type":"string"},"countryCode":{"type":"string"},"platformAddress":{"type":"string"},"platformAddressSelector":{"type":"string"},"annotations":{"type":"object","additionalProperties":true,"properties":{"name":{"type":"string"}}}},"required":["id","identifierKey","identifierValue"]}},"required":["contact"]},"Contacts":{"type":"object","title":"ChannelContacts","additionalProperties":false,"properties":{"contacts":{"type":"array","minLength":1,"items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string"},"identifierKey":{"type":"string"},"identifierValue":{"type":"string"},"type":{"type":"string"},"countryCode":{"type":"string"},"identifiers":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"identifierKey":{"type":"string"},"identifierValue":{"type":"string"}}}},"platformAddress":{"type":"string"},"platformAddressSelector":{"type":"string","nullable":true},"annotations":{"type":"object","additionalProperties":true,"properties":{"name":{"type":"string"}}}}}}},"required":["contacts"]},"Parts":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"platformReference":{"type":"string"}}}},"Status-3":{"type":"string","enum":["accepted","rejected","processing","scheduled","sent","sending_failed","delivered","delivery_failed","deleted","skipped"]},"Direction":{"type":"string","enum":["incoming","outgoing"]},"Origin":{"type":"object","nullable":true,"additionalProperties":false,"required":["type","id"],"properties":{"type":{"type":"string","description":"origin type of message."},"id":{"type":"string","description":"origin id of message."}}},"Failure":{"type":"object","nullable":true,"additionalProperties":false,"properties":{"code":{"type":"integer","description":"omni channel interpretation of the failure to categorise the nature of message error."},"description":{"type":"string","description":"human readable description of the error."},"source":{"type":"object","additionalProperties":false,"properties":{"code":{"type":"string","description":"numerical, text or alphanumeric code that indicates the error or issue while delivering the message in the last step."},"name":{"type":"string","description":"enum representing the step where the failure occurred. Example: # \"pre-processing\", \"accounting\", \"whatsapp\", \"email-sparkpost\", etc."}}}}},"RequestError":{"type":"object","properties":{"code":{"type":"string","description":"A unique code that identifies the error. This code can be used to programmatically identify the error.\n"},"message":{"type":"string","description":"A human-readable message that describes the error. An example is 'The requested resource does not exist: channel not found'.\n"}},"required":["code","message"]},"ValidationError":{"type":"object","properties":{"code":{"type":"string","description":"A unique code that identifies the error. This code can be used to programmatically identify the error.\n"},"message":{"type":"string","description":"A human-readable message that describes the error. An example is 'The requested resource does not exist: channel not found'.\n"},"details":{"type":"object","description":"Additional details about the error. This object can contain any additional information that may be useful for debugging.\n","additionalProperties":{"type":"array","items":{"type":"string"}}}},"required":["code","message"]}},"responses":{"requestError":{"description":"The request did not pass validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestError"}}}},"validationError":{"description":"The request did not pass validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}}}},"paths":{"/workspaces/{workspaceId}/channels/{channelId}/messages":{"post":{"summary":"Send a message","operationId":"createChannelMessage","description":"Send a message to a channel","tags":["channel_message"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMessage"}}}},"responses":{"202":{"description":"Message was accepted for processing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"400":{"$ref":"#/components/responses/requestError"},"404":{"$ref":"#/components/responses/requestError"},"409":{"description":"Creating the message was not possible because of conflicting conditions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestError"}}}},"422":{"$ref":"#/components/responses/validationError"}}}}}}
```

{% hint style="warning" %}
When sending outbound messages as well as setting the **`receiver`** information you must set the message **`body`** field in all cases except for sending a [message template](https://docs.bird.com/api/channels-api/message-types/template) when you must only set the **`template`**&#x66;ield.

Multiple recipient messages are only possible through the Email platform. For other platforms, a message with multiple **`reciever`** entries will be rejected.
{% endhint %}

### **Body**

{% code lineNumbers="true" %}

```json
{
 "receiver": {
   "contacts": [
     {
       "identifierValue": "+31612345678"
     }
   ]
 },
 "body": {...},
}
```

{% endcode %}

### Template

{% code lineNumbers="true" %}

```json
{
 "receiver": {
   "contacts": [
     {
       "identifierValue": "+31612345678"
     }
   ]
 },
 "template": {...},
}
```

{% endcode %}

### Uploading media

When sending messages that contain media links these must be publicly accessible. Otherwise you can upload media by creating requesting a pre-signed media URL. Firstly make a POST request to the following endpoint with the content type of the media you will be uploading set in the request body.

There are two methods for generating a presigned URL: one is channel-independent, allowing it to be used across any channel, while the other restricts usage to a specified channel ID.

## POST /workspaces/{workspaceId}/channel-media/presigned-upload

> Create a presigned media upload

```json
{"openapi":"3.0.3","info":{"title":"Channels","version":"v1"},"tags":[{"name":"channel","description":"Channels are the installation of a platform for a workspace."}],"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 (e.g., 'Authorization: AccessKey AbCdEfGhIjKlMnOpQrStUvWxYzAbCdEfGhIj')","scheme":"AccessKey","type":"http"}},"schemas":{"CreatePresignedUpload":{"type":"object","additionalProperties":false,"required":["contentType"],"properties":{"contentType":{"type":"string","minLength":1}}},"PresignedUpload":{"type":"object","additionalProperties":false,"required":["mediaUrl","uploadUrl","uploadMethod","uploadFormData"],"properties":{"mediaUrl":{"type":"string","format":"uri"},"uploadUrl":{"type":"string","format":"uri"},"uploadMethod":{"type":"string"},"uploadFormData":{"type":"object"}}},"RequestError":{"type":"object","properties":{"code":{"type":"string","description":"A unique code that identifies the error. This code can be used to programmatically identify the error.\n"},"message":{"type":"string","description":"A human-readable message that describes the error. An example is 'The requested resource does not exist: channel not found'.\n"}},"required":["code","message"]},"ValidationError":{"type":"object","properties":{"code":{"type":"string","description":"A unique code that identifies the error. This code can be used to programmatically identify the error.\n"},"message":{"type":"string","description":"A human-readable message that describes the error. An example is 'The requested resource does not exist: channel not found'.\n"},"details":{"type":"object","description":"Additional details about the error. This object can contain any additional information that may be useful for debugging.\n","additionalProperties":{"type":"array","items":{"type":"string"}}}},"required":["code","message"]}},"responses":{"requestError":{"description":"The request did not pass validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestError"}}}},"validationError":{"description":"The request did not pass validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}}}},"paths":{"/workspaces/{workspaceId}/channel-media/presigned-upload":{"post":{"summary":"Create a presigned media upload","operationId":"createChannelMediaPresignedUpload","tags":["channel"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePresignedUpload"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PresignedUpload"}}}},"404":{"$ref":"#/components/responses/requestError"},"422":{"$ref":"#/components/responses/validationError"}}}}}}
```

#### Example

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

```bash
curl -X POST "https://api.bird.com/workspaces/42263973-4f1c-40db-bf0e-cea7e4bfa1a2/channel-media/presigned-upload" \
-H "Content-Type: application/json" \
-H "Authorization: AccessKey abcd" \
-d '{
"contentType": "image/jpeg"
}'
```

{% endtab %}

{% tab title="Response" %}

```bash
{
  "mediaUrl": "https://media.api.bird.com/workspaces/42263973-4f1c-40db-bf0e-cea7e4bfa1a2/media/d30aee15-6ac6-408c-89b6-2906df15ca7b",
  "uploadUrl": "https://channels--message-media--151603429280--euw1.s3.eu-west-1.amazonaws.com",
  "uploadMethod": "POST",
  "uploadFormData": {
    "Content-Type": "image/jpeg",
    "acl": "private",
    "bucket": "text",
    "key": "text",
    "policy": "text",
    "x-amz-algorithm": "text",
    "x-amz-credential": "text",
    "x-amz-date": "20251022T195811Z",
    "x-amz-meta-allowed-paths": "text",
    "x-amz-security-token": "text",
    "x-amz-signature": "text"
  }
}
```

{% endtab %}
{% endtabs %}

```postman_json
"image/gif", 
"image/jpeg", 
"image/png",  
"image/webp", 
"image/svg+xml",
```

## POST /workspaces/{workspaceId}/channels/{channelId}/presigned-upload

> Create a presigned media upload

```json
{"openapi":"3.0.3","info":{"title":"Channels","version":"v1"},"tags":[{"name":"channel","description":"Channels are the installation of a platform for a workspace."}],"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 (e.g., 'Authorization: AccessKey AbCdEfGhIjKlMnOpQrStUvWxYzAbCdEfGhIj')","scheme":"AccessKey","type":"http"}},"schemas":{"CreatePresignedUpload":{"type":"object","additionalProperties":false,"required":["contentType"],"properties":{"contentType":{"type":"string","minLength":1}}},"PresignedUpload":{"type":"object","additionalProperties":false,"required":["mediaUrl","uploadUrl","uploadMethod","uploadFormData"],"properties":{"mediaUrl":{"type":"string","format":"uri"},"uploadUrl":{"type":"string","format":"uri"},"uploadMethod":{"type":"string"},"uploadFormData":{"type":"object"}}},"RequestError":{"type":"object","properties":{"code":{"type":"string","description":"A unique code that identifies the error. This code can be used to programmatically identify the error.\n"},"message":{"type":"string","description":"A human-readable message that describes the error. An example is 'The requested resource does not exist: channel not found'.\n"}},"required":["code","message"]},"ValidationError":{"type":"object","properties":{"code":{"type":"string","description":"A unique code that identifies the error. This code can be used to programmatically identify the error.\n"},"message":{"type":"string","description":"A human-readable message that describes the error. An example is 'The requested resource does not exist: channel not found'.\n"},"details":{"type":"object","description":"Additional details about the error. This object can contain any additional information that may be useful for debugging.\n","additionalProperties":{"type":"array","items":{"type":"string"}}}},"required":["code","message"]}},"responses":{"requestError":{"description":"The request did not pass validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestError"}}}},"validationError":{"description":"The request did not pass validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}}}},"paths":{"/workspaces/{workspaceId}/channels/{channelId}/presigned-upload":{"post":{"summary":"Create a presigned media upload","operationId":"createChannelPresignedUpload","tags":["channel"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePresignedUpload"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PresignedUpload"}}}},"404":{"$ref":"#/components/responses/requestError"},"422":{"$ref":"#/components/responses/validationError"}}}}}}
```

From the response you will get the following details:

**mediaUrl:** This will be the URL you set in any message bodies where you send the uploaded media

**uploadUrl:** This is the URL you will need to make a request to to upload your media file

**uploadMethod:** This is the HTTP method to make an upload i.e. POST

**uploadFormData:** Set this as the fields in form-data of your POST request along with an additional field called file. This should include your file data. An example using CURL

No need to specify any AccessKey on the below call as all the required data is provided in the form data.

#### Example&#x20;

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

```bash
  curl -L -X POST "https://channels--message-media--151603429280--euw1.s3.eu-west-1.amazonaws.com" \
  -F Content-Type='image/jpeg' \
  -F acl='private' \
  -F bucket='text' \
  -F key='text' \
  -F policy='text' \
  -F x-amz-algorithm='AWS4-HMAC-SHA256' \
  -F x-amz-credential='text' \
  -F x-amz-date='text' \
  -F x-amz-meta-allowed-paths='text' \
  -F x-amz-security-token='text' \
  -F x-amz-signature='text' \
  -F file=@image.jpeg
```

{% endtab %}
{% endtabs %}

Once you have uploaded the file using the mediaUrl, this should be used as the URL when sending messages with media.

## Retrieving messages

### Retrieve a list of messages of a channel

## List messages by channel ID

> It retrieves a list of messages from a given channel ID

```json
{"openapi":"3.0.3","info":{"title":"Channels","version":"v1"},"tags":[{"name":"channel_message","description":"Messages are the data sent and received through channels."}],"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 (e.g., 'Authorization: AccessKey AbCdEfGhIjKlMnOpQrStUvWxYzAbCdEfGhIj')","scheme":"AccessKey","type":"http"}},"parameters":{"queryLimit":{"name":"limit","description":"Limits the number of results to return","in":"query","schema":{"type":"integer","minimum":1,"maximum":1000,"default":10}},"queryCursor":{"name":"pageToken","description":"Pagination token that keeps of track of the current position in the list","in":"query","schema":{"type":"string","maxLength":8000}},"queryDirection":{"name":"reverse","description":"Order in which to retrieve the results","in":"query","schema":{"type":"boolean","default":false}},"queryPlatform":{"name":"platform","description":"Filter based on platform name","in":"query","schema":{"anyOf":[{"$ref":"#/components/schemas/Id"},{"type":"array","items":{"$ref":"#/components/schemas/Id"}}]}},"queryMessageDirection":{"name":"direction","in":"query","style":"form","explode":true,"schema":{"$ref":"#/components/schemas/Direction"}},"queryId":{"name":"id","in":"query","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},"queryNavigatorId":{"name":"navigatorId","in":"query","style":"form","schema":{"type":"string","format":"uuid"}},"queryMessageType":{"name":"messageType","in":"query","style":"form","explode":true,"schema":{"type":"array","items":{"$ref":"#/components/schemas/BodyTypes"}}},"queryMessageStatus":{"name":"status","in":"query","style":"form","explode":true,"schema":{"type":"array","items":{"$ref":"#/components/schemas/Status-3"}}},"queryStartAt":{"name":"startAt","description":"Start date for the query","in":"query","schema":{"type":"string","format":"date-time"}},"queryEndAt":{"name":"endAt","description":"End date for the query","in":"query","schema":{"type":"string","format":"date-time"}},"queryFrom":{"name":"from","description":"sender identifier for the message","in":"query","schema":{"type":"array","items":{"type":"string"}}},"queryTo":{"name":"to","description":"recipient identifier for the message","in":"query","schema":{"type":"array","items":{"type":"string"}}},"queryFailureCode":{"name":"failureCode","in":"query","style":"form","explode":true,"schema":{"type":"array","items":{"type":"integer"}}},"queryFailureSourceCode":{"name":"failureSourceCode","in":"query","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100}}},"queryFailureSourceName":{"name":"failureSourceName","in":"query","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100}}},"queryCountryCode":{"name":"countryCode","in":"query","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100}}},"queryTag":{"name":"tag","description":"Filter based on tag","in":"query","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string"}}},"queryEmailSubject":{"name":"emailSubject","description":"Full text search on email subject","in":"query","schema":{"type":"string"}},"queryBatchId":{"name":"batchId","description":"The ID for a batch","in":"query","schema":{"type":"string","format":"uuid"}}},"schemas":{"Id":{"type":"string","pattern":"^[A-Za-z0-9-]+$","minLength":3,"maxLength":60},"Direction":{"type":"string","enum":["incoming","outgoing"]},"BodyTypes":{"type":"string","enum":["text","html","image","file","gif","location","carousel","list","section","authentication","template","action"]},"Status-3":{"type":"string","enum":["accepted","rejected","processing","scheduled","sent","sending_failed","delivered","delivery_failed","deleted","skipped"]},"MessageList":{"type":"object","title":"ChannelMessageList","description":"A list of channel messages","required":["results"],"properties":{"startAt":{"type":"string","nullable":true,"format":"date-time"},"endAt":{"type":"string","nullable":true,"format":"date-time"},"nextPageToken":{"type":"string"},"results":{"type":"array","items":{"$ref":"#/components/schemas/Message"}}}},"Message":{"type":"object","title":"ChannelMessage","allOf":[{"type":"object","properties":{"id":{"$ref":"#/components/schemas/Id-2"},"channelId":{"$ref":"#/components/schemas/ChannelId"},"sender":{"oneOf":[{"$ref":"#/components/schemas/Connector"},{"$ref":"#/components/schemas/Contact"}]},"receiver":{"oneOf":[{"$ref":"#/components/schemas/Connector"},{"$ref":"#/components/schemas/Contacts"}]},"meta":{"$ref":"#/components/schemas/Meta"},"reference":{"$ref":"#/components/schemas/Reference"},"parts":{"$ref":"#/components/schemas/Parts"},"status":{"$ref":"#/components/schemas/Status-3"},"reason":{"type":"string"},"direction":{"$ref":"#/components/schemas/Direction"},"origin":{"$ref":"#/components/schemas/Origin"},"replyTo":{"$ref":"#/components/schemas/ReplyTo"},"lastStatusAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"details":{"description":"This field is used to store additional information related to the message status.\n","type":"string"},"failure":{"$ref":"#/components/schemas/Failure"},"tags":{"$ref":"#/components/schemas/Tags"},"shortLinks":{"$ref":"#/components/schemas/ShortLinks"},"scheduledFor":{"$ref":"#/components/schemas/ScheduledFor"}},"required":["id","channelId","sender","receiver","status","lastStatusAt","createdAt","updatedAt"]},{"anyOf":[{"type":"object","properties":{"body":{"$ref":"#/components/schemas/Body"}},"required":["body"]},{"type":"object","properties":{"template":{"$ref":"#/components/schemas/Template"}},"required":["template"]}]}]},"Id-2":{"type":"string","format":"uuid"},"ChannelId":{"type":"string","format":"uuid"},"Connector":{"type":"object","title":"ChannelConnector","additionalProperties":false,"properties":{"connector":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"identifierValue":{"type":"string"},"annotations":{"$ref":"#/components/schemas/MessageAnnotations"},"types":{"type":"array","items":{"type":"string"}}},"required":["id"]}},"required":["connector"]},"MessageAnnotations":{"type":"object","title":"MessageAnnotations","description":"Annotations are used to add additional information to a message.\nFor email messages, it can be used to specify a custom sender name.\n","additionalProperties":false,"properties":{"name":{"type":"string"}}},"Contact":{"type":"object","title":"ChannelContact","additionalProperties":false,"properties":{"contact":{"type":"object","properties":{"id":{"type":"string"},"identifierKey":{"type":"string"},"identifierValue":{"type":"string"},"type":{"type":"string"},"countryCode":{"type":"string"},"platformAddress":{"type":"string"},"platformAddressSelector":{"type":"string"},"annotations":{"type":"object","additionalProperties":true,"properties":{"name":{"type":"string"}}}},"required":["id","identifierKey","identifierValue"]}},"required":["contact"]},"Contacts":{"type":"object","title":"ChannelContacts","additionalProperties":false,"properties":{"contacts":{"type":"array","minLength":1,"items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string"},"identifierKey":{"type":"string"},"identifierValue":{"type":"string"},"type":{"type":"string"},"countryCode":{"type":"string"},"identifiers":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"identifierKey":{"type":"string"},"identifierValue":{"type":"string"}}}},"platformAddress":{"type":"string"},"platformAddressSelector":{"type":"string","nullable":true},"annotations":{"type":"object","additionalProperties":true,"properties":{"name":{"type":"string"}}}}}}},"required":["contacts"]},"Meta":{"type":"object","additionalProperties":false,"properties":{"extraInformation":{"type":"object","additionalProperties":true,"description":"Additional information about the message.\n"},"referral":{"$ref":"#/components/schemas/MessageReferral"},"order":{"$ref":"#/components/schemas/MessageOrder"},"referredProduct":{"$ref":"#/components/schemas/ReferredProduct"},"email":{"$ref":"#/components/schemas/MetaEmail"},"sms":{"$ref":"#/components/schemas/MetaSMS"},"pushNotifications":{"$ref":"#/components/schemas/MetaPushNotifications"},"navigatorId":{"$ref":"#/components/schemas/Id-2"},"navigatorMessageId":{"$ref":"#/components/schemas/Id-2"},"flow":{"$ref":"#/components/schemas/MetaFlow"},"journey":{"$ref":"#/components/schemas/MetaFlow"},"campaign":{"$ref":"#/components/schemas/MetaCampaign"}}},"MessageReferral":{"type":"object","additionalProperties":false,"properties":{"source":{"type":"string"},"title":{"type":"string","nullable":true},"text":{"type":"string","nullable":true},"group":{"type":"string","nullable":true},"metadata":{"type":"object","nullable":true,"additionalProperties":false,"properties":{"source_id":{"type":"string"},"source_url":{"type":"string","nullable":true},"media_url":{"type":"string","nullable":true},"tracking_id":{"type":"string","nullable":true}}}}},"MessageOrder":{"type":"object","additionalProperties":false,"description":"The order object contains information about the purchase order.","properties":{"products":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"externalCatalogId":{"type":"string","description":"The platform-specific catalog ID of the product."},"externalProductId":{"type":"string","description":"The platform-specific product ID."},"quantity":{"type":"integer","description":"The number of items purchased."},"price":{"type":"object","description":"The price of the product.","additionalProperties":false,"properties":{"amount":{"type":"integer"},"exponent":{"type":"integer"},"currencyCode":{"type":"string"}}}}}}}},"ReferredProduct":{"type":"object","additionalProperties":false,"description":"Referred product in an incoming message.","nullable":true,"properties":{"externalCatalogId":{"type":"string","description":"The platform-specific catalog ID of the product."},"externalProductId":{"type":"string","description":"The platform-specific product ID."}}},"MetaEmail":{"type":"object","additionalProperties":false,"properties":{"subject":{"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"from":{"type":"object","additionalProperties":false,"properties":{"username":{"type":"string","pattern":"[\\w\\d.-/+]+"},"displayName":{"type":"string"}}}}},"MetaSMS":{"type":"object","additionalProperties":false,"properties":{"smartEncoding":{"type":"boolean","description":"When enabled, attempts to transliterate Unicode characters to GSM-7 equivalents.\nIf the resulting text is fully GSM-7 compatible, fewer message segments may be required.\nThe original message body is preserved; transliteration is only applied when sending.\n"}}},"MetaPushNotifications":{"type":"object","additionalProperties":false,"properties":{"gatewayTypeOverride":{"type":"string","enum":["apns","firebase","web"]}}},"MetaFlow":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid","nullable":true},"name":{"type":"string","nullable":true},"stepId":{"type":"string","nullable":true},"runId":{"type":"string","format":"uuid","nullable":true}}},"MetaCampaign":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid","nullable":true},"name":{"type":"string","nullable":true}}},"Reference":{"type":"string","description":"A reference to the message. This can be used to identify the message in the channel.\n"},"Parts":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"platformReference":{"type":"string"}}}},"Origin":{"type":"object","nullable":true,"additionalProperties":false,"required":["type","id"],"properties":{"type":{"type":"string","description":"origin type of message."},"id":{"type":"string","description":"origin id of message."}}},"ReplyTo":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","description":"The ID of the message that is being replied to."},"order":{"type":"integer","description":"The order of the message in the conversation."},"type":{"type":"string","enum":["message","click","referrals"]}},"required":["id","type"]},"Failure":{"type":"object","nullable":true,"additionalProperties":false,"properties":{"code":{"type":"integer","description":"omni channel interpretation of the failure to categorise the nature of message error."},"description":{"type":"string","description":"human readable description of the error."},"source":{"type":"object","additionalProperties":false,"properties":{"code":{"type":"string","description":"numerical, text or alphanumeric code that indicates the error or issue while delivering the message in the last step."},"name":{"type":"string","description":"enum representing the step where the failure occurred. Example: # \"pre-processing\", \"accounting\", \"whatsapp\", \"email-sparkpost\", etc."}}}}},"Tags":{"type":"array","description":"Tags to associate with the message. Tags are converted to lower case and tags\nthat do not exist are automatically created. You can view your created tags\nin the UI. You can specify up to 10 tags per message.\n","maxItems":10,"items":{"$ref":"#/components/schemas/Name-3"}},"Name-3":{"type":"string","pattern":"^[a-zA-Z0-9-_ ]+$","minLength":1,"maxLength":50,"description":"Tag name. Must be between 1 and 50 characters and must only contain\nalphanumeric characters, hyphens, underscores, and spaces.\n"},"ShortLinks":{"nullable":true,"type":"object","description":"SMS link shortening options. Must be included in the request for SMS channels\nwhen `enableLinkTracking` is set to true. When using templates, please refer\nto the template level `shortLinks` instead.\n","additionalProperties":false,"required":["domain"],"properties":{"domain":{"type":"string","maxLength":128,"description":"The domain to use when shortening links. When set to `default`,\nuses the default link shortening domain for the workspace.\n"}}},"ScheduledFor":{"type":"string","format":"date-time","description":"Scheduled time to send message at. Must be formated as RFC3339 timestamp. When\nset, the message status will be `scheduled` until it's sent. Messages scheduled\nfor a time in the past or within 10 minutes of the request may be sent\nimmediately. Messages scheduled farther than 35 days will be rejected.\n"},"Body":{"type":"object","title":"MessageBody","nullable":true,"allOf":[{"type":"object","required":["type"],"properties":{"type":{"$ref":"#/components/schemas/BodyTypes"}}},{"oneOf":[{"$ref":"#/components/schemas/TypeText"},{"$ref":"#/components/schemas/TypeHTML"},{"$ref":"#/components/schemas/TypeImage"},{"$ref":"#/components/schemas/TypeFile"},{"$ref":"#/components/schemas/TypeGif"},{"$ref":"#/components/schemas/TypeLocation"},{"$ref":"#/components/schemas/TypeCarousel"},{"$ref":"#/components/schemas/TypeList"},{"$ref":"#/components/schemas/TypeSection"},{"$ref":"#/components/schemas/TypeAuthentication"},{"$ref":"#/components/schemas/TypeAction"}],"discriminator":{"propertyName":"type","mapping":{"text":"#/components/schemas/TypeText","html":"#/components/schemas/TypeHTML","image":"#/components/schemas/TypeImage","file":"#/components/schemas/TypeFile","gif":"#/components/schemas/TypeGif","location":"#/components/schemas/TypeLocation","carousel":"#/components/schemas/TypeCarousel","list":"#/components/schemas/TypeList","section":"#/components/schemas/TypeSection","authentication":"#/components/schemas/TypeAuthentication","action":"#/components/schemas/TypeAction"}}}]},"TypeText":{"type":"object","required":["text","type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"object","additionalProperties":false,"required":["text"],"properties":{"text":{"type":"string","minLength":1},"attachments":{"type":"array","nullable":true,"items":{"type":"object","additionalProperties":false,"required":["mediaUrl","filename"],"properties":{"mediaUrl":{"type":"string","format":"uri"},"filename":{"type":"string"},"inline":{"type":"boolean"},"contentId":{"type":"string"}}}},"actions":{"$ref":"#/components/schemas/Actions"},"metadata":{"type":"object","additionalProperties":false,"properties":{"subject":{"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"whatsapp":{"type":"object","additionalProperties":false,"properties":{"previewUrl":{"type":"boolean","description":"When set to `true`, preview will be displayed within whatsapp chat."}}},"line":{"type":"object","additionalProperties":false,"properties":{"emoji":{"type":"object","additionalProperties":false,"properties":{"items":{"type":"array","nullable":true,"items":{"type":"object","additionalProperties":false,"required":["index","productId","emojiId"],"properties":{"index":{"type":"integer"},"productId":{"type":"string"},"emojiId":{"type":"string"},"length":{"type":"integer","nullable":true,"readOnly":true}}}}}}}},"telegram":{"$ref":"#/components/schemas/MetadataTelegram"},"apple":{"$ref":"#/components/schemas/MetadataApple"}}}}}}},"Actions":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/Action"}},"Action":{"allOf":[{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["link","reply","locationRequest","buy","postback"]}}},{"oneOf":[{"$ref":"#/components/schemas/ActionLink"},{"$ref":"#/components/schemas/ActionReply"},{"$ref":"#/components/schemas/ActionLocationRequest"},{"$ref":"#/components/schemas/ActionBuy"},{"$ref":"#/components/schemas/ActionPostback"}],"discriminator":{"propertyName":"type","mapping":{"link":"#/components/schemas/ActionLink","reply":"#/components/schemas/ActionReply","locationRequest":"#/components/schemas/ActionLocationRequest","buy":"#/components/schemas/ActionBuy","postback":"#/components/schemas/ActionPostback"}}}]},"ActionLink":{"type":"object","required":["link","type"],"properties":{"type":{"type":"string","enum":["link"]},"link":{"type":"object","required":["text","url"],"properties":{"text":{"type":"string"},"url":{"anyOf":[{"type":"string","pattern":"{{[^{}]+}}"},{"type":"string","format":"uri"}]}}}}},"ActionReply":{"type":"object","required":["reply","type"],"properties":{"type":{"type":"string","enum":["reply"]},"reply":{"type":"object","properties":{"text":{"type":"string"},"imageUrl":{"type":"string"},"metadata":{"$ref":"#/components/schemas/ActionReplyMetadata"}},"required":["text"]}}},"ActionReplyMetadata":{"type":"object","properties":{"description":{"$ref":"#/components/schemas/ActionDescription"}}},"ActionDescription":{"type":"object","description":"Sets the description in the row objects for Whatsapp list messages. Only available usage for Whatsapp platform","additionalProperties":false,"properties":{"label":{"type":"string","maxLength":72}}},"ActionLocationRequest":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["locationRequest"]},"locationRequest":{"type":"object","nullable":true,"properties":{"text":{"type":"string","default":"Send location"}}}}},"ActionBuy":{"type":"object","required":["buy","type"],"properties":{"type":{"type":"string","enum":["buy"]},"buy":{"type":"object","properties":{"text":{"type":"string"},"amountCents":{"type":"integer"},"currency":{"type":"string","minLength":3,"maxLength":3}},"required":["text","amountCents","currency"]}}},"ActionPostback":{"type":"object","required":["postback","type"],"properties":{"type":{"type":"string","enum":["postback"]},"postback":{"type":"object","properties":{"text":{"type":"string"},"payload":{"type":"string"},"imageUrl":{"type":"string"},"metadata":{"$ref":"#/components/schemas/ActionPostbackMetadata"}},"required":["text"]}}},"ActionPostbackMetadata":{"type":"object","properties":{"description":{"$ref":"#/components/schemas/ActionDescription"}}},"MetadataTelegram":{"type":"object","description":"The property is specific to Telegram, indicating the markup type to be used for message formatting","additionalProperties":false,"properties":{"parseMode":{"type":"string","enum":["Markdown","MarkdownV2"]}}},"MetadataApple":{"type":"object","description":"The property is specific to Apple Business Chat, containing Apple-specific metadata","additionalProperties":false,"properties":{"summaryText":{"type":"string","description":"Summary text for Apple Business Chat messages"},"appClipPreview":{"type":"boolean","description":"Indicates if the message includes an App Clip link"},"appClipRegion":{"type":"string","description":"AppClipRegion is the ISO 3166 alpha-2 country code for the App Store region."}}},"TypeHTML":{"type":"object","required":["html","type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["html"]},"html":{"type":"object","additionalProperties":false,"anyOf":[{"required":["text"]},{"required":["html"]}],"properties":{"text":{"type":"string","minLength":1},"html":{"type":"string","minLength":1},"attachments":{"type":"array","nullable":true,"items":{"type":"object","additionalProperties":false,"anyOf":[{"required":["mediaUrl","filename"]},{"required":["content","contentType","filename"]}],"properties":{"mediaUrl":{"type":"string","format":"uri"},"filename":{"type":"string"},"inline":{"type":"boolean"},"content":{"type":"string","minLength":1},"contentType":{"type":"string","minLength":1},"contentId":{"type":"string"}}}},"actions":{"$ref":"#/components/schemas/Actions"},"metadata":{"type":"object","additionalProperties":false,"properties":{"subject":{"type":"string"},"emailFrom":{"type":"object","additionalProperties":false,"properties":{"username":{"type":"string","pattern":"[\\w\\d.-/+]+"},"displayName":{"type":"string"}}},"headers":{"type":"object","additionalProperties":{"type":"string"}},"initialOpenTracking":{"type":"boolean"},"clickTracking":{"type":"boolean"},"openTracking":{"type":"boolean"}}}}}}},"TypeImage":{"type":"object","required":["image","type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["image"]},"image":{"type":"object","additionalProperties":false,"required":["images"],"properties":{"text":{"type":"string"},"images":{"type":"array","minLength":1,"items":{"type":"object","additionalProperties":false,"required":["mediaUrl"],"properties":{"mediaUrl":{"type":"string","format":"uri","minLength":1},"altText":{"type":"string"}}}},"metadata":{"type":"object","properties":{"subject":{"type":"string","description":"The property is specific mms file, shows the subject of the mms."},"fallbackText":{"type":"string","description":"The property is specific mms file, when a mms is not supported, it will fallback to show content with the fallbackText."},"storyType":{"type":"string","description":"The property is specific instagram file, shows the story type."},"telegram":{"$ref":"#/components/schemas/MetadataTelegram"}}},"actions":{"$ref":"#/components/schemas/Actions"}}}}},"TypeFile":{"type":"object","required":["file","type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["file"]},"file":{"type":"object","additionalProperties":false,"required":["files"],"properties":{"text":{"type":"string"},"files":{"type":"array","minLength":1,"items":{"type":"object","additionalProperties":false,"required":["mediaUrl","contentType"],"properties":{"mediaUrl":{"type":"string","format":"uri","minLength":1},"contentType":{"type":"string","minLength":1},"filename":{"type":"string"},"altText":{"type":"string"},"metadata":{"type":"object","properties":{"isAnimated":{"type":"boolean","description":"The property is specific the sticker file, shows that if the sticker is animated or not."}}}}}},"metadata":{"type":"object","properties":{"subject":{"type":"string","description":"The property is specific mms file, shows the subject of the mms."},"fallbackText":{"type":"string","description":"The property is specific mms file, when a mms is not supported, it will fallback to show content with the fallbackText."},"storyType":{"type":"string","description":"The property is specific instagram file, shows the story type."},"telegram":{"$ref":"#/components/schemas/MetadataTelegram"}}},"actions":{"$ref":"#/components/schemas/Actions"}}}}},"TypeGif":{"type":"object","required":["gif","type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["gif"]},"gif":{"type":"object","additionalProperties":false,"required":["mediaUrl"],"properties":{"text":{"type":"string"},"mediaUrl":{"type":"string","format":"uri","minLength":1},"altText":{"type":"string"},"actions":{"$ref":"#/components/schemas/Actions"},"metadata":{"type":"object","properties":{"telegram":{"$ref":"#/components/schemas/MetadataTelegram"}}}}}}},"TypeLocation":{"type":"object","required":["location","type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["location"]},"location":{"type":"object","additionalProperties":false,"required":["coordinates"],"properties":{"coordinates":{"type":"object","additionalProperties":false,"properties":{"latitude":{"type":"number","format":"float","minimum":-90,"maximum":90},"longitude":{"type":"number","format":"float","minimum":-180,"maximum":180}}},"location":{"type":"object","additionalProperties":false,"properties":{"address":{"type":"string"},"label":{"type":"string"}}}}}}},"TypeCarousel":{"type":"object","required":["carousel","type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["carousel"]},"carousel":{"type":"object","additionalProperties":false,"required":["items"],"properties":{"text":{"type":"string","description":"Optional text displayed above the carousel cards","maxLength":1024},"items":{"$ref":"#/components/schemas/Items"}}}}},"Items":{"type":"array","nullable":true,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string"},"mediaUrl":{"type":"string","format":"uri","nullable":true},"description":{"type":"string"},"altText":{"type":"string"},"actions":{"$ref":"#/components/schemas/Actions"}}}},"TypeList":{"type":"object","required":["list","type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["list"]},"list":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string"},"text":{"type":"string"},"altText":{"type":"string"},"items":{"$ref":"#/components/schemas/Items"},"actions":{"$ref":"#/components/schemas/Actions"},"metadata":{"type":"object","properties":{"button":{"type":"object","description":"Sets a button name for whatsapp list messages. Only available usage for Whatsapp platform","additionalProperties":false,"properties":{"label":{"type":"string","maxLength":20}}},"replyMessage":{"type":"object","description":"Sets the reply message to be used when a list item is picked. Used for Apple Business Chat.","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":512},"text":{"type":"string","maxLength":512}}}}}},"required":["text"]}}},"TypeSection":{"type":"object","required":["section","type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["section"]},"section":{"type":"object","additionalProperties":false,"properties":{"items":{"type":"array","items":{"minLength":1,"$ref":"#/components/schemas/SectionBody"}},"configurations":{"type":"object","additionalProperties":{"type":"string"}}}}}},"SectionBody":{"type":"object","title":"MessageBody","allOf":[{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["text","image","file","gif","location","carousel","list","section"]}}},{"oneOf":[{"$ref":"#/components/schemas/TypeText"},{"$ref":"#/components/schemas/TypeImage"},{"$ref":"#/components/schemas/TypeFile"},{"$ref":"#/components/schemas/TypeGif"},{"$ref":"#/components/schemas/TypeLocation"},{"$ref":"#/components/schemas/TypeCarousel"},{"$ref":"#/components/schemas/TypeList"},{"$ref":"#/components/schemas/TypeSectionNested"}],"discriminator":{"propertyName":"type","mapping":{"text":"#/components/schemas/TypeText","image":"#/components/schemas/TypeImage","file":"#/components/schemas/TypeFile","gif":"#/components/schemas/TypeGif","location":"#/components/schemas/TypeLocation","carousel":"#/components/schemas/TypeCarousel","list":"#/components/schemas/TypeList","section":"#/components/schemas/TypeSectionNested"}}}]},"TypeSectionNested":{"type":"object","required":["section","type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["section"]},"section":{"type":"object","additionalProperties":false,"properties":{"items":{"type":"array","items":{"minLength":1,"$ref":"#/components/schemas/SectionBodyNested"}},"configurations":{"type":"object","properties":{"default":{"type":"string"}},"additionalProperties":{"type":"string"}}}}}},"SectionBodyNested":{"type":"object","title":"MessageBody","allOf":[{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["text","image","file","gif","location","carousel","list"]}}},{"oneOf":[{"$ref":"#/components/schemas/TypeText"},{"$ref":"#/components/schemas/TypeImage"},{"$ref":"#/components/schemas/TypeFile"},{"$ref":"#/components/schemas/TypeGif"},{"$ref":"#/components/schemas/TypeLocation"},{"$ref":"#/components/schemas/TypeCarousel"},{"$ref":"#/components/schemas/TypeList"}],"discriminator":{"propertyName":"type","mapping":{"text":"#/components/schemas/TypeText","image":"#/components/schemas/TypeImage","file":"#/components/schemas/TypeFile","gif":"#/components/schemas/TypeGif","location":"#/components/schemas/TypeLocation","carousel":"#/components/schemas/TypeCarousel","list":"#/components/schemas/TypeList"}}}]},"TypeAuthentication":{"type":"object","required":["authentication","type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["authentication"]},"authentication":{"type":"object","additionalProperties":false,"properties":{"otp":{"type":"object","additionalProperties":false,"required":["disclaimer"],"properties":{"disclaimer":{"type":"boolean","description":"Whether to add a security disclaimer to the authentication body.","nullable":false},"expirationTime":{"type":"integer","minimum":1,"maximum":90,"nullable":true,"description":"The number of seconds after which the authentication body will expire. If not set, no expiration notification will be sent."},"actions":{"$ref":"#/components/schemas/Actions"}}}}}}},"TypeAction":{"type":"object","required":["type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["permission_request"]},"permission_request":{"type":"object","required":["resource"],"properties":{"resource":{"type":"string","enum":["call"]}}}}},"Template":{"type":"object","nullable":true,"additionalProperties":false,"properties":{"name":{"type":"string","description":"The platform name of the template."},"projectId":{"type":"string","description":"the ID of the project from the project from Studio"},"version":{"type":"string","description":"The version of the template."},"locale":{"type":"string","format":"locale-bcp47"},"attachments":{"type":"array","nullable":true,"items":{"type":"object","additionalProperties":false,"required":["mediaUrl","filename"],"properties":{"mediaUrl":{"type":"string","format":"uri","description":"The URL of the attachment."},"filename":{"type":"string","description":"The filename of the attachment."},"inline":{"type":"boolean"}}}},"shortLinks":{"nullable":true,"type":"object","description":"SMS link shortening options.","properties":{"enabled":{"type":"boolean","description":"Enables link shortening for SMS messages."},"domain":{"type":"string","description":"The domain to use when shortening links. When set to `default`,\nuses the default link shortening domain for the workspace.\n"}}},"variables":{"nullable":true,"deprecated":true,"description":"Deprecated: Use `parameters` instead (string parameter for variables). This property is maintained for backward compatibility but will be removed in a future version.\n","type":"object","properties":{"default":{"type":"string"}},"additionalProperties":{"type":"string"}},"utmParameters":{"nullable":true,"type":"array","description":"The list of UTM parameters.","minItems":1,"maxItems":8,"items":{"oneOf":[{"type":"object","required":["key","value"],"additionalProperties":false,"properties":{"key":{"type":"string","description":"The name of the parameter in the query string.","minLength":1,"maxLength":20},"value":{"type":"string","description":"The static value of the parameter. Mutually exclusive with Reference.","minLength":1,"maxLength":100}}},{"type":"object","required":["key","reference"],"additionalProperties":false,"properties":{"key":{"type":"string","description":"The name of the parameter in the query string.","minLength":1,"maxLength":20},"reference":{"type":"string","description":"The reference to a dynamic value. Mutually exclusive with Value.","enum":["platform_name","channel_name"]}}}]}},"parameters":{"nullable":true,"type":"array","minLength":1,"items":{"$ref":"#/components/schemas/TemplateParameter"}},"settings":{"nullable":true,"type":"object","properties":{"disallowMmLite":{"type":"boolean","nullable":true,"description":"This is specific for WhatsApp marketing templates and requires MM Lite to be disabled for the WABAID.\n"}}}}},"TemplateParameter":{"oneOf":[{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["string"]},"key":{"type":"string","minLength":1},"value":{"type":"string"}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["number"]},"key":{"type":"string","minLength":1},"value":{"type":"number"}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["boolean"]},"key":{"type":"string","minLength":1},"value":{"type":"boolean"}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["object"]},"key":{"type":"string","minLength":1},"value":{"type":"object","additionalProperties":true}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["sectionList"]},"key":{"type":"string","minLength":1},"value":{"type":"object","required":["sections"],"additionalProperties":false,"properties":{"sections":{"$ref":"#/components/schemas/Sections"}}}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["timeslotList"]},"key":{"type":"string","minLength":1},"value":{"type":"object","required":["timeslots"],"additionalProperties":false,"properties":{"timeslots":{"$ref":"#/components/schemas/Timeslots"}}}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["productSections"]},"key":{"type":"string","minLength":1},"value":{"type":"object","required":["productSections"],"additionalProperties":false,"properties":{"productSections":{"$ref":"#/components/schemas/ProductSections"}}}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["productList"]},"key":{"type":"string","minLength":1},"value":{"type":"object","required":["products"],"additionalProperties":false,"properties":{"products":{"$ref":"#/components/schemas/ProductList"}}}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["shippingMethodList"]},"key":{"type":"string","minLength":1},"value":{"type":"object","required":["shippingMethods"],"additionalProperties":false,"properties":{"shippingMethods":{"$ref":"#/components/schemas/AppleShippingMethods"}}}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["lineItemList"]},"key":{"type":"string","minLength":1},"value":{"type":"object","required":["lineItems"],"additionalProperties":false,"properties":{"lineItems":{"$ref":"#/components/schemas/AppleLineItems"}}}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["whatsappProductSections"]},"key":{"type":"string","minLength":1},"value":{"type":"object","required":["sections"],"additionalProperties":false,"properties":{"sections":{"$ref":"#/components/schemas/WhatsappProductSections"}}}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["whatsappProductItems"]},"key":{"type":"string","minLength":1},"value":{"type":"object","required":["products"],"additionalProperties":false,"properties":{"products":{"type":"array","items":{"$ref":"#/components/schemas/WhatsappProductItem"}}}}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["carouselCards"]},"key":{"type":"string","minLength":1},"value":{"type":"object","required":["cards"],"additionalProperties":false,"properties":{"cards":{"type":"array","items":{"$ref":"#/components/schemas/WhatsappCarouselCard"}}}}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["appleFormPageItems"]},"key":{"type":"string","minLength":1},"value":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"$ref":"#/components/schemas/AppleFormPageItems"}}}}}]},"Sections":{"type":"array","nullable":true,"items":{"type":"object","additionalProperties":false,"required":["title","items"],"properties":{"id":{"type":"string","nullable":true},"multipleSelection":{"type":"boolean"},"title":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/ReplyAction"}}}}},"ReplyAction":{"type":"object","required":["type","replyAction"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["reply-action"]},"reference":{"type":"string"},"role":{"type":"string"},"hidden":{"type":"boolean"},"replyAction":{"type":"object","properties":{"text":{"type":"string"},"imageUrl":{"type":"string"},"payload":{"type":"string"},"subTitle":{"type":"string"}},"required":["text"]}}},"Timeslots":{"type":"array","nullable":false,"items":{"type":"object","additionalProperties":false,"required":["startTime","duration"],"properties":{"id":{"type":"string","nullable":true},"startTime":{"type":"string","format":"date-time"},"duration":{"type":"number"}}}},"ProductSections":{"type":"array","nullable":false,"items":{"type":"object","additionalProperties":false,"required":["title","products"],"properties":{"title":{"type":"string","minLength":1,"maxLength":24},"products":{"type":"array","items":{"$ref":"#/components/schemas/Product"}}}}},"Product":{"type":"object","additionalProperties":false,"required":["externalProductId"],"properties":{"externalProductId":{"type":"string"},"amount":{"type":"string"},"text":{"type":"string"}}},"ProductList":{"type":"array","nullable":false,"items":{"type":"object","additionalProperties":false,"required":["type","product"],"properties":{"type":{"type":"string","enum":["product"]},"product":{"$ref":"#/components/schemas/Product"}}}},"AppleShippingMethods":{"type":"array","nullable":true,"items":{"type":"object","additionalProperties":false,"required":["amount","label","identifier","detail"],"properties":{"amount":{"type":"string"},"label":{"type":"string"},"identifier":{"type":"string"},"detail":{"type":"string"}}}},"AppleLineItems":{"type":"array","nullable":true,"items":{"type":"object","additionalProperties":false,"required":["amount","text"],"properties":{"amount":{"type":"string"},"text":{"type":"string"},"type":{"type":"string","enum":["pending","final"]}}}},"WhatsappProductSections":{"type":"array","nullable":false,"items":{"$ref":"#/components/schemas/WhatsappProductSection"}},"WhatsappProductSection":{"type":"object","additionalProperties":false,"required":["type","whatsappProductSection"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["whatsapp-product-section"]},"reference":{"type":"string"},"role":{"type":"string"},"hidden":{"type":"boolean"},"whatsappProductSection":{"type":"object","additionalProperties":false,"required":["title","products"],"properties":{"title":{"type":"string","minLength":1,"maxLength":24},"products":{"type":"array","items":{"$ref":"#/components/schemas/WhatsappProductItem"}}}}}},"WhatsappProductItem":{"type":"object","additionalProperties":false,"required":["type","whatsappProductItem"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["whatsapp-product-item"]},"reference":{"type":"string"},"role":{"type":"string"},"hidden":{"type":"boolean"},"whatsappProductItem":{"type":"object","additionalProperties":false,"required":["externalProductId"],"properties":{"externalProductId":{"type":"string"}}}}},"WhatsappCarouselCard":{"type":"object","additionalProperties":false,"required":["type","whatsappCarouselCard"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["whatsapp-carousel-card"]},"reference":{"type":"string"},"role":{"type":"string"},"hidden":{"type":"boolean"},"whatsappCarouselCard":{"type":"object","additionalProperties":false,"required":["header","body","actions"],"properties":{"header":{"oneOf":[{"type":"object","additionalProperties":false,"required":["type","image"],"properties":{"type":{"type":"string","enum":["image"]},"image":{"type":"object","additionalProperties":false,"required":["mediaUrl"],"properties":{"mediaUrl":{"type":"string"},"altText":{"type":"string"}}}}},{"type":"object","additionalProperties":false,"required":["type","file"],"properties":{"type":{"type":"string","enum":["file"]},"file":{"type":"object","additionalProperties":false,"required":["mediaUrl"],"properties":{"mediaUrl":{"type":"string"},"contentType":{"type":"string"}}}}}]},"body":{"type":"object","additionalProperties":false,"required":["type","text"],"properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"object","additionalProperties":false,"required":["text"],"properties":{"text":{"type":"string"}}}}},"actions":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["type","linkAction"],"properties":{"type":{"type":"string","enum":["link-action"]},"linkAction":{"type":"object","additionalProperties":false,"required":["text","url"],"properties":{"text":{"type":"string"},"url":{"type":"string"}}}}},"minItems":1,"maxItems":1,"description":"Session carousels only support one link action per card."}}}}},"AppleFormPageItems":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["identifier","title","value"],"properties":{"identifier":{"type":"string","description":"Unique identifier for the item"},"title":{"type":"string","description":"Display text shown to the user"},"value":{"type":"string","description":"Value submitted when the item is selected"},"imageUrl":{"type":"string","nullable":true,"description":"Optional URL of an image to display alongside the item title"},"nextPageIdentifier":{"type":"string","nullable":true,"description":"Identifier of the next page to navigate to when this item is selected"}}}},"Pagination":{"type":"object","properties":{"nextPageToken":{"type":"string","description":"The token that can be passed as pageToken in URL to retrieve the next set of results. If missing, no more results to display."}}},"RequestError":{"type":"object","properties":{"code":{"type":"string","description":"A unique code that identifies the error. This code can be used to programmatically identify the error.\n"},"message":{"type":"string","description":"A human-readable message that describes the error. An example is 'The requested resource does not exist: channel not found'.\n"}},"required":["code","message"]},"ValidationError":{"type":"object","properties":{"code":{"type":"string","description":"A unique code that identifies the error. This code can be used to programmatically identify the error.\n"},"message":{"type":"string","description":"A human-readable message that describes the error. An example is 'The requested resource does not exist: channel not found'.\n"},"details":{"type":"object","description":"Additional details about the error. This object can contain any additional information that may be useful for debugging.\n","additionalProperties":{"type":"array","items":{"type":"string"}}}},"required":["code","message"]}},"responses":{"requestError":{"description":"The request did not pass validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestError"}}}},"validationError":{"description":"The request did not pass validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}}}},"paths":{"/workspaces/{workspaceId}/channels/{channelId}/messages":{"get":{"summary":"List messages by channel ID","operationId":"listChannelMessages","description":"It retrieves a list of messages from a given channel ID","tags":["channel_message"],"parameters":[{"$ref":"#/components/parameters/queryLimit"},{"$ref":"#/components/parameters/queryCursor"},{"$ref":"#/components/parameters/queryDirection"},{"$ref":"#/components/parameters/queryPlatform"},{"$ref":"#/components/parameters/queryMessageDirection"},{"$ref":"#/components/parameters/queryId"},{"$ref":"#/components/parameters/queryNavigatorId"},{"$ref":"#/components/parameters/queryMessageType"},{"$ref":"#/components/parameters/queryMessageStatus"},{"$ref":"#/components/parameters/queryStartAt"},{"$ref":"#/components/parameters/queryEndAt"},{"$ref":"#/components/parameters/queryFrom"},{"$ref":"#/components/parameters/queryTo"},{"$ref":"#/components/parameters/queryFailureCode"},{"$ref":"#/components/parameters/queryFailureSourceCode"},{"$ref":"#/components/parameters/queryFailureSourceName"},{"$ref":"#/components/parameters/queryCountryCode"},{"$ref":"#/components/parameters/queryTag"},{"$ref":"#/components/parameters/queryEmailSubject"},{"$ref":"#/components/parameters/queryBatchId"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/MessageList"},{"$ref":"#/components/schemas/Pagination"}]}},"text/csv":{"schema":{"type":"string"}}}},"404":{"$ref":"#/components/responses/requestError"},"422":{"$ref":"#/components/responses/validationError"}}}}}}
```

### Retrieve list of messages of a workspace

## List messages by workspace ID

> It retrieves a list of messages from a given workspace ID

```json
{"openapi":"3.0.3","info":{"title":"Channels","version":"v1"},"tags":[{"name":"channel_message","description":"Messages are the data sent and received through channels."}],"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 (e.g., 'Authorization: AccessKey AbCdEfGhIjKlMnOpQrStUvWxYzAbCdEfGhIj')","scheme":"AccessKey","type":"http"}},"parameters":{"queryLimit":{"name":"limit","description":"Limits the number of results to return","in":"query","schema":{"type":"integer","minimum":1,"maximum":1000,"default":10}},"queryChannelId":{"name":"channelId","description":"The ID for a channel","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}},"queryCursor":{"name":"pageToken","description":"Pagination token that keeps of track of the current position in the list","in":"query","schema":{"type":"string","maxLength":8000}},"queryDirection":{"name":"reverse","description":"Order in which to retrieve the results","in":"query","schema":{"type":"boolean","default":false}},"queryPlatform":{"name":"platform","description":"Filter based on platform name","in":"query","schema":{"anyOf":[{"$ref":"#/components/schemas/Id"},{"type":"array","items":{"$ref":"#/components/schemas/Id"}}]}},"queryMessageDirection":{"name":"direction","in":"query","style":"form","explode":true,"schema":{"$ref":"#/components/schemas/Direction"}},"queryId":{"name":"id","in":"query","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},"queryMessageType":{"name":"messageType","in":"query","style":"form","explode":true,"schema":{"type":"array","items":{"$ref":"#/components/schemas/BodyTypes"}}},"queryMessageStatus":{"name":"status","in":"query","style":"form","explode":true,"schema":{"type":"array","items":{"$ref":"#/components/schemas/Status-3"}}},"queryStartAt":{"name":"startAt","description":"Start date for the query","in":"query","schema":{"type":"string","format":"date-time"}},"queryEndAt":{"name":"endAt","description":"End date for the query","in":"query","schema":{"type":"string","format":"date-time"}},"queryFrom":{"name":"from","description":"sender identifier for the message","in":"query","schema":{"type":"array","items":{"type":"string"}}},"queryTo":{"name":"to","description":"recipient identifier for the message","in":"query","schema":{"type":"array","items":{"type":"string"}}},"queryFailureCode":{"name":"failureCode","in":"query","style":"form","explode":true,"schema":{"type":"array","items":{"type":"integer"}}},"queryFailureSourceCode":{"name":"failureSourceCode","in":"query","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100}}},"queryFailureSourceName":{"name":"failureSourceName","in":"query","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100}}},"queryCountryCode":{"name":"countryCode","in":"query","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100}}},"queryTag":{"name":"tag","description":"Filter based on tag","in":"query","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string"}}},"queryEmailSubject":{"name":"emailSubject","description":"Full text search on email subject","in":"query","schema":{"type":"string"}},"queryBatchId":{"name":"batchId","description":"The ID for a batch","in":"query","schema":{"type":"string","format":"uuid"}}},"schemas":{"Id":{"type":"string","pattern":"^[A-Za-z0-9-]+$","minLength":3,"maxLength":60},"Direction":{"type":"string","enum":["incoming","outgoing"]},"BodyTypes":{"type":"string","enum":["text","html","image","file","gif","location","carousel","list","section","authentication","template","action"]},"Status-3":{"type":"string","enum":["accepted","rejected","processing","scheduled","sent","sending_failed","delivered","delivery_failed","deleted","skipped"]},"MessageList":{"type":"object","title":"ChannelMessageList","description":"A list of channel messages","required":["results"],"properties":{"startAt":{"type":"string","nullable":true,"format":"date-time"},"endAt":{"type":"string","nullable":true,"format":"date-time"},"nextPageToken":{"type":"string"},"results":{"type":"array","items":{"$ref":"#/components/schemas/Message"}}}},"Message":{"type":"object","title":"ChannelMessage","allOf":[{"type":"object","properties":{"id":{"$ref":"#/components/schemas/Id-2"},"channelId":{"$ref":"#/components/schemas/ChannelId"},"sender":{"oneOf":[{"$ref":"#/components/schemas/Connector"},{"$ref":"#/components/schemas/Contact"}]},"receiver":{"oneOf":[{"$ref":"#/components/schemas/Connector"},{"$ref":"#/components/schemas/Contacts"}]},"meta":{"$ref":"#/components/schemas/Meta"},"reference":{"$ref":"#/components/schemas/Reference"},"parts":{"$ref":"#/components/schemas/Parts"},"status":{"$ref":"#/components/schemas/Status-3"},"reason":{"type":"string"},"direction":{"$ref":"#/components/schemas/Direction"},"origin":{"$ref":"#/components/schemas/Origin"},"replyTo":{"$ref":"#/components/schemas/ReplyTo"},"lastStatusAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"details":{"description":"This field is used to store additional information related to the message status.\n","type":"string"},"failure":{"$ref":"#/components/schemas/Failure"},"tags":{"$ref":"#/components/schemas/Tags"},"shortLinks":{"$ref":"#/components/schemas/ShortLinks"},"scheduledFor":{"$ref":"#/components/schemas/ScheduledFor"}},"required":["id","channelId","sender","receiver","status","lastStatusAt","createdAt","updatedAt"]},{"anyOf":[{"type":"object","properties":{"body":{"$ref":"#/components/schemas/Body"}},"required":["body"]},{"type":"object","properties":{"template":{"$ref":"#/components/schemas/Template"}},"required":["template"]}]}]},"Id-2":{"type":"string","format":"uuid"},"ChannelId":{"type":"string","format":"uuid"},"Connector":{"type":"object","title":"ChannelConnector","additionalProperties":false,"properties":{"connector":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"identifierValue":{"type":"string"},"annotations":{"$ref":"#/components/schemas/MessageAnnotations"},"types":{"type":"array","items":{"type":"string"}}},"required":["id"]}},"required":["connector"]},"MessageAnnotations":{"type":"object","title":"MessageAnnotations","description":"Annotations are used to add additional information to a message.\nFor email messages, it can be used to specify a custom sender name.\n","additionalProperties":false,"properties":{"name":{"type":"string"}}},"Contact":{"type":"object","title":"ChannelContact","additionalProperties":false,"properties":{"contact":{"type":"object","properties":{"id":{"type":"string"},"identifierKey":{"type":"string"},"identifierValue":{"type":"string"},"type":{"type":"string"},"countryCode":{"type":"string"},"platformAddress":{"type":"string"},"platformAddressSelector":{"type":"string"},"annotations":{"type":"object","additionalProperties":true,"properties":{"name":{"type":"string"}}}},"required":["id","identifierKey","identifierValue"]}},"required":["contact"]},"Contacts":{"type":"object","title":"ChannelContacts","additionalProperties":false,"properties":{"contacts":{"type":"array","minLength":1,"items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string"},"identifierKey":{"type":"string"},"identifierValue":{"type":"string"},"type":{"type":"string"},"countryCode":{"type":"string"},"identifiers":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"identifierKey":{"type":"string"},"identifierValue":{"type":"string"}}}},"platformAddress":{"type":"string"},"platformAddressSelector":{"type":"string","nullable":true},"annotations":{"type":"object","additionalProperties":true,"properties":{"name":{"type":"string"}}}}}}},"required":["contacts"]},"Meta":{"type":"object","additionalProperties":false,"properties":{"extraInformation":{"type":"object","additionalProperties":true,"description":"Additional information about the message.\n"},"referral":{"$ref":"#/components/schemas/MessageReferral"},"order":{"$ref":"#/components/schemas/MessageOrder"},"referredProduct":{"$ref":"#/components/schemas/ReferredProduct"},"email":{"$ref":"#/components/schemas/MetaEmail"},"sms":{"$ref":"#/components/schemas/MetaSMS"},"pushNotifications":{"$ref":"#/components/schemas/MetaPushNotifications"},"navigatorId":{"$ref":"#/components/schemas/Id-2"},"navigatorMessageId":{"$ref":"#/components/schemas/Id-2"},"flow":{"$ref":"#/components/schemas/MetaFlow"},"journey":{"$ref":"#/components/schemas/MetaFlow"},"campaign":{"$ref":"#/components/schemas/MetaCampaign"}}},"MessageReferral":{"type":"object","additionalProperties":false,"properties":{"source":{"type":"string"},"title":{"type":"string","nullable":true},"text":{"type":"string","nullable":true},"group":{"type":"string","nullable":true},"metadata":{"type":"object","nullable":true,"additionalProperties":false,"properties":{"source_id":{"type":"string"},"source_url":{"type":"string","nullable":true},"media_url":{"type":"string","nullable":true},"tracking_id":{"type":"string","nullable":true}}}}},"MessageOrder":{"type":"object","additionalProperties":false,"description":"The order object contains information about the purchase order.","properties":{"products":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"externalCatalogId":{"type":"string","description":"The platform-specific catalog ID of the product."},"externalProductId":{"type":"string","description":"The platform-specific product ID."},"quantity":{"type":"integer","description":"The number of items purchased."},"price":{"type":"object","description":"The price of the product.","additionalProperties":false,"properties":{"amount":{"type":"integer"},"exponent":{"type":"integer"},"currencyCode":{"type":"string"}}}}}}}},"ReferredProduct":{"type":"object","additionalProperties":false,"description":"Referred product in an incoming message.","nullable":true,"properties":{"externalCatalogId":{"type":"string","description":"The platform-specific catalog ID of the product."},"externalProductId":{"type":"string","description":"The platform-specific product ID."}}},"MetaEmail":{"type":"object","additionalProperties":false,"properties":{"subject":{"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"from":{"type":"object","additionalProperties":false,"properties":{"username":{"type":"string","pattern":"[\\w\\d.-/+]+"},"displayName":{"type":"string"}}}}},"MetaSMS":{"type":"object","additionalProperties":false,"properties":{"smartEncoding":{"type":"boolean","description":"When enabled, attempts to transliterate Unicode characters to GSM-7 equivalents.\nIf the resulting text is fully GSM-7 compatible, fewer message segments may be required.\nThe original message body is preserved; transliteration is only applied when sending.\n"}}},"MetaPushNotifications":{"type":"object","additionalProperties":false,"properties":{"gatewayTypeOverride":{"type":"string","enum":["apns","firebase","web"]}}},"MetaFlow":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid","nullable":true},"name":{"type":"string","nullable":true},"stepId":{"type":"string","nullable":true},"runId":{"type":"string","format":"uuid","nullable":true}}},"MetaCampaign":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid","nullable":true},"name":{"type":"string","nullable":true}}},"Reference":{"type":"string","description":"A reference to the message. This can be used to identify the message in the channel.\n"},"Parts":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"platformReference":{"type":"string"}}}},"Origin":{"type":"object","nullable":true,"additionalProperties":false,"required":["type","id"],"properties":{"type":{"type":"string","description":"origin type of message."},"id":{"type":"string","description":"origin id of message."}}},"ReplyTo":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","description":"The ID of the message that is being replied to."},"order":{"type":"integer","description":"The order of the message in the conversation."},"type":{"type":"string","enum":["message","click","referrals"]}},"required":["id","type"]},"Failure":{"type":"object","nullable":true,"additionalProperties":false,"properties":{"code":{"type":"integer","description":"omni channel interpretation of the failure to categorise the nature of message error."},"description":{"type":"string","description":"human readable description of the error."},"source":{"type":"object","additionalProperties":false,"properties":{"code":{"type":"string","description":"numerical, text or alphanumeric code that indicates the error or issue while delivering the message in the last step."},"name":{"type":"string","description":"enum representing the step where the failure occurred. Example: # \"pre-processing\", \"accounting\", \"whatsapp\", \"email-sparkpost\", etc."}}}}},"Tags":{"type":"array","description":"Tags to associate with the message. Tags are converted to lower case and tags\nthat do not exist are automatically created. You can view your created tags\nin the UI. You can specify up to 10 tags per message.\n","maxItems":10,"items":{"$ref":"#/components/schemas/Name-3"}},"Name-3":{"type":"string","pattern":"^[a-zA-Z0-9-_ ]+$","minLength":1,"maxLength":50,"description":"Tag name. Must be between 1 and 50 characters and must only contain\nalphanumeric characters, hyphens, underscores, and spaces.\n"},"ShortLinks":{"nullable":true,"type":"object","description":"SMS link shortening options. Must be included in the request for SMS channels\nwhen `enableLinkTracking` is set to true. When using templates, please refer\nto the template level `shortLinks` instead.\n","additionalProperties":false,"required":["domain"],"properties":{"domain":{"type":"string","maxLength":128,"description":"The domain to use when shortening links. When set to `default`,\nuses the default link shortening domain for the workspace.\n"}}},"ScheduledFor":{"type":"string","format":"date-time","description":"Scheduled time to send message at. Must be formated as RFC3339 timestamp. When\nset, the message status will be `scheduled` until it's sent. Messages scheduled\nfor a time in the past or within 10 minutes of the request may be sent\nimmediately. Messages scheduled farther than 35 days will be rejected.\n"},"Body":{"type":"object","title":"MessageBody","nullable":true,"allOf":[{"type":"object","required":["type"],"properties":{"type":{"$ref":"#/components/schemas/BodyTypes"}}},{"oneOf":[{"$ref":"#/components/schemas/TypeText"},{"$ref":"#/components/schemas/TypeHTML"},{"$ref":"#/components/schemas/TypeImage"},{"$ref":"#/components/schemas/TypeFile"},{"$ref":"#/components/schemas/TypeGif"},{"$ref":"#/components/schemas/TypeLocation"},{"$ref":"#/components/schemas/TypeCarousel"},{"$ref":"#/components/schemas/TypeList"},{"$ref":"#/components/schemas/TypeSection"},{"$ref":"#/components/schemas/TypeAuthentication"},{"$ref":"#/components/schemas/TypeAction"}],"discriminator":{"propertyName":"type","mapping":{"text":"#/components/schemas/TypeText","html":"#/components/schemas/TypeHTML","image":"#/components/schemas/TypeImage","file":"#/components/schemas/TypeFile","gif":"#/components/schemas/TypeGif","location":"#/components/schemas/TypeLocation","carousel":"#/components/schemas/TypeCarousel","list":"#/components/schemas/TypeList","section":"#/components/schemas/TypeSection","authentication":"#/components/schemas/TypeAuthentication","action":"#/components/schemas/TypeAction"}}}]},"TypeText":{"type":"object","required":["text","type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"object","additionalProperties":false,"required":["text"],"properties":{"text":{"type":"string","minLength":1},"attachments":{"type":"array","nullable":true,"items":{"type":"object","additionalProperties":false,"required":["mediaUrl","filename"],"properties":{"mediaUrl":{"type":"string","format":"uri"},"filename":{"type":"string"},"inline":{"type":"boolean"},"contentId":{"type":"string"}}}},"actions":{"$ref":"#/components/schemas/Actions"},"metadata":{"type":"object","additionalProperties":false,"properties":{"subject":{"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"whatsapp":{"type":"object","additionalProperties":false,"properties":{"previewUrl":{"type":"boolean","description":"When set to `true`, preview will be displayed within whatsapp chat."}}},"line":{"type":"object","additionalProperties":false,"properties":{"emoji":{"type":"object","additionalProperties":false,"properties":{"items":{"type":"array","nullable":true,"items":{"type":"object","additionalProperties":false,"required":["index","productId","emojiId"],"properties":{"index":{"type":"integer"},"productId":{"type":"string"},"emojiId":{"type":"string"},"length":{"type":"integer","nullable":true,"readOnly":true}}}}}}}},"telegram":{"$ref":"#/components/schemas/MetadataTelegram"},"apple":{"$ref":"#/components/schemas/MetadataApple"}}}}}}},"Actions":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/Action"}},"Action":{"allOf":[{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["link","reply","locationRequest","buy","postback"]}}},{"oneOf":[{"$ref":"#/components/schemas/ActionLink"},{"$ref":"#/components/schemas/ActionReply"},{"$ref":"#/components/schemas/ActionLocationRequest"},{"$ref":"#/components/schemas/ActionBuy"},{"$ref":"#/components/schemas/ActionPostback"}],"discriminator":{"propertyName":"type","mapping":{"link":"#/components/schemas/ActionLink","reply":"#/components/schemas/ActionReply","locationRequest":"#/components/schemas/ActionLocationRequest","buy":"#/components/schemas/ActionBuy","postback":"#/components/schemas/ActionPostback"}}}]},"ActionLink":{"type":"object","required":["link","type"],"properties":{"type":{"type":"string","enum":["link"]},"link":{"type":"object","required":["text","url"],"properties":{"text":{"type":"string"},"url":{"anyOf":[{"type":"string","pattern":"{{[^{}]+}}"},{"type":"string","format":"uri"}]}}}}},"ActionReply":{"type":"object","required":["reply","type"],"properties":{"type":{"type":"string","enum":["reply"]},"reply":{"type":"object","properties":{"text":{"type":"string"},"imageUrl":{"type":"string"},"metadata":{"$ref":"#/components/schemas/ActionReplyMetadata"}},"required":["text"]}}},"ActionReplyMetadata":{"type":"object","properties":{"description":{"$ref":"#/components/schemas/ActionDescription"}}},"ActionDescription":{"type":"object","description":"Sets the description in the row objects for Whatsapp list messages. Only available usage for Whatsapp platform","additionalProperties":false,"properties":{"label":{"type":"string","maxLength":72}}},"ActionLocationRequest":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["locationRequest"]},"locationRequest":{"type":"object","nullable":true,"properties":{"text":{"type":"string","default":"Send location"}}}}},"ActionBuy":{"type":"object","required":["buy","type"],"properties":{"type":{"type":"string","enum":["buy"]},"buy":{"type":"object","properties":{"text":{"type":"string"},"amountCents":{"type":"integer"},"currency":{"type":"string","minLength":3,"maxLength":3}},"required":["text","amountCents","currency"]}}},"ActionPostback":{"type":"object","required":["postback","type"],"properties":{"type":{"type":"string","enum":["postback"]},"postback":{"type":"object","properties":{"text":{"type":"string"},"payload":{"type":"string"},"imageUrl":{"type":"string"},"metadata":{"$ref":"#/components/schemas/ActionPostbackMetadata"}},"required":["text"]}}},"ActionPostbackMetadata":{"type":"object","properties":{"description":{"$ref":"#/components/schemas/ActionDescription"}}},"MetadataTelegram":{"type":"object","description":"The property is specific to Telegram, indicating the markup type to be used for message formatting","additionalProperties":false,"properties":{"parseMode":{"type":"string","enum":["Markdown","MarkdownV2"]}}},"MetadataApple":{"type":"object","description":"The property is specific to Apple Business Chat, containing Apple-specific metadata","additionalProperties":false,"properties":{"summaryText":{"type":"string","description":"Summary text for Apple Business Chat messages"},"appClipPreview":{"type":"boolean","description":"Indicates if the message includes an App Clip link"},"appClipRegion":{"type":"string","description":"AppClipRegion is the ISO 3166 alpha-2 country code for the App Store region."}}},"TypeHTML":{"type":"object","required":["html","type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["html"]},"html":{"type":"object","additionalProperties":false,"anyOf":[{"required":["text"]},{"required":["html"]}],"properties":{"text":{"type":"string","minLength":1},"html":{"type":"string","minLength":1},"attachments":{"type":"array","nullable":true,"items":{"type":"object","additionalProperties":false,"anyOf":[{"required":["mediaUrl","filename"]},{"required":["content","contentType","filename"]}],"properties":{"mediaUrl":{"type":"string","format":"uri"},"filename":{"type":"string"},"inline":{"type":"boolean"},"content":{"type":"string","minLength":1},"contentType":{"type":"string","minLength":1},"contentId":{"type":"string"}}}},"actions":{"$ref":"#/components/schemas/Actions"},"metadata":{"type":"object","additionalProperties":false,"properties":{"subject":{"type":"string"},"emailFrom":{"type":"object","additionalProperties":false,"properties":{"username":{"type":"string","pattern":"[\\w\\d.-/+]+"},"displayName":{"type":"string"}}},"headers":{"type":"object","additionalProperties":{"type":"string"}},"initialOpenTracking":{"type":"boolean"},"clickTracking":{"type":"boolean"},"openTracking":{"type":"boolean"}}}}}}},"TypeImage":{"type":"object","required":["image","type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["image"]},"image":{"type":"object","additionalProperties":false,"required":["images"],"properties":{"text":{"type":"string"},"images":{"type":"array","minLength":1,"items":{"type":"object","additionalProperties":false,"required":["mediaUrl"],"properties":{"mediaUrl":{"type":"string","format":"uri","minLength":1},"altText":{"type":"string"}}}},"metadata":{"type":"object","properties":{"subject":{"type":"string","description":"The property is specific mms file, shows the subject of the mms."},"fallbackText":{"type":"string","description":"The property is specific mms file, when a mms is not supported, it will fallback to show content with the fallbackText."},"storyType":{"type":"string","description":"The property is specific instagram file, shows the story type."},"telegram":{"$ref":"#/components/schemas/MetadataTelegram"}}},"actions":{"$ref":"#/components/schemas/Actions"}}}}},"TypeFile":{"type":"object","required":["file","type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["file"]},"file":{"type":"object","additionalProperties":false,"required":["files"],"properties":{"text":{"type":"string"},"files":{"type":"array","minLength":1,"items":{"type":"object","additionalProperties":false,"required":["mediaUrl","contentType"],"properties":{"mediaUrl":{"type":"string","format":"uri","minLength":1},"contentType":{"type":"string","minLength":1},"filename":{"type":"string"},"altText":{"type":"string"},"metadata":{"type":"object","properties":{"isAnimated":{"type":"boolean","description":"The property is specific the sticker file, shows that if the sticker is animated or not."}}}}}},"metadata":{"type":"object","properties":{"subject":{"type":"string","description":"The property is specific mms file, shows the subject of the mms."},"fallbackText":{"type":"string","description":"The property is specific mms file, when a mms is not supported, it will fallback to show content with the fallbackText."},"storyType":{"type":"string","description":"The property is specific instagram file, shows the story type."},"telegram":{"$ref":"#/components/schemas/MetadataTelegram"}}},"actions":{"$ref":"#/components/schemas/Actions"}}}}},"TypeGif":{"type":"object","required":["gif","type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["gif"]},"gif":{"type":"object","additionalProperties":false,"required":["mediaUrl"],"properties":{"text":{"type":"string"},"mediaUrl":{"type":"string","format":"uri","minLength":1},"altText":{"type":"string"},"actions":{"$ref":"#/components/schemas/Actions"},"metadata":{"type":"object","properties":{"telegram":{"$ref":"#/components/schemas/MetadataTelegram"}}}}}}},"TypeLocation":{"type":"object","required":["location","type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["location"]},"location":{"type":"object","additionalProperties":false,"required":["coordinates"],"properties":{"coordinates":{"type":"object","additionalProperties":false,"properties":{"latitude":{"type":"number","format":"float","minimum":-90,"maximum":90},"longitude":{"type":"number","format":"float","minimum":-180,"maximum":180}}},"location":{"type":"object","additionalProperties":false,"properties":{"address":{"type":"string"},"label":{"type":"string"}}}}}}},"TypeCarousel":{"type":"object","required":["carousel","type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["carousel"]},"carousel":{"type":"object","additionalProperties":false,"required":["items"],"properties":{"text":{"type":"string","description":"Optional text displayed above the carousel cards","maxLength":1024},"items":{"$ref":"#/components/schemas/Items"}}}}},"Items":{"type":"array","nullable":true,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string"},"mediaUrl":{"type":"string","format":"uri","nullable":true},"description":{"type":"string"},"altText":{"type":"string"},"actions":{"$ref":"#/components/schemas/Actions"}}}},"TypeList":{"type":"object","required":["list","type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["list"]},"list":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string"},"text":{"type":"string"},"altText":{"type":"string"},"items":{"$ref":"#/components/schemas/Items"},"actions":{"$ref":"#/components/schemas/Actions"},"metadata":{"type":"object","properties":{"button":{"type":"object","description":"Sets a button name for whatsapp list messages. Only available usage for Whatsapp platform","additionalProperties":false,"properties":{"label":{"type":"string","maxLength":20}}},"replyMessage":{"type":"object","description":"Sets the reply message to be used when a list item is picked. Used for Apple Business Chat.","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":512},"text":{"type":"string","maxLength":512}}}}}},"required":["text"]}}},"TypeSection":{"type":"object","required":["section","type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["section"]},"section":{"type":"object","additionalProperties":false,"properties":{"items":{"type":"array","items":{"minLength":1,"$ref":"#/components/schemas/SectionBody"}},"configurations":{"type":"object","additionalProperties":{"type":"string"}}}}}},"SectionBody":{"type":"object","title":"MessageBody","allOf":[{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["text","image","file","gif","location","carousel","list","section"]}}},{"oneOf":[{"$ref":"#/components/schemas/TypeText"},{"$ref":"#/components/schemas/TypeImage"},{"$ref":"#/components/schemas/TypeFile"},{"$ref":"#/components/schemas/TypeGif"},{"$ref":"#/components/schemas/TypeLocation"},{"$ref":"#/components/schemas/TypeCarousel"},{"$ref":"#/components/schemas/TypeList"},{"$ref":"#/components/schemas/TypeSectionNested"}],"discriminator":{"propertyName":"type","mapping":{"text":"#/components/schemas/TypeText","image":"#/components/schemas/TypeImage","file":"#/components/schemas/TypeFile","gif":"#/components/schemas/TypeGif","location":"#/components/schemas/TypeLocation","carousel":"#/components/schemas/TypeCarousel","list":"#/components/schemas/TypeList","section":"#/components/schemas/TypeSectionNested"}}}]},"TypeSectionNested":{"type":"object","required":["section","type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["section"]},"section":{"type":"object","additionalProperties":false,"properties":{"items":{"type":"array","items":{"minLength":1,"$ref":"#/components/schemas/SectionBodyNested"}},"configurations":{"type":"object","properties":{"default":{"type":"string"}},"additionalProperties":{"type":"string"}}}}}},"SectionBodyNested":{"type":"object","title":"MessageBody","allOf":[{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["text","image","file","gif","location","carousel","list"]}}},{"oneOf":[{"$ref":"#/components/schemas/TypeText"},{"$ref":"#/components/schemas/TypeImage"},{"$ref":"#/components/schemas/TypeFile"},{"$ref":"#/components/schemas/TypeGif"},{"$ref":"#/components/schemas/TypeLocation"},{"$ref":"#/components/schemas/TypeCarousel"},{"$ref":"#/components/schemas/TypeList"}],"discriminator":{"propertyName":"type","mapping":{"text":"#/components/schemas/TypeText","image":"#/components/schemas/TypeImage","file":"#/components/schemas/TypeFile","gif":"#/components/schemas/TypeGif","location":"#/components/schemas/TypeLocation","carousel":"#/components/schemas/TypeCarousel","list":"#/components/schemas/TypeList"}}}]},"TypeAuthentication":{"type":"object","required":["authentication","type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["authentication"]},"authentication":{"type":"object","additionalProperties":false,"properties":{"otp":{"type":"object","additionalProperties":false,"required":["disclaimer"],"properties":{"disclaimer":{"type":"boolean","description":"Whether to add a security disclaimer to the authentication body.","nullable":false},"expirationTime":{"type":"integer","minimum":1,"maximum":90,"nullable":true,"description":"The number of seconds after which the authentication body will expire. If not set, no expiration notification will be sent."},"actions":{"$ref":"#/components/schemas/Actions"}}}}}}},"TypeAction":{"type":"object","required":["type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["permission_request"]},"permission_request":{"type":"object","required":["resource"],"properties":{"resource":{"type":"string","enum":["call"]}}}}},"Template":{"type":"object","nullable":true,"additionalProperties":false,"properties":{"name":{"type":"string","description":"The platform name of the template."},"projectId":{"type":"string","description":"the ID of the project from the project from Studio"},"version":{"type":"string","description":"The version of the template."},"locale":{"type":"string","format":"locale-bcp47"},"attachments":{"type":"array","nullable":true,"items":{"type":"object","additionalProperties":false,"required":["mediaUrl","filename"],"properties":{"mediaUrl":{"type":"string","format":"uri","description":"The URL of the attachment."},"filename":{"type":"string","description":"The filename of the attachment."},"inline":{"type":"boolean"}}}},"shortLinks":{"nullable":true,"type":"object","description":"SMS link shortening options.","properties":{"enabled":{"type":"boolean","description":"Enables link shortening for SMS messages."},"domain":{"type":"string","description":"The domain to use when shortening links. When set to `default`,\nuses the default link shortening domain for the workspace.\n"}}},"variables":{"nullable":true,"deprecated":true,"description":"Deprecated: Use `parameters` instead (string parameter for variables). This property is maintained for backward compatibility but will be removed in a future version.\n","type":"object","properties":{"default":{"type":"string"}},"additionalProperties":{"type":"string"}},"utmParameters":{"nullable":true,"type":"array","description":"The list of UTM parameters.","minItems":1,"maxItems":8,"items":{"oneOf":[{"type":"object","required":["key","value"],"additionalProperties":false,"properties":{"key":{"type":"string","description":"The name of the parameter in the query string.","minLength":1,"maxLength":20},"value":{"type":"string","description":"The static value of the parameter. Mutually exclusive with Reference.","minLength":1,"maxLength":100}}},{"type":"object","required":["key","reference"],"additionalProperties":false,"properties":{"key":{"type":"string","description":"The name of the parameter in the query string.","minLength":1,"maxLength":20},"reference":{"type":"string","description":"The reference to a dynamic value. Mutually exclusive with Value.","enum":["platform_name","channel_name"]}}}]}},"parameters":{"nullable":true,"type":"array","minLength":1,"items":{"$ref":"#/components/schemas/TemplateParameter"}},"settings":{"nullable":true,"type":"object","properties":{"disallowMmLite":{"type":"boolean","nullable":true,"description":"This is specific for WhatsApp marketing templates and requires MM Lite to be disabled for the WABAID.\n"}}}}},"TemplateParameter":{"oneOf":[{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["string"]},"key":{"type":"string","minLength":1},"value":{"type":"string"}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["number"]},"key":{"type":"string","minLength":1},"value":{"type":"number"}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["boolean"]},"key":{"type":"string","minLength":1},"value":{"type":"boolean"}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["object"]},"key":{"type":"string","minLength":1},"value":{"type":"object","additionalProperties":true}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["sectionList"]},"key":{"type":"string","minLength":1},"value":{"type":"object","required":["sections"],"additionalProperties":false,"properties":{"sections":{"$ref":"#/components/schemas/Sections"}}}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["timeslotList"]},"key":{"type":"string","minLength":1},"value":{"type":"object","required":["timeslots"],"additionalProperties":false,"properties":{"timeslots":{"$ref":"#/components/schemas/Timeslots"}}}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["productSections"]},"key":{"type":"string","minLength":1},"value":{"type":"object","required":["productSections"],"additionalProperties":false,"properties":{"productSections":{"$ref":"#/components/schemas/ProductSections"}}}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["productList"]},"key":{"type":"string","minLength":1},"value":{"type":"object","required":["products"],"additionalProperties":false,"properties":{"products":{"$ref":"#/components/schemas/ProductList"}}}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["shippingMethodList"]},"key":{"type":"string","minLength":1},"value":{"type":"object","required":["shippingMethods"],"additionalProperties":false,"properties":{"shippingMethods":{"$ref":"#/components/schemas/AppleShippingMethods"}}}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["lineItemList"]},"key":{"type":"string","minLength":1},"value":{"type":"object","required":["lineItems"],"additionalProperties":false,"properties":{"lineItems":{"$ref":"#/components/schemas/AppleLineItems"}}}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["whatsappProductSections"]},"key":{"type":"string","minLength":1},"value":{"type":"object","required":["sections"],"additionalProperties":false,"properties":{"sections":{"$ref":"#/components/schemas/WhatsappProductSections"}}}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["whatsappProductItems"]},"key":{"type":"string","minLength":1},"value":{"type":"object","required":["products"],"additionalProperties":false,"properties":{"products":{"type":"array","items":{"$ref":"#/components/schemas/WhatsappProductItem"}}}}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["carouselCards"]},"key":{"type":"string","minLength":1},"value":{"type":"object","required":["cards"],"additionalProperties":false,"properties":{"cards":{"type":"array","items":{"$ref":"#/components/schemas/WhatsappCarouselCard"}}}}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["appleFormPageItems"]},"key":{"type":"string","minLength":1},"value":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"$ref":"#/components/schemas/AppleFormPageItems"}}}}}]},"Sections":{"type":"array","nullable":true,"items":{"type":"object","additionalProperties":false,"required":["title","items"],"properties":{"id":{"type":"string","nullable":true},"multipleSelection":{"type":"boolean"},"title":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/ReplyAction"}}}}},"ReplyAction":{"type":"object","required":["type","replyAction"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["reply-action"]},"reference":{"type":"string"},"role":{"type":"string"},"hidden":{"type":"boolean"},"replyAction":{"type":"object","properties":{"text":{"type":"string"},"imageUrl":{"type":"string"},"payload":{"type":"string"},"subTitle":{"type":"string"}},"required":["text"]}}},"Timeslots":{"type":"array","nullable":false,"items":{"type":"object","additionalProperties":false,"required":["startTime","duration"],"properties":{"id":{"type":"string","nullable":true},"startTime":{"type":"string","format":"date-time"},"duration":{"type":"number"}}}},"ProductSections":{"type":"array","nullable":false,"items":{"type":"object","additionalProperties":false,"required":["title","products"],"properties":{"title":{"type":"string","minLength":1,"maxLength":24},"products":{"type":"array","items":{"$ref":"#/components/schemas/Product"}}}}},"Product":{"type":"object","additionalProperties":false,"required":["externalProductId"],"properties":{"externalProductId":{"type":"string"},"amount":{"type":"string"},"text":{"type":"string"}}},"ProductList":{"type":"array","nullable":false,"items":{"type":"object","additionalProperties":false,"required":["type","product"],"properties":{"type":{"type":"string","enum":["product"]},"product":{"$ref":"#/components/schemas/Product"}}}},"AppleShippingMethods":{"type":"array","nullable":true,"items":{"type":"object","additionalProperties":false,"required":["amount","label","identifier","detail"],"properties":{"amount":{"type":"string"},"label":{"type":"string"},"identifier":{"type":"string"},"detail":{"type":"string"}}}},"AppleLineItems":{"type":"array","nullable":true,"items":{"type":"object","additionalProperties":false,"required":["amount","text"],"properties":{"amount":{"type":"string"},"text":{"type":"string"},"type":{"type":"string","enum":["pending","final"]}}}},"WhatsappProductSections":{"type":"array","nullable":false,"items":{"$ref":"#/components/schemas/WhatsappProductSection"}},"WhatsappProductSection":{"type":"object","additionalProperties":false,"required":["type","whatsappProductSection"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["whatsapp-product-section"]},"reference":{"type":"string"},"role":{"type":"string"},"hidden":{"type":"boolean"},"whatsappProductSection":{"type":"object","additionalProperties":false,"required":["title","products"],"properties":{"title":{"type":"string","minLength":1,"maxLength":24},"products":{"type":"array","items":{"$ref":"#/components/schemas/WhatsappProductItem"}}}}}},"WhatsappProductItem":{"type":"object","additionalProperties":false,"required":["type","whatsappProductItem"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["whatsapp-product-item"]},"reference":{"type":"string"},"role":{"type":"string"},"hidden":{"type":"boolean"},"whatsappProductItem":{"type":"object","additionalProperties":false,"required":["externalProductId"],"properties":{"externalProductId":{"type":"string"}}}}},"WhatsappCarouselCard":{"type":"object","additionalProperties":false,"required":["type","whatsappCarouselCard"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["whatsapp-carousel-card"]},"reference":{"type":"string"},"role":{"type":"string"},"hidden":{"type":"boolean"},"whatsappCarouselCard":{"type":"object","additionalProperties":false,"required":["header","body","actions"],"properties":{"header":{"oneOf":[{"type":"object","additionalProperties":false,"required":["type","image"],"properties":{"type":{"type":"string","enum":["image"]},"image":{"type":"object","additionalProperties":false,"required":["mediaUrl"],"properties":{"mediaUrl":{"type":"string"},"altText":{"type":"string"}}}}},{"type":"object","additionalProperties":false,"required":["type","file"],"properties":{"type":{"type":"string","enum":["file"]},"file":{"type":"object","additionalProperties":false,"required":["mediaUrl"],"properties":{"mediaUrl":{"type":"string"},"contentType":{"type":"string"}}}}}]},"body":{"type":"object","additionalProperties":false,"required":["type","text"],"properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"object","additionalProperties":false,"required":["text"],"properties":{"text":{"type":"string"}}}}},"actions":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["type","linkAction"],"properties":{"type":{"type":"string","enum":["link-action"]},"linkAction":{"type":"object","additionalProperties":false,"required":["text","url"],"properties":{"text":{"type":"string"},"url":{"type":"string"}}}}},"minItems":1,"maxItems":1,"description":"Session carousels only support one link action per card."}}}}},"AppleFormPageItems":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["identifier","title","value"],"properties":{"identifier":{"type":"string","description":"Unique identifier for the item"},"title":{"type":"string","description":"Display text shown to the user"},"value":{"type":"string","description":"Value submitted when the item is selected"},"imageUrl":{"type":"string","nullable":true,"description":"Optional URL of an image to display alongside the item title"},"nextPageIdentifier":{"type":"string","nullable":true,"description":"Identifier of the next page to navigate to when this item is selected"}}}},"Pagination":{"type":"object","properties":{"nextPageToken":{"type":"string","description":"The token that can be passed as pageToken in URL to retrieve the next set of results. If missing, no more results to display."}}},"RequestError":{"type":"object","properties":{"code":{"type":"string","description":"A unique code that identifies the error. This code can be used to programmatically identify the error.\n"},"message":{"type":"string","description":"A human-readable message that describes the error. An example is 'The requested resource does not exist: channel not found'.\n"}},"required":["code","message"]},"ValidationError":{"type":"object","properties":{"code":{"type":"string","description":"A unique code that identifies the error. This code can be used to programmatically identify the error.\n"},"message":{"type":"string","description":"A human-readable message that describes the error. An example is 'The requested resource does not exist: channel not found'.\n"},"details":{"type":"object","description":"Additional details about the error. This object can contain any additional information that may be useful for debugging.\n","additionalProperties":{"type":"array","items":{"type":"string"}}}},"required":["code","message"]}},"responses":{"requestError":{"description":"The request did not pass validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestError"}}}},"validationError":{"description":"The request did not pass validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}}}},"paths":{"/workspaces/{workspaceId}/channels/messages":{"get":{"summary":"List messages by workspace ID","operationId":"listWorkspaceMessages","description":"It retrieves a list of messages from a given workspace ID","tags":["channel_message"],"parameters":[{"$ref":"#/components/parameters/queryLimit"},{"$ref":"#/components/parameters/queryChannelId"},{"$ref":"#/components/parameters/queryCursor"},{"$ref":"#/components/parameters/queryDirection"},{"$ref":"#/components/parameters/queryPlatform"},{"$ref":"#/components/parameters/queryMessageDirection"},{"$ref":"#/components/parameters/queryId"},{"$ref":"#/components/parameters/queryMessageType"},{"$ref":"#/components/parameters/queryMessageStatus"},{"$ref":"#/components/parameters/queryStartAt"},{"$ref":"#/components/parameters/queryEndAt"},{"$ref":"#/components/parameters/queryFrom"},{"$ref":"#/components/parameters/queryTo"},{"$ref":"#/components/parameters/queryFailureCode"},{"$ref":"#/components/parameters/queryFailureSourceCode"},{"$ref":"#/components/parameters/queryFailureSourceName"},{"$ref":"#/components/parameters/queryCountryCode"},{"$ref":"#/components/parameters/queryTag"},{"$ref":"#/components/parameters/queryEmailSubject"},{"$ref":"#/components/parameters/queryBatchId"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/MessageList"},{"$ref":"#/components/schemas/Pagination"}]}},"text/csv":{"schema":{"type":"string"}}}},"404":{"$ref":"#/components/responses/requestError"},"422":{"$ref":"#/components/responses/validationError"}}}}}}
```

### Retrieve a single message

## Get message by message ID

> Get a channel message

```json
{"openapi":"3.0.3","info":{"title":"Channels","version":"v1"},"tags":[{"name":"channel_message","description":"Messages are the data sent and received through channels."}],"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 (e.g., 'Authorization: AccessKey AbCdEfGhIjKlMnOpQrStUvWxYzAbCdEfGhIj')","scheme":"AccessKey","type":"http"}},"schemas":{"Message":{"type":"object","title":"ChannelMessage","allOf":[{"type":"object","properties":{"id":{"$ref":"#/components/schemas/Id-2"},"channelId":{"$ref":"#/components/schemas/ChannelId"},"sender":{"oneOf":[{"$ref":"#/components/schemas/Connector"},{"$ref":"#/components/schemas/Contact"}]},"receiver":{"oneOf":[{"$ref":"#/components/schemas/Connector"},{"$ref":"#/components/schemas/Contacts"}]},"meta":{"$ref":"#/components/schemas/Meta"},"reference":{"$ref":"#/components/schemas/Reference"},"parts":{"$ref":"#/components/schemas/Parts"},"status":{"$ref":"#/components/schemas/Status-3"},"reason":{"type":"string"},"direction":{"$ref":"#/components/schemas/Direction"},"origin":{"$ref":"#/components/schemas/Origin"},"replyTo":{"$ref":"#/components/schemas/ReplyTo"},"lastStatusAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"details":{"description":"This field is used to store additional information related to the message status.\n","type":"string"},"failure":{"$ref":"#/components/schemas/Failure"},"tags":{"$ref":"#/components/schemas/Tags"},"shortLinks":{"$ref":"#/components/schemas/ShortLinks"},"scheduledFor":{"$ref":"#/components/schemas/ScheduledFor"}},"required":["id","channelId","sender","receiver","status","lastStatusAt","createdAt","updatedAt"]},{"anyOf":[{"type":"object","properties":{"body":{"$ref":"#/components/schemas/Body"}},"required":["body"]},{"type":"object","properties":{"template":{"$ref":"#/components/schemas/Template"}},"required":["template"]}]}]},"Id-2":{"type":"string","format":"uuid"},"ChannelId":{"type":"string","format":"uuid"},"Connector":{"type":"object","title":"ChannelConnector","additionalProperties":false,"properties":{"connector":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"identifierValue":{"type":"string"},"annotations":{"$ref":"#/components/schemas/MessageAnnotations"},"types":{"type":"array","items":{"type":"string"}}},"required":["id"]}},"required":["connector"]},"MessageAnnotations":{"type":"object","title":"MessageAnnotations","description":"Annotations are used to add additional information to a message.\nFor email messages, it can be used to specify a custom sender name.\n","additionalProperties":false,"properties":{"name":{"type":"string"}}},"Contact":{"type":"object","title":"ChannelContact","additionalProperties":false,"properties":{"contact":{"type":"object","properties":{"id":{"type":"string"},"identifierKey":{"type":"string"},"identifierValue":{"type":"string"},"type":{"type":"string"},"countryCode":{"type":"string"},"platformAddress":{"type":"string"},"platformAddressSelector":{"type":"string"},"annotations":{"type":"object","additionalProperties":true,"properties":{"name":{"type":"string"}}}},"required":["id","identifierKey","identifierValue"]}},"required":["contact"]},"Contacts":{"type":"object","title":"ChannelContacts","additionalProperties":false,"properties":{"contacts":{"type":"array","minLength":1,"items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string"},"identifierKey":{"type":"string"},"identifierValue":{"type":"string"},"type":{"type":"string"},"countryCode":{"type":"string"},"identifiers":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"identifierKey":{"type":"string"},"identifierValue":{"type":"string"}}}},"platformAddress":{"type":"string"},"platformAddressSelector":{"type":"string","nullable":true},"annotations":{"type":"object","additionalProperties":true,"properties":{"name":{"type":"string"}}}}}}},"required":["contacts"]},"Meta":{"type":"object","additionalProperties":false,"properties":{"extraInformation":{"type":"object","additionalProperties":true,"description":"Additional information about the message.\n"},"referral":{"$ref":"#/components/schemas/MessageReferral"},"order":{"$ref":"#/components/schemas/MessageOrder"},"referredProduct":{"$ref":"#/components/schemas/ReferredProduct"},"email":{"$ref":"#/components/schemas/MetaEmail"},"sms":{"$ref":"#/components/schemas/MetaSMS"},"pushNotifications":{"$ref":"#/components/schemas/MetaPushNotifications"},"navigatorId":{"$ref":"#/components/schemas/Id-2"},"navigatorMessageId":{"$ref":"#/components/schemas/Id-2"},"flow":{"$ref":"#/components/schemas/MetaFlow"},"journey":{"$ref":"#/components/schemas/MetaFlow"},"campaign":{"$ref":"#/components/schemas/MetaCampaign"}}},"MessageReferral":{"type":"object","additionalProperties":false,"properties":{"source":{"type":"string"},"title":{"type":"string","nullable":true},"text":{"type":"string","nullable":true},"group":{"type":"string","nullable":true},"metadata":{"type":"object","nullable":true,"additionalProperties":false,"properties":{"source_id":{"type":"string"},"source_url":{"type":"string","nullable":true},"media_url":{"type":"string","nullable":true},"tracking_id":{"type":"string","nullable":true}}}}},"MessageOrder":{"type":"object","additionalProperties":false,"description":"The order object contains information about the purchase order.","properties":{"products":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"externalCatalogId":{"type":"string","description":"The platform-specific catalog ID of the product."},"externalProductId":{"type":"string","description":"The platform-specific product ID."},"quantity":{"type":"integer","description":"The number of items purchased."},"price":{"type":"object","description":"The price of the product.","additionalProperties":false,"properties":{"amount":{"type":"integer"},"exponent":{"type":"integer"},"currencyCode":{"type":"string"}}}}}}}},"ReferredProduct":{"type":"object","additionalProperties":false,"description":"Referred product in an incoming message.","nullable":true,"properties":{"externalCatalogId":{"type":"string","description":"The platform-specific catalog ID of the product."},"externalProductId":{"type":"string","description":"The platform-specific product ID."}}},"MetaEmail":{"type":"object","additionalProperties":false,"properties":{"subject":{"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"from":{"type":"object","additionalProperties":false,"properties":{"username":{"type":"string","pattern":"[\\w\\d.-/+]+"},"displayName":{"type":"string"}}}}},"MetaSMS":{"type":"object","additionalProperties":false,"properties":{"smartEncoding":{"type":"boolean","description":"When enabled, attempts to transliterate Unicode characters to GSM-7 equivalents.\nIf the resulting text is fully GSM-7 compatible, fewer message segments may be required.\nThe original message body is preserved; transliteration is only applied when sending.\n"}}},"MetaPushNotifications":{"type":"object","additionalProperties":false,"properties":{"gatewayTypeOverride":{"type":"string","enum":["apns","firebase","web"]}}},"MetaFlow":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid","nullable":true},"name":{"type":"string","nullable":true},"stepId":{"type":"string","nullable":true},"runId":{"type":"string","format":"uuid","nullable":true}}},"MetaCampaign":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid","nullable":true},"name":{"type":"string","nullable":true}}},"Reference":{"type":"string","description":"A reference to the message. This can be used to identify the message in the channel.\n"},"Parts":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"platformReference":{"type":"string"}}}},"Status-3":{"type":"string","enum":["accepted","rejected","processing","scheduled","sent","sending_failed","delivered","delivery_failed","deleted","skipped"]},"Direction":{"type":"string","enum":["incoming","outgoing"]},"Origin":{"type":"object","nullable":true,"additionalProperties":false,"required":["type","id"],"properties":{"type":{"type":"string","description":"origin type of message."},"id":{"type":"string","description":"origin id of message."}}},"ReplyTo":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","description":"The ID of the message that is being replied to."},"order":{"type":"integer","description":"The order of the message in the conversation."},"type":{"type":"string","enum":["message","click","referrals"]}},"required":["id","type"]},"Failure":{"type":"object","nullable":true,"additionalProperties":false,"properties":{"code":{"type":"integer","description":"omni channel interpretation of the failure to categorise the nature of message error."},"description":{"type":"string","description":"human readable description of the error."},"source":{"type":"object","additionalProperties":false,"properties":{"code":{"type":"string","description":"numerical, text or alphanumeric code that indicates the error or issue while delivering the message in the last step."},"name":{"type":"string","description":"enum representing the step where the failure occurred. Example: # \"pre-processing\", \"accounting\", \"whatsapp\", \"email-sparkpost\", etc."}}}}},"Tags":{"type":"array","description":"Tags to associate with the message. Tags are converted to lower case and tags\nthat do not exist are automatically created. You can view your created tags\nin the UI. You can specify up to 10 tags per message.\n","maxItems":10,"items":{"$ref":"#/components/schemas/Name-3"}},"Name-3":{"type":"string","pattern":"^[a-zA-Z0-9-_ ]+$","minLength":1,"maxLength":50,"description":"Tag name. Must be between 1 and 50 characters and must only contain\nalphanumeric characters, hyphens, underscores, and spaces.\n"},"ShortLinks":{"nullable":true,"type":"object","description":"SMS link shortening options. Must be included in the request for SMS channels\nwhen `enableLinkTracking` is set to true. When using templates, please refer\nto the template level `shortLinks` instead.\n","additionalProperties":false,"required":["domain"],"properties":{"domain":{"type":"string","maxLength":128,"description":"The domain to use when shortening links. When set to `default`,\nuses the default link shortening domain for the workspace.\n"}}},"ScheduledFor":{"type":"string","format":"date-time","description":"Scheduled time to send message at. Must be formated as RFC3339 timestamp. When\nset, the message status will be `scheduled` until it's sent. Messages scheduled\nfor a time in the past or within 10 minutes of the request may be sent\nimmediately. Messages scheduled farther than 35 days will be rejected.\n"},"Body":{"type":"object","title":"MessageBody","nullable":true,"allOf":[{"type":"object","required":["type"],"properties":{"type":{"$ref":"#/components/schemas/BodyTypes"}}},{"oneOf":[{"$ref":"#/components/schemas/TypeText"},{"$ref":"#/components/schemas/TypeHTML"},{"$ref":"#/components/schemas/TypeImage"},{"$ref":"#/components/schemas/TypeFile"},{"$ref":"#/components/schemas/TypeGif"},{"$ref":"#/components/schemas/TypeLocation"},{"$ref":"#/components/schemas/TypeCarousel"},{"$ref":"#/components/schemas/TypeList"},{"$ref":"#/components/schemas/TypeSection"},{"$ref":"#/components/schemas/TypeAuthentication"},{"$ref":"#/components/schemas/TypeAction"}],"discriminator":{"propertyName":"type","mapping":{"text":"#/components/schemas/TypeText","html":"#/components/schemas/TypeHTML","image":"#/components/schemas/TypeImage","file":"#/components/schemas/TypeFile","gif":"#/components/schemas/TypeGif","location":"#/components/schemas/TypeLocation","carousel":"#/components/schemas/TypeCarousel","list":"#/components/schemas/TypeList","section":"#/components/schemas/TypeSection","authentication":"#/components/schemas/TypeAuthentication","action":"#/components/schemas/TypeAction"}}}]},"BodyTypes":{"type":"string","enum":["text","html","image","file","gif","location","carousel","list","section","authentication","template","action"]},"TypeText":{"type":"object","required":["text","type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"object","additionalProperties":false,"required":["text"],"properties":{"text":{"type":"string","minLength":1},"attachments":{"type":"array","nullable":true,"items":{"type":"object","additionalProperties":false,"required":["mediaUrl","filename"],"properties":{"mediaUrl":{"type":"string","format":"uri"},"filename":{"type":"string"},"inline":{"type":"boolean"},"contentId":{"type":"string"}}}},"actions":{"$ref":"#/components/schemas/Actions"},"metadata":{"type":"object","additionalProperties":false,"properties":{"subject":{"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"whatsapp":{"type":"object","additionalProperties":false,"properties":{"previewUrl":{"type":"boolean","description":"When set to `true`, preview will be displayed within whatsapp chat."}}},"line":{"type":"object","additionalProperties":false,"properties":{"emoji":{"type":"object","additionalProperties":false,"properties":{"items":{"type":"array","nullable":true,"items":{"type":"object","additionalProperties":false,"required":["index","productId","emojiId"],"properties":{"index":{"type":"integer"},"productId":{"type":"string"},"emojiId":{"type":"string"},"length":{"type":"integer","nullable":true,"readOnly":true}}}}}}}},"telegram":{"$ref":"#/components/schemas/MetadataTelegram"},"apple":{"$ref":"#/components/schemas/MetadataApple"}}}}}}},"Actions":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/Action"}},"Action":{"allOf":[{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["link","reply","locationRequest","buy","postback"]}}},{"oneOf":[{"$ref":"#/components/schemas/ActionLink"},{"$ref":"#/components/schemas/ActionReply"},{"$ref":"#/components/schemas/ActionLocationRequest"},{"$ref":"#/components/schemas/ActionBuy"},{"$ref":"#/components/schemas/ActionPostback"}],"discriminator":{"propertyName":"type","mapping":{"link":"#/components/schemas/ActionLink","reply":"#/components/schemas/ActionReply","locationRequest":"#/components/schemas/ActionLocationRequest","buy":"#/components/schemas/ActionBuy","postback":"#/components/schemas/ActionPostback"}}}]},"ActionLink":{"type":"object","required":["link","type"],"properties":{"type":{"type":"string","enum":["link"]},"link":{"type":"object","required":["text","url"],"properties":{"text":{"type":"string"},"url":{"anyOf":[{"type":"string","pattern":"{{[^{}]+}}"},{"type":"string","format":"uri"}]}}}}},"ActionReply":{"type":"object","required":["reply","type"],"properties":{"type":{"type":"string","enum":["reply"]},"reply":{"type":"object","properties":{"text":{"type":"string"},"imageUrl":{"type":"string"},"metadata":{"$ref":"#/components/schemas/ActionReplyMetadata"}},"required":["text"]}}},"ActionReplyMetadata":{"type":"object","properties":{"description":{"$ref":"#/components/schemas/ActionDescription"}}},"ActionDescription":{"type":"object","description":"Sets the description in the row objects for Whatsapp list messages. Only available usage for Whatsapp platform","additionalProperties":false,"properties":{"label":{"type":"string","maxLength":72}}},"ActionLocationRequest":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["locationRequest"]},"locationRequest":{"type":"object","nullable":true,"properties":{"text":{"type":"string","default":"Send location"}}}}},"ActionBuy":{"type":"object","required":["buy","type"],"properties":{"type":{"type":"string","enum":["buy"]},"buy":{"type":"object","properties":{"text":{"type":"string"},"amountCents":{"type":"integer"},"currency":{"type":"string","minLength":3,"maxLength":3}},"required":["text","amountCents","currency"]}}},"ActionPostback":{"type":"object","required":["postback","type"],"properties":{"type":{"type":"string","enum":["postback"]},"postback":{"type":"object","properties":{"text":{"type":"string"},"payload":{"type":"string"},"imageUrl":{"type":"string"},"metadata":{"$ref":"#/components/schemas/ActionPostbackMetadata"}},"required":["text"]}}},"ActionPostbackMetadata":{"type":"object","properties":{"description":{"$ref":"#/components/schemas/ActionDescription"}}},"MetadataTelegram":{"type":"object","description":"The property is specific to Telegram, indicating the markup type to be used for message formatting","additionalProperties":false,"properties":{"parseMode":{"type":"string","enum":["Markdown","MarkdownV2"]}}},"MetadataApple":{"type":"object","description":"The property is specific to Apple Business Chat, containing Apple-specific metadata","additionalProperties":false,"properties":{"summaryText":{"type":"string","description":"Summary text for Apple Business Chat messages"},"appClipPreview":{"type":"boolean","description":"Indicates if the message includes an App Clip link"},"appClipRegion":{"type":"string","description":"AppClipRegion is the ISO 3166 alpha-2 country code for the App Store region."}}},"TypeHTML":{"type":"object","required":["html","type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["html"]},"html":{"type":"object","additionalProperties":false,"anyOf":[{"required":["text"]},{"required":["html"]}],"properties":{"text":{"type":"string","minLength":1},"html":{"type":"string","minLength":1},"attachments":{"type":"array","nullable":true,"items":{"type":"object","additionalProperties":false,"anyOf":[{"required":["mediaUrl","filename"]},{"required":["content","contentType","filename"]}],"properties":{"mediaUrl":{"type":"string","format":"uri"},"filename":{"type":"string"},"inline":{"type":"boolean"},"content":{"type":"string","minLength":1},"contentType":{"type":"string","minLength":1},"contentId":{"type":"string"}}}},"actions":{"$ref":"#/components/schemas/Actions"},"metadata":{"type":"object","additionalProperties":false,"properties":{"subject":{"type":"string"},"emailFrom":{"type":"object","additionalProperties":false,"properties":{"username":{"type":"string","pattern":"[\\w\\d.-/+]+"},"displayName":{"type":"string"}}},"headers":{"type":"object","additionalProperties":{"type":"string"}},"initialOpenTracking":{"type":"boolean"},"clickTracking":{"type":"boolean"},"openTracking":{"type":"boolean"}}}}}}},"TypeImage":{"type":"object","required":["image","type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["image"]},"image":{"type":"object","additionalProperties":false,"required":["images"],"properties":{"text":{"type":"string"},"images":{"type":"array","minLength":1,"items":{"type":"object","additionalProperties":false,"required":["mediaUrl"],"properties":{"mediaUrl":{"type":"string","format":"uri","minLength":1},"altText":{"type":"string"}}}},"metadata":{"type":"object","properties":{"subject":{"type":"string","description":"The property is specific mms file, shows the subject of the mms."},"fallbackText":{"type":"string","description":"The property is specific mms file, when a mms is not supported, it will fallback to show content with the fallbackText."},"storyType":{"type":"string","description":"The property is specific instagram file, shows the story type."},"telegram":{"$ref":"#/components/schemas/MetadataTelegram"}}},"actions":{"$ref":"#/components/schemas/Actions"}}}}},"TypeFile":{"type":"object","required":["file","type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["file"]},"file":{"type":"object","additionalProperties":false,"required":["files"],"properties":{"text":{"type":"string"},"files":{"type":"array","minLength":1,"items":{"type":"object","additionalProperties":false,"required":["mediaUrl","contentType"],"properties":{"mediaUrl":{"type":"string","format":"uri","minLength":1},"contentType":{"type":"string","minLength":1},"filename":{"type":"string"},"altText":{"type":"string"},"metadata":{"type":"object","properties":{"isAnimated":{"type":"boolean","description":"The property is specific the sticker file, shows that if the sticker is animated or not."}}}}}},"metadata":{"type":"object","properties":{"subject":{"type":"string","description":"The property is specific mms file, shows the subject of the mms."},"fallbackText":{"type":"string","description":"The property is specific mms file, when a mms is not supported, it will fallback to show content with the fallbackText."},"storyType":{"type":"string","description":"The property is specific instagram file, shows the story type."},"telegram":{"$ref":"#/components/schemas/MetadataTelegram"}}},"actions":{"$ref":"#/components/schemas/Actions"}}}}},"TypeGif":{"type":"object","required":["gif","type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["gif"]},"gif":{"type":"object","additionalProperties":false,"required":["mediaUrl"],"properties":{"text":{"type":"string"},"mediaUrl":{"type":"string","format":"uri","minLength":1},"altText":{"type":"string"},"actions":{"$ref":"#/components/schemas/Actions"},"metadata":{"type":"object","properties":{"telegram":{"$ref":"#/components/schemas/MetadataTelegram"}}}}}}},"TypeLocation":{"type":"object","required":["location","type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["location"]},"location":{"type":"object","additionalProperties":false,"required":["coordinates"],"properties":{"coordinates":{"type":"object","additionalProperties":false,"properties":{"latitude":{"type":"number","format":"float","minimum":-90,"maximum":90},"longitude":{"type":"number","format":"float","minimum":-180,"maximum":180}}},"location":{"type":"object","additionalProperties":false,"properties":{"address":{"type":"string"},"label":{"type":"string"}}}}}}},"TypeCarousel":{"type":"object","required":["carousel","type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["carousel"]},"carousel":{"type":"object","additionalProperties":false,"required":["items"],"properties":{"text":{"type":"string","description":"Optional text displayed above the carousel cards","maxLength":1024},"items":{"$ref":"#/components/schemas/Items"}}}}},"Items":{"type":"array","nullable":true,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string"},"mediaUrl":{"type":"string","format":"uri","nullable":true},"description":{"type":"string"},"altText":{"type":"string"},"actions":{"$ref":"#/components/schemas/Actions"}}}},"TypeList":{"type":"object","required":["list","type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["list"]},"list":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string"},"text":{"type":"string"},"altText":{"type":"string"},"items":{"$ref":"#/components/schemas/Items"},"actions":{"$ref":"#/components/schemas/Actions"},"metadata":{"type":"object","properties":{"button":{"type":"object","description":"Sets a button name for whatsapp list messages. Only available usage for Whatsapp platform","additionalProperties":false,"properties":{"label":{"type":"string","maxLength":20}}},"replyMessage":{"type":"object","description":"Sets the reply message to be used when a list item is picked. Used for Apple Business Chat.","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":512},"text":{"type":"string","maxLength":512}}}}}},"required":["text"]}}},"TypeSection":{"type":"object","required":["section","type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["section"]},"section":{"type":"object","additionalProperties":false,"properties":{"items":{"type":"array","items":{"minLength":1,"$ref":"#/components/schemas/SectionBody"}},"configurations":{"type":"object","additionalProperties":{"type":"string"}}}}}},"SectionBody":{"type":"object","title":"MessageBody","allOf":[{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["text","image","file","gif","location","carousel","list","section"]}}},{"oneOf":[{"$ref":"#/components/schemas/TypeText"},{"$ref":"#/components/schemas/TypeImage"},{"$ref":"#/components/schemas/TypeFile"},{"$ref":"#/components/schemas/TypeGif"},{"$ref":"#/components/schemas/TypeLocation"},{"$ref":"#/components/schemas/TypeCarousel"},{"$ref":"#/components/schemas/TypeList"},{"$ref":"#/components/schemas/TypeSectionNested"}],"discriminator":{"propertyName":"type","mapping":{"text":"#/components/schemas/TypeText","image":"#/components/schemas/TypeImage","file":"#/components/schemas/TypeFile","gif":"#/components/schemas/TypeGif","location":"#/components/schemas/TypeLocation","carousel":"#/components/schemas/TypeCarousel","list":"#/components/schemas/TypeList","section":"#/components/schemas/TypeSectionNested"}}}]},"TypeSectionNested":{"type":"object","required":["section","type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["section"]},"section":{"type":"object","additionalProperties":false,"properties":{"items":{"type":"array","items":{"minLength":1,"$ref":"#/components/schemas/SectionBodyNested"}},"configurations":{"type":"object","properties":{"default":{"type":"string"}},"additionalProperties":{"type":"string"}}}}}},"SectionBodyNested":{"type":"object","title":"MessageBody","allOf":[{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["text","image","file","gif","location","carousel","list"]}}},{"oneOf":[{"$ref":"#/components/schemas/TypeText"},{"$ref":"#/components/schemas/TypeImage"},{"$ref":"#/components/schemas/TypeFile"},{"$ref":"#/components/schemas/TypeGif"},{"$ref":"#/components/schemas/TypeLocation"},{"$ref":"#/components/schemas/TypeCarousel"},{"$ref":"#/components/schemas/TypeList"}],"discriminator":{"propertyName":"type","mapping":{"text":"#/components/schemas/TypeText","image":"#/components/schemas/TypeImage","file":"#/components/schemas/TypeFile","gif":"#/components/schemas/TypeGif","location":"#/components/schemas/TypeLocation","carousel":"#/components/schemas/TypeCarousel","list":"#/components/schemas/TypeList"}}}]},"TypeAuthentication":{"type":"object","required":["authentication","type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["authentication"]},"authentication":{"type":"object","additionalProperties":false,"properties":{"otp":{"type":"object","additionalProperties":false,"required":["disclaimer"],"properties":{"disclaimer":{"type":"boolean","description":"Whether to add a security disclaimer to the authentication body.","nullable":false},"expirationTime":{"type":"integer","minimum":1,"maximum":90,"nullable":true,"description":"The number of seconds after which the authentication body will expire. If not set, no expiration notification will be sent."},"actions":{"$ref":"#/components/schemas/Actions"}}}}}}},"TypeAction":{"type":"object","required":["type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["permission_request"]},"permission_request":{"type":"object","required":["resource"],"properties":{"resource":{"type":"string","enum":["call"]}}}}},"Template":{"type":"object","nullable":true,"additionalProperties":false,"properties":{"name":{"type":"string","description":"The platform name of the template."},"projectId":{"type":"string","description":"the ID of the project from the project from Studio"},"version":{"type":"string","description":"The version of the template."},"locale":{"type":"string","format":"locale-bcp47"},"attachments":{"type":"array","nullable":true,"items":{"type":"object","additionalProperties":false,"required":["mediaUrl","filename"],"properties":{"mediaUrl":{"type":"string","format":"uri","description":"The URL of the attachment."},"filename":{"type":"string","description":"The filename of the attachment."},"inline":{"type":"boolean"}}}},"shortLinks":{"nullable":true,"type":"object","description":"SMS link shortening options.","properties":{"enabled":{"type":"boolean","description":"Enables link shortening for SMS messages."},"domain":{"type":"string","description":"The domain to use when shortening links. When set to `default`,\nuses the default link shortening domain for the workspace.\n"}}},"variables":{"nullable":true,"deprecated":true,"description":"Deprecated: Use `parameters` instead (string parameter for variables). This property is maintained for backward compatibility but will be removed in a future version.\n","type":"object","properties":{"default":{"type":"string"}},"additionalProperties":{"type":"string"}},"utmParameters":{"nullable":true,"type":"array","description":"The list of UTM parameters.","minItems":1,"maxItems":8,"items":{"oneOf":[{"type":"object","required":["key","value"],"additionalProperties":false,"properties":{"key":{"type":"string","description":"The name of the parameter in the query string.","minLength":1,"maxLength":20},"value":{"type":"string","description":"The static value of the parameter. Mutually exclusive with Reference.","minLength":1,"maxLength":100}}},{"type":"object","required":["key","reference"],"additionalProperties":false,"properties":{"key":{"type":"string","description":"The name of the parameter in the query string.","minLength":1,"maxLength":20},"reference":{"type":"string","description":"The reference to a dynamic value. Mutually exclusive with Value.","enum":["platform_name","channel_name"]}}}]}},"parameters":{"nullable":true,"type":"array","minLength":1,"items":{"$ref":"#/components/schemas/TemplateParameter"}},"settings":{"nullable":true,"type":"object","properties":{"disallowMmLite":{"type":"boolean","nullable":true,"description":"This is specific for WhatsApp marketing templates and requires MM Lite to be disabled for the WABAID.\n"}}}}},"TemplateParameter":{"oneOf":[{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["string"]},"key":{"type":"string","minLength":1},"value":{"type":"string"}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["number"]},"key":{"type":"string","minLength":1},"value":{"type":"number"}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["boolean"]},"key":{"type":"string","minLength":1},"value":{"type":"boolean"}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["object"]},"key":{"type":"string","minLength":1},"value":{"type":"object","additionalProperties":true}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["sectionList"]},"key":{"type":"string","minLength":1},"value":{"type":"object","required":["sections"],"additionalProperties":false,"properties":{"sections":{"$ref":"#/components/schemas/Sections"}}}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["timeslotList"]},"key":{"type":"string","minLength":1},"value":{"type":"object","required":["timeslots"],"additionalProperties":false,"properties":{"timeslots":{"$ref":"#/components/schemas/Timeslots"}}}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["productSections"]},"key":{"type":"string","minLength":1},"value":{"type":"object","required":["productSections"],"additionalProperties":false,"properties":{"productSections":{"$ref":"#/components/schemas/ProductSections"}}}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["productList"]},"key":{"type":"string","minLength":1},"value":{"type":"object","required":["products"],"additionalProperties":false,"properties":{"products":{"$ref":"#/components/schemas/ProductList"}}}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["shippingMethodList"]},"key":{"type":"string","minLength":1},"value":{"type":"object","required":["shippingMethods"],"additionalProperties":false,"properties":{"shippingMethods":{"$ref":"#/components/schemas/AppleShippingMethods"}}}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["lineItemList"]},"key":{"type":"string","minLength":1},"value":{"type":"object","required":["lineItems"],"additionalProperties":false,"properties":{"lineItems":{"$ref":"#/components/schemas/AppleLineItems"}}}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["whatsappProductSections"]},"key":{"type":"string","minLength":1},"value":{"type":"object","required":["sections"],"additionalProperties":false,"properties":{"sections":{"$ref":"#/components/schemas/WhatsappProductSections"}}}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["whatsappProductItems"]},"key":{"type":"string","minLength":1},"value":{"type":"object","required":["products"],"additionalProperties":false,"properties":{"products":{"type":"array","items":{"$ref":"#/components/schemas/WhatsappProductItem"}}}}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["carouselCards"]},"key":{"type":"string","minLength":1},"value":{"type":"object","required":["cards"],"additionalProperties":false,"properties":{"cards":{"type":"array","items":{"$ref":"#/components/schemas/WhatsappCarouselCard"}}}}}},{"type":"object","additionalProperties":false,"required":["type","key"],"properties":{"type":{"type":"string","enum":["appleFormPageItems"]},"key":{"type":"string","minLength":1},"value":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"$ref":"#/components/schemas/AppleFormPageItems"}}}}}]},"Sections":{"type":"array","nullable":true,"items":{"type":"object","additionalProperties":false,"required":["title","items"],"properties":{"id":{"type":"string","nullable":true},"multipleSelection":{"type":"boolean"},"title":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/ReplyAction"}}}}},"ReplyAction":{"type":"object","required":["type","replyAction"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["reply-action"]},"reference":{"type":"string"},"role":{"type":"string"},"hidden":{"type":"boolean"},"replyAction":{"type":"object","properties":{"text":{"type":"string"},"imageUrl":{"type":"string"},"payload":{"type":"string"},"subTitle":{"type":"string"}},"required":["text"]}}},"Timeslots":{"type":"array","nullable":false,"items":{"type":"object","additionalProperties":false,"required":["startTime","duration"],"properties":{"id":{"type":"string","nullable":true},"startTime":{"type":"string","format":"date-time"},"duration":{"type":"number"}}}},"ProductSections":{"type":"array","nullable":false,"items":{"type":"object","additionalProperties":false,"required":["title","products"],"properties":{"title":{"type":"string","minLength":1,"maxLength":24},"products":{"type":"array","items":{"$ref":"#/components/schemas/Product"}}}}},"Product":{"type":"object","additionalProperties":false,"required":["externalProductId"],"properties":{"externalProductId":{"type":"string"},"amount":{"type":"string"},"text":{"type":"string"}}},"ProductList":{"type":"array","nullable":false,"items":{"type":"object","additionalProperties":false,"required":["type","product"],"properties":{"type":{"type":"string","enum":["product"]},"product":{"$ref":"#/components/schemas/Product"}}}},"AppleShippingMethods":{"type":"array","nullable":true,"items":{"type":"object","additionalProperties":false,"required":["amount","label","identifier","detail"],"properties":{"amount":{"type":"string"},"label":{"type":"string"},"identifier":{"type":"string"},"detail":{"type":"string"}}}},"AppleLineItems":{"type":"array","nullable":true,"items":{"type":"object","additionalProperties":false,"required":["amount","text"],"properties":{"amount":{"type":"string"},"text":{"type":"string"},"type":{"type":"string","enum":["pending","final"]}}}},"WhatsappProductSections":{"type":"array","nullable":false,"items":{"$ref":"#/components/schemas/WhatsappProductSection"}},"WhatsappProductSection":{"type":"object","additionalProperties":false,"required":["type","whatsappProductSection"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["whatsapp-product-section"]},"reference":{"type":"string"},"role":{"type":"string"},"hidden":{"type":"boolean"},"whatsappProductSection":{"type":"object","additionalProperties":false,"required":["title","products"],"properties":{"title":{"type":"string","minLength":1,"maxLength":24},"products":{"type":"array","items":{"$ref":"#/components/schemas/WhatsappProductItem"}}}}}},"WhatsappProductItem":{"type":"object","additionalProperties":false,"required":["type","whatsappProductItem"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["whatsapp-product-item"]},"reference":{"type":"string"},"role":{"type":"string"},"hidden":{"type":"boolean"},"whatsappProductItem":{"type":"object","additionalProperties":false,"required":["externalProductId"],"properties":{"externalProductId":{"type":"string"}}}}},"WhatsappCarouselCard":{"type":"object","additionalProperties":false,"required":["type","whatsappCarouselCard"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["whatsapp-carousel-card"]},"reference":{"type":"string"},"role":{"type":"string"},"hidden":{"type":"boolean"},"whatsappCarouselCard":{"type":"object","additionalProperties":false,"required":["header","body","actions"],"properties":{"header":{"oneOf":[{"type":"object","additionalProperties":false,"required":["type","image"],"properties":{"type":{"type":"string","enum":["image"]},"image":{"type":"object","additionalProperties":false,"required":["mediaUrl"],"properties":{"mediaUrl":{"type":"string"},"altText":{"type":"string"}}}}},{"type":"object","additionalProperties":false,"required":["type","file"],"properties":{"type":{"type":"string","enum":["file"]},"file":{"type":"object","additionalProperties":false,"required":["mediaUrl"],"properties":{"mediaUrl":{"type":"string"},"contentType":{"type":"string"}}}}}]},"body":{"type":"object","additionalProperties":false,"required":["type","text"],"properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"object","additionalProperties":false,"required":["text"],"properties":{"text":{"type":"string"}}}}},"actions":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["type","linkAction"],"properties":{"type":{"type":"string","enum":["link-action"]},"linkAction":{"type":"object","additionalProperties":false,"required":["text","url"],"properties":{"text":{"type":"string"},"url":{"type":"string"}}}}},"minItems":1,"maxItems":1,"description":"Session carousels only support one link action per card."}}}}},"AppleFormPageItems":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["identifier","title","value"],"properties":{"identifier":{"type":"string","description":"Unique identifier for the item"},"title":{"type":"string","description":"Display text shown to the user"},"value":{"type":"string","description":"Value submitted when the item is selected"},"imageUrl":{"type":"string","nullable":true,"description":"Optional URL of an image to display alongside the item title"},"nextPageIdentifier":{"type":"string","nullable":true,"description":"Identifier of the next page to navigate to when this item is selected"}}}},"RequestError":{"type":"object","properties":{"code":{"type":"string","description":"A unique code that identifies the error. This code can be used to programmatically identify the error.\n"},"message":{"type":"string","description":"A human-readable message that describes the error. An example is 'The requested resource does not exist: channel not found'.\n"}},"required":["code","message"]}},"responses":{"requestError":{"description":"The request did not pass validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestError"}}}}}},"paths":{"/workspaces/{workspaceId}/channels/{channelId}/messages/{messageId}":{"get":{"summary":"Get message by message ID","operationId":"getChannelMessage","description":"Get a channel message","tags":["channel_message"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"404":{"$ref":"#/components/responses/requestError"}}}}}}
```

### Retrieve all message interactions on a message

## List message interactions

> List message interactions

```json
{"openapi":"3.0.3","info":{"title":"Channels","version":"v1"},"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 (e.g., 'Authorization: AccessKey AbCdEfGhIjKlMnOpQrStUvWxYzAbCdEfGhIj')","scheme":"AccessKey","type":"http"}},"schemas":{"MessageInteractionsList":{"type":"object","title":"ChannelMessageInteractionsList","description":"A list of channel messages interactions","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/MessageInteraction"}}}},"MessageInteraction":{"type":"object","title":"ChannelMessageInteraction","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"messageId":{"type":"string","format":"uuid"},"channelId":{"type":"string","format":"uuid"},"platformId":{"type":"string"},"messagePartId":{"nullable":true,"type":"string","format":"uuid","deprecated":true},"type":{"type":"string","enum":["clicked","delete-request","invalid","opened","read","reported-as-spam","unsubscribe-request","reaction","conversion","subscribe-request","subscribe-consent"]},"messageReference":{"type":"string"},"messagePartsCount":{"type":"number"},"messageTags":{"nullable":true,"type":"array","items":{"type":"string"}},"receiver":{"oneOf":[{"$ref":"#/components/schemas/Connector"},{"$ref":"#/components/schemas/Contacts"}]},"createdAt":{"type":"string","format":"date-time"},"details":{"type":"string"},"context":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}}}},"metadata":{"description":"Metadata is a free-form object that can be used to store any additional information such as platform specific information\n","type":"object","additionalProperties":true,"properties":{"link":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string"}}},"button":{"properties":{"payload":{"type":"string"}}},"reaction":{"type":"object","properties":{"emoji":{"type":"string"},"action":{"type":"string"}}},"conversion":{"type":"object","additionalProperties":false,"properties":{"type":{"type":"string"},"status":{"type":"string"},"method":{"type":"string"},"timestamp":{"type":"string","format":"date-time"}}},"prefetched":{"type":"boolean"}}}}},"Connector":{"type":"object","title":"ChannelConnector","additionalProperties":false,"properties":{"connector":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"identifierValue":{"type":"string"},"annotations":{"$ref":"#/components/schemas/MessageAnnotations"},"types":{"type":"array","items":{"type":"string"}}},"required":["id"]}},"required":["connector"]},"MessageAnnotations":{"type":"object","title":"MessageAnnotations","description":"Annotations are used to add additional information to a message.\nFor email messages, it can be used to specify a custom sender name.\n","additionalProperties":false,"properties":{"name":{"type":"string"}}},"Contacts":{"type":"object","title":"ChannelContacts","additionalProperties":false,"properties":{"contacts":{"type":"array","minLength":1,"items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string"},"identifierKey":{"type":"string"},"identifierValue":{"type":"string"},"type":{"type":"string"},"countryCode":{"type":"string"},"identifiers":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"identifierKey":{"type":"string"},"identifierValue":{"type":"string"}}}},"platformAddress":{"type":"string"},"platformAddressSelector":{"type":"string","nullable":true},"annotations":{"type":"object","additionalProperties":true,"properties":{"name":{"type":"string"}}}}}}},"required":["contacts"]},"RequestError":{"type":"object","properties":{"code":{"type":"string","description":"A unique code that identifies the error. This code can be used to programmatically identify the error.\n"},"message":{"type":"string","description":"A human-readable message that describes the error. An example is 'The requested resource does not exist: channel not found'.\n"}},"required":["code","message"]}},"responses":{"requestError":{"description":"The request did not pass validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestError"}}}}}},"paths":{"/workspaces/{workspaceId}/channels/{channelId}/messages/{messageId}/interactions":{"get":{"summary":"List message interactions","operationId":"listChannelMessageInteractions","description":"List message interactions","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageInteractionsList"}}}},"404":{"$ref":"#/components/responses/requestError"}}}}}}
```

## Retrieving media

### Retrieve pre-signed media uploads

For media that you have [uploaded](#uploading-media) to be sent in a channels message you can retrieve this as follows

#### Example

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

```bash
curl -L -X GET "https://media.api.bird.com/workspaces/42263973-4f1c-40db-bf0e-cea7e4bfa1a2/media/d30aee15-6ac6-408c-89b6-2906df15ca7b" \
-H "Authorization: AccessKey abcd" \
--output downloadimage.jpeg
```

{% endtab %}
{% endtabs %}

### Retrieve media from incoming messages

For media sent to your channel you can download this media from the following endpoint

The endpoint is in the message under mediaUrl.

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

```bash
curl -L -X GET "https://media.api.bird.com/workspaces/{workspaceId}/messages/{messageID}/media/{fileId}" \
-H "Authorization: AccessKey abcd" \
--output downloadimage.jpeg
```

{% endtab %}
{% endtabs %}
