merce.STACK
merce.STACK
Skip to content
PricingWhat's new
Log inGet started
{}Developers
GuidesAPI referenceChangelogGet API keys →
  • Get started

    • Quickstart
    • Keys & authentication
  • Storefront

    • Products & catalog
    • Carts
    • Checkout & payment
    • Customer accounts
    • Digital products
    • Without a build step
    • Bookings
    • Courses
    • Drop-in components
  • Server API

    • Server API
    • Customers
    • Payment links & transactions
    • Balance & payouts
    • Classes & students
    • Node SDK
  • Email API

    • Email API
    • Sending email
    • Delivery events
  • Events & errors

    • Webhooks
    • Errors
  • Reference

    • API reference
    • Changelog

Email API

Email API

Transactional email from your own domain — receipts, sign-in codes, notifications — with one call.

The Email API sends the email your application triggers: a receipt after checkout, a sign-in code, a booking reminder. It sends from your domain, reports what happened to every message after it left, and tells your server through signed webhooks.

It lives in your Mercestack workspace, under Email API in the sidebar: API keys, the delivery log, webhooks and suppressions. It uses the same workspace, domains, plan and team roles as everything else. Requests go to emailapi.mercestack.com.

  1. 01

    Verify a domain

    In workspace Settings → Domains, publish the DNS records shown, then mark the domain for transactional email. It is the same domain the rest of your workspace sends from.

  2. 02

    Create a key

    In Email API → API keys. A *sending* key can only send and cancel — give that one to your application servers.

  3. 03

    Send

    One POST /v1/email. The message appears in Email API → Emails straight away.

Your first email

curl -X POST https://emailapi.mercestack.com/v1/email \
  -H "Authorization: Bearer msk_live_…" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "Acme <[email protected]>",
    "to": "[email protected]",
    "subject": "Your receipt",
    "html": "<p>Thanks for your order.</p>"
  }'

Keys

KeyCanUse it for
Sending (msk_live_…)Send, batch, cancel a scheduled sendApplication servers
Full access (msk_live_…)All of the above, plus read messages and manage templatesInternal tools, scripts

Either kind can be limited to some of your domains, so a key for one product's receipts cannot send as your company's main address. Email API keys are separate from the platform's sk_ keys; neither works on the other's API.

Server credentials

An Email API key can send mail as your domain. Keep it on your server — never in a browser, a mobile app or a public repository. The API sends no CORS headers, on purpose.

Status codes

CodeMeansRetry?
200 / 201Accepted — or scheduled—
400The request is malformed (an address, a header, a batch item)No — fix it
401Unknown or revoked keyNo
403The key cannot do this (sending-only, wrong domain), or the plan does not include itNo
422Your setup: the domain is not verified or not marked transactional, a template is missing, or a recipient is suppressedNo — fix the setup
429Rate limitedYes, with backoff
502The provider failedYes, with an Idempotency-Key
← PreviousNode SDKNext →Sending email

On this page

  • Your first email
  • Keys
  • Status codes
Create a workspaceTalk to usPricing

One workspace for everything your business runs on — your team, customers, store, marketing and payouts in one place.

Get started

Product

  • All products
  • Pricing
  • What's new
  • Security

Resources

  • Documentation
  • Guides
  • Use cases
  • Blog
  • Get support

Company

  • About
  • Careers
  • Contact us
  • Talk to the team

Legal

  • Privacy
  • Terms
  • Cookie policy
  • GDPR
  • Report a vulnerability

© 2026 Mercestack. All rights reserved.

Mercestack StructureOS

mercestack