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
Meta only. Campaign reads aggregate over ad documents, so a campaign with ZERO ads is normally invisible here — the state the two-step create (campaign, then ads via existingCampaignId) leaves behind whenever Meta rejects the ad step. Set true to list those too, with adCount: 0 and zeroed metrics. Requires accountId and adAccountId, since an empty campaign has no ad row to resolve a token or ad account from.
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)
Meta only: Facebook Page ID. Campaigns have no Page of their own, so this keeps campaigns having at least one ad backed by this Page, with adCount and metrics computed over those ads only. Mirrors the same filter on /v1/ads and /v1/ads/tree.
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.
dateReturn only campaigns that delivered between fromDate and toDate — spend above zero, or impressions served at zero spend. Unlike status, which reads a campaign's CURRENT state, this filters on what happened inside the window. Filters the campaign set itself, so pagination.total counts only matching campaigns. Mirrors the same filter on /v1/ads/tree.
Return only campaigns whose spend between fromDate and toDate reaches this amount, in each campaign's OWN currency (the currency field on the campaign). Implies hasDelivery; minSpend=0 applies no filter. Mirrors the same filter on /v1/ads/tree.
0 <= valueResponse 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,
"costPerAction": {
"link_click": 0.1052,
"offsite_conversion.fb_pixel_purchase": 4.0114
},
"outboundClicks": 0,
"outboundClicksCtr": 0,
"inlineLinkClicks": 0,
"inlineLinkClickCtr": 0,
"uniqueClicks": 0,
"uniqueCtr": 0,
"videoPlayActions": 0,
"video30SecWatchedActions": 0,
"videoThruplayWatchedActions": 0,
"videoP25WatchedActions": 0,
"videoP50WatchedActions": 0,
"videoP75WatchedActions": 0,
"videoP95WatchedActions": 0,
"videoP100WatchedActions": 0,
"videoAvgTimeWatchedActions": 0,
"costPerThruplay": 0,
"funnel": {
"landingPageViews": 0,
"contentViews": 0,
"searches": 0,
"wishlistAdds": 0,
"cartAdds": 0,
"checkoutsInitiated": 0,
"paymentInfoAdds": 0,
"purchases": 0,
"leads": 0,
"registrationsCompleted": 0,
"appInstalls": 0,
"messagingConversationsStarted": 0,
"messagingFirstReplies": 0
},
"engagementBreakdown": {
"postEngagement": 0,
"pageEngagement": 0,
"reactions": 0,
"comments": 0,
"shares": 0,
"saves": 0,
"pageLikes": 0,
"videoViews": 0,
"linkClicks": 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 Search keywords GET
Returns the Google Search keyword criteria (positive and negative) synced from connected Google Ads accounts, one row per ad-group keyword. Refreshed about once a week per Google Ads customer (the keyword sweep rides the ads discovery pass on a slower slot, to stay inside Google's shared daily API quota), so keywords added on Google can take several days to appear. A customer synced for the first time is populated on the next discovery pass rather than waiting for its weekly slot, and connecting an account or triggering a manual sync refreshes it immediately. Campaign-level negative keywords are not included; only ad-group-level criteria are.