> ## 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/v2/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 retrieved successfully.",
    "data": [
      {
        "commentId": 123456,
        "type": "text",
        "status": "updated",
        "isDraft": false,
        "isCommentTextAvailable": true,
        "commentText": "This is a sample comment text.",
        "commentHtml": "<p>This is a sample comment text.</p>",
        "createdAt": 1777973714914,
        "lastUpdated": "2026-05-05T09:35:15.048Z",
        "to": [],
        "toOrganizationUserGroup": [],
        "taggedUserContacts": [],
        "attachments": [],
        "recorders": [],
        "customList": [],
        "reactionAnnotationIds": [
          "reactionAnnotationId1",
          "reactionAnnotationId2"
        ],
        "reactionAnnotations": [
          {
            "annotationId": "reactionAnnotationId1",
            "type": "reaction",
            "icon": "RAISED_HANDS",
            "commentAnnotationId": "yourAnnotationId",
            "locationId": 5509827173770816,
            "location": {
              "version": {
                "id": "v1",
                "name": "Version 1"
              }
            },
            "context": {
              "access": {
                "default": "velt"
              },
              "accessFields": [
                "default:velt"
              ]
            },
            "lastUpdated": 1777978712656,
            "fromUsers": [
              {
                "lastUpdated": 1777978709472,
                "from": {
                  "userId": "user123",
                  "organizationId": "yourOrganizationId",
                  "photoUrl": "",
                  "initial": "J",
                  "clientUserName": "John Doe",
                  "name": "John Doe",
                  "name_lowercase": "johndoe",
                  "groupId": "yourGroupId",
                  "type": "signedIn",
                  "contacts": [],
                  "email": "john.doe@example.com",
                  "email_lowercase": "john.doe@example.com",
                  "color": "#a259fe",
                  "textColor": "#FFFFFF",
                  "isAdmin": false
                }
              },
              {
                "lastUpdated": 1777978712656,
                "from": {
                  "userId": "guestUser456",
                  "organizationId": "yourOrganizationId",
                  "isGuest": true,
                  "initial": "P",
                  "clientUserName": "Powerful Panda",
                  "name": "Powerful Panda",
                  "name_lowercase": "powerfulpanda",
                  "type": "signedIn",
                  "contacts": [],
                  "email": "guest@example.com",
                  "email_lowercase": "guest@example.com",
                  "photoUrl": "https://example.com/avatars/powerful_panda.svg",
                  "color": "#67DBF4",
                  "textColor": "#FFFFFF",
                  "isAdmin": false
                }
              }
            ]
          },
          {
            "annotationId": "reactionAnnotationId2",
            "type": "reaction",
            "icon": "HEART_FACE",
            "commentAnnotationId": "yourAnnotationId",
            "locationId": 5509827173770816,
            "location": {
              "version": {
                "id": "v1",
                "name": "Version 1"
              }
            },
            "context": {
              "access": {
                "default": "velt"
              },
              "accessFields": [
                "default:velt"
              ]
            },
            "lastUpdated": 1777978714205,
            "fromUsers": [
              {
                "lastUpdated": 1777978714205,
                "from": {
                  "userId": "guestUser456",
                  "organizationId": "yourOrganizationId",
                  "isGuest": true,
                  "initial": "P",
                  "clientUserName": "Powerful Panda",
                  "name": "Powerful Panda",
                  "name_lowercase": "powerfulpanda",
                  "type": "signedIn",
                  "contacts": [],
                  "email": "guest@example.com",
                  "email_lowercase": "guest@example.com",
                  "photoUrl": "https://example.com/avatars/powerful_panda.svg",
                  "color": "#67DBF4",
                  "textColor": "#FFFFFF",
                  "isAdmin": false
                }
              }
            ]
          }
        ],
        "from": {
          "userId": "user123",
          "organizationId": "yourOrganizationId",
          "photoUrl": "",
          "initial": "J",
          "clientUserName": "John Doe",
          "name": "John Doe",
          "name_lowercase": "johndoe",
          "groupId": "yourGroupId",
          "type": "signedIn",
          "contacts": [],
          "email": "john.doe@example.com",
          "email_lowercase": "john.doe@example.com",
          "color": "#a259fe",
          "textColor": "#FFFFFF",
          "isAdmin": false
        }
      },
      null // If a requested commentId was not found
    ]
  }
}
```

```js theme={null}
{
  "result": {
    "status": "success",
    "message": "Comments retrieved successfully.",
    "data": [
      {
        "commentId": 123456,
        "type": "text",
        "status": "updated",
        "isDraft": false,
        "isCommentTextAvailable": true,
        "commentText": "This is a sample comment text.",
        "commentHtml": "<p>This is a sample comment text.</p>",
        "createdAt": 1777973714914,
        "lastUpdated": "2026-05-05T09:35:15.048Z",
        "to": [],
        "toOrganizationUserGroup": [],
        "taggedUserContacts": [],
        "attachments": [],
        "recorders": [],
        "customList": [],
        "reactionAnnotationIds": [
          "reactionAnnotationId1",
          "reactionAnnotationId2"
        ],
        "reactionAnnotations": [
          {
            "annotationId": "reactionAnnotationId1",
            "type": "reaction",
            "icon": "RAISED_HANDS",
            "commentAnnotationId": "yourAnnotationId",
            "locationId": 5509827173770816,
            "location": {
              "version": {
                "id": "v1",
                "name": "Version 1"
              }
            },
            "context": {
              "access": {
                "default": "velt"
              },
              "accessFields": [
                "default:velt"
              ]
            },
            "lastUpdated": 1777978712656,
            "fromUsers": [
              {
                "lastUpdated": 1777978709472,
                "from": {
                  "userId": "user123",
                  "organizationId": "yourOrganizationId",
                  "photoUrl": "",
                  "initial": "J",
                  "clientUserName": "John Doe",
                  "name": "John Doe",
                  "name_lowercase": "johndoe",
                  "groupId": "yourGroupId",
                  "type": "signedIn",
                  "contacts": [],
                  "email": "john.doe@example.com",
                  "email_lowercase": "john.doe@example.com",
                  "color": "#a259fe",
                  "textColor": "#FFFFFF",
                  "isAdmin": false
                }
              }
            ]
          }
        ],
        "from": {
          "userId": "user123",
          "organizationId": "yourOrganizationId",
          "photoUrl": "",
          "initial": "J",
          "clientUserName": "John Doe",
          "name": "John Doe",
          "name_lowercase": "johndoe",
          "groupId": "yourGroupId",
          "type": "signedIn",
          "contacts": [],
          "email": "john.doe@example.com",
          "email_lowercase": "john.doe@example.com",
          "color": "#a259fe",
          "textColor": "#FFFFFF",
          "isAdmin": false
        }
      }
    ]
  }
}
```


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