Pular para o conteúdo principal
POST

Autorizações

api_access_token
string
header
obrigatório

Token de acesso do usuário (Perfil → Token de acesso). Dá acesso conforme o papel do usuário e age em nome dele.

Parâmetros de caminho

account_id
string
obrigatório

The numeric ID of the account

conversation_id
string
obrigatório

The numeric ID of the conversation

Corpo

application/json
content
string
obrigatório

The content of the message

Exemplo:

"Hello, how can I help you?"

message_type
enum<string>

The type of the message

Opções disponíveis:
outgoing,
incoming
Exemplo:

"outgoing"

private
boolean

Flag to identify if it is a private note

Exemplo:

false

content_type
enum<string>

Content type of the message

Opções disponíveis:
text,
input_email,
cards,
input_select,
form,
article
Exemplo:

"text"

content_attributes
object

Attributes based on the content type. For input_select, provide an items array with title, value, and optional description. WhatsApp list messages use description as the row subtitle when present.

Exemplo:
campaign_id
integer

The campaign id to which the message belongs

Exemplo:

1

template_params
object

WhatsApp template parameters for sending structured messages

direct_send
object

Sends the message through Meta's WhatsApp Direct Send (beta): a utility or authentication message without a pre-approved template, also outside the 24-hour window. Meta matches or generates the template and bills it at the category rate. Only WhatsApp Cloud inboxes with Direct Send turned on accept it; send utility content only, since marketing content can restrict the WABA. Attachments are not supported.

  • utility (default): plain text, or reply buttons, one link button or one voice call button (only one of them). Reply and link buttons take an optional text or media header and a footer; the voice call button takes a text header only and no footer.
  • authentication: plain text only, for verification codes. Meta has to open it to the WABA, and it can't go to contacts known only by their WhatsApp user ID (BSUID).

Send {} for a plain utility text message. Invalid options answer 422 with { error, code } (codes such as invalid_ttl, invalid_template_name, conflicting_buttons, header_needs_buttons, authentication_text_only).

interactive
object

Sends a WhatsApp interactive message. Three providers support it:

WhatsApp Cloud — button, list, cta_url, location_request, carousel and pix. It is a session message, so it only goes out while the 24-hour customer service window is open; outside the window the message is marked as failed, like free text.

WAHA — button (reply buttons), cta (url / call / copy buttons), list, carousel, pix, order (Review and Pay), poll, location, event and button_reply. There is no 24-hour window, but the WAHA server (Super Admin → WhatsApp servers → Interactive messages, or the WAHA_INTERACTIVE_MESSAGES=true env var) and the account feature waha_interactive_messages must be on. Direct chats only: in groups the message fails with interactive_group_unsupported (WAHA answers 422 to buttons there). carousel, pix, order and event need the GOWS engine.

UazAPI — button (reply buttons), cta (url / call / copy buttons), list, poll, carousel, pix (Pix button), payment_request ("Review and pay" with Pix, boleto, link and a document), event and location_request. There is no 24-hour window; the UazAPI server (Super Admin → WhatsApp servers → Interactive messages, or the UAZAPI_INTERACTIVE_MESSAGES=true env var) and the account feature uazapi_interactive_messages must be on. UazAPI accepts group JIDs (@g.us) on every one of these endpoints, so group conversations are allowed; whether WhatsApp renders each type in groups is not guaranteed. The status of a sent payment_request is updated with POST .../messages/{message_id}/payment_status.

The message content is the main text: the body (max 1024 characters, 4096 for lists), the poll question, the location title, the event name or the selected button text. It is optional only for WAHA pix (not sent) and order (sent as the buyer note), and for UazAPI pix (not sent), payment_request and carousel. The header, footer, button titles, link and list rows accept the same {{variables}} as the body, for example {{contact.first_name}}. Media goes by public URL (the provider downloads it), not as attachments. When type is omitted it is inferred from the first key found: link → cta_url, actions → cta, list, cards → carousel, pix, order, payment → payment_request, poll, location, event, button_reply, otherwise button.

Resposta

Success

id
number

The ID of the message

content
string

The text content of the message

account_id
number

The ID of the account

inbox_id
number

The ID of the inbox

conversation_id
number

The ID of the conversation

message_type
enum<integer>

The type of the message

Opções disponíveis:
0,
1,
2,
3
created_at
integer

The time at which message was created

updated_at

The time at which message was updated

private
boolean

The flags which shows whether the message is private or not

status
enum<string> | null

The status of the message

Opções disponíveis:
sent,
delivered,
read,
failed,
null
source_id
string | null

The source ID of the message

content_type
enum<string> | null

The type of the template message

Opções disponíveis:
text,
input_text,
input_textarea,
input_email,
input_select,
cards,
form,
article,
incoming_email,
input_csat,
integrations,
sticker,
voice_call,
null
content_attributes
object

The content attributes for each content_type

sender_type
enum<string> | null

The type of the sender

Opções disponíveis:
Contact,
User,
AgentBot,
Captain::Assistant,
null
sender_id
number | null

The ID of the sender

external_source_ids
object

The external source IDs of the message

additional_attributes
object

The additional attributes of the message

processed_message_content
string | null

The processed message content

sentiment
object | null

The sentiment of the message

conversation
object | null

The conversation object

attachment
object | null

The file object attached to the image

sender
object

User/Agent/AgentBot object

sender_category
enum<string>

Who wrote the message: contact (incoming), human (an agent, or a WhatsApp message sent from the phone), bot (an agent bot, Captain, a Flow Builder flow, or no sender), rule (an automation rule), campaign or system (an activity)

Opções disponíveis:
contact,
human,
bot,
rule,
campaign,
system
campaign
object

The campaign that sent the message, only on messages sent by a campaign