Delete a role

DELETE/v1/directory/roles/{role_id}

Deletes a role and its assignments.

Permission: identity:DeleteRole. Changes need a sign-in that used a second factor.

Path parameters

Parameter Type Description
role_id string The role's ID.

Returns

204 No Content, with no body.

Errors

Besides the errors every call can return:

Status When
404 No such resource in your organization.
409 The role is managed, or it would leave your organization with no administrator.

Example

curl -X DELETE https://<company>.yotta.bot/v1/directory/roles/5a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d \
  -H "Authorization: Bearer $YOTTABOT_TOKEN"

With yottactl

yottactl org roles delete 5a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d