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 larger than 20 MB — 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).
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.