super_admin manages the roles of any other user in the same organization, which is how you promote a member to write access or downgrade them to read-only. Role changes apply to user accounts only.
Service account roles are fixed when the account is created.
Roles for User Accounts
The
event_ingestor and event_reader roles are reserved for service accounts and cannot be assigned to a user account.Who Can Change Roles
Two rules govern every role change:- Only a
super_admincan change another user’s roles. - Nobody can change their own roles, including a
super_admin.
Expire API Keys First
An API key copies its owner’s roles at the moment it is created and never re-reads them. If a user’s roles changed while their keys stayed active, those keys would keep operating under the old roles. Flexprice rejects the role change instead of silently rewriting the keys. Expire the user’s active API keys, then change the role.Updating Roles
Send the complete role set you want the user to end up with. The list replaces their existing roles rather than adding to them.Request Fields
array
required
The complete set of roles the user should hold. Must contain at least one role.Available roles for user accounts:
super_admin- Every action on every resourceall_writer- Read and write on every resourceall_reader- Read on every resource
Response
Error Responses
Target Has Active API Keys
Status400, code validation_error. Delete the listed keys and retry.
active_api_keys object is keyed by environment ID. Each entry carries the environment’s display name and the keys held in it.
Caller Is Not a Super Admin
Status403, code permission_denied.
Changing Your Own Roles
Status403, code permission_denied. Ask another super_admin to make the change.
Target Is a Service Account
Status400, code validation_error.
Role Not Valid for a User Account
Status400, code validation_error. event_ingestor and event_reader belong to service accounts.
Best Practices
Run automation on service accounts, not user accounts
Give scripts, integrations, and scheduled jobs their own service account and use its API key. A workflow tied to user’s account stops working when their roles change or their account no longer exists.
Plan the key rotation before changing a roleChanging a role expires nothing on its own, but you must delete the user’s active keys to proceed. Know which services use those keys before you start.
Grant
all_reader for review-only accessMembers who only need to inspect billing data do not need write access.Related Resources
Available Roles
See all roles and what they permit →
Manage API Keys
Create and rotate API keys →

