---
title: "Get team custom roles"
method: GET
path: "/api/v2/teams/{teamKey}/roles"
tags: ["Teams"]
---

# Get team custom roles

`GET /api/v2/teams/{teamKey}/roles`

Fetch the custom roles that have been assigned to the team. To learn more, read [Managing team permissions](https://launchdarkly.com/docs/home/account/team-permissions).

## Path parameters

- `teamKey` string, string, required — The team key

## Query parameters

- `limit` integer — The number of roles to return in the response. Defaults to 20.
- `offset` integer — Where to start in the list. This is for use with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`.

## Response `200`

Team roles response

- TeamCustomRoles
  - `totalCount` integer — The number of custom roles assigned to this team
  - `items` TeamCustomRole[] — An array of the custom roles that have been assigned to this team
    - `key` string — The key of the custom role
    - `name` string — The name of the custom role
    - `projects` TeamProjects
      - `totalCount` integer
      - `items` ProjectSummary[] — Details on each project where team members have write privileges on at least one resource type (e.g. flags)
        - `_id` string, required — The ID of this project
        - `_links` object, required — The location and content type of related resources
        - `key` string, required — The project key
        - `name` string, required — The project name
    - `appliedOn` integer
  - `_links` object — The location and content type of related resources

## Other responses

- `400` — Invalid request
- `401` — Invalid access token
- `403` — Forbidden
- `404` — Invalid resource identifier
- `405` — Method not allowed
- `429` — Rate limited

---

[API](https://skmtc.dev/launchdarkly/apis/launchdarkly-rest-api.md) · [All operations](https://skmtc.dev/launchdarkly/apis/launchdarkly-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/launchdarkly/launchdarkly-rest-api/revisions/69c5c9aafe78/schema)
