Skip to main content
GET
List learnings for an organization
Programmatic access to an organization’s CodeRabbit Learnings. Results are available as paginated JSON or a CSV download.
The public API does not create Learnings. Use Path Instructions to define durable review guidance for repositories and file paths.
Results are ordered by creation time and then by Learning ID, both descending. A page can contain up to 1,000 records. Responses larger than 16 MB are rejected; narrow the filters or request a smaller page.

Filter Learnings

Text search performs a case-insensitive substring match against Learning text. You can also filter by up to 10 exact file paths or by usage state:
  • Active: used in the last 30 days.
  • Never used: no recorded usage.
  • Created this week: created in the last 7 days.
Repository and user filters are resolved within each Learning’s own organization and Git provider, preventing same-named entities in another organization from matching.

CSV format

CSV responses use a flat structure with one row per Learning. For the complete list of CSV columns and field descriptions, see Data Export - Exported fields. For a guided overview of learnings, see the Learnings documentation.

Authorizations

x-coderabbitai-api-key
string
header
required

API key for authentication. You can create an API key from the CodeRabbit dashboard.

Headers

x-coderabbitai-api-key
string
required

API key for authentication

Query Parameters

org_id
string

Workspace-scoped API tokens only. When provided, scopes learnings to that single git-provider organization within the token's workspace; when omitted, aggregates every organization in the workspace. Ignored for organization and self-hosted keys.

repository_ids
string

Comma-separated provider repository IDs (max 10).

Example:

"1027529638,987654321"

user_ids
string

Comma-separated provider user IDs (max 10).

Example:

"87397876,12345678"

Case-insensitive substring search over learning text.

file_paths
string

Comma-separated exact file paths (max 10).

Example:

"src/api.ts,src/auth.ts"

stat_filter
enum<string>
default:total

Filter by recent usage, zero usage, or creation in the last seven days.

Available options:
total,
active,
never_used,
created_this_week
organization_ids
string

Comma-separated provider organization IDs (max 10). Self-hosted instances only.

Example:

"184456712,103539130"

limit
integer
default:1000

Maximum number of records to return.

Required range: 1 <= x <= 1000
cursor
string

Pagination cursor returned as next_cursor on the previous page.

format
enum<string>
default:json

Response format. json (default) returns paginated JSON; csv returns a CSV download.

Available options:
json,
csv

Response

Successfully retrieved learnings.

data
object[]
required
next_cursor
string | null
required