Create or update a role
Roles & permissions
Create or update a role
Create a new custom role or update an existing one. Pass role_id to update.
POST
Create or update a role
Restrictions
| Aspect | Value |
|---|---|
| Rate limits | 1,000 requests/minute; 50 requests/second per account |
| Permissions | Roles Manage (organization) |
Usage
- Omit
role_id(or set to 0) to create; pass an existing ID to update. role_namemust be 1–39 characters and unique within the account.permission_idssets the full permission set for the role, replacing any previous assignment.- Every call is recorded in the account audit log. Don’t put secrets in request fields.
Authorizations
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
Parameters for creating or updating a custom role.
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.