> ## 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 - by account

> Cumulative metrics for one social account, plus each platform post row

## By account

Returns **`total`** across all `platform_posts` for the account, and **`platform_posts`**: each publication row with `post_id`, `platform`, `status`, `post_url`, and `analytics`.

### Request

<ParamField path="account" type="integer" required>
  Social account id (same as in [list accounts](/api-reference/accounts/list)).
</ParamField>

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

### Response

<ResponseField name="account_id" type="integer">
  Account id from the path
</ResponseField>

<ResponseField name="total" type="object">
  Aggregated metrics for this account
</ResponseField>

<ResponseField name="platform_posts" type="array">
  One object per platform post row for this account, **newest first** (`platform_post_id` descending). Each item: `platform_post_id`, `post_id`, `platform`, `status`, `post_url`, `analytics` (same metric keys as `total` when published, or `{}`).
</ResponseField>

<ResponseExample>
  ```json theme={null}
  {
    "account_id": 136,
    "total": {
      "comments": 16,
      "likes": 84,
      "shares": 12,
      "impressions": 2500,
      "quotes": 4,
      "saves": 20,
      "engagement_rate": 4.25
    },
    "platform_posts": [
      {
        "platform_post_id": 501,
        "post_id": 743,
        "platform": "twitter",
        "status": "PUBLISHED",
        "post_url": "https://twitter.com/user/status/1234567890",
        "analytics": {
          "comments": 8,
          "likes": 42,
          "shares": 8,
          "impressions": 1250,
          "quotes": 2,
          "saves": 12,
          "engagement_rate": 4.4
        }
      },
      {
        "platform_post_id": 498,
        "post_id": 740,
        "platform": "twitter",
        "status": "SCHEDULED",
        "post_url": null,
        "analytics": {}
      }
    ]
  }
  ```
</ResponseExample>

With no rows, **`platform_posts`** is `[]` and **`total`** uses zeros for every metric (including `engagement_rate`).

### Permissions

Requires the **`posts`** ability. The account must belong to a workspace you can access.

### Errors

`401` · `403` · `404` if the account is missing or not accessible

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