Endpoints
{post_id} is the Instagram media ID: targets[].platform_post_id on a post you published through SocialAPI, or id from GET /v1/inbox/comments. {comment_id} accepts the comment’s sapi_cmt_ ID or Instagram’s comment ID. See IDs.
Your first reply
List the comments on a post.account_id is required:
comment_id in the response is the sapi_cmt_ ID of the new reply. Omit comment_id in the request to add a top-level comment to the post instead.
Comments on Instagram
Every field of a comment is described in List comments and replies. On Instagram:capabilities.can_reply,can_delete,can_hide, andcan_private_replyaretrueon every comment and every reply.can_likeistrueon accounts connected through Facebook Login andfalseon accounts connected through Instagram Login.author_name. Instagram gives a username and no display name, soauthor_nameholds the username.liked_by_viewer. On Instagram Login it is alwaysfalse. On Facebook Login it can betrueonly for a like made through SocialAPI. Atruevalue can readfalselater. A like made in the Instagram app never shows astrue.is_hidden. A hidden comment stays in the list withis_hidden: true.parent_id. A reply carries theplatform_idof the top-level comment it answers. A top-level comment hasparent_id: null.- Paging. A page can hold fewer comments than
limit. Follownext_cursoruntilhas_moreisfalse: see Pagination.
moderation_status, order, and q filter only YouTube comments. On Instagram they are accepted and do not filter or sort the list.
Reply to a comment
Instagram nests replies one level deep: a reply belongs to a top-level comment. To answer a reply, send theplatform_id of its parent (the reply’s parent_id) as comment_id. A reply posts as the connected account and is public once Instagram accepts it.
A reply costs 1 interaction credit. When the plan’s interaction allowance is used up, the call returns 429 validation.interaction_limit_exhausted. A reply sent faster than the account’s sending pace allows returns 429 messaging.velocity_limit: wait for the Retry-After header. See When a credit comes back.
Send a private reply
A private reply is a direct message (DM) to the person who wrote a comment. It opens a conversation in that person’s Instagram inbox, which continues on Instagram direct messages.- One per comment, within 7 days. Instagram allows 1 private reply per comment, sent within 7 days of the comment. A second private reply, or one to a comment older than 7 days, returns
400 platform.instagram.private_reply_ineligible. When Instagram refuses the reply,error.meta.fbtrace_idholds Meta’s trace ID for Meta support, when Meta sends one. When the comment is already known to be ineligible, the error instead carrieserror.meta.blocked_locally: trueanderror.meta.reason:already_replied,platform_refused, orwindow_expired. Whenerror.meta.blocked_locallyistrue, or the reply was text only, this 400 is final. When Instagram refuses a reply that carriedbuttonsor an attachment, the refusal can come from that content: send it once more as text only. - No messaging window. A private reply does not open the 24-hour messaging window. You can message the person again only after they answer, and their answer opens the window.
- Content. The request carries
text(with up to 3 optionalbuttons, sent as a button template), or oneattachment, not both.textholds at most 1,000 bytes of UTF-8, and 640 characters when it carriesbuttons. Sendingattachmentwithtextorbuttonsreturns400 validation.attachment_conflict. Field rules are in Send a private reply, and Instagram’s file formats and sizes are in Message types and sizes. - Attachment refused. If Instagram cannot fetch or accept the file, the call returns
422 platform.instagram.attachment_failed, and the comment can still receive its private reply. - Facebook Login. An account whose Instagram account has no linked Facebook Page returns
409 platform.instagram.no_page. Reconnect the account.
Hide, unhide, and delete a comment
Hiding removes a comment from public view on Instagram, and unhiding restores it. Deleting removes it from Instagram and cannot be undone. All three work on comments and replies on the account’s posts, on both login paths.DELETE on the same path, and delete with DELETE /v1/inbox/comments/{post_id}/{comment_id}. Both take account_id as a query parameter and return { "success": true }.
Like a comment
Liking a comment works only on accounts connected through Facebook Login.POST /v1/inbox/comments/{post_id}/{comment_id}/like likes the comment as the connected account, and DELETE on the same path removes the like. POST takes account_id in the body, and DELETE as a query parameter. Both return { "success": true }.
On an account connected through Instagram Login, both calls return 501 resource.not_supported, because Instagram Login has no comment likes. Read can_like on the comment instead of assuming.
Instagram Login and Facebook Login
Both login paths list, reply to, hide, unhide, and delete comments, and send private replies, in the same way. They differ in these rows:
Every scope SocialAPI requests is listed in Instagram scopes and Facebook Login scopes.
What Instagram does not allow
- Replying to a reply. Replies nest one level deep. Reply to the parent comment instead.
- Liking a comment on Instagram Login. Connect through Facebook Login to like comments.
- A second private reply to the same comment, or a private reply after 7 days. Message the person through their conversation once they answer.
- Editing a comment. SocialAPI has no endpoint to edit an Instagram comment. Delete it and reply again.
- Turning comments off on a post. SocialAPI has no endpoint to disable comments on an Instagram post. Do it in the Instagram app.
- Commenting on a live video. Instagram does not let apps comment on an Instagram Live broadcast.
Limits
Errors and debugging
Check these in order when an Instagram comment call fails:403 account.permission_missing. The account lacks the permission the call needs:comments.readto list comments and replies,comments.writeto reply, hide, unhide, delete, or like, andmessages.writefor a private reply.401 platform.instagram.auth,403 account.reconnection_required. The token is no longer valid. Reconnect the account.501 resource.not_supported. A like or unlike on an account connected through Instagram Login.400 platform.instagram.private_reply_ineligible. The comment already received its private reply, or is older than 7 days. Whenerror.meta.blocked_locallyistrue, or the reply was text only, do not retry. When Instagram refuses a reply that carriedbuttonsor an attachment, send it once more as text only.422 platform.instagram.attachment_failed. Instagram could not fetch or accept the private reply’s file. Fix the URL or the file and send again.409 platform.instagram.no_page. A private reply on a Facebook Login account with no linked Facebook Page. Reconnect the account.404 platform.instagram.100. Instagram says the comment or post does not exist, for example because it was deleted. Check the ID.403 platform.instagram.200. The account has not granted the platform scope the call needs. Reconnect the account and approve every scope.429 validation.interaction_limit_exhausted,429 messaging.velocity_limit,429 platform.instagram.rate_limit,429 platform.instagram.throttled. Your plan’s allowance, the account’s sending pace (429 messaging.velocity_limit: wait for theRetry-Afterheader), or Instagram’s own limit.429 platform.instagram.throttled: wait for theRetry-Afterheader, then retry. Read theRetry-Afterheader when it is present: see Rate limits.
Scopes
A scoped API key needs these scopes:Events
SocialAPI sendscomment.received when a person comments on, or replies to a comment on, a post of a connected Instagram account. A comment the account writes itself, in the Instagram app or through SocialAPI, sends no event. An account without the comments.read permission receives no comment.received events. The payload is in Webhook events.
Use from an AI agent
The full tool list is in MCP tools.
Related
- Instagram API: capabilities, connection, and scopes for Instagram
- Instagram direct messages: the conversation a private reply starts
- Comments: the endpoints and fields every platform shares
- Automations: answer Instagram comments by keyword with a private reply
- Webhook events: the
comment.receivedpayload