API referenceAnalytics
POST /posts/sync-external
Read the account's recent posts from the platform now (including posts published outside Postgale) and store today's metrics for each. With postId or url, returns that post ({found, post})
POST
BearerAuthheader
AuthorizationBearer <token>API key sk_...
application/json- body
accountId*stringConnected account id (must belong to the key's organization)
postId?stringPlatform post id to locate
url?stringPost URL to locate
{synced, posts} or {synced, found, post}
application/json- response
synced?found?booleanpost?posts?array<>curl -X POST 'https://example.com/api/v1/posts/sync-external' \ -H 'Content-Type: application/json' \ -d '{ "accountId": "string"}'Example Response
{ "synced": { "postsFound": 0, "postsSynced": 0, "skipped": true }, "found": true, "post": {}, "posts": [ {} ]}GET /analytics/delta GET
Feed of metric snapshots that changed since cursor, oldest change first. nextCursor is always present (also on an empty page): store it and send it next time; hasMore means call again now
GET /analytics/best-time GET
Best UTC weekday/hour slots from published posts with metrics, falling back to Instagram online followers or defaults