Likes and Reposts
Undo a Repost
Undo a repost the account made. Name the post as you did to repost it, or by the postId the response returned. On X every request is charged to the wallet, a repeat included.
BearerAuthorizationBearer <op_>Workspace API key, sent as Authorization: Bearer op_... Keys are created in the dashboard.
id*string1 <= lengthpostId*stringThe post. Send the pst_ id of one of this account's posts, or the platform's own id of any post on the account's platform. Percent-encode it in the URL, as the SDKs do, so a Bluesky at:// URI is sent as at%3A%2F%2F…
1 <= length <= 512Repost removed
application/json- response
postId*stringThe pst_ id of the post. Use it to undo this action.
accountId*stringThe account that acted.
platform*|The platform id. New platforms can be added, so handle a value you do not know.
reposted*booleantrue after a repost, false after the repost is undone.
platformRepostId*|The repost's own id on the platform, when the platform reports one.
import { Configuration, EngagementApi } from "@onepostly/sdk";const engagementApi = new EngagementApi( new Configuration({ accessToken: process.env.ONEPOSTLY_API_KEY }));const response = await engagementApi.unrepostPost({ id: "acc_YOUR_THREADS_ACCOUNT_ID", postId: "pst_3c8a2d6e91b44f7a8e250d6b4c1f9a73",});console.log(response);{ "postId": "pst_3c8a2d6e91b44f7a8e250d6b4c1f9a73", "accountId": "acc_YOUR_THREADS_ACCOUNT_ID", "platform": "threads", "reposted": false, "platformRepostId": null}