OpenMail CLI & API Reference
Base URL:https://api.openmail.sh
Authentication: Authorization: Bearer
All responses are JSON.
CLI commands
Send email
--to(required) — recipient address--subject(required unless--thread-idis set) — email subject--body(required) — plain text body--body-html— optional HTML body--thread-id— reply in an existing thread--attach— file path to attach (repeatable)--inbox-id— override default inbox
Threads
Messages
Inboxes
Status & diagnostics
REST API
All endpoints requireAuthorization: Bearer .
POST /v1/inboxes//send
Send an email. RequiresIdempotency-Key header (UUID).
GET /v1/inboxes//threads
PATCH /v1/threads/
GET /v1/threads//messages
Returns messages in a thread, sorted oldest-first.GET /v1/inboxes//messages
GET /v1/attachments//
Returns attachment data. Signed URL included in message payload — fetch promptly, URLs expire.Rate limits
| Resource | Limit |
|---|---|
| Inbox creation | 100 per day |
| Send per inbox | 10 per minute, 200 per day |
| API requests | 1,000 per minute |
Idempotency
The send endpoint requires anIdempotency-Key header. Use a unique UUID per send attempt. Retrying with the same key within 24 hours returns the original response without resending.
The CLI generates idempotency keys automatically. For direct API calls, generate a UUID: