Skip to main content

Upload Media

Upload images or videos to the SchedPilot servers. Once uploaded, you will receive a unique media_id which you can then attach to your social media posts.

Endpoint

POST https://api.schedpilot.com/developers/v1/media/upload

Headers

HeaderValueDescription
X-API-KEYsmm_your_secret_keyYour unique API key.
Content-Typemultipart/form-dataRequired. This endpoint requires multipart form-data for file transmission.

Request Body (Multipart)

FieldTypeRequiredDescription
filefileYesThe binary file (Image or Video) to upload.
Limits & Specs
  • Max File Size: 5GB.
  • Supported Images: JPG, PNG, WEBP, GIF.
  • Supported Videos: MP4, MOV, WEBM, MPEG.

Response Fields

FieldTypeDescription
codenumberStatus code 201 for successful creation.
media_idstringThe ID used for posting. It follows the format type-ID (e.g., image-50 or video-22).
typestringEither image or video.

Example Request

curl -X POST [https://api.schedpilot.com/developers/v1/media/upload](https://api.schedpilot.com/developers/v1/media/upload) \
-H "X-API-KEY: smm_a1b2c3d4e5f6g7h8" \
-F "file=@/path/to/your/video.mp4"

Example Output

{
"code": 201,
"media_id": "video-1024",
"type": "video",
"mime_type": "video/mp4"
}