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

# Delete Comments

Use this API to delete comments within a specific CommentAnnotation.
Additional filters can be applied using comment IDs.

# Endpoint

`POST https://api.velt.dev/v2/commentannotations/comments/delete`

# Headers

**x-velt-api-key** `string` *required*

Your API key.

**x-velt-auth-token** `string` *required*

Your [Auth Token](https://velt.dev/docs/security/auth-tokens.md).

# Body

#### Params

**data** `object` *required*

**properties**

**organizationId** `string` *required*

Organization ID

**documentId** `string` *required*

Document ID

**annotationId** `string` *required*

Comment Annotation ID

**commentIds** `number[]`

Array of Comment IDs

## **Example Requests**

#### 1. Delete all comments of a CommentAnnotation by organizationId, documentId, and annotationId

```JSON theme={null}
{
  "data": {
    "organizationId": "yourOrganizationId",
    "documentId": "yourDocumentId",
    "annotationId": "yourAnnotationId"
  }
}
```

#### 2. Delete specific comments of a CommentAnnotation by organizationId, documentId, annotationId and commentIds

```JSON theme={null}
{
  "data": {
    "organizationId": "yourOrganizationId",
    "documentId": "yourDocumentId",
    "annotationId": "yourAnnotationId",
    "commentIds": [
      153783,
      607395
    ]
  }
}
```

# Response

#### Success Response

```JSON theme={null}
{
  "result": {
    "status": "success",
    "message": "Comments(s) deleted successfully.",
    "data": {
      "153783": {
        "success": true,
        "id": 153783,
        "message": "Deleted successfully"
      },
      "607395": {
        "success": false,
        "id": 607395,
        "message": "Not found"
      }
    }
  }
}
```

#### Failure Response

```JSON theme={null}
{
  "error": {
    "message": "ERROR_MESSAGE",
    "status": "INVALID_ARGUMENT"
  }
}
```

```js theme={null}
{
  "result": {
    "status": "success",
    "message": "Comments(s) deleted successfully.",
    "data": {
      "153783": {
        "success": true,
        "id": 153783,
        "message": "Deleted successfully"
      }
    }
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.