Skip to main content
POST

Change User Roles

Requires Admin role. See Role-based access for details.
Self-hosted enterprise customers using workspace-wide API key can set org_id to ALL to apply the role change to every active organization on that instance. The write runs per organization and is not atomic, so a user is reported successful only if the change succeeds in every organization. Other key types and customers cannot use ALL and receive a 400 error.

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 change user roles

role
enum<string>
required

CodeRabbit user role to assign

Available options:
cr_admin,
cr_member
user_ids
string[]
required

Array of provider user IDs

Required array length: 1 - 500 elements
org_id
string

Optional organization scope for self-hosted instance API keys. Set to ALL (case-insensitive) to apply the role change across every active organization on the self-hosted instance in one request. Set to a provider organization ID to target one organization on the self-hosted instance. Omit org_id to preserve the prior single-organization behavior. The ALL sentinel is valid only with self-hosted instance API keys; organization, workspace, and legacy keys cannot use it.

Response

Operation completed (check status field for partial failures)

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