Skip to main content

Media Upload

XenonFlare provides dedicated endpoints for uploading videos and images. Choosing the correct endpoint ensures optimized processing and validation for your media type.

Video Upload

POST /api/v1/media/videos

Uploads a video file and schedules it for publication across your connected video platforms (YouTube, Instagram Reels, TikTok, LinkedIn, Pinterest).

Chunked Uploads

If you are using Chunked Uploads, the POST /api/v1/media/videos endpoint is used to finalize the upload by providing the fileId instead of the file itself.

Headers

NameTypeDescription
X-API-KeystringYour API Key.
Content-TypestringMust be multipart/form-data.

Request Body (Form Data)

FieldTypeRequiredDescription
fileFileYes*The video file. Supported: .mp4, .mov.
fileIdstringYes*The unique ID from a chunked upload. Required if file is missing.
titlestringNoInternal title for the media.
descriptionstringNoInternal description or default caption.
platformsstringYesJSON array: ["youtube", "instagram", "tiktok", "linkedin", "pinterest"].
scheduledAtstringNoISO 8601 date string for scheduling.
isDraftbooleanNoIf true, saved as draft.

* Either file or fileId must be provided.

Configuration

Platform-specific settings must be provided as Nested Objects. Use the platform name as the key (e.g., youtube, tiktok) and provide a JSON string containing the parameters.

YouTube Specific Fields

Flat KeyNested KeyTypeDescription
youtubeTitletitlestringTitle of the YouTube video
youtubeDescriptiondescriptionstringDescription of the YouTube video
youtubePrivacyprivacyselectPrivacy status
Options: public, private, unlisted
youtubeAutoPublishautoPublishbooleanWhether to auto-publish the video
selectedYoutubeChannelschannelsarrayList of channel IDs

Note: For nested config, send a JSON string in the field youtube.

Instagram Specific Fields

Flat KeyNested KeyTypeDescription
instagramCaptioncaptionstringCaption for the Instagram post
instagramAutoPublishautoPublishbooleanWhether to auto-publish the post
selectedInstagramAccountsaccountsarrayList of Instagram account IDs

Note: For nested config, send a JSON string in the field instagram.

TikTok Specific Fields

Flat KeyNested KeyTypeDescription
tiktokCaptioncaptionstringCaption for the TikTok
tiktokPrivacyprivacyselectPrivacy status
Options: PUBLIC_TO_EVERYONE, MUTUAL_FOLLOW_FRIENDS, SELF_ONLY
tiktokAutoPublishautoPublishbooleanWhether to auto-publish the TikTok
selectedTiktokAccountsaccountsarrayList of TikTok account IDs
tiktokDisableCommentdisableCommentbooleanDisable comments
tiktokDisableDuetdisableDuetbooleanDisable duet
tiktokDisableStitchdisableStitchbooleanDisable stitch

Note: For nested config, send a JSON string in the field tiktok.

LinkedIn Specific Fields

Flat KeyNested KeyTypeDescription
linkedinCommentcommentstringComment for the LinkedIn post
linkedinAutoPublishautoPublishbooleanWhether to auto-publish the post
selectedLinkedinAccountsaccountsarrayList of LinkedIn account IDs

Note: For nested config, send a JSON string in the field linkedin.

Pinterest Specific Fields

Flat KeyNested KeyTypeDescription
pinterestTitletitlestringTitle for the Pinterest pin
pinterestDescriptiondescriptionstringDescription for the Pinterest pin
pinterestAutoPublishautoPublishbooleanWhether to auto-publish the pin
selectedPinterestAccountsaccountsarrayList of Pinterest account IDs

Note: For nested config, send a JSON string in the field pinterest.


Image Upload

POST /api/v1/media/images

Uploads an image file for platforms that support image posts (Instagram, TikTok, LinkedIn, Pinterest).

Request Body (Form Data)

FieldTypeRequiredDescription
fileFileYesThe image file. Supported: .jpg, .png, .webp.
titlestringNoInternal title.
descriptionstringNoInternal description.
platformsstringNoJSON array: ["instagram", "tiktok", "linkedin", "pinterest"].
scheduledAtstringNoISO 8601 date string for scheduling.

Configuration

Image uploads support the same Nested Object configuration as video uploads.

Instagram Specific Fields

Flat KeyNested KeyTypeDescription
instagramCaptioncaptionstringCaption for the Instagram post
instagramAutoPublishautoPublishbooleanWhether to auto-publish the post
selectedInstagramAccountsaccountsarrayList of Instagram account IDs

Note: For nested config, send a JSON string in the field instagram.

TikTok Specific Fields

Flat KeyNested KeyTypeDescription
tiktokCaptioncaptionstringCaption for the TikTok
tiktokPrivacyprivacyselectPrivacy status
Options: PUBLIC_TO_EVERYONE, MUTUAL_FOLLOW_FRIENDS, SELF_ONLY
tiktokAutoPublishautoPublishbooleanWhether to auto-publish the TikTok
selectedTiktokAccountsaccountsarrayList of TikTok account IDs
tiktokDisableCommentdisableCommentbooleanDisable comments
tiktokDisableDuetdisableDuetbooleanDisable duet
tiktokDisableStitchdisableStitchbooleanDisable stitch

Note: For nested config, send a JSON string in the field tiktok.

LinkedIn Specific Fields

Flat KeyNested KeyTypeDescription
linkedinCommentcommentstringComment for the LinkedIn post
linkedinAutoPublishautoPublishbooleanWhether to auto-publish the post
selectedLinkedinAccountsaccountsarrayList of LinkedIn account IDs

Note: For nested config, send a JSON string in the field linkedin.

Pinterest Specific Fields

Flat KeyNested KeyTypeDescription
pinterestTitletitlestringTitle for the Pinterest pin
pinterestDescriptiondescriptionstringDescription for the Pinterest pin
pinterestAutoPublishautoPublishbooleanWhether to auto-publish the pin
selectedPinterestAccountsaccountsarrayList of Pinterest account IDs

Note: For nested config, send a JSON string in the field pinterest.


Supported Platforms

PlatformVideoImage
YouTube Shorts
Instagram
TikTok
LinkedIn
Pinterest

Example: Uploading a Video

curl -X POST https://xenonflare.com/api/v1/media/videos \
-H "X-API-Key: your_api_key" \
-F "file=@gaming_highlight.mp4" \
-F "platforms=[\"youtube\", \"tiktok\"]" \
-F "youtube={\"title\": \"Epic Moment #shorts\", \"autoPublish\": true}" \
-F "tiktok={\"caption\": \"Incredible play!\", \"autoPublish\": true}"

Example: Uploading with Nested Config

curl -X POST https://xenonflare.com/api/v1/media/videos \
-H "X-API-Key: your_api_key" \
-F "file=@gaming_highlight.mp4" \
-F "platforms=[\"tiktok\"]" \
-F "tiktok={\"caption\": \"Check this out!\", \"privacy\": \"PUBLIC_TO_EVERYONE\", \"autoPublish\": true}"

Example: Uploading an Image

curl -X POST https://xenonflare.com/api/v1/media/images \
-H "X-API-Key: your_api_key" \
-F "file=@promo_image.png" \
-F "platforms=[\"instagram\", \"pinterest\"]" \
-F "instagram={\"caption\": \"New Product Launch!\", \"autoPublish\": true}" \
-F "pinterest={\"title\": \"New Collection\", \"autoPublish\": true}"

Response Body

{
"success": true,
"message": "Upload successful",
"data": [
{
"id": "67a2b...",
"title": "My Post",
"status": "scheduled",
"platforms": ["instagram", "pinterest"]
}
]
}