RCS API

Understand how you can use Send Message API v2 to send RCS messages.

📘

Please Note

The RCS channel is supported viaWebex Connect Send Message API v2.

The API endpoint for it is: [https://{YourRegion}.webexconnect.io/v2/messages].

Please modify YourRegion in the URL to reflect your tenant’s region. See Know your endpoint page.

Refer to our Postman Collection for trying various types of RCS messages supported by Webex Connect.

📘

Note

  • Some mobile network RCS service providers wait for a text message delivery receipt prior to sending any related suggestion. Ensure that your test plans include each carrier your program will terminate to.
  • The 'fileMessage' and 'richCardMessage' parameter fileSize requested is related to image and videos contained in URLs. The measurement will be in bytes, and while not all MaaPs require an accurate fileSize, the value of the size should not be 0.
  • Please note that the substitutions apply only to 'Text' field.

RCS supports the following message types:

  1. RCS Text
  2. RCS Text with Suggestions
  3. RCS File
  4. RCS File with Suggestions
  5. RCS Rich card
  6. RCS Rich card with Suggestions
  7. RCS Carousel
  8. RCS Carousel with Suggestions
  9. RCS Typing Event
  10. RCS Reading Event

Messaging API v2 - Samples

{
    "channel": "rcs", //Mandatory. 
    "from": "{{rcsAppId}}", //Mandatory. 
    "to": [
        {
            "msisdn": [
                "{{msisdn}}" //Mandatory. E.164 format required/recommended.
            ],
            "substitutions": { //Optional,applicable only for text content type.
                "{{rcs_parameter1}}": "{{rcs_value1}}"/
            },
            "correlationId": "" //Optional. The CorrelationID is a unique identifier that you can attach to every request as a reference a particular transaction or event. This is configured as a part of the request.
        }
    ],
    "substitutions": { //Optional,applicable only for text content type.
        "{{rcs_parameter1}}": "{{rcs_value1}}"
    },
    "options": {
        //Optional
        "smsFallback": true,
        "smsSenderId": "{{senderid}}",
        "text": "fallback text"
    },
    "requestedReceipts": [ //Optional.
        "DELIVERED"
    ],
    "content": { //Mandatory
        "type": "text",
        "text": "This is the message.  Reply Yes or No.",
        "suggestions": [ //Optional
            {
                "type": "reply",
                "displayText": "Yes",
                "postbackData": "usr_msg_yes"
            },
            {
                "type": "viewLocation",
                "address": "",
                "displayText": "",
                "latitude": 0,
                "longitude": 0,
                "postbackData": ""
            },
            {
                "type": "shareLocation",
                "displayText": "",
                "postbackData": ""
            },
            {
                "type": "openUrl",
                "displayText": "",
                "url": "",
                "postbackData": ""
            },
            {
                "type": "calendarEvent",
                "displayText": "",
                "startTime": "{{TimeinUTC}}",
                "endTime": "{{TimeinUTC}}",
                "meetingTitle": "",
                "meetingDescription": "",
                "postbackData": ""
            },
            {
                "type": "dialPhone",
                "displayText": "",
                "phone": "",
                "postbackData": ""
            }
        ]
    },
    "callbackData": "", //Optional. Data that you have configured to receive on the notify Url. This is configured as a part of the request.
    "notifyUrl": "", //Optional.
    "contactPolicy": { //Optional.
        "contactPolicyGroup": "", //the GroupID to be applied. Required if any of the following options are included and set to true
        "channelCheckConsent": true, //optional, assumed false, set to true to require opt-in before sending the message,“channelCheckConsent” or “channelApplyFrequencyCap” either of the parameter should be “true” 
        "channelApplyFrequencyCap": true //optional, assumed false, set to true to enforce group frequency cap for that channel,“channelCheckConsent” or “channelApplyFrequencyCap” either of the parameter should be “true” 
    }
}

Send Message API v2 for RCS channel: Common Body Parameters

The following are the parameters of the request body:

ParameterTypeMandatoryDescription
channelstringyesThe value needs to be "rcs" when sending RCS messages.
fromstringyesThe rcsAppId of the respective RCS asset setup in Webex Connect platform under assets.
toJSONArrayyesAn array of destination JSON objects that contain the mandatory destination msisdn, optional personalised substitutions, and correlationId for each destination object.
msisdnJSONArrayyesPhone number, i.e., msisdn to which the RCS message has to be sent in E.164 format e.g., +44XXXXXXXXXX

Note: If +E.164 format is enabled for your tenant - all the numbers in the to field should follow the "+E.164" format.
This format displays the number with a "+" followed by the country code and the phone number.
+E.164 format does not apply to the numbers in the from field.
substitutionsJSONObjectnoList of key-value pairs for dynamic fields in the RCS message content. They are typically used to specify the values for dynamic fields in an RCS template.

There are two ways to define the 'substitutions' parameter - one inside the 'to' block and another outside the 'to' block.

The 'substitutions' parameter inside the 'to' block takes precedence over the 'substitutions' block that is outside the 'to' block, in case these values are provided in both places.
Note: substitutions are applicable only for the text content type
correlationIdstringnoUser-defined ID that is assigned to an individual message for unique identification.
optionsJSONObjectnoA JSON object that contains additional, RCS-specific options such as smsFallback,smsSenderID, and Text in the API.
smsFallbackbooleannoWhen true, auto SMS fallback will be tried for RCS failures. If this parameter is not passed, SMS fallback will be disabled by default. Refer to the note below for details on how it works.
Note: If the smsFallback parameter is set to 'true' in the Webex Connect messaging API to enable SMS fallback for RCS messages, then the smsSenderId and text fields become mandatory, to ensure that the fallback message is sent successfully.
For more information on how the feature works, refer to the FAQs chapter .
smsSenderIdstringMandatory if smsFallback is true, else optionalSender ID that is already configured on your account
textstringMandatory if smsFallback is true, else optionalThe maximum limit for text messages is up to 1024 chars.
requestedReceiptsJSONArraynoA JSON array that can filter message delivery webhooks to the notifyUrl.

Can contain one or more of the following:
"Sent",
"Delivered",
"Read",
"Failed"

Check Outbound Webhooks for delivery receipt samples.
contentJSONObjectyes, if the template is not providedIt is the JSON object that contains mandatory parameters 'type' and 'text' for the RCS channel.
typestringyesUsed for specifying the message content type. The acceptable value is 'text'.

Please note that 'text' supports many common special characters as per the RCS specification and is preferred where possible.
textstringyesThe RCS message content. A maximum of 1024 characters can be supported.
callbackDatastringnoA string that is returned with each outbound webhook for the message (delivery, failed, etc.). The maximum number of characters allowed in callbackData including any spaces is 2000.
notifyUrlstringnoIf provided, updates related to the delivery status of this message will be posted to this URL. Refer to this page for notification samples.
contactPolicyJSONObjectnoJSON Object will specify contact policy checks before sending the outbound RCS message. The Contact Policy App should be configured to use this feature as a prerequisite.
contactPolicyGroupstringyes (if you want to apply Contact Policy checks before sending the message)The GroupID is to be applied. It is required if any of the following options are included and set to true.
channelCheckConsentbooleannoOptional, assumed false if not specified. Set to true to require opt-in before sending the message. At least one of the “channelCheckConsent” or “channelApplyFrequencyCap” parameters should be set to “true”.
channelApplyFrequencyCapbooleannoOptional, assumed false. Set to true to enforce group frequency cap for that channel. At least one of “channelCheckConsent” or “channelApplyFrequencyCap” parameters should be set to “true”.

Sample Response Body

{
    "requestTimestamp": "2024-09-05T00:03:01.708-04:00",
    "messageId": "a770f205-1234-3x5x-x5x3-6dc3e388b9b5",
    "correlationId": "12345",
    "status": "queued"
}
   {
        "code": "7000",
        "message": "Invalid JSON"
    }
No response body

Examples

RCS Text with Suggestions

{
    "channel": "rcs", //Mandatory. 
    "from": "{{rcsAppId}}", //Mandatory. This is the app_id of the RCS asset.
    "to": [ //Mandatory section.
        {
            "msisdn": [
                "{{msisdn}}" //Mandatory. E.164 format required/recommended. Mobile number to which messages needs to be sent.
            ],
            "substitutions": { //Optional. Applicable only for text content type.
                "{{rcs_parameter1}}": "{{rcs_value1}}"
            },
            "correlationId": "" //Optional. The CorrelationID is a unique identifier that you can attach to every request as a reference a particular transaction or event. This is configured as a part of the request.
        }
    ],
    "substitutions": { //Optional. Applicable only for text content type.
        "{{rcs_parameter1}}": "{{rcs_value1}}"
    },
    "options": { //Optional.
        "smsFallback": true, //Optional
        "smsSenderId": "{{senderid}}", //Mandatory if smsFallback is true, else optional
        "text": "fallback text" //Mandatory if smsFallback is true, else optional
    },
    "requestedReceipts": [ //Optional. A JSON array that can filter message delivery webhooks to the notifyUrl.
        "Sent",
        "Delivered",
        "Read",
        "Failed"
    ],
    "content": {
        "type": "text", //Mandatory. Mention the type of RCS message type
        "text": "This is the message reagrding $(rcs_parameter1).  Reply Yes or No.", //Mandatory. Contains the RCS message content.
        "suggestions": [
            {
                "type": "reply", //Mandatory if this suggestion type is used. 
                "displayText": "", //Mandatory. Text displayed so that user can easily respond
                "postbackData": "" //Optional. Preconfigured response to the display text selected by the user.
            },
            {
                "type": "viewLocation", //Mandatory if this suggestion type is used.
                "address": "", // Optional. Address of the coordinates mentioned
                "displayText": "", // Mandatory
                "latitude": 43.649269, //Mandatory, latitude of the location
                "longitude": -79.378423, //Mandatory, longitude of the location
                "postbackData": "" //Optional, Preconfigured response to the display text selected by the user.
            },
            {
                "type": "shareLocation", //Mandatory if this suggestion type is used.
                "displayText": "", // Mandatory
                "postbackData": "" // Optional
            },
            {
                "type": "openUrl", //Mandatory if this suggestion type is used.
                "displayText": "", //Mandatory
                "url": "https://www.domain.com", //Mandatory, The URL to which the user will be redirected upon clicking on openURL.
                "postbackData": "" //Optional
            },
            {
                "type": "calendarEvent", //Mandatory if this suggestion type is used.
                "displayText": "", //Mandatory
                "startTime": "YYYY-MM-DDTHH:MM:SSZ", //Mandatory, Start timestamp of the event in ISO date time format 8601.
                "endTime": "YYYY-MM-DDTHH:MM:SSZ", //Mandatory, End timestamp of the event in ISO date time format 8601.
                "meetingTitle": "", //Mandatory, Meeting title of the calendar event.
                "meetingDescription": "", //Optional
                "postbackData": "" //Optional
            },
            {
                "type": "dialPhone", //Mandatory if this suggestion type is used.
                "displayText": "", //Mandatory
                "phone": "", //Mandatory, Configured phone number to dial
                "postbackData": "" //Optional
            }
        ]
    },
    "callbackData": "", //Optional. Data that you have configured to receive on the notify Url. This is configured as a part of the request.
    "notifyUrl": "", //Optional.
    "contactPolicy": { //Optional.
        "contactPolicyGroup": "", //the GroupID to be applied. Required if any of the following options are included and set to true.
        "channelCheckConsent": true, //Optional, assumed false, set to true to require opt-in before sending the message,“channelCheckConsent” or “channelApplyFrequencyCap” either of the parameter should be “true”.
        "channelApplyFrequencyCap": true //Optional, assumed false, set to true to enforce group frequency cap for that channel,“channelCheckConsent” or “channelApplyFrequencyCap” either of the parameter should be “true”.
    }
}

Following are the parameters required for sending message using RCS Text with Suggestions:

Parameter TypeMandatoryDescription
SuggestionsArray ObjectNoSuggestions is a JSON array that can contain up to 10 suggestions with a message, 2 when within a carousel and 4 when within a richcard.
These are the following suggestion types:
reply
viewLocation
shareLocation
openUrl
calendarEvent
dialPhone
For more information, refer to section below.

Suggestions Object:

For each of these message type, various suggestions are possible to configure. Currently, 5 types of suggestions are supported - Reply, Viewlocation, Sharelocation, dialphone, and Calendarevent.

SuggestionType: Reply
Suggested replies help your chatbot guide users through conversations by providing responses that the chatbot knows how to react to. Your agent sends replies in suggestion chip lists or rich cards.

ParameterTypeMandatoryDescription
typestringYes,Mandatory if this type of suggestion is addedIf the type is reply, the displayText and postbackData are subsequent parameters to be passed.
displayTextstringyesThis text is usually a short, user-friendly prompt that conveys the main content or action of the RCS message.
postbackDatastringnoThe preconfigured response to the display text selected by the user.

SuggestionType: viewLocation

The View location action displays a location in the user's default map app. You can specify the location either by latitude and longitude.

ParameterTypeMandatoryDescription
typestringYes,Mandatory if this type of suggestion is addedIf the suggestion type is viewLocation, the address,displayText, latitude, longitude, and postbackData are subsequent parameters to be passed.
addressstringnoThe configured location of the user.
displayTextstringyesThis text is usually a short, user-friendly prompt that conveys the main content or action of the RCS message.
latitudeintyesThe latitude of the configured location.
longitudeintyesThe longitude of the configured location.
postbackDatastringnoThe preconfigured response to the display text selected by the user

SuggestionType: shareLocation

The Share location action lets the user send a location to your chatbot.

ParameterTypeMandatoryDescription
typestringYes,Mandatory if this type of suggestion is addedIf the suggestion type is shareLocation, the displayText and postbackData are subsequent parameters to be passed.
displayTextstringyesThis text is usually a short, user-friendly prompt that conveys the main content or action of the RCS message.
postbackDatastringnoThe preconfigured response to the display text selected by the user

SuggestionType: openUrl

The Open URL action opens the user's web browser to the specified URL. If an app is registered as a default handler for the URL, the app opens instead, and the icon for the action is the app's icon.

ParameterTypeMandatoryDescription
typestringYes,Mandatory if this type of suggestion is addedIf the suggestion type is openUrl, the displayText, URL, and postbackData are subsequent parameters to be passed.
displayTextstringyesThis text is usually a short, user-friendly prompt that conveys the main content or action of the RCS message.
URLstringyesThe URL to which the user will be redirected upon clicking on openURL.
postbackDatastringnoThe preconfigured response to the display text selected by the user

SuggestionType: calendarEvent

The Create calendar event action opens the user's calendar app and begins to create a new event with the specified information.

ParameterTypeMandatoryDescription
typestringYes, mandatory if this type of suggestion is addedIf the suggestion type is calendarEvent, the displayText,startTime,endTime,meetingTitle,meetingDescription, and postbackData are subsequent parameters to be passed.
displayTextstringyesThis text is usually a short, user-friendly prompt that conveys the main content or action of the RCS message.
startTimestringyesThe timestamp of the scheduled calendar event can be added to the calendar.Start timestamp of the event in ISO date time format 8601.

For example, 2024-09-26T13:47:18.000Z - UTC
endTimestring yesTimestamp of the calendar event when it is supposed to end.End timestamp of the event in ISO date time format 8601.

For example, 2024-09-26T13:47:18.000Z - UTC
meetingTitlestringyesMeeting title of the calendar event.
meetingDescriptionstringnoDetails of the meeting that is scheduled by the user.
postbackDatastringnoPreconfigured response to the display text selected by the user.

SuggestionType: dialPhone

The Dial action guides the user to dial a phone number that your chatbot specifies.

ParameterValueMandatoryDescription
typestringYes, mandatory if this type of suggestion is addedIf the suggestion type is dialPhone the displayText, phone and postbackData are subsequent parameters to be passed.
displayTextstringyesThis text is usually a short, user-friendly prompt that conveys the main content or action of the RCS message.
phoneyesConfigured phone number of the user.
postbackDatastringnoPreconfigured response to the display text selected by the user.

🚧

Limitation

The routing of SMS messages will be handled by the standard routing rules configured for your tenant. Please reach out to your account manager for more information

RCS File

{
    "channel": "rcs", //Mandatory. 
    "from": "{{rcsAppId}}", //Mandatory. This is the app_id of the RCS asset. 
    "to": [	
        {
            "msisdn": [
                "{{msisdn}}" //Mandatory. E.164 format required/recommended. Mobile number to which messages needs to be sent.
            ],
            "correlationId": "" //Optional. The CorrelationID is a unique identifier that you can attach to every request as a reference a particular transaction or event. This is configured as a part of the request.
        }
    ],
    "options": {
        "smsFallback": true,
        "smsSenderId": "{{senderid}}",
        "text": "fallback text"
    },
    "requestedReceipts": [ //Optional. A JSON array that can filter message delivery webhooks to the notifyUrl.
        "Sent",
        "Delivered",
        "Read",
        "Failed"
    ],
    "content": {
        "type": "media", //Mandatory
        "mediaContentUrl": "https://asset.com/asset.jpg", //Mandatory. Publicly accessible direct media Url.
        "fileSize": 120534 //Optional. File size in KB, of the media.
    },
    "callbackData": "", //Optional. Data that you have configured to receive on the notify Url. This is configured as a part of the request.
    "notifyUrl": "", //Optional.
    "contactPolicy": { //Optional.
        "contactPolicyGroup": "", //the GroupID to be applied. Required if any of the following options are included and set to true.
        "channelCheckConsent": true, //optional, assumed false, set to true to require opt-in before sending the message,“channelCheckConsent” or “channelApplyFrequencyCap” either of the parameter should be “true”.
        "channelApplyFrequencyCap": true //optional, assumed false, set to true to enforce group frequency cap for that channel,“channelCheckConsent” or “channelApplyFrequencyCap” either of the parameter should be “true”.
    }
}

Following are the parameters required for sending message using RCS File:

ParameterTypeMandatoryDescription
typestringyesUsed for specifying the message content type. The acceptable value is 'media'.
mediaContentUrlstringyes, if type = mediaa publicly accessible direct media Url ending in the attachment mimeType
fileSizeintNoFile size in KB, of the media

RCS File with Suggestions

{
    "channel": "rcs", //Mandatory. 
    "from": "{{rcsAppId}}", //Mandatory. 
    "to": [
        {
            "msisdn": [
                "{{msisdn}}" //Mandatory. E.164 format required/recommended. Mobile number to which messages needs to be sent.
            ],
            "correlationId": "" //Optional. The CorrelationID is a unique identifier that you can attach to every request as a reference a particular transaction or event. This is configured as a part of the request.
        }
    ],
    "options": {
        "smsFallback": true,
        "smsSenderId": "{{senderid}}",
        "text": "fallback text"
    },
    "requestedReceipts": [ //Optional. A JSON array that can filter message delivery webhooks to the notifyUrl.
        "Sent",
        "Delivered",
        "Read",
        "Failed"
    ],
    "content": {
        "type": "media", //Mandatory
        "mediaContentUrl": "https://asset.com/asset.jpg", //Mandatory. Publicly accessible direct media Url.
        "fileSize": 120534, //Optional, file size in KB, of the media
        "suggestions": [
            {
                "type": "reply", //Mandatory if this suggestion type is used. 
                "displayText": "", //Mandatory. Text displayed so that user can easily respond
                "postbackData": "" //Optional. Preconfigured response to the display text selected by the user.
            },
            {
                "type": "viewLocation", //Mandatory if this suggestion type is used.
                "address": "", // Optional. Address of the coordinates mentioned
                "displayText": "", // Mandatory
                "latitude": 43.649269, //Mandatory, latitude of the location
                "longitude": -79.378423, //Mandatory, longitude of the location
                "postbackData": "" //Optional, Preconfigured response to the display text selected by the user.
            },
            {
                "type": "shareLocation", //Mandatory if this suggestion type is used.
                "displayText": "", // Mandatory
                "postbackData": "" // Optional
            },
            {
                "type": "openUrl", //Mandatory if this suggestion type is used.
                "displayText": "", //Mandatory
                "url": "https://www.domain.com", //Mandatory, The URL to which the user will be redirected upon clicking on openURL.
                "postbackData": "" //Optional
            },
            {
                "type": "calendarEvent", //Mandatory if this suggestion type is used.
                "displayText": "", //Mandatory
                "startTime": "YYYY-MM-DDTHH:MM:SSZ", //Mandatory, Start timestamp of the event in ISO date time format 8601.
                "endTime": "YYYY-MM-DDTHH:MM:SSZ", //Mandatory, End timestamp of the event in ISO date time format 8601.
                "meetingTitle": "", //Mandatory, Meeting title of the calendar event.
                "meetingDescription": "", //Optional
                "postbackData": "" //Optional
            },
            {
                "type": "dialPhone", //Mandatory if this suggestion type is used.
                "displayText": "", //Mandatory
                "phone": "", //Mandatory, Configured phone number to dial
                "postbackData": "" //Optional
            }
        ]
    },
    "callbackData": "", //Optional. Data that you have configured to receive on the notify Url. This is configured as a part of the request.
    "notifyUrl": "", //Optional.
    "contactPolicy": { //Optional.
        "contactPolicyGroup": "", //the GroupID to be applied. Required if any of the following options are included and set to true.
        "channelCheckConsent": true, //optional, assumed false, set to true to require opt-in before sending the message,“channelCheckConsent” or “channelApplyFrequencyCap” either of the parameter should be “true”. 
        "channelApplyFrequencyCap": true //optional, assumed false, set to true to enforce group frequency cap for that channel,“channelCheckConsent” or “channelApplyFrequencyCap” either of the parameter should be “true”. 
    }
}

For more information about suggestions, refer suggestions section.

RCS Rich Card

{
    "channel": "rcs", //Mandatory. 
    "from": "{{rcsAppId}}", //Mandatory. This is the app_id of the RCS asset.
    "to": [ //Mandatory section.
        {
            "msisdn": [
                "{{msisdn}}" //Mandatory. E.164 format required/recommended. Mobile number to which messages needs to be sent.
            ],
            "correlationId": "" //Optional. The CorrelationID is a unique identifier that you can attach to every request as a reference a particular transaction or event. This is configured as a part of the request.
        }
    ],
    "options": {
        "smsFallback": true,
        "smsSenderId": "{{senderid}}",
        "text": "fallback text"
    },
    "requestedReceipts": [ //Optional. A JSON array that can filter message delivery webhooks to the notifyUrl.
        "Sent",
        "Delivered",
        "Read",
        "Failed"
    ],
    "content": {
        "type": "standalone",
        "richCard": {
            "title": "", //Mandatory. Title of the message card of the respective card section.
            "description": "", //Optional. Indicates the text content of the message.
            "orientation": "", //Mandatory, The orientation of the image that is being sent, can be `HORIZONTAL` or `VERTICAL`.
            "thumbnailAlignment": "", //Mandatory, alignment of the thumbnail can be `LEFT` or `RIGHT`.
            "media": {
                "url": "https://asset.com/asset.jpp", //Mandatory. Publicly accessible direct media Url.
                "height": "", //Mandatory. Parameter that indicates the height of the media shared as  `SHORT`/`MEDIUM`/`TALL`.
                "filesize": 1 //Optional. File size in KB of the media to be displayed.
            },
            "thumbnail": {
                "url": "https://asset.com/asset.gif", //Mandatory. Publicly accessible direct media Url.
                "fileSize": 12864, //Optional. File size in KB of the media to be displayed.
                "height": "MEDIUM", //Mandatory. Parameter that indicates the height of the media shared as  `SHORT`/`MEDIUM`/`TALL`.
                "contentType": "image/gif", //Optional.
                "description": "" //Optional. Indicates the text content of the thumbnail.
            }
        }
    },
    "callbackData": "", //Optional. Data that you have configured to receive on the notify Url. This is configured as a part of the request.
    "notifyUrl": "", //Optional.
    "contactPolicy": { //OPtional.
        "contactPolicyGroup": "", //the GroupID to be applied. Required if any of the following options are included and set to true
        "channelCheckConsent": true, //optional, assumed false, set to true to require opt-in before sending the message,“channelCheckConsent” or “channelApplyFrequencyCap” either of the parameter should be “true” 
        "channelApplyFrequencyCap": true //optional, assumed false, set to true to enforce group frequency cap for that channel,“channelCheckConsent” or “channelApplyFrequencyCap” either of the parameter should be “true” 
    }
}

Following are the parameters required for sending message using RCS Rich Card:

parametertypemandatorydescription
typestringyesUsed for specifying the message content type. The acceptable value is 'standalone'.
richCardJSONObjectyes, if type = standaloneA JSON object containing rich card data and suggestions
titlestringyesTitle of the message or content
descriptionstringnoIt indicates the content of the message
orientationstringyesThe orientation of the image that is being sent. The accepatable values are 'HORIZONTALacceptable' or 'VERTICAL'
thumbnailAlignmentstringyesThe alignment of the thumbnail. The accepatable values are 'LEFT' or 'RIGHT'.
mediaJSON ObjectyesMedia includes images, video, or .gif file messages.
urlstringyesPublicly accessible direct media url.
heightstringyesThe height of the media file. The acceptable values are"SHORT/MEDIUM/TALL".
filesizeintNoThe size of the media file in KB.

RCS Rich Card with Suggestions

{
    "channel": "rcs", //Mandatory. 
    "from": "{{rcsAppId}}", //Mandatory. This is the app_id of the RCS asset.
    "to": [ //Mandatory section.
        {
            "msisdn": [
                "{{msisdn}}" //Mandatory. E.164 format required/recommended. Mobile number to which messages needs to be sent.
            ],
            "correlationId": "" //Optional. The CorrelationID is a unique identifier that you can attach to every request as a reference a particular transaction or event. This is configured as a part of the request.
        }
    ],
    "options": {
        "smsFallback": true,
        "smsSenderId": "{{senderid}}",
        "text": "fallback text"
    },
    "requestedReceipts": [ //Optional. A JSON array that can filter message delivery webhooks to the notifyUrl.
        "Sent",
        "Delivered",
        "Read",
        "Failed"
    ],
    "content": {
        "type": "standalone",
        "richCard": {
            "title": "", //Mandatory. Title of the message card of the respective card section.
            "description": "", //Optional. Indicates the text content of the message.
            "orientation": "", //Mandatory, The orientation of the image that is being sent, can be `HORIZONTAL` or `VERTICAL`.
            "thumbnailAlignment": "", //Mandatory, alignment of the thumbnail can be `LEFT` or `RIGHT`.
            "media": {
                "url": "https://asset.com/asset.jpp", //Mandatory. Publicly accessible direct media Url.
                "height": "", //Mandatory. Parameter that indicates the height of the media shared as  `SHORT`/`MEDIUM`/`TALL`.
                "filesize": 1 //Optional. File size in KB of the media to be displayed.
            },
            "thumbnail": {
                "url": "https://asset.com/asset.gif", //Mandatory. Publicly accessible direct media Url.
                "fileSize": 12864, //Optional. File size in KB of the media to be displayed.
                "height": "MEDIUM", //Mandatory. Parameter that indicates the height of the media shared as  `SHORT`/`MEDIUM`/`TALL`.
                "contentType": "image/gif", //Optional.
                "description": "" //Optional. Indicates the text content of the thumbnail.
            },
            "suggestions": [
                {
                    "type": "reply", //Mandatory if this suggestion type is used. 
                    "displayText": "", //Mandatory. Text displayed so that user can easily respond
                    "postbackData": "" //Optional. Preconfigured response to the display text selected by the user.
                },
                {
                    "type": "viewLocation", //Mandatory if this suggestion type is used.
                    "address": "", // Optional. Address of the coordinates mentioned
                    "displayText": "", // Mandatory
                    "latitude": 43.649269, //Mandatory, latitude of the location
                    "longitude": -79.378423, //Mandatory, longitude of the location
                    "postbackData": "" //Optional, Preconfigured response to the display text selected by the user.
                },
                {
                    "type": "shareLocation", //Mandatory if this suggestion type is used.
                    "displayText": "", // Mandatory
                    "postbackData": "" // Optional
                },
                {
                    "type": "openUrl", //Mandatory if this suggestion type is used.
                    "displayText": "", //Mandatory
                    "url": "https://www.domain.com", //Mandatory, The URL to which the user will be redirected upon clicking on openURL.
                    "postbackData": "" //Optional
                },
                {
                    "type": "calendarEvent", //Mandatory if this suggestion type is used.
                    "displayText": "", //Mandatory
                    "startTime": "YYYY-MM-DDTHH:MM:SSZ", //Mandatory, Start timestamp of the event in ISO date time format 8601.
                    "endTime": "YYYY-MM-DDTHH:MM:SSZ", //Mandatory, End timestamp of the event in ISO date time format 8601.
                    "meetingTitle": "", //Mandatory, Meeting title of the calendar event.
                    "meetingDescription": "", //Optional
                    "postbackData": "" //Optional
                },
                {
                    "type": "dialPhone", //Mandatory if this suggestion type is used.
                    "displayText": "", //Mandatory
                    "phone": "", //Mandatory, Configured phone number to dial
                    "postbackData": "" //Optional
                }
            ]
        }
    },
    "callbackData": "", //Optional. Data that you have configured to receive on the notify Url. This is configured as a part of the request.
    "notifyUrl": "", //Optional.
    "contactPolicy": { //OPtional.
        "contactPolicyGroup": "", //the GroupID to be applied. Required if any of the following options are included and set to true
        "channelCheckConsent": true, //optional, assumed false, set to true to require opt-in before sending the message,“channelCheckConsent” or “channelApplyFrequencyCap” either of the parameter should be “true” 
        "channelApplyFrequencyCap": true //optional, assumed false, set to true to enforce group frequency cap for that channel,“channelCheckConsent” or “channelApplyFrequencyCap” either of the parameter should be “true” 
    }
}

For more information about suggestions, refer suggestions section.

RCS Carousel

{
    "channel": "rcs", //Mandatory. 
    "from": "{{rcsAppId}}", //Mandatory. This is the app_id of the RCS asset. 
    "to": [
        {
            "msisdn": [
                "{{msisdn}}" //Mandatory. E.164 format required/recommended. Mobile number to which messages needs to be sent.
            ],
            "correlationId": "" //Optional. The CorrelationID is a unique identifier that you can attach to every request as a reference a particular transaction or event. This is configured as a part of the request.
        }
    ],
    "options": {
        "smsFallback": true,
        "smsSenderId": "{{senderid}}",
        "text": "fallback text"
    },
    "requestedReceipts": [ //Optional. A JSON array that can filter message delivery webhooks to the notifyUrl.
        "Sent",
        "Delivered",
        "Read",
        "Failed"
    ],
    "content": { // Mandatory. For carousel, two cards are mandatory.
        "type": "carousel",
        "width": "MEDIUM", //Mandatory. Indicates the width of the carousel cards. Supported values are `SMALL`/`MEDIUM`.
        "cards": [
            {
                "title": "", //Mandatory. Title of the message card of the respective card section.
                "description": "", //Optional. Indicates the text content of the message.
                "media": { //Mandatory. Media includes details regarding images, videos, gif files etc.
                    "url": "https://asset.com/asset.jpp", //Mandatory. Publicly accessible direct media Url.
                    "fileSize": 12053, //Optional. File size in KB of the media to be displayed.
                    "height": "MEDIUM" //Mandatory. Parameter that indicates the height of the media shared as  `SHORT`/`MEDIUM`/`TALL`.
                },
                "suggestions": [
                    {
                        "type": "reply", //Mandatory. If this suggestion type is used.
                        "displayText": "", //Mandatory. Text displayed so that user can easily respond.
                        "postbackData": "" //Optional. Preconfigured response to the display text selected by the user.
                    }
                ]
            },
            {
                "title": "", //Mandatory. Title of the message card of the respective card section.
                "description": "", //Optional. Indicates the text content of the message.
                "media": { //Mandatory. Media includes details regarding images, videos, gif files etc.
                    "url": "https://asset.com/asset.jpp", //Mandatory. Publicly accessible direct media Url.
                    "fileSize": 15860, //Optional. File size in KB of the media to be displayed.
                    "height": "MEDIUM" //Mandatory. Parameter that indicates the height of the media shared as  `SHORT`/`MEDIUM`/`TALL`.
                },
                "suggestions": [
                    {
                        "type": "reply", //Mandatory. If this suggestion type is used.
                        "displayText": "", //Mandatory. Text displayed so that user can easily respond
                        "postbackData": "" //Optional. Preconfigured response to the display text selected by the user.
                    }
                ]
            },
            {
                "title": "", //Mandatory. Title of the message card of the respective card section.
                "description": "", //Optional. Indicates the text content of the message.
                "media": { //Mandatory. Media includes details regarding images, videos, gif files etc.
                    "url": "https://asset.com/asset.jpp", //Mandatory. Publicly accessible direct media Url.
                    "fileSize": 15860, //Optional. File size in KB of the media to be displayed.
                    "height": "MEDIUM" //Mandatory. Parameter that indicates the height of the media shared as  `SHORT`/`MEDIUM`/`TALL`.
                },
                "suggestions": [
                    {
                        "type": "reply", //Mandatory. If this suggestion type is used.
                        "displayText": "", //Mandatory. Text displayed so that user can easily respond.
                        "postbackData": "" //Optional. Preconfigured response to the display text selected by the user.
                    }
                ]
            }
        ]
    },
    "callbackData": "", //Optional. Data that you have configured to receive on the notify Url. This is configured as a part of the request.
    "notifyUrl": "", //Optional.
    "contactPolicy": { //Optional.
        "contactPolicyGroup": "", //the GroupID to be applied. Required if any of the following options are included and set to true.
        "channelCheckConsent": true, //optional, assumed false, set to true to require opt-in before sending the message,“channelCheckConsent” or “channelApplyFrequencyCap” either of the parameter should be “true”. 
        "channelApplyFrequencyCap": true //optional, assumed false, set to true to enforce group frequency cap for that channel,“channelCheckConsent” or “channelApplyFrequencyCap” either of the parameter should be “true”. 
    }
}

Following are the parameters required for sending messages using RCS Carousel:

parametertypemandatorydescription
typestringyesUsed for specifying the message content type.The acceptable value is 'carousel'.
widthstringyes, if type = carouselA parameter that indicates the width of carousel cards. Supported values are SMALL/MEDIUM
cardsJSONArrayyes, if type = carouselA JSON array containing carousel card objects and their suggestions
titlestringyesTitle of the message card of the respective card
descriptionstringnoIt indicates the text content of the message
mediaJSON ObjectyesMedia includes images, videos, or .gif files
urlstringyesPublicly accessible direct media url.
filesizeintNoThe size of the media file in KB.
heightstringyesThe height of the media file. The acceptable values are"SHORT/MEDIUM/TALL".
suggestionsJSON ArrayNoFor more information about suggestions, refer suggestions section.

RCS Carousel with Suggestions

{
    "channel": "rcs", //Mandatory. 
    "from": "{{rcsAppId}}", //Mandatory. This is the app_id of the RCS asset. 
    "to": [
        {
            "msisdn": [
                "{{msisdn}}" //Mandatory. E.164 format required/recommended. Mobile number to which messages needs to be sent.
            ],
            "correlationId": "" //Optional. The CorrelationID is a unique identifier that you can attach to every request as a reference a particular transaction or event. This is configured as a part of the request.
        }
    ],
    "options": {
        "smsFallback": true,
        "smsSenderId": "{{senderid}}",
        "text": "fallback text"
    },
    "requestedReceipts": [ //Optional. A JSON array that can filter message delivery webhooks to the notifyUrl.
        "Sent",
        "Delivered",
        "Read",
        "Failed"
    ],
    "content": { // Mandatory. For carousel, two cards are mandatory.
        "type": "carousel",
        "width": "MEDIUM", //Mandatory. Indicates the width of the carousel cards. Supported values are `SMALL`/`MEDIUM`.
        "cards": [
            {
                "title": "", //Mandatory. Title of the message card of the respective card section.
                "description": "", //Optional. Indicates the text content of the message.
                "media": { //Mandatory. Media includes details regarding images, videos, gif files etc.
                    "url": "https://asset.com/asset.jpp", //Mandatory. Publicly accessible direct media Url.
                    "fileSize": 12053, //Optional. File size in KB of the media to be displayed.
                    "height": "MEDIUM" //Mandatory. Parameter that indicates the height of the media shared as  `SHORT`/`MEDIUM`/`TALL`.
                },
                "suggestions": [
                    {
                        "type": "reply", //Mandatory. If this suggestion type is used.
                        "displayText": "", //Mandatory. Text displayed so that user can easily respond.
                        "postbackData": "" //Optional. Preconfigured response to the display text selected by the user.
                    }
                ]
            },
            {
                "title": "", //Mandatory. Title of the message card of the respective card section.
                "description": "", //Optional. Indicates the text content of the message.
                "media": { //Mandatory. Media includes details regarding images, videos, gif files etc.
                    "url": "https://asset.com/asset.jpp", //Mandatory. Publicly accessible direct media Url.
                    "fileSize": 15860, //Optional. File size in KB of the media to be displayed.
                    "height": "MEDIUM" //Mandatory. Parameter that indicates the height of the media shared as  `SHORT`/`MEDIUM`/`TALL`.
                },
                "suggestions": [
                    {
                        "type": "reply", //Mandatory. If this suggestion type is used.
                        "displayText": "", //Mandatory. Text displayed so that user can easily respond
                        "postbackData": "" //Optional. Preconfigured response to the display text selected by the user.
                    }
                ]
            },
            {
                "title": "", //Mandatory. Title of the message card of the respective card section.
                "description": "", //Optional. Indicates the text content of the message.
                "media": { //Mandatory. Media includes details regarding images, videos, gif files etc.
                    "url": "https://asset.com/asset.jpp", //Mandatory. Publicly accessible direct media Url.
                    "fileSize": 15860, //Optional. File size in KB of the media to be displayed.
                    "height": "MEDIUM" //Mandatory. Parameter that indicates the height of the media shared as  `SHORT`/`MEDIUM`/`TALL`.
                },
                "suggestions": [
                    {
                        "type": "reply", //Mandatory. If this suggestion type is used.
                        "displayText": "", //Mandatory. Text displayed so that user can easily respond.
                        "postbackData": "" //Optional. Preconfigured response to the display text selected by the user.
                    }
                ]
            }
        ],
        "suggestions": [
            {
                "type": "reply", //Mandatory if this suggestion type is used. 
                "displayText": "", //Mandatory. Text displayed so that user can easily respond
                "postbackData": "" //Optional. Preconfigured response to the display text selected by the user.
            },
            {
                "type": "viewLocation", //Mandatory if this suggestion type is used.
                "address": "", // Optional. Address of the coordinates mentioned
                "displayText": "", // Mandatory
                "latitude": 43.649269, //Mandatory, latitude of the location
                "longitude": -79.378423, //Mandatory, longitude of the location
                "postbackData": "" //Optional, Preconfigured response to the display text selected by the user.
            },
            {
                "type": "shareLocation", //Mandatory if this suggestion type is used.
                "displayText": "", // Mandatory
                "postbackData": "" // Optional
            },
            {
                "type": "openUrl", //Mandatory if this suggestion type is used.
                "displayText": "", //Mandatory
                "url": "https://www.domain.com", //Mandatory, The URL to which the user will be redirected upon clicking on openURL.
                "postbackData": "" //Optional
            },
            {
                "type": "calendarEvent", //Mandatory if this suggestion type is used.
                "displayText": "", //Mandatory
                "startTime": "YYYY-MM-DDTHH:MM:SSZ", //Mandatory, Start timestamp of the event in ISO date time format 8601.
                "endTime": "YYYY-MM-DDTHH:MM:SSZ", //Mandatory, End timestamp of the event in ISO date time format 8601.
                "meetingTitle": "", //Mandatory, Meeting title of the calendar event.
                "meetingDescription": "", //Optional
                "postbackData": "" //Optional
            },
            {
                "type": "dialPhone", //Mandatory if this suggestion type is used.
                "displayText": "", //Mandatory
                "phone": "", //Mandatory, Configured phone number to dial
                "postbackData": "" //Optional
            }
        ]
    },
    "callbackData": "", //Optional. Data that you have configured to receive on the notify Url. This is configured as a part of the request.
    "notifyUrl": "", //Optional.
    "contactPolicy": { //Optional.
        "contactPolicyGroup": "", //the GroupID to be applied. Required if any of the following options are included and set to true.
        "channelCheckConsent": true, //optional, assumed false, set to true to require opt-in before sending the message,“channelCheckConsent” or “channelApplyFrequencyCap” either of the parameter should be “true”. 
        "channelApplyFrequencyCap": true //optional, assumed false, set to true to enforce group frequency cap for that channel,“channelCheckConsent” or “channelApplyFrequencyCap” either of the parameter should be “true”. 
    }
}

For more information about suggestions, refer suggestions section.

RCS Typing Event

{
    "channel": "rcs", //Mandatory. 
    "from": "{{rcsAppId}}", //Mandatory. This is the app_id of the RCS asset. 
    "to": [
        {
            "msisdn": [
                "{{msisdn}}" //Mandatory. E.164 format required/recommended. Mobile number to which messages needs to be sent.
            ],
            "correlationId": "" //Optional. The CorrelationID is a unique identifier that you can attach to every request as a reference a particular transaction or event. This is configured as a part of the request.
        }
    ],
    "content": {
        "type": "agentEvent",
        "event": "IS_TYPING"
    },
    "callbackData": "", //Optional. Data that you have configured to receive on the notify Url. This is configured as a part of the request.
    "notifyUrl": "", //Optional.
    "contactPolicy": { //Optional.
        "contactPolicyGroup": "", //the GroupID to be applied. Required if any of the following options are included and set to true.
        "channelCheckConsent": true, //optional, assumed false, set to true to require opt-in before sending the message,“channelCheckConsent” or “channelApplyFrequencyCap” either of the parameter should be “true”.
        "channelApplyFrequencyCap": true //optional, assumed false, set to true to enforce group frequency cap for that channel,“channelCheckConsent” or “channelApplyFrequencyCap” either of the parameter should be “true”. 
    }
}

Following are the parameters required for sending message using RCS Typing:

parametertypemandatorydescription
typestringyesUsed for specifying the message content type. The acceptable value is 'agentEvent'.
eventstringyes, if type = agentEventA typing event is to be sent to the customer. The acceptable value is "IS_TYPING".

RCS Read Event

{
    "channel": "rcs", //Mandatory. 
    "from": "{{rcsAppId}}", //Mandatory. This is the app_id of the RCS asset. 
    "to": [
        {
            "msisdn": [
                "{{msisdn}}" //Mandatory. E.164 format required/recommended. Mobile number to which messages needs to be sent.
            ],
            "correlationId": "" //Optional. The CorrelationID is a unique identifier that you can attach to every request as a reference a particular transaction or event. This is configured as a part of the request.
        }
    ],
    "content": {
        "type": "agentEvent",
        "event": "READ",
        "messageId": "" //Mandatory. MessageId of the specific message.
    },
    "callbackData": "", //Optional. Data that you have configured to receive on the notify Url. This is configured as a part of the request.
    "notifyUrl": "", //Optional.
    "contactPolicy": { //Optional.
        "contactPolicyGroup": "", //the GroupID to be applied. Required if any of the following options are included and set to true.
        "channelCheckConsent": true, //optional, assumed false, set to true to require opt-in before sending the message,“channelCheckConsent” or “channelApplyFrequencyCap” either of the parameter should be “true”.
        "channelApplyFrequencyCap": true //optional, assumed false, set to true to enforce group frequency cap for that channel,“channelCheckConsent” or “channelApplyFrequencyCap” either of the parameter should be “true”. 
    }
}

Following are the parameters required for sending message using RCS Read:

parametertypemandatorydescription
typestringyesUsed for specifying the message content type. The acceptable value is 'agentEvent'.
eventstringyes, if type = agentEventA reading event is to be sent to the customer. The acceptable value is "READ".
messageIdstringMessageId of the specific message.Unique ID generated to record the messages sent using RCS read.