Upload Image or Video
Upload an image or small video file.
This endpoint allows you to upload a file or an image or small video to include in your post. Returned will be the URL to the image that can be used in the /post endpoint.
You can pass the file either as a multipart form data as a form parameter or a Base64 encoded file as a body parameter.
Media is available for 90 days after upload. All published posts are unaffected at the social networks. Scheduled posts beyond that time frame will result in errors at time of publishing.
Max size is 10 MB. See more details for managing larger files.
Header Parameters
Use multipart/form-data
if sending a multipart form data - see below. Otherwise, send the standard application/json
.
Body Parameters
Send as Base64
Send the media file as a Base64 encoded string as a Data URI string. The string should begin with data:content/type;base64
Example encoding with Output Format Data URI: Image: https://base64.guru/converter/encode/image Video: https://base64.guru/converter/encode/video
Note: The /post endpoint accepts larger files via an external URL with the mediaUrls parameter.
Send as Multipart Form-Data
Send the media file as a multipart form-data object. Please be sure to specify the Content-Type
as mentioned above.
The name of the file for later reference.
A description for later reference.