Endpoint ·
POST /conversation/actions- Text
- Media
- Quick reply
- Template
Template for a closed window. A text, media, or quick reply
send_message can also
include an optional template: if the 24h window is
closed at execution time, the template is sent instead of the primary (only
templates can be sent outside the window); if it’s open, the primary is sent.
Without a template, a primary with the window closed fails with WINDOW_CLOSED.Media transcription. When a media file (the primary in
file_uuid or a template
header in template.header) can’t be transcribed by vision — unsupported type or above
the size limit that applies to it — you must send its transcription. If it’s missing, that action fails
per-action during background execution:
TRANSCRIPTION_REQUIRED for the primary media, TEMPLATE_HEADER_TRANSCRIPTION_MISSING
for the template header (both 422; see Errors).Which types get transcribed automatically may expand in stages. The authoritative per-file
signal is
requires_transcription in the /files/confirm response, which saves you from tracking
those stages. The limits behind that signal are vision limits, distinct from the upload limits. .doc, .ppt and .pptx are never transcribed automatically, at any size.Three practical consequences:requires_transcriptionanswers as of the confirm. The gate that rules is the one at send time, so a file confirmed withfalsemay requiretranscriptionagain if availability changes between the confirm and the send. When in doubt, send it.- Sending
transcriptionalongside afile_uuidis never an error, even when the file did not need it: it wins over automatic transcription. Withoutfile_uuidthe whole body is rejected withINVALID_REQUEST(400), and so is atranscriptionthat is empty or whitespace-only. Text that only ends up empty once control characters are stripped does pass the schema, though: the body is accepted with202, and it is that action that fails withINVALID_REQUESTduring background execution. - The size limit depends on the file type: it is not a single number for everything.
file_uuid, the template
header’s in template.header.file_uuid; a quick reply’s media is configured in
the quick reply itself. Both the primary media (transcription) and the template
header (template.header.transcription) accept their transcription — required if
vision can’t transcribe that file (see the note above).
In a list, this object goes in the actions array of a POST /conversation/actions — see Assembling an action list.
Executable example
Asend_message on a conversation identified by phone and channel. Depending on
what you pass, it covers three purposes:
- Message or template — a text or media; if the 24h window is closed at execution time, the template is sent instead (only templates can be sent outside the window).
- Quick reply or template — the same, with a saved quick reply as the primary content.
- Only a template — just a template; the only way to write outside the 24h window. It supports parameters (
body_variables), a mediaheader, and buttons (button_parameters).
Request
Response
202 Accepted — the group was accepted and runs in the background. The
per-action result does not travel in the response (query it later — see How it runs).