Skip to content

Update a custom role

PATCH
/v1/roles/{roleId}
curl --request PATCH \
--url https://api.varman.io/v1/roles/rol_abc123 \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "name": "Compliance Manager", "permissions": { "control": [ "read", "update", "delete" ], "policy": [ "read", "update", "delete" ], "risk": [ "read", "update" ] }, "obligations": { "compliance": true } }'

Update a custom role in Varman. Create custom roles and resolve permission sets for organization-level access control.

roleId
required
string

Example

rol_abc123

Role ID

Media typeapplication/json
object
name

New name for the custom role

string
>= 2 characters <= 50 characters

Example

Compliance Manager
permissions

Updated permissions for the role. Keys are resource names, values are arrays of allowed actions.

object

Example

{
"control": [
"read",
"update",
"delete"
],
"policy": [
"read",
"update",
"delete"
],
"risk": [
"read",
"update"
]
}
obligations

Updated obligations for the role.

object
compliance

Whether the role must complete compliance tasks.

boolean

Example

false

Example

{
"compliance": true
}

Role updated successfully

Media typeapplication/json
object
id
string
name
string
permissions
object
isBuiltIn
boolean
createdAt
string format: date-time
updatedAt
string format: date-time

Example generated

{
"id": "example",
"name": "example",
"permissions": {},
"isBuiltIn": true,
"createdAt": "2026-04-15T12:00:00Z",
"updatedAt": "2026-04-15T12:00:00Z"
}

Invalid role data

Unauthorized

Forbidden - cannot grant permissions you do not have

Role not found

Role was modified by another request since it was read. Retry the update.