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

# Get Comment Annotations Count

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.

# Endpoint

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

# 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

**documentIds** `string[]` *required*

Array of document IDs to get comment annotation counts for. Limit: Only 30 IDs can be passed at a time.

**userId** `string` *required*

ID of the user requesting the counts

**statusIds** `string[]`

Array of status IDs to filter comments by (e.g., "OPEN", "IN\_PROGRESS")

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

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


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