Skip to main content
POST
/
v2
/
commentannotations
/
comments
/
get
Get Comments
curl --request POST \
  --url https://api.velt.dev/v2/commentannotations/comments/get \
  --header 'Content-Type: application/json' \
  --header 'x-velt-api-key: <x-velt-api-key>' \
  --header 'x-velt-auth-token: <x-velt-auth-token>' \
  --data '{
  "data": {
    "organizationId": "<string>",
    "documentId": "<string>",
    "annotationId": "<string>",
    "userIds": [
      "<string>"
    ],
    "commentIds": [
      123
    ]
  }
}'
{
  "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",
        "reactionAnnotations": [
          {
            "reactionId": "reaction_001",
            "emoji": "👍",
            "from": {
              "userId": "user456",
              "name": "Jane Smith",
              "email": "jane.smith@example.com"
            },
            "createdAt": "2024-06-20T09:55:00Z"
          }
        ]
      }
    ]
  }
}
Use this API to retrieve comments in a specific CommentAnnotation. Additional filters can be applied using comment IDs.
Prior to using this API, you must:
  • Enable advanced queries option in the console
  • 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

Body

Params

data
object
required

Example Requests

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

{
  "data": {
    "organizationId": "yourOrganizationId",
    "documentId": "yourDocumentId",
    "annotationId": "yourAnnotationId"
  }
}

2. Get specific comments of a CommentAnnotation by organizationId, documentId, annotationId and commentIds

{
  "data": {
    "organizationId": "yourOrganizationId",
    "documentId": "yourDocumentId",
    "annotationId": "yourAnnotationId",
    "commentIds": [
      153783,
      607395
    ]
  }
}

Response

Success Response

{
  "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",
        "reactionAnnotations": [
          {
            "reactionId": "reaction_001",
            "emoji": "👍",
            "from": {
              "userId": "user456",
              "name": "Jane Smith",
              "email": "jane.smith@example.com"
            },
            "createdAt": "2024-06-20T09:55:00Z"
          }
        ]
      },
      null // If comment not found
    ]
  }
}
{
  "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",
        "reactionAnnotations": [
          {
            "reactionId": "reaction_001",
            "emoji": "👍",
            "from": {
              "userId": "user456",
              "name": "Jane Smith",
              "email": "jane.smith@example.com"
            },
            "createdAt": "2024-06-20T09:55:00Z"
          }
        ]
      }
    ]
  }
}