List comment-to-DM automations
List all comment-to-DM automations for a profile. Returns automations with their stats.
API key authentication - use your Zernio API key as a Bearer token
In: header
Query Parameters
Filter by profile. Omit to list across all profiles
Response Body
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.commentautomations.listCommentAutomations();console.log(data);{
"success": true,
"automations": [
{
"id": "string",
"name": "string",
"platform": "instagram",
"accountId": "string",
"platformPostId": "string",
"postTitle": "string",
"keywords": [
"string"
],
"matchMode": "exact",
"dmMessage": "string",
"commentReply": "string",
"isActive": true,
"stats": {
"triggered": 0,
"dmsSent": 0,
"dmsFailed": 0,
"uniqueContacts": 0
},
"createdAt": "2019-08-24T14:15:22Z"
}
]
}{
"error": "Unauthorized"
}List automation logs GET
Paginated list of every comment that triggered this automation, with send status and commenter info.
Create comment-to-DM automation POST
Create a keyword-triggered DM automation on an Instagram or Facebook account. When someone comments a matching keyword, they automatically receive a DM. Two modes: * **Per-post** — set `platformPostId` to scope the automation 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.