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

# Retrieve a File

> Retrieve a File's metadata by its ID. No bytes or download URL are returned.



## OpenAPI

````yaml GET /v2/files/{id}
openapi: 3.0.1
info:
  title: Lead Bank
  description: Lead Bank's APIs
  version: v1.0
servers:
  - url: https://api.sandbox.lead.bank
  - url: https://api.lead.bank
security:
  - bearerAuth: []
tags:
  - name: ACH
  - name: Account Number
  - name: OAuth
  - name: Events
  - name: Instant Payments
  - name: Lending
  - name: Simulation
  - name: Internal Transfer
  - name: Disbursement
  - name: Entity
  - name: Wire
  - name: Originator
  - name: Funding
  - name: Receivable Sale
  - name: Balances
  - name: Compliance
  - name: Application
  - name: User Account
  - name: Blockchain Payment
  - name: Core Account
  - name: Core Balance
  - name: Core Transaction
  - name: Event Subscription
  - name: Receivable
  - name: User Credit Transaction
  - name: Files
paths:
  /v2/files/{id}:
    get:
      tags:
        - Files
      summary: Retrieve a file
      description: >-
        Retrieve a File's metadata by its ID. No bytes or download URL are
        returned.
      operationId: retrieve-a-file
      parameters:
        - name: id
          in: path
          description: The Lead-issued file id returned by `POST /v2/files`.
          required: true
          schema:
            $ref: '#/components/schemas/FileID'
          example: file_7RwQ2mK9pL4xT1vN8jS5
      responses:
        '200':
          description: The file's metadata.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/File'
        '400':
          description: The request could not be parsed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: request_malformed
                message: The request is invalid and cannot be parsed by the server.
                errors:
                  - code: url_malformed
                    message: The request URL could not be parsed.
        '403':
          description: |-
            `token_invalid`: the token is missing, expired, invalid, or carries
            neither `file/read` nor `file/read_write`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: token_invalid
                message: The bearer token is missing, expired, or invalid.
        '404':
          description: No file with this `id` is visible to your program.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: object_not_found
                message: >-
                  No object exists at the requested ID, or it is not visible to
                  this caller.
        '422':
          description: >-
            The `id` did not validate: `parameters_invalid` when it does not
            match

            the `file_*` format.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: parameters_invalid
                message: One or more parameters are invalid.
                errors:
                  - code: malformed
                    message: The file ID format is invalid.
                    parameters:
                      - id
        '429':
          description: Rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: rate_limit_exceeded
                message: >-
                  You have exceeded the rate limit for this endpoint. Retry with
                  backoff.
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: internal_server_error
                message: >-
                  Something went wrong on our end. Contact Lead with the
                  Request-Id if this persists.
        '503':
          description: >-
            The service or endpoint is temporarily unavailable. Retry after a
            delay.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: service_unavailable
                message: >-
                  The service is temporarily unavailable. Retry after the
                  indicated delay.
        '504':
          description: An upstream system did not respond in time. Retry with backoff.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: gateway_timeout
                message: An upstream system timed out. Retry with backoff.
