Ad Campaigns

Lists ad sets (ad groups on Google) with their targeting, bidding and optimization settings, optionally for one campaign.

Returns the ad sets (Google ad groups) synced for the connection, optionally filtered by platform and campaignId.

It reads the ad_sets table directly, independent of the ads rollup GET /v1/ads/tree uses. So a newly created standalone ad group with no ad yet (POST /v1/ads/ad-sets, Google only) is visible here. It stays invisible in the tree until an ad joins it via adSetId on POST /v1/ads/create.

Paging

Rows come newest first (by platform creation time, then id, so pages never overlap), 500 per page unless limit says otherwise. pagination.total counts every matching ad set and page reaches the rest.

Synced config

This list is SYNCED, not live (refreshed by background sync, see below). Each row also carries the ad set's config: targeting, bidStrategy, bidAmount, optimizationGoal, billingEvent, promotedObject.

So ?accountId=...&adAccountId=act_... returns the config of every ad set of an ad account in one call, without a campaignId.

To read budgets, status, targeting, promoted object and bid strategy of every campaign and ad set of a Meta ad account LIVE in one call (for example as a pre-write spend gate), use GET /v1/ads/accounts/live instead.

Status freshness

status, configuredStatus, platformStatus, platformAdSetStatus and platformCampaignStatus are the values Zernio last stored.

Background sync refreshes them, typically within 15 to 60 minutes (Google up to about 3 hours). Ended or long-paused objects may be refreshed less often. Zernio's own status writes re-read the switches they change.

A change made in the platform's own ads manager therefore shows up here only after the next sync.

Live reads (live=true)

Controllers that act on a switch should pass live=true. It reads the switches from the platform now, stores them, and returns statusReadAt (null when the read failed and the stored values were returned).

  • live=true needs a campaignId or adSetId filter.
  • Each listed ad set's own switch (platformAdSetStatus) is read live for the first 20 rows of the page. Later rows keep their synced value with statusReadAt: null.
  • To read more ad sets live, page with limit=20.
  • Live reads cover TikTok, Meta, Google, OpenAI and Reddit.
  • The rolled-up status is not re-derived by a live read.

TikTok live reads

On TikTok the same live read also returns the ad group's applied optimizationGoal and billingEvent, as TikTok's adgroup/get reports them. So you can verify the goal TikTok applied rather than the one you requested.

It also returns nativeSettings: a fixed subset of TikTok's own adgroup/get record for the ad group, with TikTok's own values, read in that same call. It covers budget, budget_mode, schedule, placements, locations, ages, gender, languages, interests, actions, audiences and exclusions, plus the advertiser's currency and timezone.

TikTok's schedule_start_time / schedule_end_time are UTC wall clocks ("YYYY-MM-DD HH:MM:SS", no offset); Ads Manager displays them in advertiser_timezone.

configReadAt says when it was read. It is null on every row whose native settings were not read now, so never treat a null as a match.

These are read, not retained create payloads, and are not stored.

get/v1/ads/ad-sets

Request

Query parameters

accountIdstring

Account ID

adAccountIdstring

Platform ad account id (Meta act_<n>). Lists every synced ad set of that ad account; no campaignId needed.

campaignIdstring

Platform campaign ID

adSetIdstring

Platform ad set ID

platform'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit'
status'active' | 'paused' | 'pending_review' | 'rejected' | 'completed' | 'cancelled' | 'error'

Filter by the ad set's stored status, the value each row returns. A live read does not change it. Rows whose status is null match no filter.

pageinteger
limitinteger
liveboolean

Read the on/off switches live from the platform instead of returning synced values. See "Status freshness" in the operation description.

  • The fresh values are stored (later reads return them too), and the response carries statusReadAt, the time of the read.
  • At most 20 platform objects are read per request.
  • Where a read fails (credentials, platform error, no reader on that platform), stored values come back with statusReadAt: null.

On GET /v1/ads/{adId} for a TikTok ad the creative is read live too: ad text, call to action, landing page, video, format and identity, returned over the stored creative and never stored. See "Status freshness" in GET /v1/ads/{adId}.

On X the budget is read live too:

  • GET /v1/ads/{adId}: budget, adSetBudget, campaignBudget and budgetLevel are the line item and campaign budgets X holds now (stored like the switches).
  • Ad set and campaign listings: budget is what that line item or campaign holds now (returned, not stored). A row whose budget the other level holds keeps its synced budget.

Response

Ad sets

Changes

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the new optional query request parameter limit

    • info

      added the new optional query request parameter page

    • info

      added the new optional query request parameter status

    • info

      added the optional property to the response with the status