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.
| Field | Location | Type | Required | Description |
|---|---|---|---|---|
| commentId | Path | string | Yes | Platform comment ID in /v1/comments/{commentId} |
| x-access-key | Header | string | Yes | Authorization token header |
| platform | Body | string enum | Yes | One of facebook, instagram, threads, linkedin, youtube, twitter |
| accountId | Body | string | Yes | Integration ID |
| hidden | Body | boolean | Yes | true to hide, false to unhide |
Exact contract fields from supplied source; commentId description wording is flagged privately as a factual hold.
| Platform | Hide or unhide behavior | Notes |
|---|---|---|
| Hides a comment on a Business post | Use hidden true to hide and false to unhide | |
| Twitter/X | Hides a reply to one of your tweets | Requires tweet.moderate.write scope; accounts connected before it was added must reconnect |
| YouTube | Not supported for reversible hide | No reversible hide; use delete for permanent removal |
| facebook, threads, linkedin | Listed in platform enum | No 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.
| Status | Content type | Response fields |
|---|---|---|
| 200 | application/json | success: boolean |
| 400 | application/json | success: boolean, message: string |
| 401 | application/json | success: boolean, message: string |
| 402 | application/json | success: boolean, message: string |
| 403 | application/json | success: boolean, message: string |
| 404 | application/json | success: boolean, message: string |
| 429 | application/json | success: boolean, message: string |
| 502 | application/json | success: 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.
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
}'{
"success": true
}{
"success": true,
"message": "string"
}| Scope | Field | Type | Type reference | Required | Description | Constraints |
|---|---|---|---|---|---|---|
| commentId#1 | commentId | string | __0 | Yes | Platform comment ID to delete. | |
| body#2 | body | object | __0 | Yes | ||
| body#2 | body.platform | string | __1 | Yes | kind: schemaValueIn; value: "facebook" | "instagram" | "threads" | "linkedin" | "youtube" | "twitter" | |
| body#2 | body.accountId | string | __2 | Yes | Integration ID. | |
| body#2 | body.hidden | boolean | __3 | Yes | true to hide, false to unhide. | |
| response#3 | response | object | __0 | |||
| response#3 | response.success | boolean | __1 | Yes | ||
| response#4 | response | object | __0 | |||
| response#4 | response.success | boolean | __1 | Yes | ||
| response#4 | response.message | string | __2 | Yes |