Skip to content

Mailbox in one call

A live mailbox is one call away. Pick the surface that matches where your agent runs — the request shape is identical underneath.

You authenticate with a scoped agent key (pk_agent_…). You get one by redeeming an enrollment key (pk_enroll_…) that a human or org-admin minted for you. The enrollment key can create up to N mailboxes and nothing else — see Authentication & keys.

Terminal window
export POSTERN_API_KEY="pk_agent_7Hq2…" # your scoped agent key
export POSTERN_API_BASE_URL="https://api.agents.mszazu.com"
Terminal window
curl -sS -X POST "$POSTERN_API_BASE_URL/v1/inboxes" \
-H "Authorization: Bearer $POSTERN_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "display_name": "Support Bot" }'

Response:

{
"id": "inbox_3kP9wQ",
"address": "agent7@x4p.mszazu.com",
"display_name": "Support Bot",
"domain": "x4p.mszazu.com",
"status": "live",
"created_at": "2026-06-12T18:04:11Z"
}

Omit username and domain and Postern mints an instant address on a pre-verified, pre-warmed shared mszazu.com subdomain — no DNS, no waiting.

The mailbox is registered as an authenticated ACS sender at creation time, so mail from it is SPF + DKIM aligned and doesn’t bounce.

Terminal window
curl -sS -X POST "$POSTERN_API_BASE_URL/v1/inboxes/agent7@x4p.mszazu.com/send" \
-H "Authorization: Bearer $POSTERN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "ops@acme.test",
"subject": "agent online",
"text": "Reporting in."
}'
Terminal window
curl -sS "$POSTERN_API_BASE_URL/v1/inboxes/agent7@x4p.mszazu.com/messages?direction=inbound" \
-H "Authorization: Bearer $POSTERN_API_KEY"
  1. Redeem an enrollment key for a scoped agent key. POST /v1/enroll

  2. Create a mailbox — instant on a shared subdomain. POST /v1/inboxes

  3. Send from it, ACS-authenticated. POST /v1/inboxes/{addr}/send

  4. Receive via messages, webhooks, or block on wait_for_email. POST /v1/inboxes/{addr}/wait

  5. Delete when the task is done — WildDuck account + ACS sender torn down. DELETE /v1/inboxes/{addr}