Send Template with a Location Header
Send a template whose header format is LOCATION. WhatsApp takes the map pin as a send-time
parameter, not part of the template definition, so it can differ on every message — send the
customer's own delivery address, pickup point, or store.
Omit location to fall back to the default pin saved on the template. A location template
with neither a send-time pin nor a default is rejected.
Authorization
ApiKeyAuth API key from your dashboard (Settings > API Keys)
In: header
Header Parameters
Optional. Attribute this send to a specific agent, overriding the agent bound to the API key. The agent must belong to your account and be active (role AGENT, parent = your account) — otherwise the request returns 400. Drives customer assignment, agent allotment limits, and the wallet ledger entry.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://loading/api/v1/messages/send#template-location" \ -H "X-AGENT-ID: agt_abc123" \ -H "Content-Type: application/json" \ -d '{ "to": "919876543210", "message": { "message_type": "template", "template_name": "delivery_on_the_way", "template_language": "en_US", "location": { "latitude": "19.0760", "longitude": "72.8777", "name": "Mumbai Office", "address": "Bandra Kurla Complex, Mumbai" }, "body_variables": [ "ORD-12345" ] } }'{
"success": true,
"data": {
"id": "clx9abc123def456"
}
}{
"success": false,
"message": "to field is required"
}{
"success": false,
"message": "user not authenticated"
}{
"success": false,
"message": "insufficient balance to send message"
}{
"success": false,
"message": "template not found"
}{
"success": false,
"message": "internal server error"
}Send Template with Header Variables + Attachment POST
Send a template message with header variables and a media header attachment.
Send Bulk Message POST
Send the same message to multiple recipients (max 50). The message body follows the same structure as single message operations — specify the `message_type` and its required fields. Recipients are deduplicated automatically. Empty phone numbers are ignored.


