Skip to main content
PATCH
/
v1
/
roles
/
{roleId}
Update a custom role
curl --request PATCH \
  --url https://api.coderabbit.ai/v1/roles/{roleId} \
  --header 'Content-Type: application/json' \
  --header 'x-coderabbitai-api-key: <api-key>' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "is_default": true,
  "permissions": [
    {
      "resource_id": "<string>"
    }
  ]
}
'

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.

Update Custom Role

Updates custom role metadata, permissions, or default status. System roles are immutable. When updating is_default: omitting it preserves the current default status, true sets this role as default (clearing any previous default), and false unsets this role as default.
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.

Path Parameters

roleId
string
required

Body

application/json
name
string
description
string | null
is_default
boolean
permissions
object[]

Response

200

Custom role updated