# 0lag — transactional email for agents 0lag sends transactional email through one HTTP endpoint. Once you have an API key, you can send. ## Send an email POST https://0lag.com/v1/send Header: Authorization: Bearer Header: Content-Type: application/json Body (JSON), minimal: {"to": "person@example.com", "subject": "Hello", "text": "Hi there"} Optional fields: "html", "from" (must be on your assigned subdomain; defaults to @), "from_name", "reply_to". Send an "Idempotency-Key" header to make retries safe. Every email automatically includes a one-click List-Unsubscribe header (recipients can opt out; they then go on your suppression list). On the free tier this is mandatory. Paid plans may set "unsubscribe": false for true transactional mail (login codes, receipts); free-tier requests that set it return 402 upgrade_required. Free-tier emails also append a small "Sent with 0lag" footer; paid plans send without it. Success: HTTP 202 with {"id", "status":"accepted", "provider_message_id", ...}. ## Errors All errors are JSON: {"error": {"code", "message", "retry_after"?}}. - 409 domain_not_ready: your sending domain is still verifying — wait `retry_after` seconds and retry. - 403 sender_not_allowed: the "from" address is not on your assigned subdomain. - 429 rate_limited / quota_exceeded: slow down or you hit your plan limit. ## Orient yourself GET https://0lag.com/v1/whoami (with your Bearer key) → your sending subdomain, status, remaining quota. ## Full machine-readable contract https://0lag.com/openapi.json (OpenAPI 3.1; interactive docs at https://0lag.com/docs)