跳转到主要内容
POST
Create standalone ad

请求规范

  • 方法与路径: POST /apis/v1/ads/create
  • 可用状态: enabled
  • 请求 URL 模板: https://api.aisa.one/apis/v1/ads/create
  • connectionId: query; 必填
  • X-Aisa-Confirm: header; 可选
  • Idempotency-Key: header; 可选
  • Runtime 事实版本: fe60122939c67dc98a3a6ac6b97bd5c326b526105150c8959304dd2160d4dd09
完整 OpenAPI 定义 有效请求与价格声明(包括认证和引用的 schema):

费用与请求规则

当前未提供请求参考价格;请使用接口支持的报价功能确认费用。 最终费用以账户适用价格及实际结算为准。 公开参考值不是你的账户报价或最终扣费。对于支持 X-AISA-Cost-Mode: quote 的接口,执行前请针对完整请求获取免费报价;执行后通过响应费用元数据和 Usage Logs 核对结算费用。1 USD 等于 1,000,000 个整数 micro-USD。

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

请求头

X-Aisa-Confirm
enum<string>

Required with the value "spend" when the request can spend money or change spend. Without it the request is refused with 409 confirmation_required, which describes what would happen; nothing is sent to the ad platform.

可用选项:
spend
Idempotency-Key
string

Passed to the ad platform integration: a retry with the same key returns the first result instead of acting twice. AIsa never retries a write for you.

Required string length: 1 - 191

查询参数

connectionId
string
必填

The ads connection (adc_...) the request runs on: one of yours, from GET /apis/v1/ads/connections. On a request with a JSON body it may be sent as a top-level body member instead.

Pattern: ^adc_[0-9A-Za-z]+$

请求体

application/json
adAccountId
string
必填
adName
string

