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

# Create file

> Upload a new file



## OpenAPI

````yaml post /v1/uploads
openapi: 3.0.0
info:
  title: Uploads API
  version: 1.0.0
  description: API for file upload and document management
servers: []
security:
  - bearerAuth: []
tags:
  - name: Files
    description: File management operations
  - name: Customer Documents
    description: Customer document operations
paths:
  /v1/uploads:
    post:
      tags:
        - Files
      summary: Create file
      description: Upload a new file
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateUploadRequest'
      responses:
        '201':
          description: File created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Upload'
        '400':
          $ref: '#/components/responses/ValidationError'
components:
  schemas:
    CreateUploadRequest:
      type: object
      required:
        - file_name
        - content
        - document_type
      properties:
        file_name:
          type: string
        content:
          type: string
          format: byte
        document_type:
          type: string
          enum:
            - tariffs
            - invoice
            - contract
            - other
        approval_needed:
          type: number
          format: float
        approval_made:
          type: number
          format: float
        signature_needed:
          type: number
          format: float
        signature_made:
          type: number
          format: float
        active:
          type: boolean
        metadata:
          type: object
          additionalProperties: true
    Upload:
      type: object
      properties:
        id:
          type: string
          format: uuid
        file_name:
          type: string
        document_type:
          type: string
        approval_status:
          type: string
          enum:
            - pending
            - approved
            - attached
        approval_needed:
          type: number
          format: float
        approval_made:
          type: number
          format: float
        signature_status:
          type: string
          enum:
            - pending
            - signed
            - not_required
        signature_needed:
          type: number
          format: float
        signature_made:
          type: number
          format: float
        content_length:
          type: integer
          format: int64
        file_extension:
          type: string
        active:
          type: boolean
        metadata:
          type: object
          additionalProperties: true
        created_at:
          type: string
          format: date-time
        created_by:
          type: string
          format: uuid
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
        message:
          type: string
  responses:
    ValidationError:
      description: Invalid input data
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: common.invalid_file_extension
            message: Invalid file type
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````