---
title: "Refresh engagement metrics for recently published posts"
method: POST
path: "/api/v1/jobs/refresh-analytics"
tags: ["jobs"]
---

# Refresh engagement metrics for recently published posts

`POST /api/v1/jobs/refresh-analytics`

## Request

- Base URL: `https://api.cadencz.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.cadencz.com/api/v1/jobs/refresh-analytics`
- Auth: none declared

Cloudflare Cron callback. **Schedule hourly (`15 * * * *`)**, not daily.

The tick is hourly but each platform decides for itself whether it is due, based on what its API costs: free, generously rate-limited reads (Bluesky, Mastodon, Reddit, Threads, Facebook, dev.to, LinkedIn) refresh every hour, while X — whose tweet lookup requires a paid tier with a monthly read quota — refreshes once a day. Running this hourly is what lets one cron serve both cadences; running it daily would silently downgrade every platform to daily.

Only posts Cadencz published, and only the last 30 days, are read. A failure on one platform or channel never stops the rest — the response reports each outcome separately.

Authenticates with `WORKER_SECRET`.

## Response `200`

Successful Response

- RefreshAnalyticsJobResponse
  - `status` 'ok', required
  - `workspaces` integer, required
  - `refreshed` integer, required
  - `failed_platforms` integer, required
  - `workspaces_detail` RefreshAnalyticsWorkspaceResult[]
    - `workspace_id` string, required
    - `status` 'ok' | 'partial' | 'failed' | 'empty', required
    - `refreshed` integer, required
    - `platforms` RefreshAnalyticsPlatformResult[]
      - `platform` string, required
      - `status` 'ok' | 'partial' | 'failed' | 'skipped' | 'unsupported', required
      - `posts` integer, required
      - `refreshed` integer, required
      - `detail` string, nullable

## Other responses

- `401`: Missing or invalid worker secret.
- `503`: Required infrastructure or provider config is unavailable.

---

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