---
title: "Hide, unhide, like, or unlike a comment"
description: "PubNio API inbox.comments.moderate: hide, unhide, like, or unlike a comment. Request fields, examples in five clients, errors, and idempotency."
---

> Documentation Index
> Fetch the complete documentation index at: https://pubnio.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Hide, unhide, like, or unlike a comment

Hide, unhide, like, or unlike a comment with [`PATCH /api/v1/inbox/comments/{commentId}`](https://pubnio.com/api/v1/docs#tag/inbox/PATCH/api/v1/inbox/comments/{commentId}). Requires an API key with the `engage` scope or a signed-in workspace member.

## Request

Idempotent. Send hidden or liked only; omitted state is preserved.

| Parameter     | In    | Type | Required |
| ------------- | ----- | ---- | -------- |
| `commentId`   | path  | UUID | Yes      |
| `workspaceId` | query | UUID | Yes      |

| Body field | Type    | Required |
| ---------- | ------- | -------- |
| `hidden`   | boolean | No       |
| `liked`    | boolean | No       |

## Response

- HTTP 200: `InboxComment` with `id`, `threadId`, `accountId`, `provider`, `parentCommentId`, `author`, `text`, `likeCount`, `replyCount`, `likedByAccount`, `hidden`, `canReply`, `canHide`, `canLike`, `canDelete`, `permalink`, `actionId`, `providerCreatedAt`, `providerUpdatedAt`, `deletedAt`, `createdAt`.
  - `provider`: `bluesky`, `facebook`, `instagram`, `linkedin`, `pinterest`, `reddit`, `snapchat`, `tiktok`, `threads`, `x`, `youtube`, `google_business`, `meta_ads`, `google_ads`, `reddit_ads`, `pinterest_ads`, `tiktok_ads`, `linkedin_ads`, `snapchat_ads`, `amazon_ads`, `openai_ads`

The [OpenAPI document](https://pubnio.com/api/v1/openapi) has each field's type.

## Examples

### TypeScript

```ts
const comment = await workspace.inbox.moderateComment(commentId, {
  hidden: true,
});
```

### Python

```python
comment = workspace.inbox.moderate_comment(comment_id, hidden=True)
```

### cURL

```sh
curl -X PATCH "https://pubnio.com/api/v1/inbox/comments/$COMMENT_ID?workspaceId=$WORKSPACE_ID" \
  -H "Authorization: Bearer $PUBNIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"hidden":true}'
```

### CLI

```sh
pnio inbox comments moderate "$COMMENT_ID" --hidden
```

### MCP execute

```js
async () => {
  const commentId = "<commentId>";
  const response = await codemode.request({
    method: "PATCH",
    path: `/api/v1/inbox/comments/${commentId}`,
    query: { workspaceId: codemode.workspaceId },
    body: { hidden: true },
  });
  return response.data;
};
```

## Errors

It declares no problem of its own.

It declares the problems [every Inbox operation](https://pubnio.com/docs/reference/#inbox) and [most operations](https://pubnio.com/docs/reference/#shared-problems) declare.

## Idempotency

No key, so a retried `PATCH` is not deduplicated. Read the current state before you retry.

## Limits

- Field lengths and ranges are in the [OpenAPI document](https://pubnio.com/api/v1/openapi).

## Related

- [Inbox operations](https://pubnio.com/docs/reference/#inbox)

Source: https://pubnio.com/docs/reference/inbox-comments-moderate/index.mdx
