sendezy
Docs

Send emails from your app

One API call sends an email. Copy the code, or run it right here on this page.

All requests go tohttps://envoi-orcin.vercel.app

Don't write code? Send from the dashboard instead.

Send your first email

Three steps.

1
Connect your domain

Open Domains, type your domain (for example mail.yourbusiness.com) and paste the one line it shows into your domain settings. We check it automatically.

2
Get your API key

Open API keys and click Create. Copy the key straight away: it's only shown once.

3
Run the code

Click ▶ Try it on the right, paste your key, put your domain in from and your own email in to, then click Run. Check your inbox!

Keep your API key secret, like a password. Use it only in server code, never in a web page or phone app.
Send an email
curl -X POST 'https://envoi-orcin.vercel.app/emails' \
  -H 'Authorization: Bearer sz_123456789' \
  -H 'Content-Type: application/json' \
  -d '{
  "from": "Your name <hello@yourdomain.com>",
  "to": [
    "you@example.com"
  ],
  "subject": "Hello from Sendezy",
  "html": "<p>It works!</p>"
}'
What you get back
Click ▶ Try it, then Run, to see the real response here.

What do you want to do?

Pick a task to jump straight to it.

New to APIs? Six words to know
API

A way for your website or app to talk to Sendezy, by sending it requests.

API key

A secret password for your app. It starts with sz_. Keep it on your server, never in a web page.

Domain

Your web address, like yourbusiness.com. Your emails are sent from it.

Request

One instruction to Sendezy, like “send this email”. The code examples are requests.

Response

Sendezy's reply to a request. It tells you whether it worked, and gives you an ID.

Webhook

The other direction: Sendezy messages your app when something happens, like a bounce.

Emails

Send transactional email such as receipts, sign-up confirmations and password resets, one at a time or in batches.

Send an email

POST/emails

Sends a single email. It's queued and delivered within seconds, or at scheduled_at if you set one.

Extra headers

Idempotency-Keytext

Makes retries safe: repeating a request with the same key within 24 hours returns the first response instead of sending again.

What to send

fromtextrequired

Sender address on a verified domain. Use "Name <address>" to show a name.

totext or list of textrequired

Recipient address, or up to 50 addresses (to + cc + bcc combined).

subjecttextrequired

Email subject line.

htmltext

HTML body. Provide html, text, or both.

texttext

Plain-text body. Generated from html if you leave it out.

cctext or list of text

Carbon-copy recipients.

bcctext or list of text

Blind carbon-copy recipients.

reply_totext or list of text

Where replies go.

headerskey–value pairs

Custom email headers, as key-value strings.

tags{ name, value }[]

Up to 50 tags. Returned in webhooks, so you can match events to your records.

attachments{ filename, content?, path?, content_type? }[]

Up to 20 files. content is base64; path is an https URL to fetch.

scheduled_attext

Send later: an ISO 8601 date or natural language like "in 2 hours". Up to 30 days ahead.

Request
curl -X POST 'https://envoi-orcin.vercel.app/emails' \
  -H 'Authorization: Bearer sz_123456789' \
  -H 'Content-Type: application/json' \
  -d '{
  "from": "Acme <hello@mail.acme.com>",
  "to": [
    "ada@example.com"
  ],
  "subject": "Welcome to Acme",
  "html": "<p>Thanks for signing up!</p>"
}'
What you get back
Click ▶ Try it, then Run, to see the real response here.

Send a batch

POST/emails/batch

Sends up to 100 different emails in one request. Every email is checked before any is sent, so either all are accepted or none are.

What to send

(body)list of emailsrequired

An array of 1–100 email objects with the same fields as Send an email, except attachments and scheduled_at.

Request
curl -X POST 'https://envoi-orcin.vercel.app/emails/batch' \
  -H 'Authorization: Bearer sz_123456789' \
  -H 'Content-Type: application/json' \
  -d '[
  {
    "from": "Acme <hello@mail.acme.com>",
    "to": [
      "ada@example.com"
    ],
    "subject": "Your receipt",
    "html": "<p>Order #1001</p>"
  },
  {
    "from": "Acme <hello@mail.acme.com>",
    "to": [
      "grace@example.com"
    ],
    "subject": "Your receipt",
    "html": "<p>Order #1002</p>"
  }
]'
What you get back
Click ▶ Try it, then Run, to see the real response here.

