# List roles

Source: https://business-api-docs.youhodler.com/docs/api/reference/roles/roles-list

## Request

**Request URL — GET**
```http
GET /roles
```

## Responses

**200 Operation succeeded**

Operation succeeded.

```json
{
  "items": [
    {
      "name": "Enterprise Admin",
      "description": "Full administrative access within an enterprise",
      "created_at": "2026-05-01T10:00:00Z",
      "etag": "W/\"a1b2c3d4\"",
      "id": "b8e2f1a0-4c3d-4e5f-9a1b-2c3d4e5f6a7b",
      "permissions": [
        "withdrawals.create",
        "deposits.read",
        "clients.read"
      ],
      "platform_managed": false,
      "resource": "role",
      "scope_ref": "enterprises/b8e2f1a0-4c3d-4e5f-9a1b-2c3d4e5f6a7b",
      "status": "active",
      "updated_at": "2026-05-01T10:00:00Z"
    }
  ],
  "next_page_token": null
}
```

**400 Invalid request payload**

Invalid request payload, query, or parameter shape.

```json
{
  "code": "invalid_request",
  "message": "The request is invalid."
}
```

**401 Caller is not authenticated or the bearer token is invalid**

Caller is not authenticated or the bearer token is invalid.

```json
{
  "code": "unauthorized",
  "message": "Authentication required."
}
```

**403 Caller lacks the required capability or permitted scope**

Caller lacks the required capability or permitted scope.

```json
{
  "code": "forbidden_capability_scope",
  "details": {
    "reason": "missing_capability"
  },
  "message": "The principal does not have the required capability."
}
```

**429 Request rate limit exceeded**

Request rate limit exceeded. Retry after the delay indicated in the `details.retry_after_ms` field.

```json
{
  "code": "rate_limited",
  "details": {
    "reason": "rate_limited",
    "retry_after_ms": 5000
  },
  "message": "Too many requests. Please retry after the indicated delay."
}
```

**502 Upstream service returned an unexpected error**

Upstream service returned an unexpected error.

```json
{
  "code": "upstream_error",
  "message": "An upstream service returned an unexpected error."
}
```

**503 Service is temporarily unavailable**

Service is temporarily unavailable; retry with backoff.

```json
{
  "code": "temporarily_unavailable",
  "details": {
    "reason": "idempotency_in_progress"
  },
  "message": "The service is temporarily unavailable. Please retry later."
}
```

**Related endpoints:**

- `POST` [Create role](/docs/api/reference/roles/roles-create) — Create a new role
- `GET` [Get role](/docs/api/reference/roles/roles-get) — Fetch a single role by ID
- `POST` [Grant role assignment](/docs/api/reference/role-assignments/role-assignments-create) — Assign a role to a principal
