Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.letmepost.dev/llms.txt

Use this file to discover all available pages before exploring further.

Instagram Business is published via Meta’s Graph API, not the consumer Instagram API. Connecting Instagram is a side effect of connecting Facebook — there is no separate connect/instagram endpoint. One Meta OAuth produces two letmepost rows: one facebook, one instagram (when an IG Business is linked to a Page the user manages).

Connect

Start at POST /v1/accounts/connect/facebook (not instagram). The Facebook OAuth grants the scopes needed for both Pages and IG Business. After complete:
  • We call GET /me/accounts to discover Pages.
  • For each Page, we read instagram_business_account to find the linked IG.
  • One row per discovered Page, plus one IG row per Page that has an IG Business linked.
If the user manages no Pages: facebook.pages.none. If a Page has no IG Business linked: only the Facebook row is created.

Scopes

The Facebook connect requests these scopes (all of them; IG Business only works with pages_show_list + the instagram_* scopes):
pages_show_list             — list Pages the user manages
pages_manage_posts          — create posts on Pages
pages_read_engagement       — pre-req for posts on some apps
business_management         — needed for Pages connected via Business
instagram_basic             — read IG Business account info per Page
instagram_content_publish   — two-step container publish on IG
extended scopes (off by default): pages_read_user_content, pages_manage_engagement, instagram_manage_comments, instagram_manage_insights.

Token lifecycle

We exchange the short-lived token for a long-lived (~60-day) token at connect time, then refresh on schedule. token.expiring fires before expiry.

Posting

Instagram has no text-only post shape — every post needs at least one media item (instagram.media.required).
single-image.json
{
  "account": { "platform": "instagram", "id": "..." },
  "text": "shipped",
  "media": [
    { "kind": "image", "mediaId": "med_…", "altText": "..." }
  ]
}
reels.json
{
  "account": { "platform": "instagram", "id": "..." },
  "text": "Reels caption",
  "media": [
    { "kind": "video", "mediaId": "med_…" }
  ]
}
carousel.json
{
  "account": { "platform": "instagram", "id": "..." },
  "text": "carousel of three",
  "media": [
    { "kind": "image", "mediaId": "med_…" },
    { "kind": "image", "mediaId": "med_…" },
    { "kind": "image", "mediaId": "med_…" }
  ]
}

Constraints

Preflight rules

Notes

  • Use POST /v1/media to upload. URLs from your own host work but introduce the reachability failure mode — Meta’s CDN must be able to fetch them anonymously.
  • Reels and feed video are unified on the modern API; we route single-video posts through the Reels container and feed-video posts have been retired.