Retrieve an email

GET/emails/:id

Returns one email, including its latest status in last_event.

In the address

idtextrequired

The email ID returned when you sent it.

last_event is one of: queued, scheduled, sending, sent, delivered, delivery_delayed, opened, clicked, bounced, complained, failed, suppressed, canceled.
Request
curl -X GET 'https://envoi-orcin.vercel.app/emails/4ef9a417-02e9-4d39-ad75-9611e0fa0c40' \
  -H 'Authorization: Bearer sz_123456789'
What you get back
Click ▶ Try it, then Run, to see the real response here.

List emails

GET/emails

Returns your most recent emails, newest first.

Options

limitnumber

How many to return, 1–100. Default 20.

Request
curl -X GET 'https://envoi-orcin.vercel.app/emails?limit=20' \
  -H 'Authorization: Bearer sz_123456789'
What you get back
Click ▶ Try it, then Run, to see the real response here.

Reschedule an email

PATCH/emails/:id

Changes when a scheduled email goes out. Only works while the email is still scheduled.

In the address

idtextrequired

The email ID.

What to send

scheduled_attextrequired

New send time: ISO 8601 or "in 1 hour". A time in the past sends it now.

Request
curl -X PATCH 'https://envoi-orcin.vercel.app/emails/4ef9a417-02e9-4d39-ad75-9611e0fa0c40' \
  -H 'Authorization: Bearer sz_123456789' \
  -H 'Content-Type: application/json' \
  -d '{
  "scheduled_at": "2026-11-21T09:00:00Z"
}'
What you get back
Click ▶ Try it, then Run, to see the real response here.

Cancel a scheduled email

POST/emails/:id/cancel

Stops a scheduled email from being sent.

In the address

idtextrequired

The email ID.

Request
curl -X POST 'https://envoi-orcin.vercel.app/emails/4ef9a417-02e9-4d39-ad75-9611e0fa0c40/cancel' \
  -H 'Authorization: Bearer sz_123456789'
What you get back
Click ▶ Try it, then Run, to see the real response here.

Domains

You can only send from domains you've verified. Adding a domain gives you one record to copy into your domain's DNS settings (plus one recommended).

Add a domain

POST/domains

Adds a sending domain and returns its DNS records. We recommend a subdomain such as mail.yourcompany.com.

What to send

nametextrequired

The domain to send from.

Request
curl -X POST 'https://envoi-orcin.vercel.app/domains' \
  -H 'Authorization: Bearer sz_123456789' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "mail.acme.com"
}'
What you get back
Click ▶ Try it, then Run, to see the real response here.

Verify a domain

POST/domains/:id/verify

Checks the DNS records now. DNS changes can take a few minutes, sometimes a few hours, to appear.

In the address

idtextrequired

The domain ID.

Request
curl -X POST 'https://envoi-orcin.vercel.app/domains/d91cd9bd-1176-453e-8fc1-35364d380206/verify' \
  -H 'Authorization: Bearer sz_123456789'
What you get back
Click ▶ Try it, then Run, to see the real response here.

Retrieve a domain

GET/domains/:id

Returns one domain with its records and their status.

In the address

idtextrequired

The domain ID.

Request
curl -X GET 'https://envoi-orcin.vercel.app/domains/d91cd9bd-1176-453e-8fc1-35364d380206' \
  -H 'Authorization: Bearer sz_123456789'
What you get back
Click ▶ Try it, then Run, to see the real response here.

List domains

GET/domains

Returns all domains on your account.

Request
curl -X GET 'https://envoi-orcin.vercel.app/domains' \
  -H 'Authorization: Bearer sz_123456789'
What you get back
Click ▶ Try it, then Run, to see the real response here.

