Overview
Every business-initiated WhatsApp message must use a Meta-approved template. The v2 send API adds dynamic URL buttons, per-recipient header media, COPY_CODE buttons, and AUTHENTICATION templates over v1. All sends go to POST /api/v2/whatsapp/templates/{TEMPLATE_ID}/send (no trailing slash).
Body variables
Templates use numbered placeholders {{1}} {{2}} {{3}} in the body. body_params[0] fills {{1}}, body_params[1] fills {{2}}, and so on.
curl --request POST \
'https://app.buzzbip.com/api/v2/whatsapp/templates/1289/send' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_JWT' \
--data '{
"to": "21696816277",
"country_code": "TN",
"body_params": ["Sam", "ORD-2026-00041"]
}'- In Buzzbip, create a template with body: "Hello {{1}}, your order {{2}} is confirmed."
- Submit and wait for APPROVED status.
- Send with body_params matching the placeholder count exactly.
Note: body_params count must exactly match the {{N}} placeholder count. A mismatch returns HTTP 400.
Dynamic URL button
Send a per-recipient unique URL in a call-to-action button. The template URL is fixed at approval time except for a {{1}} suffix. buttons[].value replaces that suffix per recipient. 💡 Tip: Use a short unique slug or token as the value — order ID, hash, or tracking code.
curl --request POST \
'https://app.buzzbip.com/api/v2/whatsapp/templates/1296/send' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_JWT' \
--data '{
"to": "21696816277",
"country_code": "TN",
"body_params": ["Sam"],
"buttons": [
{ "index": 0, "sub_type": "url", "value": "ord-2026-00041" }
]
}'- Create a template with a URL button: https://shop.example.com/track/{{1}}
- Submit and wait for APPROVED status.
- Send with buttons array, index 0, sub_type "url", value is the unique suffix.
Note: Meta allows only one {{1}} placeholder in a URL and it must be at the end. You cannot use {{1}}/path/{{2}}.
Per-recipient PDF, image, or video
Two-step flow to send a different file to each customer. For multiple PDFs to one recipient: A — merge PDFs server-side → one upload → one send; B — multiple sends: repeat upload+send per file, same template_id; C — main doc as header + extra files as signed URL buttons. ⚠️ Note: WhatsApp allows exactly one header attachment per send. You cannot attach multiple files in a single message.
curl --request POST \
'https://app.buzzbip.com/api/v2/whatsapp/media' \
--header 'Authorization: Bearer YOUR_JWT' \
--form 'file=@/path/to/invoice-sam-april.pdf'- Upload the file: POST /api/v2/whatsapp/media (multipart, field: file) → response contains media_id
- Send the template with header_media_id set to that media_id. For DOCUMENT type, also set document_filename.
- Repeat steps 1–2 for each recipient with their specific file.
COPY_CODE button and OTP
Two sub-patterns. D1: promo/discount code the customer copies — create template with COPY_CODE button, send with buttons [{ index: 0, sub_type: "copy_code", value: "SAVE25" }], different code per customer. D2: OTP for AUTHENTICATION templates — send with otp_code only, no body_params or buttons; API inserts code into body and Copy Code button.
curl --request POST \
'https://app.buzzbip.com/api/v2/whatsapp/templates/1299/send' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_JWT' \
--data '{
"to": "21696816277",
"country_code": "TN",
"body_params": ["Sam"],
"buttons": [{ "index": 0, "sub_type": "copy_code", "value": "SAVE25" }]
}'Note: otp_code cannot be combined with body_params or buttons.
Combining body params, media, and buttons
All optional fields can be combined in one send when the template has matching components.
curl --request POST \
'https://app.buzzbip.com/api/v2/whatsapp/templates/1302/send' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_JWT' \
--data '{
"to": "21696816277",
"country_code": "TN",
"body_params": ["Sam", "2026-04", "99.00 TND"],
"header_media_id": 1542,
"document_filename": "invoice-sam-april-2026.pdf",
"buttons": [
{ "index": 0, "sub_type": "url", "value": "r/sam-2026-04" }
]
}'What's next?
Related: api/v2/whatsapp-templates/send-template api/v2/whatsapp-media guides/whatsapp-common-gotchas
