Create custom role

POST
/api/v2/roles

Create a new custom role

Request

This endpoint expects an object.
namestringRequired

A human-friendly name for the custom role

keystringRequired

The custom role key

policylist of objectsRequired

Resource statements for custom role

descriptionstringOptional

Description of custom role

basePermissionsstringOptional

Base permissions to use for this role. Only applicable to roles created prior to October 2024.

resourceCategorystringOptional

The category of resources this role is intended to manage. Can be organization, project, or any

Response

Custom role response

_idstring

The ID of the custom role

keystring

The key of the custom role

namestring

The name of the custom role

policylist of objects

An array of the policies that comprise this custom role

_accessobjectOptional

Details on the allowed and denied actions for this custom role

descriptionstringOptional

The description of the custom role

basePermissionsstringOptional

Base permissions to use for this role. Only applicable to roles created prior to October 2024.

resourceCategorystringOptional

The category of resources this role is intended to manage. Can be organization, project, or any. Once set, this field cannot be changed.

assignedToobjectOptional

The number of teams and members this role is assigned to

Errors

Built with