# listCompanyRoles

Source: /openapi/thomas-federated.openapi.json

## Operation

| Method | URL |
|---|---|
| GET | https://api.thomas.co/v1/companies/{tenantId}/roles |

| Field | Value |
|---|---|
| operationId | listCompanyRoles |
| method | GET |
| server | https://api.thomas.co/v1 |
| path | /companies/{tenantId}/roles |
| tags | `Roles & Permissions` |
| summary | List colleague roles |
| badges | `{"name":"Admin"}`, `{"name":"Owner"}` |

## Request Parameters

| Name | In | Required | Schema | Description |
|---|---|---|---|---|
| tenantId | path | true | string | Tenant ID of the company |
| page | query | false | integer |  |
| pageSize | query | false | integer |  |
| search | query | false | string | search term to filter by name or email |
| role | query | false | array | Filter by one or more roles; omit for all roles (FR7) |
| sortBy | query | false | string | field to sort by |
| sortOrder | query | false | string | sort direction |

## Request Body

None.

## Responses

| Status | Description | Schema refs |
|---|---|---|
| 200 | Paginated list of colleague roles | #/components/schemas/RolesListResponseDto |
| 400 | Invalid tenantId or search term too short | #/components/schemas/ApiErrorResponseDto |
| 401 | Invalid or missing authentication token (AUTH_TOKEN_INVALID) | #/components/schemas/ApiErrorResponseDto |
| 403 | Insufficient role (admin/owner) or tenant mismatch (IDENTITY_TENANT_MISMATCH) | #/components/schemas/ApiErrorResponseDto |

## Artifact Examples

### Response 400 example

```json
{
  "statusCode": 400,
  "message": "Validation failed (uuid is expected)",
  "error": "HTTP_BAD_REQUEST"
}
```

### Response 401 example

```json
{
  "statusCode": 401,
  "message": "Invalid or missing authentication token",
  "error": "AUTH_TOKEN_INVALID"
}
```

### Response 403 example

```json
{
  "statusCode": 403,
  "message": "Insufficient role privileges",
  "error": "AUTH_INSUFFICIENT_ROLE"
}
```
