The Instagram comment to DM API.A keyword in the comments, a DM in return.
Breakreach's comment to DM API creates keyword rules on an Instagram account with POST /v1/comment-dm-rules: when someone comments the keyword on the post (or any post), Breakreach sends them your DM through Instagram's private replies within seconds, and can reply under the comment. Each DM comes back to you as a comment_dm.sent webhook.
Checked against the API code on October 7, 2026. Breakreach is our product.


GUIDE please
northbeam.coffeeSent! Check your DMs

Comment to DM API endpoints6 endpoints, one API key.
- GET
/v1/comment-dm-rulesThe workspace's rules, with their stats; filter by accountId or mediaId - POST
/v1/comment-dm-rulesCreate a rule; subscribes the account to Instagram's comment webhooks - PATCH
/v1/comment-dm-rules/:idChange keywords, message, replies or post, or pause with active false - DELETE
/v1/comment-dm-rules/:idDelete a rule and its activity - GET
/v1/comment-dm-rules/:id/eventsComments that matched, newest first: sent, failed with the reason, or skipped - GET
/v1/comment-dm-rules/mediaThe account's latest Instagram posts, to pick a mediaId
Base URL https://api.breakreach.com. Every call sends your key as Authorization: Bearer br_…; errors answer { "error": "…" } with a 4xx or 5xx status. Every parameter is in the OpenAPI spec.
What a rule takes
| Field | Type | What it does |
|---|---|---|
accountId | string, required on create | The Instagram account, from GET /v1/accounts |
mediaId | string or null | The post or reel to watch; left out or null, every post of the account |
postId | string | Instead of mediaId: a Breakreach post published on that account |
keywords | string[] | Up to 20 words or phrases; empty, every comment triggers the rule |
match | contains or exact | contains (default): the keyword as a whole word; exact: the comment is the keyword |
dmText | string, required on create | Up to 1,000 characters, links allowed; {username} becomes the commenter's @handle |
publicReplies | string[] | Up to 5 replies under the comment, one picked at random, posted once the DM is sent |
active | boolean | false pauses the rule; true by default |
Which networks it coversChecked against the code, not a feature list.
| Network | Comment to DM | Rule |
|---|---|---|
| Yes, Professional accounts | Public account; within 7 days of the comment | |
| No | Planned | |
| No | Their APIs can't answer a comment in private |
How does a comment become a DM?Instagram's webhook, then a private reply.
Creating a rule subscribes the Instagram account to Instagram's comment webhooks. From then on, every new comment reaches Breakreach within seconds. Breakreach skips the account's own comments (including the public replies it posts), checks the account's active rules, and sends the DM as a private reply: POST /me/messages with the comment id as the recipient, the endpoint Meta documents for answering a comment in private.
You don't run a server or a Meta app for any of this. Your side is the rule, and if you want to react to each DM, a webhook.
How are keywords matched?
Case and accents are ignored, so guide matches GUIDE and Guidé. With contains, the keyword must stand as a whole word or phrase: link matches “link please” but not “linkedin”. With exact, the comment must be the keyword alone, give or take punctuation, spaces and emoji around it. Emoji work as keywords too.
Instagram allows one private reply per comment, so one rule answers each comment. A rule on the post comes before a rule on every post, then the oldest rule wins. A person gets one DM per rule: their next comments are recorded as skipped, with the reason duplicate.
Which webhook events come with it?Three, signed like every Breakreach webhook.
comment_dm.sent fires after each DM, with the comment, the commenter and the text sent: the place to push a new lead into a CRM or a newsletter. comment_dm.failed carries Instagram's refusal in plain words. comment.received fires for every comment on an account with Comment to DM set up, matched or not. Pick them when you add the webhook in Settings, API & MCP.
What limits apply?
| Limit | Value | Set by |
|---|---|---|
| Private replies per comment | 1 | |
| Time to send it | 7 days after the comment | |
| Private replies per hour | 750 per account; Breakreach sends up to 700 and queues the rest for the next hour | Instagram, Breakreach |
| DMs per person | 1 per rule | Breakreach |
| Rules per workspace | 100 | Breakreach |
| Activity kept | 90 days | Breakreach |
Transient errors (Instagram rate limits, a 5xx) are retried twice. A refusal for good, such as a person who turned off messages, is recorded as failed with the reason, and the person can get the DM from a later comment.
What does the comment to DM API cost?
The Developer plan costs $5 a month per connected account up to 20, $3 from 21 to 100 and $2 after that, never per call or per post. The API also comes with every regular plan, from Starter at $29 a month for 5 accounts. DMs aren't counted. A rule needs an active plan or trial on the workspace: without one, matching comments are recorded as skipped with the reason plan.
Agents get the same calls.As MCP tools, no code to write.
From an agent: “set up a comment to DM on the reel I published this morning and tell me tomorrow how many DMs went out” works in Claude Code, Codex or ChatGPT, and create_comment_dm_rule takes the Breakreach post id, so the agent doesn't need the Instagram one.
list_comment_dm_rulesThe rules and their stats, and a rule's latest activitycreate_comment_dm_rule“When people comment GUIDE on my last reel, send them the guide”update_comment_dm_ruleNew keywords, a new message, or pausedelete_comment_dm_ruleRemoves a rule and its activity
What the comment to DM API doesn't do yetSo you know before you build.
- Facebook Pages, TikTok and the other networks: Instagram only for now
- Buttons, several messages or follow-up sequences: one text DM per comment
- Comments older than 7 days: Instagram refuses a private reply after that
- Story replies and comments during a live
The rest of the API (webhooks, workspaces per customer, connect links for your users, the price per connected account) is on the developers page.
Questions, answered.
Short answers about the Comment to DM API.
Yes. Meta's Instagram API has private replies, which send a DM in answer to a comment. Breakreach's API wraps them in rules: POST /v1/comment-dm-rules with the account, the post and the keywords, and every matching comment gets the DM.
No. Breakreach's Meta app holds the approved permissions and receives Instagram's comment webhooks. Creating a rule subscribes the account; your code only creates rules and, if you want, listens to the comment_dm.sent webhook.
GET /v1/comment-dm-rules/media?accountId=… lists the account's latest posts with their ids. For a post published with Breakreach, pass its Breakreach id as postId instead. Leave both out to cover every post.
GET /v1/comment-dm-rules/:id/events lists every matching comment with its status, and the comment_dm.sent webhook fires as each DM goes out. Failures carry Instagram's reason in plain words.
No. Each person gets one DM per rule, however many times they comment. Their next comments show as skipped with the reason duplicate.
Your first call is five minutes away.From $5 a month per account.
Billed per connected account. Cancel anytime.