Skip to main content

Uploading Files

Upload a local file and receive a URL you can use in posts:
socialsyncs upload <file-path>
The command returns a JSON response with the uploaded file’s URL:
{
  "id": "img-123",
  "path": "https://uploads.socialsyncs.co/your-file.jpg"
}
You must upload media files to SocialSyncs before using them in posts. Many platforms (TikTok, Instagram, YouTube) require verified URLs and will reject external links.

Upload and Post Workflow

# 1. Upload the file
RESULT=$(socialsyncs upload photo.jpg)
FILE_URL=$(echo "$RESULT" | jq -r '.path')

# 2. Use the URL in a post
socialsyncs posts:create \
  -c "Check out this photo!" \
  -m "$FILE_URL" \
  -s "2025-01-15T10:00:00Z" \
  -i "your-integration-id"

Supported File Types

PNG, JPG, JPEG, GIF, WEBP, SVG, BMP, ICO

Video Upload Example

Platforms like TikTok, YouTube, and Instagram require video uploads through SocialSyncs:
# Upload the video
VIDEO=$(socialsyncs upload video.mp4)
VIDEO_URL=$(echo "$VIDEO" | jq -r '.path')

# Post to TikTok
socialsyncs posts:create \
  -c "New video! #fyp" \
  -m "$VIDEO_URL" \
  -s "2025-01-15T10:00:00Z" \
  --settings '{"privacy_level":"PUBLIC_TO_EVERYONE"}' \
  -i "tiktok-integration-id"