All URIs are relative to https://zernio.com/api
| Method | HTTP request | Description |
|---|---|---|
| delete_account | DELETE /v1/accounts/{accountId} | Disconnect account |
| get_account_health | GET /v1/accounts/{accountId}/health | Check account health |
| get_all_accounts_health | GET /v1/accounts/health | Check accounts health |
| get_follower_stats | GET /v1/accounts/follower-stats | Get follower stats |
| get_tik_tok_creator_info | GET /v1/accounts/{accountId}/tiktok/creator-info | Get TikTok creator info |
| list_accounts | GET /v1/accounts | List accounts |
| update_account | PUT /v1/accounts/{accountId} | Update account |
delete_account(account_id)
Disconnect account
Disconnects and removes a connected social account.
require 'time'
require 'zernio-sdk'
# setup authorization
Zernio.configure do |config|
# Configure Bearer authorization (JWT): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Zernio::AccountsApi.new
account_id = 'account_id_example' # String |
begin
# Disconnect account
result = api_instance.delete_account(account_id)
p result
rescue Zernio::ApiError => e
puts "Error when calling AccountsApi->delete_account: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> delete_account_with_http_info(account_id)
begin
# Disconnect account
data, status_code, headers = api_instance.delete_account_with_http_info(account_id)
p status_code # => 2xx
p headers # => { ... }
p data # => <DeleteAccountGroup200Response>
rescue Zernio::ApiError => e
puts "Error when calling AccountsApi->delete_account_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| account_id | String |
- Content-Type: Not defined
- Accept: application/json
get_account_health(account_id)
Check account health
Returns detailed health info for a specific account including token status, permissions, and recommendations.
require 'time'
require 'zernio-sdk'
# setup authorization
Zernio.configure do |config|
# Configure Bearer authorization (JWT): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Zernio::AccountsApi.new
account_id = 'account_id_example' # String | The account ID to check
begin
# Check account health
result = api_instance.get_account_health(account_id)
p result
rescue Zernio::ApiError => e
puts "Error when calling AccountsApi->get_account_health: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> get_account_health_with_http_info(account_id)
begin
# Check account health
data, status_code, headers = api_instance.get_account_health_with_http_info(account_id)
p status_code # => 2xx
p headers # => { ... }
p data # => <GetAccountHealth200Response>
rescue Zernio::ApiError => e
puts "Error when calling AccountsApi->get_account_health_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| account_id | String | The account ID to check |
- Content-Type: Not defined
- Accept: application/json
get_all_accounts_health(opts)
Check accounts health
Returns health status of all connected accounts including token validity, permissions, and issues needing attention.
require 'time'
require 'zernio-sdk'
# setup authorization
Zernio.configure do |config|
# Configure Bearer authorization (JWT): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Zernio::AccountsApi.new
opts = {
profile_id: 'profile_id_example', # String | Filter by profile ID
platform: 'facebook', # String | Filter by platform
status: 'healthy' # String | Filter by health status
}
begin
# Check accounts health
result = api_instance.get_all_accounts_health(opts)
p result
rescue Zernio::ApiError => e
puts "Error when calling AccountsApi->get_all_accounts_health: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> get_all_accounts_health_with_http_info(opts)
begin
# Check accounts health
data, status_code, headers = api_instance.get_all_accounts_health_with_http_info(opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <GetAllAccountsHealth200Response>
rescue Zernio::ApiError => e
puts "Error when calling AccountsApi->get_all_accounts_health_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| profile_id | String | Filter by profile ID | [optional] |
| platform | String | Filter by platform | [optional] |
| status | String | Filter by health status | [optional] |
GetAllAccountsHealth200Response
- Content-Type: Not defined
- Accept: application/json
get_follower_stats(opts)
Get follower stats
Returns follower count history and growth metrics for connected social accounts. Requires analytics add-on subscription. Follower counts are refreshed once per day.
require 'time'
require 'zernio-sdk'
# setup authorization
Zernio.configure do |config|
# Configure Bearer authorization (JWT): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Zernio::AccountsApi.new
opts = {
account_ids: 'account_ids_example', # String | Comma-separated list of account IDs (optional, defaults to all user's accounts)
profile_id: 'profile_id_example', # String | Filter by profile ID
from_date: Date.parse('2013-10-20'), # Date | Start date in YYYY-MM-DD format (defaults to 30 days ago)
to_date: Date.parse('2013-10-20'), # Date | End date in YYYY-MM-DD format (defaults to today)
granularity: 'daily' # String | Data aggregation level
}
begin
# Get follower stats
result = api_instance.get_follower_stats(opts)
p result
rescue Zernio::ApiError => e
puts "Error when calling AccountsApi->get_follower_stats: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> get_follower_stats_with_http_info(opts)
begin
# Get follower stats
data, status_code, headers = api_instance.get_follower_stats_with_http_info(opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <GetFollowerStats200Response>
rescue Zernio::ApiError => e
puts "Error when calling AccountsApi->get_follower_stats_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| account_ids | String | Comma-separated list of account IDs (optional, defaults to all user's accounts) | [optional] |
| profile_id | String | Filter by profile ID | [optional] |
| from_date | Date | Start date in YYYY-MM-DD format (defaults to 30 days ago) | [optional] |
| to_date | Date | End date in YYYY-MM-DD format (defaults to today) | [optional] |
| granularity | String | Data aggregation level | [optional][default to 'daily'] |
- Content-Type: Not defined
- Accept: application/json
get_tik_tok_creator_info(account_id, opts)
Get TikTok creator info
Returns TikTok creator details, available privacy levels, posting limits, and commercial content options for a specific TikTok account. Only works with TikTok accounts.
require 'time'
require 'zernio-sdk'
# setup authorization
Zernio.configure do |config|
# Configure Bearer authorization (JWT): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Zernio::AccountsApi.new
account_id = 'account_id_example' # String | The TikTok account ID
opts = {
media_type: 'video' # String | The media type to get creator info for (affects available interaction settings)
}
begin
# Get TikTok creator info
result = api_instance.get_tik_tok_creator_info(account_id, opts)
p result
rescue Zernio::ApiError => e
puts "Error when calling AccountsApi->get_tik_tok_creator_info: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> get_tik_tok_creator_info_with_http_info(account_id, opts)
begin
# Get TikTok creator info
data, status_code, headers = api_instance.get_tik_tok_creator_info_with_http_info(account_id, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <GetTikTokCreatorInfo200Response>
rescue Zernio::ApiError => e
puts "Error when calling AccountsApi->get_tik_tok_creator_info_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| account_id | String | The TikTok account ID | |
| media_type | String | The media type to get creator info for (affects available interaction settings) | [optional][default to 'video'] |
GetTikTokCreatorInfo200Response
- Content-Type: Not defined
- Accept: application/json
list_accounts(opts)
List accounts
Returns connected social accounts. Only includes accounts within the plan limit by default. Follower data requires analytics add-on. Supports optional server-side pagination via page/limit params. When omitted, returns all accounts (backward-compatible).
require 'time'
require 'zernio-sdk'
# setup authorization
Zernio.configure do |config|
# Configure Bearer authorization (JWT): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Zernio::AccountsApi.new
opts = {
profile_id: 'profile_id_example', # String | Filter accounts by profile ID
platform: 'platform_example', # String | Filter accounts by platform (e.g. \"instagram\", \"twitter\").
include_over_limit: true, # Boolean | When true, includes accounts from over-limit profiles.
page: 56, # Integer | Page number (1-based). When provided with limit, enables server-side pagination. Omit for all accounts.
limit: 56 # Integer | Page size. Required alongside page for pagination.
}
begin
# List accounts
result = api_instance.list_accounts(opts)
p result
rescue Zernio::ApiError => e
puts "Error when calling AccountsApi->list_accounts: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> list_accounts_with_http_info(opts)
begin
# List accounts
data, status_code, headers = api_instance.list_accounts_with_http_info(opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <ListAccounts200Response>
rescue Zernio::ApiError => e
puts "Error when calling AccountsApi->list_accounts_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| profile_id | String | Filter accounts by profile ID | [optional] |
| platform | String | Filter accounts by platform (e.g. "instagram", "twitter"). | [optional] |
| include_over_limit | Boolean | When true, includes accounts from over-limit profiles. | [optional][default to false] |
| page | Integer | Page number (1-based). When provided with limit, enables server-side pagination. Omit for all accounts. | [optional] |
| limit | Integer | Page size. Required alongside page for pagination. | [optional] |
- Content-Type: Not defined
- Accept: application/json
update_account(account_id, update_account_request)
Update account
Updates a connected social account's display name or username override.
require 'time'
require 'zernio-sdk'
# setup authorization
Zernio.configure do |config|
# Configure Bearer authorization (JWT): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Zernio::AccountsApi.new
account_id = 'account_id_example' # String |
update_account_request = Zernio::UpdateAccountRequest.new # UpdateAccountRequest |
begin
# Update account
result = api_instance.update_account(account_id, update_account_request)
p result
rescue Zernio::ApiError => e
puts "Error when calling AccountsApi->update_account: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> update_account_with_http_info(account_id, update_account_request)
begin
# Update account
data, status_code, headers = api_instance.update_account_with_http_info(account_id, update_account_request)
p status_code # => 2xx
p headers # => { ... }
p data # => <UpdateAccount200Response>
rescue Zernio::ApiError => e
puts "Error when calling AccountsApi->update_account_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| account_id | String | ||
| update_account_request | UpdateAccountRequest |
- Content-Type: application/json
- Accept: application/json