Whats App

Sending Template Message

POST
/conversation/wab/v1/messages

Use the /v1/messages endpoint to send templates messages to your customers. What's different about sending template messages is the body content of the message specified with the template parameter. The template parameter contains a namespace and a name pair that identifies the template and the values that apply to variables in that template.

Authorization

bearerAuth
AuthorizationBearer <token>

JWT access token returned by Signing In (POST /auth/v1/tokens/).

In: header

Request Body

application/json

to*string

The mobile number to send message to

recipient_type*string

The type of recipient which is "individual" in this case

Default"individual"
type*string

The type of the message which "template" in this case

Default"template"
template*

The object defines the template parameters

clientReferenceID?string

An identifier for the message from your system

isTemplateWithFlow?boolean

If the template being sent includes a flow, this parameter must be required and set to the value "true".

Defaultfalse

Response Body

application/json

application/json

curl -X POST "https://example.com/conversation/wab/v1/messages" \  -H "Content-Type: application/json" \  -d '{    "type": "body",    "parameters": [      {        "type": "text",        "text": "text-string"      },      {        "type": "currency",        "currency": {          "fallback_value": "$23.45",          "code": "USD",          "amount_1000": 23450        }      },      {        "type": "date_time",        "date_time": {          "fallback_value": "July 12, 1980",          "timestamp": 1485470276        }      }    ]  }'
"{\n  \"messages\": [{\n    \"id\": \"<generated message id>\"\n  }]\n}"