Create Campaign
Create a campaign for an ad account.
Ads can serve only within the campaign’s scheduled times and targeted locations.
For location, platform, and custom audience targeting, see Campaign Targeting.
For the limited Hotel beta, follow Create Hotel ads for feed selection, supported countries, account eligibility, and current restrictions. Verify the saved countries before activating the campaign.
Defaults
If you omit start_time, the campaign has no delayed start. Delivery still requires active objects and the usual eligibility checks. For location defaults and supported countries, see the campaign targeting guide. Verify the saved targeting before activating the campaign.
Omitting targeting.platforms or setting it to null adds no platform restriction.
Note that time and currency fields will respect your account-set timezone and currency defaults.
See Custom Audiences for audience matching, exclusions, and minimum-size requirements.
Check audiences with GET /custom_audiences?intended_use=inclusion or
intended_use=exclusion before using them. A ready small or empty audience can
be excluded, but it isn't automatically eligible for inclusion. If you include
and exclude audiences, the remaining population must still meet the minimum.
For an exclusion-only campaign, omit targeting.custom_audiences.
Create a conversion-optimized campaign
To use oCPC, set bidding_type to conversions and pass exactly one active
standard conversion event setting from the current ad account. The event
setting must connect to one or more active conversion sources. Custom event settings
cannot be optimization goals.
Conversion bidding must be enabled for the ad account. Product-feed campaigns
can use oCPC during the open beta. Use the same endpoint, set mode to
product_feed, and include the linked product_feed_id. You cannot change the
campaign objective after creation, or the selected conversion event after publication. Qualified-lead and Conversations campaigns have fixed conversion goals even in drafts. For the complete
setup flow, including the required ad-group bid configuration, see
Conversion-Optimized Campaigns,
Product Feeds, and API Partner
Setup.
Create Campaign
curl https://api.ads.openai.com/v1/campaigns \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $OPENAI_ADS_API_KEY" \
-d '{
"budget": {
"lifetime_spend_limit_micros": 25000000
},
"name": "Spring launch",
"status": "paused",
"description": "Promote the new productivity bundle."
}'{
"id": "id",
"bidding_type": "bidding_type",
"budget": {
"daily_spend_limit_micros": 0,
"lifetime_spend_limit_micros": 0
},
"created_at": 0,
"description": "description",
"end_time": 0,
"name": "name",
"product_feed_id": "product_feed_id",
"start_time": 0,
"status": "status",
"updated_at": 0,
"advertiser_phone_verification_required": true,
"agent_destination_id": "agent_destination_id",
"billing_event_type": "billing_event_type",
"business_agent_id": "business_agent_id",
"conversion_event_setting_ids": [
"string"
],
"enable_dynamic_creative": true,
"geographic_targeting_blocked": true,
"landing_page_configuration": {
"query_string_template": "query_string_template"
},
"managed_optimization_goal": "managed_optimization_goal",
"mode": "mode",
"objective": "objective",
"review_resume_confirmation": {
"episode_id": "episode_id",
"reason": "reason",
"required_at": 0,
"system_paused": true
},
"serving_issues": [
{
"code": "ad_account_suspended"
}
],
"targeting": {
"custom_audiences": {
"ids": [
"string"
]
},
"excluded_custom_audiences": {
"ids": [
"string"
]
},
"excluded_locations": {
"countries": [
"string"
],
"include": [
{
"id": "id",
"country_code": "country_code",
"name": "name",
"region_code": "region_code",
"type": "type"
}
]
},
"locations": {
"countries": [
"string"
],
"include": [
{
"id": "id",
"country_code": "country_code",
"name": "name",
"region_code": "region_code",
"type": "type"
}
]
},
"platforms": {
"included": [
"ios_app"
]
}
}
}Body ParametersJSON
Campaign name for organizing ads; must contain a non-whitespace character.
For conversion optimization, exactly one active standard event setting from this account. Custom event settings cannot be campaign conversion goals.
Feed owned by this account for a product-feed campaign. See https://developers.openai.com/ads/product-feeds.
Returns
Returns Examples
{
"id": "id",
"bidding_type": "bidding_type",
"budget": {
"daily_spend_limit_micros": 0,
"lifetime_spend_limit_micros": 0
},
"created_at": 0,
"description": "description",
"end_time": 0,
"name": "name",
"product_feed_id": "product_feed_id",
"start_time": 0,
"status": "status",
"updated_at": 0,
"advertiser_phone_verification_required": true,
"agent_destination_id": "agent_destination_id",
"billing_event_type": "billing_event_type",
"business_agent_id": "business_agent_id",
"conversion_event_setting_ids": [
"string"
],
"enable_dynamic_creative": true,
"geographic_targeting_blocked": true,
"landing_page_configuration": {
"query_string_template": "query_string_template"
},
"managed_optimization_goal": "managed_optimization_goal",
"mode": "mode",
"objective": "objective",
"review_resume_confirmation": {
"episode_id": "episode_id",
"reason": "reason",
"required_at": 0,
"system_paused": true
},
"serving_issues": [
{
"code": "ad_account_suspended"
}
],
"targeting": {
"custom_audiences": {
"ids": [
"string"
]
},
"excluded_custom_audiences": {
"ids": [
"string"
]
},
"excluded_locations": {
"countries": [
"string"
],
"include": [
{
"id": "id",
"country_code": "country_code",
"name": "name",
"region_code": "region_code",
"type": "type"
}
]
},
"locations": {
"countries": [
"string"
],
"include": [
{
"id": "id",
"country_code": "country_code",
"name": "name",
"region_code": "region_code",
"type": "type"
}
]
},
"platforms": {
"included": [
"ios_app"
]
}
}
}