components:
  schemas:
    FileID:
      type: string
      description: Lead-issued identifier of the file, from `POST /v2/files`.
      example: file_7RwQ2mK9pL4xT1vN8jS5
      pattern: ^file_\w+$
    File:
      type: object
      properties:
        id:
          type: string
          description: >-
            Unique ID of the file. Use this to link the file to Entity,
            Application and User Account objects.
          example: file_7RwQ2mK9pL4xT1vN8jS5
        uploaded_by:
          $ref: '#/components/schemas/FileUploadedBy'
        file_name:
          type: string
          description: |-
            The filename you declared, taken from the uploaded part's `filename`
            header.
          maxLength: 255
          example: loan_agreement_acct_4471.pdf
        type:
          $ref: '#/components/schemas/FileType'
        content_type:
          type: string
          description: |-
            MIME type of the file (e.g., application/pdf), taken from the
            Content-Type header of the multipart file part.
          example: application/pdf
        size_bytes:
          type: integer
          format: int64
          description: Size of the file in bytes.
          example: 184233
        checksum:
          type: string
          description: |-
            A SHA-256 checksum digest of the file bytes, computed by Lead as the
            file is received.
          example: 9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08
        created_at:
          type: string
          format: date-time
          description: The ISO-8601 timestamp at which the file was created.
          example: '2026-09-14T14:22:01Z'
        updated_at:
          type: string
          format: date-time
          description: The ISO-8601 timestamp at which the file was last updated.
          example: '2026-09-14T14:22:01Z'
        metadata:
          type: object
          additionalProperties:
            type: string
          description: |-
            A set of key-value pairs that can be used to store additional
            information related to this object.
          example: {}
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode'
        message:
          type: string
          description: >-
            A human-readable description of the error family. Identical for
            every occurrence of a given `code`; carries no request-specific
            detail.
          example: One or more parameters are invalid.
        errors:
          type: array
          description: >-
            Zero or more specific errors within this family. Always present for
            validation errors, one entry per failing field.
          items:
            $ref: '#/components/schemas/ErrorItem'
    FileUploadedBy:
      type: string
      description: |-
        Who created the file. Set by Lead, not declarable on upload.
        * `partner`: created by you through the files API.
        * `lead`: reserved for files Lead itself creates.
      example: partner
      enum:
        - partner
        - lead
    FileType:
      type: string
      description: >-
        The file's type. Must be a valid enum.


        The accepted values are grouped by the object the file can be linked to.


        **Application and User Account**


        `aan`, `ach_authorization`, `autopay_authorization`, `bo_certification`,

        `cardholder_agreement`, `consent_to_link_account`,
        `consent_to_link_hsa`,

        `consumer_credit_auth`, `credit_pull_consent`, `credit_score_notice`,

        `decision_maker_document`, `deposit_agreement`, `eft_authorization`,

        `esign_agreement`, `fcra_notice`, `lead_funds_transfer_agreement`,

        `lead_privacy_policy`, `loan_agreement`, `loc_agreement`,

        `missed_payments_policy`, `mla_notice`, `negative_option_consent`,

        `notice_of_incompleteness`, `offer_summary`, `partner_privacy_policy`,

        `patriot_act_notice`, `periodic_statement`, `personal_guarantee`,

        `pre_approval_terms`, `prohibited_industry_certification`,
        `tcpa_consent`,

        `terms_of_use`, `truth_in_lending_document`


        **Entity — individual**


        `adverse_media`, `bank_statement`, `drivers_license`,

        `financial_statement`, `id_selfie`, `investigation_report`,

        `matriculate_id`, `military_id`, `national_id`, `passport`,

        `permanent_residency_id`, `proof_of_address`, `public_records`,

        `state_or_provincial_id`, `utility_bills`


        **Entity — business**


        `adverse_media`, `bank_statement`, `certificate_of_good_standing`,

        `financial_statement`, `formation_document`, `id_selfie`,

        `investigation_report`, `partnership_agreement`,

        `proof_of_address`, `proof_of_place_on_stock_exchange`,
        `public_records`,

        `tax_certificate`, `tax_returns`, `utility_bills`


        **Entity — sole prop**


        `adverse_media`, `bank_statement`, `drivers_license`,

        `financial_statement`, `id_selfie`, `investigation_report`,

        `matriculate_id`, `military_id`, `name_certificate`, `national_id`,

        `passport`, `permanent_residency_id`, `proof_of_address`,

        `public_records`, `state_or_provincial_id`, `tax_certificate`,

        `tax_returns`, `utility_bills`
      example: loan_agreement
    ErrorCode:
      type: string
      description: >-
        A snake_case code identifying the error family — the stable,
        machine-readable value partners branch on, together with the HTTP
        status.
      example: parameters_invalid
      enum:
        - request_malformed
        - content_too_large
        - idempotency_key_missing
        - authentication_missing
        - token_invalid
        - source_ip_not_allowed
        - url_invalid
        - object_not_found
        - method_not_allowed
        - idempotency_key_in_use
        - idempotency_request_inconsistent
        - rate_limit_exceeded
        - internal_server_error
        - service_unavailable
        - endpoint_disabled
        - gateway_timeout
        - unclassified
        - parameters_invalid
        - related_object_invalid
        - related_object_not_ready
        - related_object_conflict
        - limit_exceeded
        - client_control_restricted
        - lead_control_restricted
        - object_state_conflict
        - object_modified_concurrently
        - operation_invalid
    ErrorItem:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: A snake_case code naming the specific error or sub-category.
          example: required
        message:
          type: string
          description: >-
            A human-readable description of this specific error, with
            interpolated values where relevant.
          example: account_number_id is required.
        parameters:
          type: array
          description: >-
            The request fields this error implicates, in dot notation for nested
            fields. Present for validation errors.
          items:
            type: string
          example:
            - account_number_id
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

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