Base URLs and regions
Send requests to the region where your CodeRabbit organization lives, the same region as the app you sign in to and create keys in:
Every path in the API reference starts with
/v1, so GET /v1/me in the EU region is https://api.eu.coderabbit.ai/v1/me. If your HTTP client takes a base URL, set it to the API host and keep /v1 at the start of each path. Use HTTPS. Request and response bodies are JSON; send Content-Type: application/json with a body. A few export operations can also return CSV or SARIF when you ask for it with their format parameter.
The hosted MCP server has its own address and region support.
Identifiers
Other IDs, such as task, scan, and job IDs, are opaque strings that the API returns. Pass them back unchanged.
Pagination
A list operation returns one page and a field that tells you how to get the next. Look at the response, find the continuation field, and send its value back:
Stop when the continuation field is
null or missing, or when you reach the last page. Knowledge Base Learnings take their page size as pageSize, not page_size.
- Keep the request the same. Send the same filters, page size, key, and organization selector with every page. Only the continuation value changes.
- Continue past empty pages. A page can be empty while more results follow, for example when it holds only items you canât access. Stop on the continuation field, not on an empty page.
- Donât store tokens. Page tokens and cursors are opaque and short-lived: repository and pull request listings expire theirs after ten minutes. An expired or mismatched token returns
400; start again from the first page. - Expect a live listing. Items can change between pages. Deduplicate by ID when you collect a full list.
Errors
Check the HTTP status first, then the error code in the body. Branch on the code, never on the message text, which can change. When the body has no code, as for a missing or expired key, act on the HTTP status.Product operations
Product operations, every operation outside the export and user-management paths listed in the next section, return one error shape:Export and user-management operations
The operations under/v1/users, /v1/audit-logs, /v1/metrics, /v1/learnings, /v1/organizations, and /v1/linked-repositories, and the Deep Scan and Bug Scan findings exports, return error codes in upper case, in one of three shapes:
{"error": {"code": "LEGACY_API_KEY", "message": "âŚ"}}for most errors{"errors": [{"code": "RATE_LIMIT_EXCEEDED", "message": "âŚ"}]}for rate limits and some metrics errors{"success": false, "errors": [{"message": "âŚ"}]}when the key is missing, unknown, or expired
error.code first, then errors[0].code. The codes youâre most likely to meet:
Each operationâs reference lists the rest of its error codes.
Rate limits
Each operation has its own budget: a burst of 10 requests, refilled at 10 requests per minute. These groups of operations share one budget:
The budget belongs to the organization, not to the key. Every key, the CLI, and the hosted MCP server draw from the same budget for the same organization.
When you go over, the API returns
429 with these headers:
Pace scheduled jobs
A job that stays under the budget doesnât have to recover from429 responses:
- Send at most 10 requests a minute to one budget, about one every 6 seconds. For the metrics exports, use the size that
X-RateLimit-Limitreports on a429. - Count every job, script, and agent that works on the same organization, because they draw from the same budget. Start scheduled jobs at different times.
- On a
429, wait theRetry-Afterinterval plus a few random seconds, then send the same request again.
Asynchronous operations and retries
Some operations start work that finishes later, such as requesting a review, starting a Verify job or a security scan, sending a follow-up to a coding task, or delivering a patch. A successful response, often202 Accepted, means CodeRabbit accepted the request, not that the work finished. Read the resource the operation names, such as the review status, the coding task, the Verify job, or the scan, to follow its progress.
Most changes donât accept an idempotency key. If a change times out or the connection drops, read the resource before you retry, so you donât start the same work twice.
Versioning
The major version of the API is part of the path: every operation is under/v1. Operations and response fields are added to v1 over time, so write clients that ignore response fields they donât recognize. The API reference is generated from the OpenAPI description that the API serves.
Whatâs next
Authenticate requests
See which operations accept which key, and how a keyâs permissions work.
Request and read reviews
Put pagination, polling, and error handling to work in a complete review workflow.
API reference
Look up an operationâs parameters, response fields, limits, and error codes.