Media Management

Upload a media file

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

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

Path parameters

website_idstring required

Unique identifier of the website

Example:ws_abc123

Request body

file_base64string required

Base64 encoded file data (with or without data URL prefix)

file_namestring required

Name of the file including extension

media_type'images' | 'videos' | 'documents' | 'fonts'

Type of media being uploaded

content_typestring

MIME type of the file

Example request

{
  "file_base64": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==",
  "file_name": "hero-image.jpg",
  "media_type": "images",
  "content_type": "image/jpeg"
}

Response

File uploaded successfully

successtrue required

Indicates the operation was successful

Example response

{
  "success": true,
  "result": {
    "url": "https://cdn.ln-cdn.com/c/website_abc123/images/hero-image.jpg",
    "file_name": "hero-image.jpg",
    "media_type": "images"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.