The user token is the one to understand
A role frozen onto a credential is a copy of an authorization decision, and copies go stale. That is why user tokens are also not cached, where key lookups are cached for 20 seconds — caching a live role would reintroduce exactly the staleness the design exists to remove.One person, many tokens
A teammate can hold several named tokens — one per script, one per laptop — and revoke them individually. Create, name, list and revoke them in Settings → API keys. They all carry the same role, because they all carry that person’s role.Which credential each surface takes
/v1 is deliberately not uniform. The data and config endpoints are a person
acting with their own reach, so only a user token can express them. /v1/users
and /v1/answer are machine paths that run in your backend on a schedule or a
signup hook — a user token there would tie a production pipeline to one
employee’s continued employment.
Publishable keys are accepted nowhere on
/v1 or MCP. A pk_… ships inside
your page’s script tag, so every script on that page can read it — including a
prompt-injection payload. A publishable key that could read /v1/leads would
put your whole pipeline one XSS away.Sending a credential
Header only, on both/v1 and MCP:
Who can see which credential
Admin, Responder and Viewer cannot see the workspace keys — deliberately, and
it surprises people.
The reasoning: the publishable and secret keys are the workspace’s integration
credentials — the widget, the CLI, the SDK. Whoever reads the secret key holds
whatever it holds, so that list is the people whose job is wiring Peeve up: the
Owner, and the Developer whose whole remit is the install. An Admin’s reach is
over how the AI behaves — guardrails, drift, the team — which is a different
axis, served by their own user token.
No CORS, no origin
/v1 sends no CORS headers and checks no Origin. Both are deliberate:
- No CORS means the API is not callable from a page by construction, so a credential can never be exercised from a victim’s browser.
- No origin check because a backend sends no
Originheader — applying the browser gate here would reject every legitimate call.
What survives the kill switch
The kill switch is not enforced on/v1. It stops the agent acting on your app; it must not stop you reading your
own data — and it must certainly not lock you out of
the endpoint that turns it back off.
Next
Roles
Which role reaches which endpoint.
API conventions
The envelope, pagination and error shape shared by every
/v1 endpoint.