WhatsApp
  1. Send Messages
  • Contact Management
    • Create a New Contact
      POST
    • List Contacts
      GET
    • Get Contact Details
      GET
    • Update Contact Information
      PUT
    • Delete Contact
      DELETE
  • Status Management
    • Create Status
      POST
    • List Statuses
      GET
    • Get Status Details
      GET
    • Update Status
      PUT
    • Delete Status
      DELETE
  • Source Management
    • Create Source
      POST
    • List Sources
      GET
    • Get Source Details
      GET
    • Update Source
      PUT
    • Delete Source
      DELETE
  • Group Management
    • List Groups
      GET
    • Create Group
      POST
    • Get Groups Details
      GET
    • Update Groups
      PUT
    • Delete Group
      DELETE
  • Template Management
    • List Templates
      GET
    • Get Templates Details
      GET
  • Template Bot Management
    • List TemplateBot
    • Get TemplateBot Details
  • Message Bot Management
    • List Messagebots
    • Get Messagebots Details
  • Send Messages
    • Send Simple Message
      POST
    • Send Template Message
      POST
    • Send Media Message to Contact
      POST
WhatsApp
  1. Send Messages

Send Template Message

POST
/api/v1/{subdomain}/messages/template
Send a WhatsApp template message to a specific phone number with comprehensive parameter support and template validation.
Optionally creates a contact if it doesn't exist.
Important - No 24-Hour Restrictions: Template messages can be sent at any time, regardless of the customer service window.
Unlike simple text and media messages, approved templates are not restricted by Meta's 24-hour policy.
They are the only message type that can be sent outside a customer service window, making them perfect
for marketing campaigns, notifications, and re-engaging customers after extended periods of inactivity.

Request

Authorization
Path Params

Body Params multipart/form-dataRequired

Responses

🟢200
application/json
success
Body

🟠403
🟠404
🟠422
🔴500
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://whatsapp.qtap.chat/api/v1//messages/template' \
--form 'phone_number="+919909919284"' \
--form 'template_name="welcome_message"' \
--form 'template_language="en"' \
--form 'from_phone_number_id="1234567890"' \
--form 'contact="{
    \"firstname\": \"John\",
    \"lastname\": \"Doe\",
    \"email\": \"john.doe@example.com\",
    \"country\": \"India\",
    \"groups\": \"VIP Customers,Newsletter Subscribers\"
}"' \
--form 'header_image_url="https://cdn.pixabay.com/photo/2015/01/07/15/51/woman-591576_1280.jpg"' \
--form 'header_image_file=@""' \
--form 'header_video_url="http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerEscapes.mp4"' \
--form 'header_video_file=@""' \
--form 'header_document_url="https://example.com/brochure.pdf"' \
--form 'header_document_file=@""' \
--form 'header_document_name="Product Brochure 2024"' \
--form 'header_field_1="John

Body Parameters (dynamic values based on your template'\''s placeholders):"' \
--form 'field_1="25"' \
--form 'field_2="John Doe"' \
--form 'field_3="Premium"' \
--form 'field_4="December 2024"' \
--form 'field_5="quia"' \
--form 'field_6="quia"' \
--form 'field_7="quia"' \
--form 'field_8="quia"' \
--form 'field_9="quia"' \
--form 'field_10="quia"' \
--form 'button_0="john.doe@example.com"' \
--form 'button_1="+919909919284"' \
--form 'button_2="quia"' \
--form 'copy_code="SAVE20"'
Response Response Example
200 - Example 1
{
    "status": "success",
    "message": "Template message sent successfully",
    "data": {
        "message_id": "wamid.HBgMOTE5ODEwNjAwMDAwFQIAERgSNUU1RjE4MUM0QjY5MjFFNzYzAA==",
        "contact_id": 15,
        "phone": "+919909919284",
        "template_name": "welcome_message",
        "template_language": "en",
        "status": "sent",
        "sent_at": "2024-02-08 14:30:25",
        "chat_id": 8,
        "contact_created": false,
        "parameters_used": {
            "header": [
                "John"
            ],
            "body": [
                "25",
                "John Doe",
                "Premium"
            ],
            "buttons": [
                "john.doe@example.com"
            ]
        }
    }
}
Previous
Send Simple Message
Next
Send Media Message to Contact
Built with