v3

latestOpenAPI 3.1.02026-08-087684214.2 KB
messages

Send Message

Send an outbound message (SMS or iMessage) via the provider assigned to the number.

post/v1/messages

Request body

agent_idstring nullable
to_numberstring nullable

Recipient of an existing chat: a phone (any format, normalized to E.164), US short code, email, or a group id (grp_...). Provide this OR recipients (to start a new group), not both.

recipientsstring[] nullable

Start a NEW iMessage group by listing 2 or more recipients (phones or emails). The first message is delivered to all of them, an iMessage group is created, and the response to_number returns the new group id (grp_...) to use for follow-up sends. iMessage numbers only.

bodystring required
media_urlstring nullable
media_urlsstring[] nullable
number_idstring nullable
from_numberstring nullable
send_style'celebration' | 'fireworks' | 'lasers' | 'love' | 'confetti' | 'balloons' | 'spotlight' | 'echo' | 'invisible' | 'gentle' | 'loud' | 'slam' nullable

Optional iMessage expressive effect. Only valid on iMessage-capable numbers. Supported values: celebration, fireworks, lasers, love, confetti, balloons, spotlight, echo, invisible, gentle, loud, slam.

reply_to_message_idstring nullable

Optional parent message ID (AgentPhone Message.id) to send this message as an inline reply in iMessage.

Example request

{
  "recipients": [
    "+14155551234",
    "+16505551234"
  ],
  "send_style": "confetti",
  "reply_to_message_id": "cmat9x3i20000a2m6y3d9r1u2"
}

Response

Successful Response

idstring required
statusstring required
channelstring required
from_numberstring required
to_numberstring required
conversation_idstring nullable
media_urlsstring[]
reply_to_message_idstring nullable
reply_parent_unresolvedboolean nullable