Skip to main content

Admin Roles

An admin role is a named set of admin permissions. A user with an admin role (and without root admin) can use the Application API and the admin area, but only the endpoints whose Admin permission is in the role. Root administrators have every permission. These endpoints manage the roles. To assign a role to a user, set admin_role_id on the user. {role} is the role's numeric id.

The admin role object​

object is admin_role.

AttributeTypeDescription
idintegerRole ID.
namestringRole name.
descriptionstring or nullRole description.
colorstring or nullDisplay color. Free-form string, not validated.
permissionsarray of stringsPermission strings granted to the role. Empty array if none.

Admin roles have no includes.

List roles​

GET /api/application/users/roles

Admin permission: roles.read

Returns a paginated list of admin roles.

curl "https://panel.example.com/api/application/users/roles" \
-H "Authorization: Bearer $API_KEY" \
-H "Accept: application/json"

Query parameters​

ParameterTypeRequiredDescription
per_pageintegerNo1 to 100. Defaults to 20. See pagination.
pageintegerNoPage number.
filter[id]stringNoPartial match on the role ID.
filter[name]stringNoPartial match on the name.
sortstringNoid or name, optionally prefixed with -. See filtering and sorting.

Response​

200 OK

{
"object": "list",
"data": [
{
"object": "admin_role",
"attributes": {
"id": 2,
"name": "Support",
"description": "Front-line support staff",
"color": "#3b82f6",
"permissions": ["overview.read", "users.read", "servers.read", "tickets.read", "tickets.message"]
}
}
],
"meta": {
"pagination": {
"total": 1,
"count": 1,
"per_page": 20,
"current_page": 1,
"total_pages": 1,
"links": {}
}
}
}

List available permissions​

GET /api/application/users/roles/permissions

Admin permission: roles.read

Returns every permission group that can be assigned to a role, with descriptions. A permission string is the group name and a key joined by a dot, for example servers and read give servers.read.

Response​

200 OK

{
"object": "role_permissions",
"attributes": {
"permissions": {
"overview": {
"description": "Permissions to allow administrator to view the index page.",
"keys": {
"read": "Read the contents of the overview."
}
},
"settings": {
"description": "Permissions to allow changing basic admin settings.",
"keys": {
"read": "Read the panel settings.",
"update": "Update the panel settings."
}
}
}
}
}

The example is shortened. The full list is in the permission reference below.

Get a role​

GET /api/application/users/roles/{role}

Admin permission: roles.read

Returns a single admin role.

Response​

200 OK

{
"object": "admin_role",
"attributes": {
"id": 2,
"name": "Support",
"description": "Front-line support staff",
"color": "#3b82f6",
"permissions": ["overview.read", "users.read"]
}
}

Create a role​

POST /api/application/users/roles

Admin permission: roles.create

Creates an admin role. New roles are always stored with a sort_id of 99.

Request body​

JSON body.

FieldTypeRequiredDescription
namestringYesUp to 64 characters.
descriptionstring or nullNoUp to 255 characters.
colorstring or nullNoAny string.
permissionsarray of strings or nullNoPermission strings. Only strings listed in the permission reference are stored; anything else is silently dropped.

Logs the activity event admin:roles:create.

Response​

200 OK. The body is the created admin_role object.

Update a role​

PATCH /api/application/users/roles/{role}

Admin permission: roles.update

Updates an admin role. Only the fields you send are changed, but name is always required.

Request body​

JSON body.

FieldTypeRequiredDescription
namestringYesUp to 64 characters.
descriptionstring or nullNoUp to 255 characters.
colorstring or nullNoAny string.
permissionsarray of strings or nullNoReplaces the role's permissions. Only strings listed in the permission reference are stored; anything else is silently dropped.
sort_idnumberNoSort position.

Logs the activity event admin:roles:update.

Response​

200 OK. The body is the updated admin_role object.

Update a role's permissions​

PATCH /api/application/users/roles/{role}/permissions

Admin permission: roles.update

Replaces the role's permissions and nothing else. Only strings listed in the permission reference are kept; anything else is silently dropped.

Request body​

JSON body.

FieldTypeRequiredDescription
permissionsarray of strings or nullNoThe new permission list. If omitted or null, the role's permissions are cleared.

Logs the activity event admin:roles:update-permissions.

Response​

200 OK. The body is the updated admin_role object.

Delete a role​

DELETE /api/application/users/roles/{role}

Admin permission: roles.delete

Deletes an admin role. In the same transaction, every user with this role has admin_role_id set to null and root_admin set to false, so those users lose admin access.

Logs the activity event admin:roles:delete.

Response​

204 No Content

Permission reference​

