Skip to main content

Endpoint

FieldValue
MethodPOST
Path/api/messages/send/raw
Content-Typeapplication/json

Request body

FieldTypeDescription
payloadobjectRaw message payload to queue.
payload.recipientstringPhone number that receives the message.
payload.tostringWhatsApp recipient phone number.
payload.typestringMessage type. Use "template".
payload.template.namestringWhatsApp template name.
payload.template.language.codestringTemplate language code.
payload.template.componentsobject[]WhatsApp template components and parameters.
whatsappBusinessIdstringConnected WhatsApp Business Account ID (WABA ID).
phoneNumberIdstringLinked WhatsApp phone number ID to send from.
The easiest way to get the correct template.components for your template is from the Modawer Portal. After linking your WhatsApp account, open the API Playground section and select Send WhatsApp Template.
This page is for regular WhatsApp template messages, including Marketing, Utility, and other template categories. For OTPs sent from your own WhatsApp account using an AUTHENTICATION template and optional message flow, see Send OTP from Your WhatsApp Account.

Required header

X-API-KEY: your-app-token

Success response

{
  "queued": true
}

cURL example

curl -X POST "https://modawer.com/api/messages/send/raw" \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: your-app-token" \
  -d '{
    "whatsappBusinessId": "123456789012345",
    "phoneNumberId": "1058560794000297",
    "payload": {
      "recipient": "9647701234567",
      "to": "9647701234567",
      "type": "template",
      "template": {
        "name": "order_update",
        "language": {
          "code": "ar"
        },
        "components": []
      }
    }
  }'