Request analytics refresh

Marks matching published post analytics rows stale so the background analytics refresh worker fetches fresh platform metrics.
https://api.unipost.dev
POST/v1/analytics/refresh
Authorization
In header ยท Bearer <token>
Request Body

Authorization

AuthorizationBearer <token>In header
Workspace API key.

Request Body

platformOptionalstring
Optional platform filter such as instagram, threads, pinterest, or tiktok.
profile_idOptionalstring
Optional profile filter.
account_idOptionalstring
Optional connected social account filter.
post_idOptionalstring
Optional UniPost post filter.
fromOptionalstring
Start date as YYYY-MM-DD. Defaults to the last 30 days.
toOptionalstring
End date as YYYY-MM-DD. Inclusive by day.
limitOptionalnumber
Maximum rows to mark for refresh. Caps at 500.

Response Body

202
statusstring
Always "queued" when the refresh request is accepted.
matched_countnumber
Published delivery rows that matched the filters.
requested_countnumber
Rows marked stale so the analytics refresh worker picks them up.
processed_bystring
Currently "analytics_refresh_worker".
401
error.codestring
Usually "UNAUTHORIZED", "PLAN_FEATURE_NOT_AVAILABLE", or "VALIDATION_ERROR".
error.messagestring
Human-readable error message.
402
error.codestring
Usually "UNAUTHORIZED", "PLAN_FEATURE_NOT_AVAILABLE", or "VALIDATION_ERROR".
error.messagestring
Human-readable error message.
422
error.codestring
Usually "UNAUTHORIZED", "PLAN_FEATURE_NOT_AVAILABLE", or "VALIDATION_ERROR".
error.messagestring
Human-readable error message.