Send message
POST https://chatapps.8x8.com/api/v1/subaccounts/:subAccountId/messages
This endpoint is used to send Messaging Apps messages individually (1 request per message). It is ideal to send single personalized messages for use-cases like notifications or alerting for example.
For WhatsApp: When sending a 'text' type message, we will try to match it with registered WhatsApp templates under your account If matching is successful, the message will be submitted as a template to WhatsApp, if not as a normal message
To bypass the template matching and send template only, you can select type 'template' In this case, you need to provide template name, language and parameters
WhatsApp Call Permission Request: You can request permission to call a customer using either:
- Interactive message: Set type to 'interactive' with interactive.type as 'call_permission_request'. The body field is optional.
- Template message: Set type to 'template' with your approved Call Permission Request template name and language.
More examples on how this endpoint can be used are available here: Usage examples
Request
Path Parameters
Possible values: >= 3 characters and <= 50 characters, Value must match regular expression ^[A-Za-z0-9\-._&]{3,50}$
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.
Body
Messaging Apps API: request model for send single message
- If the type is "text", then content object should contain a "text" parameter.
- If the type is "image", "audio", "video" or "file", then content object should contain a "url" parameter and all other parameters can be used.
- If the type is "location", then content object should contain a "latitude", "longitude" parameters.
- If the type is "interactive", then content object should contain an "interactive" parameter.
- If the type is "template", then content object should contain a "template" parameter.
- If the type is "carousel", then content object should contain a "carousel" parameter. Supported for RCS channel only.
- If the type is "richCard", then content object should contain a "richCard" parameter. Supported for RCS channel only.
-
textmessages. -
interactivemessages of typecta_url, with a single Call-to-Action URL button defined viainteractive.action.parameters. -
interactivemessages of typebutton(Reply Buttons), with 1–3 buttons. - For
interactivemessages, onlytextheaders are supported. - Array [
- ]
- Array [
- Array [
- ]
- Array [
- ]
- ]
- Array [
- Array [
- ]
- Array [
- Array [
- Array [
- ]
- ]
- ]
- ]
- Array [
- ]
- Array [
- Array [
- ]
- ]
- Array [
- ]
- Array [
- ]
user objectrequired
User information
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.
+6500000000
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)
Possible values: <= 2 characters
SG
LINE user ID of the recipient. Use this instead of msisdn when sending messages to a LINE user via the Line Official Account channel.
Ua12b345678c1de0fg1a1234567891011
Client managed id for the message : your own unique reference
Possible values: <= 50 characters
abc-123
Messaging Apps message content type. Allowed values are "text", "image", "audio", "video", "file", "location", "interactive", "template", "carousel" and "richCard".
Possible values: [text, audio, video, image, location, file, interactive, template, carousel, richCard]
Text
content objectrequired
Content of the message
Message body - the text of the message
Possible values: <= 35000 characters
Hello
whatsApp object
WhatsApp-specific message settings. Only applies when the message is delivered via the WhatsApp channel.
directSend object
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.
Direct Send supports the following message subset:
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.
Possible values: [utility]
utility
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).
Possible values: >= 30 and <= 43200
600
Public URL of where the rich content is stored.
http://example.com
In case SMS fallback is triggered, message body - the text of the message
Possible values: <= 35000 characters
you can check your account by http://example.com
sms object
If the SMS fallback is triggered, here are the SMS settings
Encoding for the text of the message. "AUTO", "GSM7" and "UCS2"
Possible values: [AUTO, GSM7, UCS2]
AUTO
Source number (SenderId) - "From" field for SMS. Max length 16 chars.
Possible values: <= 16 characters
Info
location object
Location object. Required for "location" type
Latitude
12.345
Longitude
12.345
Text that will appear below the generic map at the top of the message
Pablo Morales
Address that will appear below the generic map at the top of the message
1 Hacker Way, Menlo Park, CA 94025
interactive object
This is an interactive message. Type and Action are required properties
The type of interactive message you want to send.
Possible values: [button, list, product, product_list, cta_url, flow, call_permission_request, voice_call, location_request_message]
button
action object
Action you want the user to perform after reading the message.
Required for List Messages.
Button content. It cannot be an empty string and must be unique within the message. Emojis are supported, markdown is not.
Possible values: <= 20 characters
buttons object[]
Required for Reply Buttons.
Possible values: <= 3
Type of button
Possible values: [reply]
reply
reply object
The id and title properties are required.
Unique identifier for your button. This ID is returned in the webhook when the button is clicked by the user.
Possible values: <= 256 characters
Button title. It cannot be an empty string and must be unique within the message. Emojis are supported, markdown is not.
Possible values: <= 20 characters
Required for Single Product Messages and Multi-Product Messages.
Unique identifier of the Facebook catalog linked to your WhatsApp Business Account.
Required for Single Product Messages and Multi-Product Messages.
Unique identifier of the product in a catalog.
Required to be send_location for Location Request Message.
sections object[]
Array of section objects.
Possible values: >= 1, <= 10
rows object[]
Required for List Messages.
Contains a list of rows. You can have a total of 10 rows across your sections.
The id and title properties are required.
Possible values: <= 200 characters
Possible values: <= 24 characters
Possible values: <= 72 characters
product_items object[]
Required for Multi-Product Messages.
Array of product objects. There is a minimum of 1 product per section and a maximum of 30 products across all sections.
Required for Multi-Product Messages. Unique identifier of the product in a catalog. The product_retailer_id property is required.
Required if the message has more than one section.
Title of the section.
Possible values: <= 24 characters
parameters object
Required for Call-to-Action Url (cta_url) and voice_call messages.
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.
Possible values: <= 20 characters
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.
Possible values: >= 1 and <= 43200
10080
10
Optional for voice_call. Customer-defined payload. Max 512 characters.
Possible values: <= 512 characters
URL to load in the device's default web browser when tapped by user.
Required for Flow messages. Unique ID of the Flow provided by WhatsApp.
859504979861628
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).
Possible values: <= 30 characters
Get Recommendations
Optional for Flow messages. Either "navigate" or "data_exchange". Defaults to "navigate" if not provided.
Possible values: [navigate, data_exchange]
navigate
navigate
flowActionPayload object
Optional for Flow messages. Should only be used when flowAction is "navigate". Should be omitted otherwise.
Optional. The ID of the screen displayed first. It needs to be an entry screen. Defaults to "FIRST_ENTRY_SCREEN" if not provided.
FIRST_ENTRY_SCREEN
RECOMMEND
data object
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.
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.
{"product_id":"12345","user_name":"John Doe","campaign_id":"summer_sale_2024"}
header object
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.
document object
Required when type is audio, document, image, sticker, or video and you are not using a link.
The media object ID. Do not use this field when message type is set to text.
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).
The protocol and URL of the media to be sent. Use only with HTTP/HTTPS URLs.
Describes the specified image, document, or video media.
Do not use with audio or sticker media.
Describes the filename for the specific document. Use only with document media.
The extension of the filename will specify what format the document is displayed as in WhatsApp.
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.
image object
Required when type is audio, document, image, sticker, or video and you are not using a link.
The media object ID. Do not use this field when message type is set to text.
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).
The protocol and URL of the media to be sent. Use only with HTTP/HTTPS URLs.
Describes the specified image, document, or video media.
Do not use with audio or sticker media.
Describes the filename for the specific document. Use only with document media.
The extension of the filename will specify what format the document is displayed as in WhatsApp.
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.
text object
Required when type is audio, document, image, sticker, or video and you are not using a link.
The media object ID. Do not use this field when message type is set to text.
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).
The protocol and URL of the media to be sent. Use only with HTTP/HTTPS URLs.
Describes the specified image, document, or video media.
Do not use with audio or sticker media.
Describes the filename for the specific document. Use only with document media.
The extension of the filename will specify what format the document is displayed as in WhatsApp.
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.
The header type you would like to use. The type property is required.
Possible values: [text, video, image, document]
text
video object
Required when type is audio, document, image, sticker, or video and you are not using a link.
The media object ID. Do not use this field when message type is set to text.
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).
The protocol and URL of the media to be sent. Use only with HTTP/HTTPS URLs.
Describes the specified image, document, or video media.
Do not use with audio or sticker media.
Describes the filename for the specific document. Use only with document media.
The extension of the filename will specify what format the document is displayed as in WhatsApp.
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.
body object
Optional for type 'product' and 'call_permission_request'. Required for other message types.
An object with the body of the message.
The content of the message. Emojis and markdown are supported. The text property is required.
Possible values: <= 1024 characters
footer object
An object with the footer of the message. You cannot set a footer for location request message type
The footer content. Emojis, markdown, and links are supported. The text property is required.
Possible values: <= 60 characters
video object
Video object. Required for "video" type
ThumbNail
http://example.com/video.jpg
Video File Size (in bytes)
120
Duration of video (in seconds)
10
image object
Image object. Used for Line channel to specify thumbnail for image messages.
URL of the thumbnail preview image
https://www.example.com/thumbnail.jpg
audio object
Audio object. Used for Line channel to specify duration for audio messages.
Duration of audio in seconds
300
template object
Template data. Mandatory for "template" message type
Template name to use
auto_reply_message_en_us
Template language code to use
en_US
components object[]
List of template components
Component type. Possible values are "header", "footer", "body", "button", "carousel", "call_permission_request"
Possible values: [header, footer, body, button, carousel, call_permission_request]
body
parameters object[]
Parameters list to use for template placeholders.
Parameter type. Possible values are "text", "image", "gif", "video", "document", "location", "payload", "couponCode", "action", "ttlMinutes".
Use "payload" type to define the payload that will be returned when the button in the interactive message is clicked. Use "action" type for Flow button parameters. Use "ttlMinutes" for VoiceCall button only — overrides the template-level TTL at send time. Using ttlMinutes on any other subtype returns an error.
Possible values: [text, image, gif, video, document, location, payload, couponCode, action, ttlMinutes]
Text for "text" parameter type
To be or not to be
Required for "image", "gif", "video", "document" parameter types.
Resource URL.
Note: For type = gif, the url must point to a Video file type, not a .gif.
http://example.com
location object
Required for "location" parameter type.
Location object.
Latitude
12.345
Longitude
12.345
Text that will appear below the generic map at the top of the message
Pablo Morales
Address that will appear below the generic map at the top of the message
1 Hacker Way, Menlo Park, CA 94025
Required for "payload" type.
Customer-defined payload that will be returned when the button in the interactive message is clicked.
Required for "couponCode" type.
The coupon code to be copied when the customer taps the button.
flowActionData object
Optional for "action" type.
Flow action data for Flow button parameters.
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.
FIRST_ENTRY_SCREEN
RECOMMEND
data object
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.
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.
{"productId":"12345","userName":"John Doe","campaignId":"summer_sale_2024"}
Required for "ttlMinutes" parameter type (VoiceCall subtype 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.
Note: When creating a template, the minimum is 1440 (1 day). When sending, the minimum is 1 (1 minute).
Possible values: >= 1 and <= 43200
10080
2
Required for "button" type.
Position index of the button You can use index values from 0 to 9 to create up to 10 buttons. However, the Url button type allows a maximum of 2 buttons
Possible values: >= 0 and <= 9
0
Required for "button" type.
Type of button being created Values: QuickReply, Url, CopyCode, Flow, VoiceCall.
For VoiceCall, the parameters array is optional. All other subtypes require at least one parameter.
Possible values: [QuickReply, Url, CopyCode, Flow, VoiceCall]
cards object[]
Required for "carousel" type.
Index of the card in the carousel.
Possible values: >= 0 and <= 9
components object[]
List of card components
Component type. Possible values are "header", "body", "button"
Possible values: [header, body, button]
body
parameters object[]
Parameters list to use for template placeholders.
Parameter type. Possible values are "text", "image", "video", "document", "location", "payload", "couponCode".
Use "payload" type to define the payload that will be returned when the button in the interactive message is clicked.
Possible values: [text, image, video, document, location, payload, couponCode]
Text for "text" parameter type
To be or not to be
Required for "image", "video", "document" parameter types.
Resource URL.
http://example.com
location object
Required for "location" parameter type.
Location object.
Latitude
12.345
Longitude
12.345
Text that will appear below the generic map at the top of the message
Pablo Morales
Address that will appear below the generic map at the top of the message
1 Hacker Way, Menlo Park, CA 94025
Required for "payload" type.
Customer-defined payload that will be returned when the button in the interactive message is clicked.
Required for "couponCode" type.
The coupon code to be copied when the customer taps the button.
Required for "button" type.
Position index of the button You can use index values from 0 to 1 to populate up to 2 buttons.
Possible values: >= 0 and <= 1
0
Required for "button" type.
Type of button being created Values: QuickReply, Url.
Possible values: [QuickReply, Url]
richCard object
RCS Rich Card message content. Required when type is "richCard". Supported for RCS channel only.
Orientation of the card.
Possible values: [horizontal, vertical]
vertical
Alignment of the thumbnail image. Applicable for horizontal cards.
Possible values: [left, right]
right
Title of the rich card.
Possible values: <= 200 characters
Description of the rich card.
Possible values: <= 2000 characters
media objectrequired
Media content of the card.
Height of the media within the card.
Possible values: [short, medium, tall]
short
contentInfo objectrequired
Information about the media file.
Publicly accessible URL of the media file.
Publicly accessible URL of the thumbnail for the media.
If set to true, the RCS platform will fetch the file again even if it has been cached.
false
suggestions object[]
List of suggested actions or replies for the rich card.
Possible values: <= 4
reply object
Suggest a reply to the message
Text content of the reply
Possible values: <= 25 characters
The base64-encoded payload that the agent receives in a user event when the user taps the suggested reply.
Possible values: <= 2048 characters
action object
Suggest an action to the message. Only one of the following properties can be specified: dialAction, viewLocationAction, createCalendarEventAction, openUrlAction.
Text content of the reply
Possible values: <= 25 characters
The base64-encoded payload that the agent receives in a user event when the user taps the suggested reply.
Possible values: <= 2048 characters
URL that will open in a new window if a mobile device doesn't support a suggested action.
dialAction object
Opens the device's default phone app with the specified phone number filled in.
Phone number to dial, in E.164 format.
viewLocationAction object
Opens the device's default map app and selects the specified location or searches around the device's location given an agent-specified query.
latLong object
The latitude and longitude of the specified location.
The latitude in degrees.
Possible values: >= -90 and <= 90
The longitude in degrees.
Possible values: >= -180 and <= 180
Text label of the location opened.
Possible values: <= 100 characters
(Optional, only supported on Android Messages clients) Rather than specify a latLong (and optionally, a label), the agent can instead specify a query string. For 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. If the query is sufficiently specific, then agents can use it to select any location in the world.
Possible values: <= 200 characters
createCalendarEventAction object
Opens the device's default calendar app and creates a new calendar event prefilled with the event data.
Event title.
Possible values: <= 100 characters
Event description.
Possible values: <= 500 characters
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. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".
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. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".
openUrlAction object
Opens the specified URL.
URL. Must be a valid URI as defined in RFC 3986.
Possible values: <= 2048 characters
URL open application, browser or webview. To check whether a user's device supports webview mode, run a capability check first. See the documentation for details: https://developers.google.com/business-communications/rcs-business-messaging/guides/build/capabilities.
Possible values: [OPEN_URL_APPLICATION_UNSPECIFIED, BROWSER, WEBVIEW]
OPEN_URL_APPLICATION_UNSPECIFIED
View mode for webview
Possible values: [OPEN_URL_WEBVIEW_VIEW_MODE_UNSPECIFIED, FULL, HALF, TALL]
FULL
Accessibility description for webview.
Possible values: <= 2048 characters
carousel object
RCS Carousel message content. Required when type is "carousel". Supported for RCS channel only.
The width of the cards in the carousel.
Possible values: [small, medium]
medium
cards object[]required
List of rich card items in the carousel. Minimum 2 cards, maximum 10 cards.
Possible values: >= 2, <= 10
Title of the card.
Possible values: <= 200 characters
Description of the card.
Possible values: <= 2000 characters
media objectrequired
Media content of the card.
Height of the media within the card.
Possible values: [short, medium, tall]
short
contentInfo objectrequired
Information about the media file.
Publicly accessible URL of the media file.
Publicly accessible URL of the thumbnail for the media.
If set to true, the RCS platform will fetch the file again even if it has been cached.
false
suggestions object[]
List of suggested actions or replies for the card.
Possible values: <= 4
reply object
Suggest a reply to the message
Text content of the reply
Possible values: <= 25 characters
The base64-encoded payload that the agent receives in a user event when the user taps the suggested reply.
Possible values: <= 2048 characters
action object
Suggest an action to the message. Only one of the following properties can be specified: dialAction, viewLocationAction, createCalendarEventAction, openUrlAction.
Text content of the reply
Possible values: <= 25 characters
The base64-encoded payload that the agent receives in a user event when the user taps the suggested reply.
Possible values: <= 2048 characters
URL that will open in a new window if a mobile device doesn't support a suggested action.
dialAction object
Opens the device's default phone app with the specified phone number filled in.
Phone number to dial, in E.164 format.
viewLocationAction object
Opens the device's default map app and selects the specified location or searches around the device's location given an agent-specified query.
latLong object
The latitude and longitude of the specified location.
The latitude in degrees.
Possible values: >= -90 and <= 90
The longitude in degrees.
Possible values: >= -180 and <= 180
Text label of the location opened.
Possible values: <= 100 characters
(Optional, only supported on Android Messages clients) Rather than specify a latLong (and optionally, a label), the agent can instead specify a query string. For 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. If the query is sufficiently specific, then agents can use it to select any location in the world.
Possible values: <= 200 characters
createCalendarEventAction object
Opens the device's default calendar app and creates a new calendar event prefilled with the event data.
Event title.
Possible values: <= 100 characters
Event description.
Possible values: <= 500 characters
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. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".
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. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".
openUrlAction object
Opens the specified URL.
URL. Must be a valid URI as defined in RFC 3986.
Possible values: <= 2048 characters
URL open application, browser or webview. To check whether a user's device supports webview mode, run a capability check first. See the documentation for details: https://developers.google.com/business-communications/rcs-business-messaging/guides/build/capabilities.
Possible values: [OPEN_URL_APPLICATION_UNSPECIFIED, BROWSER, WEBVIEW]
OPEN_URL_APPLICATION_UNSPECIFIED
View mode for webview
Possible values: [OPEN_URL_WEBVIEW_VIEW_MODE_UNSPECIFIED, FULL, HALF, TALL]
FULL
Accessibility description for webview.
Possible values: <= 2048 characters
suggestions object[]
List of suggestioned actions that can be taken by the user for the message
Possible values: <= 10
reply object
Suggest a reply to the message
Text content of the reply
Possible values: <= 25 characters
The base64-encoded payload that the agent receives in a user event when the user taps the suggested reply.
Possible values: <= 2048 characters
action object
Suggest an action to the message. Only one of the following properties can be specified: dialAction, viewLocationAction, createCalendarEventAction, openUrlAction.
Text content of the reply
Possible values: <= 25 characters
The base64-encoded payload that the agent receives in a user event when the user taps the suggested reply.
Possible values: <= 2048 characters
URL that will open in a new window if a mobile device doesn't support a suggested action.
dialAction object
Opens the device's default phone app with the specified phone number filled in.
Phone number to dial, in E.164 format.
viewLocationAction object
Opens the device's default map app and selects the specified location or searches around the device's location given an agent-specified query.
latLong object
The latitude and longitude of the specified location.
The latitude in degrees.
Possible values: >= -90 and <= 90
The longitude in degrees.
Possible values: >= -180 and <= 180
Text label of the location opened.
Possible values: <= 100 characters
(Optional, only supported on Android Messages clients) Rather than specify a latLong (and optionally, a label), the agent can instead specify a query string. For 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. If the query is sufficiently specific, then agents can use it to select any location in the world.
Possible values: <= 200 characters
createCalendarEventAction object
Opens the device's default calendar app and creates a new calendar event prefilled with the event data.
Event title.
Possible values: <= 100 characters
Event description.
Possible values: <= 500 characters
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. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".
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. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".
openUrlAction object
Opens the specified URL.
URL. Must be a valid URI as defined in RFC 3986.
Possible values: <= 2048 characters
URL open application, browser or webview. To check whether a user's device supports webview mode, run a capability check first. See the documentation for details: https://developers.google.com/business-communications/rcs-business-messaging/guides/build/capabilities.
Possible values: [OPEN_URL_APPLICATION_UNSPECIFIED, BROWSER, WEBVIEW]
OPEN_URL_APPLICATION_UNSPECIFIED
View mode for webview
Possible values: [OPEN_URL_WEBVIEW_VIEW_MODE_UNSPECIFIED, FULL, HALF, TALL]
FULL
Accessibility description for webview.
Possible values: <= 2048 characters
Date and time when a schedule delivery of the message must happen
Message Expiry date-time object. If message is not delivered before specified time, it should be trashed
Override default DR callback URL for the message
channels object[]
Channel fallback override
Messaging Apps Channel enumeration
Possible values: [SMS, WhatsApp, Facebook, RCS, Viber, Line, WeChat, Zalo, Instagram]
WhatsApp
Specify the amount of time in seconds, after which message should be sent to next fallback channel, if not delivered to current one. Maximum: 1 day
Possible values: >= 10 and <= 86400
Enumeration of Success Delivery status
Possible values: [Accepted, Sent, Delivered, Read]
Delivered
context object
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.
For more information and limitations, see WhatsApp Contextual Replies documentation.
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.
aa7c29ad-4433-2211-9c8b-00004e2b9ecc
Success response
Schema
- unknown: Status is not known. This is an exceptional/intermediate status.
- queued: The request is accepted and queued for processing
- failed: The request has been rejected by the api and will not be processed.
- sent: The message has been sent to the operator and we have not received an acknowledgment yet.
- delivered: Message has been delivered to destination and we have received confirmation from the operator.
- undelivered: We have received a delivery receipt from the operator that the message was not delivered.
- read: Message was delivered and read.
- ok: Operation was successful
- error: An error occurred during operation
- delivered_to_operator: The message has been delivered to the operator. Associated with delivered state
- delivered_to_recipient: The message has been delivered to the recipient. Associated with delivered state.
- rejected_by_operator: The message has been rejected by the operator. Associated with undelivered status.
- undelivered_to_recipient: The message has been delivered but rejected by the target device. Associated with undelivered state.
status objectrequired
Delivery status of the message. Status contains the following information.
General status of the message. Possible values are
delivered
delivered_to_carrier
Error code for the operation
Description of the error.
Invalid message length
Date and time when the status was observed expressed in ISO 8601 format.
2020-06-17T04:17:21.06Z
Unique message id (guid) generated by 8x8 CPaaS platform upon message submission
user objectrequired
User information
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.
+6500000000
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)
Possible values: <= 2 characters
SG
Client managed id for the message: your own unique reference
{
"status":{
"state":"delivered",
"detail":"delivered_to_carrier",
"errorCode":0,
"errorMessage":"Invalid message length",
"timestamp":"2020-06-17T04:17:21.06Z"
},
"umid":"3fa85f64-5717-4562-b3fc-2c963f66afa6",
"user":{
"msisdn":"+6500000000",
"country":"SG"
},
"clientMessageId":"string"
}
{
"umid":"82188ee0-109f-e811-8150-020897df5459",
"user":{
"msisdn":"+6512341234"
},
"clientMessageId":"1234_id",
"status":{
"state":"queued",
"timestamp":"2021-01-04T08:19:45.99Z"
}
}
Bad request error response
Schema
Error code
Error description
Unique id of error. You can use it as reference when sending enquiries to 8x8 support
Data and time of the error occurence
{
"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"
}
{
"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"
}
Request was not authenticated response
Schema
Error code
Error description
Unique id of error. You can use it as reference when sending enquiries to 8x8 support
Data and time of the error occurence
{
"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"
}
{
"code":1200,
"message":"Request was not authenticated properly",
"errorId":"db9dced4-3534-4d86-9d18-6b448af0d621",
"timestamp":"2018-08-02T09:42:38.8988997+00:00"
}
Internal server error
Schema
Error code
Error description
Unique id of error. You can use it as reference when sending enquiries to 8x8 support
Data and time of the error occurence
{
"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"
}
{
"code":2000,
"message":"Internal server error",
"errorId":"db9dced4-3534-4d86-9d18-6b448af0d621",
"timestamp":"2018-07-02T09:42:38.8988997+00:00"
}
Source: https://developer.8x8.com/connect/reference/send-message · 8x8 CPaaS Developer Docs. Synced for support deflection.
0 Comments