Documentation Index
Fetch the complete documentation index at: https://docs.adcontextprotocol.org/llms.txt
Use this file to discover all available pages before exploring further.
Migrating to media_buy_status (3.1)
AdCP 3.1 splits two enums that 3.0 collided at the same response root key:
- Envelope
statusβ TaskStatus (submitted/working/input-required/completed/canceled/failed/rejected/auth-required/unknown). Required from beta.2 (#4876). - Body
media_buy_statusβ MediaBuyStatus (pending_creatives/pending_start/active/paused/completed/rejected/canceled). New in 3.1.
status; the body-level MediaBuyStatus was silently destroyed when the envelope stamped a TaskStatus at the same path. No validator caught it. 3.1 splits them.
What changed
| Surface | 3.0 | 3.1 |
|---|---|---|
create_media_buy success response | status (MediaBuyStatus) at root | media_buy_status (MediaBuyStatus) at root; legacy status is deprecated: true |
update_media_buy success response | Same | Same |
get_media_buys items | media_buys[].status (MediaBuyStatus) | Unchanged in 3.1 β renamed to media_buys[].media_buy_status in 4.0 (#4905) |
get_media_buy_delivery items | media_buy_deliveries[].status (MediaBuyStatus) | Unchanged in 3.1 β renamed in 4.0 (#4905) |
core/media-buy.json | status (MediaBuyStatus) | Unchanged in 3.1 β renamed in 4.0 (#4905) |
Before (3.0)
status collide at the JSON root under MCP flat serialization β the body-level MediaBuyStatus: 'active' value is silently destroyed by the envelope TaskStatus: 'completed'. No validator catches it.
After (3.1)
status carries the task-lifecycle state at the root; body media_buy_status carries the buyβs lifecycle state alongside.
3.1 conformance
- Sellers SHOULD emit
media_buy_statusoncreate_media_buyandupdate_media_buysuccess responses. MAY continue emitting the deprecated top-levelstatus: MediaBuyStatusduring the 3.1 deprecation window. - Buyers MUST prefer
media_buy_statuswhen present. MAY fall back to legacystatusfor compatibility with sellers still on the legacy form. - 3.0 sellers and buyers continue to work unchanged. No
required[]swap, no rename, no breakage. - Compliance storyboards assert
path: "media_buy_status". A 3.1 seller emitting only the legacystatusis schema-valid but fails 3.1 storyboard certification. The storyboard is the binding conformance check; the schemadeprecated: truemarker is advisory. - Sellers emitting both fields MUST emit identical values for
media_buy_statusand the deprecatedstatus. Divergent emission (e.g.,status: "active", media_buy_status: "paused") passes JSON Schema validation but is a conformance violation β 3.1 storyboards enforce equality viafield_value_or_absentassertions onstatusalongside the canonicalmedia_buy_statuschecks. Theif/thenJSON Schema constraint was evaluated and deferred: the migration window is short, codegen toolchain compat is uncertain, and the storyboard gate is sufficient. See #4908.
SDK behavior
The legacystatus field carries deprecated: true (JSON Schema 2020-12). Propagation through codegen varies:
| Toolchain | Propagation |
|---|---|
TypeScript (json-schema-to-typescript) | @deprecated JSDoc on the field. Reliable. |
Python (datamodel-code-generator v2+) | deprecated=True on the Field(...) arg. Older pinned versions silently drop it. |
Go (quicktype and similar) | Generally not propagated. |
@adcp/client 3.1+, Python adcp SDK, adcp-go | Canonical media_buy_status is the typed shape SDK users consume. |
When the legacy field disappears
- 3.2 (#4906): the deprecated top-level
status: MediaBuyStatusis removed fromCreateMediaBuySuccessandUpdateMediaBuySuccess. After 3.2, top-levelstatuson these responses unambiguously carries envelope TaskStatus only. The deprecation window is short by design β the storyboard gate already forces 3.1-conformant sellers off the legacy field. - 4.0 (#4905): the nested
statuscascade lands βmedia_buys[].statusonget-media-buys-response,media_buy_deliveries[].statusonget-media-buy-delivery-response, andstatusoncore/media-buy.jsonrename tomedia_buy_status. Genuinely breaking (arequired[]swap), held to the major.
Forward-compatible buyer code
Code that needs to span 3.0, 3.1, and 4.0 sellers:Related
- create_media_buy reference β canonical response examples
- Media buy lifecycle β the MediaBuyStatus state machine
- Envelope task-status β TaskStatus semantics