> ## Documentation Index
> Fetch the complete documentation index at: https://api.fanvue.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get messages from a chat

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

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

<Info>
  **Required scope**

  * `read:chat` — Read chat conversations, messages, and chat-related data. This includes viewing chat lists and message history.
</Info>


## OpenAPI

````yaml /openapi.json get /chats/{userUuid}/messages
openapi: 3.1.0
info:
  title: Fanvue API
  version: '0.1'
servers: []
security: []
paths:
  /chats/{userUuid}/messages:
    get:
      summary: Get messages from a chat
      description: >-
        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.


        <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>
      operationId: listMessages
      parameters:
        - $ref: '#/components/parameters/ApiVersionHeader'
        - schema:
            type: string
            format: uuid
          required: true
          name: userUuid
          in: path
        - schema:
            type: number
            minimum: 1
            default: 1
            description: Page number to retrieve (starts from 1)
          required: false
          description: Page number to retrieve (starts from 1)
          name: page
          in: query
        - schema:
            type: number
            minimum: 1
            maximum: 50
            default: 15
            description: 'Number of items to return per page (1-50, default: 15)'
          required: false
          description: 'Number of items to return per page (1-50, default: 15)'
          name: size
          in: query
        - schema:
            type: string
            enum:
              - 'true'
              - 'false'
            default: 'true'
            description: Whether to mark the chat as read after retrieving messages
          required: false
          description: Whether to mark the chat as read after retrieving messages
          name: markAsRead
          in: query
        - schema:
            type: string
            format: uuid
            description: >-
              Anchor cursor: return messages older than this message UUID. Takes
              precedence over `page`.
          required: false
          description: >-
            Anchor cursor: return messages older than this message UUID. Takes
            precedence over `page`.
          name: beforeMessageUuid
          in: query
      responses:
        '200':
          description: List of messages
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        uuid:
                          type: string
                          format: uuid
                        text:
                          type:
                            - string
                            - 'null'
                        sentAt:
                          type:
                            - string
                            - 'null'
                          format: date
                        sender:
                          type: object
                          properties:
                            uuid:
                              type: string
                              format: uuid
                            handle:
                              type: string
                          required:
                            - uuid
                            - handle
                        recipient:
                          type: object
                          properties:
                            uuid:
                              type: string
                              format: uuid
                            handle:
                              type: string
                        hasMedia:
                          type:
                            - boolean
                            - 'null'
                        mediaType:
                          type:
                            - string
                            - 'null'
                          enum:
                            - image
                            - video
                            - audio
                            - document
                        mediaUuids:
                          type: array
                          items:
                            type: string
                            format: uuid
                          description: >-
                            Ordered list of media UUIDs attached to this message
                            (display order)
                        mediaPreviewUuid:
                          type:
                            - string
                            - 'null'
                          format: uuid
                          description: >-
                            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.
                        type:
                          type: string
                          enum:
                            - 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
                        pricing:
                          type:
                            - object
                            - 'null'
                          properties:
                            USD:
                              type: object
                              properties:
                                price:
                                  type: number
                                  description: Price in cents
                              required:
                                - price
                          required:
                            - USD
                          description: Pricing information for pay-to-view messages
                        purchasedAt:
                          type:
                            - string
                            - 'null'
                          format: date
                          description: >-
                            Timestamp when this message was purchased, or null
                            if not purchased
                        tipSource:
                          type:
                            - string
                            - 'null'
                          enum:
                            - chat
                            - post
                            - media_link
                          description: >-
                            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:
                          type:
                            - string
                            - 'null'
                          format: uuid
                          description: >-
                            UUID of the team member who sent the message on
                            behalf of the creator, or null if sent directly by
                            the creator
                        isRead:
                          type: boolean
                          description: Whether the message has been read by the recipient
                      required:
                        - uuid
                        - text
                        - sentAt
                        - sender
                        - recipient
                        - hasMedia
                        - mediaType
                        - mediaUuids
                        - mediaPreviewUuid
                        - type
                        - pricing
                        - purchasedAt
                        - tipSource
                        - sentByUserId
                        - isRead
                    description: Array of messages in the conversation
                  pagination:
                    type: object
                    properties:
                      page:
                        type: number
                        description: Current page number
                      size:
                        type: number
                        description: Number of records returned in this response
                      hasMore:
                        type: boolean
                        description: >-
                          Whether there are more items available on subsequent
                          pages
                    required:
                      - page
                      - size
                      - hasMore
                    description: Pagination information
                required:
                  - data
                  - pagination
              example:
                data:
                  - uuid: a1b2c3d4-5e6f-7g8h-9i0j-k1l2m3n4o5p6
                    text: Hey there! How are you doing?
                    sentAt: '2024-01-15T00:00:00.000Z'
                    sender:
                      uuid: f47ac10b-58cc-4372-a567-0e02b2c3d479
                      handle: sarah-jones
                      nickname: SarahK
                      displayName: Sarah Jones
                      isTopSpender: true
                      avatarUrl: https://media.fanvue.com/avatars/example-avatar.jpg
                      registeredAt: '2024-01-10T12:00:00.000Z'
                    recipient:
                      uuid: 3bbe6394-2830-4646-a8ba-4a0a05426947
                      handle: johnny-doey
                      nickname: JohnnyD
                      displayName: Johnny Doey
                      isTopSpender: true
                      avatarUrl: https://media.fanvue.com/avatars/example-avatar.jpg
                      registeredAt: '2024-01-10T12:00:00.000Z'
                    type: SINGLE_RECIPIENT
                    hasMedia: false
                    mediaType: null
                    mediaUuids: []
                    mediaPreviewUuid: null
                    pricing: null
                    purchasedAt: null
                    tipSource: null
                    sentByUserId: null
                    isRead: true
                  - uuid: b2c3d4e5-6f7g-8h9i-0j1k-l2m3n4o5p6q7
                    text: I'm doing great! Thanks for asking.
                    sentAt: '2024-01-15T00:00:00.000Z'
                    sender:
                      uuid: 3bbe6394-2830-4646-a8ba-4a0a05426947
                      handle: johnny-doey
                      nickname: JohnnyD
                      displayName: Johnny Doey
                      isTopSpender: true
                      avatarUrl: https://media.fanvue.com/avatars/example-avatar.jpg
                      registeredAt: '2024-01-10T12:00:00.000Z'
                    recipient:
                      uuid: f47ac10b-58cc-4372-a567-0e02b2c3d479
                      handle: sarah-jones
                      nickname: SarahK
                      displayName: Sarah Jones
                      isTopSpender: true
                      avatarUrl: https://media.fanvue.com/avatars/example-avatar.jpg
                      registeredAt: '2024-01-10T12:00:00.000Z'
                    type: SINGLE_RECIPIENT
                    hasMedia: true
                    mediaType: image
                    mediaUuids:
                      - a1b2c3d4-e5f6-7890-abcd-ef1234567890
                    mediaPreviewUuid: c3d4e5f6-a7b8-9012-cdef-345678901234
                    pricing:
                      USD:
                        price: 500
                    purchasedAt: '2024-01-15T00:00:00.000Z'
                    tipSource: null
                    sentByUserId: null
                    isRead: true
                  - uuid: c3d4e5f6-7890-1234-5678-9abcdef01234
                    text: Thanks for the tip! 💖
                    sentAt: '2024-01-15T00:00:00.000Z'
                    sender:
                      uuid: 3bbe6394-2830-4646-a8ba-4a0a05426947
                      handle: johnny-doey
                      nickname: JohnnyD
                      displayName: Johnny Doey
                      isTopSpender: true
                      avatarUrl: https://media.fanvue.com/avatars/example-avatar.jpg
                      registeredAt: '2024-01-10T12:00:00.000Z'
                    recipient:
                      uuid: f47ac10b-58cc-4372-a567-0e02b2c3d479
                      handle: sarah-jones
                      nickname: SarahK
                      displayName: Sarah Jones
                      isTopSpender: true
                      avatarUrl: https://media.fanvue.com/avatars/example-avatar.jpg
                      registeredAt: '2024-01-10T12:00:00.000Z'
                    type: TIP
                    hasMedia: false
                    mediaType: null
                    mediaUuids: []
                    mediaPreviewUuid: null
                    pricing:
                      USD:
                        price: 1000
                    purchasedAt: null
                    tipSource: post
                    sentByUserId: null
                    isRead: true
                  - uuid: d4e5f6a7-8901-2345-6789-abcdef012345
                    text: Check out my new exclusive content 🔥
                    sentAt: '2024-01-14T00:00:00.000Z'
                    sender:
                      uuid: f47ac10b-58cc-4372-a567-0e02b2c3d479
                      handle: sarah-jones
                      nickname: SarahK
                      displayName: Sarah Jones
                      isTopSpender: true
                      avatarUrl: https://media.fanvue.com/avatars/example-avatar.jpg
                      registeredAt: '2024-01-10T12:00:00.000Z'
                    recipient: {}
                    type: BROADCAST
                    hasMedia: true
                    mediaType: image
                    mediaUuids:
                      - b2c3d4e5-f6a7-8901-bcde-f12345678901
                    mediaPreviewUuid: null
                    pricing: null
                    purchasedAt: null
                    tipSource: null
                    sentByUserId: null
                    isRead: false
                pagination:
                  page: 1
                  size: 2
                  hasMore: true
        '400':
          description: >-
            Bad Request - API version not supported OR validation failed OR
            invalid UUID
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/UnsupportedVersionError'
                  - $ref: '#/components/schemas/ValidationError'
                  - $ref: '#/components/schemas/InvalidUuidError'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/UnauthorizedResponse'
        '404':
          description: No conversation found with the given user
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
        '410':
          $ref: '#/components/responses/SunsetVersionResponse'
        '429':
          $ref: '#/components/responses/RateLimitResponse'
      security:
        - BearerAuth:
            - read:chat
