Skip to main content

Get Chat Messages

GET 

/chat.history

List messages in a chat, filtered by date range (after/before).

The ordering of results depends on ascending and after:

  • ascending=true sorts in forward chronological order (oldest first). ascending=false sorts in reverse chronological order (newest first), even when after is specified.

  • When ascending is omitted and after is not specified, the most recent messages are returned in reverse chronological order. This is equivalent to specifying before as NOW and leaving after unspecified.

  • When ascending is omitted and after is specified, the results are sorted in forward chronological order.

Send the same ascending value on every page. The cursor marks where to resume, not which direction to sort.

Either dates or datetimes may be specified. Dates are interpreted in UTC.

Note that the API operates in UTC with respect to the date range filter.

Access: Organization and Personal. In Personal mode, only chats where the authenticated user is a participant are accessible.

Required scope: chat:history


OpenAPI Spec: chat.json

Request​

Responses​

Info retrieved successfully