Sends an audio file as a native iMessage audio message (waveform balloon with a play button on the receiver) instead of a generic file pill.
Two-step flow: upload an audio file via POST /v1/files, then pass
the returned file ID as audio_message. Common formats are accepted
— m4a, mp3, wav, caf, aiff. Audio is transcoded server-side, so you
don’t need to pre-encode.
iMessage only — SMS lines are rejected. Some lines don’t support
audio messages; sending from one of those returns
400 advanced_features_required.
Like POST /v1/messages, the contact-first restriction applies: the
recipient must have messaged your line first.
Like all writes, this is asynchronous: returns a delivery ID with
status: "pending". Track via GET /outbox or webhooks.
Documentation Index
Fetch the complete documentation index at: https://messages.dev/docs/llms.txt
Use this file to discover all available pages before exploring further.
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.
Sender line handle (phone number or Apple ID)
"+15551234567"
Recipient phone number, Apple ID, or chat ID (cht_...)
"+15559876543"
File ID (file_...) of the uploaded audio
"file_abc123"
Message ID (msg_...) or iMessage GUID to reply to
"msg_abc123"