Log inStart Free Trial
easyCoexistence Official APIs

Instagram private replies API: reply to a comment with a DM

An Instagram private reply is sent with POST /<IG_ID>/messages, with recipient.comment_id set to the comment's ID and the text in message. Meta allows one per comment, within 7 days of it, or during the broadcast for a Live, and a comment that cannot take one returns code 100, subcode 2534025. The DM links to the post, and follow-ups wait until the person answers.

easyCoexistence sends private replies with reply_to_comment, private set to true, from Claude, ChatGPT or your own code, and its comment-to-DM rules send them on their own: a keyword in a comment on one post or on all of them triggers the DM, plus an optional public reply.

1

Private replies Meta allows per comment; a further message waits until the person responds.

7 days

How long after a comment on a post or Reel a private reply can still be sent.

24 hours

Time to send a follow-up after the person responds to a private reply.

750/hour

Rate Meta allows for private replies to post and Reel comments, per professional account.

2534025

Error subcode, under code 100, for a comment that cannot take a private reply.

How is a private reply sent?

With POST /<IG_ID>/messages, setting recipient to the comment's ID instead of a person's ID, and message to the text. The commenter receives it in their inbox if they follow the account, or in message requests if they do not, with a link to the post they commented on. The response returns the person's Instagram-scoped ID and the message ID.

A private reply to a comment
POST https://graph.instagram.com/<IG_ID>/messages
Content-Type: application/json

{
  "recipient": { "comment_id": "<COMMENT_ID>" },
  "message": { "text": "<YOUR_MESSAGE>" }
}

Which comments can get one?

Comments on the account's own posts, Reels, Stories, Lives and ad posts. The reply has to go out within 7 days of the comment; on a Live, only while the broadcast lasts, and never after it ends. Meta allows one private reply per comment, so a second attempt on the same comment is refused.

What happens after the private reply?

The next move is the person's. If they write back, the account can follow up within 24 hours of their response, and the conversation goes on under the usual rules for DMs. If they do not, no further message can be sent to them from that comment.

What does it need?

With Instagram Login, the permissions instagram_business_basic and instagram_business_manage_comments, and the comments webhook to learn of new comments as they arrive, with live_comments for a Live. Meta allows 750 private replies an hour per account for comments on posts and Reels, and 100 a second for Live comments.

Which errors can a private reply return?

Meta's private replies guide names no error codes of its own. Meta's error table for its messaging APIs, which covers Instagram messaging, has the two a private reply flow runs into, and the time limits are best checked before sending, against the comment's timestamp:

  • Code 100, subcode 2534025: the comment is invalid for a private reply; Meta's fix is to check that the type of data in the reply is allowed.
  • Code 10, subcode 2534022: the message went outside the allowed window, which applies to any DM sent after the window has closed, follow-ups included.
  • A comment older than 7 days, or a Live comment after the broadcast, is past what Meta allows, so skip it rather than retry.

How do you send one from Claude or ChatGPT?

With reply_to_comment and private set to true. Give it the comment's ID, from list_social_comments or a forwarded comment event, and the text, and the commenter receives it as their private reply. Without private, the same tool replies in public under the comment.

Common mistakes

  • Planning a sequence of DMs from one comment. Meta allows a single private reply, and the next message waits until the person writes back.
  • Replying in private to an old comment. Once 7 days have passed since the comment, Meta no longer accepts a private reply to it.
  • Leaving a Live comment for later. Private replies to Live comments go out only while the broadcast is on.
  • Subscribing only to the comments field. Comments made during a Live arrive on live_comments, which Meta's guide lists beside comments for private replies.
Doing this with EasyCoexistence

US$ 9 to US$ 0.75 per connection per month, falling as you add connections, with the first 3 days free.

easyCoexistence is a multichannel API and MCP server that connects AI agents such as Claude and ChatGPT to WhatsApp, Instagram, TikTok, Facebook and more. On WhatsApp it uses Coexistence: the business keeps using its number in the WhatsApp Business app while the AI works through Meta's official API.

Frequently asked questions

What does the private reply call return?

The person's Instagram-scoped ID and the message ID. Keep the scoped ID: if the person writes back, the follow-up goes to it within 24 hours of their response.

Where does the commenter see a private reply?

In their Instagram inbox if they follow the account, or in their message requests if they do not, with a link to the post they commented on.

Is a private reply the same as replying to the comment?

No. A reply under the comment is public, for anyone reading the post, while a private reply reaches only the commenter, as a DM linked to the post. reply_to_comment does either, with private set to true for the DM.

Can easyCoexistence send private replies without code?

Yes. Its comment-to-DM rules send one whenever a comment contains a keyword you choose, around the clock with no agent open, and automations can have your own AI write it.

Keep reading

Connect your first channel in two minutes.

No platform reviews to wait for. Connect WhatsApp, Instagram, TikTok or another channel, then ask your AI to post, reply or report, and watch it work.

  • 3 days free
  • Cancel any time
  • Official APIs only
  • Monitored 24/7

Verified on