Update Campaign
Update a campaign.
All fields are optional on update. If you include budget, send the full
budget object. Set description, start_time, or end_time to null to
clear that field. For non-Hotel campaigns, setting targeting to null resets targeting; these
campaigns can receive the account's default country. For Hotel campaigns, targeting: null resets only included locations; excluded locations, custom-audience inclusion/exclusion criteria, and platform targeting are preserved. Inspect the saved targeting
before activating delivery. status accepts active, paused, or
archived. You cannot update bidding_type. For a published conversion-optimized
campaign, you also cannot update conversion_event_setting_ids. Qualified-lead and Conversations campaigns have fixed conversion goals even in drafts. Other draft campaigns can change their conversion event selection before publication.
Hotel campaigns reject platform selections that create a restriction; selecting all platforms or clearing the restriction with targeting.platforms: null is allowed. Omitting targeting.platforms preserves the existing platform selection.
For non-Hotel campaigns, provide targeting.platforms.included to replace it, or set
targeting.platforms to null to clear only the platform restriction. Empty
platform objects and empty included arrays return HTTP 400. See
Update or clear platform targeting
for an example.
Audience eligibility is validated again when you save targeting. A concurrent
membership update can return 409 custom_audience_mutation_conflict without
applying the campaign edit. Wait for the audience operation to finish, retrieve
the current settings, and retry the intended edit if it is still appropriate.
Update Campaign
curl https://api.ads.openai.com/v1/campaigns/$CAMPAIGN_ID \
-X POST \
-H "Authorization: Bearer $OPENAI_ADS_API_KEY"{
"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"
]
}
}
}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"
]
}
}
}