> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tuco.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# List Agency Workspaces

> List every workspace in your Tuco agency. Agency API key required — bearer-token auth, JSON response.

<Note>
  Returns the sub-account workspaces in your agency, newest first. Your agency's own
  hidden root workspace is never included.
</Note>

## Endpoint

* **Method**: `GET`
* **Path**: `/api/agency/subaccounts`
* **Auth**: `Authorization: Bearer tucoagency_xxxxxxxxxxxxx` ([agency key](/api-reference/agency-api-keys))

## Example request

```bash theme={null}
curl https://app.tuco.ai/api/agency/subaccounts \
  -H "Authorization: Bearer tucoagency_xxxxxxxxxxxxx"
```

## Success response (200)

```json theme={null}
{
  "agencyId": "user_3H08IRicrVUYLDZRyOh4jKRVwrx",
  "subAccounts": [
    {
      "clerkOrgId": "org_3KKJKupHJ8Y9I2NXVAga0c6ZqgT",
      "name": "Acme Roofing",
      "legalName": "Acme Roofing LLC",
      "agencyName": "Flowmentum",
      "subscriptionStatus": "active",
      "createdAt": "2026-10-06T15:24:15.223Z"
    }
  ]
}
```

Use `clerkOrgId` wherever another agency endpoint asks for a `workspaceId`.

## Error responses

| Status | Code | When |
| - | - | - |
| `401` | `UNAUTHORIZED` | Missing, unknown, revoked or expired key |
| `403` | `AGENCY_KEY_REQUIRED` | A workspace key (`tuco_…`) was used |
| `403` | `NOT_AN_AGENCY` | The account behind the key is not an agency |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.