> ## 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 media from a chat

> Returns a cursor-paginated list of media items shared between the authenticated user and the specified user. Media is extracted from chat messages and ordered by date (newest first).

**Pagination Flow:**
- First request: Omit the `cursor` parameter, returns first 20 media items (or specified limit)
- Subsequent requests: Use the `nextCursor` from the previous response
- End of results: `nextCursor` will be `null`

```json
{
  "data": [...media items...],
  "nextCursor": "..." // Pass this to the next request to get the following page
}
```

<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}/media
openapi: 3.1.0
info:
  title: Fanvue API
  version: '0.1'
servers: []
security: []
paths:
  /chats/{userUuid}/media:
    get:
      summary: Get media from a chat
      description: >-
        Returns a cursor-paginated list of media items shared between the
        authenticated user and the specified user. Media is extracted from chat
        messages and ordered by date (newest first).


        **Pagination Flow:**

        - First request: Omit the `cursor` parameter, returns first 20 media
        items (or specified limit)

        - Subsequent requests: Use the `nextCursor` from the previous response

        - End of results: `nextCursor` will be `null`


        ```json

        {
          "data": [...media items...],
          "nextCursor": "..." // Pass this to the next request to get the following page
        }

        ```
      operationId: listMedia
      parameters:
        - $ref: '#/components/parameters/ApiVersionHeader'
        - schema:
            type: string
            format: uuid
          required: true
          name: userUuid
          in: path
        - schema:
            type: string
            description: Cursor for fetching the next page of media
          required: false
          description: Cursor for fetching the next page of media
          name: cursor
          in: query
        - schema:
            type: string
            enum:
              - image
              - video
              - audio
              - document
            description: Filter by media type (image, video, audio, document)
          required: false
          description: Filter by media type (image, video, audio, document)
          name: mediaType
          in: query
        - schema:
            type: number
            minimum: 1
            maximum: 50
            default: 20
            description: 'Number of media items to return (1-50, default: 20)'
          required: false
          description: 'Number of media items to return (1-50, default: 20)'
          name: limit
          in: query
      responses:
        '200':
          description: Cursor-paginated list of media items
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        uuid:
                          type: string
                          format: uuid
                        messageUuid:
                          type: string
                          format: uuid
                        mediaType:
                          type: string
                          enum:
                            - image
                            - video
                            - audio
                            - document
                            - unknown
                        created_at:
                          type:
                            - string
                            - 'null'
                          format: date
                        sentAt:
                          type:
                            - string
                            - 'null'
                          format: date
                        ownerUuid:
                          type: string
                          format: uuid
                        name:
                          type:
                            - string
                            - 'null'
                        variants:
                          type: array
                          items:
                            type: object
                            properties:
                              variantType:
                                type: string
                                enum:
                                  - main
                                  - thumbnail
                                  - thumbnail_gallery
                                  - blurred
                              displayPosition:
                                type: number
                              url:
                                type: string
                              width:
                                type:
                                  - number
                                  - 'null'
                              height:
                                type:
                                  - number
                                  - 'null'
                              lengthMs:
                                type:
                                  - number
                                  - 'null'
                            required:
                              - variantType
                              - displayPosition
                              - width
                              - height
                              - lengthMs
                        purchasedAt:
                          type:
                            - string
                            - 'null'
                          format: date
                          description: >-
                            Timestamp when the fan purchased the media's source
                            message, or null if not purchased. Populated for GET
                            /chats/{userUuid}/media.
                        pricing:
                          type:
                            - object
                            - 'null'
                          properties:
                            USD:
                              type: object
                              properties:
                                price:
                                  type: number
                                  description: Price in cents
                              required:
                                - price
                          required:
                            - USD
                          description: >-
                            Pricing information for the media's source
                            pay-to-view message, or null if free. Populated for
                            GET /chats/{userUuid}/media.
                      required:
                        - uuid
                        - messageUuid
                        - mediaType
                        - created_at
                        - sentAt
                        - ownerUuid
                        - name
                  nextCursor:
                    type:
                      - string
                      - 'null'
                    description: Cursor for fetching the next page, null if no more results
                required:
                  - data
                  - nextCursor
              example:
                data:
                  - uuid: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                    messageUuid: a1b2c3d4-5e6f-7g8h-9i0j-k1l2m3n4o5p6
                    mediaType: image
                    created_at: '2024-01-15T00:00:00.000Z'
                    sentAt: '2024-01-15T00:00:00.000Z'
                    ownerUuid: c3d4e5f6-7g8h-9i0j-1k2l-m3n4o5p6q7r8
                    name: Beach Sunset
                    variants:
                      - variantType: main
                        displayPosition: 0
                        url: >-
                          https://media.fanvue.com/main/a1b2c3d4-e5f6-7890-abcd-ef1234567890.jpg
                        width: 1920
                        height: 1440
                        lengthMs: null
                      - variantType: thumbnail_gallery
                        displayPosition: 0
                        url: >-
                          https://media.fanvue.com/gallery/a1b2c3d4-e5f6-7890-abcd-ef1234567890.jpg
                        width: 400
                        height: 300
                        lengthMs: null
                    purchasedAt: '2024-01-15T00:00:00.000Z'
                    pricing:
                      USD:
                        price: 1000
                  - uuid: b2c3d4e5-f6a7-8901-bcde-f12345678901
                    messageUuid: b2c3d4e5-6f7g-8h9i-0j1k-l2m3n4o5p6q7
                    mediaType: video
                    created_at: '2024-01-14T00:00:00.000Z'
                    sentAt: '2024-01-15T00:00:00.000Z'
                    ownerUuid: b2c3d4e5-6f7g-8h9i-0j1k-l2m3n4o5p6q7
                    name: Cooking Tutorial
                    variants:
                      - variantType: main
                        displayPosition: 0
                        url: >-
                          https://media.fanvue.com/main/b2c3d4e5-f6a7-8901-bcde-f12345678901.mp4
                        width: 1920
                        height: 1080
                        lengthMs: 45000
                      - variantType: thumbnail
                        displayPosition: 0
                        url: >-
                          https://media.fanvue.com/thumb/b2c3d4e5-f6a7-8901-bcde-f12345678901.jpg
                        width: 1920
                        height: 1080
                        lengthMs: null
                    purchasedAt: null
                    pricing: null
                nextCursor: >-
                  eyJzZW50QmVmb3JlIjoiMjAyNC0wMS0wOVQxMjowMDowMC4wMDBaIiwicmVjZWl2ZWRCZWZvcmUiOiIyMDI0LTAxLTA5VDExOjU4OjAwLjAwMFoifQ==
        '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.

````