Skip to main content
POST
Send a message

Authorizations

Authorization
string
header
required

Use an API key as a bearer token: Authorization: Bearer sk_live_...

Each key has a set of scopes that gate which endpoints it can call: messages:read, messages:write, chats:read, lines:read, reactions:read, reactions:write, typing:read, typing:write, receipts:read, receipts:write, webhooks:read, webhooks:write, outbox:read, files:read, files:write. Keys can also be restricted to a subset of lines.

Body

application/json
from
string
required

Sender line handle (phone number or Apple ID)

Example:

"+15551234567"

to
string
required

Recipient phone number, Apple ID, or chat ID (cht_... for group chats)

Example:

"+15559876543"

text
string

Message text (at least one of text or attachments required)

Example:

"Hello from Messages.dev!"

attachments
string[]

Array of file IDs (max 1). Upload files via POST /v1/files first.

Maximum array length: 1
Example:
reply_to
string

Message ID (msg_...) or iMessage GUID to reply to

Example:

"msg_abc123"

Response

Outbox item created

id
string

Delivery ID (e.g. obx_abc123)

status
string
Allowed value: "pending"
request_id
string