Upload Facebook media
Requires scope: `publish:write`. Uploads a base64 image (JPEG/PNG) and returns an `r2_key` to reference from a post's metadata.
Authorization
ApiKey A personal API key created in the dashboard (Starter, Pro, and Team plans).
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Base64 media upload for a platform-scoped endpoint. Allowed content types and size limits vary by platform (e.g. images only for Facebook, Pinterest, Threads; images and video for Instagram).
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/facebook/media_uploads" \ -H "Content-Type: application/json" \ -d '{ "content_type": "image/jpeg", "media": "<base64>" }'{ "url": "https://media.xreplyai.com/facebook/4021/uuid.jpg", "r2_key": "facebook/4021/uuid.jpg"}Presign a Facebook video upload GET
Requires scope: `publish:write`. Returns a presigned URL to PUT a video (up to 1 GB) directly to storage, plus the `r2_key`. Facebook presign accepts video content types only; images go through POST /facebook/media_uploads.
Upload Instagram media POST
Requires scope: `publish:write`. Uploads base64 media (image or video) and returns an `r2_key` to reference from a post's metadata.