Media
Check media limits
Changed onPreflight a file against the platforms connected to your workspace and find out which (if any) would reject it by size or format, before you upload or post. Provide ONE of: a public url (we read its size/type via a HEAD request), an existing media_id, or an explicit size_bytes + mime. Use this to warn the user ("this 995 MB video won't post to Instagram") and confirm before uploading.
post/media/check
Request
- Base URLhttps://api.omnisocials.com/v1
- URLhttps://api.omnisocials.com/v1/media/check
- AuthHTTP bearer
Request body
Example request
{
"url": "https://example.com/video.mp4",
"media_id": "482913",
"size_bytes": 471859200,
"mime": "video/mp4"
}Response
Compatibility result
Example response
{
"file": {
"size_bytes": 471859200,
"mime": "video/mp4",
"size_known": true
},
"connected_platforms": [
"instagram"
],
"warnings": [
{
"platform": "instagram",
"display_name": "Instagram",
"reasons": [
"max 300 MB"
]
}
],
"summary": "This file (450 MB) won't post to: Instagram (max 300 MB).",
"fit": [
{
"platform": "instagram",
"display_name": "Instagram",
"ratio": "9:16",
"target": "4:5"
}
]
}Changes
- info
added the optional property
to the response with the status
- info