FeedHorizon API
Guides

Media Uploads

How to attach images and videos to posts via the API.

Overview

FeedHorizon supports attaching media (images and videos) to posts. Media is stored in Supabase Storage and referenced via URLs.

Supported formats

TypeFormatsMax size
ImagesJPEG, PNG, GIF, WebP5 GB
VideosMP4, MOV, AVI, WebM5 GB
DocumentsPDF (LinkedIn only)100 MB

Attaching media to posts

When creating a post via the API, include media URLs in the mediaUrls field:

cURL
curl -X POST https://app.feedhorizon.dev/api/v1/posts \
  -H "Authorization: Bearer fh_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Check out this image!",
    "platforms": ["linkedin"],
    "profileId": "YOUR_PROFILE_ID",
    "mediaUrls": [
        "https://example.com/photo.jpg"
    ]
  }'

Media in responses

Media attached to a post is returned in the media array:

{
    "data": {
        "id": "clxyz...",
        "content": "Check out this image!",
        "media": [
            {
                "id": "clmedia...",
                "url": "https://your-bucket.supabase.co/storage/v1/object/public/media/photo.jpg",
                "type": "image/jpeg",
                "filename": "photo.jpg",
                "sizeBytes": 245760,
                "sortOrder": 0
            }
        ]
    }
}

Platform-specific limits

Each platform has its own media constraints:

PlatformMax imagesMax videosNotes
LinkedIn91Cannot mix images and videos

Tips

  • Upload media to a publicly accessible URL before referencing it in a post
  • Media URLs must be HTTPS
  • The dashboard provides a drag-and-drop upload experience that handles storage automatically