List comment-to-DM automations
List all comment-to-DM automations for a profile. Returns automations with their stats.
Authorization
bearerAuth API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.
In: header
Query Parameters
Filter by profile. Omit to list across all profiles
Response Body
application/json
application/json
application/json
{ "success": true, "automations": [ { "id": "string", "name": "string", "platform": "instagram", "trigger": "comment", "accountId": "string", "platformPostId": "string", "postTitle": "string", "keywords": [ "string" ], "matchMode": "exact", "excludeKeywords": [ "string" ], "typoTolerance": true, "dmMessage": "string", "buttons": [ { "type": "url", "title": "string", "url": "http://example.com", "payload": "string", "phone": "string" } ], "template": { "type": "generic", "imageAspectRatio": "horizontal", "elements": [ { "title": "string", "subtitle": "string", "imageUrl": "http://example.com", "buttons": [ { "type": "url", "title": "string", "url": "http://example.com", "payload": "string" } ] } ] }, "commentReply": "string", "dmMessageVariations": [ "string" ], "commentReplyVariations": [ "string" ], "linkTracking": true, "clickTag": "string", "dmDelaySeconds": 0, "commentReplyDelaySeconds": 0, "alsoMatchInDms": true, "isActive": true, "stats": { "triggered": 0, "dmsSent": 0, "dmsFailed": 0, "uniqueContacts": 0, "trackedSends": 0, "linkClicks": 0, "uniqueClicks": 0, "delivered": 0, "read": 0 }, "createdAt": "2019-08-24T14:15:22Z" } ]}List automation logs
Paginated list of every comment that triggered this automation, with send status and commenter info.
Create comment-to-DM automation
Create a keyword-triggered DM automation on an Instagram or Facebook account. When someone comments a matching keyword (or, with `trigger: story_reply`, replies to your Instagram story with one), they automatically receive a DM. Triggers (`trigger`): * `comment` (default): fires on keyword comments on a post or reel. * `story_reply`: fires when someone replies to your Instagram story with a keyword, and answers them with a DM. Set `platformPostId` to a story media id to scope to one story, or omit it to match replies to any story. Targeting (comment trigger): * Per-post: set `platformPostId` to scope to one specific post (only one active per-post automation is allowed per post). * Account-wide ("any post"): omit `platformPostId` (and `postId`). The automation evaluates every comment on every post on the account. You can stack unlimited account-wide automations, each with its own keyword set, and they all run independently. Per-post automations take priority on their post. Audience (`audience`, Instagram only): restrict the automation to followers or non-followers, and/or to accounts above a follower count. Instagram only reveals the follow relationship for people who have messaged the account, so `audience.whenUnknown` decides what happens for everyone else - including `verify`, which sends a one-tap confirmation DM (`followGate`) and then delivers the real DM automatically. People we already know follow you skip the tap entirely. Set `alsoMatchInDms: true` on a `comment` automation to also answer people who send a keyword as a direct message instead of commenting it. One automation then covers both doors, and each door is deduplicated separately (someone who already got the DM from their comment still gets it if they later DM the keyword). Requires at least one keyword. Links in the DM's buttons can be click-tracked (`linkTracking`, on by default) and clickers optionally tagged (`clickTag`) for segmentation. Stats returned include delivered, read, and link clicks.