PATCH /api/v1/roles/{id}
Requires roles.update permission. Only provided fields are updated. System roles (is_system: true) cannot be modified.
Path parameters
UUID of the role to update.
Request body
New human-readable display name for the role.
Replacement set of permission strings. Replaces the entire permissions list.
Response
The updated role.
Machine-readable identifier.
Always false for custom roles.
Updated list of permission strings.
Errors
| Status | When |
|---|
400 | Request body is invalid |
401 | Missing or invalid Bearer token |
403 | Caller lacks roles.update permission |
404 | Role not found |
409 | Attempted 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"]
}
}