Posts

Sync Account Posts

Finds posts the account published on the platform, outside Onepostly, and adds them to your posts with source external. Send url or platformPostId to find one post, or neither to sync the account's 20 most recent posts.

POST
/v1/accounts/{id}/sync

Authorization

Bearer
headerAuthorizationBearer <op_>

Workspace API key, sent as Authorization: Bearer op_... Keys are created in the dashboard.

Path Parameters

id*string
Length1 <= length

Header Parameters

Idempotency-Key?string

A unique key, such as a UUID, that makes retrying this request safe. A repeat with the same key and body within 24 hours returns the first response instead of acting again. A 429 or 5xx response is not kept, so a retry with the same key runs again.

Length1 <= length <= 255

Request Body

application/json
  1. body
url?string

Link to one post on the platform.

Formaturi
platformPostId?string

The platform's id for one post.

Length1 <= length

Response Body

Synced posts

application/json
  1. response
data*array<>

The account's recent posts, or the one post that was found. Empty when a url or platformPostId matched nothing among the 20 most recent posts.

skipped*boolean

true when the account was synced in the last 15 seconds, so only posts Onepostly already knows are returned.

Example Request
import { Configuration, PostsApi } from "@onepostly/sdk";const postsApi = new PostsApi(  new Configuration({ accessToken: process.env.ONEPOSTLY_API_KEY }));const response = await postsApi.syncAccountPosts({  id: "acc_YOUR_THREADS_ACCOUNT_ID",  syncAccountPostsBody: {    "url": "https://www.threads.com/@yourbrand/post/DbNQAb8ABC1"  },});console.log(response);
Example Response
{  "data": [    {      "id": "pst_3c8a2d6e91b44f7a8e250d6b4c1f9a73",      "groupId": null,      "accountId": "acc_YOUR_THREADS_ACCOUNT_ID",      "platform": "threads",      "source": "external",      "status": "published",      "text": null,      "mediaKind": "text",      "media": [],      "thread": [],      "scheduledFor": null,      "timezone": null,      "options": {},      "platformPostId": "18047285913046723",      "url": "https://www.threads.com/@yourbrand/post/DbNQAb8ABC1",      "error": null,      "publishedAt": "2027-03-14T18:30:00.000Z",      "metrics": null,      "createdAt": "2027-03-15T10:00:00.000Z",      "updatedAt": "2027-03-15T10:00:00.000Z"    }  ],  "skipped": false}