Skip to main content
PUT
Update a custom role
🔒 Admin only. Requires administrator privileges — the authenticated principal (API key, embed JWT, or any bearer token) must belong to a user with the admin role. Updates the fields present in the body and leaves the rest alone. Sending policies replaces the role’s policies outright, so read the role first if you mean to add one rather than start over. Renaming to a name another role already holds answers 409. Built-in roles cannot be updated.

Authorizations

Authorization
string
header
required

Token authentication. Send Authorization: Bearer <YOUR_TOKEN>.

Path Parameters

roleId
number
required

Body

application/json

RoleUpdateBody

description
string | null

Omit to leave the description unchanged; null clears it.

Maximum string length: 255
name
string

Omit to leave the name unchanged. null is rejected.

Required string length: 1 - 255
policies
object[]

Replaces the role's policies outright when present — there is no per-policy merge. Omit it to leave them unchanged, or send [] to remove them all. null is rejected, so a partly-filled client object cannot strip a role's grants by accident.

Maximum array length: 200

Response

id
integer
required
name
string
required
policies
object[]
required
description
string | null