---
title: "Delete a comment where the provider supports it"
description: "PubNio API inbox.comments.delete: delete a comment where the provider supports it. 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.

# Delete a comment where the provider supports it

Delete a comment where the provider supports it with [`DELETE /api/v1/inbox/comments/{commentId}`](https://pubnio.com/api/v1/docs#tag/inbox/DELETE/api/v1/inbox/comments/{commentId}). Requires an API key with the `engage` scope or a signed-in workspace member.

## Request

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

## Response

- HTTP 200: `InboxDeleted` with `deleted`, `actionId`.

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

## Examples

### TypeScript

```ts
const deleted = await workspace.inbox.deleteComment(commentId);
```

### Python

```python
deleted = workspace.inbox.delete_comment(comment_id)
```

### cURL

```sh
curl -X DELETE "https://pubnio.com/api/v1/inbox/comments/$COMMENT_ID?workspaceId=$WORKSPACE_ID" \
  -H "Authorization: Bearer $PUBNIO_API_KEY"
```

### CLI

```sh
pnio inbox comments delete "$COMMENT_ID"
```

### MCP execute

```js
async () => {
  const commentId = "<commentId>";
  const response = await codemode.request({
    method: "DELETE",
    path: `/api/v1/inbox/comments/${commentId}`,
    query: { workspaceId: codemode.workspaceId },
  });
  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 `DELETE` 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-delete/index.mdx
