Send Email

Send transactional email from your own verified domains with the Zend API — the same API you already use for SMS and WhatsApp.

Zend sends over Amazon SES on your behalf. You send from addresses on domains you own and have verified, and Zend handles DKIM/SPF signing, real-time delivery tracking, and automatic bounce & complaint suppression so your sender reputation stays clean.

How it works

You send from your own verified domains, and delivery is SES-backed behind the Zend API. Getting to your first send takes three steps:

  1. Add and verify a sending domain in the dashboard (DKIM + SPF DNS records). See Sending domains.
  2. Create an API key with the email:send scope.
  3. Send with a single POST /email/send request.

Domains are managed from the dashboard (Email → Domains); sending is done with your API key.

Note

You can only send from an address on a domain that is verified and owned by your account. Set this up first on Sending domains.

Authentication

All API requests authenticate with your API key in the x-api-key header. The base URL is https://api.tryzend.com.

-H "x-api-key: YOUR_API_KEY"

Send an email

POST/email/send

Send an email by posting the message to /email/send. Provide the sender, recipient, subject, and an HTML body (with an optional plain-text fallback).

curl -X POST https://api.tryzend.com/email/send \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "hello@yourdomain.com",
    "to": "customer@example.com",
    "subject": "Hello World",
    "html": "<p>Congrats on sending your <strong>first email</strong>!</p>",
    "text": "Congrats on sending your first email!"
  }'
const res = await fetch("https://api.tryzend.com/email/send", {
  method: "POST",
  headers: {
    "x-api-key": "YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    from: "hello@yourdomain.com",
    to: "customer@example.com",
    subject: "Hello World",
    html: "<p>Congrats on sending your <strong>first email</strong>!</p>",
    text: "Congrats on sending your first email!",
  }),
});

const message = await res.json();

Request fields

fromstringrequired
Sender address on a verified domain you own.
tostringrequired
Recipient email address.
subjectstringrequired
Email subject line.
htmlstringrequired
HTML body of the email.
textstring
Plain-text fallback for clients that don't render HTML.
attachmentsAttachment[]
Files to attach — see Attachments below.

Attachments

Attach files with an attachments array. Each file's content is base64-encoded:

curl -X POST https://api.tryzend.com/email/send \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "hello@yourdomain.com",
    "to": "customer@example.com",
    "subject": "Your invoice",
    "html": "<p>Invoice attached.</p>",
    "attachments": [
      {
        "filename": "invoice.pdf",
        "content": "JVBERi0xLjQK...",
        "content_type": "application/pdf"
      }
    ]
  }'
filenamestringrequired
File name shown to the recipient, including its extension.
contentstringrequired
File contents, base64-encoded.
content_typestring
MIME type, e.g. application/pdf. Defaults to application/octet-stream when omitted.

Note

Up to 10 attachments per email, and 7 MB total across all files (measured on the decoded bytes).

Response

{
  "_id": "6884da240f0e633b7b979bff",
  "status": "pending",
  "cost": 0.02
}

The message is queued and sent asynchronously. Use the returned _id to track it — see Deliverability for delivery status, metrics, and suppressions.

Next steps