Available on Premium, Business, Enterprise plans.
-
For best performance, we recommend
- Hosting media files on your own server (e.g. AWS S3).
- Passing the media URL directly in the
mediaUrls
parameter of the /post endpoint. - This approach is faster than uploading files through this endpoint.
-
Media file retention
- Uploaded files are stored for 90 days.
- After 90 days:
- Published posts on social networks are unaffected.
- Scheduled posts will fail to publish if they reference expired media.
-
File size limits
- Maximum file size: 30 MB.
- For larger files, see our guide on handling large media uploads.
If you already have your media accessible by an external URL, such as an S3 bucket, you can skip uploading the files to Ayrshare. Just POST to the
/post
endpoint with your externally accessible URL in the mediaURLs
body parameter and your file will automatically be uploaded.Header Parameters
Use
multipart/form-data
if sending a multipart form data - see below. Otherwise, send the standard application/json
.Body Parameters
Max 30 MB file size.We recommend sending as a multipart form-data object instead of Base64 encoding.
The name of the file to be uploaded.
A description of the file.
Send as Multipart Form-Data
Send the media file as a multipart form-data object. Please be sure to specify theContent-Type
as mentioned above.
Send as Base64
Send the media file as a Base64 encoded string as a Data URI string. The string should begin withdata:content/type;base64
Example encoding with Output Format Data URI:
Note: The /post endpoint accepts larger files via an external URL with the mediaUrls
parameter.