Skip to main content
POST
Create a custom instance role

Authorizations

Authorization
string
header
required

API key or session token (Bearer)

Body

application/json
name
string
required

Lowercase letters, digits and hyphens, starting with a letter. admin and user are reserved.

Pattern: ^[a-z][a-z0-9-]{1,31}$
Example:

"support"

permissions
enum<string>[]
required

Instance permissions the role grants. roles:manage belongs to the built-in admin role only.

Maximum array length: 30
Available options:
users:read,
users:create,
users:update,
users:disable,
users:delete,
users:credentials,
users:sessions,
users:api_keys,
workspaces:read,
workspaces:manage,
workspaces:archive,
workspaces:delete,
audit:read,
system:read,
instance:settings

Response

The new role

id
string
required
name
string
required
permissions
enum<string>[]
required
Available options:
users:read,
users:create,
users:update,
users:disable,
users:delete,
users:credentials,
users:sessions,
users:api_keys,
workspaces:read,
workspaces:manage,
workspaces:archive,
workspaces:delete,
audit:read,
system:read,
instance:settings
userCount
integer
required

Users who currently have this role.

createdAt
string<date-time>
required
updatedAt
string<date-time>
required