Skip to main content
POST
Needs media:create, and a role in the workspace that can add media. See Permissions.
Send uploads to the upload host, https://upload.postsyncer.com/api/v1/media/upload/file, not to https://postsyncer.com/api/v1. The API key is the same.
Send one file as multipart/form-data, with workspace_id and, if you like, a folder_id of the same workspace. The type is read from the file itself, so there is no type field:
  • Pictures: JPEG, PNG, GIF, WebP.
  • Videos: MP4, MOV, WebM. MKV, AVI and other video types are refused.
  • Documents: PDF, DOC, DOCX, PPT, PPTX. They publish to LinkedIn only: see Documents.
A file can be up to 500 MB. Put the answer’s media.id in a post’s content[].media. For a file already on the web, use Import media from links.

Errors

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

multipart/form-data
workspace_id
integer
required

The workspace whose library gets the file. It must be one the key can reach.

file
file
required

The picture, video or document, up to 500 MB.

folder_id
integer | null

A folder of the same workspace to put the file in. Left out: the top of the library.

Response

The file is in the library.

media
object
required

A file in the media library: what list, get and the uploads give, and what posts and comments hold.