Skip to main content
Use Mermail’s HTTP API from scripts, agents, Postman, or this docs Try it playground. Base URL: https://console.mermail.app All protected sold-API routes need:
Create a key in the Mermail app under Settings → API Keys, then paste it into Try it or your client. See Authentication. Every sold-API credential call debits API credits and counts toward workspace RPM. When credits run out you get 402 with credits_exhausted; when you exceed RPM you get 429. The keyless Agent Marketplace API uses a different 402: x402 or MPP payment (including $0 identity handshakes), not API credits.
Each API key is bound to one workspace. Required path workspaceId values must identify that workspace. Optional body/query workspaceId values can be omitted and are resolved from the key; supplied values must match (403 workspace_scope_denied otherwise). GET /workspaces returns only the key’s workspace. Workspaces are created automatically for new accounts in the Mermail console — there is no sold-API “create workspace” endpoint.
Each endpoint page in this reference shows plan badges (sidebar tag + Plans line):

Plans at a glance

See Pricing for API key limits, API credits, RPM, and workspace allowances across Free, Developer, Growth, and Enterprise. Growth and Enterprise share the same endpoint list as Developer, with higher quotas.

Quick start

1

Create an API key

In Mermail → Settings → API Keys → copy sk-proj-… once (Free: 1 key, Developer: up to 5, Growth: up to 10).
2

Pick an endpoint

Use the sidebar in this API Reference. Prefer core catalog endpoints on Free; Developer-gated paths need Developer, Growth, or Enterprise.
3

Authorize and send

Open the page → Try it → paste your API key → fill params → send. Or copy a cURL / Python / JavaScript / PHP / Go / Java / Ruby snippet from the language dropdown.
Start with Usage → Get API credit usage after you have a key.

Core API catalog (all plans)

Send files and inline images

Send, reply, forward, save-draft, and schedule requests accept an attachments array in the JSON request body. Each item contains base64 file bytes (content, filename, type, disposition, and optional contentId) or { "attachment_id": "existing-id" } to reuse a file in the same authorized mailbox. Pass complete file bytes, not a local path, URL, or data: URL. When replacing or sending an existing draft, omitting attachments preserves its files; [] clears them; an explicit array replaces the entire set. Use draft_id for save/schedule and source_draft_id for sends. Include references for existing files you want to retain alongside new bytes. For inline PNG, JPEG, GIF, or WebP, set disposition: "inline", assign a unique contentId, and include a matching HTML image such as <img src="cid:chart-1" alt="Chart" />. Drafts and schedules carry HTML in body with body_format: "html"; sends use html. Storage allows 20 files, 10 MiB per file, and 25 MiB decoded total. The Email module also checks the encoded message, its bodies, and overhead: about 5 MiB for hosted @mermail.app addresses and about 40 MB for custom-domain addresses. A file that fits storage can exceed the message limit. See the Email module and attachment examples. MCP wraps the REST payload in a tool’s body object; REST sends the payload directly. Treat saved drafts, queued requests, and scheduled emails according to the returned status. Only report sent after an authoritative send result; recipient delivery is a separate outcome. Auth: x-api-key. Metered with credits + RPM. Open each group in the sidebar for full schemas and Try it.

Catalog by area

Path param {mailboxId} accepts public_id (UUID), hosted alias id, or current email. Prefer public_id from list responses.
List / send / reply / forward, bounded safe thread context, drafts, scheduled sends, threads, folders, search, and custom labels under /api/v1/mailboxes/{mailboxId}/....Typical costs: send / reply / forward = 5; schedule = 2; draft regenerate = 15 (or 2 with separate AI metering); most reads = 1, writes = 2.

Developer-gated APIs (Developer, Growth, and Enterprise)

Free workspaces receive 403 on these paths. Upgrade to unlock them.

Credits

API credits are workspace usage units. A 10-credit provision operation does not mean a $10 currency charge. A successful mailbox create consumes 10 provision credits. Pass Idempotency-Key when repeating the same create intent, but do not treat it as proof of exactly-once business execution. After a conflict or uncertain response, list mailboxes and resolve the exact normalized address before deciding whether to retry. Authenticated requests carrying this header have a 50 MiB request-fingerprint body limit; larger bodies return 413 idempotency_payload_too_large before the operation runs. When AI usage is metered separately, mailbox chat and draft regeneration use 2 API credits plus the separate AI allowance instead of the heavy or light API credit rate. Free, Developer, and Growth return 402 (credits_exhausted) when the period pool is empty. Enterprise soft-unlimited still records usage. Check remaining balance via GET /api/v1/workspaces/{workspaceId}/usage/credits.

Rate limits

The standard limits are 10 RPM on Free, 100 RPM on Developer, and 150 RPM on Growth. Enterprise has unlimited API RPM by default. See Pricing for the full comparison. Over limit → 429.

Auth reminder

Details: Authentication.

Spec source

This reference is generated from openapi/openapi.json. Regenerate with: