Skip to content

Sending email

Send an email with POST /emails. Vaartix checks it, queues it and returns its ID straight away. The email is sent within seconds.

Request body
{
"from": "Acme <[email protected]>",
"to": ["[email protected]"],
"replyTo": "[email protected]",
"subject": "Your Acme order #1042",
"html": "<p>Thanks for your order, Priya.</p>",
"text": "Thanks for your order, Priya.",
"headers": { "X-Order-Id": "1042" },
"tags": [{ "name": "category", "value": "receipt" }],
"attachments": [
{ "filename": "invoice-1042.pdf", "content": "JVBERi0xLjQK..." }
]
}
Response
{ "id": "em_7hq2kv9xr4m1c8d3" }
Field Required Notes
from yes [email protected] or Acme <[email protected]>. Must be on a verified domain or a subdomain of it.
to yes One address or a list.
cc, bcc, replyTo no One address or a list.
subject yes Up to 998 characters.
html, text at least one Send both for the best inbox placement.
headers no Custom headers such as List-Unsubscribe or X-Order-Id. Standard headers (From, To, Subject, Message-ID and so on) are set by Vaartix.
tags no Up to 10 { name, value } pairs (letters, numbers, _ and -), returned with the email and its events.
attachments no Base64 content, a filename and an optional contentType. Up to 30 MB in total.
scheduledAt no ISO 8601 date-time to send later, up to 30 days ahead.
  • The from domain must be verified by your team. Otherwise you get 403 domain_not_verified.
  • At most 50 recipients per email across to, cc and bcc. For more, send separate emails or use batch sending.
  • Executable attachments are refused (.exe, .bat, .js, .vbs and similar), as Amazon SES does not deliver them.
  • Your team’s daily limit counts each recipient. See Limits.
  • Suppressed addresses are skipped at send time: addresses that hard-bounced or complained before. See Suppression.

Give an attachment a contentId and reference it from your HTML:

{
"html": "<img src=\"cid:logo\" alt=\"Acme\">",
"attachments": [
{ "filename": "logo.png", "content": "iVBORw0KGgo...", "contentId": "logo" }
]
}