Scopes & permissions
Give an integration only the access it needs: read and write scopes, API keys against OAuth tokens, and how role levels narrow a credential.
Read and write scopes
Resource scopes use the form resource:read and resource:write. Write covers read. OAuth scopes are also restricted by the authorizing member's role.
API keys and member access
An API key represents the workspace rather than a person. It can hold only scopes the workspace owner has without record-level restrictions. Some scopes are available only to OAuth tokens.
Scopes for Rokn's own apps
The assistant scope lets Rokn's own apps use the in-app assistant on the member's behalf. A token for any other app, and any API key, is refused. Like the other fixed scopes (openid, profile, offline_access, mcp:tools), it is never granted to an API key.
Scopes for roles, the recycle bin, contracts and code hosts
- contracts:read and contracts:write: the contract operations. Contracts are their own resource, so the documents scopes do not cover them.
- org.roles:read and org.roles:write: Roles & access. trash:read and trash:write: the recycle bin. These four are reserved: no operation in the API reference requires them.
- code_hosts:read and code_hosts:write: the code-host accounts connected to a workspace. GET …/code-hosts/connections needs the read scope.
Role levels narrow a credential
Owners can lower what a role may do, section by section, in Settings → Roles & access. A level can only narrow what a role has, never widen it, and an OAuth token acts with the signed-in member's current role and levels.
An API key acts with the current role and levels of the member who created it, so lowering a level narrows that member's keys at once. A key can hold a write scope only if its creator may also delete in that section. A key whose creator has left the workspace, is banned or is pending account deletion is refused with 401 key_creator_gone.
Check the operation
Each operation in the API reference lists its required scope. Verify the operation and the member's permissions before requesting broader access. When a call is refused, Errors explains the code, and the API reference lists every operation.