Uploads

Upload a media file using multipart form data.

post/upload

Request

  • Base URL
    https://api.postiz.com/public/v1
  • Auth
    API key in header Authorization

Request body multipart/form-data

filestring binary required

The file to upload

adjust'true' | 'false'

Adjust the file to the platforms' limits after the upload: videos are scaled to a 1080 px short side (long side at most 1920 px) and re-encoded to H.264 MP4 with AAC audio, images larger than that are scaled down. Runs in the background, poll GET /media/{id}/status for the result. Defaults to false.

Response

File uploaded successfully

idstring

Unique file ID

namestring

File name

pathstring

File URL

organizationIdstring
createdAtstring date-time
updatedAtstring date-time
status'ready' | 'processing'

"processing" while an upload with adjust set to true is being adjusted, otherwise "ready"

Example response

{
  "id": "e639003b-f727-4a1e-87bd-74a2c48ae41e",
  "name": "image.png",
  "path": "https://uploads.postiz.com/image.png",
  "organizationId": "85460a39-6329-4cf4-a252-187ce89a3480",
  "createdAt": "2024-12-14T08:18:54.274Z",
  "updatedAt": "2024-12-14T08:18:54.274Z"
}

Changes

    • info

      added the new optional request property

    • info

      added the optional property to the response with the status