v1

latestOpenAPI 3.0.22026-08-045831103.6 KB
Messages

Send template message

Send a WhatsApp message template (HSM). Template messages can be sent at any time, even when the 24-hour messaging window is closed. The template must be APPROVED by Meta and belong to the specified channel account. Variable placeholders ({{1}}, {{2}}, etc.) in the template are replaced with the provided parameter values.

post/v2/messages/template

Headers

api-tokenstring required

API Token

Request body

channel_account_idstring uuid required

UUID of the WhatsApp Official channel account

contact_idstring uuid required

UUID of the contact to send the template to

template_idstring uuid required

UUID of the message template to send. Must have APPROVED status.

chat_idstring uuid

Optional UUID of an existing chat. If not provided, the system will find or create a chat automatically.

Example request

{
  "channel_account_id": "550e8400-e29b-41d4-a716-446655440001",
  "contact_id": "550e8400-e29b-41d4-a716-446655440002",
  "template_id": "550e8400-e29b-41d4-a716-446655440010",
  "chat_id": "550e8400-e29b-41d4-a716-446655440003",
  "parameters": {
    "header": [
      "John"
    ],
    "body": [
      "John",
      "12345",
      "2024-01-15"
    ]
  }
}

Response

Template message queued for sending

statusinteger

Example response

{
  "status": 200,
  "data": {
    "success": true,
    "message_id": "550e8400-e29b-41d4-a716-446655440099",
    "chat_id": "550e8400-e29b-41d4-a716-446655440003",
    "status": "QUEUED"
  }
}