Comment Automations

Update automation settings

Changed on

Update an automation's keywords, DM message, inline buttons, comment reply, post binding, 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. On a TikTok, Threads, LinkedIn or YouTube automation (public reply only) the DM fields are rejected with a 400 naming the field (code invalid_field_value, param the field), and commentReply cannot be cleared.

patch/v1/comment-automations/{automationId}

Request

  • Base URL: https://zernio.com/api
  • URL: https://zernio.com/api/v1/comment-automations/{automationId}
  • Auth: HTTP bearer

Path parameters

automationIdstring required

Request body

namestring
trigger'comment' | 'live_comment' | 'story_reply' | 'story_mention'

What fires the automation. Changing it detaches the automation from its bound post or story (a post id and a story id are different objects), unless this same request sets a new binding. Every trigger but 'comment' is Instagram only; 'story_mention' also requires no keywords and no binding.

keywordsstring[]
matchMode'exact' | 'contains' | 'word'

How a keyword is compared with the comment. 'contains' (default) matches anywhere, even inside another word (keyword 'app' fires on 'happy'). 'word' matches the keyword only as a standalone word. 'exact' requires the whole comment to be exactly the keyword.

excludeKeywordsstring[]

Comments containing one of these never trigger the automation, even when a trigger keyword also matches. Compared using the same matchMode.

typoToleranceboolean

Only with matchMode=word: also fire on close misspellings of a keyword (one edit for 4-7 character keywords, two from 8 up). Keywords shorter than 4 characters are never fuzzy-matched.

platformPostIdstring nullable

Re-binds the automation to another post: the platform media/post ID (or story media id when trigger=story_reply). postId, platformPostId and postTitle move as a unit: sending any of them replaces all three, and an omitted one is cleared. Send all three as null (or empty) to make it account-wide (any post / any story). Omit all three to keep the current binding. 409 when another active automation already owns the new post.

postIdstring nullable

Zernio post ID (24 hexadecimal characters); platform IDs return 400. Use it INSTEAD of platformPostId to bind to a not-yet-published Zernio post: the automation stays pending and arms itself when that post publishes. Moves as a unit with platformPostId and postTitle (see platformPostId).

postTitlestring nullable

Post content snippet for display. Moves as a unit with platformPostId and postId (see platformPostId).

dmMessagestring
commentReplystring
dmMessageVariationsstring[]

Alternate DM texts for random rotation (see create). Pass [] to clear.

commentReplyVariationsstring[]

Alternate public replies for random rotation. Pass [] to clear.

linkTrackingboolean

Wrap link buttons in a tracked redirect to count clicks. Pass false to send links untouched.

clickTagstring

Tag applied to a contact when they click a tracked link (requires linkTracking). Empty string clears it.

alsoMatchInDmsboolean

Also fire these keywords on a plain inbound DM. Enabling it requires the automation to end up with at least one keyword (this request's keywords if you send them, otherwise the stored ones) and is rejected on story_reply automations.

dmDelaySecondsinteger

Seconds to wait after the trigger before sending the DM. Send 0 to clear the delay and reply immediately.

commentReplyDelaySecondsinteger

Seconds to wait before posting the public comment reply. Send 0 to clear it. The reply never goes out before the DM.

isActiveboolean
dedupeSameTextHoursinteger nullable

Skip the DM when this recipient already received identical DM text (after personalisation) from this account, from any automation, within this many hours. The skip is logged with status skipped. Send null to clear.

publicReplyPolicy'after_dm' | 'always'

'after_dm' posts commentReply only after a successful DM. 'always' posts it whatever the audience rule, dedupe or DM outcome: the moment a comment matches, or after commentReplyDelaySeconds when set (raised to dmDelaySeconds, so it never precedes the DM attempt).

Response

Automation updated

successboolean

Changes

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new live_comment enum value to the request property

    • info

      added the new story_mention enum value to the request property

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • warning

      added the new account enum value to the / response property for the response status