Update tracking

PATCH/domains/:id

Turns open and click tracking on or off for emails sent from this domain.

In the address

idtextrequired

The domain ID.

What to send

open_trackingtrue or false

Record when people open your emails.

click_trackingtrue or false

Record when people click links in your emails.

Request
curl -X PATCH 'https://envoi-orcin.vercel.app/domains/d91cd9bd-1176-453e-8fc1-35364d380206' \
  -H 'Authorization: Bearer sz_123456789' \
  -H 'Content-Type: application/json' \
  -d '{
  "open_tracking": true,
  "click_tracking": true
}'
What you get back
Click ▶ Try it, then Run, to see the real response here.

Delete a domain

DELETE/domains/:id

Removes the domain. You can no longer send from it.

In the address

idtextrequired

The domain ID.

Request
curl -X DELETE 'https://envoi-orcin.vercel.app/domains/d91cd9bd-1176-453e-8fc1-35364d380206' \
  -H 'Authorization: Bearer sz_123456789'
What you get back
Click ▶ Try it, then Run, to see the real response here.

Contact lists

Contact lists (called audiences in the API) hold the people you send campaigns to. Add contacts from your app's sign-up flow to keep a list in sync.

Create a list

POST/audiences

Creates an empty contact list.

What to send

nametextrequired

A name you'll recognise, such as "Newsletter".

Request
curl -X POST 'https://envoi-orcin.vercel.app/audiences' \
  -H 'Authorization: Bearer sz_123456789' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "Newsletter"
}'
What you get back
Click ▶ Try it, then Run, to see the real response here.

List all lists

GET/audiences

Returns all contact lists.

Request
curl -X GET 'https://envoi-orcin.vercel.app/audiences' \
  -H 'Authorization: Bearer sz_123456789'
What you get back
Click ▶ Try it, then Run, to see the real response here.

Delete a list

DELETE/audiences/:id

Deletes the list and every contact in it.

In the address

idtextrequired

The list ID.

Request
curl -X DELETE 'https://envoi-orcin.vercel.app/audiences/78261eea-8f8b-4381-83c6-79fa7120f1cf' \
  -H 'Authorization: Bearer sz_123456789'
What you get back
Click ▶ Try it, then Run, to see the real response here.

Add a contact

POST/audiences/:id/contacts

Adds a contact. If the email is already on the list, the contact is updated instead, so it's safe to call on every sign-up.

In the address

idtextrequired

The list ID.

What to send

emailtextrequired

The contact's email address.

first_nametext

Used by {{{FIRST_NAME}}} in campaigns.

last_nametext

Used by {{{LAST_NAME}}}.

unsubscribedtrue or false

Set true to stop campaigns going to this contact.

Request
curl -X POST 'https://envoi-orcin.vercel.app/audiences/78261eea-8f8b-4381-83c6-79fa7120f1cf/contacts' \
  -H 'Authorization: Bearer sz_123456789' \
  -H 'Content-Type: application/json' \
  -d '{
  "email": "ada@example.com",
  "first_name": "Ada",
  "last_name": "Lovelace"
}'
What you get back
Click ▶ Try it, then Run, to see the real response here.

List contacts

GET/audiences/:id/contacts

Returns every contact on the list.

In the address

idtextrequired

The list ID.

Request
curl -X GET 'https://envoi-orcin.vercel.app/audiences/78261eea-8f8b-4381-83c6-79fa7120f1cf/contacts' \
  -H 'Authorization: Bearer sz_123456789'
What you get back
Click ▶ Try it, then Run, to see the real response here.

Update a contact

PATCH/audiences/:id/contacts/:contact

Changes a contact's name or subscription. Find the contact by ID or by email address.

In the address

idtextrequired

The list ID.

contacttextrequired

The contact ID, or their email address.

What to send

first_nametext

New first name.

last_nametext

New last name.

unsubscribedtrue or false

true to unsubscribe, false to re-subscribe.

