v1

latestOpenAPI 3.0.02026-07-2411724301.7 KB
Direct Send Message

Direct Send Message

The WhatsApp Direct Send Message API allows you to send WhatsApp text and interactive messages without requiring a pre-approved template.

post/v2/{sid}/whatsapp/{phone_number}/messages

Path parameters

sidstring required
Example:HAXP2142XX

Security Identifier assigned to the account.

phone_numberstring required
Example:9186XXXXXXXX

WhatsApp business phone number.

Request body

Example request

{
  "messaging_object": {
    "messaging_product": "whatsapp",
    "recipient_type": "individual",
    "to": "91999XXXXXXX",
    "type": "text",
    "text": {
      "body": "Hello from Direct Send API"
    },
    "ttl_seconds": 600,
    "direct_send_config": {
      "template_name": "order_confirmation"
    }
  },
  "extra_info": {
    "ref": "customer1",
    "ref1": "marketing",
    "ref2": "dictionary",
    "wa_source": "campaign1"
  }
}

Response

Request Accepted

codestring

Response code.

messagestring

Response message.

errorobject

Empty object on success.

Example response

{
  "code": "WA202"
}