Docs
Live demo

Create a custom role

Define a permission set and assign it to organization members, groups or API tokens.

On this page

Before you start: Admin role, or a member-management role. You can only grant permissions you hold.

  1. Open Organizations and click New role under Roles.
  2. Enter Name (for example DBA) and optional Description.
  3. Tick Permissions (write/apply ticks view) and click Create role.
  4. Assign on top of a built-in role: - Member: row menu, Change role, pick Custom role, Save role. - Group: Give a role to a group under Roles → Given by groups. - Token: select during token creation.

Role created appears. Edit updates holders on the next request. Delete removes it everywhere and shows affected counts.

Through the API#

  1. Permissions: GET /organizations/{id}/roles
  2. Create (POST /organizations/{id}/roles):
    bash
    curl -X POST -H "Authorization: Bearer $PRINCIPAL_TOKEN" \
      -H "Content-Type: application/json" \
      https://principal.example.com/api/v2/organizations/$ORG/roles \
      -d '{"name":"DBA","permissions":["targets:read","targets:manage",
        "access:read","access:manage","access:apply"]}'
  3. Assign to member (PUT /organizations/{id}/memberships/{identity_id}) or group (PUT /organizations/{id}/group-roles/{group_id}), role required (400 if omitted):
    json
    {"role":"user","custom_role_id":"<role-id>"}

Unknown permission: 400. Duplicate name: 409. Max 50 custom roles per organization.

↑ ↓ to moveEnter to openEsc to close