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

# Get File by ID

> This endpoint fetches an individual file by ID, and returns a signed URL to access the file.



## OpenAPI

````yaml https://api.mayerex.com/openapi/public.json get /api/files/{id}
openapi: 3.0.1
info:
  title: Mayer Partner API
  description: >-
    This API allows partners of Mayer Solar LLC to integrate solar data within
    their own CRM and view trends and analytics.
  termsOfService: https://mayerex.com/api-terms
  contact:
    name: Sarmad Wahab
    url: https://mayerex.com/
    email: sarmad.wahab@mayersolar.com
  license:
    name: MIT License
    url: https://opensource.org/licenses/MIT
  version: '1.0'
servers:
  - url: https://api.mayerex.com/
    description: Mayer Production
security:
  - Bearer: []
tags:
  - name: Deals
  - name: Files
  - name: Webhook
paths:
  /api/files/{id}:
    get:
      tags:
        - Files
      summary: Get File by ID
      description: >-
        This endpoint fetches an individual file by ID, and returns a signed URL
        to access the file.
      operationId: GetFile
      parameters:
        - name: id
          in: path
          description: The ID of the file
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileSignedURL'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MayerError'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MayerError'
components:
  schemas:
    FileSignedURL:
      type: object
      properties:
        url:
          type: string
          nullable: true
        expiresAt:
          type: string
          format: date-time
        name:
          type: string
          nullable: true
        extension:
          type: string
          nullable: true
        type:
          type: string
          nullable: true
        size:
          type: integer
          format: int64
    MayerError:
      type: object
      properties:
        code:
          type: string
          nullable: true
        message:
          type: string
          nullable: true
        errors:
          type: array
          items:
            type: string
          nullable: true
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer
      bearerFormat: Token

````