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

29f14678f58f

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'