v2

latestOpenAPI 3.0.32026-07-261513102.9 KB
Role Management

Create a 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.

post/v1/roles

Request body

org_idstring

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.

namestring required
descriptionstring
is_defaultboolean
duplicate_fromstring

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

Example request

{
  "name": "Security Reviewer",
  "permissions": [
    {
      "resource_id": "user_management"
    }
  ]
}

Response

Custom role created