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
/posts/sync-external

Authorization

BearerAuth
headerAuthorizationBearer <token>

API key sk_...

Request Body

application/json
  1. body
accountId*string

Connected account id (must belong to the key's organization)

postId?string

Platform post id to locate

url?string

Post URL to locate

Response Body

{synced, posts} or {synced, found, post}

application/json
  1. response
synced?
found?boolean
post?
posts?array<>
Example Request
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": [    {}  ]}