Request
curl -X PATCH 'https://envoi-orcin.vercel.app/audiences/78261eea-8f8b-4381-83c6-79fa7120f1cf/contacts/ada@example.com' \
  -H 'Authorization: Bearer sz_123456789' \
  -H 'Content-Type: application/json' \
  -d '{
  "unsubscribed": true
}'
What you get back
Click ▶ Try it, then Run, to see the real response here.

Remove a contact

DELETE/audiences/:id/contacts/:contact

Removes a contact from the list.

In the address

idtextrequired

The list ID.

contacttextrequired

The contact ID, or their email address.

Request
curl -X DELETE 'https://envoi-orcin.vercel.app/audiences/78261eea-8f8b-4381-83c6-79fa7120f1cf/contacts/ada@example.com' \
  -H 'Authorization: Bearer sz_123456789'
What you get back
Click ▶ Try it, then Run, to see the real response here.

Campaigns

Campaigns (called broadcasts in the API) send one email to everyone on a contact list. Each person gets a personalised copy with their own unsubscribe link.

Create a campaign

POST/broadcasts

Creates a draft campaign. Nothing is sent until you call Send a campaign.

What to send

audience_idtextrequired

The contact list to send to.

fromtextrequired

Sender address on a verified domain.

subjecttextrequired

Subject line. Personalisation variables work here too.

htmltext

HTML body. Provide html, text, or both.

texttext

Plain-text body.

nametext

Internal name, shown only in your dashboard.

reply_totext or list of text

Where replies go.

Request
curl -X POST 'https://envoi-orcin.vercel.app/broadcasts' \
  -H 'Authorization: Bearer sz_123456789' \
  -H 'Content-Type: application/json' \
  -d '{
  "audience_id": "78261eea-8f8b-4381-83c6-79fa7120f1cf",
  "from": "Acme <news@mail.acme.com>",
  "subject": "What'\''s new this month",
  "html": "<p>Hi {{{FIRST_NAME|there}}}, here'\''s what'\''s new.</p>"
}'
What you get back
Click ▶ Try it, then Run, to see the real response here.

Send a campaign

POST/broadcasts/:id/send

Sends a draft campaign now, or schedules it. Unsubscribed and suppressed addresses are skipped automatically.

In the address

idtextrequired

The campaign ID.

What to send

scheduled_attext

Optional. Send later: ISO 8601 or "in 2 hours".

Request
curl -X POST 'https://envoi-orcin.vercel.app/broadcasts/559ac32e-9ef5-46fb-82a1-b76b840c0f7b/send' \
  -H 'Authorization: Bearer sz_123456789' \
  -H 'Content-Type: application/json' \
  -d '{
  "scheduled_at": "in 2 hours"
}'
What you get back
Click ▶ Try it, then Run, to see the real response here.

Retrieve a campaign

GET/broadcasts/:id

Returns one campaign with its status and recipient count.

In the address

idtextrequired

The campaign ID.

Request
curl -X GET 'https://envoi-orcin.vercel.app/broadcasts/559ac32e-9ef5-46fb-82a1-b76b840c0f7b' \
  -H 'Authorization: Bearer sz_123456789'
What you get back
Click ▶ Try it, then Run, to see the real response here.

List campaigns

GET/broadcasts

Returns all campaigns on your account.

Request
curl -X GET 'https://envoi-orcin.vercel.app/broadcasts' \
  -H 'Authorization: Bearer sz_123456789'
What you get back
Click ▶ Try it, then Run, to see the real response here.

Delete a campaign

DELETE/broadcasts/:id

Deletes a draft or scheduled campaign. Sent campaigns are kept for your records.

In the address

idtextrequired

The campaign ID.

Request
curl -X DELETE 'https://envoi-orcin.vercel.app/broadcasts/559ac32e-9ef5-46fb-82a1-b76b840c0f7b' \
  -H 'Authorization: Bearer sz_123456789'
What you get back
Click ▶ Try it, then Run, to see the real response here.

Webhooks

Webhooks tell your server what happened to each email: delivered, opened, bounced and more. Each request is signed so you can check it came from us.

Create a webhook

