https://api.us.nylas.com/v3/domains/{domain_name}/messages/sendSend a transactional emailBeta
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.
Path parameters
Header parameters
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.
content_typeThe MIME type of the file. This is used by the email client to determine how to display the attachment.
reply_to_message_idThe 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_atThe 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.
opensWhen true, enables
message open tracking on the
message. Nylas generates a
message.opened webhook notification
when a participant first opens the message.
linksWhen true, enables
link clicked tracking on the
message. Nylas generates a
message.link_clicked webhook notification
when a participant clicks a link in the message.
domain_nameThe custom hostname to use for link click and message open tracking. The hostname must be registered to the authenticated organization in the Nylas Dashboard and have an active certificate.
Custom tracking hostnames are available on select plans. Contact your Nylas account representative or the Nylas Sales team 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.