Send WhatsApp template message
Sends a WhatsApp template message to a specified phone number using an agent’s configured WhatsApp Business API. The template must be pre-approved by WhatsApp and the agent must have WhatsApp channel configured.
Authorizations
Use a Bearer token to access these API endpoints. Example: "Bearer {your-token}"
Body
UUID of the Agent. Must exist and have WhatsApp configured.
"32d8fc98-be1e-4d32-a12e-146f397fb1cb"
UUID of the approved WhatsApp template to send. You can get the templateId from the templates section.
"a1b2c3d4-e5f6-7890-abcd-ef1234567890"
Phone number of the recipient in E.164 format (e.g., +1234567890).
"+12345678900"
Which of the workspace's WhatsApp numbers the message leaves from — the identifier or endpoint_uuid of an entry from GET /api/v1/senders?channel=whatsapp.
Send it whenever the operator picked a number. Without it the number is whatever the agent's own binding happens to be, so a number served by an agent that owns a different one could never be sent from — and the operator's choice would be silently ignored.
The agent must have a claim on the number: it owns the binding, or a queue routes the number to it. Otherwise 422, rather than a message going out from an unexpected number. The template must also belong to that number's WhatsApp Business Account (templates are approved per WABA) — mismatches are refused here instead of by Meta after the fact.
"13204296811"
Optional object containing parameters to fill template placeholders. Keys should be field1, field2, etc. corresponding to {{1}}, {{2}}, etc. in the template. Omit this field if template has no placeholders.
Optional header media definition. Supports image, video, or document with a publicly accessible URL.
Response
Success
Indicates whether the request completed successfully. True for successful responses; false for documented error responses.
true
Human-readable response message. Safe to display in logs or simple client notifications; use structured fields for program logic.
"WhatsApp template message sent successfully"