Skip to main content
POST
Send message

Authorizations

Authorization
string
header
required

Project API key, in the format rt_live_... or rt_test_..., sent as Authorization: Bearer <key>.

Scopes

messages:write

Headers

Idempotency-Key
string

A unique key per logical message (a UUID v4, for example). Repeating the request with the same key and the same body returns the original response, with the Idempotent-Replay: true header. A key reused with a different body returns 409 idempotency_key_reuse. The record is kept for 24 hours.

Body

application/json
channel
string
required

ID of the channel to send through (chan_...).

Example:

"chan_01J8ZK9M3Q7XABCDEFGHJKMNPQ"

to
string
required

Recipient in E.164 format, for example +5581999999999. The leading + is optional. A value outside this format returns request_invalid; a number that cannot exist in its country returns invalid_recipient.

Pattern: ^\+?[1-9]\d{1,14}$
Example:

"+5581999999999"

text
string

Body of the text message, up to 4096 characters. It is ignored when the request also carries template.

Example:

"Hi! Your order is confirmed."

template
object

Approved template to send, instead of text.

metadata
object

Up to 20 text key-value pairs that you own, 1 KB in total. Returned when you retrieve the message and in its events.

Response

Accepted. Processing is asynchronous

id
string
required

Message ID.

Example:

"msg_01J8ZK9M3Q7XABCDEFGHJKMNPQ"

channel
string
required

ID of the channel used.

Example:

"chan_01J8ZK9M3Q7XABCDEFGHJKMNPQ"

direction
enum<string>
required

Message direction: outbound (left the channel's number, through the API or the WhatsApp Business app) or inbound (received).

Available options:
outbound,
inbound
origin
enum<string> | null
required

Where an outbound message came from: api (sent through Routa) or business_app (the business sent it from the WhatsApp Business app, on a number connected in coexistence mode). A business_app message is not billed and does not count as usage. It is null on an inbound message.

Available options:
api,
business_app
Example:

"api"

from
string
required

Sender address, in E.164.

Example:

"+5581988888888"

to
string
required

Recipient address, in E.164. On a business_app message, it can be a provider identifier when the recipient's number is unknown.

Example:

"+5581999999999"

content
object
required

Message content. The type field gives the format. It is null once retention removes the content; content_redacted_at then gives the time of the removal.

content_redacted_at
string<date-time> | null
required

When retention removed the message content. null while the message still has it.

Example:

null

status
enum<string>
required

Current state in the lifecycle. The status never goes back.

Available options:
accepted,
sent,
delivered,
read,
failed
failure_code
string | null
required

Reason for the failure, from a closed set of Routa codes, never a provider code. null until the message fails.

Example:

null

metadata
object
required

Up to 20 text key-value pairs that you own.

accepted_at
string<date-time>
required

When Routa accepted the message.

Example:

"2026-09-04T13:22:41.031Z"

sent_at
string<date-time> | null
required

When the provider accepted the message. null if it has not happened yet.

Example:

"2026-09-04T13:22:41.031Z"

delivered_at
string<date-time> | null
required

When delivery was confirmed. null if it has not happened yet.

Example:

"2026-09-04T13:22:41.031Z"

read_at
string<date-time> | null
required

When the recipient read it. null if it has not happened yet.

Example:

null

failed_at
string<date-time> | null
required

When the message failed. null if it did not fail.

Example:

null