> ## Documentation Index
> Fetch the complete documentation index at: https://f82cc46-productmetrics.manicule.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.
> For every page in one file, fetch https://f82cc46-productmetrics.manicule.dev/docs/llms-full.txt (large).
> To search and read these docs as tools, connect the MCP server at https://f82cc46-productmetrics.manicule.dev/docs/api/mcp.
> Every agent surface: https://f82cc46-productmetrics.manicule.dev/docs/.well-known/llms-manifest.json

# List workspaces (/docs/api/account/companies-list)

<!-- agent-signals: reading_time_min: 1 · est_tokens: 678 · updated: 2026-11-16 -->
Related: [Create a checkout link](/docs/api/account/billing-create-checkout-link.md), [Create workspace](/docs/api/account/companies-create.md), [Send feedback](/docs/api/account/feedback-send.md), [Get the Google connect link](/docs/api/account/google-get-connect-link.md), [Invite teammates](/docs/api/account/invitations-send.md), [Complete onboarding](/docs/api/account/onboarding-complete.md)

> Lists the workspaces (companies) the signed-in person can open, with or without a Google Ads property: companyId, companyName, the person's role in it (admin, editor or viewer) and createdAt.

`GET https://prod-backend.productmetrics.io/api/public/v1/companies`

**Scope** `read` · **Access** Read only · **Operation id** `companies.list`

## Try it

`productmetrics` runs after `productmetrics login`; curl needs `PM_TOKEN` (see [Authentication](/docs/api/overview#authentication)).



**productmetrics CLI:**

```bash
productmetrics companies list --json
```

**curl:**

```bash
curl "https://prod-backend.productmetrics.io/api/public/v1/companies" \
  -H "Authorization: Bearer $PM_TOKEN"
```

## Response

API response (200):

```json
{
  "data": {
    "companies": [
      {
        "companyId": "2a7d9b3c-1e4f-4a5b-8c6d-7e8f9a0b1c2d",
        "companyName": "Example Store",
        "role": "admin",
        "createdAt": "2026-11-02T09:30:00.000Z"
      }
    ]
  },
  "request_id": "req_01JBY64048KR3WPYVQH7ZV5NRD"
}
```

**CLI output:** `productmetrics companies list --json` prints `{ "ok": true, "data": …, "request_id": "…" }` with the same `data`.

## Before you call

Read it before [`companies.create`](/docs/api/account/companies-create): a returning person usually already has one; pass its companyId to [`setup.get_status`](/docs/api/account/setup-get-status) as company_id.

## Errors

A failure answers with its HTTP status and `{ error: { code, message, details? }, request_id }`. Branch on `code` (stable, lower_snake); show `message` to the person. The CLI prints the same `error` with `"ok": false`.

```json
{
  "error": {
    "code": "insufficient_scope",
    "message": "This operation needs the read scope; connect again and allow it.",
    "details": {
      "required_scope": "read"
    }
  },
  "request_id": "req_01J0ZJMVGT0YK31BGC5VWCSXMH"
}
```

| Status | Code                 | When                                                                                                                      |
| ------ | -------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| 401    | `invalid_token`      | The token is missing, expired or revoked: sign in again (`productmetrics login`). The `WWW-Authenticate` header says why. |
| 403    | `insufficient_scope` | The token lacks the `read` scope (`details.required_scope`): sign in again and allow it.                                  |
| 429    | `rate_limited`       | More than 600 requests a minute for this person: wait the `Retry-After` seconds (60) and retry.                           |

[All Account and onboarding operations](/docs/api/account)
