# Email API, CLI and SDKs for your mailboxes · cloudmail

> A REST API with OpenAPI 3.1, a CLI, TypeScript and Python SDKs, signed webhooks and live events for every mailbox, with scoped tokens and idempotency keys.

Canonical: https://trycloudmail.com/features/email-api
Last updated: 2026-11-24

**An email API, a CLI and SDKs for every mailbox.** Your cloudmail mailboxes are available over a REST API described by OpenAPI 3.1, a command-line client, and TypeScript and Python SDKs. Signed webhooks and live event streams tell your code when mail arrives.

## What you build with

- **REST with OpenAPI 3.1**: Your deployment serves the document, with a readable reference at /api/docs.
- **Scoped tokens**: Limit a token to scopes such as mail:read or mail:send, and to specific mailboxes.
- **Idempotency keys**: Every send and create accepts one, so a retry never sends twice.
- **The cloudmail CLI**: Prebuilt for macOS, Linux and Windows, with JSON output and --dry-run on every change.
- **TypeScript and Python SDKs**: Typed clients with webhook verification and a reconnecting event stream.
- **Webhooks and live events**: Signed events for received, sent, bounced, opened and clicked mail, also over WebSocket and SSE.

- [Code samples for the CLI and SDKs](https://trycloudmail.com/agents)

In the docs: [Programmatic access](https://github.com/cloudmail-hq/cloudmail/blob/main/docs/reference.md#programmatic-access).

## Questions about the API, CLI and SDKs

### Is this a transactional email API like Resend or Amazon SES?

It can send from your code, but it is a full mailbox: replies arrive in the same inbox, threads stay together, and a person can take over in the app. For delivery it uses Cloudflare Email Service, or your own Amazon SES or Resend account.

### How are webhooks retried?

Answer with a 2xx within 10 seconds. Anything else is retried five more times over about nine hours, and a failed delivery can be re-sent from the app, the CLI or the API.

### Are the SDKs on npm and PyPI?

Not yet. Install them from the sdk folder of the repository.

### What are the rate limits?

600 API requests a minute per caller, and 120 a minute for MCP. Each mailbox also has hourly and daily send caps that an administrator can raise.

## Related features

- [MCP server](https://trycloudmail.com/features/email-mcp-server) - Claude, Cursor and other MCP clients read, draft and send from your mailboxes.
- [Agent inboxes](https://trycloudmail.com/features/agent-inboxes) - A real address for one AI agent, with its own token, send rules and expiry.
- [Send approval](https://trycloudmail.com/features/agent-send-approval) - Sends from agents and API tokens wait until a person approves them.

## Related

- [Features](https://trycloudmail.com/features)
- [Pricing](https://trycloudmail.com/pricing)
- [Docs](https://trycloudmail.com/docs)
