XreplyAIDevelopers
API ReferenceMedia Uploads

Upload Instagram media

Requires scope: `publish:write`. Uploads base64 media (image or video) and returns an `r2_key` to reference from a post's metadata.

POST
/instagram/media_uploads
AuthorizationBearer <token>

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/instagram/media_uploads" \  -H "Content-Type: application/json" \  -d '{    "content_type": "string",    "media": "string"  }'
{  "url": "string",  "r2_key": "string"}