Skip to content
Skip to main content
POST
/v3/domains/{domain_name}/messages/send

Send a transactional emailBeta

Sends a message from the specified domain. You can track deliverability (delivered, bounced, complaint, rejected) using Nylas' notifications.

💡 Emails landing in spam? Consider warming up your email domain to improve deliverability.
NYLAS API KEYACCESS TOKEN

Parameters

Path parameters

domain_name*string

The domain name Nylas will send the message from.

Example: "example.com"

Header parameters

Idempotency-Keystring

A unique, client-generated key (max 256 characters) that lets you safely retry this send request without sending duplicate emails. Nylas caches the response (success or error) for 1 hour, scoped per Nylas application (not per domain -- a key collides across all verified domains under the same application). A retry with the same key and payload returns the cached response with the Idempotent-Response: true header set. See Idempotent send requests for the full retry behavior and error responses.

Example: "f47ac10b-58cc-4372-a567-0e02b2c3d479"

Request body

Content-Type: application/json, multipart/form-data
attachmentsarray<object>

An array of files to be sent with the message.

bccarray<object>

A list of people to be BCC'd on the message.

bodystring

The HTML-formatted body of the message.

Example: "Looking forward to seeing you!"
ccarray<object>

A list of people to be CC'd on the message.

custom_headersarray<object>

An array of custom headers to add to the message.

from*object

Information about the person sending the message.

is_plaintextboolean

When true, Nylas sends the message body as plain text and the MIME data doesn't include an HTML version of the message. When false, Nylas sends the message body as HTML.

Default: false
Example: true
metadataobject

The metadata associated with the object. For more information, see Metadata.

reply_toarray<object>

A list of people who should receive replies to the message by default.

reply_to_message_idstring

The ID of the message you are replying to. If you are using a message that was sent using Nylas' Transactional Send, you may use the ID that was returned in the Nylas response. For all other messages, this is the RFC822 Message-ID header of the message you're replying to.

send_atinteger

The time when Nylas should send the message, in seconds using the Unix timestamp format. Must be at least one minute in the future from the time you make your request. You can schedule a message to be sent up to 30 days in the future.

subjectstring

The subject line of the message.

Example: "Reminder: Annual Philosophy Club meeting"
templateobject

The template to use for the message. Can be overriden by the body and subject fields.

to*array<object>

A list of recipients for the message.

tracking_optionsobject

Tracking settings for the message. See Track messages.

Responses

dataobject
request_idstring

The request ID.

Example: "9ca1d434-5ac7-4331-b8fb-3749c9a758d3"
POSThttps://api.us.nylas.com/v3/domains/example.com/messages/send

Find your API key in the Nylas Dashboard under API Keys in your application settings.

domain_namerequiredstring

The domain name Nylas will send the message from.

Loading editor...

Autocomplete and validation come from this endpoint's request schema.