Skip to main content
PATCH /api/v1/roles/{id} Requires roles.update permission. Only provided fields are updated. System roles (is_system: true) cannot be modified.

Path parameters

id
string
required
UUID of the role to update.

Request body

name
string
New human-readable display name for the role.
permissions
string[]
Replacement set of permission strings. Replaces the entire permissions list.

Response

role
object
required
The updated role.

Errors

StatusWhen
400Request body is invalid
401Missing or invalid Bearer token
403Caller lacks roles.update permission
404Role not found
409Attempted to modify a system role

Example

curl -X PATCH http://localhost:8080/api/v1/roles/r2b2c3d4-e5f6-7890-abcd-ef1234567890 \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Release Lead",
    "permissions": ["flags.read", "flags.write", "rules.read", "rules.write", "environments.read"]
  }'
{
  "role": {
    "id": "r2b2c3d4-e5f6-7890-abcd-ef1234567890",
    "key": "release_manager",
    "name": "Release Lead",
    "is_system": false,
    "permissions": ["flags.read", "flags.write", "rules.read", "rules.write", "environments.read"]
  }
}

Build docs developers (and LLMs) love