Skip to main content
DocsPlatformsAPI ReferenceAI & Integrations
Posts

Sync recent posts published outside PostPeer

Fetches at most the 50 most recent posts from one connected account and stores posts published outside PostPeer. Existing PostPeer posts are updated instead of duplicated. Provide url or postId to verify one post. Requests are debounced per account for 15 seconds. Supported accounts: Twitter, YouTube, Pinterest, LinkedIn organization pages, TikTok, Facebook, Instagram, Threads, and Google Business.

POST/v1/posts/sync-external

Authorization

accessKey
x-access-key<token>

In: header

Request Body

application/json

Provide at most one of url or postId.

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/posts/sync-external" \  -H "Content-Type: application/json" \  -d '{    "accountId": "string"  }'
{
  "success": true,
  "synced": {
    "postsFound": 0,
    "postsSynced": 0,
    "skipped": true
  },
  "found": true,
  "post": {
    "postId": "string",
    "origin": "postpeer",
    "isExternal": true,
    "platform": "twitter",
    "accountId": "string",
    "platformPostId": "string",
    "platformPostUrl": "string",
    "content": "string",
    "publishedAt": "2019-08-24T14:15:22Z",
    "mediaType": "image",
    "thumbnailUrl": "string",
    "analytics": {
      "impressions": 0,
      "reach": 0,
      "likes": 0,
      "comments": 0,
      "shares": 0,
      "saves": 0,
      "clicks": 0,
      "views": 0,
      "engagementRate": 0,
      "avgWatchTime": 0,
      "totalWatchTime": 0,
      "skipRate": 0
    }
  },
  "posts": [
    {
      "postId": "string",
      "origin": "postpeer",
      "isExternal": true,
      "platform": "twitter",
      "accountId": "string",
      "platformPostId": "string",
      "platformPostUrl": "string",
      "content": "string",
      "publishedAt": "2019-08-24T14:15:22Z",
      "mediaType": "image",
      "thumbnailUrl": "string",
      "analytics": {
        "impressions": 0,
        "reach": 0,
        "likes": 0,
        "comments": 0,
        "shares": 0,
        "saves": 0,
        "clicks": 0,
        "views": 0,
        "engagementRate": 0,
        "avgWatchTime": 0,
        "totalWatchTime": 0,
        "skipRate": 0
      }
    }
  ]
}
{
  "success": true,
  "message": "string"
}
{
  "success": true,
  "message": "string"
}
{
  "success": true,
  "message": "string"
}
{
  "success": true,
  "message": "string"
}
{
  "success": true,
  "message": "string"
}