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

# Download a legal document version

> Downloads the file for a specific version of a legal document. This endpoint redirects to a signed download URL. Clients that cannot follow a redirect can make the request with ?redirect=false and manually open the URL in `download_url` to trigger the download. If you want to open the file inline, add ?inline=true to the request.



## OpenAPI

````yaml https://api.engine.usesophic.com/openapi.json get /legal-documents/{legal_document_id}/versions/{version_id}/file
openapi: 3.1.0
info:
  title: Sophic Engine API
  version: 0.1.0
servers:
  - url: https://api.engine.usesophic.com/
security: []
paths:
  /legal-documents/{legal_document_id}/versions/{version_id}/file:
    get:
      summary: Download a legal document version
      description: >-
        Downloads the file for a specific version of a legal document. This
        endpoint redirects to a signed download URL. Clients that cannot follow
        a redirect can make the request with ?redirect=false and manually open
        the URL in `download_url` to trigger the download. If you want to open
        the file inline, add ?inline=true to the request.
      operationId: >-
        download_legal_document_version_legal_documents__legal_document_id__versions__version_id__file_get
      parameters:
        - name: legal_document_id
          in: path
          required: true
          schema:
            type: string
            description: The ID of the legal document.
            title: Legal Document Id
          description: The ID of the legal document.
        - name: version_id
          in: path
          required: true
          schema:
            type: string
            description: The ID of the version to download.
            title: Version Id
          description: The ID of the version to download.
        - name: redirect
          in: query
          required: false
          schema:
            type: boolean
            default: true
            title: Redirect
        - name: inline
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Inline
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema: {}
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - HTTPBearer: []
components:
  schemas:
    Error:
      properties:
        detail:
          type: string
          title: Detail
          description: A human-readable description of the error.
        code:
          type: string
          title: Code
          description: A machine-readable error code.
        docs:
          title: Docs
          description: A URL to documentation about this error code.
          x-remove-null-from-type-union: true
          type: string
        context:
          title: Context
          description: An optional object for adding extra context to the error.
          x-remove-null-from-type-union: true
          additionalProperties:
            anyOf:
              - type: string
              - type: integer
          type: object
        params:
          title: Params
          description: An optional list of params that failed validation.
          x-remove-null-from-type-union: true
          items:
            $ref: '#/components/schemas/InvalidParam'
          type: array
      type: object
      required:
        - detail
        - code
      title: Error
    InvalidParam:
      properties:
        path:
          items:
            anyOf:
              - type: integer
              - type: string
          type: array
          title: Path
          description: Path to the field name (or index if a list) that errored.
        detail:
          type: string
          title: Detail
          description: Human-readable detail for error.
        code:
          type: string
          title: Code
          description: A machine-readable error code.
      type: object
      required:
        - path
        - detail
        - code
      title: InvalidParam
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````