Skip to main content
POST
/
api
/
v1
/
send-message
Send Transactional Message
curl --request POST \
  --url https://otpedge.com/api/v1/send-message \
  --header 'Content-Type: application/json' \
  --data '
{
  "to": "<string>",
  "template": "<string>",
  "language": "<string>",
  "variables": {
    "header": {},
    "body": {},
    "button": {}
  }
}
'
{
  "success": true,
  "req_id": "msg_a1b2c3d4e5f6",
  "status": "dispatched",
  "template": "invoice_receipt",
  "usage": "14/1000"
}

Request Body

to
string
required
The recipient’s phone number in strict E.164 format (e.g., +919876543210).
template
string
required
The exact name of the WhatsApp template you created in your Meta Business account (e.g., invoice_receipt).
language
string
The language code of the template. Defaults to en_US.
variables
object
An object containing the dynamic data to inject into the template.

Request Examples

curl -X POST https://otpedge.com/api/v1/send-message \
     -H "Authorization: Bearer your_api_key_here" \
     -H "Content-Type: application/json" \
     -d '{
       "to": "+919876543210",
       "template": "invoice_receipt",
       "language": "en_US",
       "variables": {
         "header": {
           "type": "document",
           "link": "https://your-site.com/invoices/INV-123.pdf",
           "filename": "Monthly_Invoice.pdf"
         },
         "body": [
           "John Doe",
           "$49.99"
         ],
         "button": [
           "INV-123"
         ]
       }
     }'

Response Examples

{
  "success": true,
  "req_id": "msg_a1b2c3d4e5f6",
  "status": "dispatched",
  "template": "invoice_receipt",
  "usage": "14/1000"
}