## Workspaces

### GET /api/v2/workspaces
List workspaces
Returns a paginated list of workspaces for the authenticated organization.

Results can be filtered by workspace type and state, and ordered by name or timestamps.
Unknown filter keys are ignored. Applied filters are reflected in the response `meta.filters` object.

Only workspaces with `active` state can be used to manage workspace-related resources.

**Rate limit**: 10 requests/sec

**Parameters**

- `page` (query, integer) — Page number (1-indexed).
- `page_size` (query, integer) — Number of items per page.
- `filter[type]` (query, string) — Filter workspaces by type.
- `filter[state]` (query, string) — Filter workspaces by state.
- `sort` (query, string) — Field to sort by.
- `order` (query, string) — Sort direction.

**Responses**

- **200** — Paginated list of workspaces
```json
{
  "data": [
    {
      "id": 123,
      "name": "My Workspace",
      "type": "branded",
      "state": "active",
      "location": null,
      "inserted_at": "2024-04-12T15:23:45Z",
      "updated_at": "2024-06-01T09:17:33Z",
      "gsc_site_url": "https://example.com"
    }
  ],
  "meta": {
    "total": 156,
    "sort": "inserted_at",
    "filters": {
      "inserted_after": "2024-04-12T15:23:45Z",
      "state": "completed"
    },
    "order": "desc",
    "page_size": 25,
    "page": 1,
    "total_pages": 7
  }
}
```
- **400** — Validation error
```json
{
  "error": {
    "message": "Request validation failed",
    "reason": "validation_error",
    "details": [
      {
        "reason": "invalid",
        "field": "field_name"
      }
    ]
  }
}
```
- **401** — Unauthorized
```json
{
  "error": {
    "message": "Missing or invalid API key",
    "reason": "unauthorized",
    "details": []
  }
}
```
- **403** — Forbidden
```json
{
  "error": {
    "message": "Permission denied",
    "reason": "permission_denied",
    "details": []
  }
}
```
- **406** — Not acceptable
```json
{
  "error": {
    "message": "Requested response content type is not supported",
    "reason": "not_acceptable",
    "details": []
  }
}
```
- **429** — Rate limit exceeded
```json
{
  "error": {
    "message": "Rate limit exceeded",
    "reason": "rate_limit_exceeded",
    "details": [
      {
        "retry_after": 60
      }
    ]
  }
}
```

