Delete a role
delete
https://api.flactrum.com/v1/roles/{role}
A role still assigned to users cannot be deleted; they would be left with no rights.
| Required scope | roles.write |
| Success status | 204 |
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| role * | path | string | ULID of the record. |
Examples
Recorded from the test suite — these are real requests and their real responses.
curl -X DELETE 'https://api.flactrum.com/v1/roles/01m43mzqy0ntafnza900bb9ra8' \
-H 'Authorization: Bearer flk_your_key:your_secret' \
-H 'Accept: application/json'
HTTP 204
(empty body)
curl -X DELETE 'https://api.flactrum.com/v1/roles/01m43mzr9bdqbr1rjqkyavn5vk' \
-H 'Authorization: Bearer flk_your_key:your_secret' \
-H 'Accept: application/json'
HTTP 409 · application/json
{
"error": {
"code": "conflict",
"message": "This role is assigned to 1 user(s). Move them to another role first.",
"details": {
"user_count": 1
}
}
}