Skip to content

Hide Comment API: Hide or Unhide a Comment

The Hide Comment API lets you hide or unhide a specific platform comment with one PATCH request. You identify the comment with commentId, choose the connected account with accountId, and set the required hidden boolean to true to hide or false to unhide. Platform support is not uniform, so check the platform behavior before calling this operation.

Hide or unhide a comment — operation summary and platform limits

Hide or unhide a comment by sending a PATCH request to /v1/comments/{commentId}. The path parameter commentId is the platform comment ID, and the JSON body controls the action through the required hidden boolean. Set hidden to true to hide the comment and hidden to false to unhide it. This operation is reversible where the underlying platform supports reversible hiding, which is why it differs from delete, which takes a comment down permanently.

Request contract: PATCH {{API_BASE_URL}}/v1/comments/{commentId}, headers, path and body field map

Send the request with the x-access-key header set to your token and a Content-Type of application/json. The commentId path parameter is required and is a string. In the request body, platform is required and must be one of facebook, instagram, threads, linkedin, youtube, or twitter. The accountId field is required and is the integration ID for the connected account. The hidden field is required and is a boolean, with true meaning hide and false meaning unhide. Before sending, confirm that commentId, platform, and accountId refer to the same comment and connected account, because a mismatch will not be corrected by the API.

Platform behavior matrix: Instagram, Twitter/X, YouTube, and enum-only platforms

On Instagram, this operation hides a comment on a Business post. On Twitter/X, it hides a reply to one of your tweets and requires the tweet.moderate.write scope, so accounts connected before that scope was added must reconnect. YouTube is not supported for reversible hide because YouTube has no reversible hide; use delete to take a comment down permanently instead. The platform enum also includes facebook, threads, and linkedin, but the supplied source describes specific hide behavior only for Instagram and Twitter/X and explicitly excludes YouTube, so do not assume identical behavior for the other enum values.

Worked examples: hide with hidden true and unhide with hidden false

To hide, set hidden to true in the body while keeping platform and accountId set to the values for the comment you want to moderate. To unhide, repeat the same PATCH request with hidden set to false. In both cases, keep the same commentId in the path and the same x-access-key header. After the call, check the response body for the success field before treating the moderation action as complete, and verify the comment state in the platform interface or through a subsequent list operation if your workflow requires confirmation.

Response and status handling: 200 success shape and 400/401/402/403/404/429/502 error shapes

A 200 response returns a JSON object with a required success boolean. The other listed statuses, 400, 401, 402, 403, 404, 429, and 502, return a JSON object with required success and message fields. Handle each status by reading success and message rather than assuming the action succeeded. Treat any non-200 response as a failed hide or unhide attempt, surface the message to the caller or operator, and do not retry blindly without checking whether the comment state changed.

Implementation checklist

Use this checklist before publishing an integration: confirm the PATCH method and /v1/comments/{commentId} path, confirm x-access-key is present, confirm platform uses an allowed enum value, confirm accountId is the integration ID, and confirm hidden is a boolean rather than a string. Then confirm the platform supports reversible hide for your use case, especially for YouTube, and confirm Twitter/X accounts have the tweet.moderate.write scope. Finally, verify the response success field and, for non-200 statuses, log the message field for diagnosis.

Request field map
FieldLocationTypeRequiredDescription
commentIdPathstringYesPlatform comment ID in /v1/comments/{commentId}
x-access-keyHeaderstringYesAuthorization token header
platformBodystring enumYesOne of facebook, instagram, threads, linkedin, youtube, twitter
accountIdBodystringYesIntegration ID
hiddenBodybooleanYestrue to hide, false to unhide

Exact contract fields from supplied source; commentId description wording is flagged privately as a factual hold.

Platform support matrix
PlatformHide or unhide behaviorNotes
InstagramHides a comment on a Business postUse hidden true to hide and false to unhide
Twitter/XHides a reply to one of your tweetsRequires tweet.moderate.write scope; accounts connected before it was added must reconnect
YouTubeNot supported for reversible hideNo reversible hide; use delete for permanent removal
facebook, threads, linkedinListed in platform enumNo specific hide behavior described in supplied source

Behavior limited to what the supplied source explicitly describes; enum-only platforms have no described hide behavior in source.

Response and status handling table
StatusContent typeResponse fields
200application/jsonsuccess: boolean
400application/jsonsuccess: boolean, message: string
401application/jsonsuccess: boolean, message: string
402application/jsonsuccess: boolean, message: string
403application/jsonsuccess: boolean, message: string
404application/jsonsuccess: boolean, message: string
429application/jsonsuccess: boolean, message: string
502application/jsonsuccess: boolean, message: string

Per-status error semantics beyond success/message shapes are not specified in supplied source.

Frequently asked questions

How do I hide a comment with the Hide Comment API?

Send PATCH to /v1/comments/{commentId} with platform, accountId, and hidden set to true. The commentId is the platform comment ID in the path, and the request must include the x-access-key header.

How do I unhide a comment?

Send the same PATCH request with hidden set to false. The hidden field is a required boolean, so use true to hide and false to unhide.

Can I use hide on YouTube?

YouTube is not supported for reversible hide because it has no reversible hide operation. Use delete to take a comment down permanently instead.

What scope is required to hide a Twitter/X reply?

On Twitter/X, hiding a reply to one of your tweets requires the tweet.moderate.write scope. Accounts connected before that scope was added must reconnect.

Hide a comment request example
curl -X PATCH "{{API_BASE_URL}}/v1/comments/{commentId}" \
  -H "Content-Type: application/json" \
  -H "x-access-key: <token>" \
  -d '{
    "platform": "facebook",
    "accountId": "string",
    "hidden": true
  }'
Successful hide or unhide response example
{
  "success": true
}
Error response example for non-200 statuses
{
  "success": true,
  "message": "string"
}
Interface fields
ScopeFieldTypeType referenceRequiredDescriptionConstraints
commentId#1commentIdstring__0YesPlatform comment ID to delete.
body#2bodyobject__0Yes
body#2body.platformstring__1Yeskind: schemaValueIn; value: "facebook" | "instagram" | "threads" | "linkedin" | "youtube" | "twitter"
body#2body.accountIdstring__2YesIntegration ID.
body#2body.hiddenboolean__3Yestrue to hide, false to unhide.
response#3responseobject__0
response#3response.successboolean__1Yes
response#4responseobject__0
response#4response.successboolean__1Yes
response#4response.messagestring__2Yes