Re-aggregate campaign stats from prospect ground truth. Useful for reconciliation and manual refresh.
campaigns.stats from the ground truth of campaign_prospects statuses via the recalculate_campaign_stats RPC, stamps last_synced_at, and returns the fresh campaign row plus a prospects_by_status count map. Works for both LinkedIn and email campaigns. Request body is empty.
For email campaigns, also fires the checkEmailBounceRate guard in the background — best-effort, errors are logged and do not fail the request. If the rolling bounce rate crosses the guard’s threshold (≥ 5% with ≥ 100 sent), the bounce guard pauses the campaign on its own; the sync response still returns 200 with the updated stats reflecting the auto-pause.
campaigns.stats atomically through the update_prospect_with_stat RPC on every status transition, so the stored stats are already live. Call sync-stats only when you suspect drift — after a manual DB edit, after a crashed run, or for a periodic reconciliation.Side effect on email campaigns. The bounce-rate guard runs after re-aggregation. If your campaign has been silently stuck with high bounces, a sync call can be the event that triggers the auto-pause — plan for the campaign to possibly land in paused after this call.Related endpoints. For a live snapshot of the campaign without re-aggregating, prefer GET /api/campaigns/{id} — it’s cheaper and never mutates.Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Campaign UUID
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Stats re-aggregated. Response includes the fresh campaign and (when present) a prospect-status breakdown.
Fresh snapshot after re-aggregating campaign_prospects statuses via the recalculate_campaign_stats RPC.