DocsReference

Media uploads

Upload video files directly to Firebase Storage via a short-lived signed URL, then reference them in POST /v1/posts. The API never proxies the bytes, so uploads are fast and scale up to large files.

1. Request a signed URL

POST /v1/media/presign-upload

curl https://api.letspost.app/v1/media/presign-upload \
  -H "Authorization: Bearer $SOCIALHUB_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "fileName": "clip.mp4", "contentType": "video/mp4" }'

Response:

{
  "uploadUrl":   "https://storage.googleapis.com/...?X-Goog-Signature=...",
  "storagePath": "uploads/<uid>/<uuid>/<uuid>.mp4",
  "expiresAt":   "2026-04-16T22:15:00.000Z"
}

The URL is valid for 15 minutes. storagePath is the value you pass as mediaUrl when creating the post.

2. PUT the file to the signed URL

Send the raw file body. No auth header — the signature authorizes the upload. The Content-Type header must match the value you passed when requesting the URL.

curl -X PUT "$UPLOAD_URL" \
  -H "Content-Type: video/mp4" \
  --data-binary @clip.mp4

3. Create the post

curl https://api.letspost.app/v1/posts \
  -H "Authorization: Bearer $SOCIALHUB_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "profileId": "prof_abc",
    "title": "From my agent",
    "description": "Automated post",
    "mediaUrl": "'"$STORAGE_PATH"'",
    "platforms": ["youtube"]
  }'

Limits & supported formats

  • Max file size: 500 MB (storage rule enforces this).
  • Video types: video/mp4, video/quicktime, video/x-msvideo, video/webm.
  • TikTok: while your app is in Sandbox, keep the file under ~64 MiB — TikTok rejects multi-chunk uploads in Sandbox.
Was this page helpful?

Something unclear? Email us — we read every message.