---
title: "List roles"
method: GET
path: "/zones/{zoneId}/roles"
tags: ["Zone Roles"]
---

# List roles

`GET /zones/{zoneId}/roles`

## Request

- Base URL: `https://docs.keycard.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://docs.keycard.ai/zones/{zoneId}/roles`
- Auth: one of:
  - HTTP bearer
  - OAuth 2
    - Client credentials
    - Token URL: `/service-account-token`

Returns the roles defined in the specified zone, cursor-paginated. Ordered by identifier.

## Path parameters

- `zoneId` string, required

## Query parameters

- `identifier` string
- `after` string
- `before` string
- `limit` integer
- `expand[]` union
  - 'total_count'
  - string[]

## Response `200`

Default Response

- object
  - `items` IamRole[], required
    - `id` string, required: Unique identifier of the role
    - `zone_id` string, required: Zone this role belongs to
    - `identifier` string, required: Role identifier: a lowercase slug (letters and digits separated by single hyphens or underscores), unique per owner type within a zone. Role identifiers surface in policy evaluation, so the slug restriction keeps them unambiguous in policy text.
    - `description` string, nullable: Human-readable description
    - `owner_type` 'platform' | 'customer', required: Who owns this role. Platform-owned roles are managed by Keycard and cannot be modified or deleted via the API; customer-owned roles are user-created.
    - `created_at` string, date-time, required: Entity creation timestamp
    - `updated_at` string, date-time, required: Entity update timestamp
  - `pagination` IamPagination, required: Cursor-based pagination metadata
    - `after_cursor` string, required: An opaque cursor used for paginating through a list of results
    - `before_cursor` string, required: An opaque cursor used for paginating through a list of results
    - `total_count` integer: Total number of items matching the query. Only included when expand[]=total_count is requested.

## Other responses

- `default`: Error response

## Changes

- **2026-08-26** `d65d51379d93`: 1 info
  - the `items/items/identifier` response's property pattern `^[a-z0-9]+(?:[-_][a-z0-9]+)*$` was added for the status `200`
- **2026-06-09** `7e0e4fa2e16f`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/keycardai/apis/keycard-ai-keycard-api/changes/zones/:zoneId/roles/get.md)

---

[API](https://skmtc.dev/keycardai/apis/keycard-ai-keycard-api.md) - [All operations](https://skmtc.dev/keycardai/apis/keycard-ai-keycard-api/llms.txt) - [OpenAPI document](https://skmtc.dev/keycardai/apis/keycard-ai-keycard-api/revisions/0dee67e0a73a?raw)
