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

# List the caller's media-library attachments (cursor-paginated)



## OpenAPI

````yaml /openapi.json get /api/v1/attachments
openapi: 3.1.0
info:
  title: VyomFlow API
  version: 1.0.0
  description: >-
    Internal REST surface (S1–S6) exposed as reference documentation. This is
    the S8 minimum-fallback scope (Submission Requirement #13) — generated
    directly from the same Zod contracts the Route Handlers validate against,
    not a hand-maintained duplicate. Auth documented here is the app's own Clerk
    bearer scheme; see the public API-key section for the versioned public
    surface, where shipped.
servers:
  - url: '{baseUrl}'
    variables:
      baseUrl:
        default: http://localhost:3000
security: []
paths:
  /api/v1/attachments:
    get:
      tags:
        - Attachments
      summary: List the caller's media-library attachments (cursor-paginated)
      parameters:
        - schema:
            type: string
          required: false
          name: cursor
          in: query
        - schema:
            type: integer
            exclusiveMinimum: 0
          required: false
          name: limit
          in: query
        - schema:
            type: string
            minLength: 1
          required: false
          name: chatId
          in: query
        - schema:
            type: string
            enum:
              - 'true'
              - 'false'
          required: false
          name: unbound
          in: query
        - schema:
            type: string
            enum:
              - all
              - uploaded
              - generated
          required: false
          name: source
          in: query
      responses:
        '200':
          description: Page of attachments.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListAttachmentsResponse'
        '401':
          description: Missing or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      security:
        - ClerkBearer: []
components:
  schemas:
    ListAttachmentsResponse:
      type: object
      properties:
        items:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              chatId:
                type:
                  - string
                  - 'null'
              messageId:
                type:
                  - string
                  - 'null'
              orderIndex:
                type: integer
                minimum: 0
              status:
                type: string
                enum:
                  - PENDING
                  - READY
                  - FAILED
                  - CANCELLED
              mimeType:
                type:
                  - string
                  - 'null'
              byteSize:
                type:
                  - integer
                  - 'null'
                minimum: 0
              fileName:
                type:
                  - string
                  - 'null'
              resultUrl:
                type:
                  - string
                  - 'null'
                format: uri
              errorCode:
                type:
                  - string
                  - 'null'
              errorMessage:
                type:
                  - string
                  - 'null'
              createdAt:
                type: string
              updatedAt:
                type: string
              source:
                type: string
                enum:
                  - uploaded
                  - generated
            required:
              - id
              - chatId
              - messageId
              - orderIndex
              - status
              - mimeType
              - byteSize
              - fileName
              - resultUrl
              - errorCode
              - errorMessage
              - createdAt
              - updatedAt
              - source
        nextCursor:
          type:
            - string
            - 'null'
      required:
        - items
        - nextCursor
    ApiError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            details: {}
          required:
            - code
            - message
      required:
        - error
  securitySchemes:
    ClerkBearer:
      type: http
      scheme: bearer
      description: >-
        Clerk session token, `Authorization: Bearer <token>`. This documents the
        app's own internal auth as of S1-S6 — see S8-public-api-bonus.md for the
        fallback scope this doc covers, and the public API-key scheme's own page
        once the full scope ships.

````