WhatsApp Templates
Send a WhatsApp template to a contact, even if the chat is closed. The API will also reopen the chat session.
Query parameters
apiKeystringOptionalExample:
API key for authentication
your_api_key
Body
contactIdstringRequired
ID of the contact to send the template to
whatsappTemplateIdstringRequired
ID of the WhatsApp template to send
Responses
200
Template sent successfully
application/json
400
Invalid request
application/json
403
Twilio credentials not found
application/json
500
Server error
application/json
post
POST /v1/whatsapp-templates/send HTTP/1.1
Host: api.dmchamp.com
Content-Type: application/json
Accept: */*
Content-Length: 61
{
"contactId": "contact123",
"whatsappTemplateId": "template456"
}
{
"success": true,
"data": "WhatsApp template message sent successfully"
}
Retrieve all WhatsApp templates for the authenticated user
Query parameters
apiKeystringOptionalExample:
API key for authentication
your_api_key
Responses
200
Successfully retrieved WhatsApp templates
application/json
400
Invalid request
application/json
500
Server error
application/json
get
GET /v1/whatsapp-templates HTTP/1.1
Host: api.dmchamp.com
Accept: */*
{
"success": true,
"data": [
{
"id": "template123",
"name": "welcome_message",
"status": "approved",
"language": "en_US",
"category": "MARKETING",
"createdAt": "2023-01-01T00:00:00.000Z"
},
{
"id": "template456",
"name": "appointment_reminder",
"status": "approved",
"language": "en_US",
"category": "UTILITY",
"createdAt": "2023-01-02T00:00:00.000Z"
}
]
}
Was this helpful?