Updated on November 24, 2026
There are two ways to send a link button through the WhatsApp Business API: the interactive cta_url message, which can only be sent while the customer service window is open, and the URL button inside an approved template, which works outside the window. Both open the URL in the customer’s browser and hide the address behind a short label such as “View order” or “Pay now”. Which one you use depends on who started the conversation and when you are sending.
This guide shows the JSON for both formats, the character limits from Meta’s official documentation, and how to measure clicks with UTM parameters, since Meta does not document a webhook for button taps.
The two kinds of link button
Interactive cta_url message | Template URL button | |
|---|---|---|
| When you can send it | Only while the customer service window is open | Any time, including outside the window |
| Needs approval | No | Yes, the template goes through Meta review |
| Link buttons | One | Up to two URL buttons per template |
| Button label | Up to 20 characters | Up to 25 characters |
| URL | Any URL on each send | Fixed, with one optional variable at the end |
| Header | Optional: text, image, video or document | As defined in the approved template |
| Pricing (recipients in Brazil) | Service message | Template category (marketing, utility) |
The customer service window opens when the customer messages your business. While it is open, you can reply with any message type, including interactive messages. Outside it, you can only send templates. Our article on the WhatsApp 24-hour customer service window covers this rule in detail.
Interactive cta_url message: the JSON
A cta_url message is one type of WhatsApp interactive message. It has a required body, an optional header and footer, and a single button that opens the URL in the device’s default browser.
curl -X POST "https://graph.facebook.com/v27.0/PHONE_NUMBER_ID/messages" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"messaging_product": "whatsapp",
"recipient_type": "individual",
"to": "15551234567",
"type": "interactive",
"interactive": {
"type": "cta_url",
"header": {
"type": "text",
"text": "Order 48213 confirmed"
},
"body": {
"text": "Your order has been approved. Tap the button to follow picking and delivery."
},
"footer": {
"text": "Example Store"
},
"action": {
"name": "cta_url",
"parameters": {
"display_text": "View order",
"url": "https://store.example.com/orders/48213?utm_source=whatsapp&utm_medium=cta_url&utm_campaign=post_purchase"
}
}
}
}'
The fields that matter:
interactive.typeandaction.nameare bothcta_url.parameters.display_textis the button label.parameters.urlis the address that opens in the browser when the customer taps the button.headeris optional. Besidestext, it acceptsimage,videoanddocument, with alinkpointing to a file on a public server.
Example of an image header:
"header": {
"type": "image",
"image": {
"link": "https://store.example.com/img/order-48213.jpg"
}
}
cta_url message limits
According to the CTA URL messages documentation:
| Field | Limit |
|---|---|
| Header text | 60 characters |
Body (body.text) | 1,024 characters |
Footer (footer.text) | 60 characters |
Button label (display_text) | 20 characters |
For the full table of body, header, footer, button and list limits, see our guide to WhatsApp API character limits.
When cta_url makes sense
The interactive message is the natural reply inside a conversation the customer started:
- The customer asks “where’s my order?” and the bot replies with a “Track order” button.
- A support agent sends the payment link after agreeing on a quote.
- The customer asks for a copy of an invoice and gets a “Download invoice” button.
- A support bot points to a help center article.
The advantage over pasting the URL in the text is visual: the customer sees a button with a clear label, not a long address full of tracking parameters.
Want to try it while you read? Create a Vectalk account and send your first message through the official API. Create free account →
Template URL button: the JSON
Outside the window, a link button has to live inside an approved template. The template components documentation sets the URL button rules:
- Up to two URL buttons per template.
- Button label of up to 25 characters.
- URL of up to 2,000 characters.
- The URL accepts one variable, always at the end of the address.
- A template with a URL variable needs a sample value when you create it.
Creating a template with a dynamic URL
{
"name": "order_shipped_tracking",
"language": "en_US",
"category": "UTILITY",
"components": [
{
"type": "BODY",
"text": "Hi {{1}}! Your order {{2}} is out for delivery. Track it with the button below.",
"example": {
"body_text": [["Anna", "48213"]]
}
},
{
"type": "BUTTONS",
"buttons": [
{
"type": "URL",
"text": "Track order",
"url": "https://store.example.com/tracking/{{1}}",
"example": ["48213?utm_source=whatsapp"]
}
]
}
]
}
The fixed part (https://store.example.com/tracking/) goes through review. Only the suffix changes on each send. The creation process is covered in how to create templates with the API, and URL variables have a dedicated guide: template with a dynamic URL button.
Sending the template with the URL suffix
When sending, the variable value goes in a button component with sub_type set to url and the button index (starting at zero):
{
"messaging_product": "whatsapp",
"to": "15551234567",
"type": "template",
"template": {
"name": "order_shipped_tracking",
"language": { "code": "en_US" },
"components": [
{
"type": "body",
"parameters": [
{ "type": "text", "text": "Anna" },
{ "type": "text", "text": "48213" }
]
},
{
"type": "button",
"sub_type": "url",
"index": "0",
"parameters": [
{ "type": "text", "text": "48213?utm_source=whatsapp&utm_medium=template&utm_campaign=order_shipped" }
]
}
]
}
}
Our guide on how to send a WhatsApp template message via the API covers the other components (media header, quick reply, copy code).
Encode the suffix
The documentation says special characters in the variable value must be percent-encoded before sending: a space becomes %20, and “Gonçalves” becomes Gon%C3%A7alves. In JavaScript, run encodeURIComponent on each value, not on the whole URL:
const order = "48213";
const campaign = "order shipped";
const suffix = `${encodeURIComponent(order)}?utm_source=whatsapp&utm_campaign=${encodeURIComponent(campaign)}`;
// 48213?utm_source=whatsapp&utm_campaign=order%20shipped
One more template detail: when there are more than three buttons, WhatsApp shows two and groups the rest under “See all options”. If the link button is the main action, put it first.
How to track clicks with UTM
The cta_url documentation does not describe any webhook fired when the customer taps the button. Webhooks report delivery and read status, but the click happens in the browser. So tracking is done on the website side.
The simplest approach is to add UTM parameters to the URL:
| Parameter | Example | Purpose |
|---|---|---|
utm_source | whatsapp | Traffic source |
utm_medium | cta_url or template | Separates interactive messages from templates |
utm_campaign | order_shipped | Campaign or template name |
utm_content | track_button | Which button, when there are two |
With this, GA4 or any other analytics tool can split visits by message. Our article on WhatsApp template UTM tracking shows how to tie the click to the sale in GA4.
To measure per person rather than per campaign, generate your own identifier for each send and add it to the URL (for example, ?ref=a8f3c2). Store the link between that code, the customer’s number and the wamid returned by the API in your database. When your site receives a visit with that ref, you know who clicked and on which message. Avoid putting phone numbers or emails in plain text in the URL.
A useful metric is to compare the read status from the webhook with site visits: reads without clicks suggest the copy or the button label didn’t persuade.
Common mistakes
- Sending cta_url outside the window. Non-template messages require an open window. To reach someone who hasn’t written in the last 24 hours, use a template with a URL button.
- Button label too long. The limit is 20 characters for
cta_urland 25 for templates. “Follow your order here” doesn’t fit incta_url; “View order” does. - Variable in the middle of the template URL. The variable must be at the end.
https://site.com/{{1}}/detailsis not accepted; restructure the route ashttps://site.com/details/{{1}}. - Unencoded suffix. Spaces and accented characters in the variable value break the link. Encode each value.
- Third-party URL shorteners. They hide the destination domain and get in the way of tracking. Use your own brand domain with UTM.
- Expecting a click webhook. None is documented. Measure on your site.
Link buttons with Vectalk
Vectalk is a proxy for the official WhatsApp API: the request body is the same as Meta’s Cloud API. To send a cta_url message or a template with a URL button, change only the base URL and the token:
curl -X POST "https://apis.vectalk.com.br/api/messages" \
-H "Authorization: Bearer YOUR_VECTALK_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"messaging_product": "whatsapp",
"to": "15551234567",
"type": "interactive",
"interactive": {
"type": "cta_url",
"body": { "text": "Your invoice is ready." },
"action": {
"name": "cta_url",
"parameters": {
"display_text": "Download invoice",
"url": "https://store.example.com/invoice/48213?utm_source=whatsapp"
}
}
}
}'
Templates with URL buttons can be created in the dashboard, which includes a Template Library, and delivery and read statuses arrive at your webhook in Meta’s format. Vectalk does not have a support inbox or a campaign tool in the dashboard: messages are sent from your own system, CRM or automation connected to the API. The reference is at docs.vectalk.com.br and you can sign up at apps.vectalk.com.br/register.
Frequently asked questions
Can I send more than one link button in an interactive message?
A cta_url message has one button. If you need two links, use a template, which accepts up to two URL buttons, or send two messages.
Does the link button work outside the 24-hour window?
Only inside an approved template. The interactive cta_url message requires an open customer service window.
Can the webhook tell me whether the customer clicked?
Meta’s documentation does not describe a webhook for link button taps. Use UTM parameters or your own code in the URL and measure on your site.
Can the template URL be fully dynamic?
No. The base is fixed and approved with the template. Only one variable, at the end of the URL, changes on each send.
How much does a link button cost?
For recipients in Brazil: a cta_url inside the window is a service message, with an allowance of 1,000 per phone number per month and BRL 0.0350 from the 1,001st on. Templates are charged by category: BRL 0.3217 for marketing and BRL 0.0350 for utility, including when sent inside the window.
Official sources consulted on November 24, 2026: Interactive CTA URL messages, Template components, Templates overview, Send messages, Vectalk documentation.
Put your business on the official WhatsApp
Create your account, connect your number to the official API (you can keep the app with coexistence) and start serving customers and sending messages.
