> ## 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 all users in the organization

> Retrieve all users in the organization with their seat assignment status and role information. Rate limited to 10 requests per 60 seconds per organization.

> [tab] CLI Tool
>
> ```bash
> coderabbit api request /users
> ```
>
> To install and sign in to the CLI, see [Call from the CLI](https://docs.coderabbit.ai/api/cli.md).

> [tab] MCP Server
>
> This operation isn't a tool on the [CodeRabbit MCP server](https://docs.coderabbit.ai/api/mcp.md). Call it over REST or from the CLI.


## OpenAPI

````yaml /openapi.json get /v1/users
openapi: 3.0.0
info:
  title: CodeRabbit API
  version: 1.0.0
  description: >-
    Read and manage CodeRabbit reviews, coding tasks, Verify, Triage, security
    findings, Knowledge Base, configuration, and users for your organization.
servers:
  - url: https://api.coderabbit.ai
    description: US region
  - url: https://api.eu.coderabbit.ai
    description: EU region
security:
  - ApiKeyAuth: []
tags:
  - name: Organizations and repositories
  - name: Pull requests and reviews
  - name: Coding Agent
  - name: Coding environments
  - name: Verify
  - name: Triage
  - name: Security
  - name: Knowledge Base
  - name: Automations
  - name: Reports
  - name: Configuration
  - name: Connections
  - name: Users and roles
  - name: Usage and metrics
paths:
  /v1/users:
    get:
      tags:
        - Users and roles
      summary: List all users in the organization
      description: >-
        Retrieve all users in the organization with their seat assignment status
        and role information. Rate limited to 10 requests per 60 seconds per
        organization.
      operationId: list-users
      parameters:
        - $ref: '#/components/parameters/WorkspaceOrgName'
        - in: query
          name: org_id
          required: false
          schema:
            type: string
          description: >-
            Workspace-scoped API tokens only. Supply this git-provider
            organization ID or org_name, never both, to list one organization's
            users. When both selectors are omitted, returns a workspace-wide,
            person-centric view across all organizations in the workspace. This
            org_id parameter is ignored for organization and self-hosted keys.
        - in: query
          name: seat_filter
          required: false
          schema:
            type: string
            enum:
              - all
              - assigned
              - unassigned
            default: all
          description: >-
            Filter users by seat assignment status. Options are "all" (default),
            "assigned" (users with seats), or "unassigned" (users without
            seats).
        - in: query
          name: role_filter
          required: false
          schema:
            type: string
            enum:
              - all
              - member
              - admin
            default: all
          description: >-
            Filter users by system role. Options are "all" (default), "member"
            (cr_member role only), or "admin" (cr_admin role only).
        - in: query
          name: role_id_filter
          required: false
          schema:
            type: string
          description: >-
            Filter users by an exact role ID. Use cr_admin, cr_member, or a
            custom role UUID.
        - in: query
          name: membership
          required: false
          schema:
            type: string
            enum:
              - org
              - non_org
              - all
            default: org
          description: >-
            Filter users by workspace-org membership. "org" (default) returns
            only members of a workspace org, hiding external contributors (e.g.
            authors of pull requests on public repositories); "non_org" returns
            only those external contributors; "all" returns everyone.
        - in: query
          name: linked
          required: false
          schema:
            type: boolean
          description: >-
            Workspace-wide SSO user rosters only; omit both org_id and org_name.
            When true, returns users with a non-null email and at least one
            active linked account. When false, returns users whose email is null
            or who have no active linked accounts. Supplying this parameter for
            an organization-scoped or non-SSO read returns 400.
        - in: query
          name: email
          required: false
          schema:
            type: string
            format: email
          description: >-
            Workspace-wide SSO rosters only (workspace token, omit both org_id
            and org_name). Exact case-insensitive member email match, with
            surrounding whitespace trimmed. Mutually exclusive with username.
            Applied before pagination and combined with seat_filter, linked, and
            membership; seat totals remain workspace-wide. Workspace reads do
            not apply role_filter or role_id_filter.
        - in: query
          name: username
          required: false
          schema:
            type: string
            minLength: 1
          description: >-
            Workspace-wide SSO rosters only (workspace token, omit both org_id
            and org_name). Exact case-insensitive linked username match, with
            surrounding whitespace trimmed, across all cloud providers and
            self-hosted instances. Only non-removed identities in active
            workspace subscriptions match. Returns each matching person once
            with all their linked accounts; multiple people may match. Mutually
            exclusive with email. Applied before pagination. Repeat the lookup
            parameters on subsequent pages.
        - in: query
          name: limit
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 100
          description: Maximum number of users to return per page.
        - in: query
          name: cursor
          required: false
          schema:
            type: string
          description: Pagination cursor from previous response's next_cursor field.
      responses:
        '200':
          description: Successfully retrieved list of users
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: Maximum requests allowed per time window (10)
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: Requests remaining in current window
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Unix timestamp when the rate limit resets
          content:
            application/json:
              schema:
                type: object
                required:
                  - seats_purchased
                  - seats_assigned
                  - seat_assignment_mode
                  - users
                  - next_cursor
                properties:
                  seats_purchased:
                    type: integer
                    description: Total number of seats purchased in the subscription
                    example: 50
                  seats_assigned:
                    type: integer
                    description: >-
                      Number of assigned seats. For SSO, this counts paid
                      canonical workspace members, deduplicated across provider
                      identities and excluding trial-only funding. It is
                      independent of organization, filters and pagination, and
                      can differ from the number of assigned identities in
                      users.
                    example: 30
                  seat_assignment_mode:
                    type: string
                    enum:
                      - automatic
                      - manual
                    description: The seat assignment mode for the organization
                    example: manual
                  users:
                    type: array
                    description: >-
                      Item shape depends on the token scope. Organization,
                      self-hosted, and org-selected workspace tokens (org_id or
                      org_name present) return the org-scoped object.
                      Workspace-scoped tokens with neither selector return the
                      workspace-wide, person-centric object.
                    items:
                      oneOf:
                        - type: object
                          title: >-
                            Org-scoped (organization, self-hosted, org-selected
                            workspace tokens)
                          required:
                            - user_id
                            - username
                            - seat_assigned
                            - role
                            - role_name
                            - role_type
                          properties:
                            user_id:
                              type: string
                              description: >-
                                The provider user ID (Git provider's user
                                identifier, e.g., GitHub user ID)
                              example: '121358802'
                            username:
                              type: string
                              nullable: true
                              description: >-
                                The provider username associated with user_id,
                                or null when the profile has not supplied one
                                yet.
                              example: janedoe
                            seat_assigned:
                              type: boolean
                              description: >-
                                Whether the user has an assigned seat. In SSO
                                workspaces, linked active members use their
                                workspace seat state; standalone provider
                                identities use their own seat state.
                              example: true
                            role:
                              type: string
                              description: >-
                                The user's role ID in the organization. Custom
                                roles return their UUID.
                              example: 6f1bb6c1-4766-4f09-9d0d-b998c33d2398
                            role_name:
                              type: string
                              description: Human-readable role name.
                              example: Security Reviewer
                            role_type:
                              type: string
                              enum:
                                - system
                                - custom
                              description: >-
                                Whether the role is a built-in system role or a
                                custom role.
                              example: custom
                        - type: object
                          title: >-
                            Workspace person-centric (workspace tokens, neither
                            org_id nor org_name)
                          required:
                            - cr_user_id
                            - seat_assigned
                            - role
                            - email
                            - workspace_role
                            - accounts
                          properties:
                            cr_user_id:
                              type: string
                              description: >-
                                The CodeRabbit user id (cr_users.id) for the
                                person within the workspace. Pass it back as the
                                seat member cr_user_id on POST /users/seats.
                                Distinct from the provider accounts[].user_id.
                              example: f1bb6c14-7664-4f09-9d0d-b998c33d2398
                            seat_assigned:
                              type: boolean
                              description: >-
                                Whether the person holds a workspace seat
                                (cr_users.is_seat_assigned).
                              example: true
                            role:
                              type: string
                              nullable: true
                              description: >-
                                Always null in the workspace-wide view;
                                per-membership roles are on each accounts[]
                                entry.
                              example: null
                            email:
                              type: string
                              format: email
                              nullable: true
                              description: The person's email address, if known.
                              example: jane@acme.com
                            workspace_role:
                              type: string
                              nullable: true
                              description: >-
                                The person's workspace-level role id (e.g.,
                                cr_admin, cr_member), or null.
                              example: cr_admin
                            accounts:
                              type: array
                              description: >-
                                One entry per subscription_user (seat-ledger)
                                identity linked to this person. Sourced from
                                subscription_user, not
                                cr_user_external_accounts, so a member with a
                                linked seat row but no external account still
                                lists it here.
                              items:
                                type: object
                                required:
                                  - provider
                                  - self_hosted
                                  - user_id
                                  - username
                                properties:
                                  provider:
                                    type: string
                                    description: >-
                                      Git provider for this account (e.g.,
                                      github, gitlab).
                                    example: github
                                  self_hosted:
                                    type: boolean
                                    description: >-
                                      Whether this account belongs to a
                                      self-hosted instance.
                                    example: false
                                  instance_url:
                                    type: string
                                    nullable: true
                                    description: Self-hosted instance URL, if applicable.
                                    example: null
                                  organization_id:
                                    type: string
                                    nullable: true
                                    description: >-
                                      Always null on this path (a
                                      subscription_user carries no
                                      org-membership context).
                                    example: null
                                  user_id:
                                    type: string
                                    description: The provider user ID for this account.
                                    example: '121358802'
                                  username:
                                    type: string
                                    nullable: true
                                    description: The provider username for this account.
                                    example: janedoe
                                  role:
                                    type: string
                                    nullable: true
                                    description: >-
                                      Always null on this path (a
                                      subscription_user carries no org role).
                                    example: null
                  next_cursor:
                    type: string
                    nullable: true
                    description: >-
                      Cursor for the next page of results, or null if no more
                      results
                    example: MTIxMzU4ODAy
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - INVALID_REQUEST
                        example: INVALID_REQUEST
                      message:
                        type: string
                        example: >-
                          Invalid seat_filter. Must be one of: "all",
                          "assigned", "unassigned" OR Invalid role_filter. Must
                          be one of: "all", "member", "admin"
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - UNAUTHORIZED
                        example: UNAUTHORIZED
                      message:
                        type: string
                        example: Invalid or inactive API key
        '403':
          description: Forbidden - Missing required permission or Enterprise plan
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - FORBIDDEN
                          - ENTERPRISE_PLAN_REQUIRED
                        example: FORBIDDEN
                      message:
                        type: string
                        example: User does not have the required permissions
        '410':
          description: >-
            Legacy API key - deprecated and no longer supported for user
            management
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - LEGACY_API_KEY
                        example: LEGACY_API_KEY
                      message:
                        type: string
                        example: >-
                          You are using a legacy API key. We are deprecating use
                          of legacy keys. Regenerate a new API key and retry the
                          request.
        '429':
          description: Rate limit exceeded (10 requests per 60 seconds per organization)
          headers:
            Retry-After:
              schema:
                type: integer
              description: Seconds to wait before retrying
            X-RateLimit-Limit:
              schema:
                type: integer
              description: Maximum requests allowed per time window
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: Always 0 when rate limited
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Unix timestamp when the rate limit resets
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - RATE_LIMIT_EXCEEDED
                        example: RATE_LIMIT_EXCEEDED
                      message:
                        type: string
                        example: Rate limit exceeded. Max 10 requests per 60 seconds
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - INTERNAL_ERROR
                        example: INTERNAL_ERROR
                      message:
                        type: string
                        example: Internal server error while listing users
      security:
        - ApiKeyAuth: []
components:
  parameters:
    WorkspaceOrgName:
      in: query
      name: org_name
      required: false
      schema:
        $ref: '#/components/schemas/PlatformOrgName'
      description: >-
        GitHub organization login for a workspace API key, matched
        case-insensitively within that workspace. Supply either org_name or
        org_id, never both; omit for an organization-bound key.
  schemas:
    PlatformOrgName:
      type: string
      pattern: ^[A-Za-z0-9][A-Za-z0-9-]{0,38}$
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-coderabbitai-api-key
      description: >-
        See [Authentication](/api/authentication) for the key types and where to
        create a key.

````

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