Media
Create an upload link
Get a short-lived link where a person, or an app that runs commands, sends files into a workspace’s media library.
POST
Needs
media:create, and a role in the workspace that can add media. See Permissions.create-media-upload-link does the same.
urlis a page. The person opens it, with no PostSyncer sign-in, and drops their files on it.upload_urltakes files byPOST, with no API key. An app that runs commands sends each file there with curl: one request for a file up to 95 MB, or chunks for a bigger one. Files from AI chats has the commands.
folder_id when you send one, with the same type rules as Upload a file: pictures (JPEG, PNG, GIF, WebP), videos (MP4, MOV, WebM) and documents (PDF, DOC, DOCX, PPT, PPTX).
The link can only upload: it can’t read the library or change anything else. This answer is the only one with
url and upload_url. Get an upload link gives the link’s files, never its addresses, so keep them until the upload is done. A lost link can’t be found again: make a new one.
When the person says the upload is done, get the link for the media ids and put them in a post’s content[].media.
Errors
Related
- Get an upload link: the files that arrived.
- Files from AI chats: the page, curl, chunks and every answer the upload gives.
- Upload a file: send a file yourself, with your API key.
Authorizations
Body
application/json