Hide Comment API
The Hide Comment API hides or unhides a comment on an Instagram Business post, or hides a reply to one of your Twitter/X tweets. Use it when moderation needs to be reversible: setting hidden to true hides the item, while setting hidden to false unhides it. That reversibility is the key distinction from permanent deletion, which is covered separately in the Delete a Comment reference.
Hide Comment API overview and supported platforms
The Hide Comment API hides or unhides a comment on an Instagram Business post, or hides a reply to one of your Twitter/X tweets. Hiding a reply on Twitter/X is charged at 2 credits. For Instagram comments, hidden: true hides and hidden: false unhides. The Twitter/X workflow in this guide covers hiding reply tweets. Before calling it, confirm which platform you are targeting, that the identifier in the path matches that platform, and that the account identifier belongs to the connected integration you intend to use. The request format, field map, and worked examples below use only the contract values for this operation, so you can check your implementation against them field by field.
Endpoint and origin-modular request format
Send a PATCH request to the endpoint shown in the Endpoint and request format example, with the x-access-key header and a JSON content type. Replace the commentId path segment with the Instagram comment ID, or the Twitter/X reply tweet ID, depending on the platform value in the body. The body must contain platform, accountId, and hidden. Use the Hide an Instagram comment example to hide, the Unhide an Instagram comment example to reverse a hide, and the Hide a Twitter/X reply example for a reply on Twitter/X. After a successful call, the response example shows the exact success shape to expect. If your request does not match the field map, check the path identifier, the platform enum, the accountId source, and the hidden value before retrying, because those are the only inputs this contract defines.
Field map and input contract
The field map table lists every parameter with its location and requiredness. The commentId path parameter is required and its meaning depends on platform: an Instagram comment ID for instagram, or a Twitter/X reply tweet ID for twitter. The platform body field is required and accepts only instagram or twitter. The accountId body field is required and must be the Integration ID obtained from list_integrations, not a username or a platform-native account handle. The hidden body field is required and is a boolean: true to hide, false to unhide. Keep those four fields exact when building a client, and do not substitute a post ID, a comment URL, or a different account identifier for any of them.
Worked hide and unhide examples
The worked examples cover the three supported calls: hiding an Instagram comment, unhiding an Instagram comment, and hiding a Twitter/X reply. In each case only the platform, accountId, and hidden values change, while the method, path, and headers stay the same. For Instagram, set hidden to true to hide and false to unhide. For Twitter/X, set platform to twitter and pass the reply tweet ID as commentId. The Successful hide or unhide response example shows the response body returned on success. Treat any other outcome as outside this contract until an error contract is defined, and verify the current visibility state through your normal comment listing flow rather than assuming a result from an unconfirmed response.
Platform differences: Instagram, Twitter/X scope, and YouTube delete alternative
Instagram and Twitter/X differ in both identifier and precondition. For Instagram Business, the path value is the comment ID and the operation is reversible through the hidden field. For Twitter/X, the path value is the reply tweet ID, hiding replies requires the tweet.moderate.write scope, and accounts connected before that scope was added must reconnect to grant it. Check the scope before sending a Twitter/X request, because a missing scope is a precondition failure rather than a problem with the hidden value. YouTube is different again: it has no reversible hide in this contract. Removing a YouTube comment therefore means deleting it. On a video you own, that deletion is permanent and also clears comments posted by other viewers. The decision matrix table summarizes when to hide, when to unhide, and when to use deletion instead.
Response contract and implementation dependencies
On success, the response contains a single success field set to true, as shown in the Successful hide or unhide response example. No additional response fields are defined in this contract, so do not depend on identifiers or status details that are not listed. For implementation planning, record the platform, accountId, commentId, and hidden value you sent alongside the success result, so you can audit which item was hidden or unhidden. If you need permanent removal rather than a reversible hide, use the separate delete operation described in the Delete a Comment reference instead of repeatedly toggling hidden.
| Parameter | Location | Required | Description |
|---|---|---|---|
| commentId | path | Yes | Instagram comment ID, or Twitter/X reply tweet ID |
| platform | body | Yes | instagram or twitter |
| accountId | body | Yes | Integration ID from list_integrations |
| hidden | body | Yes | true to hide, false to unhide |
Exact contract fields as supplied; types are as described in the source (string identifiers, platform enum, boolean hidden).
| Situation | Operation to use | Reversible? | Notes |
|---|---|---|---|
| Hide an Instagram Business comment | PATCH /v1/comments/:commentId with platform instagram and hidden true | Yes, set hidden false to unhide | commentId is the Instagram comment ID. |
| Unhide an Instagram Business comment | PATCH /v1/comments/:commentId with platform instagram and hidden false | Yes | Use the same endpoint and accountId as the hide call. |
| Hide a reply to your Twitter/X tweet | PATCH /v1/comments/:commentId with platform twitter and hidden true | Hide operation as defined in this contract | commentId is the Twitter/X reply tweet ID; requires tweet.moderate.write scope; accounts connected before the scope shipped must reconnect. Costs 2 credits on Twitter/X. |
| Take down a YouTube comment | Delete instead of hide | No, permanent | YouTube has no reversible hide. On your own video, deletion also removes comments written by other viewers. |
Decision guidance derived only from the supplied contract and platform notes.
Frequently asked questions
How do I unhide an Instagram comment with this API?
Set hidden to false with the same commentId, platform, and accountId used for the hide call. The contract defines true to hide and false to unhide.
What scope is needed to hide a Twitter/X reply?
Hiding replies on Twitter/X requires the tweet.moderate.write scope. Accounts connected before that scope was introduced must reconnect to grant it. The operation costs 2 credits on Twitter/X.
Can I hide a YouTube comment reversibly?
YouTube does not offer a reversible hide in this contract. Use deletion instead, understanding that on your own video deletion is permanent and also removes other viewers' comments.
Can I use a username instead of accountId?
No. accountId must be the Integration ID obtained from list_integrations. Do not substitute a username or platform-native handle.
PATCH {{API_BASE_URL}}/v1/comments/:commentId
x-access-key: YOUR_ACCESS_KEY
Content-Type: application/json
{
"platform": "instagram",
"accountId": "INTEGRATION_ID",
"hidden": true
}PATCH {{API_BASE_URL}}/v1/comments/:commentId
x-access-key: YOUR_ACCESS_KEY
Content-Type: application/json
{
"platform": "instagram",
"accountId": "INTEGRATION_ID",
"hidden": false
}PATCH {{API_BASE_URL}}/v1/comments/:commentId
x-access-key: YOUR_ACCESS_KEY
Content-Type: application/json
{
"platform": "twitter",
"accountId": "INTEGRATION_ID",
"hidden": true
}{
"success": true
}PATCH /v1/comments/:commentId
x-access-key: YOUR_ACCESS_KEY
Content-Type: application/json{
"platform": "instagram",
"accountId": "INTEGRATION_ID",
"hidden": true
}