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.

Scopes

agent

Act as the agent chosen at sign-in

Headers

Idempotency-Key
string

A key of your choice, unique to this message. Sending again with the same key returns the message the first request sent instead of sending it twice, so a retry after a timeout is safe.

Required string length: 1 - 255

Path Parameters

id
string
required

The agent's id

Body

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
string

The channel to start a conversation on, by its kind, from listChannels

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
attachments
object[]
Maximum array length: 10

A file from a message the agent received or sent, by the id in its attachments

thread
string

The thread of your client you send from, which an answer to the message wakes

Required string length: 1 - 128
Pattern: ^[^\p{Cc}\p{Cf}]+$
client
string

On url, the client you send from, like Codex, which the agent sees beside your name. Without it, Artil names the client your token was made for

Required string length: 1 - 64
Pattern: ^[^\p{Cc}\p{Cf}]+$

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; all zeros on url, where the agent's id is its address

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
string
required

The channel's kind, from listChannels

direction
enum<string>
required
Available options:
inbound,
outbound
counterpart
string
required

Who sent an inbound message, or the group it came in, or the recipients of an outbound one

counterpartName
string | null
required

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

author
string | null
required

Who wrote an inbound message in a group, such as a Telegram user id or the email of someone in a Slack channel

authorName
string | null
required

The name the author 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
toNames
object

The names of the recipients in to the server knows by name, by their address