RCS for Business API

RCS for Business allows businesses to send rich communication to their customers.

See example payloads here.

Available methods

Elements & Attributes

Data ElementTypeDescription
contentMessageObjectAn object containing information about an agent message.
textStringThe text of an agent message.
contentInfoObjectAn object containing information about a file, including the URL of the file and the URL of the file’s thumbnail.
fileURLStringPublicly reachable URL of the file. The Vibes RBm platform determines the MIME type of the file from the content-type field in the HTTP header. Recommended max file size of 100MB.
thumbnailUrlString

For image, audio, and video files only. Publicly reachable URL of the thumbnail. Max file size of 100kB.

If you don't provide a thumbnail URL, the Vibes RBM platform displays a blank placeholder thumbnail until the user's device downloads the file. Depending on the user's setting, the file may not download automatically and may require the user to tap a download button.

forceRefreshBooleanIf true, the Vibes RBM platform fetches the file and thumbnail from the specified URLs, even if the platform has cached copies of the file (and/or of the thumbnail).
suggestionsArrayA list of suggested replies and/or actions that displays to the end user. Maximum 11 suggestions.
replyObjectA quick reply, which allows the user to respond to the agent with a pre-selected response with a single tap.
reply.textStringThe text of the quick reply.
reply.postbackDataStringBase64-encoded payload that the agent receives when the suggested reply is tapped.
actionObjectA quick action, which allows the user to tap a button and automatically trigger an action in their device.
action.textStringThe text label that displays on the quick action option.
action.postbackDataStringBase64-encoded payload that the agent receives when the suggested action is tapped.
action.fallbackUrlStringOptional. URL that will open if the device does not support a suggested action.
dialActionObjectQuick action that opens the device’s default phone app and dials a number.
dialAction.phoneNumberStringPhone number in E.164 format that is automatically dialed when the dial quick action is selected.
viewLocationActionObjectQuick action that opens a device’s default map app and selects the specified location or searches around the device's location given an agent-specified query.
viewLocationAction.labelStringText label for a location.
viewLocationAction.latLongObjectLatitude and longitude of a location.
viewLocationAction.queryString

Optional, only supported on Android Messages clients. Rather than specify a latitude and longitude, insert a query string. For default map apps that support search functionality, tapping this suggested action results in a location search centered around the user's current location.

If the query is sufficiently specific, it selects any location in the world. For instance, setting the query string to "Growing Tree Bank" will show all Growing Tree Bank locations in the device's vicinity. Setting the query string to "1600 Amphitheater Parkway, Mountain View, CA 94043" will select that specific address, regardless of the user's location.

createCalendarEventActionObjectOpens the device's default calendar app and creates a new calendar event prefilled with the event data.
createCalendarEventAction.startTimeStringStart time of the event.
createCalendarEventAction.endTimeStringEnd time of the event.
createCalendarEventAction.title StringEvent title. Max 100 characters.
createCalendarEventAction.descriptionStringDescription of event. Max 500 characters.
openUrlActionObjectQuick action that opens a URL either in the device’s default web browser or in an integrated webview.
openUrlAction.urlStringURL to be opened in end user’s device. Max 2048 characters.
openUrlAction.applicationStringSpecify if the URL will be opened in the device’s default browser or in an integrated webview window in the device’s messaging app.
openUrlAction.descriptionStringOptional description of the URL.
shareLocationActionObjectQuick action that shares the device’s location with the agent.
richCardObjectA single or carousel of rich cards.
carouselCardObjectA carousel of multiple rich cards, which the end user can scroll through.
cardContentsArray of objectsAn array that contains an object for each rich card in a carousel.
cardContents.titleStringTitle on a rich card. Max of 200 characters.
cardContents.descriptionStringDescription on a rich card. Max of 500 characters.
mediaObjectAn object containing information about the media on a rich card.
media.heightStringChoose the height of the media displayed on the rich card. Options are:
  • height_unspecified
  • short
  • medium
  • tall
media.fileNameStringName of the media file being included on a rich card.
standaloneCardObjectA single rich card.
cardOrientationStringThe orientation of a single standalone rich card. Options are:
  • card_orientatioin_unspecified
  • vertical
  • horizontal
