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

# Get Analytics Refresh

> Check refresh status for an analytics refresh request

Use this endpoint to poll refresh progress after triggering
`POST /analytics/targets/{id}/refresh`.

## Path Parameters

<ParamField path="id" type="string" required>
  Refresh ID returned by the refresh endpoint.
</ParamField>

## Response

Returns the scoped refresh status payload from `social_analytics_refreshes`.

<ResponseField name="id" type="string">
  Refresh ID.
</ResponseField>

<ResponseField name="target_id" type="string">
  Analytics target ID.
</ResponseField>

<ResponseField name="status" type="string">
  Current refresh status (`pending`, `processing`, `completed`, `failed`).
</ResponseField>

<ResponseField name="workspace_id" type="string | null">
  Workspace scope for refresh billing/context.
</ResponseField>

<ResponseField name="credits_used" type="number">
  Credits charged for this refresh (`0` when free).
</ResponseField>

<ResponseField name="free_refresh_used" type="boolean">
  Whether the free refresh window was used.
</ResponseField>

<ResponseField name="started_at" type="string">
  Refresh start timestamp.
</ResponseField>

<ResponseField name="completed_at" type="string | null">
  Completion timestamp if finished.
</ResponseField>

<ResponseField name="error" type="string | null">
  Error message when status is `failed`.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url https://www.genviral.io/api/partner/v1/analytics/refreshes/fd8f615f-971e-4f9f-85dc-f8e55fb0a413 \
    --header 'Authorization: Bearer <token>'
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "ok": true,
    "code": 200,
    "message": "Analytics refresh status retrieved",
    "data": {
      "id": "fd8f615f-971e-4f9f-85dc-f8e55fb0a413",
      "target_id": "e7a7f417-56db-4320-9e9a-fd6fdabda09d",
      "status": "completed",
      "workspace_id": "4cb5d3fd-8c8f-4ed7-a17c-4ffb52c7e6ac",
      "credits_used": 1,
      "free_refresh_used": false,
      "started_at": "2026-02-14T16:05:11.025Z",
      "completed_at": "2026-02-14T16:05:45.120Z",
      "error": null
    }
  }
  ```
</ResponseExample>

## Error Responses

* `400 missing_refresh_id` - missing path parameter
* `404 refresh_not_found` - refresh ID not visible in authenticated key scope
* `401`/`403` - authentication failed or key lacks required scope access
* `500` - unexpected database lookup error

All error responses from analytics endpoints include an `error_code` field.
