---
title: "Get activities by IDs"
method: POST
path: "/activities/fetch"
tags: ["Activity Records"]
---

# Get activities by IDs

`POST /activities/fetch`

## Request

- Base URL: `https://api.surense.com/api/v1`
- URL: `https://api.surense.com/api/v1/activities/fetch`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://api.surense.com/oauth/token`

Retrieves the activity records with the given IDs, limited to those logged against the given parent entity. IDs that do not exist, belong to another entity or are not visible to the caller are silently left out.

**Authorization.** The caller must be able to access the parent entity. No OAuth2 scope beyond a valid token is required.

**Errors.** `400` if no parent entity ID or no activity ID is given, and `400` with error code `40000` if the caller cannot access the parent entity; `404` if the parent entity does not exist in the caller's tenant.

## Request body

- GetActivitiesByIdsRequest
  - `employerId` string, uuid
  - `customerId` string, uuid
  - `leadId` string, uuid
  - `workflowId` string, uuid
  - `meetingId` string, uuid
  - `ids` string[], required

## Response `200`

The matching activity records (possibly fewer than requested)

- ActivityRecordSearchView[]
  - `id` string, uuid
  - `version` integer
  - `typeId` string, uuid
  - `jsonContent` JsonNode: Rich-text content of the activity as JSON (the editor's document model), stored alongside htmlContent
    - `empty` boolean
    - `array` boolean
    - `null` boolean
    - `object` boolean
    - `float` boolean
    - `container` boolean
    - `string` boolean
    - `pojo` boolean
    - `floatingPointNumber` boolean
    - `short` boolean
    - `int` boolean
    - `long` boolean
    - `valueNode` boolean
    - `missingNode` boolean
    - `nodeType` 'ARRAY' | 'BINARY' | 'BOOLEAN' | 'MISSING' | 'NULL' | 'NUMBER' | 'OBJECT' | 'POJO' | 'STRING'
    - `integralNumber` boolean
    - `double` boolean
    - `bigDecimal` boolean
    - `bigInteger` boolean
    - `textual` boolean
    - `boolean` boolean
    - `binary` boolean
    - `number` boolean
    - `embeddedValue` boolean
  - `htmlContent` string
  - `createdBy` string, uuid
  - `employerId` string, uuid
  - `leadId` string, uuid
  - `customerId` string, uuid
  - `workflowId` string, uuid
  - `meetingId` string, uuid
  - `reactions` ActivityReaction[]
    - `id` string, uuid
    - `userId` string, uuid
    - `userName` string
    - `reaction` string
    - `reactedAt` string, date-time
  - `replies` ActivityReply[]
    - `id` string, uuid
    - `userId` string, uuid
    - `userName` string
    - `jsonContent` JsonNode: Rich-text content of the activity as JSON (the editor's document model), stored alongside htmlContent
      - `empty` boolean
      - `array` boolean
      - `null` boolean
      - `object` boolean
      - `float` boolean
      - `container` boolean
      - `string` boolean
      - `pojo` boolean
      - `floatingPointNumber` boolean
      - `short` boolean
      - `int` boolean
      - `long` boolean
      - `valueNode` boolean
      - `missingNode` boolean
      - `nodeType` 'ARRAY' | 'BINARY' | 'BOOLEAN' | 'MISSING' | 'NULL' | 'NUMBER' | 'OBJECT' | 'POJO' | 'STRING'
      - `integralNumber` boolean
      - `double` boolean
      - `bigDecimal` boolean
      - `bigInteger` boolean
      - `textual` boolean
      - `boolean` boolean
      - `binary` boolean
      - `number` boolean
      - `embeddedValue` boolean
    - `htmlContent` string
    - `createdAt` string, date-time
    - `updatedAt` string, date-time
    - `mentions` ActivityMention[]
      - `type` string
      - `entityId` string, uuid
      - `label` string
      - `order` integer
    - `reactions` ActivityReaction[]
      - `id` string, uuid
      - `userId` string, uuid
      - `userName` string
      - `reaction` string
      - `reactedAt` string, date-time
  - `tenantId` string, uuid
  - `createdDate` string, date-time
  - `creatorName` string
  - `lastEditedAt` string, date-time
  - `lastEditedBy` string, uuid
  - `lastModifiedDate` string, date-time
  - `lastModifiedBy` string, uuid

## Other responses

- `400`: No parent entity or activity ID given, or (error code 40000) the parent entity is not accessible
- `404`: Parent entity not found

---

[API](https://skmtc.dev/surense/apis/activity-api.md) - [All operations](https://skmtc.dev/surense/apis/activity-api/llms.txt) - [OpenAPI document](https://skmtc.dev/surense/apis/activity-api/revisions/1fa9c003b93b?raw)
