Skip to main content
DELETE
/
comments
/
:id
curl \
-H "Authorization: Bearer API_KEY" \
-X DELETE https://api.ayrshare.com/api/comments/Ut1fWU6XkqkMayHGnJZ
{
  "status": "success",
  "bluesky": {
    "action": "delete",
    "status": "success",
    "id": "at://did:plc:d/app.bsky.feed.post/3lez", // Bluesky Social Comment ID
    "comment": "This is a comment"
  },
  "facebook": {
    "action": "delete",
    "status": "success",
    "id": "938010233_939392023", // Facebook Social Comment ID
    "comment": "This is a comment"
  },
  "instagram": {
    "action": "delete",
    "status": "success",
    "id": "18010439663043269",  // Instagram Social Comment ID
    "comment": "This is a comment"
  },
  "linkedin": {
    "action": "delete",
    "status": "success",
    "id": "7133271664032669696", // LinkedIn Social Comment ID
    "comment": "This is a comment"
  },
  "threads": {
    "action": "delete",
    "status": "success",
    "id": "18064102964006231"   // Threads Social Comment ID
  },
  "tiktok": {
    "action": "delete",
    "status": "success",
    "commentId": "7303719953248109358", // Deprecated December 1, 2023. Use the id field instead.
    "id": "7303719953248109358", // TikTok Social Comment ID
    "comment": "This is a comment"
  },
  "twitter": {
    "action": "delete",
    "status": "success",
    "id": "1633128546494459904", // Twitter Social Comment ID
    "comment": "This is a comment"
  },
  "youtube": {
    "action": "delete",
    "status": "success",
    "id": "Ugy2m5u-LS9M29Gn3hd4AaABAg", // YouTub Social Comment ID
    "comment": "This is a comment"
  }
}
The delete endpoint allows you to either delete comments sent via Ayrshare or comments that were sent outside of Ayrshare. Please see the Comments Overview for more information on the different ID types.

Delete Comments Sent from Ayrshare

Delete either a single comment or all comments under a post that were sent via Ayrshare. Please see the Ayrshare Post ID and Ayrshare Comment ID for more information. Supported platforms: Bluesky, Facebook, Instagram, LinkedIn, Reddit, TikTok, X/Twitter, and YouTube.

Delete Comments Sent Outside of Ayrshare

Delete a comment that was not sent via Ayrshare by using the commentId returned for a particular social network. This is the Social Comment ID from the social networks, not the Ayrshare ID. Supported platforms: Facebook, Instagram, TikTok, X/Twitter, and YouTube.
TikTok — own-authored comments only. On TikTok, DELETE /comments only succeeds for comments authored by the authenticated TikTok account itself (for example, replies you posted via Ayrshare’s reply endpoint or directly inside the TikTok app). Attempting to delete a comment authored by another user — even one left on a video you own — returns Ayrshare code: 328. If you need to moderate third-party comments on your own TikTok videos, contact support so we can confirm what’s available for your linked account type.
For example, you get all the comments for a particular Instagram post using the Get Comments endpoint with the searchPlatformId set to true.
GET https://api.ayrshare.com/api/comments/18231730279304111?platform=instagram&searchPlatformId=true
The returned JSON will have a commentId for each comment, which you can use to delete the comment. Remember to set the searchPlatformId to true.
{
  "instagram": [
    {
      "comment": "What an amazing comment",
      "commentId": "17969247335804735",
      "created": "2024-11-26T11:49:00Z",
      "from": {
        "id": "103038435208332",
        "username": "john_smith"
      },
      "hidden": false,
      "likeCount": 3,
      "platform": "instagram",
      "postId": "18231730279304333",
      "username": "john_smith"
    }
  ]
}

Header Parameters

Path Parameters

id
string
required
Delete a comments sent from Ayrshare:Delete a comment sent outside of Ayrshare:
  • Delete a single comment by providing the Social Comment ID from the social network.
  • Must include the searchPlatformId set to true.

Body Parameters

platforms
array
Required if deleting comments sent via Ayrshare. The platforms to delete comments from.Supported platforms: bluesky, facebook, instagram, linkedin, reddit, threads, tiktok, twitter, youtube.
Deleting comments sent via Ayrshare
DELETE /comments/:id // Ayrshare Post ID or Ayrshare Comment ID
{
  "platforms": ["bluesky", "facebook", "instagram", "linkedin", "reddit", "threads", "tiktok", "twitter", "youtube"]
}
platform
string
Required if deleting using the Social Comment ID, which is the commentId from the social networks.Supported platforms: bluesky, facebook, instagram, threads, tiktok, twitter, youtube. Only one platform is supported at a time.
searchPlatformId
boolean
default:false
Required if deleting using the Social Comment ID, which is the commentId from the social networks, set to true.
Deleting comments with Social Comment ID
DELETE /comments/:id // Social Comment ID
{
  "searchPlatformId": true,
  // bluesky, facebook, instagram, threads, tiktok, twitter, youtube
  "platform": "facebook"
}
hide
boolean
default:false
TikTok only. Set to true, together with videoId, to hide a TikTok comment from public viewers instead of deleting it. The success response returns action: "hide" and echoes the comment. Sending hide=true without videoId returns HTTP 400.Hidden comments remain visible to the video owner in TikTok Studio.
Hiding a TikTok comment
DELETE /comments/:id // Social Comment ID
{
  "searchPlatformId": true,
  "platform": "tiktok",
  "hide": true,
  "videoId": "7303719953248109358"
}
videoId
string
Required when hiding a TikTok comment (hide=true). The TikTok video ID the comment belongs to.
curl \
-H "Authorization: Bearer API_KEY" \
-X DELETE https://api.ayrshare.com/api/comments/Ut1fWU6XkqkMayHGnJZ
{
  "status": "success",
  "bluesky": {
    "action": "delete",
    "status": "success",
    "id": "at://did:plc:d/app.bsky.feed.post/3lez", // Bluesky Social Comment ID
    "comment": "This is a comment"
  },
  "facebook": {
    "action": "delete",
    "status": "success",
    "id": "938010233_939392023", // Facebook Social Comment ID
    "comment": "This is a comment"
  },
  "instagram": {
    "action": "delete",
    "status": "success",
    "id": "18010439663043269",  // Instagram Social Comment ID
    "comment": "This is a comment"
  },
  "linkedin": {
    "action": "delete",
    "status": "success",
    "id": "7133271664032669696", // LinkedIn Social Comment ID
    "comment": "This is a comment"
  },
  "threads": {
    "action": "delete",
    "status": "success",
    "id": "18064102964006231"   // Threads Social Comment ID
  },
  "tiktok": {
    "action": "delete",
    "status": "success",
    "commentId": "7303719953248109358", // Deprecated December 1, 2023. Use the id field instead.
    "id": "7303719953248109358", // TikTok Social Comment ID
    "comment": "This is a comment"
  },
  "twitter": {
    "action": "delete",
    "status": "success",
    "id": "1633128546494459904", // Twitter Social Comment ID
    "comment": "This is a comment"
  },
  "youtube": {
    "action": "delete",
    "status": "success",
    "id": "Ugy2m5u-LS9M29Gn3hd4AaABAg", // YouTub Social Comment ID
    "comment": "This is a comment"
  }
}