Every admin permission defined in app/Models/AdminRole.php. The Permission column is the string that endpoints check and that you put in a role's permissions array. The descriptions are quoted from the Panel's permission list (the same text returned by List available permissions).

overview​

Permissions to allow administrator to view the index page.

PermissionDescription
overview.readRead the contents of the overview.

settings​

Permissions to allow changing basic admin settings.

PermissionDescription
settings.readRead the panel settings.
settings.updateUpdate the panel settings.

activity​

Permissions to allow admins to see activity logs.

PermissionDescription
activity.readView the admin activity logs.

api​

Permissions to configure Application API keys.

PermissionDescription
api.readView the existing Application API keys.
api.createCreate a new Application API key.
api.deleteDelete Application API keys.

auth​

Permissions to configure the Authentication module.

PermissionDescription
auth.readView the current authentication settings.
auth.createEnable authentication modules.
auth.updateUpdate authentication module settings.
auth.deleteDisable authentication modules.

billing​

Permissions to configure the Billing module.

PermissionDescription
billing.readRead basic billing information.
billing.ordersRead all user orders on the system.
billing.invoicesRead all generated invoices on the system.
billing.products-createCreate a billing product.
billing.products-updateUpdate a billing product.
billing.products-deleteDelete a billing product.
billing.categories-createCreate a billing category.
billing.categories-updateUpdate a billing category.
billing.categories-deleteDelete a billing category.
billing.exceptionsManage and resolve billing exceptions.
billing.updateUpdate billing settings.
billing.exportExport current billing configuration to JSON.
billing.importImport current billing configuration from JSON.
billing.delete-keysDelete Stripe API billing keys used for payment.
billing.discount-codesCreate, update and delete discount codes for checkout.

tickets​

Permissions to configure the Ticket module.

PermissionDescription
tickets.readView all existing tickets.
tickets.createCreate a new ticket.
tickets.updateUpdate an existing ticket.
tickets.deleteDelete an existing ticket.
tickets.messageSend a message in a ticket.

ai​

Permissions to configure the AI module.

PermissionDescription
ai.readView the Admin AI console.
ai.updateControl the AI settings.

webhooks​

Permissions to configure the Webhook system.

PermissionDescription
webhooks.readView all available webhooks.
webhooks.updateControl the webhook settings.

alerts​

Permissions to configure Alerts.

PermissionDescription
alerts.readView the alert configuration.
alerts.updateControl the alert settings.

theme​

Permissions to configure the panel theme.

PermissionDescription
theme.readView the current theme settings.
theme.updateAdjust the panel theme.

Permissions to configure external links.

PermissionDescription
links.readView the current links.
links.createCreate a new link.
links.updateUpdate an existing link.
links.deleteDelete an existing link.

databases​

Permissions to configure database hosts.

PermissionDescription
databases.readView the current database hosts.
databases.createCreate a new database host.
databases.updateUpdate an existing database host.
databases.deleteDelete an existing database host.

nodes​

Permissions to configure nodes.

PermissionDescription
nodes.readView the current nodes.
nodes.createCreate a new node.
nodes.updateUpdate an existing node.
nodes.deleteDelete an existing node.

servers​

Permissions to configure servers.

PermissionDescription
servers.readView the current servers.
servers.createCreate a new server.
servers.updateUpdate an existing server.
servers.deleteDelete an existing server.

server-presets​

Permissions to configure server presets.

PermissionDescription
server-presets.readView the current server presets.
server-presets.createCreate a new server preset.
server-presets.updateUpdate an existing server preset.
server-presets.deleteDelete an existing server preset.

users​

Permissions to configure users.

PermissionDescription
users.readView the current users.
users.createCreate a new user.
users.updateUpdate an existing user.
users.deleteDelete an existing user.

roles​

Permissions to configure admin roles.

PermissionDescription
roles.readView the current admin roles.
roles.createCreate a new admin role.
roles.updateUpdate an existing admin role.
roles.deleteDelete an existing admin role.

nests​

Permissions to configure nests.

PermissionDescription
nests.readView the current nests.
nests.createCreate a new nest.
nests.updateUpdate an existing nest.
nests.deleteDelete an existing nest.

eggs​

Permissions to configure eggs.

PermissionDescription
eggs.readView the current eggs.
eggs.createCreate a new egg.
eggs.updateUpdate an existing egg.
eggs.deleteDelete an existing egg.
eggs.importImport an egg to an existing nest via JSON.
eggs.exportExport an egg via JSON.

mounts​

Permissions to configure mounts.

PermissionDescription
mounts.readView the current mounts.
mounts.createCreate a new mount.
mounts.updateUpdate an existing mount.
mounts.deleteDelete an existing mount.