Ad Campaigns

Create a standalone campaign

Creates a campaign WITHOUT its first ad set / ad, on the platform of the given accountId. Ad sets join it later via existingCampaignId on the create endpoints. Platform notes: on Meta a budget here is campaign-level (CBO) by definition; omit it for ABO (each ad set carries its own budget), and specialAdCategories is Meta-only (400 elsewhere); bidStrategy is Meta and Google (400 elsewhere), and Google also accepts portfolioBidStrategyId instead. Google, X and OpenAI require a budget (422 without one; OpenAI accepts only budgetType: lifetime, Google only budgetType: daily). LinkedIn creates the campaign GROUP (our campaign level) and rejects a budget, which lives on the campaign (ad set) level there; it comes back status: DRAFT. TikTok campaigns are created without a status and report ENABLE. Created PAUSED unless status: ACTIVE where the platform supports it.

Idempotency: send an Idempotency-Key header to make retries safe.

post/v1/ads/campaigns

Headers

Idempotency-Keystring

Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. Only 2xx responses are stored, so a request that failed with a 4xx can be retried with a corrected body under the SAME key.

Request body

accountIdstring required

Zernio SocialAccount id (posting or ads variant); its platform decides where the campaign is created.

adAccountIdstring required

Platform ad account id (Meta act_<n>, Google customer id, LinkedIn account id, ...).

namestring required
goal'engagement' | 'traffic' | 'awareness' | 'video_views' | 'lead_generation' | 'lead_conversion' | 'job_applicants' | 'conversions' | 'app_promotion' | 'catalog_sales' | 'page_likes' required

Mapped to the ODAX objective (same mapping as POST /v1/ads/create).

isSkadnetworkAttributionboolean

Meta app promotion only. Immutable campaign flag. Set true for iOS 14+ SKAdNetwork campaigns and supply promotedObject.applicationId plus promotedObject.objectStoreUrl. The campaign receives promotedObject only when this flag is true. Cannot be changed on an existing campaign.

buyingType'AUCTION' | 'RESERVED'

Every platform buys at auction by default, so this only needs sending on Meta, and only to choose RESERVED. AUCTION is accepted on every platform and changes nothing. RESERVED (Reach & Frequency) is Meta-only and is rejected with a 400 elsewhere. SKAdNetwork app promotion requires AUCTION.

validateOnlyboolean

Meta only. Runs campaign validation without creating or persisting a campaign; Idempotency-Key storage is bypassed. Returns HTTP 200 with validateOnly true and status VALIDATED.

specialAdCategoriesstring[]
budgetAmountnumber

Campaign-level (CBO) budget in WHOLE currency units (USD: 50 = $50.00), NOT cents. Meta's own Marketing API takes this same number in minor units, so it is an easy and expensive mix-up. Requires budgetType.

budgetType'daily' | 'lifetime'
status'ACTIVE' | 'PAUSED'
bidStrategy'LOWEST_COST_WITHOUT_CAP' | 'LOWEST_COST_WITH_BID_CAP' | 'COST_CAP' | 'LOWEST_COST_WITH_MIN_ROAS'

Campaign bid strategy. Meta stores bid_strategy alongside the budget, so this REQUIRES budgetAmount + budgetType on the same request; sending it without a campaign budget is a 400. A campaign carrying a strategy without its bid_amount makes every ad set created under it fail with an error that names the ad set (code 100, subcode 1815857), so the bad state is rejected up front rather than accepted. To bid at ad-set level on Meta, set the strategy there instead. On Google: LOWEST_COST_WITHOUT_CAP = Maximize Conversions, COST_CAP + bidAmount = Target CPA, LOWEST_COST_WITH_MIN_ROAS + roasAverageFloor = Target ROAS, LOWEST_COST_WITH_BID_CAP + bidAmount = Maximize Clicks with a CPC ceiling; portfolioBidStrategyId attaches a portfolio strategy instead.

bidAmountnumber

Whole currency units (USD: 5 = $5.00). Required for LOWEST_COST_WITH_BID_CAP and COST_CAP; ignored otherwise. On Meta, validated here but NOT stored: the campaign object has no bid_amount field, only bid_strategy lives on it, and the amount takes effect once an ad set joins this campaign (existingCampaignId on POST /v1/ads/create) and supplies its own bidAmount there. On Google, stored directly on the campaign's bidding strategy.

roasAverageFloornumber

Decimal ROAS multiplier (2.0 = 2.0x). Required for LOWEST_COST_WITH_MIN_ROAS.

portfolioBidStrategyIdstring

Google only. Attach an existing portfolio bid strategy (numeric id from GET /v1/ads/bid-strategies) to the new campaign instead of a standard one. Exclusive with bidStrategy.

Response

Campaign validation passed without creating a campaign.

validateOnlyboolean

Always true.

adAccountIdstring
campaignId''

Empty because no campaign was created.

objectivestring
status'VALIDATED'

Changes