Create ad
Changed onCreate a standalone ad with its own creative.
Request
- Base URLhttps://api.crevio.co/v1
- AuthAPI key in header Authorization
Headers
Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.
Request body
Ad to create.
Budget for the new ad set (or campaign, with budget_level=campaign). Whole currency units, NOT cents: 20 = $20.00. Meta's own Marketing API takes this number in minor units, so it is an easy and expensive mix-up — 2000 here buys $2000.00 of ads, not $20.00.
daily or lifetime. A lifetime budget also needs end_date.
Countries to target, as ISO 3166-1 alpha-2 codes, e.g. ["US", "CA"]. Defaults to the US.
Youngest age to target.
Oldest age to target. 65 means 65 and over.
Target men or women only. Applied on Meta, TikTok and Pinterest; ignored on Google, LinkedIn and X. Defaults to all.
Meta only. Declare what the ad offers: HOUSING (homes for sale or rent, mortgages, home insurance), EMPLOYMENT, FINANCIAL_PRODUCTS_SERVICES (loans, credit, insurance, investing), ISSUES_ELECTIONS_POLITICS or ONLINE_GAMBLING_AND_GAMING. It is set on the new campaign and this API cannot add it later. With the first three, Meta rejects narrowed targeting: omit age_min, age_max and gender, and use no ZIP codes, lookalikes or location exclusions.
Meta only. Countries the category applies to, as ISO 3166-1 alpha-2 codes, e.g. ["US"]. Send the countries the ad targets. Requires special_ad_categories.
Response
Created ad.
Created ad.
Changes
- warning
added the new
idempotency_errorenum value to theerror/typeresponse property for the response status - warning
added the new
idempotency_errorenum value to theerror/typeresponse property for the response status - warning
added the new
idempotency_errorenum value to theerror/typeresponse property for the response status
4 more changes in this revision
- warning