Update a campaign (budget)
Campaign-level edits. Currently supports updating 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. 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"Response 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', budget: { amount: 0, type: 'daily', }, },});console.log(data);{
"updated": 0,
"budget": {
"amount": 0,
"type": "daily"
},
"budgetLevel": "campaign"
}{
"error": "Unauthorized"
}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.
Pause or resume a single ad set PUT
Ad-set-scoped pause/resume (doesn't touch sibling ad sets). Thin wrapper over PUT /v1/ads/ad-sets/{adSetId} for callers that only want the status toggle and prefer a symmetric URL to /v1/ads/campaigns/{campaignId}/status.