Automations
Auto-reply rules for Instagram, Facebook Pages and Threads — comment→DM, DM reply, public reply (first comment) and hide-spam, including multi-step DM flows. Writes need an active plan; up to 20 rules per account.
GET
/automationsautomations:readList rules. Filter to one account with ?accountId=.
responsejson
{ "rules": [ { "id": "…", "connected_account_id": "…", "kind": "comment_dm", "name": "…", "is_enabled": true } ] }GET
/automations/:idautomations:readFetch one rule.
responsejson
{ "rule": { "id": "…", … } }POST
/automationsautomations:writeCreate a rule for one account. The account platform decides which kinds are allowed (Threads: comment_reply / comment_hide only).
request bodyjson
{
"connectedAccountId": "<ig/fb/threads account id>", // required
"kind": "comment_dm", // comment_dm | dm_reply | comment_reply | comment_hide
"name": "Link in DM", // required, ≤ 80
"matchMode": "contains", // contains | exact | any
"keywords": ["link", "price"], // ≤ 20, each ≤ 60; required unless matchMode "any"
"dmText": "Here you go 👉", // ≤ 1000 (≤ 640 with buttons); DM kinds only
"dmButtons": [{ "title": "Open", "url": "https://…" }], // ≤ 3
"publicReplyText": "Check your DMs!", // the first comment; ≤ 2200 (Threads ≤ 500)
"disclosureText": "— Automated reply", // appended to every DM, ≤ 80
"dmTrigger": "message", // dm_reply only: message | story_reply | story_mention
"flow": null, // multi-step DM; see below
"isEnabled": true
}responsejson
{ "rule": { "id": "…", "kind": "comment_dm", "is_enabled": true } }PATCH
/automations/:idautomations:writeUpdate a rule. Only the fields you send change — use isEnabled to pause/resume. The account cannot be changed.
responsejson
{ "rule": { "id": "…", … } }DELETE
/automations/:idautomations:writeDelete a rule.
responsejson
{ "id": "…", "deleted": true }GET
/automations/eventsautomations:readActivity log — why each comment/DM was answered (sent) or skipped. Filter with ?accountId= and/or ?ruleId=; one rule via /automations/:id/events.
responsejson
{ "events": [ { "id": "…", "rule_id": "…", "event_type": "comment", "status": "sent", "skip_reason": null } ] }