Endpoint
messages.send.
Headers
| Header | Value |
|---|---|
Authorization | Bearer apitk_... |
Content-Type | application/json or multipart/form-data |
Accept | application/json |
Path parameters
Your workspace subdomain.
Body parameters
Recipient phone number. 8–15 characters.
Name of the template (as registered with Meta).
Template language code. 2–10 characters (e.g.
en_US).Meta phone-number id to send from. Defaults to the workspace’s primary number.
Header media (pick one pair)
URL of a hosted image. Used when the template header type is
IMAGE.Upload an image. Max 5120 KB.
URL of a hosted video.
Upload a video. Max 16384 KB.
URL of a hosted document.
Upload a document. Max 102400 KB.
Display filename for the header document. Max 255 characters.
Variable substitution
Value for
{{1}} in a text header.Value for
{{1}} in the body.Value for
{{2}} in the body.Value for
{{3}} in the body.Value for
{{4}} in the body.Value for
{{5}} in the body.Value for
{{6}} in the body.Value for
{{7}} in the body.Value for
{{8}} in the body.Value for
{{9}} in the body.Value for
{{10}} in the body.Button 0 dynamic parameter.
Button 1 dynamic parameter.
Button 2 dynamic parameter.
One-time password for OTP templates. Max 100 characters.
Optional contact payload for creating or updating the contact record behind this send.
Example request
Example response
200 OK
Error responses
| Status | When | Example body |
|---|---|---|
401 | Missing / invalid token | {"status":"error","message":"Invalid API token"} |
403 | Missing ability | {"status":"error","message":"Token does not have the required ability: messages.send"} |
404 | Template does not exist in your workspace | {"status":"error","message":"Template not found"} |
422 | Validation, or template is not APPROVED | {"status":"error","message":"Validation failed","errors":{"template_name":["Template is not APPROVED."]}} |
429 | Rate limit | {"message":"Too many requests","retry_after":45} |
500 | Send failure | {"status":"error","message":"Failed to send template message"} |