curl -X POST "https://api.scanova.io/media/" \
-H "Authorization: 401f7ac837da42b97f613d789819ff93537bee6a" \
-F "file=@logo.png" \
-F "in_use=qr_logo" \
-F "category=custom-design"
{
"id": 4821,
"file": "media/uploads/104/2026/09/20260908_512873_logo.png",
"upload": null,
"file_name": "20260908_512873_logo.png",
"size": 48213,
"human_readable_size": "47.08 KB",
"original_name": "logo.png",
"bulk_media": null,
"mime_type": "image/png",
"file_type": "png",
"in_use": "qr_logo",
"category": "custom-design",
"created": "2026-09-08T10:15:32.120Z",
"modified": "2026-09-08T10:15:32.120Z"
}
Media Library
Upload a file
POST /media/
POST
/
media
/
curl -X POST "https://api.scanova.io/media/" \
-H "Authorization: 401f7ac837da42b97f613d789819ff93537bee6a" \
-F "file=@logo.png" \
-F "in_use=qr_logo" \
-F "category=custom-design"
{
"id": 4821,
"file": "media/uploads/104/2026/09/20260908_512873_logo.png",
"upload": null,
"file_name": "20260908_512873_logo.png",
"size": 48213,
"human_readable_size": "47.08 KB",
"original_name": "logo.png",
"bulk_media": null,
"mime_type": "image/png",
"file_type": "png",
"in_use": "qr_logo",
"category": "custom-design",
"created": "2026-09-08T10:15:32.120Z",
"modified": "2026-09-08T10:15:32.120Z"
}
Uploads a file, on the Management API host (
api.scanova.io), authenticated with your raw Management API key.
POST https://api.scanova.io/media/
Authorization: 401f7ac837da42b97f613d789819ff93537bee6a
Content-Type: multipart/form-data
file
required
The file to upload. Either
file or upload is required.file
Alias for
file — provide one or the other.string
Comma-separated categories to restrict validation against (
image, video, audio, pdf, doc, script). See List allowed file types for what each category accepts.string
How this file will be used:
avatar, qr_logo, qr_content, poster, qr_image, profile_pic, banner, smart, thumbnail, or unknown (default).string
Free-text category label, e.g. a QR category slug or
"Custom Design".integer
A bulk media batch id, from Create a bulk media batch, to associate this upload with.
curl -X POST "https://api.scanova.io/media/" \
-H "Authorization: 401f7ac837da42b97f613d789819ff93537bee6a" \
-F "file=@logo.png" \
-F "in_use=qr_logo" \
-F "category=custom-design"
{
"id": 4821,
"file": "media/uploads/104/2026/09/20260908_512873_logo.png",
"upload": null,
"file_name": "20260908_512873_logo.png",
"size": 48213,
"human_readable_size": "47.08 KB",
"original_name": "logo.png",
"bulk_media": null,
"mime_type": "image/png",
"file_type": "png",
"in_use": "qr_logo",
"category": "custom-design",
"created": "2026-09-08T10:15:32.120Z",
"modified": "2026-09-08T10:15:32.120Z"
}
Validation
- Extension and MIME type must both be present in the allow-list for the detected
file_typecategory — a mismatch (e.g. a.pngextension on a file that’s actually a PDF) is rejected. - Size is checked against the category’s limit — except
pdf/docfiles, where the account’sDOCUMENT_FILE_SIZEplan quota (in MB) overrides the static cap. - JavaScript (
.js) uploads are parsed to confirm they’re syntactically valid JS before the size check runs. - SVGs are scanned for embedded scripts and rejected if any are found.
- Files with no extension are rejected outright.
400 for any validation failure above, with a message identifying the problem.
Related
- List uploaded files — see what’s been uploaded.
- List allowed file types — validate client-side before uploading.
- Delete a file — remove one.
- Management API overview — the auth scheme and quota rules that apply to this endpoint.
Authorizations
Send your Management API key as the raw value of the Authorization header — no "Bearer " or "Token " prefix, and no other characters. Example: Authorization: 401f7ac837da42b97f613d789819ff93537bee6a. A header containing more than one space-separated part is rejected outright. Requests also require the request's Host header to be the management API host (e.g. api.scanova.io) — the same key sent to the regular API host will not authenticate.
Response
File uploaded.
Was this page helpful?