comment automations
Update automation settings
Update an automation's keywords, DM message, inline buttons, comment reply, or active status. Pass `buttons: []` to clear all buttons. When `buttons` is non-empty, `dmMessage` (the new one if you're changing it, otherwise the stored one) must be 640 characters or less.
AuthorizationBearer <token>
API key authentication - use your Zernio API key as a Bearer token
In: header
Path Parameters
automationIdstring
name?string
keywords?array<string>
matchMode?string
Value in
"exact" | "contains"dmMessage?string
buttons?
Inline DM buttons (1-3). Pass [] to clear all buttons.
Items
items <= 3commentReply?string
isActive?boolean
Response Body
application/json
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.commentautomations.updateCommentAutomation({ path: { automationId: 'automation_abc123', }, body: { name: 'Example', keywords: [ 'string', ], matchMode: 'exact', },});console.log(data);{
"success": true,
"automation": {
"id": "string",
"name": "string",
"keywords": [
"string"
],
"matchMode": "exact",
"dmMessage": "string",
"buttons": [
{
"type": "url",
"title": "string",
"url": "http://example.com",
"payload": "string",
"phone": "string"
}
],
"commentReply": "string",
"isActive": true,
"updatedAt": "2019-08-24T14:15:22Z"
}
}{
"error": "Unauthorized"
}{
"error": "Not found"
}