latestOpenAPI 3.0.1AGPL-3.0raw.githubusercontent.com2026-08-21258508903.8 KB

d567e8585c2e

Users

Update user roles

Update the roles of a user account (not service accounts — their roles are fixed at creation). Restricted to super_admin; a caller cannot update their own roles. Blocked with a 400 if the user has any active (published, unexpired) API key in any environment, since a key's permissions are snapshotted at creation time and would otherwise silently keep running on the old roles; the error lists the active keys grouped by environment ID so the caller can prompt to expire them first, then retry.

put/users/{id}/roles

Path parameters

idstring required

User ID

Request body

rolesstring[]

Response

OK

emailstring

Empty for service accounts

idstring
metadataobject
namestring
rolesstring[]
type'user' | 'service_account'