PostZen
Analytics

Synchronize external posts

POST
/v1/posts/sync-external

Fetches an account's latest posts published directly on its platform. Supplying url or postId searches for a specific post. Requests made within the per-account debounce window return cached results with synced.skipped set to true.

Authorization

bearerAuth
AuthorizationBearer <token>

PostZen API key.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

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": "j97kp4mw2xnv6r1t8c3zq5bs9fh0yg4d",    "url": "https://www.pinterest.com/pin/1234567890/"  }'
{  "synced": {    "postsFound": 0,    "postsSynced": 0,    "skipped": true  },  "found": true,  "post": {    "platform": "x",    "platformPostId": "string",    "platformPostUrl": "http://example.com",    "content": "string",    "publishedAt": "2019-08-24T14:15:22Z",    "mediaType": "string",    "mediaUrl": "http://example.com",    "thumbnailUrl": "http://example.com",    "mediaItems": [      {        "type": "string",        "url": "http://example.com",        "thumbnail": "http://example.com"      }    ],    "analytics": {      "impressions": 0,      "reach": 0,      "likes": 0,      "comments": 0,      "shares": 0,      "saves": 0,      "clicks": 0,      "views": 0,      "engagementRate": 0,      "lastUpdated": "2019-08-24T14:15:22Z"    }  },  "posts": [    {      "platform": "x",      "platformPostId": "string",      "platformPostUrl": "http://example.com",      "content": "string",      "publishedAt": "2019-08-24T14:15:22Z",      "mediaType": "string",      "mediaUrl": "http://example.com",      "thumbnailUrl": "http://example.com",      "mediaItems": [        {          "type": "string",          "url": "http://example.com",          "thumbnail": "http://example.com"        }      ],      "analytics": {        "impressions": 0,        "reach": 0,        "likes": 0,        "comments": 0,        "shares": 0,        "saves": 0,        "clicks": 0,        "views": 0,        "engagementRate": 0,        "lastUpdated": "2019-08-24T14:15:22Z"      }    }  ]}
{  "error": "string",  "type": "string",  "code": "string",  "param": "string",  "platform": "x",  "platformError": "string"}
{  "error": "Unauthorized"}
{  "error": "string",  "type": "string",  "code": "string",  "param": "string"}
{  "error": "API key requires read_write permission"}
{  "error": "Not found"}
{  "error": "rate_limited",  "retryAfter": 30}
{  "error": "Failed to create post"}