---
title: "Get messages from a chat"
method: GET
path: "/chats/{userUuid}/messages"
---

# Get messages from a chat

`GET /chats/{userUuid}/messages`

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

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](https://api.fanvue.com/docs/creator/messages).
</Info>

## Path parameters

- `userUuid` string, uuid, required

## Query parameters

- `page` integer — Page number to retrieve (starts from 1)
- `size` integer — Number of items to return per page (1-50, default: 15)
- `markAsRead` 'true' | 'false' — Whether to mark the chat as read after retrieving messages
- `beforeMessageUuid` string, uuid — Anchor cursor: return messages older than this message UUID. Takes precedence over `page`.
- `startDate` string, 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`.
- `endDate` string, 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-Version` string, required

## Response `200`

List of messages

- object
  - `data` object[], required — Array of messages in the conversation
    - `uuid` string, uuid, required
    - `text` string, nullable, required
    - `sentAt` string, date, nullable, required
    - `sender` object, required
      - `uuid` string, uuid, required
      - `handle` string, required
    - `recipient` object, required
      - `uuid` string, uuid
      - `handle` string
    - `hasMedia` boolean, nullable, required
    - `mediaType` 'image' | 'video' | 'audio' | 'document', nullable, required
    - `mediaUuids` string[], required — Ordered list of media UUIDs attached to this message (display order)
    - `mediaPreviewUuid` string, uuid, nullable, required — UUID of the media item shown for free as a preview of this pay-to-view message, or null when no free preview was configured. Mirrors the `mediaPreviewUuid` set when sending the message.
    - `gif` object, nullable, required — The third-party GIF attached to this message, or null for an ordinary message. A GIF message carries no media and no price, but `text` may be set — a GIF can be sent with a caption.
      - `id` string, required — The GIF provider's durable identifier for this GIF. Stable across renditions; use it to de-duplicate or re-resolve the GIF.
      - `format` 'GIF' | 'WEBP' | 'MP4' | 'WEBM', required — Encoding of the asset at `url`. Only `GIF` and `WEBP` are produced today, and both render in a plain <img> tag.
      - `title` string, nullable, required — Human-readable GIF title, suitable as alt text.
      - `url` string, nullable, required — Hotlink URL of the GIF, served from the provider's CDN — Fanvue does not host or proxy the asset. Null when the URL is temporarily withheld; the message is still a GIF message, so render a placeholder at `width`/`height` rather than treating it as empty.
      - `width` integer, required — Intrinsic width of the asset at `url`, in pixels
      - `height` integer, required — Intrinsic height of the asset at `url`, in pixels
    - `type` 'AUTOMATED_CANCELED' | 'AUTOMATED_NEW_FOLLOWER' | 'AUTOMATED_NEW_PURCHASE' | 'AUTOMATED_NEW_SUBSCRIBER' | 'AUTOMATED_RE_SUBSCRIBED' | 'AUTOMATED_RENEWED' | 'AUTOMATED_CHAT_MESSAGE_REPLY' | 'AUTOMATED_FIRST_MESSAGE_REPLY' | 'CHAT_TEXT_GENERATION' | 'CHAT_TEXT_REPLY' | 'CHAT_TEXT_REWRITE' | 'SINGLE_RECIPIENT' | 'TIP' | 'VOICE_CALL' | 'BROADCAST' | 'GHOST_PROMOTION', required
    - `pricing` object, nullable, required — Pricing information for pay-to-view messages
      - `USD` object, required
        - `price` number, required — Price in cents
    - `purchasedAt` string, date, nullable, required — Timestamp when this message was purchased, or null if not purchased
    - `tipSource` 'chat' | 'post' | 'media_link', nullable, required — For TIP messages, where the tip originated: 'chat' (direct in-chat tip), 'post' (tipped a feed post) or 'media_link' (tipped via a shared media link). Null for non-tip messages.
    - `sentByUserId` string, uuid, nullable, required — UUID of the team member who sent the message on behalf of the creator, or null if sent directly by the creator
    - `isRead` boolean, required — Whether the message has been read by the recipient
  - `pagination` object, required — Pagination information
    - `page` number, required — Current page number
    - `size` number, required — Number of records returned in this response
    - `hasMore` boolean, required — Whether there are more items available on subsequent pages

## Other responses

- `400` — Bad Request - API version not supported OR validation failed OR invalid UUID
- `401` — Unauthorized Response
- `403` — Unauthorized Response
- `404` — No conversation found with the given user
- `410` — API version no longer supported (sunset)
- `429` — Too many requests - rate limit exceeded

---

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