chatMessages

Operations about chat messages

Get metadata on all 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 Description Type Allowed Operators Examples
id Unique identifier for Chat Messages int64 = id=1
sentAt When the Chat Message was sent at datetime >, <, >=, <= sentAt>2025-01-01T01:00:00Z
createdAt When the Chat Message was created in Affinity datetime >, <, >=, <= createdAt<2025-01-01T01:00:00Z
updatedAt When the Chat Message was updated in Affinity datetime >, <, >=, <= updatedAt>=2025-01-01T01:00:00Z
SecuritybearerAuth
Request
query Parameters
cursor
string

Cursor for the next or previous page

Example: cursor=ICAgICAgYmVmb3JlOjo6Nw
limit
integer <int32> [ 1 .. 100 ]
Default: 100

Number of items to include in the page

Example: limit=100
filter
string

Filter options

Example: filter=id=1234
Responses
200

OK

Response Headers
X-Ratelimit-Limit-User
integer

Number of requests allowed per minute for the user

X-Ratelimit-Limit-User-Remaining
integer

Number of requests remaining for the user

X-Ratelimit-Limit-User-Reset
integer

Time in seconds before the limit resets for the user

X-Ratelimit-Limit-Org
integer

Number of requests allowed per month for the account

X-Ratelimit-Limit-Org-Remaining
integer

Number of requests remaining for the account

X-Ratelimit-Limit-Org-Reset
integer

Time in seconds before the limit resets for the account

Response Schema: application/json
required
Array of objects (interactions.ChatMessage) <= 100 items

A page of ChatMessage results

Array (<= 100 items)
id
required
integer <int64> [ 1 .. 9007199254740991 ]

The chat message's unique identifier

sentAt
required
string <date-time>

The timestamp of when the chat message was sent

loggingType
required
string

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'.

Value: "manual"
direction
required
string

The direction of the chat message

Enum: "sent" "received"
required
object (PersonData)

The creator of the chat message

createdAt
required
string <date-time>

The timestamp of when the chat message was created

updatedAt
required
string or null <date-time>

The timestamp of when the chat message was updated

required
object (PersonDataPreview)

A preview of the participants who are in the chat message

required
object (Pagination)
prevUrl
string or null <uri>

URL for the previous page

nextUrl
string or null <uri>

URL for the next page

400

Bad Request

default

Errors

get/v2/chat-messages
Request samples
Response samples
application/json
{
  • "data": [
    ],
}