REST APIs
- Organizations
- Folders
- Documents
- Users
- Organization User Groups
- Comments Feature
- Notifications
- Live State
SDK
- APIs
- Models
Update Comment Annotations
curl --request POST \
--url https://api.velt.dev/v1/commentannotations/update \
--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>",
"locationIds": [
"<string>"
],
"userIds": [
"<string>"
],
"annotationIds": [
"<string>"
],
"updatedData": [
{
"location": {
"id": "<string>",
"locationName": "<string>"
},
"targetElement": {
"elementId": "<string>",
"targetText": "<string>",
"occurrence": 123,
"selectAllContent": true
},
"commentData": [
{
"commentText": "<string>",
"commentHtml": "<string>",
"from": {}
}
],
"from": {},
"status": {
"type": "<string>",
"lightColor": "<string>",
"svg": "<string>",
"iconUrl": "<string>"
},
"assignedTo": {},
"context": {},
"priority": {
"id": "<string>",
"color": "<string>",
"name": "<string>",
"lightColor": "<string>"
}
}
]
}
}'
{
"result": {
"status": "success",
"message": "Annotations updated successfully.",
"data": [
"yourAnnotationId1",
"yourAnnotationId2",
"yourAnnotationId3",
"yourAnnotationId4",
"yourAnnotationId5",
"yourAnnotationId6",
"yourAnnotationId7"
]
}
}
Use this API to update comment annotations in a document within an organization. Additional filters can be applied using location IDs, annotation IDs, or user IDs.
Endpoint
POST https://api.velt.dev/v1/commentannotations/update
Headers
Your API key.
Your Auth Token.
Body
Params
Organization ID
Document ID
Array of Location IDs
Array of User IDs. These are the users who created the comment annotation.
Array of Annotation IDs
Target Element
Element DOM Id
Target Text. Provide this if you want to add comment annotation on the provided text content.
Occurrence. Provide this if you want to add comment annotation on a text content.
Select All Content. Provide this if you want to select and add comment annotation on the entire text content of the target elementId.
User object from whom the Comment Annotation is added
User object to whom the comment is assigned
Custom key/value metadata object
Example Requests
1. Update all comment annotations by organizationId and documentId
{
"data": {
"organizationId": "yourOrganizationId",
"documentId": "yourDocumentId",
"updatedData" : {
"status": {
"type": "ongoing"
}
}
}
}
2. Update comment annotations by organizationId, documentId and locationIds
{
"data": {
"organizationId": "yourOrganizationId",
"documentId": "yourDocumentId",
"locationIds": [
"locationx"
],
"updatedData" : {
"status": {
"type": "ongoing"
}
}
}
}
3. Update annotations by organizationId, documentId, locationIds and userIds
{
"data": {
"organizationId": "yourOrganizationId",
"documentId": "yourDocumentId",
"locationIds": [
"locationx"
],
"userIds": [
"yourUserId"
],
"updatedData" : {
"status": {
"type": "ongoing"
}
}
}
}
4. Update comment annotations by organizationId, documentId and userIds
{
"data": {
"organizationId": "yourOrganizationId",
"documentId": "yourDocumentId",
"userIds": [
"yourUserId"
],
"updatedData" : {
"status": {
"type": "ongoing"
}
}
}
}
5. Update comment annotations by organizationId, documentId and annotationIds
{
"data": {
"organizationId": "yourOrganizationId",
"documentId": "yourDocumentId",
"annotationIds": [
"yourAnnotationId1",
"yourAnnotationId2"
],
"updatedData" : {
"status": {
"type": "ongoing"
}
}
}
}
6. Update comment annotations by organizationId, documentId, locationIds and annotationIds
{
"data": {
"organizationId": "yourOrganizationId",
"documentId": "yourDocumentId",
"locationIds": [
"locationx"
],
"annotationIds": [
"yourAnnotationId1",
"yourAnnotationId2"
],
"updatedData" : {
"status": {
"type": "ongoing"
}
}
}
}
Response
Success Response
{
"result": {
"status": "success",
"message": "Annotations updated successfully.",
"data": [
"yourAnnotationId1",
"yourAnnotationId2",
"yourAnnotationId3",
"yourAnnotationId4",
"yourAnnotationId5",
"yourAnnotationId6",
"yourAnnotationId7"
]
}
}
Failure Response
{
"error": {
"message": "ERROR_MESSAGE",
"status": "INVALID_ARGUMENT"
}
}
{
"result": {
"status": "success",
"message": "Annotations updated successfully.",
"data": [
"yourAnnotationId1",
"yourAnnotationId2",
"yourAnnotationId3",
"yourAnnotationId4",
"yourAnnotationId5",
"yourAnnotationId6",
"yourAnnotationId7"
]
}
}
Was this page helpful?
curl --request POST \
--url https://api.velt.dev/v1/commentannotations/update \
--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>",
"locationIds": [
"<string>"
],
"userIds": [
"<string>"
],
"annotationIds": [
"<string>"
],
"updatedData": [
{
"location": {
"id": "<string>",
"locationName": "<string>"
},
"targetElement": {
"elementId": "<string>",
"targetText": "<string>",
"occurrence": 123,
"selectAllContent": true
},
"commentData": [
{
"commentText": "<string>",
"commentHtml": "<string>",
"from": {}
}
],
"from": {},
"status": {
"type": "<string>",
"lightColor": "<string>",
"svg": "<string>",
"iconUrl": "<string>"
},
"assignedTo": {},
"context": {},
"priority": {
"id": "<string>",
"color": "<string>",
"name": "<string>",
"lightColor": "<string>"
}
}
]
}
}'
{
"result": {
"status": "success",
"message": "Annotations updated successfully.",
"data": [
"yourAnnotationId1",
"yourAnnotationId2",
"yourAnnotationId3",
"yourAnnotationId4",
"yourAnnotationId5",
"yourAnnotationId6",
"yourAnnotationId7"
]
}
}