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

# Upload File (Multipart)

> Upload a file using multipart/form-data with optional metadata and path. Supports images, videos, and audio.
If a custom CDN domain is configured and enabled, the response `url` will use the custom domain and `originalUrl` will contain the default storage URL.



## OpenAPI

````yaml /openapi.json post /v3/file
openapi: 3.0.0
info:
  description: >-
    This is the API server for Fivemanage, providing endpoints for media
    management, logging, and SDK integration.
  title: Fivemanage API
  termsOfService: https://fivemanage.com/legal/terms-of-service
  contact:
    name: Support
    email: support@fivemanage.com
  version: '1.0'
servers:
  - url: https://api.fivemanage.com/api
security: []
paths:
  /v3/file:
    post:
      tags:
        - Files
      summary: Upload File (Multipart)
      description: >-
        Upload a file using multipart/form-data with optional metadata and path.
        Supports images, videos, and audio.

        If a custom CDN domain is configured and enabled, the response `url`
        will use the custom domain and `originalUrl` will contain the default
        storage URL.
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  description: File to upload
                  type: string
                  format: binary
                filename:
                  description: Custom filename
                  type: string
                path:
                  description: Storage path (folder)
                  type: string
                metadata:
                  description: JSON metadata
                  type: string
                retentionExempt:
                  description: Exempt from retention policy
                  type: boolean
              required:
                - file
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api.FileUploadResponseV3'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api.ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api.ErrorResponse'
        '413':
          description: Request Entity Too Large
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api.ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api.ErrorResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    api.FileUploadResponseV3:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/api.FileUploadResponseDataV3'
        status:
          type: string
          example: ok
    api.ErrorResponse:
      type: object
      properties:
        error:
          type: string
          example: Error message
    api.FileUploadResponseDataV3:
      type: object
      properties:
        id:
          type: string
          example: 7F9pGhN8qwErT1vx5aZk
        originalUrl:
          type: string
          example: https://r2.fivemanage.com/23492kdx23121/7F9pGhN8qwErT1vx5aZk.jpg
        url:
          type: string
          example: https://r2.fivemanage.com/23492kdx23121/7F9pGhN8qwErT1vx5aZk.jpg
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      name: Authorization
      in: header

````