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)$
forward
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,
telegram
to
string[]
Required array length: 1 - 10 elements
Required string length: 1 - 320
cc
string[]
Maximum array length: 50
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,
telegram
direction
enum<string>
required
Available options:
inbound,
outbound
counterpart
string
required

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

counterpartName
string | null
required

The name an inbound message's sender goes by, when the channel tells it

to
string[]
required

Whom the message names as its recipients; an inbound one names the agent unless it got a blind copy

cc
string[]
required

Whom the message names as getting a copy

subject
string | null
required
text
string
required
attachments
object[]
required
thread
object | null
required

For received and imported email, its Message-ID and References; for email the agent sent, those of the email it answered

status
enum<string>
required

reported when the recipient marked an email the agent sent as spam

Available options:
received,
refused,
sending,
sent,
failed,
imported,
reported
refusal
enum<string> | null
required

Why a refused message did not wake the agent

Available options:
self,
spam,
plan_limit,
rate_limit,
sender,
outsider,
unverified
admission
enum<string> | null
required

Who the sender of a received message is to the agent: team for a member or agent of the workspace, listed for a sender on the channel's list, and anyone for everyone else, including senders who could not be verified

Available options:
team,
listed,
anyone
error
string | null
required

Why a failed message was not sent or did not arrive

createdAt
string<date-time>
required