List campaigns
Returns campaigns as virtual aggregations over ad documents grouped by platform campaign ID. Metrics (spend, impressions, clicks, etc.) are summed across all ads in each campaign. Campaign status is derived from child ad statuses (active > pending_review > paused > error > completed > cancelled > rejected).
API key authentication - use your Zernio API key as a Bearer token
In: header
Query Parameters
Page number (1-based)
11 <= value201 <= value <= 100all (default) returns both Zernio-created ads and those discovered from the platform's ad manager — matches the web UI's default view. Pass zernio to restrict to isExternal=false only. Status is NOT filtered by default — use the status param for that.
"all""zernio" | "all""facebook" | "instagram" | "tiktok" | "linkedin" | "pinterest" | "google" | "twitter" | "openai"Filter by derived campaign status (post-aggregation)
"active" | "paused" | "pending_review" | "rejected" | "completed" | "cancelled" | "error"Platform ad account ID (e.g. act_123 for Meta)
Social account ID
Profile ID
Start of metrics date range (YYYY-MM-DD, inclusive). Defaults to 90 days ago when both date params are omitted.
dateEnd of metrics date range (YYYY-MM-DD, inclusive). Defaults to today. Max 730-day range.
dateResponse Body
application/json
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.adcampaigns.listAdCampaigns();console.log(data);{
"campaigns": [
{
"platformCampaignId": "string",
"platform": "facebook",
"campaignName": "string",
"status": "active",
"reviewStatus": "in_review",
"platformCampaignStatus": "string",
"campaignIssuesInfo": [
{}
],
"adCount": 0,
"budget": {
"amount": 0,
"type": "daily"
},
"campaignBudget": {
"amount": 0,
"type": "daily"
},
"budgetLevel": "campaign",
"isBudgetScheduleEnabled": false,
"currency": "string",
"metrics": {
"spend": 0,
"impressions": 0,
"reach": 0,
"clicks": 0,
"ctr": 0,
"cpc": 0,
"cpm": 0,
"engagement": 0,
"conversions": 0,
"costPerConversion": 0,
"actions": {
"link_click": 160,
"post_engagement": 300,
"offsite_conversion.fb_pixel_purchase": 42
},
"actionValues": {
"offsite_conversion.fb_pixel_purchase": 2456.78,
"offsite_conversion.fb_pixel_add_to_cart": 980.5
},
"purchaseValue": 0,
"roas": 0,
"videoPlayActions": 0,
"video30SecWatchedActions": 0,
"videoThruplayWatchedActions": 0,
"videoP25WatchedActions": 0,
"videoP50WatchedActions": 0,
"videoP75WatchedActions": 0,
"videoP95WatchedActions": 0,
"videoP100WatchedActions": 0,
"videoAvgTimeWatchedActions": 0,
"lastSyncedAt": "2019-08-24T14:15:22Z"
},
"platformAdAccountId": "string",
"platformAdAccountName": "string",
"accountId": "string",
"profileId": "string",
"advertisingChannelType": "string",
"platformObjective": "string",
"optimizationGoal": "string",
"bidStrategy": "LOWEST_COST_WITHOUT_CAP",
"bidAmount": 0,
"roasAverageFloor": 0,
"promotedObject": {
"custom_event_type": "string",
"pixel_id": "string",
"page_id": "string"
},
"earliestAd": "2019-08-24T14:15:22Z",
"latestAd": "2019-08-24T14:15:22Z"
}
],
"pagination": {
"page": 0,
"limit": 0,
"total": 0,
"pages": 0
}
}{
"error": "string",
"type": "invalid_request_error",
"code": "string",
"param": "string",
"platform": "string",
"platformError": {},
"details": {}
}{
"error": "Unauthorized"
}Get inbox messaging volume GET
Daily inbox messaging volume + breakdowns. Folds the raw messaging events into three projections so the client can render the volume chart, KPI strip, and per-platform stacked bar from a single call. Max date range is 365 days.
List ads GET
Returns a paginated list of ads with metrics computed over an optional date range. Use source=all to include externally-synced ads from platform ad managers. If no date range is provided, defaults to the last 90 days. Date range is capped at 730 days max. To find the Zernio ad behind a comment you see in Meta Business Manager, filter by platformAdId (the Meta ad ID), effectiveObjectStoryId (Facebook), or effectiveInstagramMediaId (Instagram) — those are the post/media the ad's engagement lives on, and are also returned on each ad's `creative` object. Then call GET /v1/ads/{adId}/comments with the returned ad id.