---
title: "Get the cross-channel activity timeline for a profile or company within an optional time span"
method: GET
path: "/api/v1/activity"
tags: ["Activity"]
---

# Get the cross-channel activity timeline for a profile or company within an optional time span

`GET /api/v1/activity`

## Request

- Base URL: `https://api.intheloop.io`
- URL: `https://api.intheloop.io/api/v1/activity`
- Auth: API key in header `Authorization`

## Query parameters

- `id` string
- `size` integer
- `dateTimeStart` string, date-time
- `dateTimeEnd` string, date-time
- `offsetHistoryId` string
- `channelType` string

## Headers

- `Authorization` string
- `X-Impersonate-User` string

## Response `200`

OK

- ActivityTimeline: Activity timeline for a contact — a chronological, cross-channel view of all comments involving the contact within the requested time span (or all time if no span is set). Consecutive comments from the same conversation are collapsed into a single ActivityEvent. Events are ordered newest-first. At most 20 events are returned.
  - `id` string: Resource id
  - `name` string: Resource name or title
  - `revision` string: Resource revision
  - `clientId` string: Resource client id
  - `$type` string, required
  - `dateTimeStart` string, date-time: Start of the requested time span (UTC). Null means no lower limit was applied.
  - `dateTimeEnd` string, date-time: End of the requested time span (UTC). Null means the timeline ends at request time.
  - `events` ActivityEvent[]: Activity event groups ordered newest-first (max 20). Each group represents one run of consecutive comments from the same conversation.
    - `id` string: Resource id
    - `name` string: Resource name or title
    - `revision` string: Resource revision
    - `clientId` string: Resource client id
    - `$type` string, required
    - `conversationId` string: Id of the card (conversation) this group belongs to.
    - `channelType` string: Channel type of the conversation (e.g. "email", "phone", "sms"). Sourced from CardBase.ChannelType on the comment's parent card.
    - `direction` 'Incoming' | 'Outgoing', required: Whether the event was initiated by the customer (Incoming) or by the team (Outgoing).
    - `timestamp` string, date-time: UTC timestamp of the most recent comment in this group.
    - `author` User: User contact resource.
      - `id` string: Resource id
      - `name` string: Resource name or title
      - `revision` string: Resource revision
      - `clientId` string: Resource client id
      - `$type` string, required
      - `tags` ListOfTags: List of tags resource
        - `id` string: Resource id
        - `name` string: Resource name or title
        - `revision` string: Resource revision
        - `clientId` string: Resource client id
        - `$type` string, required
        - `tags` ListOfResourcesOfTag: List of resources
          - `resources` Tag[]: List of resources
            - `id` string: Resource id
            - `name` string: Resource name or title
            - `revision` string: Resource revision
            - `clientId` string: Resource client id
            - `$type` string, required
            - `tagType` string: Tag type. If TagType is the same as Id, that means that this is a system board and can not be altered by clients
          - `size` integer, required: Page size
          - `offset` integer, required: Page offset
          - `offsetHistoryId` string: Offset history id
          - `totalSize` integer, required: Total size (if total size is at least one bigger than size, then there are more resources). Total size does not necessarily mean the actual total size
        - `parent` ResourceBase: Resource base
          - `id` string: Resource id
          - `name` string: Resource name or title
          - `revision` string: Resource revision
          - `clientId` string: Resource client id
          - `$type` string, required
      - `weight` number: Usage weight.
      - `created` string, date-time: Date time of contact creation
      - `modified` string, date-time: Date time of last time contact was modified
      - `userIdentificator` string: User's Identificator for EmailUser is email for phone is telephone, ....
      - `userType` 'EmailUser' | 'ViberUser' | 'MessengerUser' | 'WhatsappUser' | 'PhoneUser', required: User types
      - `email` string: User's email address
      - `firstName` string: User's first name
      - `lastName` string: User's last name
      - `onlineStatus` string: Online status (possible values can be seen at enums/UserStatus)
      - `lastActivityAt` string, date-time: Date time of the user's last activity
      - `displayName` string: User's display name, set only for senders and should be displayed per comment, mostly nullable
      - `changableDisplayName` boolean: ChangableDisplayName indicates that user has changable name (example github notification user)
      - `availabilityStatus` AvailabilityUserStatus: Subscription availability status for user
        - `status` string: Status
        - `emoji` string: Availability Emoji
        - `clearAfter` string, date-time: Availability clear after in minutes
        - `enabledAssignments` boolean, required: Availability available for assignments
        - `outOfOffice` boolean, required: Availability out of office
    - `to` ContactBase[]: Recipients of the most recent comment in this group.
      - `id` string: Resource id
      - `name` string: Resource name or title
      - `revision` string: Resource revision
      - `clientId` string: Resource client id
      - `$type` string, required
      - `tags` ListOfTags: List of tags resource
        - `id` string: Resource id
        - `name` string: Resource name or title
        - `revision` string: Resource revision
        - `clientId` string: Resource client id
        - `$type` string, required
        - `tags` ListOfResourcesOfTag: List of resources
          - `resources` Tag[]: List of resources
            - `id` string: Resource id
            - `name` string: Resource name or title
            - `revision` string: Resource revision
            - `clientId` string: Resource client id
            - `$type` string, required
            - `tagType` string: Tag type. If TagType is the same as Id, that means that this is a system board and can not be altered by clients
          - `size` integer, required: Page size
          - `offset` integer, required: Page offset
          - `offsetHistoryId` string: Offset history id
          - `totalSize` integer, required: Total size (if total size is at least one bigger than size, then there are more resources). Total size does not necessarily mean the actual total size
        - `parent` ResourceBase: Resource base
          - `id` string: Resource id
          - `name` string: Resource name or title
          - `revision` string: Resource revision
          - `clientId` string: Resource client id
          - `$type` string, required
      - `weight` number: Usage weight.
      - `created` string, date-time: Date time of contact creation
      - `modified` string, date-time: Date time of last time contact was modified
    - `subject` string: Email subject line; null for non-email channels.
    - `snippet` string: Plain-text snippet of the most recent comment body.
    - `commentCount` integer, required: Total number of comments collapsed into this group (always >= 1). When > 1, OlderComments carries the earlier items.
    - `olderComments` ActivityComment[]: Older comments in this group (all except the most recent primary row), ordered newest-first. Empty when the group contains only one comment.
      - `id` string: Comment id.
      - `timestamp` string, date-time: UTC timestamp of the comment.
      - `author` User: User contact resource.
        - `id` string: Resource id
        - `name` string: Resource name or title
        - `revision` string: Resource revision
        - `clientId` string: Resource client id
        - `$type` string, required
        - `tags` ListOfTags: List of tags resource
          - `id` string: Resource id
          - `name` string: Resource name or title
          - `revision` string: Resource revision
          - `clientId` string: Resource client id
          - `$type` string, required
          - `tags` ListOfResourcesOfTag: List of resources
            - `resources` Tag[]: List of resources
              - …
            - `size` integer, required: Page size
            - `offset` integer, required: Page offset
            - `offsetHistoryId` string: Offset history id
            - `totalSize` integer, required: Total size (if total size is at least one bigger than size, then there are more resources). Total size does not necessarily mean the actual total size
          - `parent` ResourceBase: Resource base
            - `id` string: Resource id
            - `name` string: Resource name or title
            - `revision` string: Resource revision
            - `clientId` string: Resource client id
            - `$type` string, required
        - `weight` number: Usage weight.
        - `created` string, date-time: Date time of contact creation
        - `modified` string, date-time: Date time of last time contact was modified
        - `userIdentificator` string: User's Identificator for EmailUser is email for phone is telephone, ....
        - `userType` 'EmailUser' | 'ViberUser' | 'MessengerUser' | 'WhatsappUser' | 'PhoneUser', required: User types
        - `email` string: User's email address
        - `firstName` string: User's first name
        - `lastName` string: User's last name
        - `onlineStatus` string: Online status (possible values can be seen at enums/UserStatus)
        - `lastActivityAt` string, date-time: Date time of the user's last activity
        - `displayName` string: User's display name, set only for senders and should be displayed per comment, mostly nullable
        - `changableDisplayName` boolean: ChangableDisplayName indicates that user has changable name (example github notification user)
        - `availabilityStatus` AvailabilityUserStatus: Subscription availability status for user
          - `status` string: Status
          - `emoji` string: Availability Emoji
          - `clearAfter` string, date-time: Availability clear after in minutes
          - `enabledAssignments` boolean, required: Availability available for assignments
          - `outOfOffice` boolean, required: Availability out of office
      - `to` ContactBase[]: Recipients of this comment.
        - `id` string: Resource id
        - `name` string: Resource name or title
        - `revision` string: Resource revision
        - `clientId` string: Resource client id
        - `$type` string, required
        - `tags` ListOfTags: List of tags resource
          - `id` string: Resource id
          - `name` string: Resource name or title
          - `revision` string: Resource revision
          - `clientId` string: Resource client id
          - `$type` string, required
          - `tags` ListOfResourcesOfTag: List of resources
            - `resources` Tag[]: List of resources
              - …
            - `size` integer, required: Page size
            - `offset` integer, required: Page offset
            - `offsetHistoryId` string: Offset history id
            - `totalSize` integer, required: Total size (if total size is at least one bigger than size, then there are more resources). Total size does not necessarily mean the actual total size
          - `parent` ResourceBase: Resource base
            - `id` string: Resource id
            - `name` string: Resource name or title
            - `revision` string: Resource revision
            - `clientId` string: Resource client id
            - `$type` string, required
        - `weight` number: Usage weight.
        - `created` string, date-time: Date time of contact creation
        - `modified` string, date-time: Date time of last time contact was modified
      - `direction` 'Incoming' | 'Outgoing', required: Whether the event was initiated by the customer (Incoming) or by the team (Outgoing).
      - `snippet` string: Plain-text snippet of the comment body.
  - `offsetHistoryId` string: Cursor for the next (older) page of events. Pass it back as offsetHistoryId. Null when there are no more events.

## Other responses

- `400`: Bad request. Check fields message and error code from response body for additional information.
- `401`: Unauthorized request. Check fields message and error code from response body for additional information.
- `403`: Requested resource forbidden.Check fields message and error code from response body for additional information.
- `404`: Requested resource not found.
- `429`: Too many requests. Check response header Retry-After indicating how long to wait before making a new request.
- `451`: Unavailable because account is not verified.

---

[API](https://skmtc.dev/intheloop/apis/loop-api.md) - [All operations](https://skmtc.dev/intheloop/apis/loop-api/llms.txt) - [OpenAPI document](https://skmtc.dev/intheloop/apis/loop-api/revisions/0892c5ba0787?raw)
