Get messages from a chat

Changed on

Returns a paginated list of text messages between the authenticated user and the specified user. Messages are ordered by creation date (newest first).

The thread includes mass (broadcast) messages the creator sent that reached this user, interleaved with the 1:1 messages by publish date. POST /chats/messages/batch returns direct messages only, so the two endpoints return different messages for the same chat.

Pass beforeMessageUuid to anchor pagination to a known message and fetch the messages immediately older than it (stable keyset pagination). When supplied, beforeMessageUuid takes precedence over page; an unknown or unpublished anchor is ignored and the first page is returned.

Pass startDate and/or endDate to restrict results to a time window on the message publish date. Both are optional and combine with page/size pagination. Both bounds are exclusive: startDate returns messages published strictly after it, endDate messages published strictly before it. This is the recommended way to fetch "what changed since X" instead of paging blindly after a mass message.

Note that endDate suppresses markAsRead: because an upper-bounded window deliberately excludes the newest messages, marking the conversation read would clear unread state on messages this call never returned. Requests carrying endDate therefore never mark the chat as read, whatever markAsRead is set to.

<Info> **Polling for real-time updates? Use a webhook instead.**

If you are calling this endpoint on a schedule to detect new activity, subscribe to the creator.message.received, creator.message.sent, creator.message.deleted, creator.message.reaction webhook events instead — you'll get pushed updates in real time without polling. See the webhook documentation. </Info>

get/chats/{userUuid}/messages

Request

  • Base URL
    https://api.fanvue.com
  • Auth
    OAuth 2
    Authorization codehttps://auth.fanvue.com/oauth2/auth
    Token URLhttps://auth.fanvue.com/oauth2/token
    Scopesread:chat

Path parameters

userUuidstring uuid required

Query parameters

pageinteger

Page number to retrieve (starts from 1)

sizeinteger

Number of items to return per page (1-50, default: 15)

markAsRead'true' | 'false'

Whether to mark the chat as read after retrieving messages

beforeMessageUuidstring uuid

Anchor cursor: return messages older than this message UUID. Takes precedence over page.

startDatestring date-time

Only return messages published after this ISO 8601 datetime (with optional timezone offset, e.g. 2024-10-20T00:00:00+01:00 or 2024-10-20T00:00:00Z). Exclusive lower bound. Combines with page/size.

endDatestring date-time

Only return messages published before this ISO 8601 datetime (with optional timezone offset, e.g. 2024-10-25T00:00:00+01:00 or 2024-10-25T00:00:00Z). Non-inclusive - messages before this date are included. Combines with page/size.

Headers

X-Fanvue-API-Versionstring required
Example:2025-06-26

API version to use for the request

Response

List of messages

Changes

    • warning

      added the new AUTOMATED_FREE_TRIAL_ENDING enum value to the data/items/type response property for the response status

    • warning

      added the new AUTOMATED_NEW_FREE_TRIAL enum value to the data/items/type response property for the response status

    • warning

      added the new Too many concurrent requests enum value to the error response property for the response status

    2 more changes in this revision