Skip to main content
Core data structures used throughout AdCP.

Product

Represents available advertising inventory. JSON Schema: https://adcontextprotocol.org/schemas/v2/core/product.json

Media Buy

Represents a purchased advertising campaign. JSON Schema: https://adcontextprotocol.org/schemas/v2/core/media-buy.json

Package

A specific product within a media buy (line item). JSON Schema: https://adcontextprotocol.org/schemas/v2/core/package.json

Creative Asset

Uploaded creative content. JSON Schema: https://adcontextprotocol.org/schemas/v2/core/creative-asset.json

Creative Assignment

Assignment of a creative asset to a package. JSON Schema: https://adcontextprotocol.org/schemas/v2/core/creative-assignment.json

Targeting

Audience targeting criteria. JSON Schema: https://adcontextprotocol.org/schemas/v2/core/targeting.json

Protocol Response Format

Protocol-level response wrapper (MCP/A2A). JSON Schema: https://adcontextprotocol.org/schemas/v2/core/response.json
Note: context is set by the tool initiator on the request and must be carried back unchanged by agents in responses and webhooks. Note: Individual AdCP task schemas contain only the application-level data that goes in the data field of the protocol response. Task-specific errors are included within each task’s response schema, not at the protocol level.

Error

Standard error structure for task-specific errors and warnings. JSON Schema: https://adcontextprotocol.org/schemas/v2/core/error.json
Usage: Errors are included as optional arrays in individual task response schemas to handle partial success scenarios, validation failures, and operational warnings specific to each AdCP operation.

Common Enums

Additional Enum Schemas:

Schema Versioning

AdCP uses path-based versioning where the schema URL indicates the version, not individual fields in requests or responses.

Version in Schema Paths

The version is embedded in the schema URL path:
Single Source of Truth: The schema registry at /schemas/v2/index.json contains the current version number.

Version Format

AdCP uses semantic versioning:
  • Major (X.y.z): Breaking changes
  • Minor (x.Y.z): Backward-compatible additions
  • Patch (x.y.Z): Bug fixes and clarifications

Why Path-Based Versioning?

  • No redundancy: Version doesn’t need to be repeated in every request/response
  • Simpler maintenance: No need to update version fields in 30+ schema files
  • Clearer semantics: The schema you reference IS the version you use
  • Standard practice: Follows REST/HTTP conventions (version in path, not payload)

Version Negotiation

Client Behavior:
  • Reference the desired schema version in your implementation (e.g., /schemas/v2/)
  • The schema path you use determines the version you’re implementing
  • Check the schema registry’s adcp_version field to confirm compatibility
Server Behavior:
  • Implement the version indicated by the schema path
  • Support multiple versions simultaneously by serving different schema paths
  • Return errors that reference the appropriate schema version

Migration Strategy

Minor Version Updates (1.0.0 → 1.1.0):
  • Add optional fields or new tasks
  • Backward compatible - existing clients continue working
  • Clients can adopt new features at their own pace
Major Version Updates (1.0.0 → 2.0.0):
  • Breaking changes require client updates
  • Servers may support multiple major versions during transition
  • Migration guides provided for breaking changes

JSON Schema Best Practices

Discriminated Unions

AdCP schemas use discriminated unions for type safety. All discriminator fields include explicit type declarations for proper TypeScript code generation. Pattern:
Why this matters: Including "type": "string" before "const" enables TypeScript generators to produce proper literal types (e.g., Literal["platform"]) instead of Any, improving type safety and IDE autocomplete. Examples in AdCP schemas:
  • deployment.json: type: "platform" | "agent"
  • sub-asset.json: asset_kind: "media" | "text"
  • vast-asset.json: delivery_type: "url" | "inline"
  • preview-render.json: output_format: "url" | "html" | "both"

JSON Schema Registry

View all available schemas: https://adcontextprotocol.org/schemas/v2/index.json