- Docs
- Api%2Freference%2Forganizations%2FDeleteRole
Delete a role
Delete a role. An unassigned role can be deleted freely. A role still assigned to a member cannot be deleted; move every member to another role first. Requires the `organizations.roles.delete` permission.
The access token returned after a successful sign-in, sent as
Authorization: Bearer <access_token>.
It identifies the person and the organization they are working in, and
it lasts about fifteen minutes. When it runs out, use their refresh
token at POST /auth/refresh-token instead of asking them to sign in
again.
In: header
Path Parameters
Identifier of the organization. Each endpoint states whether it must be the caller's active organization or may be used without authentication.
Identifier of the role.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X DELETE "https://api.dual.network/organizations/665f1c2d4b1a2c3d4e5f6aa0/roles/665f1c2d4b1a2c3d4e5f6ab0"{}{
"code": 3,
"message": "role is assigned to members and can't be deleted"
}{
"code": 16,
"message": "no auth provided"
}{
"code": 5,
"message": "object not found"
}{
"code": 13,
"message": "internal error"
}