CTA URL buttons on WhatsApp: Hub support and options

The Hub does not send cta_url interactive messages. Meta payload for reference, plus the two routes that work: template URL buttons and text links.

A call-to-action URL button is a single, tappable button under a message that opens a web page: a tracking link, a payment page, a form. It is cleaner than pasting a long URL into the body, and it is one of the most requested interactive formats. It is also a format the CRPRO Hub does not send as a free-form interactive message. This article is explicit about that, shows the Meta payload for reference, and gives the two routes that do work through the Hub.

Can the Hub send a CTA URL button message?

Short answer: no. The Hub's interactive schema accepts only reply buttons and lists. An interactive object of type cta_url is refused with 400 INVALID_MESSAGE.

The send endpoint validates interactive messages against two shapes, button and list. Any other interactive type, including cta_url and flow, does not match, and the request fails before anything is queued. Nothing in the Hub's current documentation promises otherwise, so build on the supported routes below and do not rely on a future addition. Request authentication and the base call are in the quickstart.

What does Meta's CTA URL payload look like?

Short answer: an interactive object of type cta_url with a body and an action named cta_url whose parameters hold the button label and the URL. This is Meta's format, shown for reference.

Meta Cloud API payload, not accepted by the CRPRO Hub's send endpoint.
{ "messaging_product": "whatsapp", "recipient_type": "individual", "to": "<WHATSAPP_USER_PHONE_NUMBER>", "type": "interactive", "interactive": { "type": "cta_url", "header": { "type": "text", "text": "<HEADER_TEXT>" }, "body": { "text": "<BODY_TEXT>" }, "action": { "name": "cta_url", "parameters": { "display_text": "<BUTTON_LABEL_TEXT>", "url": "<BUTTON_URL>" } }, "footer": { "text": "<FOOTER_TEXT>" } } }

Per Meta's CTA URL reference, display_text is limited to 20 characters, the body to 1,024 characters, and the footer and a text header to 60 characters each. The header can also be an image, video or document served from a public URL. The URL opens in the device's default browser. The page does not state a maximum length for the URL itself.

How does a URL button go through the Hub with a template?

Short answer: use a template that defines a URL button and fill its variable in the template send. The Hub accepts a button component with sub_type url.

Templates are the route that also works outside the 24-hour window. Meta's template components reference describes the model: a URL button can contain one variable, written {{1}}, appended to the end of the URL string; the template definition must supply an example value; the button text is limited to 25 characters, the URL to 2,000 characters including the variable, and a template may have at most two URL buttons. When you send, the button component carries the value for the variable. The Hub's schema accepts a component of type button with sub_type url, an index and text parameters.

curl -X POST https://crprohub.com/api/v1/channels/CHANNEL_UUID/messages \ -H "Authorization: Bearer hub_pk_EXAMPLE_NOT_REAL" \ -H "Idempotency-Key: tracking-link-1042" \ -H "Content-Type: application/json" \ -d '{ "to": "5521999999999", "type": "template", "template": { "name": "order_tracking", "language": { "code": "en_US" }, "components": [ { "type": "button", "sub_type": "url", "index": "0", "parameters": [{ "type": "text", "text": "1042" }] } ] } }'
order_tracking is an example name for a template you have already created and had approved, whose URL button ends in a {{1}} variable. Meta's page shows a named-variable example for the parameter; verify the exact parameter format for your template before relying on it.

Percent-encode special characters in the value, because Meta warns that an invalid generated URL makes the send fail. A value such as an order number is safe; a name with spaces or accents is not unless encoded.

Short answer: send a text with the URL in the body. WhatsApp hyperlinks it automatically, and preview_url asks the client to render a preview.

{ "to": "5521999999999", "type": "text", "text": { "preview_url": true, "body": "Track order 1042 here: https://example.com/track/1042" } }

This is a free-form message, so it needs an open service window. It lacks the button, but it is the only option that needs no template. Place the link in its own line near the end of the message so it reads as an action. The text message tutorial in this series covers the preview behaviour in detail.

How can link usage be detected?

Short answer: on your own web server, with a link that identifies the message. The messaging webhooks do not carry a click event.

Put an identifier in the part of the URL you control, such as the order number or a signed token, and log the request when it arrives. For a URL-button template, that identifier is the variable at the end of the URL. A page like /track/1042 already tells you which order was opened; adding a signed token additionally lets you confirm that the visitor came from the message and not from a guessed address. Avoid putting personal data in the URL, because links are stored in chat history, previews and server logs.

// Server side: log the visit and render the page app.get('/track/:orderId', (req, res) => { analytics.record({ event: 'whatsapp_link_open', orderId: req.params.orderId, at: Date.now() }) res.send(renderTracking(req.params.orderId)) })

Which route fits which situation?

Short answer: a text link inside the window, a URL-button template outside it.

SituationRouteNotes
Customer wrote in the last 24 hoursText with link and preview_urlNo template needed
Business starts the conversationTemplate with a URL buttonTemplate must be approved; the variable is the end of the URL
You need a button in a free-form messageNot available through the Hubcta_url is rejected with 400 INVALID_MESSAGE

Whichever route you pick, the 202 response only means accepted. The documentation consulted describes no click callback; the status events show sent, delivered, read or failed, as described in the webhooks reference.

Which security points apply to links?

Short answer: use HTTPS, avoid secrets in URLs and expect the link to be forwarded.

A link sent in a chat can be copied, forwarded and stored in backups, so treat it as semi-public. Do not include passwords, access tokens or full personal details in the path or the query string. If the page behind the link shows private data, require the customer to confirm their identity on the page, rather than relying on possession of the URL. For tracking or confirmation links, use random, hard-to-guess identifiers and let them expire. These points apply equally to a text link and to the variable of a URL-button template.

  • Serve every link over HTTPS.
  • Keep personal data and secrets out of the URL.
  • Use unguessable identifiers and set an expiry for sensitive pages.
  • Percent-encode variable values before putting them in a template URL.
  • Check the destination page on a phone, where most customers will open it.

What if the link does not open?

Short answer: show the plain URL in the text as well, or keep the page simple enough to load on a slow connection.

Customers use all kinds of devices and networks, and links sometimes fail for reasons outside your control: a blocked domain, a slow connection or a browser that rewrites the address. A button label that describes what happens, such as Track order, sets expectations, and a short page that loads quickly keeps abandonment low. If the action is essential, such as paying a bill, provide an alternative that works without the link, for example a reply keyword that triggers a text with instructions. Plan the failure path as carefully as the happy path.

  • Describe the destination in the label.
  • Keep the landing page light.
  • Offer an alternative for essential actions.
  • Test the link on a mobile connection, not just on office Wi-Fi.

Frequently asked questions

Why does the Hub reject interactive type cta_url?

The Hub validates interactive messages against reply buttons and lists only. Other Meta interactive types do not match its schema and fail with 400 INVALID_MESSAGE.

Can a template have a button that opens a URL?

Yes. Meta supports URL buttons in templates, with at most one variable at the end of the URL and a limit of two URL buttons per template. The Hub accepts the button component with sub_type url when sending.

What is the maximum label length for a CTA button?

Meta's CTA URL reference limits display_text to 20 characters. For a URL button defined in a template, the limit stated in the template components reference is 25 characters.

Is there a callback when the customer taps the URL?

The documentation consulted describes no click event for CTA or URL buttons, only the sent, delivered, read and failed statuses. Track clicks on your own site, for example with a distinct path or query parameter.

Fontes

Documentação oficial da Meta, conferida em 31 de outubro de 2026.