late 0.0.1137

API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema). Request ids: responses carry an X-Request-Id header with the id we log the request under. Quote it when reporting a problem. A valid x-request-id you send is reused as that id.
Documentation
# \CommentAutomationsApi

All URIs are relative to *https://zernio.com/api*

Method | HTTP request | Description
------------- | ------------- | -------------
[**create_comment_automation**](CommentAutomationsApi.md#create_comment_automation) | **POST** /v1/comment-automations | Create comment-to-DM automation
[**delete_comment_automation**](CommentAutomationsApi.md#delete_comment_automation) | **DELETE** /v1/comment-automations/{automationId} | Delete automation
[**get_comment_automation**](CommentAutomationsApi.md#get_comment_automation) | **GET** /v1/comment-automations/{automationId} | Get automation details
[**list_comment_automation_logs**](CommentAutomationsApi.md#list_comment_automation_logs) | **GET** /v1/comment-automations/{automationId}/logs | List automation logs
[**list_comment_automations**](CommentAutomationsApi.md#list_comment_automations) | **GET** /v1/comment-automations | List comment-to-DM automations
[**update_comment_automation**](CommentAutomationsApi.md#update_comment_automation) | **PATCH** /v1/comment-automations/{automationId} | Update automation settings



## create_comment_automation

> models::CreateCommentAutomation200Response create_comment_automation(create_comment_automation_request)
Create comment-to-DM automation

Create a keyword-triggered automation. On Instagram and Facebook, when someone comments a matching keyword (or, with `trigger: story_reply`, replies to your Instagram story with one), they automatically receive a DM.  Platforms:   * `instagram`, `facebook`: the full DM automation (private reply, buttons,     product card, audience rules, follow gate) plus the optional public reply.   * `tiktok`, `threads`, `linkedin`, `youtube`: public reply only. These     platforms have no private reply to a comment, so the automation answers a     matching comment with `commentReply` and nothing else. `commentReply` is     required and the DM fields (`dmMessage`, `dmMessageVariations`, `buttons`,     `template`, `quickReplies`, `alsoMatchInDms`, `audience`, `followGate`,     `dmDelaySeconds`, `commentReplyDelaySeconds`) are rejected with a 400 naming the     field. TikTok comments arrive by webhook (TikTok business accounts only); the     others are read by the comment poll, so a reply follows the comment by up to the     poll interval (10 minutes on posts from the last 24 hours, longer on older posts).     `repeatPolicy` applies there too: with the default `once`, a person gets one public     reply per automation, and their later comments get none.   * X accounts are refused with a 400 (`platform_not_supported`): X comment polling is     off, so an X automation could never fire.  To continue into a specific workflow after the recipient taps a button, use `{\"type\":\"postback\",\"title\":\"Send it\",\"payload\":\"zernio:workflow:<workflowId>\"}`. The target must be active and belong to the same account and profile. This also works for product-card buttons. The tap starts that workflow directly, without matching its keyword or first-message condition. A tap on a workflow that is waiting on `wait_for_reply` in that conversation answers that wait and resumes the run. A tap on a different active workflow starts it and exits the other live runs. Stale or invalid targets still do nothing. The initial comment DM alone does not start the workflow: the recipient must tap.  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.   * `live_comment` (Instagram only): fires on keyword comments made during one of     your Instagram live broadcasts and answers them with a private reply. `comment`     automations never fire on live comments, and `live_comment` ones never fire on     post comments. Meta only accepts the private reply while the broadcast is live.   * `story_mention` (Instagram only): fires when someone mentions your account in     their story, and answers them with a DM. A mention carries no text and Meta does     not identify the story, so `keywords` must be empty and `platformPostId` omitted.  Comments on Instagram and Facebook arrive by webhook. Every 10 minutes Zernio also reads the latest comments and replies back (the bound post, or the 5 newest posts for an account-wide automation, up to 20 Graph reads per account per run; a post not fully read is picked up again on the next run) and runs any comment the webhook did not deliver, so a dropped webhook still fires. A comment is answered at most once whichever path sees it first.  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 `audience.tapToUnlock: true` instead to send that button DM to every commenter and deliver the real DM on the tap with no follow check.  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.  Personalisation: `{{first_name}}`, `{{name}}` and `{{username}}` in `dmMessage`, `commentReply`, their variations and button titles resolve from the commenter (first word of the display name, the display name, the platform username). A value the platform does not give us resolves to an empty string.  Behaviour: `repeatPolicy` decides whether a person can get the DM again, `dedupeSameTextHours` stops two automations sending the same text to one person, `publicReplyPolicy` decides whether the public reply waits for the DM, and `actions` likes or hides the matched comment. 

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**create_comment_automation_request** | [**CreateCommentAutomationRequest**](CreateCommentAutomationRequest.md) |  | [required] |

### Return type

[**models::CreateCommentAutomation200Response**](createCommentAutomation_200_response.md)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## delete_comment_automation

> delete_comment_automation(automation_id)
Delete automation

Permanently delete an automation and all its trigger logs.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**automation_id** | **String** |  | [required] |

### Return type

 (empty response body)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_comment_automation

> models::GetCommentAutomation200Response get_comment_automation(automation_id)
Get automation details

Returns an automation with its configuration, stats, and recent trigger logs.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**automation_id** | **String** |  | [required] |

### Return type

[**models::GetCommentAutomation200Response**](getCommentAutomation_200_response.md)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## list_comment_automation_logs

> models::ListCommentAutomationLogs200Response list_comment_automation_logs(automation_id, status, limit, skip)
List automation logs

Paginated list of every comment that triggered this automation, with send status and commenter info.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**automation_id** | **String** |  | [required] |
**status** | Option<**String**> | Filter by result status |  |
**limit** | Option<**i32**> |  |  |[default to 50]
**skip** | Option<**i32**> |  |  |[default to 0]

### Return type

[**models::ListCommentAutomationLogs200Response**](listCommentAutomationLogs_200_response.md)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## list_comment_automations

> models::ListCommentAutomations200Response list_comment_automations(profile_id)
List comment-to-DM automations

List all comment-to-DM automations for a profile. Returns automations with their stats.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**profile_id** | Option<**String**> | Filter by profile. Omit to list across all profiles |  |

### Return type

[**models::ListCommentAutomations200Response**](listCommentAutomations_200_response.md)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## update_comment_automation

> models::UpdateCommentAutomation200Response update_comment_automation(automation_id, update_comment_automation_request)
Update automation settings

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. 

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**automation_id** | **String** |  | [required] |
**update_comment_automation_request** | Option<[**UpdateCommentAutomationRequest**](UpdateCommentAutomationRequest.md)> |  |  |

### Return type

[**models::UpdateCommentAutomation200Response**](updateCommentAutomation_200_response.md)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)