components:
  parameters:
    ApiVersionHeader:
      name: X-Fanvue-API-Version
      in: header
      required: true
      schema:
        type: string
        default: '2025-06-26'
        example: '2025-06-26'
      description: API version to use for the request
  schemas:
    UnsupportedVersionError:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
      required:
        - error
        - message
      description: API version not supported
    ValidationError:
      type: object
      properties:
        errors:
          type: array
          items:
            type: string
      required:
        - errors
      description: Request validation failed
    InvalidUuidError:
      type: object
      properties:
        message:
          type: string
      required:
        - message
      description: Invalid UUID format provided
  responses:
    UnauthorizedResponse:
      description: Unauthorized Response
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
            required:
              - error
    SunsetVersionResponse:
      description: API version no longer supported (sunset)
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
              message:
                type: string
              nextVersion:
                type: string
            required:
              - error
              - message
    RateLimitResponse:
      description: Too many requests - rate limit exceeded
      headers:
        Retry-After:
          description: Number of seconds to wait before retrying the request
          schema:
            type: integer
        X-RateLimit-Limit:
          description: The maximum number of requests allowed in the current window
          schema:
            type: integer
        X-RateLimit-Remaining:
          description: The number of requests remaining in the current window
          schema:
            type: integer
        X-RateLimit-Reset:
          description: The Unix timestamp (seconds) when the rate limit window resets
          schema:
            type: integer
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
            required:
              - error
  securitySchemes:
    BearerAuth:
      type: oauth2
      description: >-
        OAuth 2.0 access token, presented as a JWT bearer token in the
        `Authorization` header. Obtain a token via the authorization-code flow;
        the scopes granted to the token determine which operations it may call.
      flows:
        authorizationCode:
          authorizationUrl: https://auth.fanvue.com/oauth2/auth
          tokenUrl: https://auth.fanvue.com/oauth2/token
          refreshUrl: https://auth.fanvue.com/oauth2/token
          scopes:
            read:self: >-
              Access your own user profile information, including basic account
              details and settings.
            read:chat: >-
              Read chat conversations, messages, and chat-related data. This
              includes viewing chat lists and message history.
            write:chat: >-
              Create new chats and send messages. This scope is required for any
              chat-related actions that modify data.
            read:experience: >-
              Exchange a fan's experience token for the resolved experience and
              the fan's identity, so an embedded fan-facing experience can
              render the right content.
            write:experience: >-
              Request that the creator publish or unpublish a fan-facing
              experience. The app mints a request token; the creator confirms
              and Fanvue performs the change.
            read:fan: Access fan-related data and information within the platform.
            read:post: Read posts, including post details, comments, likes, and tips.
            write:post: Create, edit, and manage posts and content on behalf of users.
            read:media: Access media files, images, videos, and other content assets.
            write:media: >-
              Upload, modify, and manage media files and content assets. Also
              required for vault folder management.
            read:creator: >-
              Access creator profiles, content, and creator-specific
              information.
            write:creator: Modify creator profiles, settings, and creator-specific data.
            read:insights: >-
              Access analytics, metrics, and insights data for performance
              tracking.
            read:tracking_links: >-
              Read tracking links and the users associated with them, including
              per-user tracking metadata.
            write:tracking_links: Create and delete tracking links.
            read:agency: Read agency information, including the agency's team members.
            write:agency: >-
              Manage agency team members and invites, including inviting new
              team members and creators.

````