> ## 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.

# List linked repositories

> Lists manual configured candidates derived only from saved UI settings and stored automatic links filtered by saved UI settings. The manual projection approximates saved UI inheritance and overrides and normalizes at most 20 entries per settings layer. This is not a complete manual graph, effective configuration, or a record of review usage. Repository and central YAML-derived links are not read; custom sources and per-review overrides are also unavailable. These sources can change both manual associations and automatic mode. Repository and organization filters select a union of source repositories; omitted or empty filters select the full scope. Targets are resolvable active repositories in the source organization, within the authorized scope. Requires Enterprise, an authenticated CodeRabbit administrator (cr_admin), and both repository management and repository settings read permissions. Organization keys require an organization administrator; workspace keys require a workspace administrator. Self-hosted keys without user context are denied.

Enterprise Plan (This feature is available exclusively as part of the Enterprise plan. Please refer to our pricing page for more information about our plans and features.)

> [!NOTE]
>
> Requires an authenticated CodeRabbit administrator (`cr_admin`) with both `repository_management:read` and `repository_settings:read` permissions. Organization API key owners must also be organization administrators; workspace API key owners must be workspace administrators. Legacy organization keys, agentic keys, and self-hosted keys without user context are not supported.

## Filter by organization

Use a CodeRabbit organization UUID from the `id` field returned by [List organizations](https://docs.coderabbit.ai/api-reference/organizations-list.md), not the Git provider's organization ID. The API key must already have access to the organization; a filter does not expand its scope.

```bash theme={null}
curl -G 'https://api.coderabbit.ai/v1/linked-repositories' \
  -H "x-coderabbitai-api-key: $CODERABBIT_API_KEY" \
  --data-urlencode 'organization_ids=550e8400-e29b-41d4-a716-446655440000'
```

Replace the example UUID with your organization ID. Organization and repository filters select the union of matching source repositories. If both filters are omitted or empty, the endpoint selects the full authorized scope.

## Interpret associations

`MANUAL` entries are candidates derived from saved UI settings. The manual projection approximates UI inheritance and overrides and normalizes at most 20 entries per settings layer. `AUTO` entries are stored automatic links filtered by saved UI settings; disabled automatic links are excluded. Targets must resolve to active repositories in the source organization and authorized scope.

This is not a complete manual graph, effective configuration, or a record of review usage. Repository and central YAML-derived links, custom sources, and per-review overrides are not included; these sources can change manual associations and automatic mode.

## Pagination

When `next_cursor` is not `null`, pass it as the next request's `cursor`. Keep the same filters and `limit` across requests.


## OpenAPI

````yaml get /v1/linked-repositories
openapi: 3.0.3
info:
  title: CodeRabbit API spec
  version: 1.0.0
servers:
  - url: https://api.coderabbit.ai
security:
  - ApiKeyAuth: []
paths:
  /v1/linked-repositories:
    get:
      tags:
        - Repositories
      summary: List linked repositories
      description: >-
        Lists manual configured candidates derived only from saved UI settings
        and stored automatic links filtered by saved UI settings. The manual
        projection approximates saved UI inheritance and overrides and
        normalizes at most 20 entries per settings layer. This is not a complete
        manual graph, effective configuration, or a record of review usage.
        Repository and central YAML-derived links are not read; custom sources
        and per-review overrides are also unavailable. These sources can change
        both manual associations and automatic mode. Repository and organization
        filters select a union of source repositories; omitted or empty filters
        select the full scope. Targets are resolvable active repositories in the
        source organization, within the authorized scope. Requires Enterprise,
        an authenticated CodeRabbit administrator (cr_admin), and both
        repository management and repository settings read permissions.
        Organization keys require an organization administrator; workspace keys
        require a workspace administrator. Self-hosted keys without user context
        are denied.
      operationId: linked-repositories-list
      parameters:
        - in: query
          name: repository_ids
          description: Provider repository IDs, comma-separated or repeated.
          schema:
            type: array
            items:
              type: string
          style: form
          explode: false
          example: 12345,67890
        - in: query
          name: organization_ids
          description: CodeRabbit organization UUIDs, comma-separated or repeated.
          schema:
            type: array
            items:
              type: string
              format: uuid
          style: form
          explode: false
        - name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
        - in: query
          name: cursor
          description: >-
            Pagination cursor from the previous response. Keep filters and limit
            unchanged.
          schema:
            type: string
      responses:
        '200':
          description: >-
            Linked repository graph page. GET
            /linked-repositories?repository_ids=12345&limit=50 selects one
            source repository.
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - next_cursor
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      required:
                        - repository
                        - linked_repositories
                      properties:
                        repository:
                          type: object
                          required:
                            - id
                            - name
                            - organization_id
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            organization_id:
                              type: string
                              format: uuid
                        linked_repositories:
                          type: array
                          items:
                            type: object
                            required:
                              - id
                              - name
                              - organization_id
                              - type
                            properties:
                              id:
                                type: string
                              name:
                                type: string
                              organization_id:
                                type: string
                                format: uuid
                              type:
                                type: string
                                enum:
                                  - MANUAL
                                  - AUTO
                  next_cursor:
                    type: string
                    nullable: true
              example:
                data:
                  - repository:
                      id: '12345'
                      name: acme/api
                      organization_id: 550e8400-e29b-41d4-a716-446655440000
                    linked_repositories:
                      - id: '67890'
                        name: acme/shared
                        organization_id: 550e8400-e29b-41d4-a716-446655440000
                        type: MANUAL
                next_cursor: null
        '400':
          description: Invalid filters or pagination cursor.
        '401':
          description: Invalid API key or missing user context.
        '403':
          description: >-
            Enterprise, rollout, CodeRabbit administrator, key type, or
            permission requirement not met.
        '410':
          description: Legacy organization API key.
        '429':
          description: Rate limit exceeded.
        '500':
          description: Internal server error.
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-coderabbitai-api-key
      description: >-
        API key for authentication. You can create an API key from the
        CodeRabbit dashboard.

````

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