Skip to main content
PATCH
Update media buy

Authorizations

Authorization
string
header
required

API key or access token

Path Parameters

mediaBuyId
string
required

Buyer media buy ID

Minimum string length: 1
Example:

"mb_ETBn4gJ9Wu"

Body

application/json

Partial update for a single media buy, resolved top-level by mediaBuyId. Rejected outright (not warned) when it would violate a campaign invariant: currency (a product's replacement pricing option settles in a different currency), budget headroom (the update would exceed the campaign's remaining all-in budget), or mode compatibility (the campaign is directed — its mirrored media buy has no platform-managed update path).

name
string

Updated media buy name

Required string length: 1 - 255
packages
object[]

Per-package updates (for media buys with deployed packages)

products
object[]

Product updates — additive (existing products not listed are preserved).

start_time
string

"asap" or ISO 8601 date-time. A value earlier than the campaign's current flight start does not fail the request — it is applied and surfaced as a warning, and the campaign flight is widened to cover it.

end_time
string

ISO 8601 date-time. A value later than the campaign's current flight end does not fail the request — it is applied and surfaced as a warning, and the campaign flight is widened to cover it.

optimization_goals
object[]

Replace media-buy-level optimization goals; applied to every package at execution time. Pass an empty array to clear all goals.

creative_ids
string[]

Explicit creative IDs to attach to this media buy. Pass an empty array to clear all creatives.

Minimum string length: 1
updated_reason
string

Reason for the update (stored with the new version)

Maximum string length: 1000

Response

Update media buy

The updated media buy (why-visibility fields included) plus any non-blocking warnings.

mediaBuy
object
required

A single media buy with its why-visibility annotation (pendingReason, errorCode, forwardedAt, buyerReference). Use get_campaign for packages, products, and delivery.

warnings
string[]

Non-blocking notices about this update, e.g. a flight date fell outside the campaign window (the campaign window was widened to cover it, rather than failing the request).