A send email API from request to delivery
Submit a transactional email over HTTPS, then follow its ID through provider acceptance, delivery or a bounce.
Submit an email over HTTPS
Send one JSON request from the server that handles your order or account event. Supply a sender on your verified domain, one recipient, a subject and a text or HTML body. This HTTP alternative to SMTP returns an email ID when the message is queued.
POST /api/emails
Idempotency-Key: receipt-order-1042
{"from":"[email protected]","to":"[email protected]",
"subject":"Order 1042 confirmed","text":"We received your order."}The examples show request paths and bodies. Send requests to your API deployment with a scoped bearer key and use application/json for JSON. Run the complete cURL example.
Verify your sending domain
Enroll a domain with a send-scoped key. The response includes three DNS records for DKIM, SPF and DMARC. Background checks verify ownership and provider readiness. A read-scoped key can check progress.
POST /api/domains
{"name":"mail.shop.example"}
GET /api/domains/{domain_id}Register a signed webhook
Receive a callback when an email is sent, delivered, bounced, complained about or fails. Register a public HTTPS receiver with a webhooks:manage key and save the signing secret returned once.
POST /api/webhooks
{"url":"https://orders.example.com/events/email"}Find a message in email logs
Filter by status, recipient or sending domain using a read-scoped key. Look up the email ID to see its event history in append order. A provider acceptance appears as sent. Delivery has its own confirmation.
GET /api/emails?status=bounced&limit=10
GET /api/emails/{email_id}Read the metrics behind the dashboard
The dashboard shows fourteen UTC days of sending volume and outcomes. The metrics API returns the same window and totals. Add a domain ID to investigate a single sender. Delivery, bounce and complaint rates use provider-accepted messages as their denominator.
GET /api/metrics
GET /api/metrics?domain_id={domain_id}Give each application a scoped key
An operator can grant a subset of their own permissions. Give a receipt worker send access and give a reporting job read access. Each key belongs to one account and environment.
POST /api/keys
{"name":"Receipt worker","scopes":["send"]}Handle rate limits and retries
Each recognized key can make 120 requests across protected routes in a 60-second window. If the API returns 429, wait the number of seconds in Retry-After. Retrying a send with its original key and unchanged content within 24 hours returns the same email ID.
HTTP/1.1 429 Too Many Requests
Retry-After: 12
{"error":{"type":"rate_limited","message":"API key rate limit exceeded."}}