Authentication
API keys, modes, scopes, and what happens when a key leaks.
Every authenticated request carries a bearer token:
Authorization: Bearer c2pa_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Modes
| Prefix | Counts against quota | Reaches real webhooks | Use for |
|---|---|---|---|
c2pa_live_ |
yes | yes | production |
c2pa_test_ |
no | no | integration, CI, local development |
A test key is not a sandbox with different behaviour: the same engine, the same trust list, the same result shape. It simply does not bill you or fire your webhooks.
Scopes
A key carries any of verify, monitors, read. Requests outside a key's scopes return
403 forbidden. A key bound to a project can only see that project's rows.
Storage
We store only a hash of the key and a few of its characters for display. The plaintext exists in exactly one HTTP response and is never recoverable — if you lose it, revoke and create another.
If a key leaks
Revoke it in the dashboard. Revocation is immediate and the row is kept, not deleted, so the audit trail survives.
A key pushed to a public repository is compromised the moment it lands: revoke it first, then rewrite history.
Dashboard sessions
The dashboard uses a short-lived access token in memory plus a rotating refresh cookie
(HttpOnly, Secure, SameSite=Strict, scoped to /api/v1/auth). Rotation happens on every
refresh, so a stolen cookie is worth one request. Both token types travel as
Authorization: Bearer; the server tells them apart by prefix.
Choosing an organization
An API key names its own organization. A dashboard session can belong to several, so
organization-scoped requests accept an X-Organization-Id header; without it the first
membership is used.