Skip to main content
PATCH /api/v2/buyer/media-buys/:mediaBuyId Also available as the update_media_buy MCP tool on the buyer server. Updates one media buy directly, addressed by mediaBuyId — the owning campaign is resolved server-side, the same way Get media buy reads work. Use it when you already know which buy to change and don’t want to route the edit through Update campaign’s mediaBuys[] array. All fields are optional; send only what you want to change. Fields you omit are left as they are. To create media buys, use Create media buys — this task edits an existing buy and never adds a brand-new product selection.

Request

Parameters

What is validated

The update is rejected — never silently adjusted — when it would violate a campaign invariant:

Flight dates outside the campaign window

Flight dates that fall outside the campaign’s current window are a warning, not a failure: the campaign flight is widened to cover the requested dates and the response tells you it happened. This matches how campaign dates already auto-extend during execute. This warn-and-widen behavior applies to the media buy’s own start_time/end_time. Per-package packages[].startTime/endTime are intentionally validated against the media buy’s date range, not the campaign’s — a package can never outrun its buy, so an out-of-range package date is a validation error, not a warning. Widen the buy’s own dates first if a package needs to run longer.

Response

200 with the updated buy in the same shape as GET /media-buys/:mediaBuyId — identity, status, and the why-visibility fields — plus warnings[] when a flight date widened the campaign window:
Updating an ACTIVE or PAUSED buy stages a new version for seller confirmation rather than mutating the live buy: the response’s top-level fields keep describing what is delivering now, and the queued change appears under pendingChange until the seller confirms it. DRAFT buys update in place.

Errors

See Errors for the full error shape and recovery semantics.

Get media buy packages

Resolve a package description to the packageId to update

Update campaign

Campaign-addressed updates, cancels, and multi-buy edits in one request

Create media buys

Stage and execute new product selections through the campaign cart

Media buys

How media buys relate to campaigns, packages, and sellers