Endpoint
Overview
Fetch fresh, real-time statistics directly from TikTok/Instagram API for all accounts in your organization (or a specific org_group). This endpoint creates new stat records in the database with the latest data for each account and all their posts. This is useful when you need up-to-date statistics for multiple accounts without waiting for the scheduled refresh cycle.How It Works
- Fetches all accounts in your organization (optionally filtered by org_group)
- For each account with username and type configured:
- Fetches account profile stats (followers, following) from the platform API
- Fetches stats for all posts associated with the account
- Creates an
account_statsrecord with aggregated post metrics - Creates individual
post_statsrecords for each post
- Returns aggregated results with success/error information for each account
Request Body
Optional. If provided, only refreshes accounts in this specific org_group
Response
Response object containing refresh results for all accounts
