Analytics
Get performance overview
Cached day-by-day performance time series (impressions, engagements) for one account or the workspace.
GET
/api/public/analytics/performancecURLGET /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'requiredAlias: account_id.
periodintdefault: 28Trailing days, 1-365; ignored if start/end given.
startstringYYYY-MM-DD, must pair with end.
endstringYYYY-MM-DD, must pair with start.
Response
Day-by-day series, shape from lib/analytics/queries.getPerformanceOverview(ForAccounts).
performanceobject|arrayTime-series of daily impressions/engagements.
Errors
| 400 | missing_account_id |
| 400 | validation_error: start/end not paired |
| 404 | analytics_account_not_found |
Good to know
- Default trailing window is 28 days here (vs. 30 for summary).