Upload once, publish anywhere
Send a file to the media library and get back an id. Attach that id to any number of posts and FoPost converts and delivers it in the shape each network wants. Storage is private and scoped to the workspace.
curl -X POST https://api.fopost.com/v1/media \
-H "X-API-Key: $API_KEY" \
-F "workspaceId=9b2f6c1e-..." \
-F "[email protected]"
{
"id": "med_01j8...",
"type": "image",
"mimeType": "image/png",
"width": 1600,
"height": 900,
"size": 412883
}Multipart upload
Images and video up to 50 MB, validated by content, not just extension.
Reuse by id
One upload, any number of posts. The file is never sent twice.
Private by default
Files live in private storage and are served only to workspace members.
One way in, checked on arrival
Every file goes through the same path: MIME allowlist, a check of the actual bytes, a size ceiling, and your account’s free storage allowance. What comes back is a library row with dimensions and type, ready to attach.
Read the media referencecurl -X POST https://api.fopost.com/v1/posts \
-H "X-API-Key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"workspaceId": "9b2f6c1e-...",
"status": "published",
"content": [{ "text": "Launch day.", "position": 0, "media": ["med_01j8..."] }],
"accounts": [{ "id": "4a71d80b-..." }]
}'Images
PNG, JPEG, GIF, and WebP, with dimensions read on upload.
Video
MP4 and MOV, with duration and size checked against each network at publish time.
Validated
The file’s real content must match its type, or the upload is rejected.
The right format for each network, done for you
Networks disagree about aspect ratios, sizes, and codecs. At publish time each adapter takes the stored original and uploads what that platform accepts, so a single library asset works on a carousel, a thread, and a short video feed alike.
See how delivery works
Per-network rules
Size and format limits are applied by the adapter, not by you.
Ordered media
The order in the content block is the order of the carousel.
Clear failures
A file a network cannot take fails that delivery with the reason, not the whole post.
Browse, fetch, and reuse the library
List the library with filters, fetch any asset through a file endpoint that checks workspace membership on every request and never expires, and reference the same id from as many posts as you like. Brand assets, imports, and generated images all land in the same library.
Start buildingcurl "https://api.fopost.com/v1/media?workspaceId=9b2f6c1e-...&type=image" \
-H "X-API-Key: $API_KEY"
# Fetch the file itself
curl -L "https://api.fopost.com/v1/media/med_01j8.../file" \
-H "X-API-Key: $API_KEY" -o launch.pngList and filter
By type, origin, or brand role, with pagination.
Stable file URL
/v1/media/:id/file always works for members; no signed links to refresh.
Workspace scoped
A key sees one workspace’s library and nothing else.
Media API questions, answered
What is the size limit?
Which formats are accepted?
Can I attach a media id to more than one post?
Are uploaded files public?
Does it count against a quota?
Can I import from a URL or a design tool?
Build on the Media API today
Starting is free and the full API is included. Create a key and make your first call in minutes.
Get your API key