Send email
Sends one email to up to fifty addresses, from an address on a verified domain of the workspace. It takes cc, bcc, a reply address, headers, tags, attachments, a published template with its variables and a time to send at. With an idempotency key (the field, or the Idempotency-Key header) a repeat within a day answers with the first email. Sent with a test key, or to test addresses only, the email belongs to the sandbox: its mode is test, it reaches nobody and what happens to it is simulated.
/v1/emailsBody parameters
fromstringThe sender, on a verified domain. An address, or a name and an address as
Acme <hello@mail.example.com>. Needed unless a template gives one. Up to 500 characters.tostring | string[]RequiredWho the email is for: one address, or up to 50. A test address, such as
delivered@opensend.testorbounced@opensend.test, reaches nobody and ends the way its name says.ccstring | string[]Who gets a copy: one address, or up to 50.
bccstring | string[]Who gets a copy without the others seeing: one address, or up to 50.
replyTostringThe address replies go to, when it is not the sender. Without it, the one of the template when it has one, then the default of the workspace.
subjectstringThe subject line. Needed unless a template gives one. Up to 500 characters.
htmlstringThe message as HTML. Up to 200,000 characters.
textstringThe message as plain text. Send it with
html, or alone. With a template it replaces the plain text of the template. Up to 200,000 characters.headersRecord<string, string>Extra headers for the message, by name. Up to 20, and not the ones the platform writes itself.
tagsRecord<string, string>Labels of your own for the email, by name, such as
{ "campaign": "welcome" }. Up to 10. They come back on the email and in webhooks.templateobjectA published template to build the email from, in place of
subject,htmlandtext. Its sender and reply address are used when you give none.template.idstringRequiredThe id or the alias of a published template. Up to 500 characters.
template.variablesRecord<string, string | number>A value for each
{{NAME}}in the template, by name. A variable with a default in the template can be left out.attachmentsobject[]Files to attach. Up to 10, and 10 MB together.
attachments[].filenamestringRequiredThe name of the file as the recipient sees it. Up to 255 characters.
attachments[].contentstringThe file, encoded as Base64. Give this or
path, not both. Up to 14,000,000 characters.attachments[].pathstringAn
https://address to fetch the file from. Give this orcontent, not both. Up to 2,000 characters.attachments[].contentTypestringThe media type of the file, such as
application/pdf. Without it the type is taken from the name. Up to 120 characters.scheduledAtstringWhen to send it, as an ISO 8601 time with an offset, such as
2026-12-01T09:00:00Z. Up to 30 days ahead. Without it the email is sent now.idempotencyKeystringA key of your own that makes a repeat of this request answer with the first result and send nothing. The
Idempotency-Keyheader does the same.
Returns
object"email"Always
email.idstringThe id of the email.
fromstringThe sender.
tostring[]Who the email is for.
subjectstringThe subject line.
statusstringWhere the email is:
scheduled,queued,sent,delivered,delayed,bounced,complained,failedorcanceled, andopenedorclickedonce the recipient acts.One of
queuedsentdelivereddelayedbouncedopenedclickedcomplainedfailedscheduledcanceledmodestringlivefor a real email.testfor an email of the sandbox: it was sent with a test key or to test addresses, nothing left the service and what happened to it is simulated.One of
livetestdomainstringThe domain it was sent from.
ccstring[]Who got a copy.
bccstring[]Who got a copy without the others seeing.
replyTostring | nullThe address replies go to, or
null.scheduledAtstring | nullWhen it is due to be sent, or
nullfor an email sent at once.createdAtstringWhen the API accepted the email.
htmlstring | nullThe message as HTML, or
null.textstring | nullThe message as plain text, or
null.headersRecord<string, string>The extra headers you sent, by name.
tagsRecord<string, string>The tags you sent, by name.
attachmentsobject[]The files that were attached. Their content is not kept.
attachments[].filenamestringThe name of the file.
attachments[].contentTypestring | nullThe media type of the file, or
nullwhen none was given.attachments[].sizeinteger | nullThe size of the file in bytes, or
nullwhen it was given by address.templateIdstring | nullThe id of the template it was built from, or
null.automationobject | nullThe automation run that sent it, or
nullfor an email you sent yourself.automation.idstringThe id of the automation.
automation.runIdstringThe id of the run.
automation.stepIdstringThe id of the step that sent it.
eventsobject[]What has happened to the email, oldest first.
events[].typestringWhat happened: the status the email moved to.
One of
queuedsentdelivereddelayedbouncedopenedclickedcomplainedfailedscheduledcanceledevents[].atstringWhen it happened.
events[].detailstringMore about it, such as the reason for a bounce. Often empty.