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"
}

Usage

After uploading, use the returned id and path in your post’s image array:
{
  "image": [
    {
      "id": "returned-id",
      "path": "returned-path-url"
    }
  ]
}

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>