Skip to main content
POST
Delete a role

Restrictions

Usage

  • Built-in roles are synthetic and are never deleted; the call is a no-op for them.
  • While any member still holds the role, the default (is_force=false) call fails with error code ReferenceExist and the holders listed in data.refs. Set is_force=true to revoke the role from all holders and delete it in one call.
  • Every call is recorded in the account audit log. Don’t put secrets in request fields.

Authorizations

app_key
string
query
required

App key issued from the Flashduty console under Account → APP Keys. Required on every public API call. Keep it secret — it grants the same access as the owning account.

Body

application/json

Request to delete a role.

role_id
integer<uint64>
required

Role ID to delete. Get IDs from POST /role/list (built-in roles: 2=Admin, 6=Responder, 8=Viewer).

is_force
boolean
default:false

When false (default), deletion fails with a ReferenceExist error listing the members that still hold the role in data.refs. When true, the role is first revoked from all holders and then deleted.

Response

Success

Success response envelope. On every 2xx response, request_id identifies the call (also mirrored in the Flashcat-Request-Id header) and data holds the endpoint-specific payload. Failure responses use a different shape — see ErrorResponse.

request_id
string
required

Unique ID for this request. Mirrored in the Flashcat-Request-Id response header. Include it when reporting issues.

Example:

"01HK8XQE3Z7JM2NTFQ5YJ8P9R4"

data
object
required

Empty object returned on success for operations with no meaningful payload.