The engagement resource lets you force a fresh pull of likes, comments, shares, and impressions from every platform.
Engagement syncs automatically every 30 minutes via a cron, so you usually don't need to call this manually.
When to use it
- After importing posts from another scheduler — pull the current metrics
- For real-time dashboards — trigger an immediate sync before reading
- Recovering from platform API outages — re-fetch what was missed
Trigger a sync
typescript
const { enqueued } = await socifyr.engagement.backfill()
console.log(`Queued ${enqueued} posts for engagement sync`)backfill() enqueues a background job that walks every published post in the last 90 days and pulls fresh metrics. It returns immediately with the count of posts queued — actual sync time depends on the number of posts and per-platform rate limits.
Reading the synced metrics
After the job completes, the new values are visible via analytics.get() and analytics.getPost().