The X-API-KEY header
Every RevyOps REST endpoint under /api/public/* and the MCP server both authenticate with a single header:
Where keys come from
API keys are generated and managed from Developer → Keys in the RevyOps dashboard. Three key types exist:
A key is generated and revealed once in a dialog; only a masked version (prefix, dots, last 4 characters) is shown afterward. Keys can be regenerated (issues a new secret, breaks anything using the old one) or revoked from the same screen.
Client-level vs agency-level keys
- Client keys (
RV-/read-write andRO-/read-only) are scoped to one client workspace at a time. You pick the client in the dashboard sidebar before generating one; the key is stored against thatclientId. - Master keys (
ML-) are scoped to the whole agency and can reach any client under it. Generating one requires master list access permission; it is not tied to a single client.
/api/public/whoami, which only recognizes client-scoped keys (RV-/RO-). A master key is not resolved this way and will not appear as a workspace through list_clients.
Client selection for the MCP server
The MCP server accepts one or more comma-separated API keys in theX-API-KEY header:
/api/public/whoami to resolve it to a client_id and client_name. When a tool call doesn’t specify client_name, the server picks a default: if only one workspace resolved, it uses that one; with multiple workspaces, it falls back to the first key’s workspace. Call list_clients first to see every workspace your key(s) resolve to, then pass the workspace name explicitly to other tools when you have more than one.
Passing a client_name that doesn’t match any resolved workspace (by exact name, partial name match, or client id) raises an error naming the key as invalid for that client.
The whoami endpoint
GET /api/public/whoami resolves the calling X-API-KEY to workspace identity. It requires the header and returns:

