v2

latestOpenAPI 3.0.32026-07-261513102.9 KB

Roles

Bulk change roles for up to 500 users. Returns partial success with details of which users succeeded or failed.

post/v1/users/roles

Headers

x-coderabbitai-api-keystring required

Your CodeRabbit API key

Request body

role'cr_admin' | 'cr_member' required

CodeRabbit user role to assign

user_idsstring[] required

Array of provider user IDs

org_idstring

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)

status'success' | 'partial_success' | 'failure' required

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

succeededstring[] required

Array of user IDs that were successfully processed