Workspace/Role

Delete a custom workspace role

Deletes a CUSTOM role of the workspace. If the role is assigned to users and `force` is not `true`, returns 409. Pass `?force=true` to unassign every user first, then delete the role.

DELETE
/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

Query Parameters

force?string

When true, also unassigns currently-assigned users.

Value in

  • "true"
  • "false"

Response Body

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/api/v2/workspaces/497f6eca-6276-4993-bfeb-53cbbbba6f08/roles/string?force=false"
{  "deleted": true}
{  "message": {    "error": "Your request was made with invalid credentials."  }}
{  "message": {    "error": "You are not allowed to perform this action."  }}
{  "message": {    "error": "Page not found"  }}
Empty