Skip to content

Postern exposes a small, JSON, OpenAPI-described REST API under /v1. The SDKs and the MCP server map 1:1 onto it, so anything you can do with them you can do with a raw HTTP request.

Terminal window
export POSTERN_API_BASE_URL="https://api.agents.mszazu.com"

Override it with the POSTERN_API_BASE_URL environment variable everywhere — SDK, MCP, and your own clients. Use mock to run against fixtures.

Every endpoint except POST /v1/enroll requires a scoped agent key as a bearer token:

Terminal window
curl -H "Authorization: Bearer pk_agent_…" "$POSTERN_API_BASE_URL/v1/inboxes"

The customer_id for a request is derived from the key — never from client input — so the API is tenant-scoped by construction. See Authentication & keys.

Method & pathDoes
POST /v1/enrollRedeem an enrollment key for a scoped agent key.
POST /v1/inboxesCreate a mailbox.
GET /v1/inboxesList mailboxes.
GET /v1/inboxes/{addr}Get one mailbox.
DELETE /v1/inboxes/{addr}Delete a mailbox (WildDuck + ACS teardown).
POST /v1/inboxes/{addr}/sendSend an email.
GET /v1/inboxes/{addr}/messagesList messages in a mailbox.
GET /v1/inboxes/{addr}/threadsList conversation threads.
POST /v1/inboxes/{addr}/waitBlock until a matching message arrives (wait_for_email).
GET /v1/messages/{id}Get one message.
POST /v1/messages/{id}/replyReply in-thread.
GET /v1/threads/{id}Get one thread.
POST /v1/webhooksRegister an HMAC-signed inbound webhook.
TopicRule
Content typeRequests and responses are application/json.
IDsPrefixed and opaque: inbox_…, msg_…, thread_…, agent_….
Addresses in pathsURL-encode the mailbox address in {addr} (agent7%40x4p.mszazu.com).
PaginationList responses carry next_cursor; pass it back as ?cursor=. Use ?limit=.
IdempotencyPass client_id to create and idempotency_key to send/reply — retries won’t duplicate.
TimestampsISO 8601 UTC (2026-06-12T18:04:11Z).
ErrorsTyped, with a stable error.code. See Errors.
Request idEvery response carries X-Postern-Request-Id for support.

Limits are published and designed not to punish fan-out across many mailboxes. A 429 carries a Retry-After header. See Rate limits & quotas. fan-out friendly