Skip to main content
POST
/
upload
Upload a file
curl --request POST \
  --url https://api.postiz.com/public/v1/upload \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: multipart/form-data' \
  --form file='@example-file'
{
  "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"
}

Documentation Index

Fetch the complete documentation index at: https://docs.postiz.com/llms.txt

Use this file to discover all available pages before exploring further.

Upload a media file by multipart form. Returns an id and path you can pass into a post’s image array.

Accepted MIME types

The backend inspects the file’s actual content (not just the extension) and rejects anything outside this allowlist:
TypeMIME
JPEGimage/jpeg
PNGimage/png
GIFimage/gif
WebPimage/webp
AVIFimage/avif
BMPimage/bmp
TIFFimage/tiff
MP4 videovideo/mp4
PDFs are not accepted. See Uploads troubleshooting for limits and recommended video formats.

Example

curl -X POST "https://api.postiz.com/public/v1/upload" \
  -H "Authorization: your-api-key" \
  -F "file=@photo.jpg"
Example response:
{
  "id": "01HXYZ123ABCDEF",
  "path": "https://uploads.postiz.com/photo.jpg"
}

Usage in a post

{
  "image": [
    {
      "id": "01HXYZ123ABCDEF",
      "path": "https://uploads.postiz.com/photo.jpg"
    }
  ]
}

Authorizations

Authorization
string
header
required

Your Postiz API key

Body

multipart/form-data
file
file
required

The file to upload

Response

200 - application/json

File uploaded successfully

id
string

Unique file ID

name
string

File name

path
string

File URL

organizationId
string
createdAt
string<date-time>
updatedAt
string<date-time>