Quickstart

This quickstart takes you from a new account to a delivered email in about five minutes. You will create an API key, verify a sending domain, send a message with curl and look up its status.

1. Create an API key

Open the dashboard and create a key under API Keys. The full key is shown once, so copy it into your password manager or secret store right away. For the commands below, export it in your shell:

export API_EMAIL_KEY="ae_live_…"

Create separate keys for development, staging and production. Test keys behave like live keys but never deliver email and work before your domain is verified, which makes them safe for CI and for trying the API right away.

2. Add your sending domain

You send from your own domain, so mailbox providers can check that the email really comes from you. Add the domain:

curl https://api.email/v1/domains \
  -H "Authorization: Bearer $API_EMAIL_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "acme.com"}'

The response lists two CNAME records. Add both at your DNS provider; if you use Cloudflare, set them to DNS only. Verification usually completes within a few minutes. The domains page explains each record.

3. Send an email

curl https://api.email/v1/emails \
  -H "Authorization: Bearer $API_EMAIL_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "Acme <[email protected]>",
    "to": "[email protected]",
    "subject": "Hello from api.email",
    "text": "It works."
  }'

You get back {"id": "em_8f2c1a", "status": "queued"}. Check your inbox: the message usually arrives within seconds.

4. Check the status

curl https://api.email/v1/emails/em_8f2c1a \
  -H "Authorization: Bearer $API_EMAIL_KEY"

The response includes the current status and an events list, such as email.sent followed by email.delivered.

Next steps

Read Sending email for HTML, attachments and idempotency keys, set up webhooks to follow delivery in your app, or start receiving email on the same domain.

Get API key

Create your api.email account

What do you need?

Early access: accounts open in batches. By continuing you agree to the Terms and Privacy Policy.