Likes and Reposts
Remove a Like
Remove a like the account made. Name the post as you did to like it, or by the postId the response returned. On X every request is charged to the wallet, a repeat included.
DELETE
Bearerheader
AuthorizationBearer <op_>Workspace API key, sent as Authorization: Bearer op_... Keys are created in the dashboard.
id*stringLength
1 <= 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…
Length
1 <= length <= 512Like 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.
liked*booleantrue after a like, false after the like is removed.
Example Request
import { Configuration, EngagementApi } from "@onepostly/sdk";const engagementApi = new EngagementApi( new Configuration({ accessToken: process.env.ONEPOSTLY_API_KEY }));const response = await engagementApi.unlikePost({ id: "acc_YOUR_YOUTUBE_ACCOUNT_ID", postId: "dQw4w9WgXcQ",});console.log(response);Example Response
{ "postId": "pst_3c8a2d6e91b44f7a8e250d6b4c1f9a73", "accountId": "acc_YOUR_YOUTUBE_ACCOUNT_ID", "platform": "youtube", "liked": false}