Create a custom role
curl --request POST \
--url https://api.coderabbit.ai/v1/roles \
--header 'Content-Type: application/json' \
--header 'x-coderabbitai-api-key: <api-key>' \
--data '
{
"name": "Security Reviewer",
"description": "<string>",
"is_default": false,
"duplicate_from": "<string>",
"permissions": [
{
"resource_id": "user_management"
}
]
}
'Create Role
Creates an Enterprise custom role. If is_default is true, the new role becomes the subscription default and the previous default is cleared.
POST
/
v1
/
roles
Create a custom role
curl --request POST \
--url https://api.coderabbit.ai/v1/roles \
--header 'Content-Type: application/json' \
--header 'x-coderabbitai-api-key: <api-key>' \
--data '
{
"name": "Security Reviewer",
"description": "<string>",
"is_default": false,
"duplicate_from": "<string>",
"permissions": [
{
"resource_id": "user_management"
}
]
}
'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.
Create Custom Role
Creates an Enterprise custom role. Ifis_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
API key for authentication. You can create an API key from the CodeRabbit dashboard.
Body
application/json
Response
201
Custom role created
Was this page helpful?
⌘I