CTA Button in Session Message

Use this request to send a WhatsApp session message with a CTA button that opens a URL.

Endpoint details

FieldValue
URLhttps://apis.rmlconnect.net/wba/v1/messages
Authorization headerAuthorization: <RML Auth Token>
Content-Typeapplication/json
Message typeinteractive_cta

Request sample

curl --location 'https://apis.rmlconnect.net/wba/v1/messages' \
--header 'Authorization: <RML Auth Token>' \
--header 'Content-Type: application/json' \
--data '{
        "phone": "<phone no with country code preceded by plus sign>",
        "media": {
            "type": "interactive_cta",
            "header": {
                "text": "ABC Food Items"
            },
            "body": "Hello Humaann. Please select from the list below",
            "footer_text": "Menu",
            "action": {
                "parameters": {
                    "display_text": "See Dates",
                    "url": "https://www.google.com"
                }
            }
        }
    }'

Request body

FieldTypeDescription
phonestringRecipient phone number with country code preceded by a plus sign.
mediaobjectContains the CTA session message details.

Media object

FieldTypeDescription
typestringMessage type. Use interactive_cta.
headerobjectHeader content for the CTA message.
bodystringMain message text shown to the recipient.
footer_textstringFooter text shown below the message body.
actionobjectCTA action configuration.

Action parameters

FieldTypeDescription
display_textstringText displayed on the CTA button.
urlstringURL opened when the recipient selects the CTA button.


Did this page help you?