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

# Get a file

> Retrieve a single file by ID.



## OpenAPI

````yaml /api-reference/files/openapi.yaml get /v2/files/{fileId}
openapi: 3.0.0
info:
  title: Files & Requests API
  version: 1.2.0
  description: >
    Manage evidence and claims requests, attach exhibits, fill state-specific
    templates, generate PDF files, run PDF redaction jobs, and store and
    retrieve a matter's files and media.
  contact:
    name: Slate API Support
    email: api-support@slate.inc
    url: https://slate.inc
servers:
  - url: https://api.slate.inc/files
    description: Production
  - url: https://api.uat.slate.inc/files
    description: UAT (staging)
security:
  - bearerAuth: []
tags:
  - name: Requests
    description: Create, read, update, and generate evidence and claims requests
  - name: Exhibits
    description: Upload, download, and delete exhibits
  - name: Files
    description: Files and media associated with a matter
  - name: Redactions
    description: Asynchronous PDF redaction jobs
  - name: Bulk Downloads
    description: Asynchronous bulk download jobs
paths:
  /v2/files/{fileId}:
    get:
      tags:
        - Files
      summary: Get a file
      description: Retrieve a single file by ID.
      operationId: getFileV2
      parameters:
        - $ref: '#/components/parameters/fileId'
        - in: query
          name: download
          required: false
          schema:
            type: boolean
      responses:
        '200':
          description: File metadata (v2)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileV2'
        '401':
          description: Unauthorized or invalid permissions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: File not found or you do not have permission to access it
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    fileId:
      in: path
      name: fileId
      required: true
      schema:
        type: string
        format: uuid
  schemas:
    FileV2:
      type: object
      description: >
        File representation that splits the former `fileType` field into two:
        `tag` (owner-specific document tag) and `fileType` (owner-agnostic
        canonical Slate type). Use FileV2 (via the /v2 endpoints) for any new
        integration. The v1 File schema is retained for backwards compatibility
        and continues to carry the document tag in its `fileType` field.
      required:
        - id
        - matterId
        - owner
        - status
        - uploadStatus
        - crid
        - fileName
      properties:
        id:
          type: string
          format: uuid
        matterId:
          type: string
          format: uuid
        key:
          type: string
        description:
          type: string
        owner:
          type: string
        status:
          $ref: '#/components/schemas/FileStatus'
        uploadStatus:
          $ref: '#/components/schemas/FileUploadStatus'
        uploadedOn:
          type: string
          format: date-time
        downloadUrl:
          type: string
          format: uri
        fileName:
          type: string
        creditorCreationDate:
          type: string
          format: date-time
        crid:
          type: string
        uploadedBy:
          type: string
        lastViewed:
          type: string
          format: date-time
        lastViewedBy:
          type: string
        lastDownloaded:
          type: string
          format: date-time
        lastDownloadedBy:
          type: string
        tag:
          type: string
          description: Owner-specific document tag. Stable per file.
        fileType:
          type: string
          description: >-
            Owner-agnostic canonical Slate file type (e.g. REPAYMENT_AGREEMENT).
            Prefer this for routing and filtering; absent when the file has not
            yet been mapped to a canonical type.
        metadata:
          $ref: '#/components/schemas/FileMetadata'
        fileAttributes:
          $ref: '#/components/schemas/FileAttributes'
        redactionSummary:
          $ref: '#/components/schemas/RedactionSummary'
    Error:
      type: object
      required:
        - message
        - reason
      properties:
        message:
          type: string
          description: A human readable error message
        reason:
          $ref: '#/components/schemas/ErrorReason'
    FileStatus:
      type: string
      enum:
        - active
        - archived
    FileUploadStatus:
      type: string
      enum:
        - pending
        - uploaded
    FileMetadata:
      type: object
      nullable: true
      description: Optional metadata associated with the file
      properties:
        fileRequest:
          type: object
          properties:
            totalSize:
              type: integer
              description: Total size of the file in bytes
            outputDocuments:
              type: array
              items:
                type: object
                properties:
                  fileSize:
                    type: integer
                    description: Size of this document segment in bytes
                  isExhibit:
                    type: boolean
                    description: Whether this document is an exhibit
                  pageOffset:
                    type: integer
                    description: >-
                      Page offset where this document starts in the combined
                      file
    FileAttributes:
      type: object
      description: >
        Per-file statistics computed asynchronously after upload. Absent until
        the file has been analyzed. PDF-structural stats nest under the
        `application/pdf` key; `sizeBytes` and `contentType` are general and
        apply to any analyzed file.
      properties:
        application/pdf:
          $ref: '#/components/schemas/PdfStats'
        sizeBytes:
          type: integer
          format: int64
        contentType:
          type: string
    RedactionSummary:
      type: object
      required:
        - latestId
        - latestStatus
        - count
      description: >
        Per-file aggregate of redaction jobs. Only present on `File` responses
        when `?redactionSummary=true` is set and the file has at least one
        redaction. `latestStatus` reflects the most recently created job.
      properties:
        latestId:
          type: string
          format: uuid
        latestStatus:
          $ref: '#/components/schemas/RedactionStatus'
        latestCreatedOn:
          type: string
          format: date-time
        latestErrorMessage:
          type: string
          nullable: true
          description: >
            Failure reason for the latest job, when `latestStatus` is `failed`.
            Null in every other status.
        count:
          type: integer
          minimum: 1
    ErrorReason:
      type: string
      enum:
        - MISSING_TOKEN_OR_PERMISSIONS
        - NO_MATCHING_TRIGGER
        - OWNER_REQUIRED
        - FILE_REQUEST_NOT_PENDING
        - DUPLICATE_FILE_REQUEST
        - TEMPLATE_TYPE_REQUIRED
        - TEMPLATE_INDEX_REQUIRED
        - INVALID_MATTER_ID
        - MATTER_ID_REQUIRED
        - MATTER_NOT_FOUND
        - FILES_LIST_EMPTY
        - TOO_MANY_FILES
        - FILE_NAME_REQUIRED
        - FILE_NAME_MUST_BE_PDF
        - INVALID_FILE_TYPE
        - INVALID_TEMPLATE_IDENTIFIER
        - GENERATION_FAILED
        - EXHIBIT_ORDER_REQUIRED
        - CRID_REQUIRED
        - INVALID_FILE_NAME
        - ARTIFACT_TAG_NOT_FOUND
        - INVALID_LIMIT
        - INVALID_CURSOR
        - INVALID_ORDER_BY
        - MISSING_FILTER_DEPENDENCY
        - INVALID_FILTER
        - REQUEST_BODY_REQUIRED
        - INVALID_LABEL_RANGE
        - INVALID_REDACTION_RULE
        - REDACTION_NOT_FOUND
        - REDACTION_NOT_READY
        - FILE_UPLOAD_PENDING
        - BULK_DOWNLOAD_NOT_FOUND
        - BULK_DOWNLOAD_NOT_READY
    PdfStats:
      type: object
      description: >
        PDF-structural statistics for a file: page-class counts and the DPI
        range over image-bearing pages. Files analyzed before page
        classification was available carry only `pageCount`.
      properties:
        pageCount:
          type: integer
          description: Number of pages in the PDF.
        textOnlyPageCount:
          type: integer
        imageOnlyPageCount:
          type: integer
        mixedPageCount:
          type: integer
        dpiMin:
          type: integer
        dpiMax:
          type: integer
    RedactionStatus:
      type: string
      description: Current status of an asynchronous redaction job
      enum:
        - pending
        - processing
        - completed
        - failed
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Cognito-issued JWT access token. Send it as `Authorization: Bearer
        <token>`.

````