Quickstart

Send your first email through the emitd API in under five minutes.

Send your first email with one curl — no SDK, no build step.

1. Get an API key

Create a key in the console under API keys. It is shown in full exactly once; store it as an environment variable:

export EMITD_API_KEY=esk_live_...

2. Verify a sending domain

Before a production send, add your domain in the console's Domains page and publish the DNS records it shows (SPF, DKIM, DMARC). Verification usually completes in under five minutes. Until then, sends from that domain fail with from_domain_not_verified — see Sending domains.

3. Send

curl https://api.emitd.com/v1/email \
  -H "Authorization: Bearer $EMITD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "hello@yourdomain.com",
    "to": ["user@example.com"],
    "subject": "Welcome!",
    "html_body": "<p>Hello from emitd!</p>"
  }'
HTTP/2 202
{
  "message_id": "msg_2h8Kd0Rk9Qa",
  "status": "queued"
}

202 means accepted and enqueued — delivery is asynchronous. Track the message in message activity or wait for your webhooks to fire.

Safe retries

Add an Idempotency-Key header to any send: a retried request with the same key replays the original result instead of sending twice. See Idempotency.

4. Test without sending

Flip test mode on and nothing touches SES — every event still fires:

curl https://api.emitd.com/v1/email \
  -H "Authorization: Bearer $EMITD_API_KEY" \
  -H "X-Relay-Test: true" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "hello@yourdomain.com",
    "to": ["delivered@relay.dev"],
    "subject": "Test email",
    "html_body": "<p>This is a test</p>"
  }'

Recipient local-parts at relay.dev drive the outcome (bounced@relay.dev, complained@relay.dev simulate the rest). Inspect results with GET /v1/email/test-events. Full details in Test mode.

Next steps

On this page