All URIs are relative to https://zernio.com/api
| Method | HTTP request | Description |
|---|---|---|
| addTrackingTagSharedAccount | POST /v1/accounts/{accountId}/tracking-tags/{tagId}/shared-accounts | Share with an ad account |
| addTrackingTagSharedAccountWithHttpInfo | POST /v1/accounts/{accountId}/tracking-tags/{tagId}/shared-accounts | Share with an ad account |
| createTrackingTag | POST /v1/accounts/{accountId}/tracking-tags | Create a tracking tag |
| createTrackingTagWithHttpInfo | POST /v1/accounts/{accountId}/tracking-tags | Create a tracking tag |
| getTrackingTag | GET /v1/accounts/{accountId}/tracking-tags/{tagId} | Get a tracking tag |
| getTrackingTagWithHttpInfo | GET /v1/accounts/{accountId}/tracking-tags/{tagId} | Get a tracking tag |
| getTrackingTagStats | GET /v1/accounts/{accountId}/tracking-tags/{tagId}/stats | Get aggregated event stats |
| getTrackingTagStatsWithHttpInfo | GET /v1/accounts/{accountId}/tracking-tags/{tagId}/stats | Get aggregated event stats |
| listTrackingTagSharedAccounts | GET /v1/accounts/{accountId}/tracking-tags/{tagId}/shared-accounts | List accounts it is shared with |
| listTrackingTagSharedAccountsWithHttpInfo | GET /v1/accounts/{accountId}/tracking-tags/{tagId}/shared-accounts | List accounts it is shared with |
| listTrackingTags | GET /v1/accounts/{accountId}/tracking-tags | List tracking tags |
| listTrackingTagsWithHttpInfo | GET /v1/accounts/{accountId}/tracking-tags | List tracking tags |
| removeTrackingTagSharedAccount | DELETE /v1/accounts/{accountId}/tracking-tags/{tagId}/shared-accounts | Stop sharing with an account |
| removeTrackingTagSharedAccountWithHttpInfo | DELETE /v1/accounts/{accountId}/tracking-tags/{tagId}/shared-accounts | Stop sharing with an account |
| updateTrackingTag | PATCH /v1/accounts/{accountId}/tracking-tags/{tagId} | Update a tracking tag |
| updateTrackingTagWithHttpInfo | PATCH /v1/accounts/{accountId}/tracking-tags/{tagId} | Update a tracking tag |
AddTrackingTagSharedAccount201Response addTrackingTagSharedAccount(accountId, tagId, addTrackingTagSharedAccountRequest)
Share with an ad account
Shares the pixel with another ad account so campaigns/audiences in that account can use it. Requires that you administer both the pixel's owning Business Manager and the target ad account; a pixel on a personal (non-BM) ad account can't be shared (Meta will reject the call). Meta only (platform `metaads`); other platforms return 405.
// Import classes:
import dev.zernio.ApiClient;
import dev.zernio.ApiException;
import dev.zernio.Configuration;
import dev.zernio.auth.*;
import dev.zernio.models.*;
import dev.zernio.api.TrackingTagsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://zernio.com/api");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
TrackingTagsApi apiInstance = new TrackingTagsApi(defaultClient);
String accountId = "accountId_example"; // String |
String tagId = "tagId_example"; // String | Pixel id.
AddTrackingTagSharedAccountRequest addTrackingTagSharedAccountRequest = new AddTrackingTagSharedAccountRequest(); // AddTrackingTagSharedAccountRequest |
try {
AddTrackingTagSharedAccount201Response result = apiInstance.addTrackingTagSharedAccount(accountId, tagId, addTrackingTagSharedAccountRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TrackingTagsApi#addTrackingTagSharedAccount");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| accountId | String | ||
| tagId | String | Pixel id. | |
| addTrackingTagSharedAccountRequest | AddTrackingTagSharedAccountRequest |
AddTrackingTagSharedAccount201Response
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 201 | Tracking tag shared with the ad account | - |
| 400 | Invalid body / `adAccountId`, or Meta rejected the share (e.g. personal ad account). | - |
| 401 | Unauthorized | - |
| 403 | Ads access required (Ads add-on on legacy plans, included on usage-based plans), or the Meta token lacks ads permissions (reconnect required). | - |
| 404 | Account or tracking tag not found. | - |
| 405 | Platform does not support shared accounts. | - |
ApiResponse addTrackingTagSharedAccount addTrackingTagSharedAccountWithHttpInfo(accountId, tagId, addTrackingTagSharedAccountRequest)
Share with an ad account
Shares the pixel with another ad account so campaigns/audiences in that account can use it. Requires that you administer both the pixel's owning Business Manager and the target ad account; a pixel on a personal (non-BM) ad account can't be shared (Meta will reject the call). Meta only (platform `metaads`); other platforms return 405.
// Import classes:
import dev.zernio.ApiClient;
import dev.zernio.ApiException;
import dev.zernio.ApiResponse;
import dev.zernio.Configuration;
import dev.zernio.auth.*;
import dev.zernio.models.*;
import dev.zernio.api.TrackingTagsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://zernio.com/api");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
TrackingTagsApi apiInstance = new TrackingTagsApi(defaultClient);
String accountId = "accountId_example"; // String |
String tagId = "tagId_example"; // String | Pixel id.
AddTrackingTagSharedAccountRequest addTrackingTagSharedAccountRequest = new AddTrackingTagSharedAccountRequest(); // AddTrackingTagSharedAccountRequest |
try {
ApiResponse<AddTrackingTagSharedAccount201Response> response = apiInstance.addTrackingTagSharedAccountWithHttpInfo(accountId, tagId, addTrackingTagSharedAccountRequest);
System.out.println("Status code: " + response.getStatusCode());
System.out.println("Response headers: " + response.getHeaders());
System.out.println("Response body: " + response.getData());
} catch (ApiException e) {
System.err.println("Exception when calling TrackingTagsApi#addTrackingTagSharedAccount");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
System.err.println("Reason: " + e.getResponseBody());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| accountId | String | ||
| tagId | String | Pixel id. | |
| addTrackingTagSharedAccountRequest | AddTrackingTagSharedAccountRequest |
ApiResponse<AddTrackingTagSharedAccount201Response>
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 201 | Tracking tag shared with the ad account | - |
| 400 | Invalid body / `adAccountId`, or Meta rejected the share (e.g. personal ad account). | - |
| 401 | Unauthorized | - |
| 403 | Ads access required (Ads add-on on legacy plans, included on usage-based plans), or the Meta token lacks ads permissions (reconnect required). | - |
| 404 | Account or tracking tag not found. | - |
| 405 | Platform does not support shared accounts. | - |
CreateTrackingTag201Response createTrackingTag(accountId, createTrackingTagRequest)
Create a tracking tag
Creates a Meta Pixel on the given ad account (`POST /act_{id}/adspixels` — `name` is the only input). Returns the created tag including its install `code`. The pixel is owned by the Business Manager that owns the ad account; a pixel created on a personal (non-BM) ad account ends up with `ownerBusinessId: null` and can't be shared with other ad accounts. Creating a pixel does NOT install it — install the returned `code` snippet on the site, or send events server-side via `POST /v1/ads/conversions`. The check `installed` is derived from `lastFiredTime`. NOT idempotent: each call creates a new pixel. Do not retry blindly on timeout. Meta only (platform `metaads`); other platforms return 405.
// Import classes:
import dev.zernio.ApiClient;
import dev.zernio.ApiException;
import dev.zernio.Configuration;
import dev.zernio.auth.*;
import dev.zernio.models.*;
import dev.zernio.api.TrackingTagsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://zernio.com/api");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
TrackingTagsApi apiInstance = new TrackingTagsApi(defaultClient);
String accountId = "accountId_example"; // String | Meta ads SocialAccount id (platform `metaads`).
CreateTrackingTagRequest createTrackingTagRequest = new CreateTrackingTagRequest(); // CreateTrackingTagRequest |
try {
CreateTrackingTag201Response result = apiInstance.createTrackingTag(accountId, createTrackingTagRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TrackingTagsApi#createTrackingTag");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| accountId | String | Meta ads SocialAccount id (platform `metaads`). | |
| createTrackingTagRequest | CreateTrackingTagRequest |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 201 | Tracking tag created | - |
| 400 | Invalid body, invalid `adAccountId`, over the per-business pixel cap, or ad account not in a Business Manager. | - |
| 401 | Unauthorized | - |
| 403 | Ads access required (Ads add-on on legacy plans, included on usage-based plans), or the Meta token lacks ads permissions (reconnect required). | - |
| 404 | Account not found or not accessible. | - |
| 405 | Platform does not support creating tracking tags. | - |
ApiResponse createTrackingTag createTrackingTagWithHttpInfo(accountId, createTrackingTagRequest)
Create a tracking tag
Creates a Meta Pixel on the given ad account (`POST /act_{id}/adspixels` — `name` is the only input). Returns the created tag including its install `code`. The pixel is owned by the Business Manager that owns the ad account; a pixel created on a personal (non-BM) ad account ends up with `ownerBusinessId: null` and can't be shared with other ad accounts. Creating a pixel does NOT install it — install the returned `code` snippet on the site, or send events server-side via `POST /v1/ads/conversions`. The check `installed` is derived from `lastFiredTime`. NOT idempotent: each call creates a new pixel. Do not retry blindly on timeout. Meta only (platform `metaads`); other platforms return 405.
// Import classes:
import dev.zernio.ApiClient;
import dev.zernio.ApiException;
import dev.zernio.ApiResponse;
import dev.zernio.Configuration;
import dev.zernio.auth.*;
import dev.zernio.models.*;
import dev.zernio.api.TrackingTagsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://zernio.com/api");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
TrackingTagsApi apiInstance = new TrackingTagsApi(defaultClient);
String accountId = "accountId_example"; // String | Meta ads SocialAccount id (platform `metaads`).
CreateTrackingTagRequest createTrackingTagRequest = new CreateTrackingTagRequest(); // CreateTrackingTagRequest |
try {
ApiResponse<CreateTrackingTag201Response> response = apiInstance.createTrackingTagWithHttpInfo(accountId, createTrackingTagRequest);
System.out.println("Status code: " + response.getStatusCode());
System.out.println("Response headers: " + response.getHeaders());
System.out.println("Response body: " + response.getData());
} catch (ApiException e) {
System.err.println("Exception when calling TrackingTagsApi#createTrackingTag");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
System.err.println("Reason: " + e.getResponseBody());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| accountId | String | Meta ads SocialAccount id (platform `metaads`). | |
| createTrackingTagRequest | CreateTrackingTagRequest |
ApiResponse<CreateTrackingTag201Response>
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 201 | Tracking tag created | - |
| 400 | Invalid body, invalid `adAccountId`, over the per-business pixel cap, or ad account not in a Business Manager. | - |
| 401 | Unauthorized | - |
| 403 | Ads access required (Ads add-on on legacy plans, included on usage-based plans), or the Meta token lacks ads permissions (reconnect required). | - |
| 404 | Account not found or not accessible. | - |
| 405 | Platform does not support creating tracking tags. | - |
CreateTrackingTag201Response getTrackingTag(accountId, tagId)
Get a tracking tag
Returns the full tag record including the base-code `code` snippet, `lastFiredTime`, `ownerBusinessId`, `isUnavailable`, etc. Meta only (platform `metaads`); other platforms return 405.
// Import classes:
import dev.zernio.ApiClient;
import dev.zernio.ApiException;
import dev.zernio.Configuration;
import dev.zernio.auth.*;
import dev.zernio.models.*;
import dev.zernio.api.TrackingTagsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://zernio.com/api");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
TrackingTagsApi apiInstance = new TrackingTagsApi(defaultClient);
String accountId = "accountId_example"; // String |
String tagId = "tagId_example"; // String | Pixel id.
try {
CreateTrackingTag201Response result = apiInstance.getTrackingTag(accountId, tagId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TrackingTagsApi#getTrackingTag");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| accountId | String | ||
| tagId | String | Pixel id. |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Tracking tag fetched | - |
| 401 | Unauthorized | - |
| 403 | Ads access required (Ads add-on on legacy plans, included on usage-based plans), or the Meta token lacks ads permissions (reconnect required). | - |
| 404 | Account or tracking tag not found. | - |
| 405 | Platform does not support fetching a tracking tag. | - |
ApiResponse getTrackingTag getTrackingTagWithHttpInfo(accountId, tagId)
Get a tracking tag
Returns the full tag record including the base-code `code` snippet, `lastFiredTime`, `ownerBusinessId`, `isUnavailable`, etc. Meta only (platform `metaads`); other platforms return 405.
// Import classes:
import dev.zernio.ApiClient;
import dev.zernio.ApiException;
import dev.zernio.ApiResponse;
import dev.zernio.Configuration;
import dev.zernio.auth.*;
import dev.zernio.models.*;
import dev.zernio.api.TrackingTagsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://zernio.com/api");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
TrackingTagsApi apiInstance = new TrackingTagsApi(defaultClient);
String accountId = "accountId_example"; // String |
String tagId = "tagId_example"; // String | Pixel id.
try {
ApiResponse<CreateTrackingTag201Response> response = apiInstance.getTrackingTagWithHttpInfo(accountId, tagId);
System.out.println("Status code: " + response.getStatusCode());
System.out.println("Response headers: " + response.getHeaders());
System.out.println("Response body: " + response.getData());
} catch (ApiException e) {
System.err.println("Exception when calling TrackingTagsApi#getTrackingTag");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
System.err.println("Reason: " + e.getResponseBody());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| accountId | String | ||
| tagId | String | Pixel id. |
ApiResponse<CreateTrackingTag201Response>
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Tracking tag fetched | - |
| 401 | Unauthorized | - |
| 403 | Ads access required (Ads add-on on legacy plans, included on usage-based plans), or the Meta token lacks ads permissions (reconnect required). | - |
| 404 | Account or tracking tag not found. | - |
| 405 | Platform does not support fetching a tracking tag. | - |
GetTrackingTagStats200Response getTrackingTagStats(accountId, tagId, aggregation, startTime, endTime)
Get aggregated event stats
Returns aggregated event counts for the pixel (`GET /{pixel_id}/stats`). Rows are passed through from Meta as-is — their shape depends on the `aggregation` requested. Meta only (platform `metaads`); other platforms return 405.
// Import classes:
import dev.zernio.ApiClient;
import dev.zernio.ApiException;
import dev.zernio.Configuration;
import dev.zernio.auth.*;
import dev.zernio.models.*;
import dev.zernio.api.TrackingTagsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://zernio.com/api");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
TrackingTagsApi apiInstance = new TrackingTagsApi(defaultClient);
String accountId = "accountId_example"; // String |
String tagId = "tagId_example"; // String | Pixel id.
String aggregation = "event"; // String | Aggregation dimension. Defaults to `event`.
Integer startTime = 56; // Integer | Unix seconds lower bound.
Integer endTime = 56; // Integer | Unix seconds upper bound.
try {
GetTrackingTagStats200Response result = apiInstance.getTrackingTagStats(accountId, tagId, aggregation, startTime, endTime);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TrackingTagsApi#getTrackingTagStats");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| accountId | String | ||
| tagId | String | Pixel id. | |
| aggregation | String | Aggregation dimension. Defaults to `event`. | [optional] [default to event] [enum: event, host, url, url_by_rule, pixel_fire, device_type, device_os, browser_type, had_pii, custom_data_field, match_keys, event_source, event_detection_method, event_processing_results, event_total_counts, event_value_count] |
| startTime | Integer | Unix seconds lower bound. | [optional] |
| endTime | Integer | Unix seconds upper bound. | [optional] |
GetTrackingTagStats200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Stats fetched | - |
| 400 | Invalid query parameter. | - |
| 401 | Unauthorized | - |
| 403 | Ads access required (Ads add-on on legacy plans, included on usage-based plans), or the Meta token lacks ads permissions (reconnect required). | - |
| 404 | Account or tracking tag not found. | - |
| 405 | Platform does not support tracking-tag stats. | - |
ApiResponse getTrackingTagStats getTrackingTagStatsWithHttpInfo(accountId, tagId, aggregation, startTime, endTime)
Get aggregated event stats
Returns aggregated event counts for the pixel (`GET /{pixel_id}/stats`). Rows are passed through from Meta as-is — their shape depends on the `aggregation` requested. Meta only (platform `metaads`); other platforms return 405.
// Import classes:
import dev.zernio.ApiClient;
import dev.zernio.ApiException;
import dev.zernio.ApiResponse;
import dev.zernio.Configuration;
import dev.zernio.auth.*;
import dev.zernio.models.*;
import dev.zernio.api.TrackingTagsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://zernio.com/api");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
TrackingTagsApi apiInstance = new TrackingTagsApi(defaultClient);
String accountId = "accountId_example"; // String |
String tagId = "tagId_example"; // String | Pixel id.
String aggregation = "event"; // String | Aggregation dimension. Defaults to `event`.
Integer startTime = 56; // Integer | Unix seconds lower bound.
Integer endTime = 56; // Integer | Unix seconds upper bound.
try {
ApiResponse<GetTrackingTagStats200Response> response = apiInstance.getTrackingTagStatsWithHttpInfo(accountId, tagId, aggregation, startTime, endTime);
System.out.println("Status code: " + response.getStatusCode());
System.out.println("Response headers: " + response.getHeaders());
System.out.println("Response body: " + response.getData());
} catch (ApiException e) {
System.err.println("Exception when calling TrackingTagsApi#getTrackingTagStats");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
System.err.println("Reason: " + e.getResponseBody());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| accountId | String | ||
| tagId | String | Pixel id. | |
| aggregation | String | Aggregation dimension. Defaults to `event`. | [optional] [default to event] [enum: event, host, url, url_by_rule, pixel_fire, device_type, device_os, browser_type, had_pii, custom_data_field, match_keys, event_source, event_detection_method, event_processing_results, event_total_counts, event_value_count] |
| startTime | Integer | Unix seconds lower bound. | [optional] |
| endTime | Integer | Unix seconds upper bound. | [optional] |
ApiResponse<GetTrackingTagStats200Response>
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Stats fetched | - |
| 400 | Invalid query parameter. | - |
| 401 | Unauthorized | - |
| 403 | Ads access required (Ads add-on on legacy plans, included on usage-based plans), or the Meta token lacks ads permissions (reconnect required). | - |
| 404 | Account or tracking tag not found. | - |
| 405 | Platform does not support tracking-tag stats. | - |
ListTrackingTagSharedAccounts200Response listTrackingTagSharedAccounts(accountId, tagId)
List accounts it is shared with
Meta only (platform `metaads`); other platforms return 405.
// Import classes:
import dev.zernio.ApiClient;
import dev.zernio.ApiException;
import dev.zernio.Configuration;
import dev.zernio.auth.*;
import dev.zernio.models.*;
import dev.zernio.api.TrackingTagsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://zernio.com/api");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
TrackingTagsApi apiInstance = new TrackingTagsApi(defaultClient);
String accountId = "accountId_example"; // String |
String tagId = "tagId_example"; // String | Pixel id.
try {
ListTrackingTagSharedAccounts200Response result = apiInstance.listTrackingTagSharedAccounts(accountId, tagId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TrackingTagsApi#listTrackingTagSharedAccounts");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| accountId | String | ||
| tagId | String | Pixel id. |
ListTrackingTagSharedAccounts200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Shared ad accounts listed | - |
| 401 | Unauthorized | - |
| 403 | Ads access required (Ads add-on on legacy plans, included on usage-based plans), or the Meta token lacks ads permissions (reconnect required). | - |
| 404 | Account or tracking tag not found. | - |
| 405 | Platform does not support shared accounts. | - |
ApiResponse listTrackingTagSharedAccounts listTrackingTagSharedAccountsWithHttpInfo(accountId, tagId)
List accounts it is shared with
Meta only (platform `metaads`); other platforms return 405.
// Import classes:
import dev.zernio.ApiClient;
import dev.zernio.ApiException;
import dev.zernio.ApiResponse;
import dev.zernio.Configuration;
import dev.zernio.auth.*;
import dev.zernio.models.*;
import dev.zernio.api.TrackingTagsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://zernio.com/api");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
TrackingTagsApi apiInstance = new TrackingTagsApi(defaultClient);
String accountId = "accountId_example"; // String |
String tagId = "tagId_example"; // String | Pixel id.
try {
ApiResponse<ListTrackingTagSharedAccounts200Response> response = apiInstance.listTrackingTagSharedAccountsWithHttpInfo(accountId, tagId);
System.out.println("Status code: " + response.getStatusCode());
System.out.println("Response headers: " + response.getHeaders());
System.out.println("Response body: " + response.getData());
} catch (ApiException e) {
System.err.println("Exception when calling TrackingTagsApi#listTrackingTagSharedAccounts");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
System.err.println("Reason: " + e.getResponseBody());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| accountId | String | ||
| tagId | String | Pixel id. |
ApiResponse<ListTrackingTagSharedAccounts200Response>
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Shared ad accounts listed | - |
| 401 | Unauthorized | - |
| 403 | Ads access required (Ads add-on on legacy plans, included on usage-based plans), or the Meta token lacks ads permissions (reconnect required). | - |
| 404 | Account or tracking tag not found. | - |
| 405 | Platform does not support shared accounts. | - |
ListTrackingTags200Response listTrackingTags(accountId, adAccountId)
List tracking tags
Returns the tracking tags (Meta Pixels) the connected ads account can see. Pass `?adAccountId=act_...` to scope the list to a single ad account; omit it to list every pixel reachable by the token (the name is then suffixed with the ad account it was discovered on, for disambiguation). The list view omits `code` — call `getTrackingTag` for the install snippet and full detail. Meta only today (platform `metaads`); other platforms return 405. The `accountId` must be the Meta ads SocialAccount created by the Ads add-on connect flow, not a Facebook/Instagram posting account. Get your `act_...` ids from `GET /v1/ads/accounts`.
// Import classes:
import dev.zernio.ApiClient;
import dev.zernio.ApiException;
import dev.zernio.Configuration;
import dev.zernio.auth.*;
import dev.zernio.models.*;
import dev.zernio.api.TrackingTagsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://zernio.com/api");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
TrackingTagsApi apiInstance = new TrackingTagsApi(defaultClient);
String accountId = "accountId_example"; // String | Meta ads SocialAccount id (platform `metaads`).
String adAccountId = "adAccountId_example"; // String | Optional. Scope to one ad account, e.g. `act_123456789`.
try {
ListTrackingTags200Response result = apiInstance.listTrackingTags(accountId, adAccountId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TrackingTagsApi#listTrackingTags");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| accountId | String | Meta ads SocialAccount id (platform `metaads`). | |
| adAccountId | String | Optional. Scope to one ad account, e.g. `act_123456789`. | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Tracking tags listed | - |
| 400 | Account platform not supported, or invalid `adAccountId`. | - |
| 401 | Unauthorized | - |
| 403 | Ads access required (Ads add-on on legacy plans, included on usage-based plans), or the Meta token lacks ads permissions (reconnect required). | - |
| 404 | Account not found or not accessible. | - |
| 405 | Platform does not support listing tracking tags. | - |
ApiResponse listTrackingTags listTrackingTagsWithHttpInfo(accountId, adAccountId)
List tracking tags
Returns the tracking tags (Meta Pixels) the connected ads account can see. Pass `?adAccountId=act_...` to scope the list to a single ad account; omit it to list every pixel reachable by the token (the name is then suffixed with the ad account it was discovered on, for disambiguation). The list view omits `code` — call `getTrackingTag` for the install snippet and full detail. Meta only today (platform `metaads`); other platforms return 405. The `accountId` must be the Meta ads SocialAccount created by the Ads add-on connect flow, not a Facebook/Instagram posting account. Get your `act_...` ids from `GET /v1/ads/accounts`.
// Import classes:
import dev.zernio.ApiClient;
import dev.zernio.ApiException;
import dev.zernio.ApiResponse;
import dev.zernio.Configuration;
import dev.zernio.auth.*;
import dev.zernio.models.*;
import dev.zernio.api.TrackingTagsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://zernio.com/api");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
TrackingTagsApi apiInstance = new TrackingTagsApi(defaultClient);
String accountId = "accountId_example"; // String | Meta ads SocialAccount id (platform `metaads`).
String adAccountId = "adAccountId_example"; // String | Optional. Scope to one ad account, e.g. `act_123456789`.
try {
ApiResponse<ListTrackingTags200Response> response = apiInstance.listTrackingTagsWithHttpInfo(accountId, adAccountId);
System.out.println("Status code: " + response.getStatusCode());
System.out.println("Response headers: " + response.getHeaders());
System.out.println("Response body: " + response.getData());
} catch (ApiException e) {
System.err.println("Exception when calling TrackingTagsApi#listTrackingTags");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
System.err.println("Reason: " + e.getResponseBody());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| accountId | String | Meta ads SocialAccount id (platform `metaads`). | |
| adAccountId | String | Optional. Scope to one ad account, e.g. `act_123456789`. | [optional] |
ApiResponse<ListTrackingTags200Response>
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Tracking tags listed | - |
| 400 | Account platform not supported, or invalid `adAccountId`. | - |
| 401 | Unauthorized | - |
| 403 | Ads access required (Ads add-on on legacy plans, included on usage-based plans), or the Meta token lacks ads permissions (reconnect required). | - |
| 404 | Account not found or not accessible. | - |
| 405 | Platform does not support listing tracking tags. | - |
void removeTrackingTagSharedAccount(accountId, tagId, adAccountId)
Stop sharing with an account
`adAccountId` may be passed as a query parameter (recommended) or as a JSON body field for clients that can send DELETE bodies. Meta only (platform `metaads`); other platforms return 405.
// Import classes:
import dev.zernio.ApiClient;
import dev.zernio.ApiException;
import dev.zernio.Configuration;
import dev.zernio.auth.*;
import dev.zernio.models.*;
import dev.zernio.api.TrackingTagsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://zernio.com/api");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
TrackingTagsApi apiInstance = new TrackingTagsApi(defaultClient);
String accountId = "accountId_example"; // String |
String tagId = "tagId_example"; // String | Pixel id.
String adAccountId = "adAccountId_example"; // String | Ad account to unshare, e.g. `act_123456789`. May also be sent in the JSON body.
try {
apiInstance.removeTrackingTagSharedAccount(accountId, tagId, adAccountId);
} catch (ApiException e) {
System.err.println("Exception when calling TrackingTagsApi#removeTrackingTagSharedAccount");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| accountId | String | ||
| tagId | String | Pixel id. | |
| adAccountId | String | Ad account to unshare, e.g. `act_123456789`. May also be sent in the JSON body. | [optional] |
null (empty response body)
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 204 | Ad account unshared (no content). | - |
| 400 | `adAccountId` missing (neither query nor body), or Meta rejected the unshare. | - |
| 401 | Unauthorized | - |
| 403 | Ads access required (Ads add-on on legacy plans, included on usage-based plans), or the Meta token lacks ads permissions (reconnect required). | - |
| 404 | Account or tracking tag not found. | - |
| 405 | Platform does not support shared accounts. | - |
ApiResponse removeTrackingTagSharedAccount removeTrackingTagSharedAccountWithHttpInfo(accountId, tagId, adAccountId)
Stop sharing with an account
`adAccountId` may be passed as a query parameter (recommended) or as a JSON body field for clients that can send DELETE bodies. Meta only (platform `metaads`); other platforms return 405.
// Import classes:
import dev.zernio.ApiClient;
import dev.zernio.ApiException;
import dev.zernio.ApiResponse;
import dev.zernio.Configuration;
import dev.zernio.auth.*;
import dev.zernio.models.*;
import dev.zernio.api.TrackingTagsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://zernio.com/api");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
TrackingTagsApi apiInstance = new TrackingTagsApi(defaultClient);
String accountId = "accountId_example"; // String |
String tagId = "tagId_example"; // String | Pixel id.
String adAccountId = "adAccountId_example"; // String | Ad account to unshare, e.g. `act_123456789`. May also be sent in the JSON body.
try {
ApiResponse<Void> response = apiInstance.removeTrackingTagSharedAccountWithHttpInfo(accountId, tagId, adAccountId);
System.out.println("Status code: " + response.getStatusCode());
System.out.println("Response headers: " + response.getHeaders());
} catch (ApiException e) {
System.err.println("Exception when calling TrackingTagsApi#removeTrackingTagSharedAccount");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
System.err.println("Reason: " + e.getResponseBody());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| accountId | String | ||
| tagId | String | Pixel id. | |
| adAccountId | String | Ad account to unshare, e.g. `act_123456789`. May also be sent in the JSON body. | [optional] |
ApiResponse
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 204 | Ad account unshared (no content). | - |
| 400 | `adAccountId` missing (neither query nor body), or Meta rejected the unshare. | - |
| 401 | Unauthorized | - |
| 403 | Ads access required (Ads add-on on legacy plans, included on usage-based plans), or the Meta token lacks ads permissions (reconnect required). | - |
| 404 | Account or tracking tag not found. | - |
| 405 | Platform does not support shared accounts. | - |
CreateTrackingTag201Response updateTrackingTag(accountId, tagId, updateTrackingTagRequest)
Update a tracking tag
Partial-update a pixel. Whitelisted fields: `name` (rename), `enableAutomaticMatching`, `automaticMatchingFields`, `firstPartyCookieStatus`, `dataUseSetting`. At least one is required. Returns the re-fetched canonical tag. Meta only (platform `metaads`); other platforms return 405. There is no DELETE — Meta has no API to delete a pixel. To stop using one, unshare it from your ad accounts (`DELETE .../tracking-tags/{tagId}/shared-accounts`) or disable it in Events Manager.
// Import classes:
import dev.zernio.ApiClient;
import dev.zernio.ApiException;
import dev.zernio.Configuration;
import dev.zernio.auth.*;
import dev.zernio.models.*;
import dev.zernio.api.TrackingTagsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://zernio.com/api");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
TrackingTagsApi apiInstance = new TrackingTagsApi(defaultClient);
String accountId = "accountId_example"; // String |
String tagId = "tagId_example"; // String | Pixel id.
UpdateTrackingTagRequest updateTrackingTagRequest = new UpdateTrackingTagRequest(); // UpdateTrackingTagRequest |
try {
CreateTrackingTag201Response result = apiInstance.updateTrackingTag(accountId, tagId, updateTrackingTagRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TrackingTagsApi#updateTrackingTag");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| accountId | String | ||
| tagId | String | Pixel id. | |
| updateTrackingTagRequest | UpdateTrackingTagRequest |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Tracking tag updated (re-fetched canonical state) | - |
| 400 | Invalid body (e.g. no fields supplied) or Meta validation failure. | - |
| 401 | Unauthorized | - |
| 403 | Ads access required (Ads add-on on legacy plans, included on usage-based plans), or the Meta token lacks ads permissions (reconnect required). | - |
| 404 | Account or tracking tag not found. | - |
| 405 | Platform does not support updating tracking tags. | - |
ApiResponse updateTrackingTag updateTrackingTagWithHttpInfo(accountId, tagId, updateTrackingTagRequest)
Update a tracking tag
Partial-update a pixel. Whitelisted fields: `name` (rename), `enableAutomaticMatching`, `automaticMatchingFields`, `firstPartyCookieStatus`, `dataUseSetting`. At least one is required. Returns the re-fetched canonical tag. Meta only (platform `metaads`); other platforms return 405. There is no DELETE — Meta has no API to delete a pixel. To stop using one, unshare it from your ad accounts (`DELETE .../tracking-tags/{tagId}/shared-accounts`) or disable it in Events Manager.
// Import classes:
import dev.zernio.ApiClient;
import dev.zernio.ApiException;
import dev.zernio.ApiResponse;
import dev.zernio.Configuration;
import dev.zernio.auth.*;
import dev.zernio.models.*;
import dev.zernio.api.TrackingTagsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://zernio.com/api");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
TrackingTagsApi apiInstance = new TrackingTagsApi(defaultClient);
String accountId = "accountId_example"; // String |
String tagId = "tagId_example"; // String | Pixel id.
UpdateTrackingTagRequest updateTrackingTagRequest = new UpdateTrackingTagRequest(); // UpdateTrackingTagRequest |
try {
ApiResponse<CreateTrackingTag201Response> response = apiInstance.updateTrackingTagWithHttpInfo(accountId, tagId, updateTrackingTagRequest);
System.out.println("Status code: " + response.getStatusCode());
System.out.println("Response headers: " + response.getHeaders());
System.out.println("Response body: " + response.getData());
} catch (ApiException e) {
System.err.println("Exception when calling TrackingTagsApi#updateTrackingTag");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
System.err.println("Reason: " + e.getResponseBody());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| accountId | String | ||
| tagId | String | Pixel id. | |
| updateTrackingTagRequest | UpdateTrackingTagRequest |
ApiResponse<CreateTrackingTag201Response>
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Tracking tag updated (re-fetched canonical state) | - |
| 400 | Invalid body (e.g. no fields supplied) or Meta validation failure. | - |
| 401 | Unauthorized | - |
| 403 | Ads access required (Ads add-on on legacy plans, included on usage-based plans), or the Meta token lacks ads permissions (reconnect required). | - |
| 404 | Account or tracking tag not found. | - |
| 405 | Platform does not support updating tracking tags. | - |