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

# Download one immutable file version

> Authorizes persistent file access and returns a private redirect valid for at most five minutes. Omit versionId to pin the current version.



## OpenAPI

````yaml /openapi.json get /files/{fileId}/download
openapi: 3.0.3
info:
  title: Effective API
  version: 2.0.0
  description: The public Effective REST API. Authenticate using an Effective API key.
servers:
  - url: https://canary.effectiveai.app/api/v2
    description: Canary
security:
  - bearerAuth: []
paths:
  /files/{fileId}/download:
    get:
      tags:
        - Files
      summary: Download one immutable file version
      description: >-
        Authorizes persistent file access and returns a private redirect valid
        for at most five minutes. Omit versionId to pin the current version.
      operationId: downloadFile
      parameters:
        - schema:
            type: string
            format: uuid
          required: true
          name: fileId
          in: path
        - schema:
            anyOf:
              - type: string
                format: uuid
              - type: string
                maxLength: 8192
                pattern: ^lv1\.[A-Za-z0-9_.-]+$
          required: false
          name: versionId
          in: query
      responses:
        '302':
          description: Version-pinned storage URL.
          headers:
            Location:
              schema:
                type: string
                format: uri
              required: true
            File-Version-Id:
              schema:
                type: string
              required: true
            Cache-Control:
              schema:
                type: string
                enum:
                  - private, no-store
              required: true
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
        '401':
          description: Authentication required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
        '403':
          description: Visible file is restricted from export.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
        '404':
          description: File or requested version not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
        '409':
          description: Storage cannot provide an immutable version.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
        '500':
          description: Unexpected server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
        '503':
          description: Storage temporarily unavailable. Retry-After is in seconds.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
      security:
        - bearerAuth: []
components:
  schemas:
    V2CodedError:
      allOf:
        - $ref: '#/components/schemas/V2Error'
        - type: object
          properties:
            code:
              type: string
              minLength: 1
              description: Stable error code. Clients must tolerate unknown future codes.
            details:
              type: array
              items:
                type: object
                properties:
                  location:
                    type: string
                    enum:
                      - path
                      - query
                      - header
                      - body
                  path:
                    type: array
                    items:
                      type: string
                      maxLength: 64
                    maxItems: 12
                  code:
                    type: string
                    enum:
                      - required
                      - invalid_type
                      - invalid_value
                      - unknown_field
                  message:
                    type: string
                    minLength: 1
                    maxLength: 200
                required:
                  - location
                  - path
                  - code
                  - message
              minItems: 1
              maxItems: 20
              description: Bounded safe validation issues; may omit some invalid fields.
            requestId:
              type: string
              minLength: 1
              maxLength: 128
              description: >-
                Existing server correlation for this HTTP attempt, when
                available.
          required:
            - code
    V2Error:
      type: object
      properties:
        error:
          type: string
          minLength: 1
          description: Human-readable explanation of the failure.
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Effective API key. Send Authorization: Bearer sk-eai-...'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.