Pause or resume a campaign
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.
API key authentication - use your Zernio API key as a Bearer token
In: header
Path Parameters
Platform campaign ID
"active" | "paused""facebook" | "instagram" | "tiktok" | "linkedin" | "pinterest" | "google" | "twitter"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.updateAdCampaignStatus({ path: { campaignId: 'campaign_abc123', }, body: { status: 'active', platform: 'facebook', },});console.log(data);{
"updated": 0,
"skipped": 0,
"skippedReasons": [
"string"
],
"message": "string"
}{
"error": "Unauthorized"
}Update a campaign PUT
Campaign-level edits. At least one of `budget` or `bidStrategy` is required. - `budget` updates 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. - `bidStrategy` sets the campaign-level default bid strategy. Per Meta's spec, `bid_amount` and `bid_constraints` do 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.
Pause or resume many campaigns POST
Process up to 50 campaigns in one call. Each campaign is updated concurrently and the response contains a per-campaign result so a single bad row does not fail the whole batch.