Publish a photo or Reel to Instagram on behalf of a connected eranol.com account.
Publishes a photo or Reel to Instagram on behalf of a connected eranol.com account, using the Instagram Graph API. Can be published immediately or scheduled for a future time.
Before this endpoint can be used, the target account must have connected Instagram via Dashboard → Social Media → Connect (requires an Instagram Business or Creator account). Calls for an account with no active Instagram connection return a 400 error, and an expired connection returns 401.
POST https://eranol.com/api/v1/social/instagram/publish
| Field | Type | Required | Notes |
|---|---|---|---|
media_type | string | No | IMAGE or REEL. Defaults to REEL |
media_url | string | Yes | Image or video URL. Must be hosted on eranol.com or www.eranol.com — external URLs are rejected |
caption | string | No | Up to 2200 characters |
share_to_feed | boolean | No | REELs only — also show the Reel on the main profile feed. Defaults to true |
scheduled_for | string | No | ISO 8601 timestamp in the future — see Scheduling below |
Pass scheduled_for as a future ISO 8601 timestamp to queue the post instead of publishing it right away. Scheduled posts:
202 Accepted instead of 200, with { success: true, scheduled: true, scheduled_post_id, scheduled_for } instead of the normal publish resultscheduled-posts endpoints for this platform{
"media_type": "REEL",
"media_url": "https://www.eranol.com/uploads/video.mp4",
"caption": "Check this out!",
"share_to_feed": true
}
{
"media_type": "IMAGE",
"media_url": "https://www.eranol.com/uploads/photo.jpg",
"caption": "Dropping next week 📅",
"scheduled_for": "2026-09-01T15:00:00Z"
}
{
"success": true,
"media_id": "17912345678901234"
}
{
"success": true,
"scheduled": true,
"scheduled_post_id": "a1b2c3d4-...",
"scheduled_for": "2026-09-01T15:00:00.000Z"
}
| Status | Meaning |
|---|---|
400 | Missing/invalid media_url, invalid media_type, media_url not hosted on eranol.com, invalid/past scheduled_for, or the account has no connected Instagram account |
401 | Missing or invalid API key, or the Instagram connection's token has expired — reconnect via the dashboard |
402 | Insufficient credits |
502 | Instagram's API rejected the container creation or publish step, or the video failed processing |
504 | Video processing timed out (REELs only) — try again |