Analytics

Refresh analytics account

Refreshes an owner-scoped account through Analytics v2. Comment collection is gated on three conditions: includeComments only runs when force is true, includePosts is not false, and the workspace holds the full analytics tier. The two you control are refusals, not silence — includeComments without force, or with includePosts false, fails with INVALID_FIELD for MCP callers and is reported for direct REST callers. The one you cannot control, the analytics tier, comes back on the response as applied.include_comments plus applied.include_comments_dropped_reason. The call can still return 200 with deduped: true and skippedReason: "recent_snapshot", which means nothing was refreshed. Check canRefreshAccountAnalytics first: a forced retry consumes the manual-refresh cooldown slot and the next one is rejected with 429. Refresh is blocked for revealed/detached, banned or inactive-Coverage accounts; permanently grandfathered accounts remain eligible.

post/analytics/accounts/{id}/refresh

Request

  • Base URL: https://app.tokportal.com/api/ext
  • URL: https://app.tokportal.com/api/ext/analytics/accounts/{id}/refresh
  • Auth: API key in header X-API-Key

Path parameters

idstring uuid required

Saved account ID.

Headers

X-TokPortal-Dry-Run'true' | '1' | 'yes'

Send true (or 1/yes) to SIMULATE this call instead of executing it. A dry run performs the full validation and pricing path of the real operation and stops before the first write: no credits are debited, no rows are created, no webhooks fire, and no operator ever sees it. The response has the same shape and status as the real call and adds dry_run: true, dry_run_notice, and — on credit-spending operations — credits_would_charge carrying the real price. Errors are identical to the real call, which is the point: this is how you learn what an operation will do before paying for it. Rate limits are consumed normally, a supplied Idempotency-Key is ignored rather than burned, and identifiers returned by a dry run are synthetic (see DRY_RUN_ID_IN_LIVE_REQUEST).

Request body

forceboolean

Bypass the recent-snapshot dedup. Without it the call can return 200 with deduped: true and skippedReason: "recent_snapshot", meaning nothing was refreshed. A forced refresh consumes the manual-refresh cooldown slot (6 h connected / 24 h public); check canRefreshAccountAnalytics first.

includePostsboolean
includeCommentsboolean

Only takes effect when force is true AND includePosts is not false AND the workspace holds the full analytics tier. The two conditions you control are enforced: sending it without force, or with includePosts false, fails with INVALID_FIELD for MCP callers and is reported for direct REST callers. The tier condition, which you cannot control, is reported on the response as applied.include_comments with applied.include_comments_dropped_reason and applied.analytics_tier. Read applied rather than assuming a 200 means comments were imported.

forcePostsboolean
bootstrapPostsboolean
postLimitinteger

Response

Refresh result.

object required

Changes

No recorded changes to this operation across all 1 revision of this API.