thumbnailImageAlignmentStringAlignment of image preview for standalone cards with horizontal layout.
cardContentObjectAn object containing information about the media on a standalone rich card.
expireTimeStringOptional. Timestamp in UTC when this message will be considered expired.
ttlStringOptional. Time in seconds the message will live before it is automatically revoked.

Message Payload Examples

Text with quick replies

{
    "contentMessage": {
        "text": "Text message with a couple of replies",
        "suggestions": [
            {
                "reply": {
                    "text": "Option 1",
                    "postbackData": "option_1"
                }
            },
            {
                "reply": {
                    "text": "Option 2",
                    "postbackData": "option_2"
                }
            }
        ]
    }
}

Text with quick action

{
    "contentMessage": {
        "text": "Text message with single link / URL action",
        "suggestions": [
            {
                "action": {
                    "openUrlAction": {
                        "url": "https://www.google.com"
                    },
                    "postbackData": "urlaction_google",
                    "text": "Google"
                }
            }
        ]
    }
}

Standalone rich card

{
    "contentMessage": {
        "richCard": {
            "standaloneCard": {
                "cardContent": {
                    "description": "Got a question about RCS and RBM? From what's different about the two terms to how it all works, we've got you covered with this comprehensive FAQs article.",
                    "title": "Vibes RCS Business Messaging",
                    "media": {
                        "contentInfo": {
                            "fileUrl": "https://cdn.prod.website-files.com/621fe9312baa6cd9b2719336/66e9ce4572066ce8790bc01c_RBM_FAQs.png",
                            "forceRefresh": false
                        },
                        "height": "MEDIUM"
                    },
                    "suggestions": [
                        {
                            "action": {
                                "openUrlAction": {
                                    "url": "https://www.vibes.com/blog/rcs-business-messaging"
                                },
                                "postbackData": "urlaction_blog_rbmfaq",
                                "text": "RBM: FAQ"
                            }
                        },
                        {
                            "reply": {
                                "postbackData": "thumbs_up",
                                "text": "👍"
                            }
                        }
                    ]
                },
                "cardOrientation": "VERTICAL"
            }
        }
    }
}

Carousel of rich cards


{
    "contentMessage": {
        "richCard": {
            "carouselCard": {
                "cardWidth": "MEDIUM",
                "cardContents": [
                    {
                        "description": "Got a question about RCS and RBM? From what's different about the two terms to how it all works, we've got you covered with this comprehensive FAQs article.",
                        "title": "Vibes RCS Business Messaging",
                        "media": {
                            "contentInfo": {
                                "fileUrl": "https://cdn.prod.website-files.com/621fe9312baa6cd9b2719336/66e9ce4572066ce8790bc01c_RBM_FAQs.png",
                                "forceRefresh": false
                            },
                            "height": "MEDIUM"
                        },
                        "suggestions": [
                            {
                                "action": {
                                    "openUrlAction": {
                                        "url": "https://www.vibes.com/blog/rcs-business-messaging"
                                    },
                                    "postbackData": "urlaction_blog_rbmfaq",
                                    "text": "RBM: FAQ"
                                }
                            }
                        ]
                    },
                    {
                        "description": "Verified sender checkmarks, so users feel confident that they're talking to the brand they expect",
                        "media": {
                            "contentInfo": {
                                "fileUrl": "https://cdn.prod.website-files.com/621fe9312baa6cd9b2719336/66eb2b26f65a70bbebd0d248_66eb2b0f834e4bc95892e9a4_RBM-Verified-Sender.png",
                                "forceRefresh": false
                            },
                            "height": "MEDIUM"
                        },
                        "suggestions": [
                            {
                                "action": {
                                    "openUrlAction": {
                                        "url": "https://www.vibes.com/blog/rcs-business-messaging"
                                    },
                                    "postbackData": "urlaction_blog_rbmfaq",
                                    "text": "RBM: FAQ"
                                }
                            }
                        ]
                    }
                ]
            }
        }
    }
}