Media uploads
Files go straight from you to storage — they never pass through our API server. An upload is three calls:
1. POST /workspaces/{id}/media/uploads → { uploadId, mediaId, uploadUrl, expiresAt }2. PUT <uploadUrl> (the file bytes) → ETag header3. POST /workspaces/{id}/media/{mediaId}/confirm { "uploadId": "…", "eTag": "…" }- Start. Send
fileName,contentType,fileSizeandkind(IMAGEorVIDEO). The server checks them against your plan and returns a short-liveduploadUrl. - Upload.
PUTthe bytes touploadUrlwith the sameContent-Type. Do not send your API token here — the URL is already signed. - Confirm. Send back the
uploadIdand theETagfrom step 2. Then put themediaIdin a post’smediaIds. The server checks the stored file again and the media is ready to attach to a post.
The upload URL expires after a short time; start again if it does. The CLI does
all three steps for you: sp media upload logo.png.
Exact request fields are in the API reference.