> ## Documentation Index
> Fetch the complete documentation index at: https://botpress-pb-update-api.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# listFilePassages

> List passages for a file



## OpenAPI

````yaml /files-openapi.json get /v1/files/{id}/passages
openapi: 3.0.0
info:
  title: Botpress Files API
  description: API for Botpress Files
  version: 1.112.0
servers:
  - url: https://api.botpress.cloud
security:
  - BearerAuth: []
tags:
  - name: documented
paths:
  /v1/files/{id}/passages:
    get:
      tags:
        - Endpoints
      description: List passages for a file
      operationId: listFilePassages
      parameters:
        - name: nextToken
          in: query
          description: >-
            Provide the `meta.nextToken` value provided in the last API response
            to retrieve the next page of results
          schema:
            type: string
        - name: pageSize
          in: query
          description: Number of items to return per page (default 20, max 100)
          schema:
            type: integer
        - name: id
          in: path
          description: File ID or Key
          required: true
          schema:
            type: string
        - name: limit
          in: query
          description: >-
            The maximum number of passages to return per request (optional,
            default: 20, max: 200).
          schema:
            type: number
        - name: x-bot-id
          in: header
          description: Bot id
          required: true
          schema:
            type: string
        - name: x-integration-id
          in: header
          description: Integration id
          required: false
          schema:
            type: string
        - name: x-integration-alias
          in: header
          description: Integration alias
          required: false
          schema:
            type: string
        - name: x-integration-name
          in: header
          description: Integration name
          required: false
          schema:
            type: string
        - name: x-user-id
          in: header
          description: User Id
          required: false
          schema:
            type: string
        - name: x-user-role
          in: header
          description: User Role
          required: false
          schema:
            type: string
      responses:
        '200':
          $ref: '#/components/responses/listFilePassagesResponse'
        default:
          $ref: '#/components/responses/listFilePassagesResponse'
components:
  responses:
    listFilePassagesResponse:
      description: Returns the list of passages extracted from a file.
      content:
        application/json:
          schema:
            type: object
            properties:
              passages:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      description: Passage ID
                    content:
                      type: string
                      description: The content of the passage.
                    meta:
                      type: object
                      properties:
                        type:
                          type: string
                          enum:
                            - chunk
                            - summary
                            - consolidated
                            - image
                          description: The type of passage
                        subtype:
                          type: string
                          enum:
                            - title
                            - subtitle
                            - paragraph
                            - blockquote
                            - list
                            - table
                            - code
                            - image
                            - page
                          description: The subtype of passage, if available.
                        pageNumber:
                          type: integer
                          description: >-
                            Page number the passage is located on. Only
                            applicable if the passage was extracted from a PDF
                            file.
                        position:
                          type: integer
                          description: >-
                            Position number of the passage in the file relative
                            to the other passages, if available. Can be used to
                            know the order of passages within a file.
                        sourceUrl:
                          type: string
                          format: uri
                          description: >-
                            The URL of the source file for the vector, if
                            applicable (e.g. for image vectors).
                      description: The passage metadata.
                  required:
                    - id
                    - content
                    - meta
              meta:
                type: object
                properties:
                  nextToken:
                    type: string
                    description: >-
                      The token to use to retrieve the next page of results,
                      passed as a query string parameter (value should be
                      URL-encoded) to this API endpoint.
                additionalProperties: false
            required:
              - passages
              - meta
            title: listFilePassagesResponse
            additionalProperties: false
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````