Skip to main content
POST
Create a custom role

Create Custom Role

Creates an Enterprise custom role. If is_default is true, the new role becomes the subscription default and the previous default is cleared. You can either specify individual permissions or use duplicate_from to copy permissions from an existing role. When permissions are omitted and duplicate_from is not specified, permissions default to the cr_member role.
Requires Admin role. See Role-based access for details.

Authorizations

x-coderabbitai-api-key
string
header
required

API key for authentication. You can create an API key from the CodeRabbit dashboard.

Body

application/json
name
string
required
Example:

"Security Reviewer"

org_id
string

Required when authenticating with a workspace-scoped API token: the git-provider organization id to target within the token's workspace. Ignored for organization and self-hosted keys.

description
string
is_default
boolean
default:false
duplicate_from
string

Role ID to copy permissions from. Defaults to cr_member when permissions are omitted.

permissions
object[]

Response

201

Custom role created