Skip to main content
POST
Send a message

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string<uuid>
required

The agent's id

Body

application/json
text
string
required
Required string length: 1 - 32000
replyTo
string<uuid>
Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
channel
enum<string>
Available options:
email,
sms
to
string[]
Required array length: 1 - 10 elements
Required string length: 1 - 320
subject
string
Maximum string length: 240

Response

The sent message

id
string<uuid>
required
Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
addressId
string<uuid>
required

The agent's address the message came to or went from

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
channel
enum<string>
required
Available options:
email,
sms
direction
enum<string>
required
Available options:
inbound,
outbound
counterpart
string
required

Who sent an inbound message, or the recipients of an outbound one

subject
string | null
required
text
string
required
attachments
object[]
required
status
enum<string>
required
Available options:
received,
refused,
sending,
sent,
failed
refusal
enum<string> | null
required

Why a refused message did not wake the agent

Available options:
self,
spam,
plan_limit,
rate_limit,
sender,
unverified
error
string | null
required

Why a failed message was not sent

createdAt
string<date-time>
required