Ad Campaigns

Pause or resume a single ad set

Changed on

Pauses or resumes one ad set without touching its campaign, its sibling ad sets or the switches of its ads.

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.

Writes the ad set's own on/off switch and nothing else, on every platform (Meta configured_status, TikTok ad group operation_status, Google ad group status, LinkedIn campaign, Pinterest ad group, X line item, ChatGPT (OpenAI) ad group, Reddit ad group configured_status). Its ads keep their own switches: an ad you paused individually stays paused when the ad set resumes. The campaign above is not touched either, so an ad set resumed under a paused campaign reads status: paused until the campaign is resumed too. See the Status model in the Ad Campaigns tag.

Live read, then write. The ad set'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 its ads (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 and Reddit the check reads the ad set's own switch (status / configured_status), so a repeated request skips even while platformAdSetStatus reads CAMPAIGN_PAUSED, WITH_ISSUES or IN_PROCESS.

put/v1/ads/ad-sets/{adSetId}/status

Request

  • Base URL: https://zernio.com/api
  • URL: https://zernio.com/api/v1/ads/ad-sets/{adSetId}/status
  • Auth: HTTP bearer

Path parameters

adSetIdstring required

Platform ad set ID

Request body

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

Response

Ad set status updated

status'active' | 'paused'

The ad set's delivery status derived from the switches read back: paused when its own switch or its campaign's switch is off. Echoes the request when the platform could not be read.

platformAdSetStatusstring nullable

The ad set's own switch as read back from the platform, in the raw platform vocabulary (Meta effective_status, TikTok ENABLE / DISABLE, Google ENABLED / PAUSED, LinkedIn and Pinterest ACTIVE / PAUSED, ChatGPT (OpenAI) status, Reddit effective_status such as CAMPAIGN_PAUSED, as GET /v1/ads/ad-sets returns it). Null when the platform could not be read, which is always the case on X.

platformCampaignStatusstring nullable

The parent campaign's switch, read in the same call where the platform returns it, otherwise the stored value.

statusReadAtstring date-time nullable

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

updated0 | 1

1 when the ad set's switch was written.

skipped0 | 1

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

skippedReasonsstring[]

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

Changes