Authentication
Bearer API keys, prefixes, scopes, and agent-scoped credentials.
Early access
Keys are issued from the dashboard or by agent self-signup. Scopes may still change.
All REST requests use Authorization: Bearer <key> against https://api.mailroom.gosuevals.com/v1. Every response includes x-request-id.
Key kinds
| Prefix | Use |
|---|---|
mr_live_ | Production. Hashed at rest (argon2id or SHA-256 of a high-entropy secret). |
mr_test_ | Never calls SES. Fake transport, realistic events. Safe for CI and agents building integrations. |
The plaintext secret is shown once at creation. Rotate by creating a second key, switching clients, then deleting the old one.
Scopes
emails:send, emails:read, domains:manage, inboxes:read, inboxes:write, approvals:decide, webhooks:manage, suppressions:manage, agents:manage, policies:manage, billing:read, full_access.
Agent-scoped keys cannot hold approvals:decide or policies:manage. An agent cannot approve itself or rewrite the rules that bind it.
Optional restrictions: agent_id, domain_ids[], expires_at.
const { data } = await mailroom.apiKeys.create({
name: 'support-agent',
scopes: ['emails:send', 'inboxes:read', 'inboxes:write'],
agent_id: 'agt_support',
});
// data.key is the only copy of the secretDashboard sessions
The dashboard (not this docs site) will use httpOnly, SameSite=Lax cookies, CSRF tokens on mutations, and optional TOTP MFA. Dashboard users are not API keys.
MCP
The hosted MCP server accepts the same bearer keys or OAuth 2.1 with dashboard consent. Agent-scoped credentials only see that agent's tools and data. See MCP.