Skip to main content
POST
Send an email

Authorizations

Authorization
string
header
required

API Key authentication. Use "Bearer YOUR_API_KEY".

Body

application/json
subject
string
required

The email subject.

Required string length: 1 - 998
body
string
required

The plain-text body. Rendered into a branded HTML template.

Required string length: 1 - 20000
from
string

The provisioned email address to send from (id or full address). Defaults to the account’s agent address when omitted.

to
string

The recipient email address. Required when customer and owner are not set.

customer
string

Send to this customer’s email address.

owner
string

Send to this owner’s email address.

cc
string[]

Optional CC recipients.

reply_to
string

Optional Reply-To address. Defaults to the From address.

thread
string

The thread to reply on. Sets In-Reply-To / References from the last inbound message.

attachments
object[]

Optional file attachments.

Response

200 - application/json

Returns the message object if the send succeeded.

id
string
required

Unique identifier for the object.

created
number
required

Time at which the object was created. Measured in seconds since the Unix epoch.

object
enum<string>
required
Available options:
message
body
string
required

Plain-text body, common to all channels.

channel
enum<string>
required

The communication channel for this thread. email today; additional channels may be added later.

Available options:
email
direction
enum<string>
required

Whether the message was sent by the account or received from a counterparty.

Available options:
inbound,
outbound
thread
string
required

The thread this message belongs to.

account
string

The account that the object belongs to. Only returned if the request is made with a valid Yorlet-Context header.

deleted
boolean
default:false

Only returned if the object has been deleted.

email
object

Email-specific fields. Present when channel is email.