Skip to main content
POST

Manage Seats

Requires Admin role. See Role-based access for details.

Request format by API key type

The request body schema depends on the type of API key you authenticate with:
Workspace API keys do not accept the action + user_ids format — sending it fails with INVALID_REQUEST: Invalid input: expected array, received undefined. Use the members format instead, where each entry declares its desired seat state with seat_assigned.
Each member entry is identified by email or cr_user_id (the user_id returned by GET /v1/users) — at least one is required, and cr_user_id takes precedence when both are provided. Use cr_user_id to address members who have no email; unknown IDs fail that entry with USER_NOT_FOUND in the response’s failed array.

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

Your CodeRabbit API key

Body

application/json

Request to manage user seats with an organization or self-hosted instance API key. Users are addressed by provider user ID.

action
enum<string>
required

Action to perform

Available options:
assign,
unassign
user_ids
string[]
required

Array of provider user IDs

Required array length: 1 - 500 elements

Response

Operation completed (check status field for partial failures). The succeeded and failed entries echo the identifiers used in the request: provider user IDs for organization and self-hosted instance keys; for workspace keys, whichever identifier each member supplied (cr_user_id when provided, otherwise email).

Response for bulk operations with partial success model

status
enum<string>
required

Operation status: 'success' if all succeeded, 'partial_success' if some succeeded, 'failure' if all failed

Available options:
success,
partial_success,
failure
succeeded
string[]
required

Array of user IDs that were successfully processed

failed
object[]
required

Array of failures with error details