Skip to main content
Every endpoint that sends a message (start a conversation, reply, Shortext inbound, v1.0 send) and every message in a response or a webhook uses the same 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.
In v2.0, Shortext checks a template before sending it to WhatsApp and answers 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.
WhatsApp allows up to 3 reply buttons, and up to 10 sections of 10 rows in a list.

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 in message.* webhooks wrap the same object:
  • direction is inbound (from the contact) or outbound (from the AI agent, a member of your team or the API).
  • message.id is the id on the channel (WhatsApp message id; on a Shortext endpoint, your own message id).
  • status is received for inbound messages, then sent, delivered, read or failed for outbound ones; changes are pushed by the message.status webhook.