All URIs are relative to https://zernio.com/api
| Method | HTTP request | Description |
|---|---|---|
| create_comment_automation | POST /v1/comment-automations | Create comment-to-DM automation |
| delete_comment_automation | DELETE /v1/comment-automations/{automationId} | Delete automation |
| get_comment_automation | GET /v1/comment-automations/{automationId} | Get automation details |
| list_comment_automation_logs | GET /v1/comment-automations/{automationId}/logs | List automation logs |
| list_comment_automations | GET /v1/comment-automations | List comment-to-DM automations |
| update_comment_automation | PATCH /v1/comment-automations/{automationId} | Update automation settings |
create_comment_automation(create_comment_automation_request)
Create 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.
require 'time'
require 'late-sdk'
# setup authorization
Late.configure do |config|
# Configure Bearer authorization (JWT): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Late::CommentAutomationsApi.new
create_comment_automation_request = Late::CreateCommentAutomationRequest.new({profile_id: 'profile_id_example', account_id: 'account_id_example', platform_post_id: 'platform_post_id_example', name: 'name_example', dm_message: 'dm_message_example'}) # CreateCommentAutomationRequest |
begin
# Create comment-to-DM automation
result = api_instance.create_comment_automation(create_comment_automation_request)
p result
rescue Late::ApiError => e
puts "Error when calling CommentAutomationsApi->create_comment_automation: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> create_comment_automation_with_http_info(create_comment_automation_request)
begin
# Create comment-to-DM automation
data, status_code, headers = api_instance.create_comment_automation_with_http_info(create_comment_automation_request)
p status_code # => 2xx
p headers # => { ... }
p data # => <CreateCommentAutomation200Response>
rescue Late::ApiError => e
puts "Error when calling CommentAutomationsApi->create_comment_automation_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| create_comment_automation_request | CreateCommentAutomationRequest |
CreateCommentAutomation200Response
- Content-Type: application/json
- Accept: application/json
delete_comment_automation(automation_id)
Delete automation
Permanently delete an automation and all its trigger logs.
require 'time'
require 'late-sdk'
# setup authorization
Late.configure do |config|
# Configure Bearer authorization (JWT): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Late::CommentAutomationsApi.new
automation_id = 'automation_id_example' # String |
begin
# Delete automation
api_instance.delete_comment_automation(automation_id)
rescue Late::ApiError => e
puts "Error when calling CommentAutomationsApi->delete_comment_automation: #{e}"
endThis returns an Array which contains the response data (nil in this case), status code and headers.
<Array(nil, Integer, Hash)> delete_comment_automation_with_http_info(automation_id)
begin
# Delete automation
data, status_code, headers = api_instance.delete_comment_automation_with_http_info(automation_id)
p status_code # => 2xx
p headers # => { ... }
p data # => nil
rescue Late::ApiError => e
puts "Error when calling CommentAutomationsApi->delete_comment_automation_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| automation_id | String |
nil (empty response body)
- Content-Type: Not defined
- Accept: application/json
get_comment_automation(automation_id)
Get automation details
Returns an automation with its configuration, stats, and recent trigger logs.
require 'time'
require 'late-sdk'
# setup authorization
Late.configure do |config|
# Configure Bearer authorization (JWT): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Late::CommentAutomationsApi.new
automation_id = 'automation_id_example' # String |
begin
# Get automation details
result = api_instance.get_comment_automation(automation_id)
p result
rescue Late::ApiError => e
puts "Error when calling CommentAutomationsApi->get_comment_automation: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> get_comment_automation_with_http_info(automation_id)
begin
# Get automation details
data, status_code, headers = api_instance.get_comment_automation_with_http_info(automation_id)
p status_code # => 2xx
p headers # => { ... }
p data # => <GetCommentAutomation200Response>
rescue Late::ApiError => e
puts "Error when calling CommentAutomationsApi->get_comment_automation_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| automation_id | String |
GetCommentAutomation200Response
- Content-Type: Not defined
- Accept: application/json
list_comment_automation_logs(automation_id, opts)
List automation logs
Paginated list of every comment that triggered this automation, with send status and commenter info.
require 'time'
require 'late-sdk'
# setup authorization
Late.configure do |config|
# Configure Bearer authorization (JWT): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Late::CommentAutomationsApi.new
automation_id = 'automation_id_example' # String |
opts = {
status: 'sent', # String | Filter by result status
limit: 56, # Integer |
skip: 56 # Integer |
}
begin
# List automation logs
result = api_instance.list_comment_automation_logs(automation_id, opts)
p result
rescue Late::ApiError => e
puts "Error when calling CommentAutomationsApi->list_comment_automation_logs: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> list_comment_automation_logs_with_http_info(automation_id, opts)
begin
# List automation logs
data, status_code, headers = api_instance.list_comment_automation_logs_with_http_info(automation_id, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <ListCommentAutomationLogs200Response>
rescue Late::ApiError => e
puts "Error when calling CommentAutomationsApi->list_comment_automation_logs_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| automation_id | String | ||
| status | String | Filter by result status | [optional] |
| limit | Integer | [optional][default to 50] | |
| skip | Integer | [optional][default to 0] |
ListCommentAutomationLogs200Response
- Content-Type: Not defined
- Accept: application/json
list_comment_automations(opts)
List comment-to-DM automations
List all comment-to-DM automations for a profile. Returns automations with their stats.
require 'time'
require 'late-sdk'
# setup authorization
Late.configure do |config|
# Configure Bearer authorization (JWT): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Late::CommentAutomationsApi.new
opts = {
profile_id: 'profile_id_example' # String | Filter by profile. Omit to list across all profiles
}
begin
# List comment-to-DM automations
result = api_instance.list_comment_automations(opts)
p result
rescue Late::ApiError => e
puts "Error when calling CommentAutomationsApi->list_comment_automations: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> list_comment_automations_with_http_info(opts)
begin
# List comment-to-DM automations
data, status_code, headers = api_instance.list_comment_automations_with_http_info(opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <ListCommentAutomations200Response>
rescue Late::ApiError => e
puts "Error when calling CommentAutomationsApi->list_comment_automations_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| profile_id | String | Filter by profile. Omit to list across all profiles | [optional] |
ListCommentAutomations200Response
- Content-Type: Not defined
- Accept: application/json
update_comment_automation(automation_id, opts)
Update automation settings
Update an automation's keywords, DM message, comment reply, or active status.
require 'time'
require 'late-sdk'
# setup authorization
Late.configure do |config|
# Configure Bearer authorization (JWT): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Late::CommentAutomationsApi.new
automation_id = 'automation_id_example' # String |
opts = {
update_comment_automation_request: Late::UpdateCommentAutomationRequest.new # UpdateCommentAutomationRequest |
}
begin
# Update automation settings
result = api_instance.update_comment_automation(automation_id, opts)
p result
rescue Late::ApiError => e
puts "Error when calling CommentAutomationsApi->update_comment_automation: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> update_comment_automation_with_http_info(automation_id, opts)
begin
# Update automation settings
data, status_code, headers = api_instance.update_comment_automation_with_http_info(automation_id, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <UpdateCommentAutomation200Response>
rescue Late::ApiError => e
puts "Error when calling CommentAutomationsApi->update_comment_automation_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| automation_id | String | ||
| update_comment_automation_request | UpdateCommentAutomationRequest | [optional] |
UpdateCommentAutomation200Response
- Content-Type: application/json
- Accept: application/json