Assets Manager v2.0

REST API Documentation

Complete reference for programmatic media ingestion, streaming, batch operations, and full error payloads

Viewing with placeholder keys Sign in for your keys

Authentication

All REST API endpoints require authentication using your account API Key.

You can pass your API key in any of the following 3 standard formats:

1. Header x-api-key

Recommended for backend servers and API clients.

2. Header Authorization

Standard Bearer <key> token header.

3. Query Param

Append ?api_key=<key> to request URL.

Error Handling & HTTP Status Codes

Comprehensive overview of standard error payloads and HTTP status codes returned by the API.

When any request fails, the API responds with standard HTTP status codes and a JSON body containing a descriptive error field. This makes error parsing reliable across all programming languages.

Standard Error JSON Schema Content-Type: application/json
{
                    "error": "Descriptive explanation of why the request was rejected."
                  }

HTTP Status Codes Reference & Meanings

400 Bad Request

Missing or Invalid Request Payload

Triggered when required fields (like file or filenames) are missing, empty, or if more than 20 files are submitted in one upload.

401 Unauthorized

Authentication Failed

API Key is absent from request headers/parameters or does not match any registered account.

404 Not Found

Resource Not Found

The specified project identifier does not belong to the user, or the target media asset filename does not exist.

408 Timeout

Ingestion Timeout

Asynchronous background file ingestion supervisor exceeded the 30-second timeout threshold.

422 Unprocessable

File Storage / IO Failure

Server was unable to persist file to disk storage (e.g. disk space exhausted or write permission error).

500 Server Error

Internal Server Error

An unhandled backend process failure or unexpected supervisor task termination occurred.

POST /api/projects/:identifier/upload

Upload Media Assets

Upload 1 to 20 media files (images, videos, audio, documents, archives) or direct public URLs (max 500MB each) into a project or subfolder.

Path Parameters

identifier required string

The unique project identifier (e.g. proj_my_project).

Request Payload Fields (Multipart Form-Data or JSON)

file or files or media file or url required binary file(s)

Binary file payload via multipart form-data. Attach single or multiple files (max 20 files per request, max 500MB each).

url or urls or file_url file or url required string or array

Direct HTTP/HTTPS link(s) to download and store. Supported in JSON body or form fields (max 20 URLs per request, max 500MB each).

filename optional string

Optional custom filename override when importing a single file from URL.

folder or folder_name optional string

Target subfolder path (e.g. marketing/2026). Creates folders automatically if non-existent.

Possible Response Payloads

201 Created Single File Upload Success
{
  "success": true,
  "message": "Media uploaded successfully",
  "data": {
    "id": 104,
    "publicUrl": "https://cloud.skdm.in/assets/proj_my_project/a9f1b2c3_banner.png"
  }
}
400 Bad Request Missing File Parameter
{
  "error": "Missing file parameter or URL. Please attach file(s) under key 'file', 'files', or 'media', or provide URL(s) under key 'url' or 'urls'."
}
400 Bad Request Batch Limit Exceeded (>20 files)
{
  "error": "Maximum 20 files/URLs allowed per upload request."
}
401 Unauthorized Invalid or Missing API Key
{
  "error": "Unauthorized. Valid API key required via x-api-key header, Authorization: Bearer <key>, or api_key query parameter."
}
404 Not Found Project Not Found
{
  "error": "Project not found for identifier 'proj_my_project'"
}
422 Unprocessable Disk Persistence Failure
{
  "error": "Failed to save media: :enospc"
}
DELETE /api/projects/:identifier/assets/:filename

Delete Single Media Asset

Permanently remove a stored asset from the project container and underlying disk storage.

Path Parameters

identifier required string

Project identifier.

filename required string

The internal unique storage filename of the asset (e.g. 4a9e2b1f_banner.png).

Possible Response Payloads

200 OK Asset Deleted Successfully
{
  "message": "Media asset deleted successfully",
  "file_name": "4a9e2b1f_banner.png"
}
404 Not Found Asset Filename Not Found in Project
{
  "error": "Media asset '4a9e2b1f_banner.png' not found in project 'proj_my_project'"
}
DELETE /api/projects/:identifier/assets

