Before you start
- The configuration operations are product operations for GitHub Cloud organizations. Other Git platforms and self-hosted CodeRabbit instances donât offer them.
- Create an API key, or connect an MCP client. See Authentication and MCP.
- The settings in every request and response use the V2 shape, including for repositories that use V3.
Choose a client
Automate with the API and MCP
Automate this with the CodeRabbit API and MCP server.11 operations
11 operations
snake_case name. The get operations need the configuration:read scope. The set operations and Preview repository configuration need configuration:write.
Read the effective configuration and preview changes
The effective configuration is the resolved YAML plus the YAML of each layer. If CodeRabbit canât resolve it, the response sayscomplete: false with a reason.
configuration:write scope, so agentic API keys canât call it. The callerâs role needs permission to read and change repository settings and to read organization settings, and the caller needs read access on GitHub to the repository and to any central coderabbit repository.
Write configuration safely
1
Read the current settings
Call the repository or organization get operation. Keep
settings_updated_at from the response.2
Change the settings
Send
settings, or settings_yaml up to 131,072 characters, together with expected_settings_updated_at set to the value you read.3
Handle a conflict
If someone saved in between, CodeRabbit rejects the write. Read again, merge your change, and retry.
expectedUpdatedAt set to the updatedAt from your last read, or null when no policy exists.
Permissions and limits
What organization and workspace reads return
- Organization: review settings, the authored and stored YAML, inherited settings, global overrides and the data opt-out state.
- Workspace: review settings, YAML, global overrides and the data opt-out state. There is no operation that changes them.
- Workspace configuration defaults: one setting, the Use workspace settings as defaults toggle.
- Global overrides: read-only through the API.
Draft changes with the CLI agent mode
cr config --agent returns structured state without prompts: the active configuration, whether it can be edited, and its content hash as baseHash. Add --generate to get a validated before-and-after YAML proposal, and --profile to shape it.
Whatâs next
API overview
Keys, regions and conventions.
MCP tools
Every tool with its scopes.
Check the configuration used
Compare an API read with a review.