---
title: "Upload a media file"
method: POST
path: "/v1/workspace/website/{website_id}/media/upload"
tags: ["Media Management"]
---

# Upload a media file

`POST /v1/workspace/website/{website_id}/media/upload`

## Request

- Base URL: `https://api.lindo.ai`
- URL: `https://api.lindo.ai/v1/workspace/website/{website_id}/media/upload`
- Auth: HTTP bearer

Uploads a single media file (image, video, document, or font) to the website's CDN storage. Returns the public CDN URL.

## Path parameters

- `website_id` string, required: Unique identifier of the website

## Request body

- MediaUploadRequest
  - `file_base64` string, required: Base64 encoded file data (with or without data URL prefix)
  - `file_name` string, required: Name of the file including extension
  - `media_type` 'images' | 'videos' | 'documents' | 'fonts': Type of media being uploaded
  - `content_type` string: MIME type of the file

## Response `200`

File uploaded successfully

- MediaUploadResponse
  - `success` true, required: Indicates the operation was successful
  - `result` MediaUploadResult, required
    - `url` string, required: CDN URL of the uploaded file
    - `file_name` string, required: Name of the uploaded file
    - `media_type` string, required: Type of media uploaded

## Other responses

- `400`: Bad request - validation error
- `401`: Unauthorized - invalid or missing API key
- `404`: Website not found
- `500`: Internal server error

---

[API](https://skmtc.dev/lindo/apis/lindo-unified-api.md) · [All operations](https://skmtc.dev/lindo/apis/lindo-unified-api/llms.txt) · [OpenAPI document](https://skmtc.dev/lindo/apis/lindo-unified-api/revisions/2672f34525a4?raw)
