Skip to main content
POST
https://backend.conversales.in
/
api
/
v1
/
sendTemplateMessage
curl -X POST "https://backend.conversales.in/api/v1/sendTemplateMessage" \
  -H "X-API-Key: 3kJ9mP2nQ8rT5vW7xY1zA4bC6dE8fG0hI" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "+1234567890",
    "templateName": "hello_world",
    "templateLanguage": "en"
  }'
{
  "statusCode": 200,
  "message": "Template message sent successfully",
  "data": {
    "messageId": "wamid.HBgNMTIzNDU2Nzg5MAUCABIYFjNFQjBDMTg5RjNCN0Q5OEQyMDhGAA==",
    "status": "sent",
    "recipient": "+1234567890"
  }
}

Authentication

X-API-Key
string
required
Your API key for authentication

Request Body

to
string
required
Recipient’s phone number in international format (e.g., +1234567890)
templateName
string
required
Name of the WhatsApp template to use
templateLanguage
string
required
Language code for the template (e.g., en, en_US)
templateVars
object
Template variable mappings (only required if template has dynamic variables)
clientId
string
Optional client reference ID for tracking

Response

statusCode
number
HTTP status code (200 for success)
message
string
Success or error message
data
object
curl -X POST "https://backend.conversales.in/api/v1/sendTemplateMessage" \
  -H "X-API-Key: 3kJ9mP2nQ8rT5vW7xY1zA4bC6dE8fG0hI" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "+1234567890",
    "templateName": "hello_world",
    "templateLanguage": "en"
  }'
{
  "statusCode": 200,
  "message": "Template message sent successfully",
  "data": {
    "messageId": "wamid.HBgNMTIzNDU2Nzg5MAUCABIYFjNFQjBDMTg5RjNCN0Q5OEQyMDhGAA==",
    "status": "sent",
    "recipient": "+1234567890"
  }
}
Variable Modes: - custom - Use the provided value directly - contactfield - Look up the value from the contact database using the field name
Templates must be pre-approved by WhatsApp before use. Variable names must match template placeholders exactly. Contact field lookups are case-sensitive.
Use the clientId parameter to track messages in your own system. This ID will be returned in webhooks and status updates.
Media URLs (headerMediaUrl) must be HTTPS and publicly accessible. Templates with media headers require a valid URL to be provided.