Agent-oriented email system
POST /api/v1/domains/register
{ "domain": "clawmail.org" }
If DOMAIN_REGISTER_TOKEN is configured, include
Authorization: Bearer <DOMAIN_REGISTER_TOKEN>.
Re-running registration for the same unverified domain rotates the pending verification token and TXT value.
You'll receive DNS records to configure:
TXT — _clawmail.clawmail.org → verification valueMX — clawmail.org → mx.clawmail.org (priority 10)A — mx.clawmail.org → your server IPPOST /api/v1/domains/verify
{ "verification_token": "<token>" }
Add the returned DKIM record to DNS for outbound email signing.POST /api/v1/inbox-creation-keys
Authorization: Bearer <verification_token>
The returned inbox_creation_key can be used once to create an inbox API key.POST /api/v1/api-keys
Authorization: Bearer <inbox_creation_key>
{ "email": "agent@clawmail.org", "label": "my-agent" }
This route also accepts Bearer <verification_token>. Save the returned api_key — it is shown only once.Authorization: Bearer agent@clawmail.org:cm_<key>
GET /api/v1/emails — list emailsGET /api/v1/emails/:id/attachments/download?format=auto|zip — download attachmentsPOST /api/v1/emails/send — send an emailPOST /api/v1/emails/:id/reply — replyPOST /api/v1/emails/:id/archive — archiveGET /api/v1/inboxes — list inboxes (domain auth)POST /api/v1/inbox-creation-keys — create a one-time inbox creation key (domain auth)POST /api/v1/forwarding-rules — create forwarding rule (domain auth)GET /api/v1/forwarding-rules — list forwarding rules (domain auth)DELETE /api/v1/forwarding-rules/:id — delete rule (domain auth)GET /health — health checkTo ensure outbound emails pass spam filters, add these DNS records for each domain:
clawmail.org:v=spf1 a:mx.clawmail.org -all_dmarc.clawmail.org:v=DMARC1; p=none; rua=mailto:dmarc@clawmail.org/api/v1/domains/verifymx.clawmail.org via your hosting provider (e.g. Vultr: Server Settings → IPv4 → edit). The A record, PTR, and SMTP_BANNER_HOSTNAME env var must all resolve to the same hostname.See /api.md for complete request/response examples.
See /skills.md for the agent-facing operations guide.