message object:
type is one of text, template, interactive or media; content depends on it.
Each endpoint accepts the types that make sense for it: for example a Shortext inbound message is
text only.
Text
string
required
The text, up to 4,096 characters. On WhatsApp, a URL in the text is rendered as a link.
Template
string
required
The template name, as listed by
GET /templates.string
required
The template language, for example
fr or en_US. The template must be approved in this language.object
The body variables, by name:
{ "name": "Brice", "order": "A-1042" }. For templates with numbered variables ({{1}}, {{2}}), give a list of WhatsApp parameters in order.object
For a text header with variables:
{ "name": "value" }. For a media header: { "url": "https://..." } (and filename for a document). Without url, the media stored with the template is sent.array
Parameters of dynamic buttons, in the WhatsApp Cloud API format.
string
default:"utility"
utility, marketing or authentication.1002 with an explicit message when the template does not exist on the number, is not approved in that language, or misses a variable (body.missing lists them). See Send a template.
Interactive
string
required
button (reply buttons), list, cta_url, quick_reply, carousel, flow or payment.string
required
The text of the message, up to 1,024 characters.
object
required
The buttons, sections or link, in the WhatsApp Cloud API
action format.object
{ "type": "text" | "image" | "video" | "document" | "audio", "value": "text or URL", "filename": "for documents" }.Up to 60 characters.
Media
string
required
image, video, document or audio.string
required
A public URL Shortext can download the file from.
string
Up to 1,024 characters (not for audio).
string
The file name shown for a document.
string
The MIME type, for example
application/pdf.Messages in responses and webhooks
Messages returned by the API and sent inmessage.* webhooks wrap the same object:
directionisinbound(from the contact) oroutbound(from the AI agent, a member of your team or the API).message.idis the id on the channel (WhatsApp message id; on a Shortext endpoint, your own message id).statusisreceivedfor inbound messages, thensent,delivered,readorfailedfor outbound ones; changes are pushed by themessage.statuswebhook.