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

# Upload Files

> Endpoint for direct uploading of files to Serial's backend (includes both images & files). Be sure to include the file metadata if you want your file properly categorized (name, binary, & mimetype).



## OpenAPI

````yaml POST /files
openapi: 3.1.0
info:
  title: Serial
  version: '1.0'
  description: Access and control your Serial data programmatically.
  contact:
    name: Devon Copeland
    email: support@serial.io
    url: www.serial.io
  summary: Serial API
servers:
  - url: https://api.serial.io
security:
  - serial-default-security: []
tags:
  - name: AI
    description: AI Endpoints
  - name: Auth
    description: Auth Endpoints
  - name: Companies
    description: Company Endpoints
  - name: Component Instances
    description: Component Instance Endpoints
  - name: Components
    description: Component Endpoints
  - name: Datasets
    description: Dataset Endpoints
  - name: Fields
    description: Field Endpoints
  - name: Legacy
    description: Legacy Endpoints
  - name: Part Numbers
    description: Part Number Endpoints
  - name: Processes
    description: Process Endpoints
  - name: Properties
    description: Property Endpoints
  - name: Storage
    description: Storage Endpoints
  - name: Users
    description: User Endpoints
  - name: Work Orders
    description: Work Order Endpoints
paths:
  /files:
    post:
      tags:
        - Storage
      summary: Upload File Data
      description: >-
        Endpoint for direct uploading of files to Serial's backend (includes
        both images & files). Be sure to include the file metadata if you want
        your file properly categorized (name, binary, & mimetype).
      operationId: post-files
      parameters: []
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  x-stoplight:
                    id: 2bj0sb6hmeuu7
                  format: binary
              required:
                - file
        description: File data as binary
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/File-storage'
            application/xml:
              schema:
                type: object
                properties:
                  file_id:
                    type: string
                    x-stoplight:
                      id: 43edaojcdynhl
                    format: uuid
        '401':
          description: Unauthorized
        '500':
          description: Internal Server Error
components:
  schemas:
    File-storage:
      title: file-storage
      x-stoplight:
        id: 5hiwz7ssrofyv
      type: object
      properties:
        name:
          type: string
          x-stoplight:
            id: za3yl3q13hnne
        id:
          type: string
          x-stoplight:
            id: d6yz65mtlrfpu
          format: uuid
        updated_at:
          type: string
          x-stoplight:
            id: 942we3xdoctln
          format: date-time
        created_at:
          type: string
          x-stoplight:
            id: 1wk2e1xr0fv6p
          format: date-time
        bucket_id:
          type: string
          x-stoplight:
            id: c36yu5knfe1uq
        last_accessed_at:
          type: string
          x-stoplight:
            id: yyinle2pdhsu6
          format: date-time
        metadata:
          type: object
          x-stoplight:
            id: xiwdcujg3qfrw
          properties:
            eTag:
              type: string
              x-stoplight:
                id: 9ciws3trp59lk
            size:
              type: integer
              x-stoplight:
                id: 6sxuhczvsihxn
              format: int64
            mimetype:
              type: string
              x-stoplight:
                id: 0e98b6k1jvlz5
            cacheControl:
              type: string
              x-stoplight:
                id: 5477chfu4zh2u
            lastModified:
              type: string
              x-stoplight:
                id: sv263dzu8w3nv
              format: date-time
            contentLength:
              type: string
              x-stoplight:
                id: 8rioj4s6gg0hy
            httpStatusCode:
              type: integer
              x-stoplight:
                id: iiemqcijfxpeg
      required:
        - name
        - id
        - updated_at
        - created_at
        - bucket_id
        - last_accessed_at
        - metadata
  securitySchemes:
    serial-default-security:
      type: http
      scheme: bearer
      description: '**API Key** or **Token** formatted as `Bearer <YOUR_KEY_OR_TOKEN>`'

````