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

# Download File

> Download file content.

Supports two authentication modes:
- Bearer token: Standard authenticated request. Gated on
  organization readiness so the bearer path cannot reach tenant
  storage before bootstrap completes.
- Signed URL: Include token and expires query parameters. Not
  gated — signed URLs must stay reachable to preserve the
  pre-existing public contract.

Returns:
    File content with appropriate content-type header.

Raises:
    HTTPException: 401 if authentication fails.
    HTTPException: 404 if file not found.



## OpenAPI

````yaml https://api.pragmatiks.io/openapi.json get /files/{name}/download
openapi: 3.1.0
info:
  title: Pragma API
  version: 0.1.0
servers: []
security: []
paths:
  /files/{name}/download:
    get:
      tags:
        - files
      summary: Download File
      description: |-
        Download file content.

        Supports two authentication modes:
        - Bearer token: Standard authenticated request. Gated on
          organization readiness so the bearer path cannot reach tenant
          storage before bootstrap completes.
        - Signed URL: Include token and expires query parameters. Not
          gated — signed URLs must stay reachable to preserve the
          pre-existing public contract.

        Returns:
            File content with appropriate content-type header.

        Raises:
            HTTPException: 401 if authentication fails.
            HTTPException: 404 if file not found.
      operationId: files-download_file
      parameters:
        - name: name
          in: path
          required: true
          schema:
            type: string
            title: Name
        - name: token
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Token
        - name: expires
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Expires
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````