Pause or resume many campaigns
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.
API key authentication - use your Zernio API key as a Bearer token
In: header
"active" | "paused"items <= 50Response 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.bulkUpdateAdCampaignStatus({ body: { status: 'active', campaigns: [ { platformCampaignId: 'platformcampaign_abc123', platform: 'facebook', }, ], },});console.log(data);{
"status": "active",
"totals": {
"updated": 0,
"skipped": 0,
"failed": 0
},
"results": [
{
"platformCampaignId": "string",
"platform": "string",
"updated": 0,
"skipped": 0,
"error": "string"
}
]
}{
"error": "Unauthorized"
}Delete a campaign DELETE
Deletes the whole campaign on the platform, cascading to its ad sets and ads. Locally, all Ad documents for this campaign are marked `status: cancelled`. Meta-only for now. Other platforms return 501 Not Implemented — fall back to DELETE /v1/ads/{adId} per ad in the meantime.
Duplicate a campaign POST
Duplicates a campaign, including its ad sets, ads, creatives, and targeting by default (`deepCopy: true`). On Meta, this uses `POST /{campaign-id}/copies`. The copy is created paused by default so callers can review before launching. The platform's duplication is asynchronous from our side; once the copy is created on the platform, we trigger a sync discovery so the new hierarchy shows up in /v1/ads/tree. Set `syncAfter: false` to skip the discovery trigger and poll on your own cadence. Meta-only for now. Other platforms return 501 Not Implemented.