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. 10–15 characters.
One of
image, document, video, audio. Stickers are not supported via API.Public URL of the media asset. Required if
media_file is not supplied.Uploaded media file. Required if
media_url is not supplied.Caption for
image, video, or document. Max 1024 characters.Display filename for document messages. Max 255 characters.
Optional contact payload for creating or updating the contact 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"} |
422 | Validation | {"status":"error","message":"Validation failed","errors":{"media_url":["The media url field is required when media file is not present."]}} |
429 | Rate limit | {"message":"Too many requests","retry_after":45} |
500 | Send failure | {"status":"error","message":"Failed to send media message"} |