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

# Get comment annotations count (v1)

> Retrieve total and unread comment annotation counts for up to 30 documents using the v1 REST API. Filter by user ID and status IDs.

Use this API to retrieve the count of comment annotations for specified documents, including both total and unread counts.

<Warning>
  Prior to using this API, you must:

  * Enable advanced queries option in [the console](https://console.velt.dev/dashboard/config/appconfig)
  * Deploy v4 series of the Velt SDK.
</Warning>

# Endpoint

`POST https://api.velt.dev/v1/commentannotations/count/get`

# 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="documentIds" type="string[]" required>
      Array of document IDs to get comment annotation counts for. Limit: Only 30 IDs can be passed at a time.
    </ParamField>

    <ParamField body="userId" type="string" required>
      ID of the user requesting the counts
    </ParamField>

    <ParamField body="statusIds" type="string[]">
      Array of status IDs to filter comments by (e.g., "OPEN", "IN\_PROGRESS")
    </ParamField>
  </Expandable>
</ParamField>

#### **Example Request**

```JSON theme={null}
{
  "data": {
    "organizationId": "ORG_ID",
    "documentIds": ["DOC_1", "DOC_2"],
    "userId": "1.1",
    "statusIds": ["OPEN", "IN_PROGRESS"]
  }
}
```

# Response

#### Success Response

```JSON theme={null}
{
  "result": {
    "status": "success", 
    "message": "Comment count retrieved successfully.",
    "data": {
      "DOC_1": {
        "total": 4,
        "unread": 2
      },
      "DOC_2": {
        "total": 2,
        "unread": 0
      }
    }
  }
}
```

#### Failure Response

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

<ResponseExample>
  ```JSON theme={null}
  {
    "result": {
      "status": "success",
      "message": "Comment count retrieved successfully.",
      "data": {
        "DOC_1": {
          "total": 4,
          "unread": 2
        },
        "DOC_2": {
          "total": 2,
          "unread": 0
        }
      }
    }
  }
  ```
</ResponseExample>
