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": [
{
"id": "<string>",
"featureType": "<string>",
"actionType": "<string>",
"actionUser": {},
"targetEntityId": "<string>",
"targetSubEntityId": "<string>",
"changes": {},
"entityData": "<any>",
"entityTargetData": "<any>",
"displayMessageTemplate": "<string>",
"displayMessageTemplateData": {},
"actionIcon": "<string>",
"isActivityResolverUsed": true
}
]
}
}
'{
"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": [
{
"id": "<string>",
"featureType": "<string>",
"actionType": "<string>",
"actionUser": {},
"targetEntityId": "<string>",
"targetSubEntityId": "<string>",
"changes": {},
"entityData": "<any>",
"entityTargetData": "<any>",
"displayMessageTemplate": "<string>",
"displayMessageTemplateData": {},
"actionIcon": "<string>",
"isActivityResolverUsed": true
}
]
}
}
'{
"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", "reaction", "recorder", "crdt", "custom"."comment.add").featureType is "custom"; optional for all other feature types.{ from, to } objects describing what changed.{{variable}} syntax for dynamic values.displayMessageTemplate variables.true if you are using the activity resolver data provider in the SDK. When true, indicates that PII has been stripped from the activity record and the record is pending resolver re-hydration.{
"data": {
"organizationId": "org-123",
"documentId": "doc-456",
"activities": [
{
"featureType": "comment",
"actionType": "comment.add",
"actionUser": {
"userId": "user-1",
"email": "user@example.com",
"name": "User Name"
},
"displayMessageTemplate": "{{user}} added a comment"
}
]
}
}
{
"data": {
"organizationId": "org-123",
"documentId": "doc-456",
"activities": [
{
"id": "my-custom-activity-id",
"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": "custom",
"actionType": "statusChanged",
"actionUser": {
"userId": "user-1",
"email": "user@example.com",
"name": "User Name"
},
"targetEntityId": "entity-456",
"displayMessageTemplate": "{{user}} changed the status"
}
]
}
}
{
"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?