---
title: "Get a list of roles"
method: GET
path: "/api/admin/roles"
tags: ["Users"]
---

# Get a list of roles

`GET /api/admin/roles`

**Enterprise feature**

Get a list of project, root and custom roles for Role-Based Access Control

## Response `200`

rolesWithVersionSchema

- RolesWithVersionSchema — A collection of user roles
  - `version` integer, required — The version of this schema
  - `roles` RoleSchema[], required — A list of roles
    - `id` integer, required — The role id
    - `type` string, required — A role can either be a global root role (applies to all projects) or a project role
    - `name` string, required — The name of the role
    - `description` string — A more detailed description of the role and what use it's intended for
    - `project` string, nullable — What project the role belongs to

## Other responses

- `401` — Authorization information is missing or invalid. Provide a valid API token as the `authorization` header, e.g. `authorization:*.*.my-admin-token`.
- `403` — The provided user credentials are valid, but the user does not have the necessary permissions to perform this operation

---

[API](https://skmtc.net/unleash/apis/unleash-api-3.md) · [All operations](https://skmtc.net/unleash/apis/unleash-api-3/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/unleash/unleash-api-3/versions/b2c3116e633e/schema)
