> ## 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 (Base64)

> Upload a base64 encoded file 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/base64
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/base64:
    post:
      tags:
        - Files
      summary: Upload File (Base64)
      description: >-
        Upload a base64 encoded file 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:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/http_route_v3_handler_file.Base64UploadRequest
        description: Base64 upload request
        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'
        '403':
          description: Forbidden
          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:
    http_route_v3_handler_file.Base64UploadRequest:
      type: object
      properties:
        base64:
          type: string
        filename:
          type: string
        metadata:
          type: string
        path:
          type: string
        retentionExempt:
          type: boolean
    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

````