openapi: 3.2.0
info:
title: Nylas Transactional send API
version: v3
summary: The complete Nylas v3 API — Email, Calendar, Contacts, Notetaker, Scheduling, Administration, and Migration.
description: The Nylas API is designed using the REST ideology to provide simple and predictable URIs to access and modify objects.
contact:
url: https://www.nylas.com/
x-provenance:
method: harvested
first_party: true
publisher: Nylas
source: https://developer.nylas.com/_spec-files/nylas-api.yaml
harvested: '2026-08-21'
sha256: 7ff001d571e163b1ffe22178741b59f813d8208ec878157a839a33dc2c13fd35
bytes: 1666223
note: 'Published by Nylas as the unified contract for the Nylas v3 API and stored verbatim; API Evangelist added only this provenance block. Submitted by the provider in api-evangelist/nylas#1 and verified against the live URL before harvest: OpenAPI 3.1.0, 118 paths, 208 operations, 174 component schemas, 100% of operations carrying summary, description, tag and a unique operationId, x-code-samples on 208 of 208. This document REPLACES a 22-operation scaffold API Evangelist derived from reading the documentation, now quarantined under openapi/_scaffold/.'
x-evidence:
- url: https://developer.nylas.com/_spec-files/nylas-api.yaml
what: the published unified contract, harvested verbatim 2026-08-21 (200, text/yaml, 1,666,223 bytes)
- url: https://developer.nylas.com/.well-known/api-catalog
what: RFC 9727 linkset advertising that URL as service-desc for api.us.nylas.com and api.eu.nylas.com (200, application/linkset+json)
servers:
- url: https://api.us.nylas.com
description: U.S.
- url: https://api.eu.nylas.com
description: E.U.
security:
- ACCESS_TOKEN: []
- NYLAS_API_KEY: []
tags:
- name: Transactional send
description: Nylas' Transactional Send endpoint lets you send messages directly from an email domain that you've verified with Nylas. You can use this to send password reset emails, account verifications, or system notifications.
paths:
/v3/domains/{domain_name}/messages/send:
parameters:
- name: domain_name
in: path
schema:
type: string
required: true
description: 'The verified sender domain Nylas will send the message from. This path parameter is separate from
`tracking_options.domain_name`, which selects the hostname for link click and message open
tracking.'
example: sender.example.com
- in: header
name: Idempotency-Key
schema:
type: string
maxLength: 256
required: false
description: '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](/docs/v3/email/idempotent-send/) for the full retry behavior and
error responses.'
example: f47ac10b-58cc-4372-a567-0e02b2c3d479
post:
summary: Send a transactional email
tags:
- Transactional send
operationId: send-transactional-email
x-beta: true
description: 'Sends a message from the specified domain. You can track deliverability (delivered, bounced, complaint, rejected) using Nylas'' notifications.
The route''s `domain_name` value is the verified sender domain. To use a different custom hostname
for link click or message open tracking, provide `tracking_options.domain_name` in the request
body. For example, you can send from `sender.example.com` and track through
`tracking.example.com`. Nylas validates scheduled custom tracking hostnames when you create the
schedule and revalidates them immediately before delivery. If an explicit hostname is no longer
eligible, the send fails without falling back to a Nylas hostname.
💡 Emails landing in spam? Consider warming up your email domain to improve deliverability.'
x-scopes: []
security:
- NYLAS_API_KEY: []
- ACCESS_TOKEN: []
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- from
- to
properties:
attachments:
type: array
description: An array of files to be sent with the message.
items:
type: object
properties:
content:
type: string
description: 'The Base64-encoded file content. See
[Working with email attachments](/docs/v3/email/attachments/#attachment-schemas-and-size-limits)
for more information.'
example: YXR0YWNoDQoNCi0tLS0tLS0tLS0gRm9yd2FyZGVkIG1lc3NhZ2UgL=
content_disposition:
type: string
description: '(Not supported for Microsoft and EWS) The content disposition of the file. Usually,
this is `inline` or `attachment`, followed by the file name.'
example: attachment; filename="nylas_logo.png"
content_id:
type: string
description: '(Inline attachments only) The alphanumeric `cid` from the `
` tag in the HTML
message body. To avoid unexpected behavior in threads, make sure to use unique CIDs
across messages of a thread.'
example: ce9b9547-9eeb-43b2-ac4e-58768bdf04e4
content_type:
type: string
description: 'The
[MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types)
of the file. This is used by the email client to determine how to display the
attachment.'
minLength: 1
example: image/png
filename:
type: string
description: The file name.
minLength: 1
example: nylas_logo.png
bcc:
type: array
description: A list of people to be BCC'd on the message.
items:
type: object
properties:
email:
type: string
description: The recipient's email address.
example: leyah@example.com
name:
type: string
description: The recipient's name.
example: Leyah Miller
body:
type: string
description: The HTML-formatted body of the message.
example: Looking forward to seeing you!
cc:
type: array
description: A list of people to be CC'd on the message.
items:
type: object
properties:
email:
type: string
description: The recipient's email address.
example: leyah@example.com
name:
type: string
description: The recipient's name.
example: Leyah Miller
custom_headers:
type: array
description: An array of custom headers to add to the message.
items:
type: object
properties:
name:
type: string
description: The header name.
example: Email-Campaign
value:
type: string
description: The header value.
example: meetings
from:
type: object
description: Information about the person sending the message.
properties:
email:
type: string
description: 'The sender''s email address. Must belong to an email domain that''s been verified
with Nylas.'
example: nyla@example.com
name:
type: string
description: The sender's name.
example: Nyla
is_plaintext:
type: boolean
description: '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
metadata:
$ref: '#/components/schemas/metadata'
reply_to:
type: array
description: A list of people who should receive replies to the message by default.
items:
type: object
properties:
name:
type: string
description: The name of the person who should receive replies to the message.
example: Leyah Miller
email:
type: string
description: The email address of the person who should receive replies to the message.
example: leyah@example.com
reply_to_message_id:
type: string
description: '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](https://datatracker.ietf.org/doc/html/rfc822#section-4.6.1)
`Message-ID` header of the message you''re replying to.'
send_at:
type: integer
description: '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. If the request includes
`tracking_options.domain_name`, Nylas validates the hostname when it creates the schedule
and revalidates it before delivery.'
subject:
type: string
description: The subject line of the message.
example: 'Reminder: Annual Philosophy Club meeting'
template:
type: object
description: The [template](/docs/reference/api/application-level-templates/) to use for the message. Can be overriden by the `body` and `subject` fields.
properties:
id:
type: string
description: The template ID.
example: b79c82b2-a51b-4c54-8469-28006a43551a
strict:
type: boolean
description: 'When `true`, Nylas returns an error if the template contains variables that aren''t
defined in the `variables` object.'
default: true
example: true
variables:
type: object
description: 'A set of key/value pairs representing variables to substitute for values in the
template.'
additionalProperties:
type: string
example:
user:
name: Leyah
surname: Miller
to:
type: array
description: A list of recipients for the message.
items:
type: object
properties:
email:
type: string
description: The recipient's email address.
example: leyah@example.com
name:
type: string
description: The recipient's name.
example: Leyah Miller
tracking_options:
type: object
description: Tracking settings for the message. See [Track messages](/docs/v3/email/message-tracking/).
properties:
opens:
type: boolean
description: 'When `true`, enables
[message open tracking](/docs/v3/email/message-tracking/#message-open-tracking) on the
message. Nylas generates a
[`message.opened` webhook notification](/docs/reference/notifications/#message-opened-notifications)
when a participant first opens the message.'
default: false
links:
type: boolean
description: 'When `true`, enables
[link clicked tracking](/docs/v3/email/message-tracking/#link-clicked-tracking) on the
message. Nylas generates a
[`message.link_clicked` webhook notification](/docs/reference/notifications/#link-clicked-notifications)
when a participant clicks a link in the message.'
default: false
label:
type: string
description: 'A brief description of the message, why it''s being tracked, or the tracking options
enabled.'
maxLength: 2048
domain_name:
$ref: '#/components/schemas/tracking_domain_name'
multipart/form-data:
schema:
type: object
properties:
attachment:
type: string
description: The content of the attachment (if available), in binary format.
format: binary
message:
type: object
properties:
bcc:
type: array
description: A list of people to be BCC'd on the message.
items:
type: object
properties:
email:
type: string
description: The recipient's email address.
example: leyah@example.com
name:
type: string
description: The recipient's name.
example: Leyah Miller
body:
type: string
description: The HTML-formatted body of the message.
example: Looking forward to seeing you!
cc:
type: array
description: A list of people to be CC'd on the message.
items:
type: object
properties:
email:
type: string
description: The recipient's email address.
example: leyah@example.com
name:
type: string
description: The recipient's name.
example: Leyah Miller
custom_headers:
type: array
description: An array of custom headers to add to the message.
items:
type: object
properties:
name:
type: string
description: The header name.
example: Email-Campaign
value:
type: string
description: The header value.
example: meetings
from:
type: object
description: Information about the person sending the message.
properties:
email:
type: string
description: 'The sender''s email address. Must belong to an email domain that''s been verified
with Nylas.'
example: nyla@example.com
name:
type: string
description: The sender's name.
example: Nyla
is_plaintext:
type: boolean
description: '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
metadata:
$ref: '#/components/schemas/metadata'
reply_to:
type: array
description: A list of people who should receive replies to the message by default.
items:
type: object
properties:
name:
type: string
description: The name of the person who should receive replies to the message.
example: Leyah Miller
email:
type: string
description: The email address of the person who should receive replies to the message.
example: leyah@example.com
reply_to_message_id:
type: string
description: '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](https://datatracker.ietf.org/doc/html/rfc822#section-4.6.1)
`Message-ID` header of the message you''re replying to.'
send_at:
type: integer
description: '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. If the request includes
`tracking_options.domain_name`, Nylas validates the hostname when it creates the schedule
and revalidates it before delivery.'
subject:
type: string
description: The subject line of the message.
example: 'Reminder: Annual Philosophy Club meeting'
template:
type: object
description: The [template](/docs/reference/api/application-level-templates/) to use for the message. Can be overriden by the `body` and `subject` fields.
properties:
id:
type: string
description: The template ID.
example: b79c82b2-a51b-4c54-8469-28006a43551a
strict:
type: boolean
description: 'When `true`, Nylas returns an error if the template contains variables that aren''t
defined in the `variables` object.'
default: true
example: true
variables:
type: object
description: 'A set of key/value pairs representing variables to substitute for values in the
template.'
additionalProperties:
type: string
example:
user:
name: Leyah
surname: Miller
to:
type: array
description: A list of recipients for the message.
items:
type: object
properties:
email:
type: string
description: The recipient's email address.
example: leyah@example.com
name:
type: string
description: The recipient's name.
example: Leyah Miller
tracking_options:
type: object
description: Tracking settings for the message. See [Track messages](/docs/v3/email/message-tracking/).
properties:
opens:
type: boolean
description: 'When `true`, enables
[message open tracking](/docs/v3/email/message-tracking/#message-open-tracking) on the
message. Nylas generates a
[`message.opened` webhook notification](/docs/reference/notifications/#message-opened-notifications)
when a participant first opens the message.'
default: false
links:
type: boolean
description: 'When `true`, enables
[link clicked tracking](/docs/v3/email/message-tracking/#link-clicked-tracking) on the
message. Nylas generates a
[`message.link_clicked` webhook notification](/docs/reference/notifications/#link-clicked-notifications)
when a participant clicks a link in the message.'
default: false
label:
type: string
description: 'A brief description of the message, why it''s being tracked, or the tracking options
enabled.'
maxLength: 2048
domain_name:
$ref: '#/components/schemas/tracking_domain_name'
x-code-samples:
- lang: bash
label: cURL
source: "curl --request POST \\\n --url 'https://api.us.nylas.com/v3/domains//messages/send' \\\n --header 'Accept: application/json' \\\n --header 'Authorization: Bearer ' \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"to\": [{\n \"name\": \"Jane Doe\",\n \"email\": \"jane.doe@example.com\"\n }],\n \"from\": {\n \"name\": \"ACME Support\",\n \"email\": \"support@acme.com\"\n },\n \"subject\": \"Welcome to ACME\",\n \"body\": \"Welcome to ACME! We'\\''re here to help you.\"\n}'"
- lang: python
label: Python SDK
source: "from nylas import Client\n\nnylas = Client(\n \"\",\n \"\",\n)\n\nmessage = nylas.transactional_send.send(\n domain_name=\"\",\n request_body={\n \"to\": [{\"name\": \"Jane Doe\", \"email\": \"jane.doe@example.com\"}],\n \"from_\": {\"name\": \"ACME Support\", \"email\": \"support@acme.com\"},\n \"subject\": \"Welcome to ACME\",\n \"body\": \"Welcome to ACME! We're here to help you.\",\n },\n)\n\nprint(message)\n"
responses:
'200':
description: Success. Returns message.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/transactional_send_message'
request_id:
type: string
description: The request ID.
example: 9ca1d434-5ac7-4331-b8fb-3749c9a758d3
'400':
$ref: '#/components/responses/400'
'409':
$ref: '#/components/responses/409_idempotent'
components:
schemas:
transactional_send_message:
type: object
properties:
id:
type: string
description: The message ID.
example: 6c45fe5e-0bb6-41b9-9acc-ccb15bfc51eb
attachments:
type: array
description: An array of Attachment objects. For google, linked Google Drive files are not included. For Microsoft, linked One Drive files are not included.
items:
$ref: '#/components/schemas/attachment_transactional_send'
uniqueItems: true
minItems: 0
example:
- content_disposition: attachment
content_type: text/calendar
filename: null
content_id: 4kj2jrcoj9ve5j9yxqz5cuv98
size: 1708
- content_disposition: attachment
content_type: application/ics
filename: invite.ics
content_id: 70jcsv367jaiavt4njeu4xswg
size: 1708
bcc:
type: array
description: 'An array of name/email address pairs that the message was BCC''d to. For received messages, this
is nearly always empty.'
items:
$ref: '#/components/schemas/message-participant'
body:
type: string
description: The body of the message. This field is the same as the `body` field in your request.
example: Hello, I just sent a message using Nylas!
cc:
type: array
description: An array of name/email address pairs that the message was CC'd to.
items:
$ref: '#/components/schemas/message-participant'
from:
type: array
description: A list of name/email address pairs that the message was sent from. For transactional send, this will always be one pair.
items:
$ref: '#/components/schemas/message-participant-response'
uniqueItems: true
object:
type: string
description: The object type of the response (in this case, `message`).
example: message
reply_to:
type: array
items:
$ref: '#/components/schemas/message-participant'
uniqueItems: true
description: An array of name/email address pairs that should receive replies to the message.
snippet:
type: string
minLength: 1
description: 'A short snippet (the first 100 characters, with HTML tags removed) of the message body. This is
useful for displaying a preview of the message.'
example: 'You have been invited to the following event. Welcome! WhenThu Oct 28, 2021 7am - 8am Eastern
Time - Toronto Joining info'
subject:
type: string
description: The subject of the message.
example: Nylas Send v3 Email
tracking_options:
type: object
description: Tracking options for the message.
properties:
opens:
type: boolean
description: When `true`, shows that message open tracking is enabled.
example: true
links:
type: boolean
description: When `true`, shows that link clicked tracking is enabled.
example: true
label:
type: string
description: A label describing the message tracking purpose.
maxLength: 2048
example: Tracking test
to:
type: array
description: An array of name/email address pairs that the message was sent to.
items:
$ref: '#/components/schemas/message-participant'
uniqueItems: true
metadata:
title: Metadata
type: object
description: 'The metadata associated with the object. For more information, see
[Metadata](/docs/reference/api/#metadata).'
additionalProperties:
type: string
description: A key-value pair.
maxLength: 500
maxProperties: 50
tracking_domain_name:
type: string
minLength: 1
maxLength: 253
example: tracking.example.com
description: 'The custom hostname to use for link click and message open tracking. The hostname must be
registered to the authenticated organization in the
[Nylas Dashboard](https://dashboard-v3.nylas.com/organization/domains?tab=hosted-auth) and have an
active certificate.
Custom tracking hostnames are available on select plans. Contact your Nylas account representative
or the [Nylas Sales team](https://www.nylas.com/contact-sales/) to enable this feature for your
organization.
Nylas trims surrounding whitespace, removes one trailing dot, and converts ASCII letters to
lowercase before looking up the hostname. Provide an ASCII fully qualified hostname without a URL
scheme, path, port, or wildcard.
You must enable `links`, `opens`, or both when you provide this field. A custom tracking hostname
does not support `thread_replies` by itself. If you omit this field, Nylas uses its regional
tracking hostname. Invalid, inactive, blocked, deleted, and unowned hostnames return the same
generic `400` response. If Nylas cannot complete the explicit ownership and certificate lookup, it
returns a `5xx` response without falling back to a Nylas hostname.'
message-participant:
title: Message participant
type: object
description: A name/email address pair.
properties:
name:
type: string
example: Jon Snow
email:
type: string
format: email
example: jon.snow@example.com
required:
- email
attachment_transactional_send:
description: A file attachment for a transactional email message.
type: object
properties:
content_type:
type: string
minLength: 1
description: 'The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types) of the attachment, used by the email client to determine how to display the attachment. If you don''t provide a type, Nylas infers it from the file name.
The value of this field is exactly the same as the email attachment''s `Content-Type` header.
The provider might set additional parameters, such as `name` and `charset`.
Nylas returns an empty `content_type` field if an attachment file name contains non-ASCII characters (for example, accented characters like `ü`). This is because Google can''t detect its content type.'
example: image/png; name="pic.png"
filename:
type: string
minLength: 1
description: The file name of the attachment.
example: pic.png
content_id:
type: string
description: '(Inline attachments only) The alphanumeric `cid` from the `
` tag in the message''s HTML. For
example, you might see something like `
` in
the message body.
Sometimes, the `content_id` value is contained in angle brackets (for example,
``).'
example: 1234567890
content_disposition:
type: string
description: (Not supported for Microsoft and EWS) The content disposition of the attachment. Usually, this is `inline` or `attachment` followed by the file name (for example, `inline; filename="some-image.jpeg"`).
example: inline
is_inline:
type: boolean
description: If `true`, indicates that the attachment is an inline file.
example: true
size:
type: integer
description: The size of the attachment, in bytes.
example: 13068
message-participant-response:
title: Message participant response
type: object
description: A name/email address pair.
properties:
name:
type: string
example: Jon Snow
email:
type: string
format: email
example: jon.snow@example.com
responses:
'400':
description: Bad Request
content:
application/json:
schema:
title: error
type: object
properties:
request_id:
type: string
description: The request ID.
error:
type: object
description: The response error object.
properties:
type:
type: string
description: The error type.
message:
type: string
description: The error message.
provider_error:
type: object
description: The error from the provider.
examples:
Bad Request:
value:
request_id: 5fa64c92-e840-4357-86b9-2aa364d35b88
error:
type: invalid_request_error
message: error parsing request body
provider_error:
code: TargetIdShouldNotBeMeOrWhitespace
message: Id is malformed.
Invalid Idempotency-Key:
value:
request_id: 5fa64c92-e840-4357-86b9-2aa364d35b88
error:
type: api.invalid_idempotency_key
message: Idempotency-Key must be 256 characters or fewer.
409_idempotent:
description: Conflict. Returned when an `Idempotency-Key` conflicts with an existing entry.
content:
application/json:
schema:
title: error
type: object
properties:
request_id:
type: string
description: The request ID.
error:
type: object
description: The response error object.
properties:
type:
type: string
description: The error type.
message:
type: string
description: The error message.
examples:
Different payload, same key:
value:
request_id: 5fa64c92-e840-4357-86b9-2aa364d35b88
error:
type: api.invalid_idempotent_request
message: The Idempotency-Key was reused with a different request payload. Use a different key, or match the original payload.
Concurrent request in flight:
value:
request_id: 5fa64c92-e840-4357-86b9-2aa364d35b88
error:
type: api.concurrent_idempotent_request
message: A request with the same Idempotency-Key is currently in progress. Wait a moment and retry with the same key.
securitySchemes:
ACCESS_TOKEN:
scheme: bearer
type: http
bearerFormat: NYLAS_ACCESS_TOKEN
description: 'The Nylas **access token** for a specific grant. Issued as part of OAuth 2.1 flow token
exchange.'
NYLAS_API_KEY:
scheme: bearer
type: http
bearerFormat: NYLAS_API_KEY
description: 'The Nylas **API key** provides application-level access to APIs and all grants. You can
generate these from the Dashboard. Learn more about [authorizing requests](/docs/v3/auth/).'
SCHEDULER_SESSION_TOKEN:
scheme: bearer
type: http
bearerFormat: Session ID
description: The Nylas Scheduler **session ID** that Scheduler UI Components use to authorize API requests.