Get analytics
Metrics for published posts that BrainyShorts has synced from the platforms. Without post_id it returns {summary, posts}. The summary totals cover only the returned posts: at most limit (default 20, max 100), newest first, after the optional filters. It is not an account total. post_id here is the id of the synced platform post, not the id or post_id from GET /api/cli/posts; take it from this endpoint’s own posts[]. With post_id it returns that one post with a metrics object.
/api/cli/analyticsAuthorizationBearer token (ba_sk_...) · headerrequiredAPI key from /dashboard/api-keys. Keys expire after 365 days.
AuthorizationBearer token (ba_mcp_access_...) · headerrequiredThe OAuth access token the hosted MCP server issues (brainy:read for GET routes, brainy:write for everything else). One login serves MCP, the CLI and the desktop app. A token without the needed scope gets 403 Insufficient scope.
platformPlatformtiktokinstagramyoutubelinkedinxaccount_idstringpost_idstringId of a synced platform post, taken from posts[].post_id in this endpoint's overview. Not a scheduled-post id.
start_datestring<date-time>end_datestring<date-time>limitintegerPosts to include, newest first. Summary totals cover only these posts.
OK
summaryobjectTotals over the returned posts only, not the whole account
Show propertiesHide properties
total_postsintegertotalViewsintegertotalLikesintegertotalCommentsintegertotalSharesintegerpostsobject[]Show propertiesHide properties
objectpost_idstringId of the synced platform post. Pass it as post_id to this endpoint.
platform_post_idstringThe platform's own post id
social_account_idstring<uuid>platformPlatformtiktokinstagramyoutubelinkedinxtitlestringposted_timestring<date-time>platform_urlstring | nullviewsintegerlikesintegercommentsintegersharesintegersavesintegerpost_idstringId of the synced platform post. Pass it as post_id to this endpoint.
platform_post_idstringThe platform's own post id
social_account_idstring<uuid>platformPlatformtiktokinstagramyoutubelinkedinxtitlestringposted_timestring<date-time>platform_urlstring | nullmetricsobjectShow propertiesHide properties
viewsintegerlikesintegercommentsintegersharesintegersavesintegerInvalid platform or date
errorstringrequiredcodestringMissing, invalid, expired, or revoked API key
errorstringrequiredcodestringPost not found
errorstringrequiredcodestring