Emails
| Endpoint | Does |
|---|---|
| POST /emails | Send one. html, text, or template + variables. Supports attachments, scheduled_at and dry_run |
| POST /emails/batch | Up to 100 per call, each independently accepted or rejected |
| GET /emails/:id | Status, full event trail and rendered body |
| GET /emails | Filter by status, recipient, domain and date |
| DELETE /emails/:id | Cancel a scheduled send before it leaves the queue |
Sending an email
The API never calls the sending provider synchronously. You get an id in milliseconds; delivery happens on a worker and is reported through webhooks or by polling the message.
POST /emails
{
"from": "you@yourdomain.com",
"to": "user@example.com",
"subject": "Welcome aboard",
"html": "<strong>It works.</strong>"
}
202 Accepted
{ "id": "26abdd24-36a9-475d-83bf-4d27a31c7def", "status": "queued" }Dry run
Set dry_run to true and the request is validated, rendered and checked against your suppression list, then returns exactly what would have been sent — without sending it. This is what lets an agent compose and self-correct without touching a mailbox.
{ "from": "…", "to": "…", "subject": "…", "html": "…", "dry_run": true }Domains, keys, webhooks
| Endpoint | Does |
|---|---|
| POST /domains | Generates a DKIM keypair and returns the exact records to paste |
| POST /domains/:id/verify | Live DNS lookup with per-record pass or fail and the reason |
| GET/POST/DELETE /keys | Scopes, rate limit, recipient allowlist, mode |
| GET/POST /keys/approvals | Read and clear sends held by an approval-mode key |
| GET/POST/DELETE /webhooks | Signed event delivery, plus POST /webhooks/:id/test |
| GET/POST/PATCH /templates | Versioned templates, plus POST /templates/:id/render |
| GET/POST/DELETE /suppressions | Read, add, remove. Removal is audited |
| GET /stats | Sends, deliveries, bounce rate, complaint rate over a window |