Analytics

Get performance overview

Cached day-by-day performance time series (impressions, engagements) for one account or the workspace.

GET/api/public/analytics/performance
cURLGET /api/public/analytics/performance
curl "https://postiv.ai/api/public/analytics/performance?accountId=all" \
  -H "Authorization: Bearer pk_postiv_..."
200Response
{
  "success": true,
  "performance": [
    {
      "date": "2026-07-18",
      "impressions": 1400,
      "engagements": 62
    },
    {
      "date": "2026-07-19",
      "impressions": 1610,
      "engagements": 74
    }
  ]
}

Authorization

Requires an organization API key with the analytics:read scope, sent as Authorization: Bearer or x-api-key.

Query parameters

accountIduuid|'all'required

Alias: account_id.

periodintdefault: 28

Trailing days, 1-365; ignored if start/end given.

startstring

YYYY-MM-DD, must pair with end.

endstring

YYYY-MM-DD, must pair with start.

Response

Day-by-day series, shape from lib/analytics/queries.getPerformanceOverview(ForAccounts).

performanceobject|array

Time-series of daily impressions/engagements.

Errors

400missing_account_id
400validation_error: start/end not paired
404analytics_account_not_found

Good to know

  • Default trailing window is 28 days here (vs. 30 for summary).