Analytics

Get performance overview

Cached day-by-day performance time series (impressions, engagements) for one account or the workspace. LinkedIn numbers come from imports, X numbers from the periodic X sync (never a live X read).

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": [
    {
      "key": "impressions",
      "label": "Impressions",
      "value": 48210,
      "previous": 41800,
      "delta": 15.3,
      "series": [
        {
          "date": "2026-07-18",
          "value": 1400
        },
        {
          "date": "2026-07-19",
          "value": 1610
        }
      ],
      "seriesAvailable": true,
      "seriesLabel": null,
      "note": null
    }
  ]
}

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. One LinkedIn profile/page or X account from list-analytics-accounts. 'all' answers per channel and never sums LinkedIn and X together.

channelstring

Narrows accountId 'all' to one channel. With a specific accountId it must match that account's channel (400 channel_mismatch).

One of:linkedinx
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

One list of metrics for an account or a single channel; accountId 'all' with both channels returns { platform: 'all', channels: { linkedin: [...], x: [...] } }.

performancearray|object

Metrics, each { key, label, value, previous, delta, series: [{ date, value }], seriesAvailable, seriesLabel, note }. X series are by publish day, not by the day engagement happened, and its followers metric is unavailable. For an X account the first metric's note explains empty or paused tracking.

Errors

400missing_account_id
400validation_error: start/end not paired
400invalid_channel / channel_mismatch: channel is not linkedin or x, or contradicts the channel of accountId
404analytics_account_not_found

Good to know

  • Default trailing window is 28 days here (vs. 30 for summary). X has no account-level daily series, so X values are summed by the day each post was published.