---
title: "List all roles"
method: GET
path: "/api/roles"
tags: ["Roles & Permissions"]
---

# List all roles

`GET /api/roles`

## Request

- Base URL: `https://api.sponsorunited.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.sponsorunited.com/api/roles`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/sponsorunited/apis/sponsorunited-api/docs/api/roles/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns all roles with their permissions, filtered by the current user's role level

## Response `200`

All Roles with their permissions.

- RoleIndexResource
  - `roles` object[]
    - `id` integer
    - `name` string
    - `display_name` string
    - `description` string
    - `created_at` string, date-time
    - `updated_at` string, date-time
    - `permissions` PermissionsGroupedByLabel
      - `Label Name` Permission[]: The name of the label under which several permissions are grouped.
        - `id` integer
        - `name` string
        - `display_name` string
        - `description` string
        - `created_at` string, date-time
        - `updated_at` string, date-time
  - `all_permissions` PermissionsGroupedByLabel
    - `Label Name` Permission[]: The name of the label under which several permissions are grouped.
      - `id` integer
      - `name` string
      - `display_name` string
      - `description` string
      - `created_at` string, date-time
      - `updated_at` string, date-time

---

[API](https://skmtc.dev/sponsorunited/apis/sponsorunited-api.md) - [All operations](https://skmtc.dev/sponsorunited/apis/sponsorunited-api/llms.txt) - [OpenAPI document](https://skmtc.dev/sponsorunited/apis/sponsorunited-api/revisions/cbf1ca5bff8f?raw)
