All URIs are relative to https://zernio.com/api, except if the operation defines another base path.
| Method | HTTP request | Description |
|---|---|---|
| createCommentAutomation() | POST /v1/comment-automations | Create comment-to-DM automation |
| deleteCommentAutomation() | DELETE /v1/comment-automations/{automationId} | Delete automation |
| getCommentAutomation() | GET /v1/comment-automations/{automationId} | Get automation details |
| listCommentAutomationLogs() | GET /v1/comment-automations/{automationId}/logs | List automation logs |
| listCommentAutomations() | GET /v1/comment-automations | List comment-to-DM automations |
| updateCommentAutomation() | PATCH /v1/comment-automations/{automationId} | Update automation settings |
createCommentAutomation($create_comment_automation_request): \Zernio\Model\CreateCommentAutomation200ResponseCreate comment-to-DM automation
Create a keyword-triggered DM automation on an Instagram or Facebook post. When someone comments a matching keyword, they automatically receive a DM. Only one active automation per post is allowed.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: bearerAuth
$config = Zernio\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Zernio\Api\CommentAutomationsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$create_comment_automation_request = new \Zernio\Model\CreateCommentAutomationRequest(); // \Zernio\Model\CreateCommentAutomationRequest
try {
$result = $apiInstance->createCommentAutomation($create_comment_automation_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CommentAutomationsApi->createCommentAutomation: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| create_comment_automation_request | \Zernio\Model\CreateCommentAutomationRequest |
\Zernio\Model\CreateCommentAutomation200Response
- Content-Type:
application/json - Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteCommentAutomation($automation_id)Delete automation
Permanently delete an automation and all its trigger logs.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: bearerAuth
$config = Zernio\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Zernio\Api\CommentAutomationsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$automation_id = 'automation_id_example'; // string
try {
$apiInstance->deleteCommentAutomation($automation_id);
} catch (Exception $e) {
echo 'Exception when calling CommentAutomationsApi->deleteCommentAutomation: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| automation_id | string |
void (empty response body)
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getCommentAutomation($automation_id): \Zernio\Model\GetCommentAutomation200ResponseGet automation details
Returns an automation with its configuration, stats, and recent trigger logs.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: bearerAuth
$config = Zernio\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Zernio\Api\CommentAutomationsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$automation_id = 'automation_id_example'; // string
try {
$result = $apiInstance->getCommentAutomation($automation_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CommentAutomationsApi->getCommentAutomation: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| automation_id | string |
\Zernio\Model\GetCommentAutomation200Response
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
listCommentAutomationLogs($automation_id, $status, $limit, $skip): \Zernio\Model\ListCommentAutomationLogs200ResponseList automation logs
Paginated list of every comment that triggered this automation, with send status and commenter info.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: bearerAuth
$config = Zernio\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Zernio\Api\CommentAutomationsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$automation_id = 'automation_id_example'; // string
$status = 'status_example'; // string | Filter by result status
$limit = 50; // int
$skip = 0; // int
try {
$result = $apiInstance->listCommentAutomationLogs($automation_id, $status, $limit, $skip);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CommentAutomationsApi->listCommentAutomationLogs: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| automation_id | string | ||
| status | string | Filter by result status | [optional] |
| limit | int | [optional] [default to 50] | |
| skip | int | [optional] [default to 0] |
\Zernio\Model\ListCommentAutomationLogs200Response
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
listCommentAutomations($profile_id): \Zernio\Model\ListCommentAutomations200ResponseList comment-to-DM automations
List all comment-to-DM automations for a profile. Returns automations with their stats.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: bearerAuth
$config = Zernio\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Zernio\Api\CommentAutomationsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$profile_id = 'profile_id_example'; // string | Filter by profile. Omit to list across all profiles
try {
$result = $apiInstance->listCommentAutomations($profile_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CommentAutomationsApi->listCommentAutomations: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| profile_id | string | Filter by profile. Omit to list across all profiles | [optional] |
\Zernio\Model\ListCommentAutomations200Response
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateCommentAutomation($automation_id, $update_comment_automation_request): \Zernio\Model\UpdateCommentAutomation200ResponseUpdate automation settings
Update an automation's keywords, DM message, comment reply, or active status.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: bearerAuth
$config = Zernio\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Zernio\Api\CommentAutomationsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$automation_id = 'automation_id_example'; // string
$update_comment_automation_request = new \Zernio\Model\UpdateCommentAutomationRequest(); // \Zernio\Model\UpdateCommentAutomationRequest
try {
$result = $apiInstance->updateCommentAutomation($automation_id, $update_comment_automation_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CommentAutomationsApi->updateCommentAutomation: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| automation_id | string | ||
| update_comment_automation_request | \Zernio\Model\UpdateCommentAutomationRequest | [optional] |
\Zernio\Model\UpdateCommentAutomation200Response
- Content-Type:
application/json - Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]