# getCompanyRoleDistribution

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

## Operation

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

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

## Request Parameters

| Name | In | Required | Schema | Description |
|---|---|---|---|---|
| tenantId | path | true | string | Tenant ID of the company |

## Request Body

None.

## Responses

| Status | Description | Schema refs |
|---|---|---|
| 200 | Org-wide role distribution counts { owner, admin, viewer } | #/components/schemas/RoleDistributionResponseDto |
| 400 | Invalid tenantId path parameter | #/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"
}
```
