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

# Upload File

> Upload a file to S3. Validates file type by extension/MIME. Auto-converts DOCX to PDF except in the templates container.



## OpenAPI

````yaml /api-reference/openapi-v1.json post /api/v1/files/upload
openapi: 3.0.0
info:
  title: Artos API
  description: API for document generation, template management, and document organization
  version: 1.0.0
  contact:
    name: Artos Support
    email: internal@artosai.com
servers:
  - url: https://api.artosai.com
    description: Production server
  - url: http://localhost:8000
    description: Local development server
security:
  - bearerAuth: []
paths:
  /api/v1/files/upload:
    post:
      tags:
        - Files
      summary: Upload File
      description: >-
        Upload a file to S3. Validates file type by extension/MIME.
        Auto-converts DOCX to PDF except in the templates container.
      operationId: uploadFile
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file_name:
                  type: string
                  description: Name to give the file
                file_content:
                  type: string
                  format: binary
                  description: File content
                container:
                  type: string
                  description: Container/folder name for upload
              required:
                - file_name
                - file_content
                - container
      responses:
        '200':
          description: File uploaded successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '400':
          description: File validation failure
        '401':
          description: Authentication failure
        '500':
          description: S3 upload failed
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Bearer token authentication. Token provides organization-scoped access.

````