Skip to content
Docs
Operation

List Roles

GET/roles
Get all the roles defined in your organisation. Roles are collections of permissions that you assign to users. Instead of giving each user individual permissions, you create roles like "Event Manager" or "Box Office Staff" and assign those. Returns each role with its name, description, and list of permissions.

When to use this

  • Building a role management interface
  • Populating a role selector when inviting users
  • Auditing what permissions each role has

Returns

Roles retrieved successfully

Errors

400
Bad Request - Invalid input
401
Unauthorized - Authentication required
403
Forbidden - Insufficient permissions
404
Not Found - Resource not found
500
Internal Server Error

Every error names its code and links to it. All error codes

Notes

Note
Some roles are system-defined and can't be modified (like "Owner" or "Admin").

Related

import { BackstageClient } from '@ticketlayer/backstage';const client = new BackstageClient({  organisationSlug: 'your-org',});client.setAccessToken('YOUR_ACCESS_TOKEN');// List rolesconst { roles, pagination } = await client.roles.list({  limit: 20,  page: 1,});for (const item of roles) {  console.log(`${item.id}: ${item.name || item.id}`);}console.log(`Page ${pagination.page} of ${pagination.totalPages}`);
Response 200
{
  "roles": [
    {
      "id": "rol_abc123",
      "organisationId": "org_xyz789",
      "name": "Event Manager",
      "description": "Manages events and related resources",
      "isDeleted": false,
      "createdAt": "2024-01-15T10:30:00Z",
      "updatedAt": "2024-01-20T14:45:00Z",
      "permissions": [
        "events.*",
        "venues.read:all",
        "orders.read"
      ],
      "isSystemRole": false
    }
  ]
}

Try it in test mode