Skip to main content
POST
/
v2
/
activities
/
get
Get Activity Logs
curl --request POST \
  --url https://api.velt.dev/v2/activities/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>",
    "targetEntityId": "<string>",
    "featureTypes": [
      "<string>"
    ],
    "actionTypes": [
      "<string>"
    ],
    "userId": "<string>",
    "activityIds": [
      "<string>"
    ],
    "order": "<string>",
    "pageSize": 123,
    "pageToken": "<string>"
  }
}
'
{
  "result": {
    "status": "success",
    "message": "Activity(s) retrieved successfully.",
    "data": [
      {
        "id": "activity-001",
        "featureType": "comment",
        "actionType": "comment.add",
        "actionUser": {
          "userId": "user-1",
          "email": "user@example.com",
          "name": "User Name"
        },
        "targetEntityId": "annotation-789",
        "displayMessageTemplate": "{{user}} added a comment",
        "displayMessageTemplateData": {
          "user": {
            "userId": "user-1",
            "name": "User Name"
          }
        },
        "metadata": {
          "apiKey": "yourApiKey",
          "documentId": "doc-456",
          "organizationId": "org-123"
        },
        "timestamp": 1722409519944
      }
    ],
    "pageToken": "nextPageToken"
  }
}
Use this API to retrieve activity log records for a document or organization.

Endpoint

POST https://api.velt.dev/v2/activities/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 by organizationId and documentId

{
  "data": {
    "organizationId": "org-123",
    "documentId": "doc-456",
    "order": "desc",
    "pageSize": 50
  }
}

2. Get by organizationId, documentId and featureTypes

{
  "data": {
    "organizationId": "org-123",
    "documentId": "doc-456",
    "featureTypes": ["comment"],
    "order": "desc",
    "pageSize": 50
  }
}

3. Get specific activity logs by activityIds

{
  "data": {
    "organizationId": "org-123",
    "activityIds": ["activity-001", "activity-002"]
  }
}

4. Get by targetEntityId with pagination

{
  "data": {
    "organizationId": "org-123",
    "documentId": "doc-456",
    "targetEntityId": "annotation-789",
    "pageSize": 20,
    "pageToken": "encryptedPageToken"
  }
}

Response

Success Response

{
  "result": {
    "status": "success",
    "message": "Activity(s) retrieved successfully.",
    "data": [
      {
        "id": "activity-001",
        "featureType": "comment",
        "actionType": "comment.add",
        "actionUser": {
          "userId": "user-1",
          "email": "user@example.com",
          "name": "User Name"
        },
        "targetEntityId": "annotation-789",
        "displayMessageTemplate": "{{user}} added a comment",
        "displayMessageTemplateData": {
          "user": {
            "userId": "user-1",
            "name": "User Name"
          }
        },
        "metadata": {
          "apiKey": "yourApiKey",
          "documentId": "doc-456",
          "organizationId": "org-123"
        },
        "timestamp": 1722409519944
      }
    ],
    "pageToken": "nextPageToken"
  }
}

Failure Response

{
  "error": {
    "message": "ERROR_MESSAGE",
    "status": "INVALID_ARGUMENT"
  }
}
{
  "result": {
    "status": "success",
    "message": "Activity(s) retrieved successfully.",
    "data": [
      {
        "id": "activity-001",
        "featureType": "comment",
        "actionType": "comment.add",
        "actionUser": {
          "userId": "user-1",
          "email": "user@example.com",
          "name": "User Name"
        },
        "targetEntityId": "annotation-789",
        "displayMessageTemplate": "{{user}} added a comment",
        "displayMessageTemplateData": {
          "user": {
            "userId": "user-1",
            "name": "User Name"
          }
        },
        "metadata": {
          "apiKey": "yourApiKey",
          "documentId": "doc-456",
          "organizationId": "org-123"
        },
        "timestamp": 1722409519944
      }
    ],
    "pageToken": "nextPageToken"
  }
}