Users

Update user roles

Changed on

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

Request

  • Base URL
    https://us.api.flexprice.io/v1
  • URL
    https://us.api.flexprice.io/v1/users/{id}/roles
  • Auth
    API key in header x-api-key

Path parameters

idstring required

User ID

Request body

rolesstring[]

Response

OK

emailstring

Empty for service accounts

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

Changes