> ## 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

<ParamField header="x-velt-api-key" type="string" required>
  Your API key.
</ParamField>

<ParamField header="x-velt-auth-token" type="string" required>
  Your [Auth Token](/security/auth-tokens).
</ParamField>

# Body

#### Params

<ParamField body="data" type="object" required>
  <Expandable title="properties">
    <ParamField body="organizationId" type="string" required>
      Organization ID
    </ParamField>

    <ParamField body="documentId" type="string" required>
      Document ID
    </ParamField>

    <ParamField body="annotationId" type="string" required>
      Comment Annotation ID
    </ParamField>

    <ParamField body="commentIds" type="number[]">
      Array of Comment IDs
    </ParamField>
  </Expandable>
</ParamField>

## **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"
  }
}
```

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