Get the analytics of an account
GET/:workspace/analytics/accounts/:account
Returns one type of analytics for a single account over a period.
Analytics are split into types, and each provider supports its own set: overview (followers and totals, each with its change against the previous period), engagement, content (the account's posts with their metrics, paginated), hashtags, insights (best day, time, post type and posting frequency, top post, engagement trend), audience, reach, video, competitors, search_terms and reviews. The response always lists the types the account supports in tabs; omit type to get the account's default one, which is overview for every provider today.
The shape of data depends on the provider and the type, and mirrors what the analytics page of the dashboard shows. Two conventions hold across all of them: a figure compared with the previous period is an object {value, change}, where change is the percentage difference or null when there is nothing to compare with; and a chart is a list of points, {date, value} for a time series (UTC days, or months as YYYY-MM) and {label, value} for a breakdown such as ages or countries. A chart holding several series is an object of such lists.
While an account is still importing its history after being connected, initial_sync.in_progress is true and the figures are incomplete.
Available to every workspace role, including VIEWER.
Request
Responses
- 200
- 401
- 403
- 404
- 422
The analytics of the account.
The bearer token is missing, malformed, unknown, or expired.
The token is valid, but the user it belongs to may not perform this action:
- they are not a member of the
{workspace}in the path; or - their workspace role is too low for this endpoint (write routes require Admin or Member); or
- for
/panelendpoints, they are not a platform administrator.
The host application that Mixpost is installed into can also deny access to Mixpost as a whole, which produces the same response.
The workspace or the account was not found. Returns {"message": "Workspace not found."} when the workspace UUID does not match, or {"message": "Account not found."} when no account in the workspace matches the UUID.
The query failed validation: an invalid period or date range, a type the account does not support (the message lists the supported ones), or an account whose provider has no analytics.