Overview
A Media Buy represents one ADCP transaction with one sales agent. It is not a directly-creatable resource — the platform spawns media buys when a Campaign executes, creating one media buy per sales agent for each selected product. You read their status and tune them through the campaign update endpoint, never by creating or posting them directly.Media buys are spawned at execution, not before. A
DRAFT campaign has no media buys. After POST /campaigns/:id/execute, the campaign holds a mediaBuys[] array — one entry per sales agent.Where a media buy sits in the hierarchy
A campaign fans out into media buys, each of which fans out into packages, each of which delivers:Status
A media buy’sstatus is one of:
| Status | Meaning |
|---|---|
DRAFT | Created but not yet submitted |
PENDING_APPROVAL | Submitted; awaiting seller approval |
INPUT_REQUIRED | Seller needs additional information before approval can proceed |
ACTIVE | Live and delivering |
PAUSED | Spend halted; resumable |
COMPLETED | Flight finished or fully delivered |
CANCELED | Stopped before completion |
FAILED | Submission or execution error |
REJECTED | Seller declined the buy |
ARCHIVED | Soft-deleted |
Most-restrictive rule
For a multi-agent campaign, the surfaced status is the most restrictive across all agents. For example, if one media buy isACTIVE and another is PENDING_APPROVAL, the campaign reports PENDING_APPROVAL. INPUT_REQUIRED signals that a seller is blocked waiting on more information.
How status flows
Status updates reach you two ways:- Webhooks from sales agents — preferred, near-real-time. No polling needed.
- Polling via
GET /api/v2/buyer/campaigns/:id/media-buy-status, which queries each agent directly and persists any changes.
Optimization goals
Optimization goals are applied at the media-buy level — they propagate to every package in the media buy at execution time. Each goal is either event-based (optimize against tracked conversions) or metric-based (optimize against seller-native delivery metrics).Target kinds
| Target kind | Meaning |
|---|---|
cost_per | Target CPA (events) or CPM-like rate (metrics) |
per_ad_spend | Target ROAS — value per dollar spent (events only) |
maximize_value | No target — maximize total event value within budget |
threshold_rate | Maintain a minimum rate of the metric (metrics only) |
Supported metrics
clicks, views, completed_views, viewed_seconds, attention_seconds, attention_score, engagements, follows, saves, profile_visits.
Reading and tuning media buys
Because media buys aren’t created directly, you act on them throughPUT /api/v2/buyer/campaigns/:id using the mediaBuys[] array. Each entry targets one media buy by mediaBuyId and carries an action.
When lowering a campaign’s budget.total, the campaign update automatically reduces live package budgets proportionally if the new media budget would otherwise be below current package allocations. Provide explicit mediaBuys[].packages[].budget values only when you want specific package-level amounts instead of proportional scaling.
| Action | Effect |
|---|---|
update | Default — modify budget, pacing, optimization goals, or creatives |
cancel | Cancel a running media buy |
delete | Archive the media buy |
Update budget and optimization goals
Cancel a single package
To cancel one package without touching the rest of the media buy, passpackageIds on the mediaBuys[] entry:
Override creative attachment
By default, a campaign’s manifest-linked creatives auto-sync to every media buy on update, filtered to the formats accepted by each buy’s products. Passcreative_ids on a mediaBuys[] entry to override that per-buy:
- Omit
creative_idsto use auto-sync (default). "creative_ids": []explicitly clears all creatives from the media buy.- Each ID must already be linked to the campaign and match a format accepted by the media buy’s products. Otherwise the update fails with a validation error — the field is not silently filtered.
creative_idsis only valid withaction: "update". It is rejected withcancelordelete.
Cascade behavior
Actions on the parent campaign cascade down to its media buys and packages:- Campaign pause halts every media buy and package.
- Campaign reactivate brings them back to
ACTIVE(post-flight if dates allow). - Creative manifest update re-syncs to every media buy that uses the format.
- Property list update propagates to packages without a full re-execute.
- Frequency caps on the campaign or advertiser are enforced across all media buys.
Failures and debug
When a media buy fails to execute — a publisher rejection or an ADCP error —POST /api/v2/buyer/campaigns/:id/execute returns structured errors[]:
debug: true on execute to include the full ADCP request, response, and A2A debug logs in each error entry.
Related concepts
Campaign
The parent media plan that spawns media buys at execution
Package
One per product per pacing period, beneath each media buy
Get media buy status
Poll live ADCP status across sales agents
Update campaign
The endpoint that reads and tunes media buys