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

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

> [!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/v1/commentannotations/comments/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

**documentId** `string` *required*

Document ID

**annotationId** `string` *required*

Comment Annotation ID

**userIds** `string[]` *required*

User IDs

**commentIds** `number[]`

Array of Comment IDs

## **Example Requests**

#### 1. Get all comments with a CommentAnnotation by organizationId, documentId, and annotationId

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

#### 2. Get 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) retrieved successfully.",
    "data": [
      {
        "commentHtml": "<div>Hello Updated 2</div>",
        "commentId": 153783,
        "commentText": "Sample Comment Text",
        "from": {
          "email": "user@example.com",
          "name": "User Name",
          "userId": "yourUserId"
        },
        "lastUpdated": "2024-06-20T09:53:42.258Z",
        "status": "added",
        "type": "text"
      },
      null // If comment not found
    ]
  }
}
```

```js theme={null}
{
  "result": {
    "status": "success",
    "message": "Comments(s) retrieved successfully.",
    "data": [
      {
        "commentHtml": "<div>Hello Updated 2</div>",
        "commentId": 153783,
        "commentText": "Sample Comment Text",
        "from": {
          "email": "user@example.com",
          "name": "User Name",
          "userId": "yourUserId"
        },
        "lastUpdated": "2024-06-20T09:53:42.258Z",
        "status": "added",
        "type": "text"
      }
    ]
  }
}
```


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