# Permissions

> One matrix of every action by role, checked before every request.

Every endpoint of the Nexus API names the one permission it needs, and Gateway checks it before the request runs. A
denied request is `403` `role_required`, and the message says who may. The API reference shows each endpoint's
permission, and [`GET /v1/tenants/me`](/docs/api/core#current-tenant) lists the permissions you have.

Some checks depend on the data and stay with the request: revoking someone else's token needs `keys.manage_all`,
setting someone else's default team needs `teams.manage`, and only the owner transfers ownership. An admin sets a
person's [spend limit](/docs/concepts/spend-limits) only when an owner has allowed it. Only an owner sets the default
per person, and only an owner sets an owner's limit.

A **lead** is a member who leads at least one team. A **service account** is a caller for CI and scripts. Its keys hold
the public actions only, until a Policy Engine statement admits them to more. A **sandbox** is a sandbox session's
reference, and holds the public actions only. A **module key** is the scoped key Nexus gives a product to call models
and connectors.

An **agent link** is no column. Its token holds what the person who linked it granted, cut down to that person's role
now. A **Nexus operator** is no column either. An operator reaches your organization only under an operator grant,
which names a reason, a list of actions and an expiry. It may do only the actions the grant names that an admin may
do. Each request writes `operator.request` in your [audit log](/docs/concepts/audit-log) before it runs. Owners and
admins read the grants with `GET /v1/operator-grants` and revoke one with `DELETE /v1/operator-grants/{id}`.

| Action | Owner | Admin | Lead | Member | Service account | Sandbox | Module key | Signed out | Covers |
| --- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | --- |
| `public` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | Public: sign up, the API description, the device login, signed webhooks |
| `ui.session` | – | – | – | – | – | – | – | – | Start a Nexus UI session (Nexus UI's server only, with its shared secret) |
| `authenticated` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | – | Any valid credential: who it is, and nothing else (GET /v1/auth/whoami); an agent link and an operator hold it whatever their grant, and no grant names it |
| `org.read` | ✓ | ✓ | ✓ | ✓ | – | – | – | – | Read the organization: who you are, its modules, provider keys (masked), linked repositories, the subscription, agent policy (deprecated alias) |
| `org.create` | ✓ | ✓ | ✓ | ✓ | – | – | – | – | Create a company organization: you become its owner |
| `org.settings` | ✓ | ✓ | – | – | – | – | – | – | Change the organization's settings: its name, slug and logo, how long chat messages are kept |
| `org.transfer` | ✓ | – | – | – | – | – | – | – | Transfer ownership of the organization |
| `org.delete` | ✓ | – | – | – | – | – | – | – | Delete the organization (no endpoint yet) |
| `org.billing` | ✓ | – | – | – | – | – | – | – | Billing: the card on file, the monthly invoices, and the subscription's payer and billing contact |
| `members.read` | ✓ | ✓ | ✓ | ✓ | – | – | – | – | List the organization's members (spend only for owners, admins and yourself) |
| `members.manage` | ✓ | ✓ | – | – | – | – | – | – | Change a member's role, remove a member |
| `members.invite` | ✓ | ✓ | – | – | – | – | – | – | Invite people by email |
| `keys.manage_own` | ✓ | ✓ | ✓ | ✓ | – | – | – | – | Create, list and revoke your own API keys and tokens; sign out |
| `account.delete` | ✓ | ✓ | ✓ | ✓ | – | – | – | – | Delete your own account from a sign-in, not an API key: your sign-in, your personal organization and your place in every organization (not while you own a company organization) |
| `keys.manage_all` | ✓ | ✓ | – | – | – | – | – | – | List and revoke anyone's API keys and tokens |
| `service_accounts.manage` | ✓ | ✓ | – | – | – | – | – | – | Make, list and revoke the organization's service accounts; issue, rotate and revoke their keys |
| `agent_links.manage_own` | ✓ | ✓ | ✓ | ✓ | – | – | – | – | Link an agent that acts for you; list and unlink your own agent links (anyone's: owners and admins) |
| `provider_keys.manage` | ✓ | ✓ | – | – | – | – | – | – | Add, replace, disable, enable and remove the organization's provider keys (BYOK) |
| `budgets.manage` | ✓ | ✓ | – | – | – | – | – | – | Set the organization's budget and each team's cap; set the default per person as an owner, and each person's limit as an owner or as an admin an owner allowed (budgets.delegate) |
| `budgets.delegate` | ✓ | – | – | – | – | – | – | – | Allow an admin to set person spend limits, or stop them |
| `policy.read` | ✓ | ✓ | ✓ | ✓ | – | – | – | – | Read the model policies (organization, teams, coding agents) and test them for yourself |
| `policy.manage` | ✓ | ✓ | – | – | – | – | – | – | Set the organization's and the coding agents' model policies; test them for anyone |
| `policy.manage_team` | ✓ | ✓ | ✓ | – | – | – | – | – | Set a team's model policy, and pause or limit its model traffic (team leads: their own teams and those under them; a policy only to narrow it, a control never an override) |
| `repositories.manage` | ✓ | ✓ | – | – | – | – | – | – | Link and unlink repositories through the Nexus GitHub App |
| `chat_apps.manage` | ✓ | ✓ | – | – | – | – | – | – | Bind a chat workspace (Slack) to the organization through the app's install, confirm it, list the bindings and unbind them |
| `chat_apps.manage_team` | ✓ | ✓ | ✓ | – | – | – | – | – | Bind a chat channel (Slack) to a team, list the channel bindings, read a channel's effective settings and unbind it (team leads: the teams they lead and those under them) |
| `chat_apps.runtime` | – | – | – | – | – | – | – | – | Read a chat workspace's binding and bot token; report its revocation; keep the agents service's own sealed state (/v1/agents/state; the agents service only) |
| `teams.use` | ✓ | ✓ | ✓ | ✓ | – | – | – | – | Read teams; choose your own default team |
| `teams.manage` | ✓ | ✓ | – | – | – | – | – | – | Create, change, move and delete teams; add and remove members; import |
| `spend.read_own` | ✓ | ✓ | ✓ | ✓ | – | – | – | – | Spend, analytics, agent sessions and spend limits: your own and your teams' (the organization's for owners and admins) |
| `spend.read_all` | ✓ | ✓ | – | – | – | – | – | – | The whole organization's spend, analytics and agent sessions |
| `spend.export` | ✓ | ✓ | – | – | – | – | – | – | Export the organization's spend calls, usage and agent sessions as CSV or JSON Lines, and the directory file that maps ids to names |
| `products.use` | ✓ | ✓ | ✓ | ✓ | – | – | – | – | Run modules and read their reports; open and end agent sessions |
| `routines.use` | ✓ | ✓ | ✓ | ✓ | – | – | – | – | Your own routines, such as a morning brief: create, read, pause, resume and delete them (/v1/routines; owners and admins also read, pause and delete others'); an agent link holds it only on its person's opt-in |
| `wiki.run` | ✓ | – | – | – | – | – | – | – | Start a Nexus Wiki run (owners only until budgets exist; also the Wiki's run verb) |
| `review.configure` | ✓ | – | – | – | – | – | – | – | Connect a repository to Nexus Review, change its review config, and watch it (owners only, as Nexus Review's connect and watch verbs) |
| `agents.use` | ✓ | ✓ | ✓ | ✓ | – | – | – | – | The agent gateway: Anthropic and OpenAI pass-through for nexus claude and nexus codex |
| `agents.memory` | ✓ | ✓ | ✓ | ✓ | – | – | – | – | Your agent's memory: rows your agent seals and keeps for you, which only you and your own agent links read, write and delete (/v1/agents/memory); an agent link holds it only on its person's opt-in |
| `agents.profiles` | ✓ | ✓ | ✓ | ✓ | – | – | – | – | Read your agents' profiles: your own personal agent and your organization's company agents (GET /v1/agents/profiles); an agent link holds it only on its person's opt-in |
| `agents.profiles_manage` | ✓ | ✓ | ✓ | ✓ | – | – | – | – | Change agent profiles: your own personal agent, and as an owner or admin your organization's company agents (/v1/agents/profiles); no agent link holds it |
| `projects.use` | ✓ | ✓ | ✓ | ✓ | – | – | – | – | Projects: list and read the projects you are in, create one, and as a project admin rename or archive it and change its repositories, members and secrets (/v1/projects; owners and admins are admins of every project); set your own secrets (/v1/secrets/me; values are write-only); read a project's setup and, as a project admin, save a new version (/v1/projects/{id}/setup); no agent link holds it |
| `projects.org_secrets` | ✓ | ✓ | – | – | – | – | – | – | The organization's project secrets: list their names, set and delete them (/v1/secrets/org; values are write-only); no agent link holds it |
| `models.use` | ✓ | ✓ | ✓ | ✓ | – | – | ✓ | – | Model calls through /v1/chat/completions, and the models you may use (GET /v1/models) |
| `chat.use` | ✓ | ✓ | ✓ | ✓ | – | – | – | – | Chat sessions: your own, private to you (Nexus UI's home, nexus chat, Ask your code) |
| `chat.ask` | ✓ | ✓ | ✓ | ✓ | – | – | – | – | Ask your code alone: a question to the organization's Nexus Wiki in an ask-mode session of your own (POST /v1/chat/ask) and no other chat route; an agent link holds it only on its person's opt-in |
| `chat.web` | ✓ | ✓ | ✓ | ✓ | – | – | – | – | Web search alone: a text question answered with the organization's web search and no other tool, in a chat session of your own (POST /v1/chat/web) and no other chat route; an agent link holds it only on its person's opt-in |
| `artifacts.share` | ✓ | ✓ | ✓ | ✓ | – | – | – | – | Share your own chat sessions as artifacts (snapshots) with the organization, chosen teams or chosen people in it, or outside it (named people by email, or anyone with the link) as its settings allow; see and change who has them; revoke them (owners and admins: any of the organization's) |
| `artifacts.read` | ✓ | ✓ | ✓ | ✓ | – | – | – | – | Artifacts shared with you (from other organizations too, by your verified email): list, read, download as Markdown, ask for access, and continue one in a new private chat when its author allows |
| `artifacts.manage_external` | ✓ | ✓ | – | – | – | – | – | – | Everything the organization shared outside it: list it with open counts, requests and reports, and revoke in bulk |
| `artifacts.manage_all` | ✓ | ✓ | – | – | – | – | – | – | Revoke any of the organization's artifacts and change who has them (their authors: their own, with artifacts.share) |
| `skills.promote` | ✓ | ✓ | ✓ | ✓ | – | – | – | – | Ask to promote your own skill to a team you are in or to the organization; list your own promotion requests and withdraw a held one |
| `skills.approve_team` | ✓ | ✓ | ✓ | – | – | – | – | – | Approve or refuse a promotion request to a team, and withdraw an approved version (team leads: their own teams and those under them; never your own request) |
| `skills.approve_org` | ✓ | ✓ | – | – | – | – | – | – | Approve or refuse a promotion request to the organization, and withdraw an approved version (never your own request) |
| `sessions.control` | ✓ | ✓ | ✓ | ✓ | – | – | – | – | Send and receive encrypted requests for your own computers and Code sessions from your trusted devices |
| `synced_sessions.manage_policy` | ✓ | ✓ | – | – | – | – | – | – | Change the organization's content policy for synced sessions, and register or replace its recovery key's public half |
| `synced_sessions.audit` | ✓ | ✓ | – | – | – | – | – | – | Read every member's synced sessions in the organization, each read audited, the copies locked for its recovery key, and which members lock for it (GET /v1/threads?scope=org, GET /v1/threads/{threadId}/org-keys, GET /v1/orgs/recovery-key/coverage) |
| `connectors.use` | ✓ | ✓ | ✓ | ✓ | – | – | ✓ | – | Connector reads and module writes with a standing Policy grant |
| `connections.manage_own` | ✓ | ✓ | ✓ | ✓ | – | – | – | – | Connect, list and disconnect your own accounts at a connector's vendor (the organization's: owners and admins) |
| `audit.read_own` | ✓ | ✓ | ✓ | ✓ | – | – | – | – | Audit events where you are the actor |
| `audit.read_team` | ✓ | ✓ | ✓ | – | – | – | – | – | Audit events of the teams you lead and the teams under them |
| `audit.read_all` | ✓ | ✓ | – | – | – | – | – | – | Every audit event of the organization |
| `audit.export` | ✓ | ✓ | ✓ | – | – | – | – | – | Export audit events as CSV (within what you can read) |
| `operator_grants.issue` | ✓ | ✓ | – | – | – | – | – | – | Ask for an operator grant on a customer's organization, with a reason, a list of actions and an expiry (a person with a platform role only) |
| `operator_grants.read` | ✓ | ✓ | – | – | – | – | – | – | Read the operator grants on the organization (who holds each one, why, what it allows, when it ends) and revoke them |
| `auth.device_approve` | ✓ | ✓ | ✓ | ✓ | – | – | – | – | Approve a `nexus auth login` code (in Nexus UI, or on Gateway's own `/device` page without it) |
| `approvals.decide` | ✓ | ✓ | ✓ | ✓ | – | – | – | – | Confirm or deny, as yourself in Nexus, a connector write a chat agent asked for, and turn your own agents' writes on or off; an agent link never holds it |
| `search.use` | ✓ | ✓ | ✓ | ✓ | – | – | – | – | Search what your role may read: your own chats, artifacts shared with or by you, people, teams, models and model policies (GET /v1/search) |
| `notifications.use` | ✓ | ✓ | ✓ | ✓ | – | – | – | – | The notification inbox: your own items, marked read or done, and the catalogue of kinds (GET /v1/notifications), and a question to the owners about a billing block (POST /v1/notifications/ask-owner) |
| `growth.read` | ✓ | ✓ | – | – | – | – | – | – | Read the organization's activation and first values, and its members' paths to first value as counts per step (GET /v1/growth/activation, GET /v1/growth/paths) |
| `diagnostics.report` | ✓ | ✓ | ✓ | ✓ | – | – | – | – | Send the app's own error and crash reports, which hold no content, to the Gateway's log (POST /v1/diagnostics/reports), its activity heartbeat (POST /v1/diagnostics/heartbeat) and the errors it caught, with no content (POST /v1/diagnostics/errors) and the artifact frames that failed to load (POST /v1/diagnostics/frame-failures) |
| `feedback.send` | ✓ | ✓ | ✓ | ✓ | – | – | – | – | Send feedback, and the crash reports you chose to send, to Nexus's team in Slack (POST /v1/diagnostics/feedback) |
| `referrals.read` | ✓ | ✓ | ✓ | ✓ | – | – | – | – | Your referral code and the people you referred (GET /v1/referrals) |
| `cloud.machines.use` | ✓ | ✓ | ✓ | ✓ | – | – | – | – | Your own cloud machines on Nexus's provider account: create, wake, sleep, delete and connect to them; their compute is charged as cloud compute (/v1/cloud/machines) |
| `cloud.sandboxes.use` | – | – | – | – | – | – | ✓ | – | Throwaway cloud sandboxes on Nexus's provider account for a module's untrusted commands: create, read, run commands in, upload to and delete them; Nexus Review's module key only; their compute is charged as cloud compute (/v1/cloud/sandboxes) |
| `cloud.runs.use` | ✓ | ✓ | ✓ | ✓ | – | – | – | – | Start and read your own fix runs: Gateway fixes a GitHub issue in a throwaway cloud sandbox on Nexus's provider account and opens the pull request through your agents' writes; only an agent link starts one; the sandbox is charged as cloud compute (/v1/cloud/runs) |
| `sessions.read` | ✓ | ✓ | ✓ | ✓ | – | – | – | – | Read your own cloud sessions and their history (the /v1/sessions routes, when they ship); an agent link holds it only on its person's opt-in |
| `sessions.start` | ✓ | ✓ | ✓ | ✓ | – | – | – | – | Start cloud sessions as you, billed to you; an agent link that holds it also holds your cloud machines (cloud.machines.use), and only on its person's opt-in |
| `sessions.steer` | ✓ | ✓ | ✓ | ✓ | – | – | – | – | Send messages to and stop your own cloud sessions (the /v1/sessions routes, when they ship); an agent link holds it only on its person's opt-in |
| `apps.use` | ✓ | ✓ | ✓ | ✓ | – | – | – | – | Your own apps on Nexus's Vercel team: deploy a folder, read, delete and claim them to your own Vercel account; owners and admins reach every app of the organization (/v1/apps, NEXUS_APPS_ENABLED) |
| `accounts.mark` | ✓ | ✓ | – | – | – | – | – | – | Mark an organization or a person as Nexus's own: staff, test or demo (a person with a platform role only) |
| `desktop.revoke` | ✓ | ✓ | – | – | – | – | – | – | Read and change the desktop app versions this Gateway refuses with 426 desktop_revoked, for every organization (a person with a platform role only) |
| `staff.read` | ✓ | ✓ | – | – | – | – | – | – | Read every person's and organization's metadata and usage across organizations, audited (a person with a platform role who is one of Nexus's own people only) |
| `staff.invites` | ✓ | ✓ | – | – | – | – | – | – | Make, list and revoke campaign codes for invite-only sign-up, audited (a person with a platform role who is one of Nexus's own people only) |

This table is generated from the API's own description, which a test keeps equal to the code.
