Skip to main content
POST
/
api
/
v1
/
media
/
upload
/
file
curl -X POST "https://upload.postsyncer.com/api/v1/media/upload/file" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -F "workspace_id=12" \
  -F "file=@/path/to/photo.jpg"
{
  "media": {
    "id": 1842,
    "name": "photo.jpg",
    "url": "https://…",
    "mime_type": "image/jpeg",
    "size": 240512,
    "is_processing": false,
    "type": "image",
    "ai_generated_id": null,
    "is_reference": false,
    "progress": 100,
    "alt": null
  }
}

Documentation Index

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

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

Upload media from file

Do not call this on the standard API host. Use https://upload.postsyncer.com/api/v1/media/upload/file, not https://postsyncer.com/api/v1/.... Same Bearer token as every other endpoint; only the hostname changes so large multipart uploads hit dedicated infrastructure (overview).
Upload one image or video with multipart/form-data. Fields:
  • workspace_id (required) — workspace that will own the file
  • file (required) — the binary upload
  • folder_id (optional) — media library folder in that workspace
The API reads the MIME type from the file (you do not send mimeType). Allowed types are the same as in the app (JPEG, PNG, GIF, WebP, MP4, MOV, etc.). Maximum size per request is 500MB (same as the in-app standard upload). Response 201: { "media": { "id", "url", "mime_type", ... } } — use media.id in Create post content[].media. Do not use this endpoint for URL import — use Import from URL.

Request

workspace_id
integer
required
Workspace that will own the file
file
file
required
Image or video file
folder_id
integer
Optional media library folder id belonging to workspace_id

Example

curl -X POST "https://upload.postsyncer.com/api/v1/media/upload/file" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -F "workspace_id=12" \
  -F "file=@/path/to/photo.jpg"
{
  "media": {
    "id": 1842,
    "name": "photo.jpg",
    "url": "https://…",
    "mime_type": "image/jpeg",
    "size": 240512,
    "is_processing": false,
    "type": "image",
    "ai_generated_id": null,
    "is_reference": false,
    "progress": 100,
    "alt": null
  }
}
Use on a post:
"content": [{ "text": "Hello", "media": [1842] }]

See also