Posts take media as public URLs. If your files are already on a CDN or in a public bucket, use those URLs and skip this page. Otherwise, upload them to Pogton first: get an upload URL, send the file, then register it.
1. Get an upload URL
curl -X POST https://pogton.com/api/v1/media/upload-url \
-H "Authorization: Bearer pk_3f9a..."
{
"upload_url": "https://example-123.convex.cloud/api/storage/upload?token=...",
"method": "POST",
"expires_in": 3600
}
The URL works once and expires after an hour.
2. Upload the file
POST the raw bytes to upload_url with the file's Content-Type. No API key is needed for this request.
curl -X POST "$UPLOAD_URL" \
-H "Content-Type: video/mp4" \
--data-binary @clip.mp4
{ "storageId": "kg2a7d3m9q4r1t6v3w8x0y5z2a7b4c9e" }
3. Register it
curl -X POST https://pogton.com/api/v1/media \
-H "Authorization: Bearer pk_3f9a..." \
-H "Content-Type: application/json" \
-d '{ "storage_id": "kg2a7d3m9q4r1t6v3w8x0y5z2a7b4c9e", "filename": "clip.mp4" }'
{
"id": "n37e5f6g7h8j9k0m1n2p3q4r5s6t7u8v",
"url": "https://example-123.convex.cloud/api/storage/0c6f2a8e-...",
"type": "video",
"content_type": "video/mp4",
"size": 18234567,
"filename": "clip.mp4",
"created_at": "2026-10-21T09:00:00.000Z"
}
Use url in a post. Set type explicitly, because the URL has no file extension to infer it from:
{ "media": [{ "url": "https://example-123.convex.cloud/api/storage/0c6f2a8e-...", "type": "video" }] }
type in the response is derived from the content type: image, gif, video, document (PDF) or null. Registering the same storage_id twice returns the same media object. An unknown storage_id returns 404 upload_not_found.
Get or delete a file
curl https://pogton.com/api/v1/media/n37e5f6g7h8j9k0m1n2p3q4r5s6t7u8v \
-H "Authorization: Bearer pk_3f9a..."
curl -X DELETE https://pogton.com/api/v1/media/n37e5f6g7h8j9k0m1n2p3q4r5s6t7u8v \
-H "Authorization: Bearer pk_3f9a..."
Deleting removes the file. Posts already published keep their copy on the platform, but scheduled posts that still point at the URL will fail with media_error, so delete files after their posts are out.
Limits
Size and format limits are set by each platform, not by Pogton. GET /api/v1/platforms lists the media each platform takes (media.image, media.video, media.maxItems, and size limits where known). Posts are checked against them before publishing.
