Update custom role

Update a single custom role. Updating a custom role uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) or [JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) representation of the desired changes. To learn more, read [Updates](https://launchdarkly.com/docs/api#updates).<br/><br/>To add an element to the `policy` array, set the `path` to `/policy` and then append `/<array index>`. Use `/0` to add to the beginning of the array. Use `/-` to add to the end of the array.

Authentication

Authorizationstring
API Key authentication via header

Path parameters

customRoleKeystringRequiredformat: "string"
The custom role key

Request

This endpoint expects an object.
patchlist of objectsRequired
A JSON patch representation of the change to make
commentstringOptional
Optional comment

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
_accessobject
Details on the allowed and denied actions for this custom role
descriptionstring
The description of the custom role
basePermissionsstring

Base permissions to use for this role. Defaults to no_access (older roles defaulted to reader). Recommended to set this to no_access in all cases.

resourceCategorystring

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

assignedToobject
The number of teams and members this role is assigned to
_presetBundleVersioninteger
If created from a preset, the preset bundle version
_presetStatementslist of objects

If created from a preset, the read-only statements copied from the preset

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error
409
Conflict Error
429
Too Many Requests Error