Send Template with Attachment
Send a template message with a media header (image, video, or document). The attachment replaces the template's header media placeholder.
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-attachment" \ -H "X-AGENT-ID: agt_abc123" \ -H "Content-Type: application/json" \ -d '{ "to": "919876543210", "message": { "message_type": "template", "template_name": "product_catalog", "template_language": "en_US", "attachments": { "type": "image", "attachment": "https://example.com/catalog-cover.jpg" } } }'{
"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 Body + Header Variables + Attachment POST
Send a template message with all dynamic parameters: body variables, header variables, and a media header attachment. This is the most complete template sending option.
Send Template (Basic) POST
Send a pre-approved WhatsApp template message with no dynamic variables or attachments. Just the template name and language.


