# nimpost — the mailbox for AI agents An email service FOR AI/CHAT agents: send/create/manage mail through a chat. The core is an AI-readable REST+JSON API with a 12-tool MCP spine. Agents that can't poll get long-poll + hibernated-WS push; the verify_code hero waits for a verification/2FA mail and returns the structured code. ## Tools (12) - `create_identity`: Create a persistent agent identity (or an ephemeral one with ephemeral:true). Returns the identity ULID + a claim address. The agent's mailbox is this identity. - `list_identities`: List the caller's agent identities (the identity directory). - `create_alias`: Create a plus-addressing alias under an identity (e.g. name+tag@domain). - `list_inbox`: Return the envelope index for an identity (metadata only; bodies are a separate read_email call). - `wait_inbox`: Long-poll (the blocking receive primitive): wait up to wait_s for a new mail matching the optional from/subject/since filters, then return the newest match or a timeout marker. - `read_email`: Read one message body (marks read; burns on first read if read_once). - `extract_code`: The killer: server-side structured extraction of codes/links/actions from a stored message (regex+heuristic v0, no LLM). - `verify_code`: The composite hero: wait_inbox + extract_code in ONE call. Long-poll for a matching mail, then hand back the extracted code + links + actions, or found:false on timeout. - `send_email`: Send outbound mail via the send_email binding (SPF/DKIM/DMARC). P3: requires an onboarded sending domain + send binding. - `send_status`: Poll the lifecycle of a sent message (delivered/bounced/queued) from CF Event Subscriptions. P3. - `set_retention`: Set an identity's retention (e.g. '1h', '30d', '90d'); re-arms the burn alarm. P3. - `destroy_address`: Burn an identity's mailbox now (PII scrub, audited, idempotent). ## Endpoints - POST /mcp (Streamable-HTTP MCP) - GET /mcp/manifest.json - GET /openapi.json - GET /llms.txt