Ad Campaigns

Pause or resume a campaign

Pauses or resumes a campaign, leaving the on/off switches of its ad sets and ads as they are.

Writes the campaign's own on/off switch and nothing else, on every platform (Meta, TikTok, Google, LinkedIn campaign group, Pinterest, X, ChatGPT (OpenAI)). Its ad sets and ads keep their own switches: pausing stops their delivery through the campaign, and resuming lets each of them deliver again only if its own switch is on. An ad set or ad you paused individually stays paused; resume it with PUT /v1/ads/ad-sets/{adSetId}/status or PUT /v1/ads/{adId}/status. See the Status model in the Ad Campaigns tag.

Live read, then write. The campaign's switch is read from the platform first. When that live read shows it already in the requested state nothing is written (updated: 0, skipped: 1, with the reason). Otherwise the switch is written (updated: 1), read back and stored, and the delivery status of the ads under it (up to 20) is re-read and stored, so an immediate GET returns what the platform now reports. A stored switch never skips a write, and when the platform cannot be read the write always goes out. On Meta the check reads the campaign's own status, so a delivery status such as IN_PROCESS or WITH_ISSUES does not force a write.

put/v1/ads/campaigns/{campaignId}/status

Request

  • Base URL: https://zernio.com/api
  • URL: https://zernio.com/api/v1/ads/campaigns/{campaignId}/status
  • Auth: HTTP bearer

Path parameters

campaignIdstring required

Platform campaign ID

Request body

status'active' | 'paused' required
platform'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' required

Response

Campaign status updated

status'active' | 'paused'

The campaign's delivery status derived from its switch as read back (paused when the switch is off). Echoes the request when the platform could not be read.

platformCampaignStatusstring nullable

The campaign's own switch as read back from the platform, in the raw platform vocabulary (Meta effective_status, TikTok ENABLE / DISABLE, Google ENABLED / PAUSED, ChatGPT (OpenAI) status, Reddit configured_status). Null when the platform could not be read, which is always the case on Pinterest, LinkedIn and X (no single-campaign read).

statusReadAtstring date-time nullable

When the switch was read back. Null when it could not be read.

updated0 | 1

1 when the campaign's switch was written.

skipped0 | 1

1 when a live read showed the campaign already in the requested state, so nothing was written.

skippedReasonsstring[]

Why the write was skipped, for example "Campaign already switched off".

Changes