WhatsApp
Send WhatsApp message
Changed onSends a single templated message to a single recipient. Templates need to be registered and pre-approved by WhatsApp.
Choosing the content type for a template:
- template fills the template's placeholders in order from a plain list of strings. Use it for templates with numbered placeholders such as {{1}} in the body.
- custom takes the full Meta Cloud API template payload. Use it for templates with named placeholders such as {{first_name}}, and for templates with media headers or button variables. Text values for named placeholders take a parameter_name; numbered placeholders and media don't.
post/v2/whatsapp/messages
Request
- Base URLhttps://api.transmitmessage.com
- AuthAPI key in header x-api-key
Request body
Example request
{
"sender": "14155238886",
"recipient": "61411122211",
"content_type": "template",
"content": {
"template": {
"name": "welcome_new_customer",
"parameters": [
"Joe"
]
}
},
"message_ref": "optional-ref-123"
}Response
OK
Example response
{
"data": {
"id": "6fdae71c-dad7-4c36-9734-a69693ecf3b4",
"message_ref": "optional-ref-123",
"sender": "14155238886",
"recipient": "61411122211",
"content_type": "template",
"content": {
"template": {
"name": "welcome_new_customer",
"parameters": [
"Joe"
]
}
},
"created_at": "2021-01-01T00:00:00Z"
}
}Changes
- info
added the non-success response with the status
- info
- breaking
the
//response's property format changed fromphoneto no format for status
- breaking