POST/webhooks

Registers an HTTPS endpoint to receive events. The response includes the signing secret, shown only once.

What to send

endpointtextrequired

Your HTTPS URL.

eventslist of textrequired

Which events to receive. See Event types below.

Request
curl -X POST 'https://envoi-orcin.vercel.app/webhooks' \
  -H 'Authorization: Bearer sz_123456789' \
  -H 'Content-Type: application/json' \
  -d '{
  "endpoint": "https://acme.com/api/email-events",
  "events": [
    "email.delivered",
    "email.bounced",
    "email.complained"
  ]
}'
What you get back
Click ▶ Try it, then Run, to see the real response here.

List webhooks

GET/webhooks

Returns all webhooks on your account.

Request
curl -X GET 'https://envoi-orcin.vercel.app/webhooks' \
  -H 'Authorization: Bearer sz_123456789'
What you get back
Click ▶ Try it, then Run, to see the real response here.

Delete a webhook

DELETE/webhooks/:id

Stops sending events to this endpoint.

In the address

idtextrequired

The webhook ID.

Request
curl -X DELETE 'https://envoi-orcin.vercel.app/webhooks/4dd369bc-aa82-4ff3-97de-514ae3000ee0' \
  -H 'Authorization: Bearer sz_123456789'
What you get back
Click ▶ Try it, then Run, to see the real response here.

Help & advanced

Errors, limits and extra features. You don't need these to get started.

Errors

If something goes wrong, the response has a number (the status) and a short message saying what to fix. Here's what each one means:

StatusNameWhat it means
401missing_api_keyNo API key in the Authorization header.
401restricted_api_keyA sending-only key tried to call something other than sending.
403invalid_api_keyThe key doesn't exist or was deleted.
403validation_errorThe sender's domain isn't verified on your account.
403account_suspendedSending is paused because of high bounce or spam rates. Contact support.
404not_foundThe ID doesn't exist on your account.
422validation_errorA field is missing or invalid. The message says which.
429rate_limit_exceededMore than 10 requests per second with one key. Wait and retry.
429daily_quota_exceededYou've reached your daily sending limit.
429monthly_quota_exceededYou've reached your monthly sending limit.
500application_errorSomething went wrong on our side. Retry with an Idempotency-Key.
An error response422
{
  "statusCode": 422,
  "name": "validation_error",
  "message": "subject: Too small: expected string to have >=1 characters"
}

API key types

Every request sends your key in the Authorization header, as shown on the right. The examples on this page already do this.

Full access

Can do everything: send emails and manage domains, contact lists, campaigns and webhooks.

Sending access

Can only send emails, optionally from just one domain. Safer for servers that only send.

The header
Authorization: Bearer sz_123456789

Limits & safe retries

Each key can make up to 10 requests per second. If you go over, wait a moment and try again. To send lots of emails, use Send a batch (100 at a time) or a campaign.

If a request times out and you're not sure it worked, add an Idempotency-Key header. Sending the same key again within 24 hours returns the first result instead of sending a second email.

The header
Idempotency-Key: order-1001-receipt

Webhook events

When something happens to an email, Sendezy sends your webhook one of these events. Reply with any 2xx status to say you got it.

email.sent

We accepted the email and handed it to the receiving mail server.

email.delivered

The recipient's mail server accepted it.

email.delivery_delayed

Delivery is taking longer than usual; we keep retrying.

email.opened

The recipient opened it (needs open tracking).

email.clicked

The recipient clicked a link (needs click tracking).

email.bounced

The address doesn't exist or permanently rejected the email. It's added to your suppression list.

email.complained

The recipient marked it as spam. They're added to your suppression list.

email.failed

We couldn't send it, for example because the domain is no longer verified.

email.scheduled

The email was scheduled for later.

email.suppressed

Not sent, because every recipient is on your suppression list.

contact.unsubscribed

A contact clicked unsubscribe in a campaign.

