> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coderabbit.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get started with the CodeRabbit API

> Automate CodeRabbit reviews, coding tasks, scans, and administration over REST, from the CLI, or through the hosted MCP server.

The CodeRabbit API lets your scripts, services, and AI agents do what people do in the CodeRabbit app: read review status, start coding tasks, run security scans, manage rules and settings, and export data for reporting and compliance. Requests and responses are JSON over HTTPS, except downloads you ask for in another format, such as CSV and SARIF exports of findings.

## What you can build

Each area below matches a group in the API reference. Start with the operation named in the last column.

| Area | What you can do | Start with |
| - | - | - |
| Organizations and repositories | Check which key and organization a request uses, list the repositories you can access, and list the organizations in a workspace. | [Get the authenticated principal](https://docs.coderabbit.ai/api/reference/get-me.md), [list repositories](https://docs.coderabbit.ai/api/reference/list-repositories.md) |
| Pull requests and reviews | Read pull requests with their checks and review threads, read CodeRabbit's review status, summary, and Change Stack, and request a review of the current head. | [Read review status](https://docs.coderabbit.ai/api/reference/get-pull-request-review.md), [request a review](https://docs.coderabbit.ai/api/reference/request-pull-request-review.md) |
| Coding Agent | Create coding tasks, follow their turns, answer questions, review a task's plan, and deliver patches. | [Create a coding task](https://docs.coderabbit.ai/api/reference/create-code-task.md) |
| Coding environments | Manage the environments, repository setup, and variables that coding tasks run with. | [Create a coding environment](https://docs.coderabbit.ai/api/reference/create-code-environment.md) |
| Verify | Register repositories and user journeys, start Verify jobs, and read findings and evidence. | [Start a Verify job](https://docs.coderabbit.ai/api/reference/start-verify-job.md) |
| Triage | Read Triage changes and teams, set a change's manual priority, and create, preview, and manage Triage rules. | [List Triage changes](https://docs.coderabbit.ai/api/reference/list-triage-changes.md) |
| Security | Start scans, read findings, dependencies, SBOMs, and secrets, request fixes, and export Deep Scan and Bug Scan findings. | [List security findings](https://docs.coderabbit.ai/api/reference/list-security-findings.md), [export Deep Scan code findings](https://docs.coderabbit.ai/api/reference/security-scans-code-list.md) |
| Knowledge Base | Manage Learnings and connected knowledge repositories, and read architecture knowledge. | [List Learnings](https://docs.coderabbit.ai/api/reference/list-learnings.md) |
| Automations | Create, update, run, and pause [CodeRabbit Agent automations](https://docs.coderabbit.ai/slack-agent/automations.md), and read their runs. | [Create an automation](https://docs.coderabbit.ai/api/reference/create-automation.md) |
| Reports | Create on-demand and scheduled reports, and manage their schedules. | [Create a report](https://docs.coderabbit.ai/api/reference/create-report.md) |
| Configuration | Read and change organization and repository settings, read a repository's effective configuration, and preview a change before you save it. | [Read effective repository configuration](https://docs.coderabbit.ai/api/reference/get-effective-repository-configuration.md) |
| Connections | Manage workspace connections and their requests, and discover the tools of an MCP connection. | [List connections](https://docs.coderabbit.ai/api/reference/list-connections.md) |
| Users and roles | List users, manage seats and roles, and export audit logs. | [List users](https://docs.coderabbit.ai/api/reference/list-users.md), [export audit logs](https://docs.coderabbit.ai/api/reference/audit-logs-list.md) |
| Usage and metrics | Read usage, credits, and budgets, and export review and review comment metrics. | [Read usage](https://docs.coderabbit.ai/api/reference/get-usage.md), [export review metrics](https://docs.coderabbit.ai/api/reference/review-metrics.md) |

An operation never grants more than the CodeRabbit app does: each request runs with the permissions of the key's owner, and a product that isn't enabled for your organization stays unavailable through the API.

## Choose how to connect

| Client | Use it when | Authenticates with |
| - | - | - |
| REST | You build a service, dashboard, or integration in any language. Every operation is available. | An API key in the `x-coderabbitai-api-key` header, or a [workspace API token](https://docs.coderabbit.ai/api/workspace-api-tokens.md) in an Enterprise SSO workspace |
| [CLI](https://docs.coderabbit.ai/api/cli.md) (`coderabbit api`) | You script CodeRabbit from a shell or a CI job. Dedicated commands cover identity, repositories, and pull requests, and `coderabbit api request` calls any other operation. Output is JSON. | An API key or a workspace API token |
| [Hosted MCP server](https://docs.coderabbit.ai/api/mcp.md) | You want an AI agent, such as Claude or Codex, to act in CodeRabbit on your behalf. The server offers most product operations as tools. | OAuth: you sign in and approve access for one organization |

The REST API and the CLI share the same keys, base URLs, and responses. The MCP server uses no API key. See [Authentication](https://docs.coderabbit.ai/api/authentication.md) for keys and [Conventions](https://docs.coderabbit.ai/api/conventions.md) for base URLs, pagination, errors, and rate limits.

## Availability

### Plans

The API has no plan requirement of its own. What an operation needs depends on its [operation family](https://docs.coderabbit.ai/api/authentication.md#which-keys-each-operation-accepts):

* **Product operations**, such as coding tasks, Triage rules, and security scans, follow the access rules of the feature they act on. For example, creating a coding task needs access to Coding Agent, reports follow your plan's reporting access, and administration operations, such as listing organization roles, need the Enterprise plan.
* **Export and user-management operations**, such as users, seats, role changes, audit logs, metrics, organization Learnings, and the organization inventory, need the Enterprise plan and return `403 ENTERPRISE_PLAN_REQUIRED` without it. Two exports are exceptions: Deep Scan code findings work on every plan, and Bug Scan findings need Bug Scan enabled for the organization.
* **The hosted MCP server** has no plan requirement of its own. Each tool applies the checks of the operation behind it.

### Git platforms and keys

* **Git platforms.** Product operations work for GitHub Cloud organizations. Export and user-management operations work on every Git platform CodeRabbit supports.
* **Self-hosted.** Organizations on self-hosted CodeRabbit or on a self-managed Git provider, such as GitHub Enterprise Server or GitLab Self-Managed, can use the export and user-management operations with a self-hosted instance key. Product operations aren't available to them and return `404`.
* **Keys.** Which operations accept a user key, an agentic key, a workspace API token, or a self-hosted instance key is listed in [Authentication](https://docs.coderabbit.ai/api/authentication.md#which-keys-each-operation-accepts).

## Guides

> [card] [Request and read reviews](https://docs.coderabbit.ai/api/guides/pull-request-reviews.md)
>
> Find a pull request, request a review, and follow it to completion.

> [card] [Run coding tasks](https://docs.coderabbit.ai/api/guides/coding-tasks.md)
>
> Start a coding task, answer its questions, and deliver the patch.

> [card] [Manage users, seats, and roles](https://docs.coderabbit.ai/api/guides/users-and-seats.md)
>
> Automate seat assignment, role changes, and audit log exports.

> [card] [Export metrics and usage](https://docs.coderabbit.ai/api/guides/metrics-and-usage.md)
>
> Export review metrics, track usage and credits, and schedule reports.

> [card] [Manage Learnings](https://docs.coderabbit.ai/api/guides/learnings.md)
>
> Choose the right Learnings operations to export or manage Learnings.

> [card] [Export security findings](https://docs.coderabbit.ai/api/guides/security-findings.md)
>
> Export Deep Scan and Bug Scan findings into your security tools.

## What's next

> [card] [Make your first API call](https://docs.coderabbit.ai/api/quickstart.md)
>
> Create a key, call the API with curl or the CLI, and read a review status.

> [card] [Browse the API reference](https://docs.coderabbit.ai/api/reference/get-me.md)
>
> See every operation's parameters, responses, and errors.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.