Batch Delete Media Assets

Delete multiple media assets in a single atomic API call.

JSON Body Payload

filenames required string[]

A JSON array containing the storage filenames to delete.

Possible Response Payloads

200 OK Batch Deletion Success
{
  "success": true,
  "message": "2 media assets deleted successfully",
  "deleted_filenames": [
    "4a9e2b1f_photo1.jpg",
    "8c7d6e5a_photo2.jpg"
  ]
}
400 Bad Request Empty or Missing Filenames List
{
  "error": "Please provide a non-empty list of filenames under key 'filenames'."
}
404 Not Found Project Not Found
{
  "error": "Project not found for identifier 'proj_my_project'"
}
GET /assets/:identifier/*path

Public Media Streaming & CDN Delivery

High-speed streaming endpoint for serving images, streaming HTML5 video/audio with byte-range seeks, and downloading documents.

This route is completely public (no auth header needed) and is optimized for direct inclusion in <img src="...">, <video>, or frontend applications.

Included HTTP Response Headers:
  • Cache-Control: public, max-age=31536000, immutable (1 year browser & CDN cache)
  • Content-Type: <detected MIME type>
  • Accept-Ranges: bytes (Fast video scrubber seeking)

Possible Response Payloads

200 OK Binary Stream Headers
HTTP/1.1 200 OK
Content-Type: image/png
Content-Length: 489201
Cache-Control: public, max-age=31536000, immutable
Accept-Ranges: bytes

<Binary Stream: https://cloud.skdm.in/assets/proj_my_project/4a9e2b1f_banner.png>
404 Not Found Asset File Not Found
{
  "error": "Asset 'banner.png' not found for project 'proj_my_project'"
}
Upload Asset Console
# Option A: Upload binary file (multipart/form-data, max 500MB)
curl -X POST "https://cloud.skdm.in/api/projects/proj_my_project/upload" \
  -H "x-api-key: your_api_key_here" \
  -F "file=@/path/to/banner.png" \
  -F "folder=marketing/2026"

# Option B: Upload via direct file URL (downloaded and stored by server, max 500MB)
curl -X POST "https://cloud.skdm.in/api/projects/proj_my_project/upload" \
  -H "x-api-key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/assets/banner.png",
    "folder": "marketing/2026"
  }'
Response Explorer
201 Created
{
  "success": true,
  "message": "Media uploaded successfully",
  "data": {
    "id": 104,
    "publicUrl": "https://cloud.skdm.in/assets/proj_my_project/a9f1b2c3_banner.png"
  }
}
Delete Assets Console
curl
curl -X DELETE "https://cloud.skdm.in/api/projects/proj_my_project/assets" \
  -H "x-api-key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "filenames": [
      "4a9e2b1f_photo1.jpg",
      "8c7d6e5a_photo2.jpg"
    ]
  }'
Response Explorer
200 OK (Batch)
{
  "success": true,
  "message": "2 media assets deleted successfully",
  "deleted_filenames": [
    "4a9e2b1f_photo1.jpg",
    "8c7d6e5a_photo2.jpg"
  ]
}
Streaming HTML / Delivery
Public URL
<!-- HTML Image / CDN Embedding -->
<img src="https://cloud.skdm.in/assets/proj_my_project/4a9e2b1f_banner.png" alt="Banner" />

<!-- HTML5 Video / Audio Streaming with seek ranges -->
<video controls src="https://cloud.skdm.in/assets/proj_my_project/marketing/promo.mp4"></video>
Delivery Explorer
200 OK (Binary Stream)
HTTP/1.1 200 OK
Content-Type: image/png
Content-Length: 489201
Cache-Control: public, max-age=31536000, immutable
Accept-Ranges: bytes

<Binary Stream: https://cloud.skdm.in/assets/proj_my_project/4a9e2b1f_banner.png>
Assets Manager v2.0 · Pure Tailwind Digital Asset Platform