Skip to navigation

Social · Analytics · Get analytics for social media posts

View as Markdown
Retrieve analytics data for individual posts of a specific social media account within a date range.

Authentication

AuthorizationApi-Key

Header authentication of the form Api-Key <token>

OR
AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Query parameters

account_idintegerRequired
Social media account ID
date_fromdateRequired

Start date in format YYYY-MM-DD

date_todateRequired

End date in format YYYY-MM-DD

pageintegerOptional>=1Defaults to 1
Page number for pagination
per_pageintegerOptional1-100Defaults to 10

Number of posts per page (max 100). Use with all_posts_count and pages_count from the response to paginate through all results.

Response

Analytics data for posts
statusenum or integerOptional

Analytics availability for the requested account. Values are returned UPPERCASE by the API (the gateway does not normalize them). When not ENABLED or PROCESSING, the rest of the response will typically be empty/null and the agent should surface a reconnect/enable CTA instead of rendering a chart. When the social service rejects the request outright (e.g. the workspace does not own the account) it still answers HTTP 200 with its own error envelope: status is then an integer code and results[].message carries the reason — surface that message instead of analytics.

account_activebooleanOptional

false when the social account itself is disconnected and needs a fresh OAuth reconnect (independent of status). When false, surface a “Reconnect account” CTA before any analytics data.

all_posts_countintegerOptional
current_pageintegerOptional
pages_countintegerOptional
postslist of objects or nullOptional