> ## 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 - queue sync for post

> Queue background jobs to refresh analytics for a post’s published platform rows

## Queue analytics sync

Triggers the same logic as `Post::syncAnalytics()` in the app: for each **published** platform row that has `platform_post_id`, `post_id`, and `account_id`, a job is dispatched to fetch the latest insights from the network.

**Not immediate:** responses describe how many jobs were queued. Poll [`GET /analytics/posts/{post}`](/api-reference/analytics/post) (or the dashboard) after the queue workers finish.

### Eligibility

* If the **post owner** does not have an active, trialing, or grace-period subscription, the request still returns **200** with `skipped: true`, `jobs_dispatched: 0`, and `skip_reason: "post_owner_subscription_inactive"`.
* You must belong to the post’s workspace (same access rules as reading analytics).

### Request

<ParamField path="post" type="integer" required>
  Post id (same as in `/posts/{id}`).
</ParamField>

No body.

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

### Response

<ResponseField name="post_id" type="integer">
  Post id from the path
</ResponseField>

<ResponseField name="jobs_dispatched" type="integer">
  Number of insight fetch jobs queued (one per eligible published platform row)
</ResponseField>

<ResponseField name="skipped" type="boolean">
  `true` when no jobs were queued because of subscription rules on the post owner
</ResponseField>

<ResponseField name="skip_reason" type="string">
  `post_owner_subscription_inactive` when skipped; otherwise `null`
</ResponseField>

<ResponseExample>
  ```json theme={null}
  {
    "post_id": 743,
    "jobs_dispatched": 2,
    "skipped": false,
    "skip_reason": null
  }
  ```
</ResponseExample>

When the post owner’s subscription does not allow sync:

```json theme={null}
{
  "post_id": 743,
  "jobs_dispatched": 0,
  "skipped": true,
  "skip_reason": "post_owner_subscription_inactive"
}
```

### Permissions

Requires the **`posts`** ability.

### Errors

`401` · `403` · `404` if the post is missing or not in a workspace you can access

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