Skip to content

Preview Ad Campaign Edit

POST
/ad-campaigns/{campaign_id}/edit-preview

What an edit WOULD change, without applying any of it.

Same body and same response shape as PUT /ad-campaigns/{campaign_id}. Reads the campaign’s live platform state to diff against and changes nothing. Run it first: some changes restart the platform’s learning phase.

Authorizations

Parameters

Path Parameters

campaign_id
required

The ad campaign’s id.

integer

The ad campaign’s id.

Header Parameters

X-Target-Org-Id
Any of:
string

Request Body required

Body for PUT /campaigns/{id} and POST /campaigns/{id}/edit-preview.

extra="forbid" is load-bearing (PRD hazard H8): the model used to inherit Pydantic’s default extra="ignore", so the wizard could POST a field the backend had never wired, get a 200, and render a green “Campaign updated” toast for an edit that reached nothing. An unknown field is now a 422 — a phantom control is structurally impossible to ship.

List-shaped fields (keywords, rsa_headlines, rsa_descriptions, geo_targets) are COMPLETE desired lists, never deltas. Google replaces repeated fields wholesale, so a partial list silently deletes the omitted entries; the handler read-modify-writes against the platform’s current state. None means “not provided / unchanged” — an empty list is a real request to clear, and is rejected where clearing would break the ad.

object
action
Any of:
string
auto_pause_at
Any of:
string format: date-time
auto_pause_tz
Any of:
string
<= 64 characters
campaign_negative_keywords
Any of:
Array<object>
object
key
additional properties
any
clear_auto_stop
boolean
creative_image_url
Any of:
string
<= 500 characters
creative_image_url_portrait
Any of:
string
<= 500 characters
creative_image_url_square
Any of:
string
<= 500 characters
cta
Any of:
string
daily_budget
Any of:
number
> 0
destination_url
Any of:
string
<= 500 characters
end_date
Any of:
string format: date
geo_targets
Any of:
Array<string>
headline
Any of:
string
<= 255 characters
keywords
Any of:
Array<object>
object
key
additional properties
any
logo_image_url
Any of:
string
<= 500 characters
name
Any of:
string
<= 255 characters
primary_text
Any of:
string
<= 1000 characters
rsa_descriptions
Any of:
Array<string>
rsa_headlines
Any of:
Array<string>
selected_channels
Any of:
object
key
additional properties
boolean
spend_cap
Any of:
number
> 0
video_asset_ids
Any of:
Array<integer>
video_business_name
Any of:
string
<= 25 characters
video_cta
Any of:
string
video_descriptions
Any of:
Array<string>
video_headlines
Any of:
Array<string>
video_long_headlines
Any of:
Array<string>

Responses

200

Successful Response

object
data
required

One ad-platform object, or one handler response.

object
key
additional properties
any
pagination
Any of:
object
has_next
required

Whether there are more pages

boolean
limit
required

Items per page

integer
next_cursor
Any of:
string
notes
Any of:
Array<string>
page
required

Current page number (1-indexed)

integer
total
required

Total number of items

integer
total_available
Any of:
integer
total_is_lower_bound
Any of:
boolean

422

Validation Error

object
detail
Array<object>
object
loc
required
Array
msg
required
string
type
required
string