Media
Files moved between tools and kept: list, upload, organise, link and download.
- List filesGET
/v1/mediamedia.readNewest first, in one page of up to 200 files. There is no cursor:
totalcounts every match, so narrow with the filters when it is larger than the page. A key sees every file in the workspace.usagereports the storage pool against the plan and what happens when it is full. - Open an uploader sessionPOST
/v1/media/uploadsmedia.writeThe session takes up to 50 files for 30 minutes.
linkis an upload page for a person on any device. From code, each file is three calls onapiwith no auth header, because the token is the credential:POST {api}/slotswithname,typeandsize,PUTthe bytes to theurlit returns, thenPOST {api}/slots/{slot}/complete, which answers with the media number. Files uploaded under a key have no owner and belong to the workspace. - List foldersGET
/v1/media/foldersmedia.readEvery folder in the workspace in one flat list, sorted by name and not paged. Build the tree from
parent_id, which is null at the root.filescounts the files directly inside a folder, not those in its subfolders. - Create a folderPOST
/v1/media/foldersmedia.writeThe folder is made at the root of Media, or inside
parentwhen one is given. Folders only arrange files: they change nothing about who can see or use a file. Put a file in one withPATCH /v1/media/{id}andfolder. - Rename or move a folderPATCH
/v1/media/folders/{id}media.manageSend
nameto rename,parentto move, or both;parent: nullmoves the folder to the root of Media. Moving a folder into itself or one of its own subfolders is refused withvalidation. - Delete a folder (its files move to the root)DELETE
/v1/media/folders/{id}media.manageIts subfolders are deleted with it. No file is deleted: the files in the folder and in its subfolders move to the root of Media.
- Revoke a public linkDELETE
/v1/media/links/{id}media.writeThe address stops answering at once and the file is untouched. Revoking twice is safe: a link that is already revoked comes back as it is.
{id}is the link'sid, fromPOST /v1/media/{id}/linksor thelinksofGET /v1/media/{id}. - Bundle files behind one download addressPOST
/v1/media/bundlesmedia.writeurlopens a page listing the files, each downloadable on its own, andzip_urlis one zip of them all. Anyone with the address can open it for 24 hours: there is no lifetime to choose and nothing to revoke. Up to 50 files and 1 GB a bundle, refused whole when over. - Get a fileGET
/v1/media/{id}media.read{id}takes the media number or the file's id. The reply lists every link made on the file, live, expired and revoked, and withlink=1adds a 10-minute link to the file itself for a destination that fetches by URL. A file the caller cannot use answersnot_found, neverforbidden. - Rename, pin, share or move a filePATCH
/v1/media/{id}media.writeSend only the fields to change.
pinnedkeeps a file from being removed to make room when the pool is full;sharedopens it to every member of the workspace and is not a public link. A newnamewithout an extension keeps the old one. Fields are applied in turn (pinned,shared,name,folder), so a refusal on one leaves the earlier ones changed. - Delete a fileDELETE
/v1/media/{id}media.writeCannot be undone: the file is removed from storage and every link to it stops working. A pinned file is refused with
validationuntil the body carriesconfirm: "delete"; an unpinned file goes at once. The media number is not reused. - Download a file (redirect to storage)GET
/v1/media/{id}/downloadmedia.readAnswers 302 to a storage URL that serves the file as an attachment. Follow the redirect straight away: the URL lasts 5 minutes and is not for keeping. For an address to hand to someone else, make a link with
POST /v1/media/{id}/links. - Make a public link to a filePOST
/v1/media/{id}/linksmedia.writeAnyone with the address can open the file, in the workspace or not, until the link expires or is revoked.
lifetimeis10m,1h,24h,7dorneverand defaults to24h;7dandneverneed a paid plan and are refused withplan_limitwithout one. Deleting the file ends every link to it. Revoke one early withDELETE /v1/media/links/{id}.