Upload File (multipart)
POST
/api/v1/media-manager/files/uploadUpload a file to the Media Manager as multipart/form-data. The file is streamed straight to storage, so large files aren't held in a JSON body.
- One
filepart per request, max 25 MB. Larger files return413. - File names in any language (e.g. Thai) are preserved.
- Use the returned
data.idasmediaFileIdin Send message.
For very small files you can also send Base64 in a JSON body with Create File (about 700 KB or less).
curl -X POST https://apigw.klinkcx.com/api/v1/media-manager/files/upload \
-H "Authorization: Bearer <YOUR_API_TOKEN>" \
-F "file=@report.pdf;type=application/pdf" \
-F "title=Monthly report"
Request
Authorization
Bearer Token
Provide your API token in the Authorization header. See Authentication to issue one.
Example:Authorization: Bearer ********************
Body Paramsmultipart/form-data
filestring<binary>requiredThe file to upload (max 25 MB).
fileNamestringoptionalOverride the stored file name. Defaults to the uploaded file's name.
titlestringoptionalTitle shown in the Media Manager.
Example:Monthly report
descriptionstringoptionalDescription.
folderIdstringoptionalTarget folder ID (UUID).
isFavoritebooleanoptionaltrueorfalse.Example:false
isPrivatebooleanoptionaltrueorfalse.Example:false
Responses
200OK
OK
dataobjectrequiredChild attributes
idstringrequireduploadIdstringrequiredfolderIdnullrequiredtitlestringrequireddescriptionstringrequiredaltTextstringrequiredsortOrderintegerrequiredisFavoritebooleanrequiredisPrivatebooleanrequiredcreatedAtstringrequiredupdatedAtstringrequireduploadobjectrequiredChild attributes
idstringrequiredfileNamestringrequiredfileSizeintegerrequiredfileUrlstringrequired
400Missing file part or invalid field (e.g. folderId not a UUID).
Missing file part or invalid field (e.g. folderId not a UUID).
messageanyoptionalerrorstringoptionalstatusCodeintegeroptional
413The file exceeds 25 MB.
The file exceeds 25 MB.
messagestringoptionalerrorstringoptionalstatusCodeintegeroptional