> ## Documentation Index
> Fetch the complete documentation index at: https://docs.velt.dev/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.
</Warning>

# Endpoint

`POST https://api.velt.dev/v2/commentannotations/comments/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="documentId" type="string" required>
      Document ID
    </ParamField>

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

    <ParamField body="userIds" type="string[]" required>
      User IDs
    </ParamField>

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

## **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": "d448b95936703db7d0923122172fb13c",
                  "userSnippylyId": "1174701858709696",
                  "photoUrl": "",
                  "initial": "J",
                  "clientUserName": "John Doe",
                  "name": "John Doe",
                  "name_lowercase": "johndoe",
                  "clientOrganizationId": "yourOrganizationId",
                  "clientGroupId": "yourClientGroupId",
                  "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": "d448b95936703db7d0923122172fb13c",
                  "userSnippylyId": "8810801459478142",
                  "isGuest": true,
                  "initial": "P",
                  "clientUserName": "Powerful Panda",
                  "name": "Powerful Panda",
                  "name_lowercase": "powerfulpanda",
                  "clientOrganizationId": "yourOrganizationId",
                  "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": "d448b95936703db7d0923122172fb13c",
                  "userSnippylyId": "8810801459478142",
                  "isGuest": true,
                  "initial": "P",
                  "clientUserName": "Powerful Panda",
                  "name": "Powerful Panda",
                  "name_lowercase": "powerfulpanda",
                  "clientOrganizationId": "yourOrganizationId",
                  "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": "d448b95936703db7d0923122172fb13c",
          "userSnippylyId": "1174701858709696",
          "photoUrl": "",
          "initial": "J",
          "clientUserName": "John Doe",
          "name": "John Doe",
          "name_lowercase": "johndoe",
          "clientOrganizationId": "yourOrganizationId",
          "clientGroupId": "yourClientGroupId",
          "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
    ]
  }
}
```

<ResponseExample>
  ```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": "d448b95936703db7d0923122172fb13c",
                    "userSnippylyId": "1174701858709696",
                    "photoUrl": "",
                    "initial": "J",
                    "clientUserName": "John Doe",
                    "name": "John Doe",
                    "name_lowercase": "johndoe",
                    "clientOrganizationId": "yourOrganizationId",
                    "clientGroupId": "yourClientGroupId",
                    "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": "d448b95936703db7d0923122172fb13c",
            "userSnippylyId": "1174701858709696",
            "photoUrl": "",
            "initial": "J",
            "clientUserName": "John Doe",
            "name": "John Doe",
            "name_lowercase": "johndoe",
            "clientOrganizationId": "yourOrganizationId",
            "clientGroupId": "yourClientGroupId",
            "groupId": "yourGroupId",
            "type": "signedIn",
            "contacts": [],
            "email": "john.doe@example.com",
            "email_lowercase": "john.doe@example.com",
            "color": "#a259fe",
            "textColor": "#FFFFFF",
            "isAdmin": false
          }
        }
      ]
    }
  }
  ```
</ResponseExample>
