Workspace/Role

Update a custom workspace role

Updates `displayName` and/or `permissions` of a CUSTOM role of the workspace. System roles cannot be modified.

PATCH
/api/v2/workspaces/{id}/roles/{roleId}

Authorization

BearerAuthObject
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Workspace UUID

Formatuuid
roleId*string

auth_item.name of the custom role

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/api/v2/workspaces/497f6eca-6276-4993-bfeb-53cbbbba6f08/roles/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "wsr_67890abc",  "name": "Senior QA",  "isSystem": false,  "priority": 260,  "permissions": [    "SourceIndex"  ],  "usersCount": 2}
Empty
{  "message": {    "error": "Your request was made with invalid credentials."  }}
{  "message": {    "error": "You are not allowed to perform this action."  }}
{  "message": {    "error": "Page not found"  }}
{  "errors": {    "langBcp": "Language already exists"  }}