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

# Analytics - all workspaces

> Cumulative metrics across all accessible workspaces, with per-workspace breakdown

## All workspaces

Returns **`total`** (sum of published metrics across every platform post in workspaces you belong to) and **`workspaces`** (the same metrics broken down by `workspace_id`).

No query or path parameters.

<RequestExample>
  ```bash theme={null}
  curl -X GET "https://postsyncer.com/api/v1/analytics" \
    -H "Authorization: Bearer YOUR_API_TOKEN"
  ```
</RequestExample>

### Response

<ResponseField name="total" type="object">
  `comments`, `likes`, `shares`, `impressions`, `quotes`, `saves`, `engagement_rate`
</ResponseField>

<ResponseField name="workspaces" type="array">
  Each item: `workspace_id`, `total` (same metric keys). Sorted by `workspace_id`. Empty when you have no active workspaces or no platform posts.
</ResponseField>

<ResponseExample>
  ```json theme={null}
  {
    "total": {
      "comments": 42,
      "likes": 310,
      "shares": 28,
      "impressions": 12000,
      "quotes": 6,
      "saves": 55,
      "engagement_rate": 3.85
    },
    "workspaces": [
      {
        "workspace_id": 10,
        "total": {
          "comments": 12,
          "likes": 90,
          "shares": 8,
          "impressions": 4000,
          "quotes": 2,
          "saves": 15,
          "engagement_rate": 3.9
        }
      },
      {
        "workspace_id": 12,
        "total": {
          "comments": 30,
          "likes": 220,
          "shares": 20,
          "impressions": 8000,
          "quotes": 4,
          "saves": 40,
          "engagement_rate": 3.82
        }
      }
    ]
  }
  ```
</ResponseExample>

When there is no data, **`total`** still includes every key with numeric zeros (e.g. `"comments": 0`, …, `"engagement_rate": 0`) and **`workspaces`** is `[]`.

### Permissions

Requires the **`posts`** ability.

### Errors

`401` Unauthorized · `403` Forbidden

See also: [Analytics overview](/api-reference/analytics/overview).
