{ "openapi": "3.0.0", "info": { "title": "Business Messaging API", "version": "1", "description": "This API is for sending messages in Messaging Apps like WhatsApp, Viber, RCS and Line. It also provides the ability to manage templates and export logs.", "contact": { "name": "8x8 Inc", "url": "https://cpaas.8x8.com", "email": "cpaas-support@8x8.com" }, "termsOfService": "https://cpaas.8x8.com/sg/terms-and-conditions/" }, "servers": [ { "url": "https://chatapps.8x8.com", "description": "Asia-Pacific region" }, { "url": "https://chatapps.us.8x8.com", "description": "North America region" }, { "url": "https://chatapps.8x8.uk", "description": "Europe region" }, { "url": "https://chatapps.8x8.id", "description": "Indonesia region" } ], "tags": [ { "name": "Send Message API" }, { "name": "Send Message Event API" }, { "name": "Management API" }, { "name": "Reporting API" }, { "name": "Webhook Configuration API" }, { "name": "File Upload API" } ], "paths": { "/api/v1/subaccounts/{subAccountId}/messages": { "parameters": [ { "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1lon/parameters/0" } ], "post": { "responses": { "200": { "description": "Success response", "content": { "application/json": { "schema": { "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1lon/post/responses/200/content/application~1json/schema" }, "examples": { "response": { "value": { "umid": "82188ee0-109f-e811-8150-020897df5459", "user": { "msisdn": "+6512341234" }, "clientMessageId": "1234_id", "status": { "state": "queued", "timestamp": "2021-01-04T08:19:45.99Z" } } } } } } }, "400": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1webhooks/get/responses/400" }, "401": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1webhooks/get/responses/401" }, "500": { "$ref": "#/paths/~1files~1%7Bfilename%7D/get/responses/500" } }, "operationId": "Send-Message", "summary": "Send message", "tags": [ "Send Message API" ], "parameters": [ { "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1lon/parameters/0" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "example": { "user": { "msisdn": "+6500000000", "channelUserId": "US.13491208655302741918" }, "clientMessageId": "1234_id", "type": "Image", "content": { "text": "Welcome to Singapore!", "url": "https://pbs.twimg.com/media/Dd8E0yjV0AYdxd4.jpg", "fallbackText": "We tried to send an image - but Welcome to Singapore", "sms": { "encoding": "AUTO", "source": "SENDERID" } } }, "properties": { "user": { "type": "object", "description": "User information\n", "title": "User", "properties": { "msisdn": { "type": "string", "description": "Mobile phone number (MSISDN) to send the message to. International phone number format with '+ sign prefered. In addition we support national (local) phone numbers, please set `country` field to use it.", "example": "+6500000000" }, "country": { "type": "string", "maxLength": 2, "description": "Default country code (like 'sg', 'uk') for national phone numbers format. You don't need it if `msisdn` in E.164 format (with '+' sign at the beginning)", "example": "SG" }, "lineUserId": { "type": "string", "description": "LINE user ID of the recipient. Use this instead of `msisdn` when sending messages to a LINE user via the Line Official Account channel.", "example": "Ua12b345678c1de0fg1a1234567891011" }, "channelUserId": { "type": "string", "description": "WhatsApp Business-Scoped User ID (BSUID) of the recipient. Format: `.` (country code must be uppercase). Can be used alongside `msisdn`; if both are provided, `msisdn` takes precedence.", "example": "US.13491208655302741918" } } }, "clientMessageId": { "type": "string", "description": "Client managed id for the message : your own unique reference", "maxLength": 50, "example": "abc-123" }, "type": { "type": "string", "enum": [ "text", "audio", "video", "image", "location", "file", "interactive", "template", "carousel", "richCard" ], "description": "Messaging Apps message content type.\nAllowed values are \"text\", \"image\", \"audio\", \"video\", \"file\", \"location\", \"interactive\", \"template\", \"carousel\" and \"richCard\".\n- If the type is \"text\", then content object should contain a \"text\" parameter.\n- If the type is \"image\", \"audio\", \"video\" or \"file\", then content object should contain a \"url\" parameter and all other parameters can be used.\n- If the type is \"location\", then content object should contain a \"latitude\", \"longitude\" parameters.\n- If the type is \"interactive\", then content object should contain an \"interactive\" parameter.\n- If the type is \"template\", then content object should contain a \"template\" parameter.\n- If the type is \"carousel\", then content object should contain a \"carousel\" parameter. Supported for RCS channel only.\n- If the type is \"richCard\", then content object should contain a \"richCard\" parameter. Supported for RCS channel only.", "example": "Text", "title": "Content type" }, "content": { "type": "object", "description": "Content of the message", "title": "Content", "properties": { "text": { "type": "string", "description": "Message body - the text of the message\n", "maxLength": 35000, "example": "Hello" }, "whatsApp": { "type": "object", "description": "WhatsApp-specific message settings. Only applies when the message is delivered via the WhatsApp channel.", "title": "WhatsApp settings", "properties": { "directSend": { "type": "object", "description": "WhatsApp Direct Send settings. When this object is present, the message is sent using the WhatsApp Direct Send API instead of a pre-created template. Direct Send allows you to send business-initiated utility messages without pre-creating a template; matching templates are auto-generated and managed on your behalf.\n\nDirect Send supports the following message subset:\n- `text` messages.\n- `interactive` messages of type `cta_url`, with a single Call-to-Action URL button defined via `interactive.action.parameters`.\n- `interactive` messages of type `button` (Reply Buttons), with 1–3 buttons.\n- For `interactive` messages, only `text` headers are supported.", "title": "WhatsApp Direct Send settings", "properties": { "category": { "type": "string", "description": "Required. Indicates the category of the message to be sent as an auto-generated template. Currently only `utility` is supported; messages will be charged at utility rates.", "enum": [ "utility" ], "example": "utility" }, "ttlSeconds": { "type": "integer", "description": "Optional Time-to-live (TTL) in seconds for the message. If the message cannot be delivered within this window, it is dropped. Defaults to 30 days. Minimum 30 seconds, maximum 43200 seconds (12 hours).", "minimum": 30, "maximum": 43200, "example": 600 } }, "required": [ "category" ] } } }, "url": { "type": "string", "description": "Public URL of where the rich content is stored.", "format": "uri", "example": "http://example.com" }, "fallbackText": { "type": "string", "description": "In case SMS fallback is triggered, message body - the text of the message", "maxLength": 35000, "example": "you can check your account by http://example.com" }, "sms": { "type": "object", "description": "If the SMS fallback is triggered, here are the SMS settings", "properties": { "encoding": { "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1lon/post/requestBody/content/application~1json/schema/properties/smsFallback/properties/encoding" }, "source": { "type": "string", "description": "Source number (SenderId) - \"From\" field for SMS. Max length 16 chars.", "maxLength": 16, "example": "Info" } }, "title": "SMS content settings" }, "location": { "type": "object", "description": "Location object. Required for \"location\" type", "properties": { "latitude": { "type": "number", "example": 12.345, "description": "Latitude" }, "longitude": { "type": "number", "example": 12.345, "description": "Longitude" }, "name": { "type": "string", "example": "Pablo Morales", "description": "Text that will appear below the generic map at the top of the message" }, "address": { "type": "string", "example": "1 Hacker Way, Menlo Park, CA 94025", "description": "Address that will appear below the generic map at the top of the message" } }, "required": [ "latitude", "longitude" ], "title": "Location data" }, "interactive": { "type": "object", "description": "This is an interactive message. Type and Action are required properties", "properties": { "type": { "type": "string", "example": "button", "enum": [ "button", "list", "product", "product_list", "cta_url", "flow", "call_permission_request", "request_contact_info", "voice_call", "location_request_message" ], "description": "The type of interactive message you want to send." }, "action": { "type": "object", "description": "Action you want the user to perform after reading the message.", "properties": { "button": { "type": "string", "description": "Required for List Messages.\n\nButton content. It cannot be an empty string and must be unique within the message. Emojis are supported, markdown is not.", "maxLength": 20 }, "buttons": { "type": "array", "description": "Required for Reply Buttons.", "maxItems": 3, "uniqueItems": true, "items": { "type": "object", "properties": { "type": { "type": "string", "example": "reply", "enum": [ "reply" ], "description": "Type of button" }, "reply": { "type": "object", "description": "The id and title properties are required.", "properties": { "id": { "type": "string", "maxLength": 256, "description": "Unique identifier for your button. This ID is returned in the webhook when the button is clicked by the user." }, "title": { "type": "string", "description": "Button title. It cannot be an empty string and must be unique within the message. Emojis are supported, markdown is not.", "maxLength": 20 } } } } } }, "catalog_id": { "type": "string", "description": "Required for Single Product Messages and Multi-Product Messages.\n\nUnique identifier of the Facebook catalog linked to your WhatsApp Business Account." }, "product_retailer_id": { "type": "string", "description": "Required for Single Product Messages and Multi-Product Messages.\n\nUnique identifier of the product in a catalog." }, "name": { "type": "string", "description": "Required to be `send_location` for Location Request Message." }, "sections": { "type": "array", "minItems": 1, "maxItems": 10, "description": "Array of section objects. ", "items": { "type": "object", "properties": { "rows": { "type": "array", "description": "Required for List Messages.\n\nContains a list of rows. You can have a total of 10 rows across your sections.\n\nThe id and title properties are required.", "items": { "type": "object", "properties": { "id": { "type": "string", "maxLength": 200 }, "title": { "type": "string", "maxLength": 24 }, "description": { "type": "string", "maxLength": 72 } } } }, "product_items": { "type": "array", "description": "Required for Multi-Product Messages.\n\nArray of product objects. There is a minimum of 1 product per section and a maximum of 30 products across all sections.", "items": { "type": "object", "properties": { "product_retailer_id": { "type": "string", "description": "Required for Multi-Product Messages. Unique identifier of the product in a catalog. The product_retailer_id property is required." } } } }, "title": { "type": "string", "maxLength": 24, "description": "Required if the message has more than one section.\n\nTitle of the section." } } } }, "parameters": { "type": "object", "description": "Required for Call-to-Action Url (`cta_url`) and `voice_call` messages.", "properties": { "display_text": { "type": "string", "description": "CTA Url button label text. For `voice_call`, this is the label shown on the call button. Optional; defaults to \"Call Now\" if omitted. Max 20 characters.", "maxLength": 20 }, "ttlMinutes": { "type": "integer", "description": "Optional for `voice_call` only. Overrides the template-level TTL at send time. Must be between 1 min and 43200 mins (30 days). Defaults to 10080 (7 days) if omitted.", "minimum": 1, "maximum": 43200, "default": 10080, "example": 10 }, "payload": { "type": "string", "description": "Optional for `voice_call`. Customer-defined payload. Max 512 characters.", "maxLength": 512 }, "url": { "type": "string", "description": "URL to load in the device's default web browser when tapped by user." }, "flowId": { "type": "string", "description": "Required for Flow messages. Unique ID of the Flow provided by WhatsApp.", "example": "859504979861628" }, "flowCta": { "type": "string", "description": "Required for Flow messages. Text on the CTA button. For example: \"Signup\". CTA text length is advised to be 30 characters or less (no emoji).", "maxLength": 30, "example": "Get Recommendations" }, "flowAction": { "type": "string", "description": "Optional for Flow messages. Either \"navigate\" or \"data_exchange\". Defaults to \"navigate\" if not provided.", "enum": [ "navigate", "data_exchange" ], "default": "navigate", "example": "navigate" }, "flowActionPayload": { "type": "object", "description": "Optional for Flow messages. Should only be used when flowAction is \"navigate\". Should be omitted otherwise.", "properties": { "screen": { "type": "string", "description": "Optional. The ID of the screen displayed first. It needs to be an entry screen. Defaults to \"FIRST_ENTRY_SCREEN\" if not provided.", "default": "FIRST_ENTRY_SCREEN", "example": "RECOMMEND" }, "data": { "type": "object", "description": "Optional. Input data for the first Screen of the Flow. If provided, this must be a non-empty object. Defaults to null if not provided.", "additionalProperties": true, "example": { "product_id": "12345", "user_name": "John Doe", "campaign_id": "summer_sale_2024" } } } } } } } }, "header": { "type": "object", "description": "Header content displayed on top of a message. You cannot set a header if your interactive object is of product and location request message type.", "properties": { "document": { "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1messages/post/requestBody/content/application~1json/schema/properties/content/properties/interactive/properties/header/properties/text" }, "image": { "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1messages/post/requestBody/content/application~1json/schema/properties/content/properties/interactive/properties/header/properties/text" }, "text": { "type": "object", "properties": { "id": { "type": "string", "description": "Required when type is audio, document, image, sticker, or video and you are not using a link.\n\nThe media object ID. Do not use this field when message type is set to text." }, "link": { "type": "string", "description": "Required when type is audio, document, image, sticker, or video and you are not using an uploaded media ID (i.e. you are hosting the media asset on your server).\n\nThe protocol and URL of the media to be sent. Use only with HTTP/HTTPS URLs." }, "caption": { "type": "string", "description": "Describes the specified image, document, or video media.\n\n\nDo not use with audio or sticker media." }, "filename": { "type": "string", "description": "Describes the filename for the specific document. Use only with document media.\n\nThe extension of the filename will specify what format the document is displayed as in WhatsApp." }, "provider": { "type": "string", "deprecated": true, "description": "This path is optionally used with a link when the HTTP/HTTPS link is not directly accessible and requires additional configurations like a bearer token." } }, "description": "" }, "type": { "type": "string", "example": "text", "enum": [ "text", "video", "image", "document" ], "description": "The header type you would like to use. The type property is required." }, "video": { "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1messages/post/requestBody/content/application~1json/schema/properties/content/properties/interactive/properties/header/properties/text" } } }, "body": { "type": "object", "description": "Optional for type 'product', 'call_permission_request', and 'request_contact_info'. Required for other message types.\n\nAn object with the body of the message.", "properties": { "text": { "type": "string", "description": "The content of the message. Emojis and markdown are supported. The text property is required.", "maxLength": 1024 } } }, "footer": { "type": "object", "description": "An object with the footer of the message. You cannot set a footer for location request message type", "properties": { "text": { "type": "string", "maxLength": 60, "description": "The footer content. Emojis, markdown, and links are supported. The text property is required." } } } } }, "video": { "type": "object", "description": "Video object. Required for \"video\" type", "properties": { "thumbnail": { "type": "string", "example": "http://example.com/video.jpg", "description": "ThumbNail" }, "filesize": { "type": "number", "example": 120, "description": "Video File Size (in bytes)" }, "duration": { "type": "number", "example": 10, "description": "Duration of video (in seconds)" } }, "title": "Video data" }, "image": { "type": "object", "description": "Image object. Used for Line channel to specify thumbnail for image messages.", "properties": { "thumbnail": { "type": "string", "example": "https://www.example.com/thumbnail.jpg", "description": "URL of the thumbnail preview image" } }, "title": "Image data" }, "audio": { "type": "object", "description": "Audio object. Used for Line channel to specify duration for audio messages.", "properties": { "duration": { "type": "number", "example": 300, "description": "Duration of audio in seconds" } }, "required": [ "duration" ], "title": "Audio data" }, "template": { "type": "object", "description": "Template data. Mandatory for \"template\" message type", "properties": { "name": { "type": "string", "description": "Template name to use", "example": "auto_reply_message_en_us" }, "language": { "type": "string", "description": "Template language code to use", "example": "en_US" }, "components": { "type": "array", "description": "List of template components", "items": { "type": "object", "properties": { "type": { "type": "string", "default": "body", "description": "Component type. Possible values are \"header\", \"footer\", \"body\", \"button\", \"carousel\", \"call_permission_request\", \"request_contact_info\"", "enum": [ "header", "footer", "body", "button", "carousel", "call_permission_request", "request_contact_info" ] }, "parameters": { "type": "array", "description": "Parameters list to use for template placeholders.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "Parameter type.\nPossible values are \"text\", \"image\", \"gif\", \"video\", \"document\", \"location\", \"payload\", \"couponCode\", \"action\", \"ttlMinutes\".\n\nUse \"payload\" type to define the payload that will be returned when the button in the interactive message is clicked.\nUse \"action\" type for Flow button parameters.\nUse \"ttlMinutes\" for VoiceCall button only — overrides the template-level TTL at send time. Using ttlMinutes on any other subtype returns an error.\n", "enum": [ "text", "image", "gif", "video", "document", "location", "payload", "couponCode", "action", "ttlMinutes" ] }, "text": { "type": "string", "example": "To be or not to be", "description": "Text for \"text\" parameter type" }, "url": { "type": "string", "description": "Required for \"image\", \"gif\", \"video\", \"document\" parameter types.\n\nResource URL.
Note: For type = gif, the url must point to a [Video file type](/connect/docs/supported-chat-apps-content-type), not a .gif.", "example": "http://example.com" }, "location": { "type": "object", "description": "Required for \"location\" parameter type.\n\nLocation object.", "properties": { "latitude": { "type": "number", "description": "Latitude", "example": 12.345 }, "longitude": { "type": "number", "example": 12.345, "description": "Longitude" }, "name": { "type": "string", "example": "Pablo Morales", "description": "Text that will appear below the generic map at the top of the message" }, "address": { "type": "string", "example": "1 Hacker Way, Menlo Park, CA 94025", "description": "Address that will appear below the generic map at the top of the message" } } }, "payload": { "type": "string", "description": "Required for \"payload\" type.\n\nCustomer-defined payload that will be returned when the button in the interactive message is clicked." }, "couponCode": { "type": "string", "description": "Required for \"couponCode\" type.\n\nThe coupon code to be copied when the customer taps the button." }, "flowActionData": { "type": "object", "description": "Optional for \"action\" type.\n\nFlow action data for Flow button parameters.", "properties": { "screen": { "type": "string", "description": "Optional. The ID of the screen displayed first. It needs to be an entry screen. Should only be used when flow_action is navigate, and should be omitted otherwise. Defaults to \"FIRST_ENTRY_SCREEN\" if not provided.", "default": "FIRST_ENTRY_SCREEN", "example": "RECOMMEND" }, "data": { "type": "object", "description": "Optional. Input data for the first Screen of the Flow. If provided, this must be a non-empty object. Defaults to null if not provided.", "additionalProperties": true, "example": { "productId": "12345", "userName": "John Doe", "campaignId": "summer_sale_2024" } } } }, "ttlMinutes": { "type": "integer", "description": "Required for \"ttlMinutes\" parameter type (VoiceCall subtype only).\n\nOverrides the template-level TTL at send time. Must be between 1 min and 43200 mins (30 days). Defaults to 10080 (7 days) if omitted.\n\nNote: When creating a template, the minimum is 1440 (1 day). When sending, the minimum is 1 (1 minute).", "minimum": 1, "maximum": 43200, "default": 10080, "example": 2 } }, "required": [ "type" ] } }, "index": { "type": "integer", "minimum": 0, "maximum": 9, "description": "Required for \"button\" type.\n\nPosition index of the button\nYou can use index values from 0 to 9 to create up to 10 buttons.\nHowever, the Url button type allows a maximum of 2 buttons", "default": 0 }, "subType": { "type": "string", "description": "Required for \"button\" type.\n\nType of button being created\nValues: QuickReply, Url, CopyCode, Flow, VoiceCall.\n\nFor VoiceCall, the `parameters` array is optional. All other subtypes require at least one parameter.", "enum": [ "QuickReply", "Url", "CopyCode", "Flow", "VoiceCall" ] }, "cards": { "type": "array", "description": "Required for \"carousel\" type.", "items": { "type": "object", "properties": { "cardIndex": { "type": "integer", "minimum": 0, "maximum": 9, "description": "Index of the card in the carousel." }, "components": { "type": "array", "description": "List of card components", "items": { "type": "object", "properties": { "type": { "type": "string", "default": "body", "description": "Component type. Possible values are \"header\", \"body\", \"button\"", "enum": [ "header", "body", "button" ] }, "parameters": { "type": "array", "description": "Parameters list to use for template placeholders.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "Parameter type.\nPossible values are \"text\", \"image\", \"video\", \"document\", \"location\", \"payload\", \"couponCode\".\n\nUse \"payload\" type to define the payload that will be returned when the button in the interactive message is clicked.\n", "enum": [ "text", "image", "video", "document", "location", "payload", "couponCode" ] }, "text": { "type": "string", "example": "To be or not to be", "description": "Text for \"text\" parameter type" }, "url": { "type": "string", "description": "Required for \"image\", \"video\", \"document\" parameter types.\n\nResource URL.", "example": "http://example.com" }, "location": { "type": "object", "description": "Required for \"location\" parameter type.\n\nLocation object.", "properties": { "latitude": { "type": "number", "description": "Latitude", "example": 12.345 }, "longitude": { "type": "number", "example": 12.345, "description": "Longitude" }, "name": { "type": "string", "example": "Pablo Morales", "description": "Text that will appear below the generic map at the top of the message" }, "address": { "type": "string", "example": "1 Hacker Way, Menlo Park, CA 94025", "description": "Address that will appear below the generic map at the top of the message" } } }, "payload": { "type": "string", "description": "Required for \"payload\" type.\n\nCustomer-defined payload that will be returned when the button in the interactive message is clicked." }, "couponCode": { "type": "string", "description": "Required for \"couponCode\" type.\n\nThe coupon code to be copied when the customer taps the button." } }, "required": [ "type" ] } }, "index": { "type": "integer", "minimum": 0, "maximum": 1, "description": "Required for \"button\" type.\n\nPosition index of the button\nYou can use index values from 0 to 1 to populate up to 2 buttons.", "default": 0 }, "subType": { "type": "string", "description": "Required for \"button\" type.\n\nType of button being created\nValues: QuickReply, Url.", "enum": [ "QuickReply", "Url" ] } } } } } } } } } } } }, "richCard": { "type": "object", "description": "RCS Rich Card message content. Required when type is \"richCard\". Supported for RCS channel only.", "title": "RCS Rich Card", "properties": { "cardOrientation": { "type": "string", "description": "Orientation of the card.", "enum": [ "horizontal", "vertical" ], "example": "vertical" }, "thumbnailImageAlignment": { "type": "string", "description": "Alignment of the thumbnail image. Applicable for horizontal cards.", "enum": [ "left", "right" ], "example": "right" }, "title": { "type": "string", "description": "Title of the rich card.", "maxLength": 200 }, "description": { "type": "string", "description": "Description of the rich card.", "maxLength": 2000 }, "media": { "$ref": "#/components/schemas/RcsCardMedia" }, "suggestions": { "type": "array", "description": "List of suggested actions or replies for the rich card.", "maxItems": 4, "items": { "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1messages/post/requestBody/content/application~1json/schema/properties/content/properties/suggestions/items" } } }, "required": [ "cardOrientation", "media" ] }, "carousel": { "type": "object", "description": "RCS Carousel message content. Required when type is \"carousel\". Supported for RCS channel only.", "title": "RCS Carousel", "properties": { "cardWidth": { "type": "string", "description": "The width of the cards in the carousel.", "enum": [ "small", "medium" ], "example": "medium" }, "cards": { "type": "array", "description": "List of rich card items in the carousel. Minimum 2 cards, maximum 10 cards.", "minItems": 2, "maxItems": 10, "items": { "type": "object", "description": "A single rich card in the carousel.", "properties": { "title": { "type": "string", "description": "Title of the card.", "maxLength": 200 }, "description": { "type": "string", "description": "Description of the card.", "maxLength": 2000 }, "media": { "$ref": "#/components/schemas/RcsCardMedia" }, "suggestions": { "type": "array", "description": "List of suggested actions or replies for the card.", "maxItems": 4, "items": { "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1messages/post/requestBody/content/application~1json/schema/properties/content/properties/suggestions/items" } } }, "required": [ "media" ] } } }, "required": [ "cardWidth", "cards" ] }, "suggestions": { "type": "array", "description": "List of suggestioned actions that can be taken by the user for the message", "maxItems": 10, "items": { "description": "Suggestion object. You can only specific either reply or action, not both.", "type": "object", "properties": { "reply": { "description": "Suggest a reply to the message", "type": "object", "properties": { "text": { "description": "Text content of the reply", "type": "string", "maxLength": 25 }, "postbackData": { "type": "string", "description": "The base64-encoded payload that the agent receives in a user event when the user taps the suggested reply.", "maxLength": 2048 } }, "required": [ "text", "postbackData" ] }, "action": { "description": "Suggest an action to the message. Only one of the following properties can be specified: dialAction, viewLocationAction, createCalendarEventAction, openUrlAction.", "allOf": [ { "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1messages/post/requestBody/content/application~1json/schema/properties/content/properties/suggestions/items/properties/reply" }, { "type": "object", "properties": { "fallbackUrl": { "type": "string", "description": "URL that will open in a new window if a mobile device doesn't support a suggested action." }, "dialAction": { "type": "object", "description": "Opens the device's default phone app with the specified phone number filled in.", "properties": { "phoneNumber": { "description": "Phone number to dial, in E.164 format.", "type": "string" } }, "required": [ "phoneNumber" ] }, "viewLocationAction": { "type": "object", "description": "Opens the device's default map app and selects the specified location or searches around the device's location given an agent-specified query.", "properties": { "latLong": { "description": "The latitude and longitude of the specified location.", "type": "object", "properties": { "latitude": { "type": "number", "description": "The latitude in degrees.", "minimum": -90, "maximum": 90 }, "longitude": { "type": "number", "description": "The longitude in degrees.", "minimum": -180, "maximum": 180 } }, "required": [ "latitude", "longitude" ] }, "label": { "description": "Text label of the location opened.", "type": "string", "maxLength": 100 }, "query": { "type": "string", "maxLength": 200, "description": "(Optional, only supported on Android Messages clients) Rather than specify a latLong (and optionally, a label), the agent can instead specify a query string. \nFor default map apps that support search functionality (including Google Maps), tapping this suggested action results in a location search centered around the user's current location. \nIf the query is sufficiently specific, then agents can use it to select any location in the world.\n" } } }, "createCalendarEventAction": { "type": "object", "description": "Opens the device's default calendar app and creates a new calendar event prefilled with the event data.", "properties": { "title": { "type": "string", "description": "Event title.", "maxLength": 100 }, "description": { "type": "string", "description": "Event description.", "maxLength": 500 }, "startTime": { "type": "string", "description": "Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than \"Z\" are also accepted. \nExamples: \"2014-10-02T15:01:23Z\", \"2014-10-02T15:01:23.045123456Z\" or \"2014-10-02T15:01:23+05:30\".\n" }, "endTime": { "type": "string", "description": "Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than \"Z\" are also accepted. \nExamples: \"2014-10-02T15:01:23Z\", \"2014-10-02T15:01:23.045123456Z\" or \"2014-10-02T15:01:23+05:30\".\n" } }, "required": [ "title", "startTime", "endTime" ] }, "openUrlAction": { "type": "object", "description": "Opens the specified URL.", "properties": { "url": { "type": "string", "description": "URL. Must be a valid URI as defined in RFC 3986.", "maxLength": 2048 }, "application": { "description": "URL open application, browser or webview. To check whether a user's device supports webview mode, run a capability check first. \nSee the documentation for details: https://developers.google.com/business-communications/rcs-business-messaging/guides/build/capabilities.\n", "type": "string", "enum": [ "OPEN_URL_APPLICATION_UNSPECIFIED", "BROWSER", "WEBVIEW" ], "default": "OPEN_URL_APPLICATION_UNSPECIFIED" }, "webviewViewMode": { "description": "View mode for webview", "type": "string", "enum": [ "OPEN_URL_WEBVIEW_VIEW_MODE_UNSPECIFIED", "FULL", "HALF", "TALL" ], "default": "FULL" }, "description": { "type": "string", "maxLength": 2048, "description": "Accessibility description for webview." } }, "required": [ "url" ] } } } ] } } } } } }, "scheduled": { "type": "string", "description": "Date and time when a schedule delivery of the message must happen", "format": "date-time" }, "expiry": { "type": "string", "description": "Message Expiry date-time object. If message is not delivered before specified time, it should be trashed", "format": "date-time" }, "dlrCallbackUrl": { "type": "string", "description": "Override default DR callback URL for the message", "format": "uri" }, "channels": { "type": "array", "description": "Channel fallback override", "items": { "type": "object", "description": "Override default Channel fallback configuration", "properties": { "channel": { "type": "string", "description": "Messaging Apps Channel enumeration", "enum": [ "SMS", "WhatsApp", "Facebook", "RCS", "Viber", "Line", "WeChat", "Zalo", "Instagram" ], "example": "WhatsApp", "title": "Channel type" }, "fallbackAfter": { "type": "integer", "description": "Specify the amount of time in seconds, after which message should be sent to next fallback channel, if not delivered to current one.\nMaximum: 1 day", "minimum": 10, "maximum": 86400 }, "successStatus": { "type": "string", "description": "Enumeration of Success Delivery status", "enum": [ "Accepted", "Sent", "Delivered", "Read" ], "example": "Delivered", "title": "Success status" } }, "required": [ "channel" ], "title": "Channel override" } }, "context": { "type": "object", "description": "Contextual replies object. This allows you to reply to a specific message in a conversation thread. You can reply to messages up to 7 days old. Only supported for WhatsApp messages.\n\nFor more information and limitations, see [WhatsApp Contextual Replies documentation](https://developers.facebook.com/documentation/business-messaging/whatsapp/messages/contextual-replies#limitations).", "properties": { "umid": { "type": "string", "description": "The unique message ID (umid) of the message you want to reply to. This can be the umid from an inbound message (received from the recipient) or an outbound message (previously sent by you). This creates a quoted reply in WhatsApp, showing the original message above your response.", "example": "aa7c29ad-4433-2211-9c8b-00004e2b9ecc" } }, "required": [ "umid" ], "title": "Context object" } }, "required": [ "user", "type", "content" ], "description": "Messaging Apps API: request model for send single message", "title": "Single message request" }, "examples": { "whatsAppText": { "summary": "WhatsApp Message - Text Message", "value": { "user": { "msisdn": "+6500000000", "channelUserId": "US.13491208655302741918" }, "content": { "text": "Welcome to the world of 8x8 Messaging Apps APIs!\\nCommunications for the customer obsessed." }, "type": "text" } }, "whatsAppImageWithText": { "summary": "WhatsApp Message - Image with Text", "value": { "user": { "msisdn": "+6500000000", "channelUserId": "US.13491208655302741918" }, "content": { "url": "https://www.example.com/image.jpg", "text": "Welcome to the world of 8x8 Messaging Apps APIs!\\nCommunications for the customer obsessed." }, "type": "Image" } }, "whatsAppTemplateTextOnly": { "summary": "WhatsApp Template Message - Text", "value": { "user": { "msisdn": "+650000000", "channelUserId": "US.13491208655302741918" }, "type": "template", "content": { "template": { "language": "en_GB", "name": "", "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "12345" } ] }, { "type": "Button", "subType": "url", "index": 0, "parameters": [ { "type": "text", "text": "12345" } ] } ] } } } }, "whatsAppAuthenticationTemplate": { "summary": "WhatsApp Template Message - Authentication", "value": { "user": { "msisdn": "+650000000", "channelUserId": "US.13491208655302741918" }, "type": "template", "content": { "template": { "name": "", "language": "en", "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "12345" } ] }, { "type": "Button", "subType": "url", "index": 0, "parameters": [ { "type": "text", "text": "12345" } ] } ] } } } }, "whatsAppTemplateWithImage": { "summary": "WhatsApp Template Message - Image", "value": { "user": { "msisdn": "+6500000000", "channelUserId": "US.13491208655302741918" }, "type": "template", "content": { "template": { "language": "en", "name": "", "components": [ { "type": "header", "parameters": [ { "type": "image", "url": "www.example.com/image.jpg" } ] } ] } } } }, "whatsAppTemplateWithLocation": { "summary": "WhatsApp Template Message - Location", "value": { "user": { "msisdn": "+6500000000", "channelUserId": "US.13491208655302741918" }, "type": "template", "content": { "template": { "language": "en", "name": "", "components": [ { "type": "header", "parameters": [ { "type": "location", "location": { "latitude": "38.8693", "longitude": "-77.0536", "name": "Metro Station", "address": "1 Connector Drive" } } ] } ] } } } }, "whatsAppDynamicCTAButtonTemplate": { "summary": "WhatsApp Template Message - Click to Action Button", "value": { "user": { "msisdn": "+6500000000", "channelUserId": "US.13491208655302741918" }, "type": "template", "content": { "template": { "name": "", "language": "en_US", "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "12345" } ] }, { "type": "header", "parameters": [ { "type": "image", "url": "https://fastly.picsum.photos/id/173/200/300.jpg?hmac=9Ed5HxHOL3tFCOiW6UHx6a3hVksxDWc7L7p_WzN9N9Q" } ] }, { "type": "button", "index": 0, "subType": "url", "parameters": [ { "type": "text", "text": "samplecta" } ] } ] } } } }, "whatsAppCouponCodeTemplate": { "summary": "WhatsApp Template Message - Coupon Code Button", "value": { "user": { "msisdn": "+6500000000", "channelUserId": "US.13491208655302741918" }, "type": "template", "content": { "template": { "language": "en_US", "name": "", "components": [ { "type": "button", "index": "0", "subType": "copyCode", "parameters": [ { "type": "couponCode", "couponCode": "25OFF" } ] } ] } } } }, "whatsAppQuickReplyTemplate": { "summary": "WhatsApp Template Message - Quick Reply Button with payload", "value": { "user": { "msisdn": "+6500000000", "channelUserId": "US.13491208655302741918" }, "type": "template", "content": { "template": { "language": "en_US", "name": "", "components": [ { "type": "button", "index": "0", "subType": "quickreply", "parameters": [ { "type": "payload", "payload": "sample-payload" } ] } ] } } } }, "whatsAppMediaCarouselTemplate": { "summary": "WhatsApp Template Message - Media Carousel with 2 cards", "value": { "user": { "msisdn": "+6500000000", "channelUserId": "US.13491208655302741918" }, "type": "template", "content": { "template": { "language": "en_US", "name": "", "components": [ { "type": "carousel", "cards": [ { "cardIndex": 0, "components": [ { "type": "header", "parameters": [ { "type": "image", "url": "https://fastly.picsum.photos/id/173/200/300.jpg?hmac=9Ed5HxHOL3tFCOiW6UHx6a3hVksxDWc7L7p_WzN9N9Q" } ] }, { "type": "button", "index": 0, "subType": "url", "parameters": [ { "type": "text", "text": "samplecta" } ] } ] }, { "cardIndex": 1, "components": [ { "type": "header", "parameters": [ { "type": "image", "url": "https://fastly.picsum.photos/id/173/200/300.jpg?hmac=9Ed5HxHOL3tFCOiW6UHx6a3hVksxDWc7L7p_WzN9N9Q" } ] }, { "type": "button", "index": 0, "subType": "url", "parameters": [ { "type": "text", "text": "samplecta" } ] } ] } ] } ] } } } }, "whatsAppFlowTemplate": { "summary": "WhatsApp Template Message - Media Carousel with 2 cards", "value": { "user": { "msisdn": "+6500000000", "channelUserId": "US.13491208655302741918" }, "type": "template", "content": { "template": { "language": "en_US", "name": "", "components": [ { "type": "button", "subType": "flow", "index": 0, "parameters": [ { "type": "action" } ] } ] } } } }, "whatsAppCallPermissionTemplate": { "summary": "WhatsApp Template Message - Call Permission Request", "value": { "user": { "msisdn": "+6500000000", "channelUserId": "US.13491208655302741918" }, "type": "template", "content": { "template": { "language": "en_US", "name": "" } } } }, "whatsAppRequestContactInfoTemplate": { "summary": "WhatsApp Template Message - Request Contact Info", "value": { "user": { "channelUserId": "US.13491208655302741918" }, "type": "template", "content": { "template": { "language": "en_US", "name": "" } } } }, "whatsAppVoiceCallTemplate": { "summary": "WhatsApp Template Message - Voice Call Button", "value": { "user": { "msisdn": "+6500000000", "channelUserId": "US.13491208655302741918" }, "type": "template", "content": { "template": { "language": ">", "name": "", "components": [ { "type": "button", "subType": "VoiceCall", "index": 0, "parameters": [ { "type": "ttlMinutes", "ttlMinutes": 1440 }, { "type": "payload", "payload": "payload data" } ] } ] } } } }, "whatsAppInteractiveMessageReplyButtons": { "summary": "WhatsApp Interactive Message - Quick Reply Buttons", "value": { "user": { "msisdn": "+6500000000", "channelUserId": "US.13491208655302741918" }, "type": "interactive", "content": { "interactive": { "action": { "buttons": [ { "type": "reply", "reply": { "title": "contact-us", "id": "option-1" } }, { "type": "reply", "reply": { "title": "faq", "id": "option-2" } }, { "type": "reply", "reply": { "title": "office", "id": "option-3" } } ] }, "body": { "text": "Welcome to 8x8 Inc. How may we help?" }, "footer": { "text": "This is an official message from 8x8." }, "header": { "type": "text", "text": "8x8 Inc." }, "type": "button" } } } }, "whatsAppInteractiveMessageCtaUrl": { "summary": "WhatsApp Interactive Message - Call-to-Action Url Button", "value": { "user": { "msisdn": "+6500000000", "channelUserId": "US.13491208655302741918" }, "type": "interactive", "content": { "interactive": { "action": { "parameters": { "display_text": "Click for more", "url": "https://developers.facebook.com/docs/whatsapp/cloud-api/messages/interactive-cta-url-messages" } }, "body": { "text": "Welcome to 8x8 Inc. How may we help?" }, "footer": { "text": "This is an official message from 8x8." }, "header": { "type": "text", "text": "8x8 Inc." }, "type": "cta_url" } } } }, "whatsAppDirectSendText": { "summary": "WhatsApp Direct Send - Text Message (Utility)", "value": { "user": { "msisdn": "+6500000000", "channelUserId": "US.13491208655302741918" }, "type": "text", "channels": [ { "channel": "WhatsApp" } ], "content": { "text": "Hi Jane, your order #12345 has been shipped and is expected to arrive on March 20.", "whatsApp": { "directSend": { "category": "utility", "ttlSeconds": 600 } } } } }, "whatsAppDirectSendInteractiveCtaUrl": { "summary": "WhatsApp Direct Send - Interactive Message with CTA URL Button", "value": { "user": { "msisdn": "+6500000000", "channelUserId": "US.13491208655302741918" }, "type": "interactive", "channels": [ { "channel": "WhatsApp" } ], "content": { "whatsApp": { "directSend": { "category": "utility" } }, "interactive": { "type": "cta_url", "header": { "type": "text", "text": "Order #12345" }, "body": { "text": "Your order has been shipped. Tap below to track your package." }, "footer": { "text": "Thank you for shopping with 8x8." }, "action": { "parameters": { "display_text": "Track Order", "url": "https://www.example.com/track/12345" } } } } } }, "whatsAppDirectSendInteractiveReplyButtons": { "summary": "WhatsApp Direct Send - Interactive Message with Reply Buttons", "value": { "user": { "msisdn": "+6500000000", "channelUserId": "US.13491208655302741918" }, "type": "interactive", "channels": [ { "channel": "WhatsApp" } ], "content": { "whatsApp": { "directSend": { "category": "utility" } }, "interactive": { "type": "button", "header": { "type": "text", "text": "Appointment Reminder" }, "body": { "text": "Your appointment is scheduled for tomorrow at 3 PM. Would you like to confirm or reschedule?" }, "footer": { "text": "Reply within 24 hours." }, "action": { "buttons": [ { "type": "reply", "reply": { "id": "confirm", "title": "Confirm" } }, { "type": "reply", "reply": { "id": "reschedule", "title": "Reschedule" } } ] } } } } }, "whatsAppInteractiveMessageMenuOptions": { "summary": "WhatsApp Interactive Message - Scheduling Menu", "value": { "user": { "msisdn": "+6500000000", "channelUserId": "US.13491208655302741918" }, "type": "interactive", "content": { "interactive": { "action": { "button": "Book Slot", "sections": [ { "rows": [ { "id": "slot-1", "title": "Monday, Oct 9", "description": "9:00 AM - 10:00 AM" }, { "id": "slot-2", "title": "Monday, Oct 9", "description": "11:00 AM - 12:00 PM" } ], "title": "Oct 9, 2024" }, { "rows": [ { "id": "slot-3", "title": "Tuesday, Oct 10", "description": "2:00 PM - 3:00 PM" }, { "id": "slot-4", "title": "Tuesday, Oct 10", "description": "4:00 PM - 5:00 PM" } ], "title": "Oct 10, 2024" } ] }, "body": { "text": "Looking for personalized assistance? Our Customer Success team has the following slots available. Tap to select a time." }, "footer": { "text": "For urgent inquiries, email cpaas-support@8x8.com" }, "header": { "type": "text", "text": "Customer Success personalized sessions" }, "type": "list" } } } }, "whatsAppInteractiveMessageSingleProduct": { "summary": "WhatsApp Interactive Message - Single Product", "value": { "user": { "msisdn": "+6500000000", "channelUserId": "US.13491208655302741918" }, "type": "interactive", "content": { "interactive": { "action": { "catalog_id": "", "product_retailer_id": "" }, "body": { "text": "8x8 Shirt" }, "footer": { "text": "Experience the power of communication with this 8x8 Shirt!" }, "type": "product" } } } }, "whatsAppInteractiveMessageProductList": { "summary": "WhatsApp Interactive Message - Catalog of Products", "value": { "user": { "msisdn": "+6500000000", "channelUserId": "US.13491208655302741918" }, "type": "interactive", "content": { "interactive": { "action": { "catalog_id": "", "product_retailer_id": "", "sections": [ { "product_items": [ { "product_retailer_id": "" }, { "product_retailer_id": "" } ], "title": "Section title" } ] }, "body": { "text": "8x8 Limited Edition Items" }, "footer": { "text": "This collection contains only the finest from 8x8." } } } } }, "whatsAppInteractiveMessageFlowButton": { "summary": "WhatsApp Interactive Message - Catalog of Products", "value": { "user": { "msisdn": "+6500000000", "channelUserId": "US.13491208655302741918" }, "type": "interactive", "content": { "interactive": { "type": "flow", "header": { "type": "text", "text": "Customer Feedback!" }, "body": { "text": "Your feedback ensures we continually improove. Please click below to share your thoughts on your recent visit. Thank you in advance!" }, "action": { "parameters": { "flowId": "", "flowCta": "Share Feedback" } }, "footer": { "text": "We appreciate your support!" } } } } }, "whatsAppInteractiveMessageCallPermissionRequest": { "summary": "WhatsApp Interactive Message - Call Permission Request", "value": { "user": { "msisdn": "+6500000000", "channelUserId": "US.13491208655302741918" }, "type": "interactive", "content": { "interactive": { "type": "call_permission_request", "body": { "text": "We would like to call you to help support your query." } } } } }, "whatsAppInteractiveMessageRequestContactInfo": { "summary": "WhatsApp Interactive Message - Request Contact Info", "value": { "user": { "channelUserId": "US.13491208655302741918" }, "type": "interactive", "content": { "interactive": { "type": "request_contact_info", "body": { "text": "We request you to kindly share your contact info for further processing." } } } } }, "whatsAppInteractiveVoiceCall": { "summary": "WhatsApp Interactive Message - Voice Call", "value": { "user": { "msisdn": "+6500000000", "channelUserId": "US.13491208655302741918" }, "type": "interactive", "content": { "interactive": { "type": "voice_call", "action": { "name": "voice_call", "parameters": { "display_text": "Click to Call", "ttlMinutes": 10, "payload": "payload data" } }, "body": { "text": "You can call us on WhatsApp now for faster service" } } } } }, "whatsAppInteractiveLocationRequestMessage": { "summary": "WhatsApp Interactive Message - Location Request Message", "value": { "user": { "msisdn": "+6500000000", "channelUserId": "US.13491208655302741918" }, "type": "interactive", "content": { "interactive": { "type": "location_request_message", "action": { "name": "send_location" }, "body": { "text": "Please share your location or enter your pickup address." } } } } }, "whatsAppTextContextualReply": { "summary": "WhatsApp Message - Text Message With Contextual Reply", "value": { "user": { "msisdn": "+6500000000", "channelUserId": "US.13491208655302741918" }, "content": { "text": "Yes bro, we see the chess board." }, "type": "text", "context": { "umid": "aa7c29ad-4433-2211-9c8b-00004e2b9ecc" } } }, "viberTextMessage": { "summary": "Viber Text Message - URL", "value": { "user": { "msisdn": "+6500000" }, "type": "text", "content": { "text": "Here is your booking reference: ABC1234. For more information, visit https://8x8.com/1234!" } } }, "viberRichMediaImage": { "summary": "Viber Rich Media Message - Image", "value": { "user": { "msisdn": "+6500000" }, "type": "image", "content": { "url": "https://www.redbrick.sg/wp-content/uploads/2020/04/coleen-rivas-OZ2rS2zCjNo-unsplash-1125x1500.jpg" } } }, "viberRichMediaVideo": { "summary": "Viber Rich Media Message - Video", "value": { "user": { "msisdn": "+6500000" }, "type": "video", "content": { "url": "https://samplelib.com/lib/preview/mp4/sample-5s.mp4", "video": { "filesize": "2700", "duration": "5", "thumbnail": "https://sample-videos.com/img/Sample-jpg-image-50kb.jpg" } } } }, "viberRichMediaFile": { "summary": "Viber Rich Media Message - File", "value": { "user": { "msisdn": "+6500000" }, "type": "file", "content": { "url": "https://www.clickdimensions.com/links/TestPDFfile.pdf" } } }, "viberRichMediaTextButton": { "summary": "Viber Rich Media Message - Text and Call-to-action button", "value": { "user": { "msisdn": "+6500000" }, "type": "buttons", "content": { "text": "Hello Jessie,\\n\\nYour order #420007 has been processed and is now ready for pickup at our MBS store. \\n\\nFor your convenience, the store is open from 9am to 9pm. We look forward to seeing you!\\n\\nBest,\\nThe Snackbar Team", "button": { "caption": "Get Directions to Store", "action": "https://maps.google.com/?q=Your+Store+Location" } } } }, "viberRichMediaTextImage": { "summary": "Viber Rich Media Message - Text and Image", "value": { "user": { "msisdn": "+650000" }, "type": "buttons", "content": { "text": "Hello Mr Jobs,\\n\\nDont miss our upcoming summer sale! Starting next Monday, enjoy up to 20% off on selected apple-based products.\\n\\nBest,\\nThe Grocerio Team", "url": "https://www.abc.net.au/reslib/201408/r1320712_18276029.jpg", "button": { "caption": "", "action": "" } } } }, "viberRichMediaTextImageButton": { "summary": "Viber Rich Media Message - Text, Image, and Call-to-action button", "value": { "user": { "msisdn": "+6500000" }, "type": "buttons", "content": { "text": "🎉 Successful Purchase! 🎉\\n\\nHello Ana,\\n\\nThank you for purchasing your Singapore OCBC Skyway ticket! Your ticket is now confirmed and ready for use.\\n\\n📅 Date: October 15, 2023\\n⏰ Time: 3:00 PM - 4:00 PM\\n🎫 Ticket ID: SKY98723\\n\\nTo view your e-ticket, click the button below.", "url": "https://www.redbrick.sg/wp-content/uploads/2020/04/coleen-rivas-OZ2rS2zCjNo-unsplash-1125x1500.jpg", "button": { "caption": "View E-ticket", "action": "https://ocbcskyway.com/e-ticket/SKY1234" } } } }, "zaloNotificationSampleMessage": { "summary": "Zalo Template Message - Text", "value": { "user": { "msisdn": "+84123456789" }, "clientMessageId": "", "type": "template", "content": { "template": { "name": "", "language": "en", "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "Ana" }, { "type": "text", "text": "Messaging Apps" }, { "type": "text", "text": "24 August 2023" }, { "type": "text", "text": "29012398" } ] } ] } } } }, "zaloNotificationOTPMessage": { "summary": "Zalo Template Message - OTP", "value": { "user": { "msisdn": "+84123456789" }, "clientMessageId": "", "type": "template", "content": { "template": { "name": "", "language": "en", "components": [ { "type": "body", "parameters": [ { "type": "text", "name": "otp", "text": "23124" } ] } ] } } } }, "rcsTextMessageWithReplySuggestions": { "summary": "RCS Text Message with Reply Suggestions", "value": { "user": { "msisdn": "+84123456789" }, "type": "text", "content": { "text": "Hello! How can I help you today?", "suggestions": [ { "reply": { "text": "I need help", "postbackData": "help_request" } } ] } } }, "rcsTextMessageWithActionsSuggestions": { "summary": "RCS Text Message with Actions Suggestions", "value": { "user": { "msisdn": "+84123456789" }, "type": "text", "content": { "text": "Hello! How can I help you today?", "suggestions": [ { "action": { "text": "Call us", "postbackData": "call_action", "dialAction": { "phoneNumber": "+1234567890" } } }, { "action": { "text": "Visit website", "postbackData": "website_action", "openUrlAction": { "url": "https://example.com", "application": "BROWSER", "webviewViewMode": "FULL", "description": "Visit our website" } } }, { "action": { "text": "View location", "postbackData": "location_action", "viewLocationAction": { "latLong": { "latitude": 37.7749, "longitude": -122.4194 }, "label": "Our Office" } } } ] } } }, "rcsCarousel": { "summary": "RCS Carousel Message", "value": { "user": { "msisdn": "+84123456789" }, "type": "carousel", "content": { "carousel": { "cardWidth": "medium", "cards": [ { "title": "Catamaran day-trip", "description": "Snorkel, sushi, & sunset cocktails. $99, 6 spots left!", "media": { "height": "short", "contentInfo": { "fileUrl": "https://www.example.com/image.jpg", "thumbnailUrl": "https://www.example.com/image.jpg", "forceRefresh": false } }, "suggestions": [ { "action": { "text": "Buy now", "postbackData": "buy_catamaran", "openUrlAction": { "url": "https://example.com", "application": "WEBVIEW", "webviewViewMode": "FULL", "description": "Buy catamaran day-trip" } } }, { "reply": { "text": "More details", "postbackData": "details_catamaran" } } ] }, { "title": "Jungle ATV tour", "description": "Explore off-road with an expert guide. $99, limited spots!", "media": { "height": "short", "contentInfo": { "fileUrl": "https://www.example.com/image.jpg", "thumbnailUrl": "https://www.example.com/image.jpg", "forceRefresh": false } }, "suggestions": [ { "action": { "text": "Buy now", "postbackData": "buy_atv_tour", "openUrlAction": { "url": "https://example.com", "application": "WEBVIEW", "webviewViewMode": "FULL", "description": "Buy jungle ATV tour" } } }, { "reply": { "text": "More details", "postbackData": "details_atv_tour" } } ] } ] }, "suggestions": [ { "reply": { "text": "Check my orders", "postbackData": "check_my_orders" } }, { "reply": { "text": "Not interested", "postbackData": "not_interested" } } ] } } }, "rcsRichCardVertical": { "summary": "RCS Rich Card - Vertical", "value": { "user": { "msisdn": "+84123456789" }, "type": "richCard", "content": { "richCard": { "cardOrientation": "vertical", "title": "Hey Melissa! New year, new shoes? 👟", "description": "Check out our latest arrivals, including the AirPulse, perfect for your next run! Plus, get a free gait analysis with any purchase this week.", "media": { "height": "short", "contentInfo": { "fileUrl": "https://www.example.com/image.jpg", "thumbnailUrl": "https://www.example.com/image.jpg", "forceRefresh": false } }, "suggestions": [ { "reply": { "text": "🛍️ View new arrivals", "postbackData": "view_new_arrivals" } }, { "reply": { "text": "📋 Book Gait Analysis", "postbackData": "book_gait_analysis" } }, { "action": { "text": "👗 Shop now", "postbackData": "shop_now", "openUrlAction": { "url": "https://example.com", "application": "WEBVIEW", "webviewViewMode": "FULL", "description": "Shop Bridgepoint Runners" } } } ] }, "suggestions": [ { "reply": { "text": "Check my orders", "postbackData": "check_my_orders" } }, { "reply": { "text": "Not interested", "postbackData": "not_interested" } } ] } } }, "rcsRichCardHorizontal": { "summary": "RCS Rich Card - Horizontal", "value": { "user": { "msisdn": "+84123456789" }, "type": "richCard", "content": { "richCard": { "cardOrientation": "horizontal", "thumbnailImageAlignment": "right", "title": "Your reservation at Ebi", "description": "We're springing into action to get your table ready for 5:00 PM! 🕔 Have any questions before you arrive?", "media": { "contentInfo": { "fileUrl": "https://www.example.com/image.jpg", "thumbnailUrl": "https://www.example.com/image.jpg", "forceRefresh": false } }, "suggestions": [ { "action": { "text": "Ebi location", "postbackData": "ebi_location", "viewLocationAction": { "latLong": { "latitude": 37.7749, "longitude": -122.4194 }, "label": "Ebi Restaurant" } } }, { "action": { "text": "Call us", "postbackData": "call_ebi", "dialAction": { "phoneNumber": "+12025551234" } } } ] }, "suggestions": [] } } }, "lineTextMessage": { "summary": "Line Message - Text", "value": { "user": { "lineUserId": "Ua12b345678c1de0fg1a1234567891011" }, "type": "Text", "content": { "text": "Hello from 8x8 Messaging API" } } }, "lineImageMessage": { "summary": "Line Message - Image", "value": { "user": { "lineUserId": "Ua12b345678c1de0fg1a1234567891011" }, "type": "Image", "content": { "url": "https://samplelib.com/png/sample-boat-400x300.png", "image": { "thumbnail": "https://samplelib.com/jpeg/sample-clouds-400x300.jpg" } } } }, "lineVideoMessage": { "summary": "Line Message - Video", "value": { "user": { "lineUserId": "Ua12b345678c1de0fg1a1234567891011" }, "type": "Video", "content": { "url": "https://samplelib.com/mp4/sample-5s.mp4", "video": { "thumbnail": "https://samplelib.com/png/sample-boat-400x300.png" } } } }, "lineAudioMessage": { "summary": "Line Message - Audio", "value": { "user": { "lineUserId": "Ua12b345678c1de0fg1a1234567891011" }, "type": "Audio", "content": { "url": "https://samplelib.com/mp3/sample-speech-5m.mp3", "audio": { "duration": 300 } } } }, "lineLocationMessage": { "summary": "Line Message - Location", "value": { "user": { "lineUserId": "Ua12b345678c1de0fg1a1234567891011" }, "type": "Location", "content": { "location": { "latitude": 1.285651, "longitude": 103.847564, "name": "8x8 Office Singapore", "address": "One George Street, Singapore 049145" } } } } } } }, "description": "Messaging Apps API: request model for send single message" }, "description": "This endpoint is used to send Messaging Apps messages individually (1 request per message).\nIt is ideal to send single personalized messages for use-cases like notifications or alerting for example.\n\n**For WhatsApp:**\nWhen sending a 'text' type message, we will try to match it with registered WhatsApp templates under your account\nIf matching is successful, the message will be submitted as a template to WhatsApp, if not as a normal message\n\nTo bypass the template matching and send template only, you can select type 'template'\nIn this case, you need to provide template name, language and parameters\n\n**WhatsApp Call Permission Request:**\nYou can request permission to call a customer using either:\n- **Interactive message**: Set type to 'interactive' with interactive.type as 'call_permission_request'. The body field is optional.\n- **Template message**: Set type to 'template' with your approved Call Permission Request template name and language.\n\n**WhatsApp Request Contact Info:**\nYou can request a customer to share their contact information using either:\n- **Interactive message**: Set type to 'interactive' with interactive.type as 'request_contact_info'. The body field is optional.\n- **Template message**: Set type to 'template' with your approved Request Contact Info template name and language.\n\n**WhatsApp Business-Scoped User ID (BSUID):**\nYou can address a recipient using their `channelUserId` (BSUID) instead of, or alongside, their phone number (`msisdn`). Format: `.` where the country code is an uppercase ISO 3166-1 alpha-2 code (e.g. `US.13491208655302741918`). If both are provided, `msisdn` takes precedence.\n\n\nMore examples on how this endpoint can be used are available here: [Usage examples](/connect/docs/whatsapp/whatsapp-over-8x8-api)", "security": [ { "apiKey": [] } ] } }, "/api/v1/subaccounts/{subAccountId}/messages/batch": { "post": { "responses": { "200": { "description": "Success response", "content": { "application/json": { "schema": { "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1lon~1batch/post/responses/200/content/application~1json/schema" }, "examples": { "response": { "value": { "batchId": "cf3cbbf5-3e2d-ea11-815d-020897df5459", "clientBatchId": "aaa_batch", "acceptedCount": 1, "rejectedCount": 1, "messages": [ { "umid": "d03cbbf5-3e2d-ea11-815d-020897df5459", "user": { "msisdn": "+6500000000" }, "clientMessageId": "aaa-1", "status": { "state": "queued", "timestamp": "2020-01-04T08:19:45.99Z" } }, { "umid": "15bb8ad1-d06e-418c-8dc7-ac8a00ffeb70", "user": { "msisdn": "+65000001" }, "clientMessageId": "aaa-2", "status": { "state": "rejected", "timestamp": "2020-01-04T08:19:45.99Z", "errorCode": 3038, "errorMessage": "Template not found for provided name and language" } } ] } } } } } }, "400": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1webhooks/get/responses/400" }, "401": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1webhooks/get/responses/401" }, "500": { "$ref": "#/paths/~1files~1%7Bfilename%7D/get/responses/500" } }, "tags": [ "Send Message API" ], "summary": "Send message batch", "description": "* This endpoint is used to send Messaging Apps messages by batches (1 request for multiple messages) with personalized contents/properties. \n* It is ideal to send any kind of massive personalized announcement. \n* Using this API, it is possible to send up to 1,000 messages per request.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "clientBatchId": { "type": "string", "maxLength": 100, "example": "my-batch-123", "description": "Customer batch ID. This value will be returned in DR \"clientBatchId\" field" }, "template": { "type": "object", "description": "Specifies general information used for all batch messages.\nWill be combined will \"messages\" field to compose final message to be sent.\nIf some property is not present in \"messge\", it will be taken from \"template\" object", "properties": { "type": { "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1messages/post/requestBody/content/application~1json/schema/properties/type" }, "content": { "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1messages/post/requestBody/content/application~1json/schema/properties/content" }, "dlrCallbackUrl": { "type": "string", "format": "uri", "description": "Override default DR callback URL for message", "example": "http://example.com" }, "channels": { "type": "array", "description": "Override default Channel fallback configuration", "items": {} } }, "title": "Batch message template" }, "messages": { "type": "array", "description": "non-generic information to compose message. Will be combined with \"template\" properties to compose final message. At least user information should be provided.", "maxItems": 10000, "items": { "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1messages/post/requestBody/content/application~1json/schema" } }, "includeMessagesInResponse": { "type": "boolean", "default": false, "example": true, "description": "If 'True', then information about every message will be returned in API response" } }, "required": [ "messages" ], "description": "Messaging Apps API: request model for send batch of messages", "title": "Batch message request" } } }, "description": "Messaging Apps API: request model for send batch of messages" }, "operationId": "send-message-many", "security": [ { "apiKey": [] } ] }, "parameters": [ { "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1lon/parameters/0" } ] }, "/api/v1/subaccounts/{subAccountId}/events": { "post": { "responses": { "200": { "description": "Request is successful." }, "400": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1webhooks/get/responses/400" }, "401": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1webhooks/get/responses/401" }, "500": { "$ref": "#/paths/~1files~1%7Bfilename%7D/get/responses/500" } }, "summary": "Send Typing Indicator", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "channel": { "type": "string", "description": "Messaging Apps channel to send the typing indicator to", "enum": [ "whatsapp", "rcs" ], "example": "whatsapp", "title": "Channel type" }, "type": { "type": "string", "description": "Type of event", "enum": [ "typing" ], "example": "typing", "title": "Event type" }, "umid": { "type": "string", "format": "uuid", "description": "Unique message ID of the inbound message to respond to", "example": "cf3cbbf5-3e2d-ea11-815d-020897df5459" } }, "required": [ "channel", "type", "umid" ], "title": "Send typing indicator request", "description": "Request to send a typing indicator to a messaging channel" }, "examples": { "WhatsApp Typing Indicator": { "summary": "Mark WhatsApp message as read and display a typing indicator", "value": { "channel": "whatsapp", "type": "typing", "umid": "cf3cbbf5-3e2d-ea11-815d-020897df5459" } }, "RCS Typing Indicator": { "summary": "Display a typing indicator for RCS", "value": { "channel": "rcs", "type": "typing", "umid": "cf3cbbf5-3e2d-ea11-815d-020897df5459" } } } } }, "description": "Send a typing indicator to a messaging channel to show that the brand or official account is composing a message." }, "tags": [ "Send Message Event API" ], "description": "This endpoint is used to send typing indicators to messaging channels. This allows brands to provide real-time feedback to end users, showing that a response is being composed.\nThe `umid` parameter should reference the unique message ID of an inbound message that you are responding to.\n\n**Important:** Typing indicators can only be sent for inbound messages received within the last 2 hours.", "operationId": "send-typing-indicator", "security": [ { "apiKey": [] } ] }, "parameters": [ { "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1lon/parameters/0" } ] }, "/api/v1/subaccounts/{subAccountId}/lon": { "parameters": [ { "name": "subAccountId", "in": "path", "description": "You must replace *{subAccountId}* with the subaccountid that you want to use. By default this is generated once you signed up with a new account at [https://connect.8x8.com](https://connect.8x8.com).", "required": true, "schema": { "maxLength": 50, "minLength": 3, "pattern": "^[A-Za-z0-9\\-._&]{3,50}$", "type": "string" } } ], "post": { "responses": { "200": { "description": "Success response", "content": { "application/json": { "schema": { "type": "object", "description": "Single message response", "properties": { "status": { "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1messages~1%7Bumid%7D/get/responses/200/content/application~1json/schema/properties/data/items/properties/status" }, "umid": { "type": "string", "description": "Unique message id (guid) generated by 8x8 CPaaS platform upon message submission", "format": "uuid" }, "user": { "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1lon/post/requestBody/content/application~1json/schema/properties/user" }, "clientMessageId": { "type": "string", "description": "Client managed id for the message: your own unique reference" } }, "required": [ "status", "umid", "user" ], "title": "Single message response" }, "examples": { "response": { "value": { "umid": "82188ee0-109f-e811-8150-020897df5459", "user": { "msisdn": "+6512341234" }, "clientMessageId": "1234_id", "status": { "state": "queued", "timestamp": "2021-01-04T08:19:45.99Z" } } } } } } }, "400": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1webhooks/get/responses/400" }, "401": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1webhooks/get/responses/401" }, "500": { "$ref": "#/paths/~1files~1%7Bfilename%7D/get/responses/500" } }, "operationId": "send-lon-message", "summary": "Send Line Notification message", "tags": [ "Send Message API" ], "parameters": [ { "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1lon/parameters/0" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "example": { "user": { "msisdn": "+6500000000" }, "clientMessageId": "1234_id", "content": { "title": "Event reminder", "company": "8x8", "icon": "calendar", "emphasis": { "label": "Event name", "content": "8x8 Conference" }, "list": [ { "label": "Date", "content": "Tue 26/09/2022" } ], "explanation": "We would like to remind you about your reservation for tomorrow event", "greeting": "Can't wait to see you there!", "actions": [ { "title": "See direction", "content": "https://www.google.com/maps" } ] }, "smsFallback": { "text": "Event reminder - 8x8 Conference on Tue 26/09/2022", "source": "8x8 events", "encoding": "AUTO" } }, "properties": { "user": { "type": "object", "description": "User information\n", "title": "User", "properties": { "msisdn": { "type": "string", "description": "Mobile phone number (MSISDN) to send the message to. International phone number format with '+ sign prefered. In addition we support national (local) phone numbers, please set `country` field to use it.", "example": "+6500000000" }, "country": { "type": "string", "maxLength": 2, "description": "Default country code (like 'sg', 'uk') for national phone numbers format. You don't need it if `msisdn` in E.164 format (with '+' sign at the beginning)", "example": "SG" }, "channelUserId": { "type": "string", "description": "WhatsApp Business-Scoped User ID (BSUID) of the recipient. Format: `.` (country code is uppercase).", "example": "US.13491208655302741918" } } }, "clientMessageId": { "type": "string", "description": "Client managed id for the message : your own unique reference", "maxLength": 50, "example": "abc-123" }, "content": { "type": "object", "description": "Content of the Line Notification message", "title": "Line Notification content", "properties": { "title": { "type": "string", "description": "Message title", "example": "Event reminder" }, "company": { "type": "string", "description": "Company name", "format": "uri", "example": "8x8" }, "icon": { "type": "string", "description": "Message icon", "enum": [ "userPlus", "chatEllipsis", "phone", "note", "gear", "bell", "checkCircle", "slashCircle", "search", "link", "wallet", "store", "mapMarker", "idCard", "utensils", "medicalKit", "train", "planeDeparture", "questionCircle", "infoCircle", "boxCheck", "calendarCheck", "calendar", "file", "envelope", "usdCircle", "thbCircle", "usdCircleSend", "thbCircleSend", "invoice", "couponStar", "coupon", "creditCard", "starCard", "shoppingBag", "megaphone", "shieldCheck", "history" ] }, "emphasis": { "type": "object", "description": "Emphasis component data", "properties": { "label": { "type": "string", "description": "Label", "example": "Event name" }, "content": { "type": "string", "description": "Content", "example": "8x8 Conference" } } }, "list": { "type": "array", "description": "Template list items", "items": { "type": "object", "description": "List item component data", "properties": { "label": { "type": "string", "description": "Label", "example": "Date" }, "content": { "type": "string", "description": "Content", "example": "Tue 26/09/2023" } } } }, "greeting": { "type": "string", "description": "Greeting message", "example": "Can't wait to see you there!" }, "explanation": { "type": "string", "description": "Explanation", "example": "We would like to remind you about your reservation for tomorrow event" }, "actions": { "type": "array", "description": "Template action list", "items": { "type": "object", "description": "Action component data", "properties": { "title": { "type": "string", "description": "Title", "example": "See direction" }, "url": { "type": "string", "description": "Url", "example": "https://www.google.com/maps" } } } } } }, "dlrCallbackUrl": { "type": "string", "description": "Override default DR callback URL for the message", "format": "uri" }, "smsFallback": { "type": "object", "properties": { "text": { "type": "string", "description": "SMS fallback message text" }, "source": { "type": "string", "description": "Source number (SenderId) - \"From\" field for SMS. Max length 16 chars.", "maxLength": 16, "example": "Info" }, "encoding": { "description": "Encoding for the text of the message. \"AUTO\", \"GSM7\" and \"UCS2\" \n", "enum": [ "AUTO", "GSM7", "UCS2" ], "type": "string", "example": "AUTO", "title": "Encoding" } } } }, "required": [ "user", "content" ], "description": "Messaging Apps API: request model for send single Line Notification message", "title": "Single Line Notification message request" } } }, "description": "Messaging Apps API: request model for send single Line Notification message" }, "description": "This endpoint is used to send Messaging Apps messages individually (1 request per message).\nIt is ideal to send single personalized messages for use-cases like notifications or alerting for example.", "security": [ { "apiKey": [] } ] } }, "/api/v1/subaccounts/{subAccountId}/lon/batch": { "post": { "responses": { "200": { "description": "Success response", "content": { "application/json": { "schema": { "type": "object", "properties": { "batchId": { "type": "string", "format": "uuid", "example": "cf3cbbf5-3e2d-ea11-815d-020897df5459", "description": "Batch ID, generated by 8x8" }, "clientBatchId": { "type": "string", "description": "Client batch ID from request", "maxLength": 100 }, "acceptedCount": { "type": "integer", "description": "Amount of accepted messages from batch", "minimum": 0, "maximum": 10000 }, "rejectedCount": { "type": "integer", "description": "Amount of rejected messages from batch", "minimum": 0, "maximum": 10000 }, "messages": { "type": "array", "description": "Message details. Will be include in response if request `includeMessagesInResponse` field set to `true`", "items": { "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1lon/post/responses/200/content/application~1json/schema" } } }, "required": [ "batchId", "acceptedCount", "rejectedCount" ], "description": "Successful batch response", "title": "Batch message response" }, "examples": { "response": { "value": { "batchId": "cf3cbbf5-3e2d-ea11-815d-020897df5459", "clientBatchId": "aaa_batch", "acceptedCount": 1, "rejectedCount": 1, "messages": [ { "umid": "d03cbbf5-3e2d-ea11-815d-020897df5459", "user": { "msisdn": "+6500000000" }, "clientMessageId": "aaa-1", "status": { "state": "queued", "timestamp": "2020-01-04T08:19:45.99Z" } }, { "umid": "15bb8ad1-d06e-418c-8dc7-ac8a00ffeb70", "user": { "msisdn": "+65000001" }, "clientMessageId": "aaa-2", "status": { "state": "rejected", "timestamp": "2020-01-04T08:19:45.99Z", "errorCode": 3038, "errorMessage": "Template not found for provided name and language" } } ] } } } } } }, "400": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1webhooks/get/responses/400" }, "401": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1webhooks/get/responses/401" }, "500": { "$ref": "#/paths/~1files~1%7Bfilename%7D/get/responses/500" } }, "tags": [ "Send Message API" ], "summary": "Send Line Notification message batch", "description": "* This endpoint is used to send Messaging Apps messages by batches (1 request for multiple messages) with personalized contents/properties. \n* It is ideal to send any kind of massive personalized announcement. \n* Using this API, it is possible to send up to 1,000 messages per request.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "clientBatchId": { "type": "string", "maxLength": 100, "example": "my-batch-123", "description": "Customer batch ID. This value will be returned in DR \"clientBatchId\" field" }, "messages": { "type": "array", "description": "non-generic information to compose message. Will be combined with \"template\" properties to compose final message. At least user information should be provided.", "maxItems": 10000, "items": { "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1lon/post/requestBody/content/application~1json/schema" } }, "includeMessagesInResponse": { "type": "boolean", "default": false, "example": true, "description": "If 'True', then information about every message will be returned in API response" } }, "required": [ "messages" ], "description": "Messaging Apps API: request model for send batch of messages", "title": "Batch message request" } } }, "description": "Messaging Apps API: request model for send batch of Line Notification messages" }, "operationId": "send-lon-messages", "security": [ { "apiKey": [] } ] }, "parameters": [ { "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1lon/parameters/0" } ] }, "/api/v1/subaccounts/{subAccountId}/messages/{umid}/read": { "post": { "responses": { "200": { "description": "Request is successful. " }, "400": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1webhooks/get/responses/400" }, "401": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1webhooks/get/responses/401" }, "500": { "$ref": "#/paths/~1files~1%7Bfilename%7D/get/responses/500" } }, "summary": "Mark message as read", "tags": [ "Send Message Event API" ], "description": "This endpoint is used to indicate to end users that a message has been read by the respective brand or official account. \n\nCurrent channel support: \n- WhatsApp Business account (two blue ticks on customers message). \n", "operationId": "mark-message-read", "security": [ { "apiKey": [] } ] }, "parameters": [ { "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1lon/parameters/0" }, { "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1messages~1%7Bumid%7D/parameters/1" } ] }, "/api/v1/accounts/{accountId}/channels/{channelId}/templates": { "get": { "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "title": "Register template response", "properties": { "templates": { "type": "array", "items": { "type": "object", "title": "Registered template", "properties": { "channelId": { "type": "string", "format": "uuid", "example": "ec36a867-3dd4-e911-814a-02d85f55fce8", "description": "Channel ID" }, "channelName": { "type": "string", "maxLength": 36, "description": "Channel User-friendly name", "example": "My WhatsApp Instance" }, "templateName": { "type": "string", "maxLength": 200, "example": "test1", "description": "Template name" }, "language": { "type": "string", "maxLength": 5, "example": "en_US", "description": "Template languate code" }, "languageName": { "type": "string", "example": "English (US)", "description": "User-friendly language name" }, "components": { "type": "array", "description": "Template components", "items": { "type": "object", "title": "Registered template component", "properties": { "type": { "type": "string", "default": "BODY", "description": "Component type", "enum": [ "HEADER", "BODY", "FOOTER", "BUTTONS" ] }, "format": { "type": "string", "enum": [ "Text", "Image", "Video", "Document", "Location" ], "example": "Image", "description": "Component type.\nRequired for HEADER component type." }, "text": { "type": "string", "example": "You can pickup your delivery at {{1}}", "description": "Component text. Required for BODY and FOOTER types" }, "buttons": { "type": "array", "items": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1channels~1%7BchannelId%7D~1templates/post/requestBody/content/application~1json/schema/properties/components/items/properties/buttons/items" } }, "example": { "title": "registered-template-component-examples", "x-stoplight": { "id": "x007v2ojjyybi" }, "type": "object", "description": "Example data provided for the template", "properties": { "headerText": { "type": "array", "description": "Header text examples", "items": { "type": "string" } }, "bodyText": { "type": "array", "description": "Body text examples", "items": { "type": "string" } }, "headerHandle": { "type": "array", "description": "Header images, docs or videos examples", "items": { "type": "string" } } } } }, "required": [ "type" ] } }, "category": { "type": "string", "example": "UTILITY", "description": "template category enumeration" }, "categoryName": { "type": "string", "example": "Utility", "description": "User-friendly category name" }, "status": { "type": "string", "example": "APPROVED", "description": "Template status enumeration" }, "statusName": { "type": "string", "example": "Approved", "description": "User-friendly status name" }, "createdAt": { "type": "string", "format": "date-time", "example": "2019-08-26T04:50:47.38Z", "description": "Template creation timestamp" }, "updatedAt": { "type": "string", "format": "date-time", "example": "2019-09-26T04:50:47.38Z", "description": "Template last update timestamp" } } } } } }, "examples": { "response": { "value": { "templates": [ { "channelId": "ec36a867-3dd4-e911-814a-02d85f55fce8", "channelName": "My WhatsApp instance", "templateName": "ticket_created", "language": "en", "languageName": "English", "components": [ { "type": "BODY", "text": "Hi, your booking have been confirmed. Here is your new booking information {{1}}" } ], "category": "UTILITY", "categoryName": "Utility", "status": "APPROVED", "statusName": "Approved", "createdAt": "2019-11-19T07:51:38.09Z", "updatedAt": "2019-11-28T02:16:42.82Z" }, { "channelId": "ec36a867-3dd4-e911-814a-02d85f55fce8", "channelName": "My WhatsApp instance", "templateName": "ticket_closed", "language": "en", "languageName": "English", "components": [ { "type": "HEADER", "format": "Image" }, { "type": "BODY", "text": "Your ticket {{1}} was closed." }, { "type": "FOOTER", "text": "Support Team" } ], "category": "UTILITY", "categoryName": "Utility", "status": "APPROVED", "statusName": "Approved", "createdAt": "2019-11-14T07:17:57.16Z", "updatedAt": "2019-11-28T02:16:42.82Z" } ] } } } } } }, "401": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1webhooks/get/responses/401" }, "500": { "$ref": "#/paths/~1files~1%7Bfilename%7D/get/responses/500" } }, "summary": "Get WhatsApp templates", "operationId": "get-whatsapp-templates", "tags": [ "Management API" ], "description": "This endpoint is used to get your registered WhatsApp message template and their approval status. \n\nWhatsApp Message Templates are message formats for common reusable messages a business may want to send. \nBusinesses must use Message Templates for sending notifications to customers.\nAny message sent outside the 24h customer service window, needs to be a template message, to be delivered. \nAdvertising, marketing, or promotional messages are not permitted.", "security": [ { "apiKey": [] } ] }, "parameters": [ { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1webhooks/parameters/0" }, { "in": "path", "name": "channelId", "required": true, "description": "Channel identifier", "schema": { "type": "string" } } ], "post": { "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "400": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1webhooks/get/responses/400" }, "401": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1webhooks/get/responses/401" }, "409": { "description": "Template name cannot be reused within 30 days of deletion", "content": { "application/json": { "schema": { "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1messages~1%7Bumid%7D/delete/responses/400/content/application~1json/schema" }, "example": { "code": 3060, "message": "New Indonesian content can't be added while the existing Indonesian content is being deleted. Try again in 4 weeks or consider creating a new message template.", "errorId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "timestamp": "2024-02-16T10:30:00.00Z" } } } }, "500": { "$ref": "#/paths/~1files~1%7Bfilename%7D/get/responses/500" } }, "summary": "Add WhatsApp template", "operationId": "add-whatsapp-template", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "language": { "type": "string", "example": "en_US", "description": "Template language code" }, "name": { "type": "string", "example": "ticket_update_en_US", "description": "Template name" }, "category": { "type": "string", "description": "Template category.\n\nTemplates containing a `VOICE_CALL` button are only allowed in `MARKETING` or `UTILITY` categories.", "example": "UTILITY" }, "components": { "type": "array", "description": "Registered template components", "items": { "type": "object", "title": "Registered template component", "properties": { "type": { "type": "string", "default": "BODY", "description": "Component type", "enum": [ "HEADER", "BODY", "FOOTER", "BUTTONS", "CAROUSEL", "CALL_PERMISSION_REQUEST", "REQUEST_CONTACT_INFO" ] }, "format": { "type": "string", "enum": [ "Text", "Image", "Gif", "Video", "Document", "Location" ], "example": "Image", "description": "Component type.\nRequired for HEADER component type.
Note: Gifs are currently only available for Marketing Messages API for WhatsApp." }, "text": { "type": "string", "example": "You can pickup your delivery at {{1}}", "description": "Component text. Required for BODY and FOOTER types" }, "buttons": { "type": "array", "items": { "type": "object", "description": "The parameters related to the button component", "properties": { "type": { "type": "string", "enum": [ "PHONE_NUMBER", "URL", "QUICK_REPLY", "OTP", "COPY_CODE", "FLOW", "VOICE_CALL", "REQUEST_CONTACT_INFO" ], "description": "Button type" }, "text": { "type": "string", "description": "The text to be displayed on the button (except `VOICE_CALL`, where it is optional).", "minLength": 1, "maxLength": 20 }, "phoneNumber": { "type": "string", "description": "Required for type \"PHONE_NUMBER\".\n\nThe phone number that will be called on clicking the button." }, "country": { "type": "string", "description": "Optional country code of phone number (ISO 3166-1 alpha-2). Required if the phone number in the national format.", "minLength": 2, "maxLength": 2, "example": "US" }, "url": { "type": "string", "description": "Required for type \"URL\".\n\nThe URL that will be visited on clicking the button\nVariables can be used to create dynamic links.", "format": "uri", "example": "https://website.com/{{1}}" }, "example": { "type": "array", "description": "To help WhatsApp moderators during the review and approval process, you can include example data. This can help WhatsApp understand what kind of message you plan to send and showcase the customer experience.\n\nFor example, you could include an image that could represent a customer's profile picture to personalize the experience.\n\nMake sure these are examples and do not include any confidential or personal information.", "items": { "type": "string" } }, "flowId": { "type": "string", "description": "Required for type \"FLOW\".\n\nThe ID of the WhatsApp Flow to launch when the button is clicked.", "example": "859504979861628" }, "flowAction": { "type": "string", "description": "Optional for type \"FLOW\".\n\nThe action to perform when launching the flow. Defaults to \"navigate\" if not provided.", "enum": [ "navigate", "data_exchange" ], "default": "navigate", "example": "navigate" }, "navigateScreen": { "type": "string", "description": "Optional for type \"FLOW\".\n\nThe screen ID to navigate to when launching the flow. Used when flowAction is \"navigate\". Defaults to \"FIRST_ENTRY_SCREEN\" if not provided.", "default": "FIRST_ENTRY_SCREEN", "example": "RECOMMEND" }, "ttlMinutes": { "type": "integer", "description": "Optional property for type \"VOICE_CALL\" only.\n\nThe time-to-live in minutes for the voice call button. If provided, must be between 1440 mins (1 day) and 43200 mins (30 days), inclusive.", "minimum": 1440, "maximum": 43200, "example": 1440 } }, "required": [ "type", "text" ] } }, "examples": { "type": "array", "description": "To help WhatsApp moderators during the review and approval process, you can include example data. This can help WhatsApp understand what kind of message you plan to send and showcase the customer experience.\n\nFor example, you could include an image that could represent a customer's profile picture to personalize the experience.\n\nMake sure these are examples and do not include any confidential or personal information.", "items": { "type": "string" } }, "add_security_recommendation": { "type": "boolean", "description": "Only for BODY component with AUTHENTICATION template category" }, "code_expiration_minutes": { "type": "integer", "default": 5, "description": "Only for FOOTER component with AUTHENTICATION template category" }, "cards": { "type": "array", "description": "Required only for CAROUSEL type. You can create up to 10 cards.", "items": { "type": "object", "title": "Registered template card component.", "description": "Each card should have a HEADER, BODY, BUTTONS components.", "properties": { "type": { "type": "string", "default": "BODY", "description": "Component type", "enum": [ "HEADER", "BODY", "BUTTONS" ] }, "format": { "type": "string", "enum": [ "Image", "Video" ], "example": "Image", "description": "Component type.\nRequired for HEADER component type." }, "text": { "type": "string", "example": "You can pickup your delivery at {{1}}", "description": "Component text. Required for BODY and FOOTER types" }, "buttons": { "type": "array", "items": { "type": "object", "description": "The parameters related to the button component", "properties": { "type": { "type": "string", "enum": [ "PHONE_NUMBER", "URL", "QUICK_REPLY", "OTP", "COPY_CODE" ], "description": "Button type" }, "text": { "type": "string", "description": "The text to be displayed on the button.", "minLength": 1, "maxLength": 20 }, "phoneNumber": { "type": "string", "description": "Required for type \"PHONE_NUMBER\".\n\nThe phone number that will be called on clicking the button." }, "country": { "type": "string", "description": "Optional country code of phone number (ISO 3166-1 alpha-2). Required if the phone number in the national format.", "minLength": 2, "maxLength": 2, "example": "US" }, "url": { "type": "string", "description": "Required for type \"URL\".\n\nThe URL that will be visited on clicking the button\nVariables can be used to create dynamic links.", "format": "uri", "example": "https://website.com/{{1}}" }, "example": { "type": "array", "description": "To help WhatsApp moderators during the review and approval process, you can include example data. This can help WhatsApp understand what kind of message you plan to send and showcase the customer experience.\n\nFor example, you could include an image that could represent a customer's profile picture to personalize the experience.\n\nMake sure these are examples and do not include any confidential or personal information.", "items": { "type": "string" } } }, "required": [ "type", "text" ] } }, "examples": { "type": "array", "description": "To help WhatsApp moderators during the review and approval process, you can include example data. This can help WhatsApp understand what kind of message you plan to send and showcase the customer experience.\n\nFor example, you could include an image that could represent a customer's profile picture to personalize the experience.\n\nMake sure these are examples and do not include any confidential or personal information.", "items": { "type": "string" } } }, "required": [ "type" ] } } }, "required": [ "type" ] } }, "allow_category_change": { "type": "boolean", "example": false, "description": "set to true to allow whatsapp to automatically assign a category. If omitted, the template may be rejected due to mis-categorization.", "default": true }, "message_send_ttl_seconds": { "type": "integer", "example": 300, "description": "Custom time-to-live (TTL) for message delivery in seconds. If a message cannot be delivered within this time, it will be dropped.
Valid ranges: Authentication templates (30-900 seconds or -1 for 30 days), Utility templates (30-43200 seconds or -1 for 30 days), Marketing templates (43200-2592000 seconds).
Default TTL: Authentication=10 minutes (600 seconds), Utility/Marketing=30 days." } }, "required": [ "language", "name", "category", "components" ], "title": "Register template request", "description": "Register template request" }, "examples": { "whatsAppMediaCarouselTemplate": { "summary": "Add WhatsApp Media Carousel Template with 3 cards", "value": { "language": "en_US", "name": "", "allow_category_change": true, "category": "MARKETING", "components": [ { "type": "body", "text": "Rare succulents for sale! {{1}}, add these unique plants to your collection. Each of these rare succulents are {{2}} if you checkout using code {{3}}. Shop now and add some unique and beautiful plants to your collection!", "examples": [ "Pablo", "30%", "30OFF" ] }, { "type": "carousel", "cards": [ { "components": [ { "type": "header", "format": "image", "examples": [ "https://www.example.com/image.jpg" ] }, { "type": "body", "text": "Add a touch of elegance to your collection with the beautiful Aloe Blue Elf succulent. Its deep blue-green leaves have a hint of pink around the edges." }, { "type": "buttons", "buttons": [ { "type": "quick_reply", "text": "Send me more like this!" }, { "type": "url", "text": "Shop", "url": "https://www.example.com/rare-succulents/{{1}}", "examples": [ "BLUE_ELF" ] } ] } ] }, { "components": [ { "type": "header", "format": "image", "examples": [ "https://www.example.com/image.jpg" ] }, { "type": "body", "text": "The Crassula Buddha Temple is sure to be a conversation starter with its tiny temple shaped leaves, intricate details, and lacy texture." }, { "type": "buttons", "buttons": [ { "type": "quick_reply", "text": "Send me more like this!" }, { "type": "url", "text": "Shop", "url": "https://www.example.com/rare-succulents{{1}}", "examples": [ "BUDDHA" ] } ] } ] }, { "components": [ { "type": "header", "format": "image", "examples": [ "https://www.example.com/image.jpg" ] }, { "type": "body", "text": "The Echeveria Black Prince is a stunning succulent, with near-black leaves, adorned with a hint of green around the edges, giving it its striking appearance." }, { "type": "buttons", "buttons": [ { "type": "quick_reply", "text": "Send me more like this!" }, { "type": "url", "text": "Shop", "url": "https://www.example.com/rare-succulents{{1}}", "examples": [ "BLACK_PRINCE" ] } ] } ] } ] } ] } }, "whatsAppFlowTemplate": { "summary": "Add WhatsApp Template with Flow Button", "value": { "name": "template_with_flow", "category": "MARKETING", "language": "en", "components": [ { "type": "BODY", "text": "Share your preferences with us to receive personalized recommendations." }, { "type": "BUTTONS", "buttons": [ { "type": "FLOW", "text": "Share Info", "flowId": "123456789876543", "flowAction": "navigate", "navigateScreen": "RECOMMEND" } ] } ] } }, "whatsAppCallPermissionTemplate": { "summary": "Add WhatsApp Template with Call Permission Request", "value": { "name": "cpr_template_sample", "category": "MARKETING|UTILITY", "language": "en", "components": [ { "type": "HEADER", "text": "Customer Service Request" }, { "type": "BODY", "text": "We would like to call you to help resolve your recent inquiry faster and provide personalized assistance." }, { "type": "FOOTER", "text": "Talk to you soon!" }, { "type": "CALL_PERMISSION_REQUEST" } ] } }, "whatsAppRequestContactInfoTemplate": { "summary": "Add WhatsApp Template with Request Contact Info", "value": { "name": "template_request_call_info_v001", "category": "UTILITY", "language": "en", "components": [ { "type": "BODY", "text": "We request you to kindly share your contact info for further processing." }, { "type": "BUTTONS", "buttons": [ { "type": "REQUEST_CONTACT_INFO" } ] } ] } }, "whatsAppVoiceCallTemplate": { "summary": "Add WhatsApp Template with Voice Call Button", "value": { "name": "template_with_voice_call", "language": "en_US", "category": "MARKETING|UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Appointment Reminder" }, { "type": "BODY", "text": "You have an upcoming appointment scheduled with us.\n\nIf you need to reschedule or have any questions about your appointment, please call us directly using the button below.\n\nThank you!" }, { "type": "FOOTER", "text": "We look forward to seeing you" }, { "type": "BUTTONS", "buttons": [ { "type": "VOICE_CALL", "text": "Call to Reschedule", "ttlMinutes": 1440 } ] } ] } } } } }, "x-examples": { "application/json": { "language": "en_US", "name": "ticket_update_image_en_US", "category": "UTILITY", "components": [ { "type": "HEADER", "format": "IMAGE" }, { "type": "BODY", "text": "Your ticket {{1}} was closed." }, { "type": "FOOTER", "text": "Support Team" } ] } } }, "tags": [ "Management API" ], "description": "This endpoint is used to register new WhatsApp message template.\n\nPlease note that special html entities should be unescaped.\n\nWhatsApp Message Templates are message formats for common reusable messages a business may want to send. \nBusinesses must use Message Templates for sending notifications to customers.\nAny message sent outside the 24h customer service window, needs to be a template message, to be delivered. \nAdvertising, marketing, or promotional messages are not permitted.", "security": [ { "apiKey": [] } ] } }, "/api/v1/accounts/{accountId}/channels/{channelId}/templates/{templateName}": { "delete": { "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "400": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1webhooks/get/responses/400" }, "401": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1webhooks/get/responses/401" }, "500": { "$ref": "#/paths/~1files~1%7Bfilename%7D/get/responses/500" } }, "description": "This endpoint is used to remove an existing WhatsApp message template.\n\nWhatsApp Message Templates are message formats for common reusable messages a business may want to send. \nBusinesses must use Message Templates for sending notifications to customers.\nAny message sent outside the 24h customer service window, needs to be a template message, to be delivered. \nAdvertising, marketing, or promotional messages are not permitted.", "summary": "Remove WhatsApp template", "security": [ { "apiKey": [] } ], "operationId": "remove-wa-template", "tags": [ "Management API" ] }, "parameters": [ { "name": "accountId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "channelId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "templateName", "in": "path", "required": true, "schema": { "type": "string" } } ] }, "/api/v1/whatsapp/subaccounts/{subAccountId}/channels/{channelId}/callPermissions": { "get": { "summary": "Get Call Permission Status", "operationId": "get-call-permission-status", "description": "This endpoint is used to check the status of call permission for a specific destination on WhatsApp. It returns whether the business is allowed to initiate voice calls to the specified phone number.", "tags": [ "Management API" ], "parameters": [ { "name": "subAccountId", "in": "path", "description": "Sub-account identifier", "required": true, "schema": { "type": "string" } }, { "name": "channelId", "in": "path", "description": "Channel identifier", "required": true, "schema": { "type": "string" } }, { "name": "destination", "in": "query", "description": "Destination phone number to check call permission status (E.164 format)", "required": true, "schema": { "type": "string" }, "example": "+6500000000" } ], "responses": { "200": { "description": "Success response", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "description": "The current call permission status", "enum": [ "temporary", "permanent", "not_granted" ], "example": "temporary" }, "actions": { "type": "array", "description": "List of actions and their permissions", "items": { "type": "object", "properties": { "actionName": { "type": "string", "description": "Name of the action", "enum": [ "send_call_permission_request", "start_call" ], "example": "send_call_permission_request" }, "canPerformAction": { "type": "boolean", "description": "Whether the action can be performed", "example": true }, "limits": { "type": "array", "description": "Rate limits for this action", "items": { "type": "object", "properties": { "timePeriod": { "type": "string", "description": "ISO 8601 duration format (e.g., PT24H for 24 hours, P7D for 7 days)", "example": "PT24H" }, "maxAllowed": { "type": "integer", "description": "Maximum number of actions allowed in the time period", "example": 1 }, "currentUsage": { "type": "integer", "description": "Current usage count in the time period", "example": 0 } } } } } } }, "expirationTime": { "type": "string", "format": "date-time", "description": "ISO 8601 timestamp indicating when the call permission expires", "example": "2026-02-06T08:12:30.00Z" } } }, "examples": { "temporary_permission": { "value": { "status": "temporary", "actions": [ { "actionName": "send_call_permission_request", "canPerformAction": true, "limits": [ { "timePeriod": "PT24H", "maxAllowed": 1, "currentUsage": 0 }, { "timePeriod": "P7D", "maxAllowed": 2, "currentUsage": 0 } ] }, { "actionName": "start_call", "canPerformAction": true, "limits": [ { "timePeriod": "PT24H", "maxAllowed": 100, "currentUsage": 0 } ] } ], "expirationTime": "2026-02-06T08:12:30.00Z" } } } } } }, "400": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1webhooks/get/responses/400" }, "401": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1webhooks/get/responses/401" }, "500": { "$ref": "#/paths/~1files~1%7Bfilename%7D/get/responses/500" } }, "security": [ { "apiKey": [] } ] } }, "/api/v1/whatsapp/subaccounts/{subAccountId}/channels/{channelId}/directSend/sample": { "post": { "summary": "Submit WhatsApp Direct Send Sample", "operationId": "submit-whatsapp-direct-send-sample", "description": "This endpoint is used to submit a sample of a WhatsApp Direct Send message to Meta for review and classification.\n\nDirect Send auto-creates WhatsApp templates on the fly and matches incoming messages against them. Submitting sample messages will ensure that the messages you send through Direct Send are accurately classified and transformed into templates that are useful for your use cases.\n\nThe response indicates whether the sample was processed successfully and the category Meta assigned to it. Possible categories are `UTILITY`, `MARKETING`, and `AUTHENTICATION`.\n\nSamples can be of two types:\n* `text` — a plain text body.\n* `interactive` — an interactive message with a call-to-action URL (`cta_url`) or reply buttons (`button`).", "tags": [ "Management API" ], "parameters": [ { "name": "subAccountId", "in": "path", "description": "Sub-account identifier", "required": true, "schema": { "type": "string" } }, { "name": "channelId", "in": "path", "description": "Channel identifier", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Sample message to submit to Meta for review.", "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "description": "Sample type. Must be either `text` or `interactive`.", "enum": [ "text", "interactive" ], "example": "interactive" }, "text": { "type": "object", "description": "Required when `type` is `text`.", "required": [ "body" ], "properties": { "body": { "type": "string", "description": "The text body of the sample message. Must not be empty.", "example": "Hello! This is a sample message." } } }, "interactive": { "type": "object", "description": "Required when `type` is `interactive`.", "required": [ "type", "body", "action" ], "properties": { "type": { "type": "string", "description": "Interactive type. Must be either `cta_url` (call-to-action URL) or `button` (reply buttons).", "enum": [ "cta_url", "button" ], "example": "cta_url" }, "header": { "type": "object", "description": "Optional header for the interactive message.", "required": [ "type", "text" ], "properties": { "type": { "type": "string", "description": "Header type. Only `text` is supported.", "enum": [ "text" ], "example": "text" }, "text": { "type": "string", "description": "Header text. Must not exceed 60 characters.", "maxLength": 60, "example": "Welcome" } } }, "body": { "type": "object", "description": "Body of the interactive message.", "required": [ "text" ], "properties": { "text": { "type": "string", "description": "Body text. Must not be empty and must not exceed 1024 characters.", "maxLength": 1024, "example": "Tap the button below to visit our store." } } }, "footer": { "type": "object", "description": "Optional footer for the interactive message.", "required": [ "text" ], "properties": { "text": { "type": "string", "description": "Footer text. Must not exceed 60 characters.", "maxLength": 60, "example": "Powered by 8x8" } } }, "action": { "type": "object", "description": "Action object. The required fields depend on the `interactive.type`:\n* For `cta_url`, `name` must be `cta_url` and `parameters` is required.\n* For `button`, `buttons` is required.", "properties": { "name": { "type": "string", "description": "Required when `interactive.type` is `cta_url`. Must be `cta_url`.", "enum": [ "cta_url" ], "example": "cta_url" }, "parameters": { "type": "object", "description": "Required when `interactive.type` is `cta_url`.", "required": [ "display_text", "url" ], "properties": { "display_text": { "type": "string", "description": "Text displayed on the call-to-action button. Must not be empty.", "example": "Visit store" }, "url": { "type": "string", "description": "Destination URL for the call-to-action. Must be a valid `http` or `https` URL.", "format": "uri", "example": "https://example.com/store" } } }, "buttons": { "type": "array", "description": "Required when `interactive.type` is `button`. Must contain at most 10 reply buttons.", "maxItems": 10, "items": { "type": "object", "required": [ "type", "reply" ], "properties": { "type": { "type": "string", "description": "Button type. Only `reply` is supported.", "enum": [ "reply" ], "example": "reply" }, "reply": { "type": "object", "required": [ "id", "title" ], "properties": { "id": { "type": "string", "description": "Unique identifier for the button. Must not be empty.", "example": "btn-yes" }, "title": { "type": "string", "description": "Button label. Must not be empty and must not exceed 20 characters.", "maxLength": 20, "example": "Yes" } } } } } } } } } } } }, "examples": { "text": { "summary": "Submit a text sample", "value": { "type": "text", "text": { "body": "Hello! This is a sample message." } } }, "interactiveCtaUrl": { "summary": "Submit an interactive call-to-action URL sample", "value": { "type": "interactive", "interactive": { "type": "cta_url", "header": { "type": "text", "text": "Welcome" }, "body": { "text": "Tap the button below to visit our store." }, "footer": { "text": "Powered by 8x8" }, "action": { "name": "cta_url", "parameters": { "display_text": "Visit store", "url": "https://example.com/store" } } } } }, "interactiveButton": { "summary": "Submit an interactive reply buttons sample", "value": { "type": "interactive", "interactive": { "type": "button", "body": { "text": "Would you like to proceed?" }, "action": { "buttons": [ { "type": "reply", "reply": { "id": "btn-yes", "title": "Yes" } }, { "type": "reply", "reply": { "id": "btn-no", "title": "No" } } ] } } } } } } } }, "responses": { "200": { "description": "Sample submitted successfully", "content": { "application/json": { "schema": { "type": "object", "title": "Direct Send sample response", "properties": { "success": { "type": "boolean", "description": "Indicates whether the sample was accepted by Meta.", "example": true }, "category": { "type": "string", "description": "Category assigned by Meta to the submitted sample.", "enum": [ "UTILITY", "MARKETING", "AUTHENTICATION" ], "example": "UTILITY" } } }, "examples": { "success": { "summary": "Sample accepted and categorized", "value": { "success": true, "category": "UTILITY" } } } } } }, "400": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1webhooks/get/responses/400" }, "401": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1webhooks/get/responses/401" }, "403": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1webhooks/get/responses/401" }, "500": { "$ref": "#/paths/~1files~1%7Bfilename%7D/get/responses/500" } }, "security": [ { "apiKey": [] } ] } }, "/api/v1/accounts/{accountId}/channels/{channelId}/flows": { "get": { "summary": "Get WhatsApp Flows", "operationId": "get-whatsapp-flows", "description": "This endpoint is used to retrieve the list of WhatsApp Flows and their status for the channel.", "tags": [ "Management API" ], "parameters": [ { "name": "accountId", "in": "path", "description": "You must replace *{accountId}* with the accountid that you want to use.", "required": true, "schema": { "type": "string", "pattern": "^[0-9A-Fa-f]{8}[-]?(?:[0-9A-Fa-f]{4}[-]?){3}[0-9A-Fa-f]{12}$", "minLength": 32, "maxLength": 36 } }, { "in": "path", "name": "channelId", "required": true, "description": "Channel identifier", "schema": { "type": "string" } }, { "in": "query", "name": "limit", "required": false, "description": "Maximum number of flows to return", "schema": { "type": "integer", "minimum": 1, "maximum": 1000, "default": 100 } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "title": "Get flows response", "properties": { "flows": { "type": "array", "items": { "type": "object", "title": "WhatsApp Flow", "properties": { "id": { "type": "string", "description": "Flow ID", "example": "1145805540595505" }, "name": { "type": "string", "description": "Flow name", "example": "Loan Collection" }, "status": { "type": "string", "description": "Flow status", "enum": [ "DRAFT", "PUBLISHED", "DEPRECATED" ], "example": "DRAFT" } } } } } }, "examples": { "response": { "value": { "flows": [ { "id": "1145805540595505", "name": "Loan Collection", "status": "DRAFT" }, { "id": "802610292468882", "name": "2025-10-08T15:17:51.241+08:00", "status": "PUBLISHED" } ] } } } } } }, "401": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1webhooks/get/responses/401" }, "500": { "$ref": "#/paths/~1files~1%7Bfilename%7D/get/responses/500" } }, "security": [ { "apiKey": [] } ] }, "post": { "summary": "Create WhatsApp Flow", "operationId": "create-whatsapp-flow", "description": "This endpoint is used to create a new WhatsApp Flow.\n\nWhatsApp Flows are interactive experiences that businesses can use to collect information from customers through WhatsApp conversations. Flows provide a structured way to guide users through multi-step processes like booking appointments, collecting feedback, or processing orders.", "tags": [ "Management API" ], "parameters": [ { "name": "accountId", "in": "path", "description": "You must replace *{accountId}* with the accountid that you want to use.", "required": true, "schema": { "type": "string", "pattern": "^[0-9A-Fa-f]{8}[-]?(?:[0-9A-Fa-f]{4}[-]?){3}[0-9A-Fa-f]{12}$", "minLength": 32, "maxLength": 36 } }, { "in": "path", "name": "channelId", "required": true, "description": "Channel identifier", "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "Flow name", "example": "Example Flow" }, "categories": { "type": "array", "description": "Flow categories", "items": { "type": "string", "enum": [ "SIGN_UP", "SIGN_IN", "APPOINTMENT_BOOKING", "LEAD_GENERATION", "CONTACT_US", "CUSTOMER_SUPPORT", "SURVEY", "OTHER" ] }, "example": [ "OTHER" ] }, "publish": { "type": "boolean", "description": "Whether to publish the flow immediately", "default": false, "example": false }, "flowJson": { "type": "string", "description": "Flow JSON definition as a string", "example": "{\"version\":\"5.0\",\"screens\":[{\"id\":\"WELCOME_SCREEN\",\"layout\":{\"type\":\"SingleColumnLayout\",\"children\":[{\"type\":\"TextHeading\",\"text\":\"Hello World\"},{\"type\":\"Footer\",\"label\":\"Complete\",\"on-click-action\":{\"name\":\"complete\",\"payload\":{}}}]},\"title\":\"Welcome\",\"terminal\":true,\"success\":true,\"data\":{}}]}" }, "cloneFlowId": { "type": "string", "description": "Optional flow ID to clone from. If provided, the new flow will be created as a copy of the specified flow.", "example": "1145805540595505" }, "endPointUri": { "type": "string", "description": "Optional endpoint URI for the flow. This is the URL that will receive flow completion data.", "format": "uri", "example": "https://example.com/webhook/flow-completion" } }, "required": [ "name", "categories" ] }, "examples": { "createFlow": { "summary": "Create a new WhatsApp Flow", "value": { "name": "Example Flow", "categories": [ "OTHER" ], "publish": false, "flowJson": "{\"version\":\"5.0\",\"screens\":[{\"id\":\"WELCOME_SCREEN\",\"layout\":{\"type\":\"SingleColumnLayout\",\"children\":[{\"type\":\"TextHeading\",\"text\":\"Hello World\"},{\"type\":\"Footer\",\"label\":\"Complete\",\"on-click-action\":{\"name\":\"complete\",\"payload\":{}}}]},\"title\":\"Welcome\",\"terminal\":true,\"success\":true,\"data\":{}}]}" } } } } }, "description": "Request body for creating a WhatsApp Flow" }, "responses": { "200": { "description": "Flow created successfully", "content": { "application/json": { "schema": { "type": "object", "title": "Create flow response", "properties": { "id": { "type": "string", "description": "Created flow ID", "example": "866937862658913" }, "success": { "type": "boolean", "description": "Indicates if the operation was successful", "example": true }, "validationErrors": { "type": "array", "description": "List of validation errors (only present if there are errors in the flow JSON)", "items": { "type": "object", "properties": { "error": { "type": "string", "description": "Error code", "example": "INVALID_PROPERTY_VALUE" }, "errorType": { "type": "string", "description": "Type of error", "example": "FLOW_JSON_ERROR" }, "message": { "type": "string", "description": "Error message", "example": "Invalid value found for property 'type'." }, "lineStart": { "type": "integer", "description": "Starting line number of the error", "example": 1 }, "lineEnd": { "type": "integer", "description": "Ending line number of the error", "example": 1 }, "columnStart": { "type": "integer", "description": "Starting column number of the error", "example": 84 }, "columnEnd": { "type": "integer", "description": "Ending column number of the error", "example": 92 }, "pointers": { "type": "array", "description": "Array of error pointers", "items": { "type": "object", "properties": { "lineStart": { "type": "integer", "example": 1 }, "lineEnd": { "type": "integer", "example": 1 }, "columnStart": { "type": "integer", "example": 84 }, "columnEnd": { "type": "integer", "example": 92 }, "path": { "type": "string", "description": "Path to the property with the error", "example": "screens[0].layout.children[0].children[0].type" } } } } } } } } }, "examples": { "successWithValidationErrors": { "summary": "Flow created with validation errors", "value": { "id": "866937862658913", "success": true, "validationErrors": [ { "error": "INVALID_PROPERTY_VALUE", "errorType": "FLOW_JSON_ERROR", "message": "Invalid value found for property 'type'.", "lineStart": 1, "lineEnd": 1, "columnStart": 84, "columnEnd": 92, "pointers": [ { "lineStart": 1, "lineEnd": 1, "columnStart": 84, "columnEnd": 92, "path": "screens[0].layout.children[0].children[0].type" } ] } ] } }, "success": { "summary": "Flow created successfully without errors", "value": { "id": "866937862658913", "success": true } } } } } }, "400": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1channels~1%7BchannelId%7D~1templates/post/responses/400" }, "401": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1webhooks/get/responses/401" }, "500": { "$ref": "#/paths/~1files~1%7Bfilename%7D/get/responses/500" } }, "security": [ { "apiKey": [] } ] } }, "/api/v1/accounts/{accountId}/channels/{channelId}/flows/{flowId}": { "get": { "summary": "Get WhatsApp Flow details", "operationId": "get-whatsapp-flow-details", "description": "This endpoint is used to retrieve details of a specific WhatsApp Flow.\n\nWhatsApp Flows are interactive experiences that businesses can use to collect information from customers through WhatsApp conversations. This endpoint returns comprehensive information about a flow including its current status, validation errors, and flow JSON URL.", "tags": [ "Management API" ], "parameters": [ { "name": "accountId", "in": "path", "description": "You must replace *{accountId}* with the accountid that you want to use.", "required": true, "schema": { "type": "string", "pattern": "^[0-9A-Fa-f]{8}[-]?(?:[0-9A-Fa-f]{4}[-]?){3}[0-9A-Fa-f]{12}$", "minLength": 32, "maxLength": 36 } }, { "in": "path", "name": "channelId", "required": true, "description": "Channel identifier", "schema": { "type": "string" } }, { "in": "path", "name": "flowId", "required": true, "description": "Flow identifier", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Flow details retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "title": "Flow details response", "properties": { "flowId": { "type": "string", "description": "Flow ID", "example": "822625023859371" }, "flowJsonUrl": { "type": "string", "description": "URL to download the flow JSON definition", "format": "uri", "example": "https://mmg.whatsapp.net/m1/v/t24/An-a1LjKk34-zpvJMd&_nc_sid=471" }, "name": { "type": "string", "description": "Flow name", "example": "Example flow" }, "status": { "type": "string", "description": "Flow status", "enum": [ "DRAFT", "PUBLISHED", "DEPRECATED" ], "example": "DRAFT" }, "categories": { "type": "array", "description": "Flow categories", "items": { "type": "string", "enum": [ "SIGN_UP", "SIGN_IN", "APPOINTMENT_BOOKING", "LEAD_GENERATION", "CONTACT_US", "CUSTOMER_SUPPORT", "SURVEY", "OTHER" ] }, "example": [ "OTHER" ] }, "validationErrors": { "type": "array", "description": "List of validation errors (only present if there are errors in the flow JSON)", "items": { "type": "object", "properties": { "error": { "type": "string", "description": "Error code", "example": "INVALID_PROPERTY_VALUE" }, "errorType": { "type": "string", "description": "Type of error", "example": "FLOW_JSON_ERROR" }, "message": { "type": "string", "description": "Error message", "example": "Invalid value found for property 'type'." }, "lineStart": { "type": "integer", "description": "Starting line number of the error", "example": 1 }, "lineEnd": { "type": "integer", "description": "Ending line number of the error", "example": 1 }, "columnStart": { "type": "integer", "description": "Starting column number of the error", "example": 84 }, "columnEnd": { "type": "integer", "description": "Ending column number of the error", "example": 92 }, "pointers": { "type": "array", "description": "Array of error pointers", "items": { "type": "object", "properties": { "lineStart": { "type": "integer", "example": 1 }, "lineEnd": { "type": "integer", "example": 1 }, "columnStart": { "type": "integer", "example": 84 }, "columnEnd": { "type": "integer", "example": 92 }, "path": { "type": "string", "description": "Path to the property with the error", "example": "screens[0].layout.children[0].children[0].type" } } } } } } } } }, "examples": { "flowWithValidationErrors": { "summary": "Flow with validation errors", "value": { "flowId": "822625023859371", "flowJsonUrl": "https://mmg.whatsapp.net/m1/v/t24/An-a1LjKk34-zpvJMd&_nc_sid=471", "name": "Example flow", "status": "DRAFT", "categories": [ "OTHER" ], "validationErrors": [ { "error": "INVALID_PROPERTY_VALUE", "errorType": "FLOW_JSON_ERROR", "message": "Invalid value found for property 'type'.", "lineStart": 1, "lineEnd": 1, "columnStart": 84, "columnEnd": 92, "pointers": [ { "lineStart": 1, "lineEnd": 1, "columnStart": 84, "columnEnd": 92, "path": "screens[0].layout.children[0].children[0].type" } ] } ] } }, "flowWithoutErrors": { "summary": "Flow without errors", "value": { "flowId": "822625023859371", "flowJsonUrl": "https://mmg.whatsapp.net/m1/v/t24/An-a1LjKk34-zpvJMd&_nc_sid=471", "name": "Example flow", "status": "PUBLISHED", "categories": [ "OTHER" ] } } } } } }, "400": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1channels~1%7BchannelId%7D~1templates/post/responses/400" }, "401": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1webhooks/get/responses/401" }, "500": { "$ref": "#/paths/~1files~1%7Bfilename%7D/get/responses/500" } }, "security": [ { "apiKey": [] } ] }, "put": { "summary": "Update WhatsApp Flow", "operationId": "update-whatsapp-flow", "description": "This endpoint is used to update an existing WhatsApp Flow. The flow must be in draft state.\n\nWhatsApp Flows are interactive experiences that businesses can use to collect information from customers through WhatsApp conversations. This endpoint allows you to update flow properties including name, categories, flow JSON definition, endpoint URI, and application ID.\n\nAt least one property must be present in the request body.", "tags": [ "Management API" ], "parameters": [ { "name": "accountId", "in": "path", "description": "You must replace *{accountId}* with the accountid that you want to use.", "required": true, "schema": { "type": "string", "pattern": "^[0-9A-Fa-f]{8}[-]?(?:[0-9A-Fa-f]{4}[-]?){3}[0-9A-Fa-f]{12}$", "minLength": 32, "maxLength": 36 } }, { "in": "path", "name": "channelId", "required": true, "description": "Channel identifier", "schema": { "type": "string" } }, { "in": "path", "name": "flowId", "required": true, "description": "Flow identifier", "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "Flow name", "example": "Example Flow - Updated" }, "categories": { "type": "array", "description": "Flow categories", "items": { "type": "string", "enum": [ "SIGN_UP", "SIGN_IN", "APPOINTMENT_BOOKING", "LEAD_GENERATION", "CONTACT_US", "CUSTOMER_SUPPORT", "SURVEY", "OTHER" ] }, "example": [ "OTHER" ] }, "publish": { "type": "boolean", "description": "Whether to publish the flow immediately", "default": false, "example": false }, "flowJson": { "type": "string", "description": "Flow JSON definition as a string", "example": "{\"version\":\"5.0\",\"screens\":[{\"id\":\"WELCOME_SCREEN\",\"layout\":{\"type\":\"SingleColumnLayout\",\"children\":[{\"type\":\"TextHeading\",\"text\":\"Hello World!\"},{\"type\":\"Footer\",\"label\":\"Complete\",\"on-click-action\":{\"name\":\"complete\",\"payload\":{}}}]},\"title\":\"Welcome\",\"terminal\":true,\"success\":true,\"data\":{}}]}" }, "cloneFlowId": { "type": "string", "description": "Optional flow ID to clone from. If provided, the flow will be updated with content from the specified flow.", "example": "1145805540595505" }, "endPointUri": { "type": "string", "description": "Optional endpoint URI for the flow. This is the URL that will receive flow completion data.", "format": "uri", "example": "https://example.com/webhook/flow-completion" }, "applicationId": { "type": "string", "description": "Application ID associated with the flow", "example": "123456789" } }, "minProperties": 1, "description": "At least one property must be present in the request body" }, "examples": { "updateFlow": { "summary": "Update WhatsApp Flow", "value": { "name": "Example Flow - Updated", "categories": [ "OTHER" ], "flowJson": "{\"version\":\"5.0\",\"screens\":[{\"id\":\"WELCOME_SCREEN\",\"layout\":{\"type\":\"SingleColumnLayout\",\"children\":[{\"type\":\"TextHeading\",\"text\":\"Hello World!\"},{\"type\":\"Footer\",\"label\":\"Complete\",\"on-click-action\":{\"name\":\"complete\",\"payload\":{}}}]},\"title\":\"Welcome\",\"terminal\":true,\"success\":true,\"data\":{}}]}" } } } } }, "description": "Request body for updating a WhatsApp Flow. At least one property must be present." }, "responses": { "200": { "description": "Flow updated successfully", "content": { "application/json": { "schema": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1channels~1%7BchannelId%7D~1flows/post/responses/200/content/application~1json/schema" }, "examples": { "successWithValidationErrors": { "summary": "Flow updated with validation errors", "value": { "id": "866937862658913", "success": true, "validationErrors": [ { "error": "INVALID_PROPERTY_VALUE", "errorType": "FLOW_JSON_ERROR", "message": "Invalid value found for property 'type'.", "lineStart": 1, "lineEnd": 1, "columnStart": 84, "columnEnd": 92, "pointers": [ { "lineStart": 1, "lineEnd": 1, "columnStart": 84, "columnEnd": 92, "path": "screens[0].layout.children[0].children[0].type" } ] } ] } }, "success": { "summary": "Flow updated successfully without errors", "value": { "id": "866937862658913", "success": true } } } } } }, "400": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1channels~1%7BchannelId%7D~1templates/post/responses/400" }, "401": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1webhooks/get/responses/401" }, "500": { "$ref": "#/paths/~1files~1%7Bfilename%7D/get/responses/500" } }, "security": [ { "apiKey": [] } ] }, "delete": { "summary": "Delete WhatsApp Flow", "operationId": "delete-whatsapp-flow", "description": "This endpoint is used to delete a WhatsApp Flow.\n\nOnly flows that are not published can be deleted. If a flow has been published, it cannot be deleted and the API will return an error. This operation is permanent and cannot be undone.", "tags": [ "Management API" ], "parameters": [ { "name": "accountId", "in": "path", "description": "You must replace *{accountId}* with the accountid that you want to use.", "required": true, "schema": { "type": "string", "pattern": "^[0-9A-Fa-f]{8}[-]?(?:[0-9A-Fa-f]{4}[-]?){3}[0-9A-Fa-f]{12}$", "minLength": 32, "maxLength": 36 } }, { "in": "path", "name": "channelId", "required": true, "description": "Channel identifier", "schema": { "type": "string" } }, { "in": "path", "name": "flowId", "required": true, "description": "Flow identifier", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Flow deleted successfully. No response body is returned." }, "400": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1channels~1%7BchannelId%7D~1templates/post/responses/400" }, "401": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1webhooks/get/responses/401" }, "500": { "$ref": "#/paths/~1files~1%7Bfilename%7D/get/responses/500" } }, "security": [ { "apiKey": [] } ] } }, "/api/v1/accounts/{accountId}/channels/{channelId}/flows/{flowId}/preview": { "get": { "summary": "Preview WhatsApp Flow", "operationId": "preview-whatsapp-flow", "description": "This endpoint is used to generate a preview URL for a WhatsApp Flow.\n\nThe preview allows you to visualize and interact with your flow before publishing it. You can force regeneration of the preview by setting the `refresh` query parameter to `true`.\n\nFor interactive previews with custom parameters, you can add query parameters to the generated preview URL. For a list of supported query parameters, refer to the 'Visualizing and interacting with your Flow using the Web Preview' section of the [WhatsApp Flows API documentation](https://developers.facebook.com/docs/whatsapp/flows/reference/flowsapi).", "tags": [ "Management API" ], "parameters": [ { "name": "accountId", "in": "path", "description": "You must replace *{accountId}* with the accountid that you want to use.", "required": true, "schema": { "type": "string", "pattern": "^[0-9A-Fa-f]{8}[-]?(?:[0-9A-Fa-f]{4}[-]?){3}[0-9A-Fa-f]{12}$", "minLength": 32, "maxLength": 36 } }, { "in": "path", "name": "channelId", "required": true, "description": "Channel identifier", "schema": { "type": "string" } }, { "in": "path", "name": "flowId", "required": true, "description": "Flow identifier", "schema": { "type": "string" } }, { "in": "query", "name": "refresh", "required": false, "description": "Set to `true` to force Meta to regenerate the preview. Defaults to `false`.", "schema": { "type": "boolean", "default": false, "example": false } } ], "responses": { "200": { "description": "Preview URL generated successfully", "content": { "application/json": { "schema": { "type": "object", "title": "Preview flow response", "properties": { "id": { "type": "string", "description": "Flow ID", "example": "833178916081311" }, "preview_url": { "type": "string", "description": "URL to access the flow preview. You can add query parameters to this URL for interactive previews.", "format": "uri", "example": "https://business.facebook.com/wa/manage/flows/833178916081311/preview/?token=0836260f-9b1e-4a78-b02b-aaad5c173278" }, "expires_at": { "type": "string", "description": "Expiration timestamp of the preview URL in ISO 8601 format", "format": "date-time", "example": "2025-12-13T05:49:59+0000" } } }, "examples": { "previewResponse": { "summary": "Preview URL generated", "value": { "id": "833178916081311", "preview_url": "https://business.facebook.com/wa/manage/flows/833178916081311/preview/?token=0836260f-9b1e-4a78-b02b-aaad5c173278", "expires_at": "2025-12-13T05:49:59+0000" } } } } } }, "400": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1channels~1%7BchannelId%7D~1templates/post/responses/400" }, "401": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1webhooks/get/responses/401" }, "500": { "$ref": "#/paths/~1files~1%7Bfilename%7D/get/responses/500" } }, "security": [ { "apiKey": [] } ] } }, "/api/v1/accounts/{accountId}/channels/{channelId}/flows/{flowId}/publish": { "post": { "summary": "Publish WhatsApp Flow", "operationId": "publish-whatsapp-flow", "description": "This endpoint is used to publish a WhatsApp Flow.\n\nPublishing a flow makes it available for use in WhatsApp conversations. Once published, the flow can be sent to customers through WhatsApp messages(Template message and Interactive messages). A flow must be in DRAFT status and pass all validations before it can be published.", "tags": [ "Management API" ], "parameters": [ { "name": "accountId", "in": "path", "description": "You must replace *{accountId}* with the accountid that you want to use.", "required": true, "schema": { "type": "string", "pattern": "^[0-9A-Fa-f]{8}[-]?(?:[0-9A-Fa-f]{4}[-]?){3}[0-9A-Fa-f]{12}$", "minLength": 32, "maxLength": 36 } }, { "in": "path", "name": "channelId", "required": true, "description": "Channel identifier", "schema": { "type": "string" } }, { "in": "path", "name": "flowId", "required": true, "description": "Flow identifier", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Flow published successfully. No response body is returned." }, "400": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1channels~1%7BchannelId%7D~1templates/post/responses/400" }, "401": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1webhooks/get/responses/401" }, "500": { "$ref": "#/paths/~1files~1%7Bfilename%7D/get/responses/500" } }, "security": [ { "apiKey": [] } ] } }, "/api/v1/accounts/{accountId}/channels/{channelId}/flows/{flowId}/deprecate": { "post": { "summary": "Deprecate WhatsApp Flow", "operationId": "deprecate-whatsapp-flow", "description": "This endpoint is used to deprecate a WhatsApp Flow.\n\nDeprecating a flow marks it as no longer recommended for use, but keeps it accessible for existing integrations. This allows you to phase out a flow gracefully without breaking active implementations. Once deprecated, the flow status will be updated to reflect its deprecated state.", "tags": [ "Management API" ], "parameters": [ { "name": "accountId", "in": "path", "description": "You must replace *{accountId}* with the accountid that you want to use.", "required": true, "schema": { "type": "string", "pattern": "^[0-9A-Fa-f]{8}[-]?(?:[0-9A-Fa-f]{4}[-]?){3}[0-9A-Fa-f]{12}$", "minLength": 32, "maxLength": 36 } }, { "in": "path", "name": "channelId", "required": true, "description": "Channel identifier", "schema": { "type": "string" } }, { "in": "path", "name": "flowId", "required": true, "description": "Flow identifier", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Flow deprecated successfully. No response body is returned." }, "400": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1channels~1%7BchannelId%7D~1templates/post/responses/400" }, "401": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1webhooks/get/responses/401" }, "500": { "$ref": "#/paths/~1files~1%7Bfilename%7D/get/responses/500" } }, "security": [ { "apiKey": [] } ] } }, "/api/v1/subaccounts/{subAccountId}/messages/exports": { "post": { "responses": { "202": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "jobId": { "type": "string", "description": "Identifier of the job started. Use this value to query job result." } }, "required": [ "jobId" ] }, "examples": { "response": { "value": { "jobId": "F1T6z9C5tW2QV1pdMzO9xpMXrYEmfnvqORGqpePJGpgzjTJ80TSaZEE7aX2wrgix" } } } } } } }, "summary": "Start log export job", "operationId": "start-log-export-job-1", "tags": [ "Reporting API" ], "security": [ { "apiKey": [] } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "title": "LogExportRequest", "properties": { "from": { "type": "string", "format": "date-time", "description": "The values can be entered either as:\n\n- UTC date (`yyyy-MM-dd` format).\n- UTC timezone datetime, then the expected format is `yyyy-MM-ddTHH:mm:ssZ`\n- or as local timezone datetime, then the expected format is `yyyy-MM-ddTHH:mm:sszzz`\n\nThe API will automatically determine whether the datetime is UTC or local based on the format of the value. \nThe default value is UTC today - 7 days. \nThe value should less than value of `to` parameter. \n\nExample values:\n* `2020-07-01` Date without time\n* `2020-07-01T13:00:00` (UTC Time)\n* `2020-07-01T13:00:00+07:00` Datetime with timezone" }, "to": { "type": "string", "format": "date-time", "description": "The values can be entered either as:\n\n- UTC date (`yyyy-MM-dd` format).\n- UTC timezone datetime, then the expected format is `yyyy-MM-ddTHH:mm:ssZ`\n- or as local timezone datetime, then the expected format is `yyyy-MM-ddTHH:mm:sszzz`\n\nThe API will automatically determine whether the datetime is UTC or local based on the format of the value. \nThe default value is today in UTC timezone. \nThe value should less than value of `to` parameter. \n\nExample values:\n* `2020-07-01` Date without time\n* `2020-07-01T13:00:00` (UTC Time)\n* `2020-07-01T13:00:00+07:00` Datetime with timezone" }, "phoneNumber": { "type": "string", "description": "Valid phone number in E.164 format.", "example": "6511111111" }, "countries": { "type": "array", "description": "The list of two-letter ISO 3166 country codes that the message has been sent to", "items": { "type": "string", "minLength": 2, "maxLength": 2, "example": "US" }, "example": [ "US", "SG" ] }, "limit": { "type": "integer", "description": "You also need to define if you would like to limit the number of records to fetch using the parameter ***limit*** and an integer value\n\nIf you do not want to put a limit on the number of records to retrieve, setting ***limit*** to 0 allows to set is as unlimited.\n\n- *NB: a longer time-span (eg: several months) and no limit on the records number will increase the time required to generate the logs file.*", "default": 0 }, "channelUserId": { "type": "string", "description": "Channel user identifier. When provided, the export is filtered to messages associated with this user. For WhatsApp, this is the business-scoped user identifier (BSUID) and takes the format: ISO 3166 alpha-2 two-letter country code, followed by a period, followed by up to 128 alphanumeric characters (for example, `US.13491208655302741918`).", "example": "US.13491208655302741918" } } } } }, "x-examples": { "application/json": { "from": "2020-07-01", "to": "2020-08-01T13:15:00+08:00", "limit": 500000, "channelUserId": "US.13491208655302741918" } } }, "description": "* Sending a **POST** request on this endpoint allows to **request an Messaging Apps logs file**.\n\n## URL\n\nThe 8x8 Messaging Apps `subAccountId` needs to be provided in the URL as shown below:\n`https://chatapps.8x8.com/api/v1/subaccounts/{subAccountID}/messages/exports`\n\n*You must replace `{subAccountId}` in the URL above with the subaccountid that you want to use.*" }, "parameters": [ { "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1lon/parameters/0" } ] }, "/api/v1/subaccounts/{subAccountId}/messages/exports/{jobId}": { "get": { "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "enum": [ "queued", "running", "succeeded", "failed", "cancelled", "empty", "error" ], "description": "Job status" }, "data": { "type": "array", "description": "The value presented in the response only when the status is \"succeeded\".\n\nArray of links to download the report. Links are valid until the time defined by `expires` value.", "items": { "type": "string" } }, "expires": { "type": "string", "description": "The value presented in the response only when the status is \"succeeded\".\n\nContains the UTC datetime after which the report won't be accessible anymore.", "example": "2020-07-01T06:58:41.74Z" } }, "title": "LogExportJobStatus" }, "examples": { "response": { "value": { "status": "succeeded", "data": [ "https://chatapps.8x8.com/api/v1/subaccounts/your_subAccountId/messages/download/long-unique-token-here" ], "expires": "2020-10-25T06:58:41.74Z" } } } } } }, "404": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1messages~1%7Bumid%7D/delete/responses/400/content/application~1json/schema" }, "examples": { "response": { "value": { "code": 4018, "message": "Invalid jobId", "errorId": "aa400d4b-fffe-ea11-8277-00155d4ff7ed", "timestamp": "2020-09-25T07:18:22.78Z" } } } } } } }, "summary": "Get log export job result", "operationId": "get-log-export-job-result-1", "tags": [ "Reporting API" ], "security": [ { "apiKey": [] } ], "description": "* Sending a **GET** request on this endpoint allows to **check the status of an Messaging Apps Logs export job** and to **get a download link** if its generation has succeeded.\n\n \n\n## URL\n\nTo define which SMS logs export you want to retrieve, you need to enter the Job ID generated by XXXXX in the path as well as the 8x8 SMS subaccountid you used in the previous request.\n`https://chatapps.8x8.com/api/v1/subaccounts/{subAccountID}/messages/exports/{jobId}`\n\n*You must replace `{jobID}` and `{subAccountId}` in the URL above with the jobID and subaccountid from the start SMS logs export job request*\n> To safeguard your privacy, sensitive data such as message content and phone numbers are masked by default. Access to this information can be requested by contacting our support team." }, "parameters": [ { "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1lon/parameters/0" }, { "name": "jobId", "in": "path", "required": true, "description": "Export job identifier", "schema": { "type": "string" } } ], "delete": { "responses": { "204": { "description": "" }, "404": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1messages~1%7Bumid%7D/delete/responses/400/content/application~1json/schema" }, "examples": { "response": { "value": { "code": 4018, "message": "Invalid jobId", "errorId": "aa400d4b-fffe-ea11-8277-00155d4ff7ed", "timestamp": "2020-09-25T07:18:22.78Z" } } } } } } }, "summary": "Cancel the log export job ", "operationId": "cancel-log-export-job-1", "tags": [ "Reporting API" ], "security": [ { "apiKey": [] } ], "description": "* Sending a **DELETE** request on this endpoint allows to **cancel a Messaging Apps Logs export job**.\n\n \n\n## URL\n\nTo define which SMS logs export you want to retrieve, you need to enter the Job ID generated by XXXXX in the path as well as the 8x8 SMS subaccountid you used in the previous request.\n`https://chatapps.8x8.com/api/v1/subaccounts/{subAccountID}/messages/exports/{jobId}`\n\n*You must replace `{jobID}` and `{subAccountId}` in the URL above with the jobID and subaccountid from the start SMS logs export job request*" } }, "/api/v1/subaccounts/{subAccountId}/messages/{umid}": { "get": { "responses": { "200": { "description": "The success response returned with the message details of the message specified by the umid. Since channel fallback is supported, a single message umid may have multiple message details records depending on the number of channels attempted.", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "umid": { "type": "string", "description": "Unique message ID automatically generated by 8x8.", "example": "dec02e44-c76f-4a0a-b69f-6ac2a4386eb9" }, "subAccountId": { "type": "string", "description": "Sub account id with which the message is associated with." }, "channel": { "type": "string", "description": "Name of the channel used to send the message. Possible values are *SMS*, *WhatsApp*, *RCS*, *Viber*, *Line*, *Facebook*, *WeChat*, *Zalo* or *Kakao*.", "example": "WhatsApp" }, "channelId": { "type": "string", "description": "Unique channel identifier. This property uniquely identifies the channel used to send the message when multiple channels of the same type are associated with one sub account.", "example": "8e4d1303-5754-e911-8154-020897df5459" }, "direction": { "type": "string", "description": "Direction of the message. Possible values are\n- **outbound:** Mobile terminated.\n- **inbound:** Mobile originated.", "example": "outbound" }, "country": { "type": "string", "description": "Two-letter ISO 3166 country code associated with the message.", "example": "SG" }, "status": { "title": "MessageStatus", "type": "object", "description": "Delivery status of the message. Status contains the following information.", "properties": { "state": { "type": "string", "description": "General status of the message. Possible values are\n- **unknown:** Status is not known. This is an exceptional/intermediate status. \n- **queued:** The request is accepted and queued for processing\n- **failed:** The request has been rejected by the api and will not be processed.\n- **sent:** The message has been sent to the operator and we have not received an acknowledgment yet.\n- **delivered:** Message has been delivered to destination and we have received confirmation from the operator.\n- **undelivered:** We have received a delivery receipt from the operator that the message was not delivered.\n- **read:** Message was delivered and read.\n- **ok:** Operation was successful\n- **error:** An error occurred during operation", "example": "delivered" }, "detail": { "type": "string", "description": "- **delivered_to_operator**: The message has been delivered to the operator. Associated with **delivered** state\n- **delivered_to_recipient**: The message has been delivered to the recipient. Associated with **delivered** state.\n- **rejected_by_operator**: The message has been rejected by the operator. Associated with **undelivered** status.\n- **undelivered_to_recipient**: The message has been delivered but rejected by the target device. Associated with **undelivered** state.", "example": "delivered_to_carrier" }, "errorCode": { "type": "integer", "description": "Error code for the operation" }, "errorMessage": { "type": "string", "description": "Description of the error.", "example": "Invalid message length" }, "timestamp": { "type": "string", "description": "Date and time when the status was observed expressed in ISO 8601 format.", "example": "2020-06-17T04:17:21.06Z", "format": "date-time" } } }, "user": { "type": "object", "description": "Information about the user the message is associated with.", "properties": { "msisdn": { "type": "string", "description": "Phone number (obfuscated to protect sensitive information) expressed in E.164 international format.", "example": "+63922110xxxx" }, "channelUserId": { "type": "string", "description": "Channel user identifier (obfuscated to protect sensitive data). For WhatsApp messages, this is the business-scoped user identifier (BSUID).", "example": "PH.26717025731320236" } } }, "contentType": { "type": "string", "example": "Text", "description": "Content type of the message. Possible values are *Text*, *Audio*, *Video*, *Image*, *Location*, *File*, *Carousel*, *List*, *Buttons* or *Template*." }, "content": { "type": "string", "example": "**MASKED**", "description": "Message content (obfuscated to protect sensitive information)." }, "createdAt": { "type": "string", "description": "Date and time the message was submitted to the api expressed in ISO 8601 format. ", "example": "2020-06-17T04:17:21.06Z" }, "clientMessageId": { "type": "string", "description": "Client message identifier." }, "clientBatchId": { "type": "string", "description": "Client batch identifier." }, "batchId": { "type": "string", "description": "Universaly unique batch identifier (UUID).", "example": "c9c01382-38bf-4e27-8962-ae0684ab56c3" }, "step": { "type": "integer", "example": 1, "description": "Indicates the attempt on which the channel was used. For instance, a message delivery may be failed via *Viber* and a fallback channel like *WhatsApp* may be attempted next. In this case, step 1 will contain message details for *Viber* and step 2 will contain the message details for *WhatsApp*." } }, "required": [ "umid", "subAccountId", "channel", "channelId", "direction", "status", "contentType", "createdAt", "step" ] } } }, "required": [ "data" ] }, "examples": { "response": { "value": { "data": [ { "umid": "dec02e44-c76f-4a0a-b69f-6ac2a4386eb9", "subAccountId": "sub_account_id", "channel": "WhatsApp", "channelId": "904d1303-5754-e911-8154-020897df5459", "direction": "Outbound", "status": { "state": "read", "timestamp": "2020-06-17T04:25:21.06Z" }, "contentType": "Text", "createdAt": "2020-06-17T04:15:21.06Z", "step": 2, "country": "SG", "user": { "msisdn": "+63922110xxxx", "channelUserId": "PH.26717025731320236" }, "content": "**MASKED**", "clientMessageId": "client message id", "clientBatchId": "client batch id", "batchId": "c9c01382-38bf-4e27-8962-ae0684ab56c3" } ] } } } } } }, "400": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1webhooks/get/responses/400" }, "401": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1webhooks/get/responses/401" }, "404": { "$ref": "#/paths/~1files~1%7Bfilename%7D/get/responses/404" }, "429": { "description": "Rate limiting quota exceeded error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1messages~1%7Bumid%7D/delete/responses/400/content/application~1json/schema" }, "example": { "code": 429, "message": "Quota exceeded. Please try again in 1 second(s).", "errorId": "c8a41b47-57bf-ea11-8273-00155d466a31", "timestamp": "2020-07-06T07:07:00.30Z" } } } } }, "tags": [ "Reporting API" ], "summary": "Retrieve message details", "description": "This resource can be used to query message details like delivery status using the UMID of the message. You need to specify the sub account id and the umid of the message in place of *{subAccountId}* and *{umid}* respectively. *umid* is the unique identifier (in the form of a uuid) you received when you submitted the message to the api.\n\n### API Rate Limiting\nTo protect the platform from being overloaded and maintain a high quality of service to all customers, we enforce API rate limits for this API endpoint.\n\nThe limit is set to 1 request/second per subaccount.\n> To safeguard your privacy, sensitive data such as message content and phone numbers are masked by default. Access to this information can be requested by contacting our support team.", "operationId": "get-chatapps-message-details", "security": [ { "apiKey": [] } ] }, "delete": { "tags": [ "Send Message API" ], "summary": "Cancel the scheduled message", "operationId": "cancel-scheduled-message-1", "description": "This resource can be used to cancel a scheduled message that has not been sent yet using the *unique message identifier* (`UMID`) of the message.\n\n### URL\nYou need to specify the *sub-account id* and the *umid* of the message in place of `{subAccountId}` and `{umid}` respectively. \n`umid` is the unique identifier you received when you submitted the message to the API.\n", "parameters": [ { "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1lon/parameters/0" }, { "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1messages~1%7Bumid%7D/parameters/1" } ], "security": [ { "apiKey": [] } ], "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "description": "", "type": "object", "x-examples": { "example-1": { "cancelledCount": 1 } }, "properties": { "cancelledCount": { "type": "integer", "description": "Number of cancelled messages" } }, "required": [ "cancelledCount" ] }, "examples": { "example-1": { "value": { "cancelledCount": 1 } } } } } }, "400": { "description": "This error response is returned if the request is invalid (e.g. umid is not a valid uuid).", "content": { "application/json": { "schema": { "title": "ErrorResponse", "required": [ "code", "errorId", "timestamp" ], "type": "object", "properties": { "code": { "type": "integer", "description": "Error code" }, "message": { "type": "string", "description": "Error description" }, "errorId": { "type": "string", "description": "Unique id of error. You can use it as reference when sending enquiries to 8x8 support", "format": "uuid" }, "timestamp": { "type": "string", "description": "Data and time of the error occurence", "format": "date-time" } }, "description": "Response in case of error", "example": { "code": 1001, "message": "Provided subAccountId doesn't belongs to your account", "errorId": "91b106f0-c0da-4aba-a43a-7af9c5893a80", "timestamp": "2017-04-19T02:31:19.4297387+00:00" } }, "example": { "code": 1000, "message": "Invalid umid.", "errorId": "fbb239f1-2eb1-ea11-afa9-00155db6eaf4", "timestamp": "2020-06-18T06:42:57.20Z" } } } }, "401": { "description": "Request was not authenticated response", "content": { "application/json": { "schema": { "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1messages~1%7Bumid%7D/delete/responses/400/content/application~1json/schema" }, "example": { "code": 1200, "message": "Request was not authenticated properly", "errorId": "db9dced4-3534-4d86-9d18-6b448af0d621", "timestamp": "2018-08-02T09:42:38.8988997+00:00" } } } }, "404": { "description": "This error response is returned if there is a message by the specified sub account and umid does not exist.", "content": { "application/json": { "schema": { "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1messages~1%7Bumid%7D/delete/responses/400/content/application~1json/schema" }, "example": { "code": 1300, "message": "Message not found.", "errorId": "1949a467-2db1-ea11-afa9-00155db6eaf4", "timestamp": "2020-06-18T06:31:58.11Z" } } } } } }, "parameters": [ { "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1lon/parameters/0" }, { "name": "umid", "in": "path", "description": "Unique message Id, generated by 8x8 API.", "required": true, "schema": { "type": "string" } } ] }, "/api/v1/accounts/{accountId}/webhooks": { "parameters": [ { "name": "accountId", "in": "path", "description": "You must replace *{accountId}* with the accountid that you want to use.", "required": true, "schema": { "maxLength": 36, "minLength": 32, "pattern": "^[0-9A-Fa-f]{8}[-]?(?:[0-9A-Fa-f]{4}[-]?){3}[0-9A-Fa-f]{12}$", "type": "string" } } ], "get": { "tags": [ "Webhook Configuration API" ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "title": "Webhook", "description": "The webhook model", "properties": { "subAccountId": { "type": "string", "description": "- Sets the subaccount scope of the webhook.\n- Use `*` to receive events across all subAccounts.\n- Use the `subAccountId` to receive events for a specific subaccount.", "example": "Onion_Marketing" }, "url": { "type": "string", "format": "uri", "example": "http://example.com", "description": "The `url` to use for the webhook (8x8 platform will send events to this URL)." }, "httpAuthorization": { "type": "string", "description": "The static HTTP `Authorization` header value sent with every webhook request. Masked as `***` in GET responses.", "example": "***" }, "enabled": { "type": "boolean", "example": false, "description": "Use this flag to enable or disable a Webhook.", "default": true }, "oauth": { "type": "object", "description": "OAuth 2.0 Client Credentials configuration for webhook authentication. When configured, the platform will obtain an access token from the specified token endpoint and include it in the webhook request. The `clientSecret` is masked (`***`) in GET responses.", "properties": { "url": { "type": "string", "format": "uri", "description": "The token endpoint URL used to obtain the OAuth access token.", "example": "https://auth.example.com/oauth/token" }, "clientId": { "type": "string", "description": "The client ID for OAuth authentication.", "example": "my-client-id" }, "clientSecret": { "type": "string", "description": "The client secret for OAuth authentication. Masked as `***` in GET responses.", "example": "***" }, "credentialsLocation": { "type": "string", "enum": [ "header", "body" ], "description": "Specifies where the client credentials are sent: `header` (HTTP Basic Auth) or `body` (form body).", "example": "header" }, "scope": { "type": "string", "description": "Optional space-separated list of OAuth scopes to request.", "example": "read write" } }, "required": [ "url", "clientId", "clientSecret", "credentialsLocation" ] } }, "required": [ "subAccountId", "url" ] } }, "examples": { "response": { "value": [ { "type": "CADR", "subAccountId": "Onion_Marketing", "url": "http://example.com/dr/marketing", "enabled": true, "oauth": { "url": "https://auth.example.com/oauth/token", "clientId": "my-client-id", "clientSecret": "***", "credentialsLocation": "header", "scope": "read write" } }, { "type": "MSG", "subAccountId": "Onion_Marketing", "url": "http://example.com/dr/sales", "enabled": true, "httpAuthorization": "***" }, { "type": "MSG", "subAccountId": "*", "url": "http://example.com/dr/general", "enabled": true }, { "type": "CABM", "subAccountId": "*", "url": "http://example.com/mo/general", "enabled": false } ] } } } } }, "400": { "description": "Bad request error response", "content": { "application/json": { "schema": { "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1messages~1%7Bumid%7D/delete/responses/400/content/application~1json/schema" }, "example": { "code": 1002, "message": "Invalid MSISDN format (not E.164 international number)", "errorId": "b4478860-b76c-e811-814e-022a35cc1c71", "timestamp": "2018-08-04T09:25:40.9235752+00:00" } } } }, "401": { "description": "Request was not authenticated response", "content": { "application/json": { "schema": { "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1messages~1%7Bumid%7D/delete/responses/400/content/application~1json/schema" }, "example": { "code": 1200, "message": "Request was not authenticated properly", "errorId": "db9dced4-3534-4d86-9d18-6b448af0d621", "timestamp": "2018-08-02T09:42:38.8988997+00:00" } } } }, "500": { "$ref": "#/paths/~1files~1%7Bfilename%7D/get/responses/500" } }, "summary": "Get all Webhooks for Account", "operationId": "Get-Webhooks-1", "security": [ { "apiKey": [] } ], "description": "Sending a GET request on this endpoint allows to **retrieve a list of all the webhooks or a specific webhook configured for an account**." }, "post": { "tags": [ "Webhook Configuration API" ], "responses": { "200": { "description": "The webhook was created or updated successfully" }, "400": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1webhooks/get/responses/400" }, "401": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1webhooks/get/responses/401" }, "500": { "$ref": "#/paths/~1files~1%7Bfilename%7D/get/responses/500" } }, "summary": "Create or Replace webhooks", "operationId": "Add-Webhooks-1", "requestBody": { "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "title": "Webhook", "description": "The webhook model", "properties": { "subAccountId": { "type": "string", "description": "- Sets the subaccount scope of the webhook.\n- Use `*` to receive events across all subAccounts.\n- Use the `subAccountId` to receive events for a specific subaccount.", "example": "Onion_Marketing" }, "url": { "type": "string", "format": "uri", "example": "http://example.com", "description": "The `url` to use for the webhook (8x8 platform will send events to this URL)." }, "httpAuthorization": { "type": "string", "description": "A static value sent as the HTTP `Authorization` header with every webhook request. Use this for static credentials such as API keys or pre-shared tokens.\n\n**Example — Basic Authorization:**\n- Encode `user:password` in base64 (e.g. `dXNlcjpwYXNzd29yZA==`)\n- Set this field to `Basic dXNlcjpwYXNzd29yZA==`\n\n> For OAuth 2.0 Client Credentials flow, leave this field empty and use the `oauth` property instead.", "example": "Bearer 9QQhlsEb8VY" }, "enabled": { "type": "boolean", "example": false, "description": "Use this flag to enable or disable a Webhook.", "default": true }, "type": { "type": "string", "enum": [ "CADR", "MSG", "CABM" ], "description": "This parameter is not mandatory.\n- Sets the type of webhook to be added/updated.\n- Possible values are:\n * `CADR` for delivery receipts\n * `MSG` for inbound messages\n * `CABM` for Messaging Apps Business Management Updates\n- When not provided, webhooks will be added/updated for only CADR and MSG." }, "oauth": { "type": "object", "description": "OAuth 2.0 Client Credentials configuration for webhook authentication. When configured, the platform will obtain an access token from the specified token endpoint and include it in the webhook request.", "properties": { "url": { "type": "string", "format": "uri", "description": "The token endpoint URL used to obtain the OAuth access token.", "example": "https://auth.example.com/oauth/token" }, "clientId": { "type": "string", "description": "The client ID for OAuth authentication.", "example": "my-client-id" }, "clientSecret": { "type": "string", "description": "The client secret for OAuth authentication.", "example": "my-client-secret" }, "credentialsLocation": { "type": "string", "enum": [ "header", "body" ], "description": "Specifies where the client credentials are sent: `header` (HTTP Basic Auth) or `body` (form body).", "example": "header" }, "scope": { "type": "string", "description": "Optional space-separated list of OAuth scopes to request.", "example": "read write" } }, "required": [ "url", "clientId", "clientSecret", "credentialsLocation" ] } }, "required": [ "subAccountId", "url" ] } }, "examples": { "no authorization": { "summary": "Without authorization", "value": [ { "subAccountId": "Onion_Marketing", "url": "http://example.com/DR/marketing", "enabled": true }, { "subAccountId": "*", "url": "http://example.com/mo/general", "enabled": true, "type": "MSG" } ] }, "basic authorization": { "summary": "With Basic Authorization", "value": [ { "subAccountId": "Onion_Marketing", "url": "http://example.com/DR/marketing", "enabled": true, "httpAuthorization": "Basic dXNlcjpwYXNzd29yZA==" } ] }, "oauth": { "summary": "With OAuth", "value": [ { "subAccountId": "Onion_Marketing", "url": "http://example.com/DR/marketing", "enabled": true, "oauth": { "url": "https://auth.example.com/oauth/token", "clientId": "my-client-id", "clientSecret": "my-client-secret", "credentialsLocation": "header", "scope": "read write" } } ] } } } } }, "security": [ { "apiKey": [] } ], "description": "Sending a POST request on this endpoint allows to **add a new webhook for an account or modify the configuration of an existing one** . \n\nWebhooks can be given an account-wide and/or a type-wide scope using the \\* character \n\nFor example: if a webhook is created with subAccount=\\* , this webhook will receive events across all the subaccounts of an account." }, "delete": { "tags": [ "Webhook Configuration API" ], "responses": { "200": { "description": "The webhook was deleted successfully" }, "400": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1webhooks/get/responses/400" }, "401": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1webhooks/get/responses/401" }, "500": { "$ref": "#/paths/~1files~1%7Bfilename%7D/get/responses/500" } }, "summary": "Delete webhooks", "operationId": "Delete-Webhooks-1", "requestBody": { "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "title": "Webhook Delete", "description": "The webhook-delete model", "properties": { "subAccountId": { "type": "string", "description": "- Used to target which webhook to deactivate based on the subaccount it is configured for.\n- Use the `subaccountid` of the webhook to target a webhook set for a specific subaccount.\n- Use `*` to target a webhook with a subAccount-wide scope.", "example": "Onion_Marketing" }, "type": { "type": "string", "enum": [ "CADR", "MSG", "CABM" ], "description": "This parameter is not mandatory.\n- Sets the type of webhook to be delete.\n- Possible values are:\n * `CADR` for delivery receipts\n * `MSG` for inbound messages\n * `CABM` for Messaging Apps Business Management Updates\n- When not provided, webhooks will be deleted for only CADR and MSG." } }, "required": [ "subAccountId" ] } } } }, "description": "For this request, the subaccount and type (both required) are used to identify which webhook to target and delete.\n\n*NB: the * character will only be used for targeting webhooks configured with a global subaccount or global product scope: it does not act as a wild-card to delete all webhooks.*", "x-examples": { "application/json": [ { "subAccountId": "Onion_Marketing" }, { "subAccountId": "*" } ] } }, "security": [ { "apiKey": [] } ], "description": "Sending a DELETE request on this endpoint allows to **remove a configured webhook for an account or a subaccount** ." } }, "/api/v1/subaccounts/{subAccountId}/messages/batch/{batchId}": { "delete": { "tags": [ "Send Message API" ], "summary": "Cancel batch of scheduled message", "description": "- Sending a DELETE request on this this endpoint allows to **cancel a batch of scheduled messages** that has not been sent yet.\n- This method should be used to cancel a batch of scheduled messages sent by previously submitting a POST request to either the \"many\" or \"many compact\" endpoint.\n- To cancel a batch of scheduled messages, use its *batchId* to target it.\n\n### URL\n* In the original POST request used to schedule the batch of messages, you used a specific subaccountid and the API responded with a batchID.\n* You need to use both as path parameters in order to send your DELETE request successfully as shown below:\n`https://chatapps.8x8.com/api/v1/subaccounts/{subAccountId}/messages/batch/{batchId}`\n\n> You must replace `{subAccountId}` and `{batchId}` in the URL above with the subaccountid you used to schedule the messages in the first place and the batchId you got in response.", "operationId": "cancel-many-chat-apps-messages", "parameters": [ { "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1lon/parameters/0" }, { "name": "batchId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "cancelledCount": { "type": "integer", "description": "Number of cancelled messages" } } }, "example": { "cancelledCount": 10 } } } }, "400": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1webhooks/get/responses/400" }, "401": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1webhooks/get/responses/401" }, "500": { "$ref": "#/paths/~1files~1%7Bfilename%7D/get/responses/500" } }, "security": [ { "apiKey": [] } ] } }, "/api/v1/subaccounts/{subAccountId}/files": { "post": { "parameters": [ { "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1lon/parameters/0" } ], "responses": { "201": { "description": "Success response", "headers": { "Location": { "description": "The relative path of the uploaded file. E.g., '/files/a35079cf316.txt?token=CfDJ8OYraJuXjBNOtG3'.", "schema": { "type": "string", "format": "uri" }, "example": "/files/a35079cf316.txt?token=CfDJ8OYraJuXjBNOtG3" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "fileName": { "type": "string", "description": "File name of the uploaded file." }, "token": { "type": "string", "description": "A token required for downloading the uploaded file." } }, "required": [ "fileName", "token" ], "description": "Successful file upload response", "title": "File upload response" }, "examples": { "response": { "value": { "fileName": "a35079cf31654554901f132605d03b7f.jpeg", "token": "CfDJ8LDJllfRzmJJqm5aey-8vihWOltfV6hJvmT_hJ0UihEfy3TaXXx2rVO5yjakRHn7VZGyeWRVxU_cTLedSm_c7JoQGdXWktv96CBYUdMg3cGD2I0Uvru6oSj5SjdiF2ggsoeH8bXxxiwhb9qYXRrc4Qk1CdMj2yLAIKFxXBSXIn2VLng-EYPpyB-OYihYAxsCEfDQ0e5Xd6Y0fhfsotvTxjR" } } } } } }, "400": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1webhooks/get/responses/400" }, "401": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1webhooks/get/responses/401" }, "413": { "description": "Payload too large", "content": { "application/json": { "schema": { "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1messages~1%7Bumid%7D/delete/responses/400/content/application~1json/schema" }, "example": { "code": 7001, "message": "Request size must not exceed 100 MB", "errorId": "7aea5f0a-712c-4b0f-b751-b35400b3feae", "timestamp": "2018-08-04T09:25:40.9235752+00:00" } } } }, "500": { "$ref": "#/paths/~1files~1%7Bfilename%7D/get/responses/500" } }, "requestBody": { "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "file": { "type": "object", "description": "The file. Refer to https://developer.8x8.com/connect/reference/supported-chat-apps-content-type#whatsapp for the accepted file types and sizes." } }, "required": [ "file" ], "title": "File upload request", "description": "File upload request" }, "examples": { "Upload a JPEG image file": { "value": { "file": {} } } } } } }, "operationId": "Upload-File", "summary": "Upload file", "tags": [ "File Upload API" ] } }, "/files/{filename}": { "get": { "parameters": [ { "schema": { "type": "string", "example": "5e0e61c3452d4a5384f57f8622cb0c40.png" }, "in": "path", "name": "filename", "description": "File name with extension", "required": true }, { "schema": { "type": "string", "example": "CfDJ8LDJllfRzmJJqm5aey-8vihWOltfV6hJvmT_hJ0UihEfy3TaXXx2rVO5yjakRHn7VZGyeWRVxU_cTLedSm_c7JoQGdXWktv96CBYUdMg3cGD2I0Uvru6oSj5SjdiF2ggsoeH8bXxxiwhb9qYXRrc4Qk1CdMj2yLAIKFxXBSXIn2VLng-EYPpyB-OYihYAxsCEfDQ0e5Xd6Y0fhfsotvTxjR" }, "in": "query", "name": "token", "description": "File token" } ], "responses": { "302": { "description": "Redirect to download URL if the file is found.", "content": {} }, "404": { "description": "The entity doesn't exist", "content": { "application/json": { "schema": { "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1messages~1%7Bumid%7D/delete/responses/400/content/application~1json/schema" }, "example": { "code": 4018, "message": "Invalid jobId", "errorId": "aa400d4b-fffe-ea11-8277-00155d4ff7ed", "timestamp": "2020-09-25T07:18:22.78Z" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1messages~1%7Bumid%7D/delete/responses/400/content/application~1json/schema" }, "example": { "code": 2000, "message": "Internal server error", "errorId": "db9dced4-3534-4d86-9d18-6b448af0d621", "timestamp": "2018-07-02T09:42:38.8988997+00:00" } } } } }, "operationId": "Download-File", "summary": "Download file", "tags": [ "File Upload API" ] } }, "/api/v1/accounts/{accountId}/usage/messages": { "get": { "operationId": "get-message-usage", "summary": "Get message usage", "description": "Returns monthly per-message usage totals for the specified billing period. Results can be filtered and grouped by subaccount, business account, channel, pricing category, and destination country.\n\nCurrently, only WhatsApp is supported.\n\n**Constraints:**\n- Data is available from **February 2026** onwards\n- Only **closed billing periods** can be queried\n- Maximum lookback: **6 months**\n\n**Grouping behavior:**\n- If `groupBy` is omitted, a single aggregated total is returned\n- `pricing` is included when `groupBy` contains `channel`, `businessAccountId`, `pricingCategory`, and `country`", "tags": [ "Reporting API" ], "parameters": [ { "name": "accountId", "in": "path", "required": true, "description": "You must replace *{accountId}* with the account ID that you want to use.", "schema": { "type": "string" } }, { "name": "billingPeriod", "in": "query", "required": true, "description": "The billing month to query, in `YYYY-MM` format (e.g. `2026-03`). Must be a closed billing period from February 2026 or later. Maximum lookback is 6 months.", "schema": { "type": "string", "pattern": "^\\d{4}-(0[1-9]|1[0-2])$", "example": "2026-03" } }, { "name": "channel", "in": "query", "required": false, "description": "Filter results by messaging channel. Currently, only `whatsapp` is supported. Defaults to `whatsapp` if omitted.", "schema": { "type": "string", "enum": [ "whatsapp" ], "example": "whatsapp" } }, { "name": "groupBy", "in": "query", "required": false, "description": "Comma-separated list of dimensions to group results by. When omitted, a single aggregated total is returned. `pricing` is included when `groupBy` contains `channel`, `businessAccountId`, `pricingCategory`, and `country`.\n\nAvailable values: `subAccountId`, `channel`, `businessAccountId`, `pricingCategory`, `country`.", "schema": { "type": "string", "example": "subAccountId,channel,businessAccountId,pricingCategory,country" } } ], "responses": { "200": { "description": "Successful response containing message usage data.", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "description": "List of usage records, grouped according to the `groupBy` parameter.", "items": { "type": "object", "properties": { "subAccountId": { "type": "string", "description": "Sub-account identifier. Present when `subAccountId` is included in `groupBy`.", "example": "umsg_AGG001" }, "channel": { "type": "string", "enum": [ "whatsapp" ], "description": "Messaging channel. Present when `channel` is included in `groupBy`.", "example": "whatsapp" }, "country": { "type": "string", "description": "ISO 3166-1 alpha-2 destination country code. Present when `country` is included in `groupBy`.", "example": "IN" }, "businessAccountId": { "type": "string", "description": "Business account identifier associated with the messaging provider. For WhatsApp, this represents the WhatsApp Business Account (WABA) ID. Present when `businessAccountId` is included in `groupBy`.", "example": "120xx01234567890" }, "pricingCategory": { "type": "string", "description": "Message pricing category. For WhatsApp: `utility`, `marketing`, `authentication`, `authentication_international`, `service`. Present when `pricingCategory` is included in `groupBy`.", "example": "utility" }, "volume": { "type": "object", "description": "Message volume breakdown.", "properties": { "delivered": { "type": "integer", "description": "Total number of delivered messages.", "example": 479100 }, "charged": { "type": "integer", "description": "Number of messages that were charged.", "example": 437900 }, "free": { "type": "integer", "description": "Number of messages delivered at no charge.", "example": 41200 } } }, "pricing": { "type": "object", "description": "Pricing structure. Present when `groupBy` includes `channel`, `businessAccountId`, `pricingCategory`, and `country`.", "properties": { "rateModel": { "type": "string", "enum": [ "flat", "tiered" ], "description": "The pricing rate model applied to this combination.", "example": "tiered" }, "tiers": { "type": "array", "description": "Tier breakdown. Only present when `rateModel` is `tiered`.", "items": { "type": "object", "properties": { "from": { "type": "integer", "description": "Lower bound of this tier (inclusive).", "example": 0 }, "to": { "type": "integer", "description": "Upper bound of this tier (inclusive). `null` indicates an openended bracket with no upper limit.", "example": 250000 }, "quantity": { "type": "integer", "description": "Number of messages that fall within this tier.", "example": 250000 }, "status": { "type": "string", "enum": [ "completed" ], "description": "Indicates the tier was fully settled. Always `completed` since only closed billing periods can be queried.", "example": "completed" } } } } } } } } }, "meta": { "type": "object", "description": "Metadata about the request and result set.", "properties": { "accountId": { "type": "string", "description": "The account ID used in the request.", "example": "bp-xxx" }, "billingPeriod": { "type": "object", "properties": { "start": { "type": "string", "format": "date", "description": "Start date of the billing period.", "example": "2026-03-01" }, "end": { "type": "string", "format": "date", "description": "End date of the billing period.", "example": "2026-03-31" }, "status": { "type": "string", "enum": [ "closed" ], "description": "The billing period status. Always `closed` since only closed billing periods can be queried.", "example": "closed" } } }, "dataAsOf": { "type": "string", "format": "date-time", "description": "Timestamp the final data snapshot for this billing period.", "example": "2026-03-16T12:00:00Z" }, "groupBy": { "type": "array", "description": "The `groupBy` dimensions applied to this query.", "items": { "type": "string" }, "example": [ "subAccountId", "channel", "businessAccountId", "pricingCategory", "country" ] }, "currency": { "type": "string", "description": "Currency used for pricing amounts (ISO 4217 code).", "example": "USD" } } } } }, "examples": { "full-groupby": { "summary": "Response with full groupBy (includes pricing)", "value": { "data": [ { "subAccountId": "umsg_AGG001", "channel": "whatsapp", "country": "IN", "businessAccountId": "120xx01234567890", "pricingCategory": "utility", "volume": { "delivered": 479100, "charged": 437900, "free": 41200 }, "pricing": { "rateModel": "tiered", "tiers": [ { "from": 0, "to": 250000, "quantity": 250000, "status": "completed" }, { "from": 250001, "to": 500000, "quantity": 187900, "status": "completed" } ] } }, { "subAccountId": "umsg_AGG001", "channel": "whatsapp", "country": "IN", "businessAccountId": "120xx01234567890", "pricingCategory": "marketing", "volume": { "delivered": 1234, "charged": 1234, "free": 0 }, "pricing": { "rateModel": "flat" } } ], "meta": { "accountId": "bp-xxx", "billingPeriod": { "start": "2026-03-01", "end": "2026-03-31", "status": "closed" }, "dataAsOf": "2026-03-16T12:00:00Z", "groupBy": [ "subAccountId", "channel", "businessAccountId", "pricingCategory", "country" ], "currency": "USD" } } }, "aggregated-only": { "summary": "Response without groupBy (aggregated volume only)", "value": { "data": [ { "volume": { "delivered": 480334, "charged": 439134, "free": 41200 } } ], "meta": { "accountId": "bp-xxx", "billingPeriod": { "start": "2026-03-01", "end": "2026-03-31", "status": "closed" }, "dataAsOf": "2026-03-16T12:00:00Z", "groupBy": [], "currency": "USD" } } } } } } }, "400": { "description": "Bad request. The billing period format is invalid, the period is not yet closed, the date is before February 2026, or the lookback exceeds 6 months.", "content": { "application/json": { "schema": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1webhooks/get/responses/400/content/application~1json/schema" } } } }, "401": { "description": "Request was not authenticated.", "content": { "application/json": { "schema": { "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1webhooks/get/responses/400/content/application~1json/schema" } } } } }, "security": [ { "apiKey": [] } ] } } }, "components": { "schemas": { "RcsContentInfo": { "type": "object", "description": "Information about the media file.", "properties": { "fileUrl": { "type": "string", "format": "uri", "description": "Publicly accessible URL of the media file." }, "thumbnailUrl": { "type": "string", "format": "uri", "description": "Publicly accessible URL of the thumbnail for the media." }, "forceRefresh": { "type": "boolean", "description": "If set to true, the RCS platform will fetch the file again even if it has been cached.", "default": false } }, "required": [ "fileUrl" ] }, "RcsCardMedia": { "type": "object", "description": "Media content of the card.", "properties": { "height": { "type": "string", "description": "Height of the media within the card.", "enum": [ "short", "medium", "tall" ], "example": "short" }, "contentInfo": { "$ref": "#/components/schemas/RcsContentInfo" } }, "required": [ "contentInfo" ] } }, "parameters": { "group-id": { "name": "groupId", "in": "path", "required": true, "description": "Chat group ID", "schema": { "type": "string" } }, "whatsapp-id": { "name": "whatsAppId", "in": "path", "required": true, "description": "WhatsApp instance id", "schema": { "type": "string" } } }, "responses": { "webhook": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } } }, "securitySchemes": { "apiKey": { "type": "http", "scheme": "bearer", "description": "* 8x8 SMS API accepts an **ApiKey Bearer Token** authentication method.\n\n* You can generate tokens from your customer portal [https://connect.8x8.com/](https://connect.8x8.com/)\n\n* You need to include the following header in your requests: `Authorization: Bearer {apiKey}`\n\n> **Note**: Replace the `{apiKey}` placeholder with the key generated from the customer portal.\n---\nIf you haven't created your account yet, please go to 8x8 website [https://connect.8x8.com](https://connect.8x8.com) to sign up.\n" } } }, "security": [ { "apiKey": [] } ] }