curl --request POST \
--url https://api.velt.dev/v2/activities/add \
--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>",
"activities": [
{
"featureType": "<string>",
"actionType": "<string>",
"actionUser": {},
"targetEntityId": "<string>",
"targetSubEntityId": "<string>",
"changes": {},
"entityData": "<any>",
"entityTargetData": "<any>",
"displayMessageTemplate": "<string>",
"displayMessageTemplateData": {},
"actionIcon": "<string>"
}
]
}
}
'{
"result": {
"status": "success",
"message": "Activity(s) added successfully.",
"data": {
"success": true,
"message": "Activity(s) added successfully."
}
}
}
curl --request POST \
--url https://api.velt.dev/v2/activities/add \
--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>",
"activities": [
{
"featureType": "<string>",
"actionType": "<string>",
"actionUser": {},
"targetEntityId": "<string>",
"targetSubEntityId": "<string>",
"changes": {},
"entityData": "<any>",
"entityTargetData": "<any>",
"displayMessageTemplate": "<string>",
"displayMessageTemplateData": {},
"actionIcon": "<string>"
}
]
}
}
'{
"result": {
"status": "success",
"message": "Activity(s) added successfully.",
"data": {
"success": true,
"message": "Activity(s) added successfully."
}
}
}
activityServiceConfig to be enabled at the workspace level in the Velt Console.POST https://api.velt.dev/v2/activities/add
Show properties
Show properties
"comment")."comment.add").{ from, to } objects describing what changed.{{variable}} syntax for dynamic values.displayMessageTemplate variables.{
"data": {
"organizationId": "org-123",
"documentId": "doc-456",
"activities": [
{
"featureType": "comment",
"actionType": "comment.add",
"actionUser": {
"userId": "user-1",
"email": "user@example.com",
"name": "User Name"
},
"targetEntityId": "annotation-789",
"displayMessageTemplate": "{{user}} added a comment"
}
]
}
}
{
"data": {
"organizationId": "org-123",
"documentId": "doc-456",
"activities": [
{
"featureType": "comment",
"actionType": "comment.update",
"actionUser": {
"userId": "user-1",
"email": "user@example.com",
"name": "User Name"
},
"targetEntityId": "annotation-789",
"targetSubEntityId": "comment-001",
"changes": {
"commentText": {
"from": "Original text",
"to": "Updated text"
}
},
"displayMessageTemplate": "{{user}} updated a comment",
"displayMessageTemplateData": {
"user": {
"userId": "user-1",
"name": "User Name"
}
}
}
]
}
}
{
"result": {
"status": "success",
"message": "Activity(s) added successfully.",
"data": {
"success": true,
"message": "Activity(s) added successfully."
}
}
}
{
"error": {
"message": "ERROR_MESSAGE",
"status": "INVALID_ARGUMENT"
}
}
{
"result": {
"status": "success",
"message": "Activity(s) added successfully.",
"data": {
"success": true,
"message": "Activity(s) added successfully."
}
}
}
Was this page helpful?