---
title: "Refresh post analytics"
method: POST
path: "/v1/analytics/refresh"
tags: ["Analytics"]
---

# Refresh post analytics

`POST /v1/analytics/refresh`

## Request

- Base URL: `https://getsocialclaw.com`
- URL: `https://getsocialclaw.com/v1/analytics/refresh`
- Auth: HTTP bearer

Fetches fresh provider analytics for a published post and stores a snapshot. Native stats are supported for Instagram, TikTok, YouTube, Reddit, X, Pinterest, and Snapchat; other providers return an unsupported snapshot with the metric fields null.

## Request body

- AnalyticsRefreshRequest: Requests a fresh analytics fetch for a published post.
  - `postId` string, required: Post id. Also accepted as post_id.
  - `window` string, nullable: Metric window, for example lifetime.
  - `metricWindow` string, nullable: Alias for window.

## Response `200`

Successful response.

- AnalyticsResponse: Analytics response. `latest` is the most recent snapshot (post/account scope); `snapshot` is the one just written by a refresh. Each snapshot has `status` ("ready" when metrics were fetched, "unsupported" when the provider has no public post-metrics API or the post could not be resolved), `supported`, an optional `message`, and a `metrics` object with impressions, reach, views, likes, comments, shares, saves, and clicks (fields the provider does not return are null).
  - `ok` unknown, required
  - `latest` object, nullable: Most recent stored snapshot for this scope, or null.
  - `snapshot` object, nullable: The snapshot written by a refresh call.
  - `history` object[], nullable: Prior snapshots, newest first.
  - `analytics` object, nullable
  - `metrics` object, nullable
  - `window` string, nullable: Metric window.

## Other responses

- `400`: Invalid request.
- `401`: Missing, invalid, or unauthorized credentials.
- `404`: Requested resource was not found.
- `422`: Request body or semantic validation failed.

---

[API](https://skmtc.dev/getsocialclaw/apis/socialclaw-api.md) · [All operations](https://skmtc.dev/getsocialclaw/apis/socialclaw-api/llms.txt) · [OpenAPI document](https://skmtc.dev/getsocialclaw/apis/socialclaw-api/revisions/a11a6a5b9bc6?raw)
