Skip to main content
POST
/
api
/
v1
/
whatsapp
/
template
Send WhatsApp template message
curl --request POST \
  --url https://{subdomain}.mindhunters.ai/api/v1/whatsapp/template \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "agentId": "32d8fc98-be1e-4d32-a12e-146f397fb1cb",
  "templateId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "phoneNumber": "+905435506677",
  "parameters": {
    "field1": "John Doe",
    "field2": "Order #12345",
    "field3": "2024-01-15"
  }
}'
{
  "success": true,
  "message": "WhatsApp template message sent successfully",
  "data": {
    "messageId": "wamid.HBgMOTA1NDM1NTA2Njc3FQIAEhggRDdBQjlFM0Q2Q0E4OEJBMDE5NkMyNEZBNjVCNzE2MzYA",
    "templateName": "order_confirmation",
    "recipientPhone": "+905435506677",
    "conversationId": 456
  }
}

Authorizations

Authorization
string
header
required

Use a Bearer token to access these API endpoints. Example: "Bearer {your-token}"

Body

application/json
agentId
string<uuid>
required

UUID of the Agent. Must exist and have WhatsApp configured.

Example:

"32d8fc98-be1e-4d32-a12e-146f397fb1cb"

templateId
string<uuid>
required

UUID of the approved WhatsApp template to send. You can get the templateId from the templates section.

Example:

"a1b2c3d4-e5f6-7890-abcd-ef1234567890"

phoneNumber
string
required

Phone number of the recipient in E.164 format (e.g., +1234567890).

Example:

"+905435506677"

parameters
object

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.

Example:
{
"field1": "John Doe",
"field2": "Order #12345",
"field3": "2024-01-15"
}

Response

Success

success
boolean
Example:

true

message
string
Example:

"WhatsApp template message sent successfully"

data
object