Skip to main content
Endpoint · POST /conversation/actions
Sends a message. Each action sends one kind of content: text, media, a quick reply, or a template. A text, media, or quick reply can also carry a template for when the 24h window is closed (see below).
Plain text, up to 4096 characters.
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.
Valid combinations:
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_transcription answers as of the confirm. The gate that rules is the one at send time, so a file confirmed with false may require transcription again if availability changes between the confirm and the send. When in doubt, send it.
  • Sending transcription alongside a file_uuid is never an error, even when the file did not need it: it wins over automatic transcription. Without file_uuid the whole body is rejected with INVALID_REQUEST (400), and so is a transcription that 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 with 202, and it is that action that fails with INVALID_REQUEST during background execution.
  • The size limit depends on the file type: it is not a single number for everything.
Each side’s media is independent: the primary’s in 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

A send_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 media header, 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).
string
Always processing: confirms the group was accepted and is running.
integer
How many actions in the array were admitted for execution — not how many succeeded.