---
title: "Get metadata on all Chat Messages"
method: GET
path: "/v2/chat-messages"
tags: ["Chat Messages"]
---

# Get metadata on all Chat Messages

`GET /v2/chat-messages`

Paginate through all chat messages in Affinity. Returns basic information about the chat message
interaction and its participants. Will only return chat messages that the current authenticated
user has permission to see.

You can filter chat messages using the `filter` query parameter. The filter parameter is a string that you can specify conditions based on the following properties.
| **Property Name** | **Type** | **Allowed Operators** | **Examples** |
|---|---|---|---|
| `id` | `int64` | `=` | `id=1\|id=2\|id=3` |
| `sentAt` | `datetime` | `>`, `<`, `>=`, `<=` | `sentAt>2025-01-01T01:00:00Z` |
| `createdAt` | `datetime` | `>`, `<`, `>=`, `<=` | `createdAt<2025-01-01T01:00:00Z` |
| `updatedAt` | `datetime` | `>`, `<`, `>=`, `<=` | `updatedAt>=2025-01-01T01:00:00Z` |

## Query parameters

- `cursor` string
- `limit` integer
- `filter` string

## Response `200`

OK

- InteractionsChatMessagePaged — ChatMessagePaged model
  - `data` InteractionsChatMessage[], required — A page of ChatMessage results
    - `id` integer, required — The chat message's unique identifier
    - `sentAt` string, date-time, required — The timestamp of when the chat message was sent
    - `loggingType` 'manual', required — Indicates how the interaction was added to Affinity: either manually by a user ('manual') or automatically through Affinity's capture process ('automated'). Currently, chat messages can only be logged as 'manual'.
    - `direction` 'sent' | 'received', required — The direction of the chat message
    - `creator` PersonData, required
      - `id` integer, required — The persons's unique identifier
      - `firstName` string, nullable, required — The person's first name
      - `lastName` string, nullable, required — The person's last name
      - `primaryEmailAddress` string, email, nullable, required — The person's primary email address
      - `type` 'internal' | 'collaborator' | 'external', required — The person's type. `internal` - people who are users within your Affinity instance. `collaborator` - individuals outside of your company who have read-only access to specified Affinity list views and stay updated on your firm's activities. `external` - people who are not internal nor collaborators.
    - `createdAt` string, date-time, required — The timestamp of when the chat message was created
    - `updatedAt` string, date-time, nullable, required — The timestamp of when the chat message was updated
    - `participantsPreview` PersonDataPreview, required
      - `data` PersonData[], required — A preview of persons
        - `id` integer, required — The persons's unique identifier
        - `firstName` string, nullable, required — The person's first name
        - `lastName` string, nullable, required — The person's last name
        - `primaryEmailAddress` string, email, nullable, required — The person's primary email address
        - `type` 'internal' | 'collaborator' | 'external', required — The person's type. `internal` - people who are users within your Affinity instance. `collaborator` - individuals outside of your company who have read-only access to specified Affinity list views and stay updated on your firm's activities. `external` - people who are not internal nor collaborators.
      - `totalCount` integer, required — The total count of persons
  - `pagination` Pagination, required
    - `prevUrl` string, uri, nullable — URL for the previous page
    - `nextUrl` string, uri, nullable — URL for the next page

## Other responses

- `400` — Bad Request
- `default` — Errors

---

[API](https://skmtc.net/affinity/apis/affinity-api-v2.md) · [All operations](https://skmtc.net/affinity/apis/affinity-api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/affinity/affinity-api-v2/revisions/4c2891c31b7f/schema)
