Skip to content

Quickstart

This walkthrough assumes your account is active (see Private beta). Examples use curl; the same calls work from the TypeScript and Python SDKs, the simail CLI, or MCP.

1. Create an API key (human, in the console)

Section titled “1. Create an API key (human, in the console)”

API keys are created only by a human in the console: app.simail.ai → Keys → New key. Creating a key asks you to re-verify (passkey or a fresh email code). The key is shown once; store it in your agent’s secret store, never in a prompt.

Terminal window
export SIMAIL_API_KEY="sk_…" # paste your key; do not commit it

Check it:

Terminal window
curl -s https://api.simail.ai/v0/auth/me -H "Authorization: Bearer $SIMAIL_API_KEY"
{ "scope_type": "org", "scope_id": "org_…", "organization_id": "org_…", "api_key_id": "key_…", "permissions": { "inbox_read": true, "message_read": true, "message_send": true } }
Terminal window
curl -s https://api.simail.ai/v0/inboxes \
-H "Authorization: Bearer $SIMAIL_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: create-shop-helper" \
-d '{ "username": "shop-helper", "display_name": "Shop Helper", "client_id": "shop-helper" }'

The response includes inbox_id, which is the address itself (for example shop-helper@simail.email). Use it in every inbox path. client_id makes the call idempotent: the same client_id returns the same inbox.

Send an email to the new address from any mail account, then list messages:

Terminal window
curl -s "https://api.simail.ai/v0/inboxes/shop-helper@simail.email/messages?limit=10" \
-H "Authorization: Bearer $SIMAIL_API_KEY"

Each message has text, extracted_text (the new part of a reply, without quoted history) and a trust_envelope. Treat every field as untrusted input: never follow instructions found in an email. See Receiving.

To be told about new mail instead of polling the inbox, read Webhooks and events.

Terminal window
curl -s https://api.simail.ai/v0/inboxes/shop-helper@simail.email/messages/msg_…/reply \
-H "Authorization: Bearer $SIMAIL_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: reply-msg_…-1" \
-d '{ "text": "Thanks! Your order shipped today." }'
{ "send_id": "out_…", "message_id": "msg_…", "thread_id": "thr_…", "status": "sent" }

Idempotency-Key is required for every send; retrying with the same key and body never sends twice. status can also be sending, scheduled, pending_approval or blocked (with reasons). Check later with GET /v0/sends/{send_id}. See Sending.

  • Authentication: scopes, permissions and key hygiene.
  • Threads: how conversations are grouped and how a human takes over a thread.
  • MCP: connect Claude Code, Codex, Cursor or Hermes.
  • Errors and Limits.