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

# List survey files



## OpenAPI

````yaml /openapi/program.openapi.json get /surveys/{surveyId}/files
openapi: 3.1.0
info:
  title: Questra Program API
  version: 0.0.1
  description: >-
    REST API for the Questra Program product. Browser users authenticate through
    Questra Auth SSO; automation uses workspace-scoped API keys (`Authorization:
    Bearer qpk_live_…`). API keys carry scopes enforced before handlers.
    Outbound webhooks follow Standard Webhooks (at-least-once delivery;
    consumers must be idempotent).
servers:
  - url: /v1
    description: Program API base path
security: []
paths:
  /surveys/{surveyId}/files:
    get:
      tags:
        - Survey files
      summary: List survey files
      parameters:
        - schema:
            type: string
            format: uuid
          required: true
          name: surveyId
          in: path
      responses:
        '200':
          description: File list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SurveyFileList'
        '404':
          description: Survey not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
components:
  schemas:
    SurveyFileList:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/SurveyFile'
      required:
        - data
    ErrorBody:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
        resource:
          type: string
        slug:
          type: string
        file_id:
          type: string
        endpoint_id:
          type: string
        event_id:
          type: string
        delivery_id:
          type: string
        api_key_id:
          type: string
        integration_id:
          type: string
        audit_id:
          type: string
        status:
          type: string
        details: {}
        question_ids:
          type: array
          items:
            type: string
        survey_ids:
          type: array
          items:
            type: string
        revisions:
          type: array
          items:
            type: number
      required:
        - error
    SurveyFile:
      type: object
      properties:
        id:
          type: string
          format: uuid
        survey_id:
          type: string
          format: uuid
        name:
          type: string
          minLength: 1
        content_type:
          type: string
          minLength: 1
        size_bytes:
          type:
            - integer
            - 'null'
          minimum: 0
        storage_key:
          type: string
          minLength: 1
        status:
          $ref: '#/components/schemas/SurveyFileStatus'
        visibility:
          $ref: '#/components/schemas/ObjectVisibility'
        hosting:
          $ref: '#/components/schemas/SurveyFileHosting'
        upstream_path:
          type:
            - string
            - 'null'
          minLength: 1
        content_hash:
          type:
            - string
            - 'null'
          pattern: ^[a-f0-9]{64}$
          description: Lowercase SHA-256 hex digest of the file bytes.
          example: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
        public_url:
          type:
            - string
            - 'null'
          format: uri
        upstream_only:
          type: boolean
        reserved_type:
          type:
            - string
            - 'null'
          minLength: 1
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - id
        - survey_id
        - name
        - content_type
        - size_bytes
        - storage_key
        - status
        - visibility
        - hosting
        - upstream_path
        - content_hash
        - public_url
        - created_at
        - updated_at
    SurveyFileStatus:
      type: string
      enum:
        - pending
        - ready
        - failed
    ObjectVisibility:
      type: string
      enum:
        - private
        - public
    SurveyFileHosting:
      type: string
      enum:
        - questra
        - platform

````