Instagram inbox API

PubNio's Instagram inbox reads Instagram Direct conversations, comments on the account's media, and mentions of the account in other accounts' comments and captions. It syncs them from webhooks plus a pull every 6 hours, except mentions, which are webhook only, and holds messages to a 24-hour reply window (provider rules checked 2026-12-05).

Live · provider rules read 2026-12-05View as Markdown

Status

Not yet confirmed against a live Meta account: that Graph accepts the new request formats (list parameters as JSON, inbox POSTs form-encoded), that the comment re-read fields id,from,text,timestamp,like_count,hidden,replies{id} are accepted and a comment hidden in the Meta UI reads back hidden: true, that hide and unhide take effect and answer {"success": true}, that the mentions webhook arrives and the mentioned_comment and mentioned_media reads and a mention reply work, and how a mention reaches an Instagram Login account. PubNio's tests run this inbox against fixtures, so the rest of this page is what PubNio's code does, not what Meta has been seen to do for a connected account.

What the inbox reads

ChannelReadWritesAttachmentsSync
Direct messagesYessendYesWebhook, re-read every 6 hours
CommentsYesreply, hide, unhide, deleteYesWebhook, re-read every 6 hours
MentionsYesreplyNoWebhook only
  • Comment threads are the account's media with their comment counts. A re-read of a media's comments asks Graph for id,from,text,timestamp,like_count,hidden,replies{id}, so each comment carries its like count, its replies, and whether it is hidden.
  • A comment reply is posted to the comment's replies edge, so it lands under the comment it answers rather than on the media.
  • Instagram has no readable list of mentions. A mention arrives on the mentions webhook with IDs only. PubNio then reads a comment mention through the account's mentioned_comment field (id, text, timestamp, and its media) and a caption mention through mentioned_media (id, caption, timestamp, username), using the account's own token. If Meta refuses that read, the mention is stored with its IDs and no text; a rate limit or a transient failure retries the delivery instead.
  • A reply to a mention goes through the account's mentions edge: a comment mention names the comment and its media, and a caption mention names the media.
  • An account connected with Instagram Login sends every inbox call to Meta's Instagram Graph host; one connected through Facebook Login or unified login sends them to the Facebook Graph host. The login type decides, not the call.
  • When a message arrives by webhook, PubNio copies its attachments into its own storage: images, video, audio, and PDF, up to 25 MiB a file and 100 MiB a message. A file over the limit or of another type keeps its metadata but no bytes.

Reply window

Policy 24_hours. A direct message to someone whose last message is more than 24 hours old fails with HTTP 409 inbox-reply-window-closed, before PubNio calls Instagram. Comment and mention replies have no window.

  • Instagram gives a business 24 hours after a person's last message to answer it. PubNio checks the same 24 hours from the last inbound message it stored before it calls Instagram; a conversation with no stored inbound message has no open window.

Sync

Webhooks bring new items as they happen. Every other channel is also re-read 6 hours after its last pull, to catch anything a webhook missed.

Mentions: webhook events are the only source; there is no pull to fall back on.

  • An account connected with Instagram Login subscribes PubNio's app to the comments and messages webhook fields; one connected through Facebook Login subscribes its Page to feed. PubNio does not subscribe mentions, so that field has to be on in the Meta app itself for a mention to arrive.
  • Meta allows an app 2 messaging calls per second per Instagram professional account.

Scopes

ChannelScopes
Direct messagesinstagram_business_manage_messages
Commentsinstagram_business_manage_comments
Mentionsinstagram_business_manage_comments

Without a scope, reads keep working: the capabilities response lists it in missingScopes and drops send, reply, hide, like, and delete until the account reconnects with it. A write the channel lacks fails with HTTP 422 capability-unsupported.

  • The table lists Instagram Login's names. An account connected through Facebook Login or unified login is checked for instagram_manage_messages and instagram_manage_comments instead.
  • instagram_business_manage_messages is Meta's permission to access messages on an Instagram professional account.

Capabilities response

What the inbox capabilities endpoint returns in `accounts[]` for an Instagram professional account connected with every scope above. The other fields (`accountId`, `publishingReadiness`, `accountCapabilities`, `lastSyncError`, `deliveryGap`, `checkedAt`) are left out.

response-fields.json
{
  "provider": "instagram",
  "accountKind": "social_account",
  "messaging": {
    "resource": "conversation",
    "supported": true,
    "operations": ["list", "read", "send"],
    "attachments": true,
    "quickReplies": true,
    "buttons": true,
    "readReceipts": true,
    "moderation": false,
    "syncMode": "webhook_with_reconciliation",
    "backfillDays": 90,
    "missingScopes": [],
    "missingTasks": [],
    "unavailable": null
  },
  "comments": {
    "resource": "comment_thread",
    "supported": true,
    "operations": ["list", "read", "reply", "hide", "unhide", "delete"],
    "attachments": true,
    "quickReplies": false,
    "buttons": false,
    "readReceipts": false,
    "moderation": true,
    "syncMode": "webhook_with_reconciliation",
    "backfillDays": 30,
    "missingScopes": [],
    "missingTasks": [],
    "unavailable": null
  },
  "mentions": {
    "resource": "mention",
    "supported": true,
    "operations": ["list", "read", "reply"],
    "attachments": false,
    "quickReplies": false,
    "buttons": false,
    "readReceipts": false,
    "moderation": false,
    "syncMode": "webhook",
    "backfillDays": 0,
    "missingScopes": [],
    "missingTasks": [],
    "unavailable": null
  },
  "replyWindow": {
    "open": true,
    "policy": "24_hours",
    "endsAt": null
  }
}

Limits

  • Mention authors are saved as unknown. A comment mention is stored with no author because the mentioned_comment read asks for none, and so is a mention whose read Meta refused; only a caption mention carries the posting account's username. This is a current limit of PubNio's Instagram inbox, not a rule of Instagram.
  • The mentions backfill is webhook-only: the channel reports backfillDays 0 and its list call returns an empty page without calling Meta. A mention PubNio missed, because the webhook never arrived, the field was not subscribed, or the delivery failed, cannot be read back later. This is a current limit of PubNio, not of Instagram.
  • Comments cannot be liked or unliked. The capabilities response lists no like or unlike for Instagram, so a like request fails with HTTP 422 capability-unsupported before PubNio calls Meta; the adapter also answers unsupported and makes no request.
  • Hiding a comment the account wrote itself changes nothing on Instagram: Meta keeps the media owner's comments visible. Hide and unhide post hide as true or false on the comment, and only Graph's {"success": true} counts as done.
  • Like Messenger, Instagram opens a longer window after a Click-to-Direct ad. PubNio's check is a flat 24 hours.
  • No message tags, templates, or one-time notifications: a send carries only text, so a message outside the window cannot be sent through PubNio at all.
  • PubNio clears message, comment, and mention text 90 days after the network created it, and deletes stored attachments after 30 days.

Sources