Skip to main content
POST
Simulate an inbound 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.

Required string length: 1 - 20000
from
string

The sender email address. Required when customer, owner, and thread are not set.

to
string

The provisioned recipient address (id or full address). Defaults to the account’s agent address. Ignored when thread is set.

customer
string

Simulate mail from this customer. Uses the customer’s email as the From address.

owner
string

Simulate mail from this owner. Uses the owner’s email as the From address.

html
string

Optional HTML body.

Maximum string length: 100000
cc
string[]

Optional CC recipients.

thread
string

The thread to add this inbound message to. Sets In-Reply-To from the last message on the thread.

Response

200 - application/json

Returns the message object if the request 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.