What your webhook receives
{
  "type": "email.delivered",
  "created_at": "2026-11-20T10:12:55.000Z",
  "data": {
    "email_id": "4ef9a417-02e9-4d39-ad75-9611e0fa0c40",
    "from": "Acme <hello@mail.acme.com>",
    "to": [
      "ada@example.com"
    ],
    "subject": "Welcome to Acme",
    "created_at": "2026-11-20T10:12:53.000Z",
    "tags": {
      "category": "welcome"
    }
  }
}

Verifying webhooks

Each webhook request is signed, so you can check it really came from Sendezy. Use your webhook's secret (it starts with whsec_) with the free standardwebhooks library, as shown on the right.

The signature headers are webhook-id, webhook-timestamp and webhook-signature (also sent with svix- names).

Node.js · npm i standardwebhooks
import { Webhook } from "standardwebhooks";

const wh = new Webhook(process.env.SENDEZY_WEBHOOK_SECRET); // whsec_…

export async function POST(req) {
  const body = await req.text();
  const event = wh.verify(body, Object.fromEntries(req.headers)); // throws if forged

  if (event.type === "email.bounced") {
    // e.g. mark the address as invalid in your database
  }
  return new Response("ok");
}

Personalisation

In campaigns, these are replaced for each person. Text after | is used when you don't have that detail.

{{{FIRST_NAME|there}}}

Their first name, or “there”.

{{{LAST_NAME}}}

Their last name.

{{{EMAIL}}}

Their email address.

{{{SENDEZY_UNSUBSCRIBE_URL}}}

Their unsubscribe link. If you leave it out, we add one for you.

Example
<p>Hi {{{FIRST_NAME|there}}},</p>
<p>Here's what's new this month.</p>
<a href="{{{SENDEZY_UNSUBSCRIBE_URL}}}">Unsubscribe</a>

Scheduling

To send later, add scheduled_at with a date and time, or plain words like in 2 hours. You can schedule up to 30 days ahead, and change or cancel it until it's sent.

Examples
"scheduled_at": "2026-11-21T09:00:00Z"
"scheduled_at": "in 2 hours"

Switching from Resend

Sendezy works with the official resend library, so your code stays the same:

  1. Verify your domain in Sendezy.
  2. Set RESEND_BASE_URL to https://envoi-orcin.vercel.app.
  3. Use your Sendezy sz_ key.
Node.js · npm i resend
// .env
RESEND_BASE_URL=https://envoi-orcin.vercel.app
SENDEZY_API_KEY=sz_123456789

// your code stays the same
import { Resend } from "resend";

const resend = new Resend(process.env.SENDEZY_API_KEY);
const { data, error } = await resend.emails.send({
  from: "Acme <hello@mail.acme.com>",
  to: ["ada@example.com"],
  subject: "Welcome to Acme",
  html: "<p>Thanks for signing up!</p>",
});

Create an API key

POST/api-keys

Creates a key. The token is shown only in this response, so store it somewhere safe.

What to send

nametextrequired

A label, such as "Production server".

permission"full_access" or "sending_access"

Default full_access. sending_access can only send emails.

domain_idtext

Optional, for sending_access keys: only allow sending from this domain.

Request
curl -X POST 'https://envoi-orcin.vercel.app/api-keys' \
  -H 'Authorization: Bearer sz_123456789' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "Production server",
  "permission": "sending_access"
}'
What you get back
Click ▶ Try it, then Run, to see the real response here.

List API keys

GET/api-keys

Returns your keys. Tokens are never shown again after creation.

Request
curl -X GET 'https://envoi-orcin.vercel.app/api-keys' \
  -H 'Authorization: Bearer sz_123456789'
What you get back
Click ▶ Try it, then Run, to see the real response here.

Delete an API key

DELETE/api-keys/:id

Revokes the key immediately.

In the address

idtextrequired

The key ID.

Request
curl -X DELETE 'https://envoi-orcin.vercel.app/api-keys/dacf4072-4119-4d88-932f-6202748ac7c8' \
  -H 'Authorization: Bearer sz_123456789'
What you get back
Click ▶ Try it, then Run, to see the real response here.