Skip to content

Keys and scopes

You create and manage keys yourself on the console’s API keys page. Only account admins can, and every key action asks for a fresh MFA check.

Key Secret API key Publishable site key
Used by Your server: decisions, outcomes, MCP The browser tag
Secret? Yes. Never in a browser, an app, or a URL No. Public by design
Can do What its scopes allow Send signals only
Locked to An optional IP allowlist Your allowed domains
Looks like oc_live_…, oc_test_… oc_pk_live_…, oc_pk_test_…

Send a key only in the Authorization header: Authorization: Bearer <key>.

Scope Allows
decide POST /v1/decision
outcomes POST /v1/outcomes
mcp:read The MCP server’s read-only tools
mcp:write The MCP server’s read-only tools, plus casework: decide cases, add notes, label decisions, and change lists

Give each service only the scopes it needs. A checkout service needs decide; a back-office job that posts chargebacks needs outcomes; an agent reading the queue needs mcp:read; an agent that works cases needs mcp:write. A call without the scope gets 403 scope_not_granted.

Every key belongs to the sandbox (test) or to live, and never crosses over: a sandbox key cannot read or change live data. Decisions, devices, outcomes, and rulesets are kept per environment.

Name each key for what uses it (“checkout service, prod”), and keep one per service or team, so one can be rotated or revoked without touching the others. The console shows each key’s scopes, creator, expiry, and last use.

  • Expiry: never, or a date (30, 90, and 365 day presets). An expired key stops working at once.
  • Rotate in one click: you get a new key with the same name, scopes, and limits, shown once, and the old key keeps working through an overlap window you choose (7 days by default) while you deploy.
  • Revoke at any time. It takes effect everywhere within seconds.
  • A secret key is shown once, when you create it. We store only a hash; a lost key is replaced, not recovered.
  • Keep secret keys in your secret manager, never in source control or client code.
  • Add an IP allowlist to live secret keys used from fixed addresses: when you create the key, list the addresses or ranges your servers call from (like 203.0.113.7, 203.0.113.0/24). A call from anywhere else gets 403 invalid_api_key. Rotating keeps the list.
  • Every key event is in the audit log: who did it, when, and from where.