Meta only. Exact ad name (the single-creative ad object's name). Overrides the default, which is name. (For per-ad names on the multi-creative shape, set name on each creatives[] entry instead.)

Maximum string length: 255
adSetId
string

When present, switches to the attach shape: adds one new ad to this existing ad set without creating a new campaign. Mutually exclusive with creatives[]. Must be yours: it is checked through the connection before the request is sent, and an id that is not yours answers not_found.

adSetName
string

Exact ad set name. Meta, Reddit and Google (the ad group). Overrides the default - Ad Set (Google Search and Display: - Ad Group). Ignored when the request joins an existing ad set (adSetId).

Maximum string length: 255
adSetStatus
enum<string>

Every platform. Sets the switch of the new ad set alone and overrides status for it. When omitted, it follows status.

可用选项:
ACTIVE,
PAUSED
adStatus
enum<string>

Request-side publish switch for adStatus on ad creation endpoints only (status, campaignStatus and adSetStatus carry their own inline ACTIVE/PAUSED enum there; the status-update endpoints are a separate lowercase active/paused…

可用选项:
ACTIVE,
PAUSED
additionalDescriptions
(string | object)[]

Google Search RSA only. Extra text assets, as strings or objects with text and optional pinnedField. Existing string input remains supported.

Required string length: 1 - 90
additionalHeadlines
(string | object)[]

Google Search RSA only. Extra text assets, as strings or objects with text and optional pinnedField. String input remains supported.

Required string length: 1 - 30
advantageAudience
enum<integer>

Meta only. Controls the Advantage audience feature (targeting_automation). 0 = disabled (default), 1 = enabled. Meta Marketing API requires this field on all ad set creation requests.

可用选项:
0,
1
ageMax
integer
必填范围: 13 <= x <= 65
ageMin
integer
必填范围: 13 <= x <= 65
aiDisclosure
enum<string>

Meta only. Meta's "Ad includes media created or edited with AI" disclosure (the Ads Manager checkbox), stored on the creative as generative_asset_spec.transparency_metadata.self_disclosure. OPT_IN: checks it.

可用选项:
OPT_IN,
OPT_OUT
assetGroup
object

Google Performance Max creative assets. At least one description must be 60 characters or fewer. Texts within each list must be distinct.

attributionSpec
object[]

Meta only. Conversion attribution window for the ad set, mapping 1:1 to Meta's ad-set attribution_spec. Only honored for conversion goals (conversions, lead_generation, app_promotion); ignored for awareness/traffic/engagement.

Required array length: 1 - 3 elements
audienceId
string

Custom audience ID for targeting Must be yours: it is checked through the connection before the request is sent, and an id that is not yours answers not_found.

behaviors
object[]

Behaviour entities from /apis/v1/ads/targeting/search?dimension=behavior (Meta, TikTok and LinkedIn). Each must include id. On TikTok:

bidAmount
number

Deprecated: send it inside platformSpecificData instead (Meta today; TikTok's nested shape is planned). The flat field keeps working during the deprecation window; sending both shapes returns a 400.

bidStrategy
enum<string>

Deprecated: send it inside platformSpecificData instead (Meta today; TikTok's nested shape is planned). The flat field keeps working during the deprecation window. Sending both shapes returns a 400.

可用选项:
LOWEST_COST_WITHOUT_CAP,
LOWEST_COST_WITH_BID_CAP,
COST_CAP,
LOWEST_COST_WITH_MIN_ROAS
billingEvent
string

Meta only. Explicit ad-set billing_event. Defaults to IMPRESSIONS. Forwarded verbatim to Meta, which validates compatibility with the optimization goal.

boardId
string

Pinterest only. Board ID (auto-creates if not provided).

bodies
string[]

Meta only. Multiple Text Options (Advantage+ Flexible Format): 1-5 primary-text variations that Meta optimises delivery across, WITHOUT enabling full Dynamic Creative (dynamicCreative).

Required array length: 1 - 5 elements
body
string

Required on legacy + attach shapes. X: the tweet text (max 280 chars including a ~24-char URL when linkUrl is set). LinkedIn: the post commentary (the intro text shown above the ad). OpenAI Ads: the chat card's body text.

brandIdentity
object

TikTok only; non-TikTok platforms ignore this field. Synthetic Brand Identity used when the ad attributes to a CUSTOMIZED_USER (instead of a real TT_USER @username).

budgetAmount
number

Budget in WHOLE currency units (USD: 50 = $50.00), NOT cents. Meta's own Marketing API takes this number in minor units, an easy and expensive mix-up. Required on legacy, multi-creative and Performance Max shapes. Inherited on attach.

budgetLevel
enum<string>
默认值:adset

Meta only. Where the budget lives, which selects the Meta budget model: adset (default): ABO (Ad-set Budget Optimization). The budget is set on the ad set. Back-compatible; omit this field to keep it.

可用选项:
adset,
campaign
budgetType
enum<string>

Defaults to daily when budgetAmount is sent without it (reported in appliedDefaults.budgetType). Inherited on attach. OpenAI Ads: accepts both as the campaign's single spend cap.

可用选项:
daily,
lifetime
businessName
string

Google Display only

Maximum string length: 25
buyingType
enum<string>
默认值:AUCTION

Meta only. Buying type. Defaults to AUCTION and is explicitly sent on new campaigns, including validateOnly. Reusing existingCampaignId does not change the campaign. RESERVED = Reach & Frequency:

可用选项:
AUCTION,
RESERVED
callToAction
enum<string>

The ad's call-to-action button. Meta: required on legacy + attach shapes. Accepts every call to action type Meta itself accepts (the enum lists them), including values such as SEE_DETAILS that ads synced from Meta carry.

可用选项:
BOOK_TRAVEL,
CONTACT_US,
DONATE,
DONATE_NOW,
DOWNLOAD,
GET_DIRECTIONS,
GO_LIVE,
INTERESTED,
LEARN_MORE,
SEE_DETAILS,
LIKE_PAGE,
MESSAGE_PAGE,
RAISE_MONEY,
SAVE,
SEND_TIP,
SHOP_NOW,
SIGN_UP,
VIEW_INSTAGRAM_PROFILE,
INSTAGRAM_MESSAGE,
LOYALTY_LEARN_MORE,
PURCHASE_GIFT_CARDS,
PAY_TO_ACCESS,
SEE_MORE,
TRY_IN_CAMERA,
WHATSAPP_LINK,
GET_IN_TOUCH,
TRY_NOW,
ASK_A_QUESTION,
START_A_CHAT,
CHAT_NOW,
ASK_US,
CHAT_WITH_US,
SHOP_ON_RETAILER,
BOOK_NOW,
CHECK_AVAILABILITY,
ORDER_NOW,
WHATSAPP_MESSAGE,
GET_MOBILE_APP,
INSTALL_MOBILE_APP,
USE_MOBILE_APP,
INSTALL_APP,
USE_APP,
PLAY_GAME,
TRY_DEMO,
WATCH_VIDEO,
WATCH_MORE,
OPEN_LINK,
NO_BUTTON,
LISTEN_MUSIC,
MOBILE_DOWNLOAD,
GET_OFFER,
GET_OFFER_VIEW,
BUY_NOW,
BUY_TICKETS,
UPDATE_APP,
BET_NOW,
ADD_TO_CART,
SELL_NOW,
GET_SHOWTIMES,
LISTEN_NOW,
GET_EVENT_TICKETS,
REMIND_ME,
SEARCH_MORE,
PRE_REGISTER,
SWIPE_UP_PRODUCT,
SWIPE_UP_SHOP,
PLAY_GAME_ON_FACEBOOK,
VISIT_WORLD,
OPEN_INSTANT_APP,
JOIN_GROUP,
GET_PROMOTIONS,
SEND_UPDATES,
INQUIRE_NOW,
VISIT_PROFILE,
CHAT_ON_WHATSAPP,
EXPLORE_MORE,
CONFIRM,
JOIN_CHANNEL,
MAKE_AN_APPOINTMENT,
ASK_ABOUT_SERVICES,
BOOK_A_CONSULTATION,
GET_A_QUOTE,
BUY_VIA_MESSAGE,
ASK_FOR_MORE_INFO,
VIEW_PRODUCT,
VIEW_CHANNEL,
WATCH_LIVE_VIDEO,
JOIN_LIVE_VIDEO,
IMAGINE,
WATCH_NOW,
STREAM_NOW,
BUY_ACTIVITY_TICKETS,
CALL,
MISSED_CALL,
CALL_NOW,
CALL_ME,
APPLY_NOW,
BUY,
GET_QUOTE,
SUBSCRIBE,
RECORD_NOW,
VOTE_NOW,
GIVE_FREE_RIDES,
REGISTER_NOW,
OPEN_MESSENGER_EXT,
EVENT_RSVP,
CIVIC_ACTION,
SEND_INVITES,
REFER_FRIENDS,
REQUEST_TIME,
SEE_MENU,
SEARCH,
TRY_IT,
TRY_ON,
LINK_CARD,
DIAL_CODE,
FIND_YOUR_GROUPS,
START_ORDER,
REGISTER,
JOIN,
ATTEND,
REQUEST_DEMO,
VIEW_QUOTE,
APPLY
callouts
string[]

Google Search only. Short callout texts (max 25 chars each) that appear as non-clickable annotations under the ad, e.g. "Free shipping", "24/7 support".

Required array length: 1 - 20 elements
Required string length: 1 - 25
campaignAttribution
enum<string>

Meta ad-set attribution. Required as SKADNETWORK for iOS 14+ app promotion or a SKAdNetwork campaign. Requires AUCTION buying. Standalone Meta ad-set creation is not supported; use this field on /apis/v1/ads/create.

可用选项:
AEM,
SKADNETWORK
campaignName
string

Meta, Reddit and Google. Exact campaign name; overrides the default - Campaign. Ignored when the request joins an existing campaign or ad set. Google: no line breaks and at most 255 characters, checked before calling Google.

Maximum string length: 255
campaignNegativeKeywords
(string | object)[]

Google Search only; other platforms return 400. Campaign-level negative keywords (campaign_criterion.negative), created alongside the ad group. Editable later via PUT /apis/v1/ads/campaigns/{campaignId}/negative-keywords.

Maximum array length: 1000

A Google Search keyword: a bare string (BROAD match), or an object naming the match type.

Required string length: 1 - 80
campaignStatus
enum<string>

Every platform. Sets the switch of the new campaign alone (LinkedIn: the campaign group) and overrides status for it. Omitted, it follows status. Ignored when the request creates no campaign (existingCampaignId or adSetId).

可用选项:
ACTIVE,
PAUSED
campaignType
enum<string>
默认值:display

Google only. Performance Max requires assetGroup and Demand Gen requires demandGen; both are always created PAUSED. With adSetId it defaults to the ad group's own campaign type instead of display.

可用选项:
display,
search,
pmax,
demand_gen

Carousel cards. Behavior per platform: Reddit: builds a carousel ad.

Required array length: 2 - 10 elements
catalogFormat
enum<string>

Meta catalog template creatives only (goal catalog_sales, goal traffic with promotedObject.productSetId, or adSetId with promotedObject.productSetId); a 400 otherwise. Omit it to let Meta pick the format.

可用选项:
single_image,
carousel_images_multi_items,
carousel_images_single_item,
carousel_slideshows
cities
(string | object)[]

City-level geo targeting (Meta, Google and TikTok). An entry is { key } or the key alone as a plain string (["1006410"]).

The city id alone, e.g. "1006410" (same as { key: "1006410" }).

connectionId
string

The ads connection (adc_...), when not sent as the connectionId query parameter.

Pattern: ^adc_[0-9A-Za-z]+$
countries
string[]

ISO 3166-1 alpha-2 country codes (e.g. ['NL']). Defaults to ['US'] when no other geo targeting (flat or nested targeting) is provided.

countryGroups
enum<string>[]

Meta only. Continents and trade blocs (geo_locations.country_groups), for targeting a whole region without listing its countries. Combines with countries rather than replacing it.

可用选项:
africa,
asia,
europe,
north_america,
south_america,
oceania,
central_america,
caribbean,
eea,
euro_area,
nafta,
mercosur,
afta,
apec,
gcc,
cisfta,
emerging_markets,
itunes_app_store,
android_free_store,
android_paid_store
creativeFeatures
object

Meta Advantage+ creative enhancements. Map snake_case feature names to OPT_IN or OPT_OUT; Meta validates supported keys and unspecified features default to OPT_OUT.

creatives
object[]

Meta-only. When present, switches to the multi-creative shape: creates 1 campaign + 1 ad set + N ads (one per entry here). Top-level headline / body / imageUrl / linkUrl / callToAction are ignored in this mode.

Minimum array length: 1
currency
string

ISO 4217 currency code matching the ad account's currency (e.g. USD). Meta only.

Required string length: 3
customLocations
object[]

Point-radius (lat/lng) geo targeting. Meta only (custom_locations). Rejected on platforms without radius support.

defaultLocale
string

Meta only. Language the top-level copy is written in (e.g. en, pt_BR), used by the translations default rule. Defaults to en. Meta rejects a language asset feed whose default rule carries no locales of its own.

demandGen
object

Creative, channel and audience settings for a Google Demand Gen campaign (campaignType demand_gen).

description
string

Meta only (facebook/instagram). Link description: the secondary text shown below the headline (Meta's link_data.description; on video creatives mapped to video_data.link_description).

Maximum string length: 255
descriptions
string[]

Meta only. Optional description variations for Multiple Text Options. Sent alongside bodies and headlines.

Required array length: 1 - 5 elements
Maximum string length: 255
dsaBeneficiary
string

Legal entity that benefits from the ad. Required when targeting EU users (EU DSA, Article 26).

Maximum string length: 100
dsaPayor
string

Legal entity that pays for the ad. Can differ from dsaBeneficiary (for example, an agency paying for a client's ads). Same rules as dsaBeneficiary: required for EU targeting unless the ad account has a default payor.

Maximum string length: 100
dynamicCreative
object

Meta only. Dynamic Creative: supply a POOL of assets and Meta auto-combines and optimises them into the best-performing variations within a single ad (mapped to the creative's asset_feed_spec).

endDate
string<date-time>

When the ad ends. If omitted: on a lifetime budget, the ad ends 7 days after it starts (reported in appliedDefaults.endDate); a daily budget runs until paused.

existingCampaignId
string

Create the new objects under this EXISTING campaign instead of creating a new one. Supported on Meta, Google Ads, LinkedIn, TikTok and Reddit Ads. Mutually exclusive with adSetId and creatives[]. Must be yours: it is checked through the connection before the request is sent, and an id that is not yours answers not_found.

existingCreativeId
string

Meta only. Reuse an EXISTING ad creative by id instead of building a new one from the copy/media fields (which are then ignored). Combine with existingCampaignId to build a multi-ad-set campaign that shares one creative.

gender
enum<string>
默认值:all

Restrict the audience by gender. 'male' targets men only, 'female' targets women only, 'all' (default) targets everyone. Applied on Meta, TikTok, Pinterest and Reddit. Ignored on Google, LinkedIn and X.

可用选项:
all,
male,
female
goal
enum<string>

The ad's goal. Available goals vary by platform. When omitted, it is inferred from the ad (see appliedDefaults.goal in the response); the attach shape inherits it from the ad set. Meta conversions: OUTCOME_SALES.

可用选项:
engagement,
traffic,
awareness,
video_views,
lead_generation,
lead_conversion,
conversions,
app_promotion,
catalog_sales,
page_likes,
page_visits,
job_applicants
headline
string

Ad headline. Required for Meta, Google, Pinterest, LinkedIn, OpenAI Ads and Reddit Ads on legacy + attach shapes (for multi-creative, skip it and use creatives[].headline). Ignored for TikTok.

headlines
string[]

Meta only. Headline variations for Multiple Text Options. Must be sent alongside bodies. The top-level headline field is used as the object_story_spec.link_data.name (video_data.title on a video creative).

Required array length: 1 - 5 elements
Maximum string length: 255
identityId
string

TikTok: the identity the ad runs as, from GET /apis/v1/ads/tiktok-identities. Overrides the connected account's own identity; must be authorized on the advertiser.

identityType
enum<string>

TikTok only. Forces the identity attribution on the ad: TT_USER: the posting account's open_id (real @username branding). Requires a connected TikTok posting account on the same profile.

可用选项:
TT_USER,
CUSTOMIZED_USER,
BC_AUTH_TT
imageUrl
string<uri>

Image creative for Meta/Google/Pinterest/LinkedIn on legacy + attach shapes. Mutually exclusive with video. LinkedIn: required unless video is set.

images
object

Google Display (Responsive Display Ads) only. Google RDA requires both a landscape (1.91:1) and a square (1:1) marketing image; sending only one is rejected upstream as 'Too few.' (NOT_ENOUGH_*_MARKETING_IMAGE_ASSET). Supply both URLs here.

incomeTier
enum<string>

Normalized household-income tier. Meta and TikTok express all four; Google maps only top_10; rejected on LinkedIn, X, and Pinterest. On Meta, income targeting is incompatible with housing/employment/credit specialAdCategories.

可用选项:
top_5,
top_10,
top_10_25,
top_25_50
instagramAccountId
string

Meta only. Overrides the Instagram account the ad is delivered as. Pass an Instagram Business Account ID (e.g. 17841...), mapped to the creative's instagram_user_id; it is sent as-is and never replaced.

interests
object[]

Interest objects from /apis/v1/ads/targeting/search?dimension=interest (or dimension=interestKeyword on TikTok). Each must include id and name. TikTok: Bare numeric ids are interest categories (interest_category_ids).

isSkadnetworkAttribution
boolean

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.

keywords
(string | object)[]

Google Search only. Keywords on the new ad group; entries are strings (BROAD) or { text, matchType }. Editable later via PUT /apis/v1/ads/{adId} targeting.keywords.

Maximum array length: 1000

A Google Search keyword: a bare string (BROAD match), or an object naming the match type.

Required string length: 1 - 80
languages
string[]

Language codes, e.g. ["en","es"]. Google: campaign language targeting (language_constant) using Google's language codes (ISO 639-1, plus variants such as zh_CN). Unknown codes return 400.

leadGenFormId
string

Lead Gen form ID to attach to the ad's creative. REQUIRED when goal is lead_generation. Create one via POST /apis/v1/ads/lead-forms. Meta (facebook/instagram): the leadgen_forms ID.

The ad's destination URL. Required on legacy + attach shapes (skip for multi-creative). NOT required when goal is lead_generation (the ad opens a Lead Gen form instead).

locationTargetingType
enum<string>

Google only (400 elsewhere). Set on the new campaign; a request that joins an existing campaign (existingCampaignId or adSetId) returns 400, change that campaign with PUT /apis/v1/ads/campaigns/{campaignId}/targeting instead.

可用选项:
presence,
presence_or_interest
longHeadline
string

Google Display only. Defaults to headline if omitted. On LinkedIn, reused as the optional secondary description text on traffic (link) ads; omitted if not provided.

Maximum string length: 90
manualCpc
object

Google Search and Display only. Manual CPC bidding. Enhanced CPC is not offered: Google no longer lets Search and Display campaigns enable it. Exclusive with every other strategy field.

metros
(string | object)[]

DMA / metro-area geo targeting (Meta and TikTok). key is the platform's metro ID from /apis/v1/ads/targeting/search?dimension=geo&geoType=metro (TikTok metros appear as type metro, e.g. the New York DMA).

multiAdvertiser
enum<string>

Meta only. Multi-advertiser ads: whether Meta may show this ad alongside other advertisers' in one unit. Meta auto-enrols since Aug 2024, so send OPT_OUT to leave.

可用选项:
OPT_IN,
OPT_OUT
name
string

Omitted, the ad is named Ad (UTC) and the response reports it in appliedDefaults.name.

Maximum string length: 255
negativeKeywords
(string | object)[]

Google Search only; other platforms return 400. Ad-group-level negative keywords on the new ad group. Editable later via PUT /apis/v1/ads/{adId} targeting.negativeKeywords.

Maximum array length: 1000

A Google Search keyword: a bare string (BROAD match), or an object naming the match type.

Required string length: 1 - 80
networkSettings
object

Google Search only, when the call creates the campaign (400 with existingCampaignId or adSetId).

optimizationGoal
string

Explicit optimization goal. Supported on: TikTok with goal video_views: ENGAGED_VIEW (the 6-second default) or ENGAGED_VIEW_FIFTEEN; both bill per view.

optimizeCardOrder
boolean

Meta only (a 400 on any other platform), and only with carouselCards (a 400 without them). Sets the creative's link_data.multi_share_optimized. false: keeps the cards in the order given.

organizationId
string

LinkedIn only (ignored by every other platform). The Company Page that authors the Direct Sponsored Content ("dark") post backing the ad. Accepts a numeric organization ID or a full urn:li:organization:N URN. Required unless it defaults:

pageId
string

Meta only. The Facebook Page the ad runs as (object_story_spec.page_id). Defaults to the Page bound to the connection. Pass another Page ID to run the ad as that Page.

phoneNumber
string

Meta attach shape only (adSetId). The phone number (E.164, e.g. +4712345678) for an ad added to a "website and phone call" ad set (destination_type WEBSITE_AND_PHONE_CALL), sent as the creative's call configuration.

Pattern: ^\+[1-9]\d{6,14}$
placementAssets
object

Meta only. Pins a SPECIFIC asset (image OR video) to each placement group on a SINGLE ad (e.g. a 9:16 on Stories/Reels and a 4:5 on Feed).

placements
object

Meta only; non-Meta platforms reject this field. Manual ad placements. Omit for automatic placements (Meta's default, recommended for most cases, since Meta optimises delivery across all eligible surfaces).

platformSpecificData
object

Platform-specific options. The platform is derived from connectionId; options for a different platform return a 400. LinkedIn (campaign bidding and delivery controls) and Meta (the bid trio) have options today. Meta

portfolioBidStrategyId
string

Google Search and Display only. Performance Max rejects portfolio bidding. Attach an existing portfolio bid strategy (numeric id from GET /apis/v1/ads/bid-strategies) to the new campaign instead of a standard one.

Pattern: ^\d+$
promotedObject
object

What the ad optimises against. Behaviour depends on the platform. Platforms other than Meta, TikTok, OpenAI and Reddit ignore promotedObject entirely. Meta: forwarded to the ad set's promoted_object (snake-cased).

promotion
object | null

Not supported. Send null or omit the field, and set the Promotion on the ad in Ads Manager. Any object is rejected with 400 invalid_field_value.

rawTargeting
object

Meta only.

regionalRegulatedCategories
string[]

Meta only. Regional regulation categories required when the ad set targets certain countries.

regionalRegulationIdentities
object

Meta only. Verified identity IDs of the beneficiary and payer for each declared regionalRegulatedCategories value. Ignored when adSetId adds the ad to an existing ad set.

regions
(string | object)[]

Region-level (state/province) geo targeting (Meta, Google and TikTok). Each region is targeted by the platform's opaque key (the region ID) which can be looked up via GET /apis/v1/ads/targeting/search?dimension=geo&q=&countryCode=.

rfPredictionId
string

Meta only. The RESERVED prediction id the R&F ad set runs on (reserving mints a new id, so pass that one). Requires buyingType RESERVED.

roasAverageFloor
number

Deprecated: send it inside platformSpecificData instead (Meta today; TikTok's nested shape is planned). The flat field keeps working during the deprecation window. Sending both shapes returns a 400.

savedTargetingId
string

ID of a saved_targeting audience (created via POST /apis/v1/ads/audiences). When set, its stored TargetingSpec is expanded as the base targeting; inline fields on this body merge on top. Must be yours: it is checked through the connection before the request is sent, and an id that is not yours answers not_found.

Google Search only. Sitelink assets to create and attach at the campaign level. Each entry becomes an Asset (with sitelink_asset + Asset.final_urls) plus a CampaignAsset link (field_type SITELINK).

Required array length: 2 - 20 elements
smartPlus
boolean

TikTok only. Creates the ad as a TikTok Upgraded Smart+ campaign: TikTok automates targeting, bidding and delivery. Supported goals: conversions: Smart+ Web Conversions.

smartTargeting
object

TikTok only (a 400 elsewhere). TikTok Smart Targeting on the ad group. When on, TikTok may deliver beyond the selected audiences or interests. audience: TikTok's smart_audience_enabled.

specialAdCategories
enum<string>[]

Meta only. Declares the ad's special category, required for housing, employment, credit, or political/social-issue ads (Meta enforces restricted targeting for these). Note: setting a special category disables income/zip targeting on Meta.

可用选项:
HOUSING,
EMPLOYMENT,
CREDIT,
FINANCIAL_PRODUCTS_SERVICES,
ISSUES_ELECTIONS_POLITICS,
ONLINE_GAMBLING_AND_GAMING
specialAdCategoryCountry
string[]

Meta (metaads) only. 2-letter ISO country codes the special ad category applies to. Requires specialAdCategories to be set (400 otherwise).

startDate
string<date-time>

Ad-set start time (ISO 8601, e.g. "2026-06-10T09:00:00Z"). When omitted the ad starts delivering immediately. Same field as on POST /apis/v1/ads/boost.

status
enum<string>

Publish state of the created entities, on every platform. Omitted or ACTIVE publishes live (default, back-compat).

可用选项:
ACTIVE,
PAUSED
structuredSnippets
object[]

Google Search only. Structured snippets: one header from Google's predefined list plus 3-10 values (max 25 chars each). Each becomes one Asset (structured_snippet_asset) plus a CampaignAsset link with field_type STRUCTURED_SNIPPET.

Required array length: 1 - 20 elements
targetImpressionShare
object

Google Search only. Target impression share bidding. Exclusive with bidStrategy, portfolioBidStrategyId and manualCpc; bidAmount is refused alongside it (the ceiling is maxCpc).

targeting
object

Nested targeting object: the same TargetingSpec shape as POST /apis/v1/ads/boost, POST /apis/v1/ads/targeting/reach-estimate, and saved_targeting audiences.

tracking
object

Ad tracking. Meta, plus urlTags on ChatGPT (OpenAI) and pixelId on Reddit. Meta: attaches pixel measurement to the ad regardless of the optimization goal (the "Website events" tracking row in Ads Manager).

translations
object[]

Meta only. Multi-language ads (Dynamic Language Optimization, the "Languages" toggle in Ads Manager): ONE ad with per-locale copy and, optionally, per-locale media.

Required array length: 1 - 10 elements
userDevice
string[]

Meta only. Device models such as iPhone. Emitted as user_device. May also be supplied inside targeting.

Minimum array length: 1
Minimum string length: 1
userOs
string[]

Meta only. Operating systems and version ranges, such as iOS_ver_14.0_and_above or Android. Emitted as user_os. May also be supplied inside targeting.

Minimum array length: 1
Minimum string length: 1
validateOnly
boolean

Validate the request without creating anything. Any other platform, or a Google campaignType other than pmax or demand_gen, returns 501 feature_not_available.

valueRuleSetId
string

Meta only (facebook, instagram; other platforms return 400). Value rule set to attach to the new ad set, from /apis/v1/ads/value-rule-sets. Attachment is driven by this id, so valueRulesApplied is optional alongside it.

Pattern: ^\d+$
valueRulesApplied
boolean

Meta only (facebook, instagram; other platforms return 400). Optional when attaching, and requires valueRuleSetId.

video
object

Creates a single VIDEO ad. Meta (facebook, instagram), LinkedIn and Reddit. Mutually exclusive with imageUrl. Supply url to upload a file, or id to reuse a video already on the ad account (list them with GET /apis/v1/ads/videos).

workEmployers
object[]

Meta only. Employer entities from /apis/v1/ads/targeting/search?dimension=workEmployer. Each must include id.

workIndustries
object[]

Meta only. Work-industry entities from /apis/v1/ads/targeting/search?dimension=workIndustry. Each must include id. Rejected on other platforms (use LinkedIn's industries there).

workPositions
object[]

Meta only. Job title entities from /apis/v1/ads/targeting/search?dimension=workPosition. Each must include id. Rejected on other platforms (use LinkedIn's jobTitles there).

zips
(string | object)[]

Postal/ZIP geo targeting. key is the platform's postal location ID from /apis/v1/ads/targeting/search?dimension=geo&geoType=zip. Supported on Meta, Google, TikTok, Pinterest, X.

响应

validateOnly dry-run passed, nothing was created

appliedDefaults
object

What the create filled in for fields the request left out. Empty when every field was sent. A passing validateOnly returns it too, so a dry run previews these values before anything is created.

message
string
results
object[]
validateOnly
boolean

Always true in a validate-only response.