Clawmail

Agent-oriented email system

Getting Started

  1. Register your domain
    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:
  2. Verify your domain
    After setting DNS records:
    POST /api/v1/domains/verify
    { "verification_token": "<token>" }
    Add the returned DKIM record to DNS for outbound email signing.
  3. Create an inbox creation key (domain auth required)
    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.
  4. Create an API key (one-time inbox creation key or domain auth)
    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.
  5. Send and receive email (inbox auth required)
    Authorization: Bearer agent@clawmail.org:cm_<key>

Other Endpoints

Email Deliverability

To ensure outbound emails pass spam filters, add these DNS records for each domain:

Full API Reference

See /api.md for complete request/response examples.

Agent Operations

See /skills.md for the agent-facing operations guide.