Update a campaign
Campaign-level edits. At least one of budget or bidStrategy is required.
budgetupdates the CBO (Campaign Budget Optimization) budget. For ABO campaigns (where the budget lives on the ad set), use PUT /v1/ads/ad-sets/{adSetId} instead — this endpoint will return 409 with code BUDGET_LEVEL_MISMATCH.bidStrategysets the campaign-level default bid strategy. Per Meta's spec,bid_amountandbid_constraintsdo NOT exist at the campaign level — pass them via PUT /v1/ads/ad-sets/{adSetId}.
Meta-only for now. Other platforms return 501 Not Implemented.
API key authentication - use your Zernio API key as a Bearer token
In: header
Path Parameters
Platform campaign ID
"facebook" | "instagram""LOWEST_COST_WITHOUT_CAP" | "LOWEST_COST_WITH_BID_CAP" | "COST_CAP" | "LOWEST_COST_WITH_MIN_ROAS"Rename the campaign (Meta only; other platforms return 501). At least one of budget/bidStrategy/name is required.
length <= 255Response Body
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.adcampaigns.updateAdCampaign({ path: { campaignId: 'campaign_abc123', }, body: { platform: 'facebook', },});console.log(data);{
"updated": 0,
"budget": {
"amount": 0,
"type": "daily"
},
"budgetLevel": "campaign",
"bidStrategy": "LOWEST_COST_WITHOUT_CAP"
}{
"error": "Unauthorized"
}List campaigns GET
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).
Pause or resume a campaign PUT
Updates the status of all ads in a campaign. Makes one platform API call (not per-ad) since status cascades through the campaign hierarchy. Ads in terminal statuses (rejected, completed, cancelled) are automatically skipped.