Skip to main content
PATCH
Set User Admin Access Endpoint
Required permission: Admin (admin).
Admin access is membership in the Admin group, so this endpoint adds the user to that group or removes them from it.
This endpoint applies to Onyx v4.7 and later. It replaces PATCH /manage/set-user-role, which was removed with the role model in v4.7. For older versions, see Set User Role. To grant any other permission, add the user to a group that grants it.
Onyx rejects the request when it would lock you out of the admin panel or when the account cannot hold admin access:
  • You cannot remove yourself from the Admin group. Ask another admin to do it.
  • You cannot remove the last admin. Grant another user admin access first.
  • This endpoint cannot change admin access for service accounts, bot accounts, external permission accounts, or anonymous accounts. To grant an API key admin access, assign its service account to the Admin group.

Authorizations

Authorization
string
header
required

Authorization header with Bearer token

Body

application/json
user_email
string
required
is_admin
boolean
required

Response

Successful Response