Menu
WhatsApp Login
Dialer Login
(Coming Soon)
Biller Login
(Coming Soon)
WhatsApp Business API / 4 min read

WhatsApp Business API JSON example

Sample JSON payloads for sending WhatsApp Business API messages.

Use these JSON examples to send WhatsApp Business API messages for text, templates, and interactive content.

Key takeaways

  • Text and media requests require proper type fields and IDs.
  • Template sends need name, language, and components with parameters.
  • Interactive messages include button objects and action payloads.

Text message JSON

  • Example: { "messaging_product": "whatsapp", "to": "<PHONE>", "type": "text", "text": { "body": "Hello {{name}}" } }
  • Include personalization server-side before sending.

Template message JSON

  • Example: { "messaging_product": "whatsapp", "to": "<PHONE>", "type": "template", "template": { "name": "order_update", "language": { "code": "en" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "Ankit" }, { "type": "text", "text": "ORD-123" } ] } ] } }
  • Match parameter count to placeholders and set language code correctly.

Interactive buttons JSON

  • Example: { "messaging_product": "whatsapp", "to": "<PHONE>", "type": "interactive", "interactive": { "type": "button", "body": { "text": "Confirm appointment?" }, "action": { "buttons": [ { "type": "reply", "reply": { "id": "confirm", "title": "Yes" } }, { "type": "reply", "reply": { "id": "reschedule", "title": "Reschedule" } } ] } } }
  • Handle reply IDs in your webhook to route the next step.

FAQs

Do I need to upload media first?

Yes. Upload media to get a media ID, then reference it in the message payload.

Can I send raw JSON from cURL?

Yes. Ensure headers include Authorization and Content-Type: application/json.

How do I test safely?

Use test numbers/whitelisted recipients and small controlled sends before production.

Try BotMax AI

Launch WhatsApp automation with compliant messaging

Verified templates, inbox for teams, broadcasts, reminders, and billing workflows.