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
/v1/accounts/{id}/likes/{postId}

Authorization

Bearer
headerAuthorizationBearer <op_>

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

Path Parameters

id*string
Length1 <= length
postId*string

The 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…

Length1 <= length <= 512

Response Body

Like removed

application/json
  1. response
postId*string

The pst_ id of the post. Use it to undo this action.

accountId*string

The account that acted.

platform*|

The platform id. New platforms can be added, so handle a value you do not know.

liked*boolean

true 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}