Who can create tokens
Workspace API tokens exist only in Enterprise SSO workspaces. Only workspace admins can create, list, and delete them. CodeRabbit checks that the tokenâs owner is still a workspace admin every time the token is used, so a token stops working when its owner loses the role.Create a token
1
Open API tokens
In the CodeRabbit app, open Workspace management > API tokens, or go to
/workspace/api-keys.2
Create the token
Choose Create API Token, enter a name in API token name, and choose an Expiration.
3
Copy the token
Copy the token right away. CodeRabbit shows it only once.
x-coderabbitai-api-key header, like any key. This request lists the people in the whole workspace:
Supported operations
A workspace API token works with these export and user-management operations. Reads cover the whole workspace unless you pass an organization selector:org_name, the GitHub login of a GitHub Cloud organization, or org_id, the provider_organization_id that List organizations returns for it. The table names org_id; org_name works in the same place. Select an organization explains both selectors, where they go, and the errors they can return.
Product operations
Product operations, such as coding tasks, Triage, security scans, and custom role definitions, act on one GitHub Cloud organization. With a workspace API token, passorg_name or org_id on every request; without one, they return 400. The organization must belong to the workspace, and the token acts as an admin of that organization while its owner is a workspace admin. For operations that act on repositories, the tokenâs owner also needs their GitHub account connected in the workspace; otherwise the request fails with the message âConnect the API key ownerâs GitHub account in this workspace.â Organizations on other Git platforms or on self-hosted CodeRabbit return 404 for product operations.
The seat assignment mode of an SSO workspace isnât available through the API: set it in Workspace Team Management. See Choose a seat assignment mode.
For a walkthrough of listing workspace members, managing their seats, and linking their Git provider accounts, see SSO user management API.
Whatâs next
Manage users, seats, and roles
Automate seat assignment, role changes, and audit log exports with your token.
Authenticate requests
See which operations accept which key type, and how to store and rotate keys.
Audit logs
Track administrative activity across the workspace.