Call-to-Action
Sends a Call-to-Action (CTA) WhatsApp message to a recipient. This message type is ideal for guiding users to take a specific action outside WhatsApp, such as visiting a website, booking an appointment, or completing a task.
Common use cases:
- Booking demos or consultations
- Scheduling or rescheduling appointments
- Completing payments or checkouts
- Accessing support or help centers
- Continuing onboarding or verification flows

URL
https://api.messagesmart.nl/api/v1/whatsapp/messages/cta
Headers
See Authentication.
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
| whatsAppBusinessId | string | Yes | Can be collected from the dashboard or provided via webhook |
| whatsAppBusinessPhoneNumberId | string | Yes | Can be collected from the dashboard or provided via webhook |
| to | string | Yes | Recipient phone number in E.164 format |
| headerText | string | Yes | Header text shown above the message |
| body | string | Yes | Main message text |
| buttonText | string | Yes | Text shown on the CTA button |
| url | string | Yes | URL opened when the button is clicked |
Examples
JSON
{
"whatsAppBusinessId": "123456789012345",
"whatsAppBusinessPhoneNumberId": "106540352242922",
"to": "+31612345678",
"headerText": "Book a demo",
"body": "Interested in seeing how our platform can help your business?\n\nSchedule a short demo with one of our specialists and get your questions answered.",
"buttonText": "Schedule demo",
"url": "https://calendly.com/company/demo"
}Response
Success (200 OK)
{
"success": true,
"data": {
"messaging_product": "whatsapp",
"contacts": [
{
"input": "+31612345678",
"wa_id": "31612345678"
}
],
"messages": [
{
"id": "wamid.HBgLMTY0NjcwNDM1OTUVAgARGBI1RjQyNUE3NEYxMzAzMzQ5MkEA"
}
]
}
}Notes
- The returned
data.messages[0].idis the WhatsApp message ID. - The CTA button opens the provided
urlin the WhatsApp client.
Validation error (400 Bad Request)
Returned when required fields are missing or invalid.
{
"success": false,
"error": {
"code": "validation_error",
"message": "Invalid request body",
"httpStatus": 400,
"details": null
}
}Common causes:
- Missing both
whatsAppBusinessIdandwhatsAppBusinessPhoneNumberId - Missing
headerText,body,buttonText, orurl - Invalid URL format
Provider error (502 Bad Gateway)
Returned when the message could not be sent via WhatsApp / Meta.
{
"success": false,
"error": {
"code": "WHATSAPP_SEND_FAILED",
"message": "Failed to send WhatsApp CTA message.",
"httpStatus": 502,
"details": {
"provider": "meta",
"raw": {}
}
}
}Last updated on