Module adcp.types.protocol

AdCP protocol types — curated partial surface.

Cross-cutting protocol types — request / response envelopes, errors, pagination, task status, capabilities, and webhook challenge handshakes.

A stable, narrow alternative to importing the whole :mod:adcp.types namespace. Every name here is also exported from :mod:adcp.types; this module simply groups the ones a protocol integration reaches for, and never exposes the internal generated layer.

This module is for curation and discoverability, not a separate performance tier: importing it is cheap, but the first access to any AdCP type (here or via :mod:adcp.types / :mod:adcp) realizes the full generated Pydantic graph — there is no per-domain graph. Use it for a smaller, focused import surface.

from adcp.types.protocol import Request

Classes

class AdcpProtocol (*args, **kwds)
Expand source code
class AdcpProtocol(StrEnum):
    media_buy = 'media-buy'
    signals = 'signals'
    governance = 'governance'
    creative = 'creative'
    brand = 'brand'
    sponsored_intelligence = 'sponsored-intelligence'
    measurement = 'measurement'

Enum where members are also (and must be) strings

Ancestors

  • enum.StrEnum
  • builtins.str
  • enum.ReprEnum
  • enum.Enum

Class variables

var brand
var creative
var governance
var measurement
var media_buy
var signals
var sponsored_intelligence
class Authentication (**data: Any)
Expand source code
class Authentication(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    schemes: Annotated[list[auth_scheme.AuthenticationScheme], Field(max_length=1, min_length=1)]
    credentials: Annotated[
        str, Field(description='Authentication credential (e.g., Bearer token).', min_length=32)
    ]

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var credentials : str
var model_config
var schemes : list[adcp.types.generated_poc.enums.auth_scheme.AuthenticationScheme]

Inherited members

class AuthenticationScheme (*args, **kwds)
Expand source code
class AuthenticationScheme(StrEnum):
    Bearer = 'Bearer'
    HMAC_SHA256 = 'HMAC-SHA256'

Enum where members are also (and must be) strings

Ancestors

  • enum.StrEnum
  • builtins.str
  • enum.ReprEnum
  • enum.Enum

Class variables

var Bearer
var HMAC_SHA256
class AuthorizationRequiredDetails (**data: Any)
Expand source code
class AuthorizationRequiredDetails(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    required_connections: Annotated[
        list[downstream_connection_requirement.DownstreamConnectionRequirement] | None,
        Field(
            description='Complete set of downstream connections known to be required for the relevant product, format, or request.'
        ),
    ] = None
    missing_connections: Annotated[
        list[downstream_connection_requirement.DownstreamConnectionRequirement] | None,
        Field(
            description='Subset of downstream connections that blocked the current request. Sellers SHOULD populate this array when the caller needs to route a human through a connections flow. Entries with `status` of `missing`, `pending`, `expired`, or `revoked` MUST include either `provider` or `authorization_url` so the buyer can route the remediation unambiguously.'
        ),
    ] = None
    authorization_url: Annotated[
        AnyUrl | None,
        Field(
            description='General recovery URL when there is a single obvious authorization step or when the seller has its own connection-management page.'
        ),
    ] = None
    authorization_instructions: Annotated[
        str | None,
        Field(
            description='Human-readable recovery instructions. Use `missing_connections[].authorization_instructions` when instructions differ per downstream connection.'
        ),
    ] = None
    reference_authorization: Annotated[
        dict[str, Any] | None,
        Field(
            description='Legacy or provider-specific authorization hint for the referenced object. Prefer `missing_connections[]` for new implementations.'
        ),
    ] = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var authorization_instructions : str | None
var authorization_url : pydantic.networks.AnyUrl | None
var missing_connections : list[adcp.types.generated_poc.core.downstream_connection_requirement.DownstreamConnectionRequirement] | None
var model_config
var reference_authorization : dict[str, typing.Any] | None
var required_connections : list[adcp.types.generated_poc.core.downstream_connection_requirement.DownstreamConnectionRequirement] | None

Inherited members

class ContextObject (**data: Any)
Expand source code
class ContextObject(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var model_config

Inherited members

class Error (**data: Any)
Expand source code
class Error(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    code: Annotated[
        str,
        Field(
            description='Error code for programmatic handling. The error-code vocabulary is open: `error.code` is wire-typed `string` (not a closed enum), the standard codes published in `enums/error-code.json` are documentary, and senders MAY emit codes outside that set (platform-specific codes, or codes introduced in a later AdCP version). Receivers MUST decode unknown codes — treat the response as well-formed, read `error.recovery` for the recovery classification, and fall back to `transient` when `recovery` is absent. See `error-handling.mdx#forward-compatible-decoding-normative` for the full forward-compat contract — this rule is what lets future maintenance lines ship new codes additively.',
            max_length=64,
            min_length=1,
        ),
    ]
    message: Annotated[str, Field(description='Human-readable error message')]
    field: Annotated[
        str | None,
        Field(
            description="Field path associated with the error in JSONPath-lite format (e.g., 'packages[0].targeting'). When `issues[]` is also present, sellers MUST set this to `issues[0].pointer` translated from RFC 6901 to JSONPath-lite (e.g., '/packages/0/targeting' → 'packages[0].targeting') so pre-3.1 consumers reading `field` only get deterministic behavior. Will be deprecated in a future major version in favor of `issues[].pointer`."
        ),
    ] = None
    suggestion: Annotated[str | None, Field(description='Suggested fix for the error')] = None
    retry_after: Annotated[
        float | None,
        Field(
            description='Seconds to wait before retrying the operation. Sellers MUST return values between 1 and 3600. Clients MUST clamp values outside this range.',
            ge=1.0,
            le=3600.0,
        ),
    ] = None
    issues: Annotated[
        list[Issue] | None,
        Field(
            description='Structured list of validation failures. Primary use is `VALIDATION_ERROR`, where multi-field rejections are common and `field` (singular) cannot carry the full pointer map. MAY appear on other error codes that reject multiple fields at once. When `issues` is present, sellers MUST also populate `field` from `issues[0]` for backward compatibility with pre-3.1 consumers that read `field` only — translating the RFC 6901 `pointer` format to the JSONPath-lite format `field` uses (e.g., `/packages/0/targeting` → `packages[0].targeting`). MUST (not SHOULD) so consumers reading `field` get deterministic behavior across sellers — the cost is one line of dual-write per seller; the cost of SHOULD is a long tail of seller-A-vs-seller-B inconsistency. Future major versions will deprecate `field` in favor of `issues[].pointer`.'
        ),
    ] = None
    details: Annotated[
        dict[str, Any] | None,
        Field(
            description='Additional task-specific error details. Sellers MAY mirror `issues[]` here as `details.issues` for backward compatibility with pre-3.1 consumers reading from `details`; new consumers SHOULD prefer the top-level `issues` field.\n\n**Canonical rejection-set shape (3.1+).** When the error reports a rejected value against a closed set of accepted values (e.g., enum mismatch, unsupported pricing option, invalid signal id), sellers SHOULD use the canonical key `accepted_values: <array>` under `details` rather than seller-specific variants observed in the wild (`available`, `allowed`, `accepted_values` at the error root, etc.). The canonical shape:\n\n```json\n{\n  "code": "INVALID_PRICING_MODEL",\n  "message": "Pricing option not found: po_prism_abandoner_cpm",\n  "field": "pricing_option_id",\n  "details": {\n    "rejected_value": "po_prism_abandoner_cpm",\n    "accepted_values": ["po_prism_cart_cpm", "po_prism_view_cpm"]\n  }\n}\n```\n\n- `rejected_value` (optional): the offending value the buyer supplied, echoed for buyer-side diagnostic clarity (especially when the offending field is nested or transformed before validation).\n- `accepted_values` (optional): the closed set the seller would have accepted at this field on this call. Sellers MUST NOT enumerate the full ecosystem-wide accepted set if it differs from what\'s accepted for *this caller in this context* (account, brand, scope) — leaking ecosystem-wide accepted sets to a per-caller rejection turns the error into an enumeration oracle.\n\nThis is **SHOULD-level guidance**, not MUST: `details` remains `additionalProperties: true` and pre-3.1 sellers using `available` / `allowed` / `accepted_values` at the error root remain conformant. The canonical shape lets buyer-side diagnostic tooling (SDK runner hints, dashboards, error classifiers) reliably surface the accepted-set without per-seller pattern matching. SDKs SHOULD accept any of the legacy variants and normalize on read; the canonical shape is what new sellers and 3.1+ adopters should emit going forward.'
        ),
    ] = None
    recovery: Annotated[
        Recovery | None,
        Field(
            description='Agent recovery classification. transient: retry after delay (rate limit, service unavailable, timeout). correctable: fix the request and resend (invalid field, budget too low, creative rejected). terminal: requires human action (account suspended, payment required, account not found). Senders SHOULD populate `recovery` on every error from 3.1 onward — it is the normative carrier of recovery semantics across version skew. A receiver that does not recognize `error.code` (a newer code, or a platform-specific code) MUST still be able to classify the error from `recovery`. The `enumMetadata.recovery` block in `enums/error-code.json` is the documentary mirror for known codes; `error.recovery` on the wire is authoritative.'
        ),
    ] = None
    source: Annotated[
        Source | None,
        Field(
            description='Who emitted this error entry. `producer` (default when absent): emitted by the response\'s authoring agent (the seller for `get_products`, the creative agent for `build_creative`, etc.). `sdk`: augmented by a consuming SDK that detected a non-fatal advisory condition on consumption (e.g., `FORMAT_PROJECTION_FAILED` when the buyer SDK couldn\'t project a v1 format to a canonical, or `FORMAT_DECLARATION_DIVERGENT` when the SDK detected a producer bug on read). SDK-augmented entries SHOULD also set `sdk_id` so downstream consumers can identify which intermediate processor inserted the entry.\n\n**Multi-hop propagation (normative).** AdCP is a federated agent network — responses commonly traverse multiple SDKs (e.g., sales agent → interchange → DSP → buyer). When an SDK augments `errors[]` with a consumption-detected entry, the augmented response carries the entry forward to subsequent hops. Each hop that detects the same condition independently SHOULD deduplicate by `(code, field)` rather than re-emit; the existing entry\'s `sdk_id` identifies which earlier processor saw it first. Producer entries (those without `source: "sdk"`) are authoritative for what the response\'s authoring agent self-detected; SDK entries are observations made on top.\n\n**Replay/audit safety.** Persisted or replayed responses carry `source` and `sdk_id` so the audit trail can distinguish seller-emitted entries from SDK-augmented ones. Without `source`, a downstream consumer can\'t tell whether a code came from the seller or an intermediate SDK, which corrupts attribution.'
        ),
    ] = None
    sdk_id: Annotated[
        str | None,
        Field(
            description='Optional identifier for the SDK that augmented this error entry. Format: `<sdk_package_name>@<version>` (e.g., `@adcontextprotocol/adcp@7.3.0`, `adcontextprotocol-adcp-python@1.2.0`). MUST be set when `source: "sdk"`; MUST be absent when `source: "producer"` or absent. Lets downstream consumers identify which intermediate processor inserted the entry, useful for debugging cross-SDK divergence (e.g., one SDK detects a projection failure that another SDK\'s registry version doesn\'t).'
        ),
    ] = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var code : str
var details : dict[str, typing.Any] | None
var field : str | None
var issues : list[adcp.types.generated_poc.core.error.Issue] | None
var message : str
var model_config
var recovery : adcp.types.generated_poc.core.error.Recovery | None
var retry_after : float | None
var sdk_id : str | None
var source : adcp.types.generated_poc.core.error.Source | None
var suggestion : str | None

Inherited members

class ErrorCode (*args, **kwds)
Expand source code
class ErrorCode(StrEnum):
    INVALID_REQUEST = 'INVALID_REQUEST'
    AUTH_REQUIRED = 'AUTH_REQUIRED'
    AUTH_MISSING = 'AUTH_MISSING'
    AUTH_INVALID = 'AUTH_INVALID'
    AUTHORIZATION_REQUIRED = 'AUTHORIZATION_REQUIRED'
    RATE_LIMITED = 'RATE_LIMITED'
    SERVICE_UNAVAILABLE = 'SERVICE_UNAVAILABLE'
    CONFIGURATION_ERROR = 'CONFIGURATION_ERROR'
    POLICY_VIOLATION = 'POLICY_VIOLATION'
    PRODUCT_NOT_FOUND = 'PRODUCT_NOT_FOUND'
    PRODUCT_UNAVAILABLE = 'PRODUCT_UNAVAILABLE'
    PROPOSAL_EXPIRED = 'PROPOSAL_EXPIRED'
    BUDGET_TOO_LOW = 'BUDGET_TOO_LOW'
    CREATIVE_REJECTED = 'CREATIVE_REJECTED'
    CREATIVE_VALUE_NOT_ALLOWED = 'CREATIVE_VALUE_NOT_ALLOWED'
    UNSUPPORTED_FEATURE = 'UNSUPPORTED_FEATURE'
    UNPRICEABLE_OUTPUT = 'UNPRICEABLE_OUTPUT'
    UNSUPPORTED_GRANULARITY = 'UNSUPPORTED_GRANULARITY'
    UNSUPPORTED_PROVISIONING = 'UNSUPPORTED_PROVISIONING'
    AUDIENCE_TOO_SMALL = 'AUDIENCE_TOO_SMALL'
    ACCOUNT_NOT_FOUND = 'ACCOUNT_NOT_FOUND'
    ACCOUNT_SETUP_REQUIRED = 'ACCOUNT_SETUP_REQUIRED'
    ACCOUNT_AMBIGUOUS = 'ACCOUNT_AMBIGUOUS'
    ACCOUNT_PAYMENT_REQUIRED = 'ACCOUNT_PAYMENT_REQUIRED'
    ACCOUNT_SUSPENDED = 'ACCOUNT_SUSPENDED'
    COMPLIANCE_UNSATISFIED = 'COMPLIANCE_UNSATISFIED'
    GOVERNANCE_DENIED = 'GOVERNANCE_DENIED'
    BUDGET_EXHAUSTED = 'BUDGET_EXHAUSTED'
    BUDGET_EXCEEDED = 'BUDGET_EXCEEDED'
    BUDGET_CAP_REACHED = 'BUDGET_CAP_REACHED'
    CONFLICT = 'CONFLICT'
    IDEMPOTENCY_CONFLICT = 'IDEMPOTENCY_CONFLICT'
    IDEMPOTENCY_EXPIRED = 'IDEMPOTENCY_EXPIRED'
    IDEMPOTENCY_IN_FLIGHT = 'IDEMPOTENCY_IN_FLIGHT'
    CREATIVE_DEADLINE_EXCEEDED = 'CREATIVE_DEADLINE_EXCEEDED'
    CREATIVE_INACCESSIBLE = 'CREATIVE_INACCESSIBLE'
    INVALID_STATE = 'INVALID_STATE'
    MEDIA_BUY_NOT_FOUND = 'MEDIA_BUY_NOT_FOUND'
    NOT_CANCELLABLE = 'NOT_CANCELLABLE'
    PACKAGE_NOT_FOUND = 'PACKAGE_NOT_FOUND'
    CREATIVE_NOT_FOUND = 'CREATIVE_NOT_FOUND'
    SIGNAL_NOT_FOUND = 'SIGNAL_NOT_FOUND'
    SIGNAL_TARGETING_INCOMPATIBLE = 'SIGNAL_TARGETING_INCOMPATIBLE'
    SESSION_NOT_FOUND = 'SESSION_NOT_FOUND'
    PLAN_NOT_FOUND = 'PLAN_NOT_FOUND'
    REFERENCE_NOT_FOUND = 'REFERENCE_NOT_FOUND'
    SESSION_TERMINATED = 'SESSION_TERMINATED'
    VALIDATION_ERROR = 'VALIDATION_ERROR'
    PRODUCT_EXPIRED = 'PRODUCT_EXPIRED'
    PROPOSAL_NOT_COMMITTED = 'PROPOSAL_NOT_COMMITTED'
    PROPOSAL_NOT_FOUND = 'PROPOSAL_NOT_FOUND'
    MULTI_FINALIZE_UNSUPPORTED = 'MULTI_FINALIZE_UNSUPPORTED'
    IO_REQUIRED = 'IO_REQUIRED'
    TERMS_REJECTED = 'TERMS_REJECTED'
    REQUOTE_REQUIRED = 'REQUOTE_REQUIRED'
    VERSION_UNSUPPORTED = 'VERSION_UNSUPPORTED'
    CAMPAIGN_SUSPENDED = 'CAMPAIGN_SUSPENDED'
    GOVERNANCE_UNAVAILABLE = 'GOVERNANCE_UNAVAILABLE'
    PERMISSION_DENIED = 'PERMISSION_DENIED'
    SCOPE_INSUFFICIENT = 'SCOPE_INSUFFICIENT'
    READ_ONLY_SCOPE = 'READ_ONLY_SCOPE'
    FIELD_NOT_PERMITTED = 'FIELD_NOT_PERMITTED'
    PROVENANCE_REQUIRED = 'PROVENANCE_REQUIRED'
    PROVENANCE_DIGITAL_SOURCE_TYPE_MISSING = 'PROVENANCE_DIGITAL_SOURCE_TYPE_MISSING'
    PROVENANCE_DISCLOSURE_MISSING = 'PROVENANCE_DISCLOSURE_MISSING'
    PROVENANCE_EMBEDDED_MISSING = 'PROVENANCE_EMBEDDED_MISSING'
    PROVENANCE_VERIFIER_NOT_ACCEPTED = 'PROVENANCE_VERIFIER_NOT_ACCEPTED'
    PROVENANCE_CLAIM_CONTRADICTED = 'PROVENANCE_CLAIM_CONTRADICTED'
    EVALUATOR_AGENT_NOT_ACCEPTED = 'EVALUATOR_AGENT_NOT_ACCEPTED'
    BILLING_NOT_SUPPORTED = 'BILLING_NOT_SUPPORTED'
    BILLING_NOT_PERMITTED_FOR_AGENT = 'BILLING_NOT_PERMITTED_FOR_AGENT'
    BILLING_OUT_OF_BAND = 'BILLING_OUT_OF_BAND'
    PAYMENT_TERMS_NOT_SUPPORTED = 'PAYMENT_TERMS_NOT_SUPPORTED'
    BRAND_REQUIRED = 'BRAND_REQUIRED'
    AGENT_SUSPENDED = 'AGENT_SUSPENDED'
    AGENT_BLOCKED = 'AGENT_BLOCKED'
    CREDENTIAL_IN_ARGS = 'CREDENTIAL_IN_ARGS'
    ACTION_NOT_ALLOWED = 'ACTION_NOT_ALLOWED'
    PRIVATE_FIELD_IN_PUBLIC_PLACEMENT = 'PRIVATE_FIELD_IN_PUBLIC_PLACEMENT'
    FORMAT_PROJECTION_FAILED = 'FORMAT_PROJECTION_FAILED'
    FORMAT_DECLARATION_DIVERGENT = 'FORMAT_DECLARATION_DIVERGENT'
    FORMAT_DECLARATION_V1_AMBIGUOUS = 'FORMAT_DECLARATION_V1_AMBIGUOUS'
    FORMAT_OPTION_UNRESOLVED = 'FORMAT_OPTION_UNRESOLVED'
    FORMAT_DECLARATION_V1_LOSSY_MULTI_SIZE = 'FORMAT_DECLARATION_V1_LOSSY_MULTI_SIZE'
    FORMAT_NOT_SUPPORTED = 'FORMAT_NOT_SUPPORTED'
    PIXEL_TRACKER_LOSSY_DOWNGRADE = 'PIXEL_TRACKER_LOSSY_DOWNGRADE'
    PIXEL_TRACKER_UPGRADE_INFERRED = 'PIXEL_TRACKER_UPGRADE_INFERRED'
    STALE_RESPONSE = 'STALE_RESPONSE'
    FEED_FETCH_FAILED = 'FEED_FETCH_FAILED'
    INVALID_FEED_FORMAT = 'INVALID_FEED_FORMAT'
    ITEM_VALIDATION_FAILED = 'ITEM_VALIDATION_FAILED'
    CATALOG_LIMIT_EXCEEDED = 'CATALOG_LIMIT_EXCEEDED'

Enum where members are also (and must be) strings

Ancestors

  • enum.StrEnum
  • builtins.str
  • enum.ReprEnum
  • enum.Enum

Class variables

var ACCOUNT_AMBIGUOUS
var ACCOUNT_NOT_FOUND
var ACCOUNT_PAYMENT_REQUIRED
var ACCOUNT_SETUP_REQUIRED
var ACCOUNT_SUSPENDED
var ACTION_NOT_ALLOWED
var AGENT_BLOCKED
var AGENT_SUSPENDED
var AUDIENCE_TOO_SMALL
var AUTHORIZATION_REQUIRED
var AUTH_INVALID
var AUTH_MISSING
var AUTH_REQUIRED
var BILLING_NOT_PERMITTED_FOR_AGENT
var BILLING_NOT_SUPPORTED
var BILLING_OUT_OF_BAND
var BRAND_REQUIRED
var BUDGET_CAP_REACHED
var BUDGET_EXCEEDED
var BUDGET_EXHAUSTED
var BUDGET_TOO_LOW
var CAMPAIGN_SUSPENDED
var CATALOG_LIMIT_EXCEEDED
var COMPLIANCE_UNSATISFIED
var CONFIGURATION_ERROR
var CONFLICT
var CREATIVE_DEADLINE_EXCEEDED
var CREATIVE_INACCESSIBLE
var CREATIVE_NOT_FOUND
var CREATIVE_REJECTED
var CREATIVE_VALUE_NOT_ALLOWED
var CREDENTIAL_IN_ARGS
var EVALUATOR_AGENT_NOT_ACCEPTED
var FEED_FETCH_FAILED
var FIELD_NOT_PERMITTED
var FORMAT_DECLARATION_DIVERGENT
var FORMAT_DECLARATION_V1_AMBIGUOUS
var FORMAT_DECLARATION_V1_LOSSY_MULTI_SIZE
var FORMAT_NOT_SUPPORTED
var FORMAT_OPTION_UNRESOLVED
var FORMAT_PROJECTION_FAILED
var GOVERNANCE_DENIED
var GOVERNANCE_UNAVAILABLE
var IDEMPOTENCY_CONFLICT
var IDEMPOTENCY_EXPIRED
var IDEMPOTENCY_IN_FLIGHT
var INVALID_FEED_FORMAT
var INVALID_REQUEST
var INVALID_STATE
var IO_REQUIRED
var ITEM_VALIDATION_FAILED
var MEDIA_BUY_NOT_FOUND
var MULTI_FINALIZE_UNSUPPORTED
var NOT_CANCELLABLE
var PACKAGE_NOT_FOUND
var PAYMENT_TERMS_NOT_SUPPORTED
var PERMISSION_DENIED
var PIXEL_TRACKER_LOSSY_DOWNGRADE
var PIXEL_TRACKER_UPGRADE_INFERRED
var PLAN_NOT_FOUND
var POLICY_VIOLATION
var PRIVATE_FIELD_IN_PUBLIC_PLACEMENT
var PRODUCT_EXPIRED
var PRODUCT_NOT_FOUND
var PRODUCT_UNAVAILABLE
var PROPOSAL_EXPIRED
var PROPOSAL_NOT_COMMITTED
var PROPOSAL_NOT_FOUND
var PROVENANCE_CLAIM_CONTRADICTED
var PROVENANCE_DIGITAL_SOURCE_TYPE_MISSING
var PROVENANCE_DISCLOSURE_MISSING
var PROVENANCE_EMBEDDED_MISSING
var PROVENANCE_REQUIRED
var PROVENANCE_VERIFIER_NOT_ACCEPTED
var RATE_LIMITED
var READ_ONLY_SCOPE
var REFERENCE_NOT_FOUND
var REQUOTE_REQUIRED
var SCOPE_INSUFFICIENT
var SERVICE_UNAVAILABLE
var SESSION_NOT_FOUND
var SESSION_TERMINATED
var SIGNAL_NOT_FOUND
var SIGNAL_TARGETING_INCOMPATIBLE
var STALE_RESPONSE
var TERMS_REJECTED
var UNPRICEABLE_OUTPUT
var UNSUPPORTED_FEATURE
var UNSUPPORTED_GRANULARITY
var UNSUPPORTED_PROVISIONING
var VALIDATION_ERROR
var VERSION_UNSUPPORTED
class ExtensionObject (**data: Any)
Expand source code
class ExtensionObject(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var model_config

Inherited members

class GetAdcpCapabilitiesRequest (**data: Any)
Expand source code
class GetAdcpCapabilitiesRequest(AdcpVersionEnvelope):
    model_config = ConfigDict(
        extra='allow',
    )
    protocols: Annotated[
        list[Protocol] | None,
        Field(
            description='Specific protocols to query capabilities for. If omitted, returns capabilities for all supported protocols.',
            min_length=1,
        ),
    ] = None
    context: context_1.ContextObject | None = None
    ext: ext_1.ExtensionObject | None = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

  • adcp.types.generated_poc.core.version_envelope.AdcpVersionEnvelope
  • AdCPBaseModel
  • pydantic.main.BaseModel

Class variables

var context : adcp.types.generated_poc.core.context.ContextObject | None
var ext : adcp.types.generated_poc.core.ext.ExtensionObject | None
var model_config
var protocols : list[adcp.types.generated_poc.protocol.get_adcp_capabilities_request.Protocol] | None

Inherited members

class GetAdcpCapabilitiesResponse (**data: Any)
Expand source code
class GetAdcpCapabilitiesResponse(AdcpVersionEnvelope, ProtocolEnvelope):
    model_config = ConfigDict(
        extra='allow',
    )
    adcp: Annotated[Adcp, Field(description='Core AdCP protocol information')]
    supported_protocols: Annotated[
        list[SupportedProtocol],
        Field(
            description='AdCP protocols this agent supports. Stable values both (a) declare which tools the agent implements and (b) commit the agent to pass the baseline compliance storyboard at /compliance/{version}/protocols/{protocol}/ (with snake_case → kebab-case path mapping, e.g. media_buy → /compliance/.../protocols/media-buy/). The `measurement` protocol is experimental in 3.1 and currently scoped to `get_adcp_capabilities` catalog discovery; agents implementing it MUST also list `measurement.core` in `experimental_features`. Additional measurement tasks (reporting, attribution, etc.) and a baseline storyboard land in subsequent minors. Compliance testing support is declared separately via the `compliance_testing` capability block (below), not as a protocol claim.',
            min_length=1,
        ),
    ]
    account: Annotated[
        Account | None,
        Field(
            description='Account management capabilities. Describes how accounts are established, what billing models are supported, and whether an account is required before browsing products.'
        ),
    ] = None
    media_buy: Annotated[
        MediaBuy | None,
        Field(
            description='Media-buy protocol capabilities. Expected when media_buy is in supported_protocols. Sellers declaring media_buy should also include account with supported_billing.'
        ),
    ] = None
    signals: Annotated[
        Signals | None,
        Field(
            description='Signals protocol capabilities. Only present if signals is in supported_protocols.'
        ),
    ] = None
    governance: Annotated[
        Governance | None,
        Field(
            description='Governance protocol capabilities. Only present if governance is in supported_protocols. Governance agents provide property and creative data like compliance scores, brand safety ratings, sustainability metrics, and creative quality assessments.'
        ),
    ] = None
    sponsored_intelligence: Annotated[
        SponsoredIntelligence | None,
        Field(
            description='Sponsored Intelligence protocol capabilities. Only present if sponsored_intelligence is in supported_protocols. SI agents handle conversational brand experiences.'
        ),
    ] = None
    brand: Annotated[
        Brand | None,
        Field(
            description='Brand protocol capabilities. Only present if brand is in supported_protocols. Brand agents provide identity data (logos, colors, tone, assets) and optionally rights clearance for licensable content (talent, music, stock media).'
        ),
    ] = None
    creative: Annotated[
        Creative | None,
        Field(
            description='Creative protocol capabilities. Only present if creative is in supported_protocols.'
        ),
    ] = None
    request_signing: Annotated[
        RequestSigning | None,
        Field(
            description='RFC 9421 HTTP Signatures support for incoming requests. Optional in 3.0 — capability-advertised so counterparties can opt into signing selectively. Required for spend-committing operations in 4.0 (the next breaking-changes accumulation window). The full profile is defined in docs/building/implementation/security.mdx (Signed Requests (Transport Layer)).'
        ),
    ] = None
    webhook_signing: Annotated[
        WebhookSigning | None,
        Field(
            description='RFC 9421 webhook-signature support for outbound webhook callbacks (top-level peer of request_signing). Declares which AdCP webhook-signing profile version and algorithms this agent produces on delivery, and whether it supports the legacy HMAC-SHA256 fallback for receivers that have not yet adopted RFC 9421. See docs/building/implementation/webhooks.mdx.'
        ),
    ] = None
    identity: Annotated[
        Identity | None,
        Field(
            description='Operator identity posture — trust-root pointer (`brand_json_url`) plus key-scoping and compromise-response controls the agent operates. `brand_json_url` is **load-bearing** for signature verification: when the agent declares any signing posture (`request_signing.supported_for`/`required_for` non-empty, `webhook_signing.supported === true`, or any `key_origins` subfield), `brand_json_url` MUST be present (storyboard-enforced in 3.x; schema-required in 4.0). Verifiers use it to bootstrap from the agent URL to the operator\'s brand.json (and from there to signing keys); see [security.mdx §Discovering an agent\'s signing keys](https://adcontextprotocol.org/docs/building/by-layer/L1/security#discovering-an-agents-signing-keys-via-brand_json_url). The remaining fields (`per_principal_key_isolation`, `key_origins`, `compromise_notification`) are advisory and receivers use them to reason about blast radius and revocation latency at onboarding. Empty-object semantics: `identity: {}` means "posture block present but no posture claimed" — schema-valid but advisory-neutral and receivers MUST treat it as equivalent to omitting the block, **except** that an agent declaring a signing posture elsewhere in the response with an empty `identity` MUST be rejected by storyboard runners as missing `brand_json_url`.'
        ),
    ] = None
    measurement: Annotated[
        Measurement | None,
        Field(
            description="Experimental measurement capability block. Presence indicates this agent computes one or more quantitative metrics about ad delivery, exposure, or effect, and is willing to be discovered as a measurement vendor. Agents implementing this block MUST list `measurement.core` in experimental_features. Returns metric definitions (this surface), not pricing/coverage (negotiated via `measurement_terms` on `create_media_buy`) or live values (returned per buy via `vendor_metric_values`). AAO crawls each measurement agent's `metrics[]` on a TTL to populate the federated cross-vendor index. Same self-describing pattern as `governance.property_features[]`: agents own the catalog; the registry aggregates."
        ),
    ] = None
    compliance_testing: Annotated[
        ComplianceTesting | None,
        Field(
            description="Compliance testing capabilities. The presence of this block declares that the agent supports deterministic testing via comply_test_controller for lifecycle state machine validation. Omit the block entirely if the agent does not support compliance testing. Sellers SHOULD list every canonical controller scenario they implement so buyers and runners can distinguish full deterministic coverage from partial coverage without probing each scenario one by one; the runtime source of truth remains comply_test_controller with scenario: 'list_scenarios'."
        ),
    ] = None
    specialisms: Annotated[
        list[specialism.AdcpSpecialism] | None,
        Field(
            description="Optional — specialized compliance claims this agent supports. Values MUST be kebab-case enum IDs (e.g., 'creative-generative', 'sales-non-guaranteed'). An agent that implements a specialism's tools but omits its ID from this array will receive 'No applicable tracks found' from the compliance runner — tracks for that specialism are not evaluated even if every tool works. Omitting the field means the agent declares no specialism claims (it still passes the universal + domain-baseline storyboards implied by supported_protocols). Each specialism maps to a storyboard bundle at /compliance/{version}/specialisms/{id}/ that the AAO compliance runner executes to verify the claim. Each specialism rolls up to one of the protocols in supported_protocols — the runner rejects a specialism claim whose parent protocol is missing. Only list specialisms your agent actually implements — the AAO Verified badge enumerates which specialisms were demonstrably passed."
        ),
    ] = None
    extensions_supported: Annotated[
        list[ExtensionsSupportedItem] | None,
        Field(
            description='Extension namespaces this agent supports. Buyers can expect meaningful data in ext.{namespace} fields on responses from this agent. Extension schemas are published in the AdCP extension registry.'
        ),
    ] = None
    experimental_features: Annotated[
        list[ExperimentalFeature] | None,
        Field(
            description='Experimental AdCP surfaces this agent implements. A surface is experimental when its schema carries x-status: experimental and the working group has not yet frozen it. Sellers that implement any experimental surface MUST list its feature id here. Buyers inspect this array before relying on experimental surfaces — a seller that does not list a surface is asserting it does not implement it. Experimental surfaces MAY break between any two 3.x releases with at least 6 weeks notice; the full contract is in docs/reference/experimental-status.'
        ),
    ] = None
    wholesale_feed_versioning: Annotated[
        WholesaleFeedVersioning | None,
        Field(
            description="Conditional-fetch token capabilities for get_products and get_signals. Independent of wholesale feed webhooks: an agent MAY support cheap version probes via if_wholesale_feed_version without pushing change payloads (and vice versa). When supported is true, the agent returns wholesale_feed_version on every get_products / get_signals response and honors if_wholesale_feed_version on subsequent requests. When absent or supported is false, callers MAY still send if_wholesale_feed_version — pre-3.1 agents that ignore it just return the full payload (correct, just inefficient). Pre-flight declaration here lets buyers fast-path which agents to bother caching versions for. See get_products / get_signals 'Wholesale feed versioning' sections."
        ),
    ] = None
    last_updated: Annotated[
        AwareDatetime | None,
        Field(
            description='ISO 8601 timestamp of when capabilities were last updated. Buyers can use this for cache invalidation.'
        ),
    ] = None
    errors: Annotated[
        list[error.Error] | None, Field(description='Task-specific errors and warnings')
    ] = None
    context: context_1.ContextObject | None = None
    ext: ext_1.ExtensionObject | None = None
    wholesale_feed_webhooks: Annotated[
        WholesaleFeedWebhooks | None,
        Field(
            description='Per-agent wholesale product-feed and wholesale signals-feed webhook capabilities. Declared by sales agents (products) and signals agents (signals). When supported is true, consumers can register sync_accounts.accounts[].notification_configs[] entries for product.* / signal.* / wholesale_feed.bulk_change and receive the actual change payload in each webhook. This is distinct from buyer-provided feeds managed by sync_catalogs. Consumers use get_products / get_signals with if_wholesale_feed_version as the repair and reconciliation path after missed or distrusted webhooks. See specs/wholesale-feed-webhooks.md. Webhook emission MUST apply the same caller/account authorization and scope predicate as the corresponding wholesale read; agents unable to guarantee per-principal filtering MUST NOT declare supported: true. Capability consistency: agents listing product.* event types MUST declare and support get_products with media_buy.buying_modes including wholesale; agents listing signal.* event types MUST declare and support get_signals with signals.discovery_modes including wholesale; agents listing wholesale_feed.bulk_change MUST have at least one of those wholesale repair paths and MUST only emit bulk-change payloads for affected_entity_type values backed by a declared repair path.'
        ),
    ] = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

  • adcp.types.generated_poc.core.version_envelope.AdcpVersionEnvelope
  • adcp.types.generated_poc.core.protocol_envelope.ProtocolEnvelope
  • AdCPBaseModel
  • pydantic.main.BaseModel

Class variables

var account : adcp.types.generated_poc.protocol.get_adcp_capabilities_response.Account | None
var adcp : adcp.types.generated_poc.protocol.get_adcp_capabilities_response.Adcp
var brand : adcp.types.generated_poc.protocol.get_adcp_capabilities_response.Brand | None
var compliance_testing : adcp.types.generated_poc.protocol.get_adcp_capabilities_response.ComplianceTesting | None
var context : adcp.types.generated_poc.core.context.ContextObject | None
var creative : adcp.types.generated_poc.protocol.get_adcp_capabilities_response.Creative | None
var errors : list[adcp.types.generated_poc.core.error.Error] | None
var experimental_features : list[adcp.types.generated_poc.protocol.get_adcp_capabilities_response.ExperimentalFeature] | None
var ext : adcp.types.generated_poc.core.ext.ExtensionObject | None
var extensions_supported : list[adcp.types.generated_poc.protocol.get_adcp_capabilities_response.ExtensionsSupportedItem] | None
var governance : adcp.types.generated_poc.protocol.get_adcp_capabilities_response.Governance | None
var identity : adcp.types.generated_poc.protocol.get_adcp_capabilities_response.Identity | None
var last_updated : pydantic.types.AwareDatetime | None
var measurement : adcp.types.generated_poc.protocol.get_adcp_capabilities_response.Measurement | None
var media_buy : adcp.types.generated_poc.protocol.get_adcp_capabilities_response.MediaBuy | None
var model_config
var request_signing : adcp.types.generated_poc.protocol.get_adcp_capabilities_response.RequestSigning | None
var signals : adcp.types.generated_poc.protocol.get_adcp_capabilities_response.Signals | None
var specialisms : list[adcp.types.generated_poc.enums.specialism.AdcpSpecialism] | None
var sponsored_intelligence : adcp.types.generated_poc.protocol.get_adcp_capabilities_response.SponsoredIntelligence | None
var supported_protocols : list[adcp.types.generated_poc.protocol.get_adcp_capabilities_response.SupportedProtocol]
var webhook_signing : adcp.types.generated_poc.protocol.get_adcp_capabilities_response.WebhookSigning | None
var wholesale_feed_versioning : adcp.types.generated_poc.protocol.get_adcp_capabilities_response.WholesaleFeedVersioning | None
var wholesale_feed_webhooks : adcp.types.generated_poc.protocol.get_adcp_capabilities_response.WholesaleFeedWebhooks | None

Inherited members

class GetTaskStatusRequest (**data: Any)
Expand source code
class GetTaskStatusRequest(AdcpVersionEnvelope):
    model_config = ConfigDict(
        extra='allow',
    )
    task_id: Annotated[str, Field(description='Unique identifier of the task to retrieve')]
    account: Annotated[
        account_ref.AccountReference | None,
        Field(
            description='Account scope for the task lookup. Sellers MUST return REFERENCE_NOT_FOUND for a task_id that exists only under a different account or principal. When omitted, the seller MAY use the credential-bound singleton account, but multi-account credentials SHOULD require an explicit account.'
        ),
    ] = None
    include_history: Annotated[
        bool | None,
        Field(
            description='Include full conversation history for this task (may increase response size)'
        ),
    ] = False
    include_result: Annotated[
        bool | None,
        Field(
            description="Include the task's result payload when status is completed. Defaults to false for lightweight status-only polls. When true, sellers MUST include result on the response when status is completed."
        ),
    ] = False
    context: context_1.ContextObject | None = None
    ext: ext_1.ExtensionObject | None = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

  • adcp.types.generated_poc.core.version_envelope.AdcpVersionEnvelope
  • AdCPBaseModel
  • pydantic.main.BaseModel

Class variables

var account : adcp.types.generated_poc.core.account_ref.AccountReference | None
var context : adcp.types.generated_poc.core.context.ContextObject | None
var ext : adcp.types.generated_poc.core.ext.ExtensionObject | None
var include_history : bool | None
var include_result : bool | None
var model_config
var task_id : str

Inherited members

class GetTaskStatusResponse (**data: Any)
Expand source code
class GetTaskStatusResponse(AdcpVersionEnvelope, ProtocolEnvelope):
    model_config = ConfigDict(
        extra='allow',
    )
    task_id: Annotated[str, Field(description='Unique identifier for this task')]
    task_type: Annotated[task_type_1.TaskType, Field(description='Type of AdCP operation')]
    protocol: Annotated[
        adcp_protocol.AdcpProtocol, Field(description='AdCP protocol this task belongs to')
    ]
    status: Annotated[task_status.TaskStatus, Field(description='Current task status')]
    created_at: Annotated[
        AwareDatetime, Field(description='When the task was initially created (ISO 8601)')
    ]
    updated_at: Annotated[
        AwareDatetime, Field(description='When the task was last updated (ISO 8601)')
    ]
    completed_at: Annotated[
        AwareDatetime | None,
        Field(
            description='When the task completed (ISO 8601, only for completed/failed/canceled tasks)'
        ),
    ] = None
    has_webhook: Annotated[
        bool | None, Field(description='Whether this task has webhook configuration')
    ] = None
    progress: Annotated[
        Progress | None, Field(description='Progress information for long-running tasks')
    ] = None
    error: Annotated[Error | None, Field(description='Error details for failed tasks')] = None
    history: Annotated[
        list[HistoryItem] | None,
        Field(
            description='Complete conversation history for this task (only included if include_history was true in request)'
        ),
    ] = None
    result: Annotated[
        async_response_data.AdcpAsyncResponseData | None,
        Field(
            description="Task-specific completion payload. Present when status is 'completed' and include_result was true in the request; absent otherwise. For failed tasks, use the error field instead. Uses the same anyOf union as the push-notification webhook result field."
        ),
    ] = None
    context: context_1.ContextObject | None = None
    ext: ext_1.ExtensionObject | None = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

  • adcp.types.generated_poc.core.version_envelope.AdcpVersionEnvelope
  • adcp.types.generated_poc.core.protocol_envelope.ProtocolEnvelope
  • AdCPBaseModel
  • pydantic.main.BaseModel

Class variables

var completed_at : pydantic.types.AwareDatetime | None
var context : adcp.types.generated_poc.core.context.ContextObject | None
var created_at : pydantic.types.AwareDatetime
var error : adcp.types.generated_poc.protocol.get_task_status_response.Error | None
var ext : adcp.types.generated_poc.core.ext.ExtensionObject | None
var has_webhook : bool | None
var history : list[adcp.types.generated_poc.protocol.get_task_status_response.HistoryItem] | None
var model_config
var progress : adcp.types.generated_poc.protocol.get_task_status_response.Progress | None
var protocol : adcp.types.generated_poc.enums.adcp_protocol.AdcpProtocol
var result : adcp.types.generated_poc.core.async_response_data.AdcpAsyncResponseData | None
var status : adcp.types.generated_poc.enums.task_status.TaskStatus
var task_id : str
var task_type : adcp.types.generated_poc.enums.task_type.TaskType
var updated_at : pydantic.types.AwareDatetime

Inherited members

class ListTasksRequest (**data: Any)
Expand source code
class ListTasksRequest(AdcpVersionEnvelope):
    model_config = ConfigDict(
        extra='allow',
    )
    account: Annotated[
        account_ref.AccountReference | None,
        Field(
            description="Account scope for task reconciliation. Sellers MUST only return tasks created for the caller's authenticated account + principal pair. When omitted, the seller MAY use the credential-bound singleton account, but multi-account credentials SHOULD require an explicit account."
        ),
    ] = None
    filters: Annotated[Filters | None, Field(description='Filter criteria for querying tasks')] = (
        None
    )
    sort: Annotated[Sort | None, Field(description='Sorting parameters')] = None
    pagination: pagination_request.PaginationRequest | None = None
    include_history: Annotated[
        bool | None,
        Field(
            description='Include full conversation history for each task (may significantly increase response size)'
        ),
    ] = False
    context: context_1.ContextObject | None = None
    ext: ext_1.ExtensionObject | None = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

  • adcp.types.generated_poc.core.version_envelope.AdcpVersionEnvelope
  • AdCPBaseModel
  • pydantic.main.BaseModel

Class variables

var account : adcp.types.generated_poc.core.account_ref.AccountReference | None
var context : adcp.types.generated_poc.core.context.ContextObject | None
var ext : adcp.types.generated_poc.core.ext.ExtensionObject | None
var filters : adcp.types.generated_poc.protocol.list_tasks_request.Filters | None
var include_history : bool | None
var model_config
var pagination : adcp.types.generated_poc.core.pagination_request.PaginationRequest | None
var sort : adcp.types.generated_poc.protocol.list_tasks_request.Sort | None

Inherited members

class ListTasksResponse (**data: Any)
Expand source code
class ListTasksResponse(AdcpVersionEnvelope, ProtocolEnvelope):
    model_config = ConfigDict(
        extra='allow',
    )
    query_summary: Annotated[
        QuerySummary, Field(description='Summary of the query that was executed')
    ]
    tasks: Annotated[list[Task], Field(description='Array of tasks matching the query criteria')]
    pagination: pagination_response.PaginationResponse
    context: context_1.ContextObject | None = None
    ext: ext_1.ExtensionObject | None = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

  • adcp.types.generated_poc.core.version_envelope.AdcpVersionEnvelope
  • adcp.types.generated_poc.core.protocol_envelope.ProtocolEnvelope
  • AdCPBaseModel
  • pydantic.main.BaseModel

Class variables

var context : adcp.types.generated_poc.core.context.ContextObject | None
var ext : adcp.types.generated_poc.core.ext.ExtensionObject | None
var model_config
var pagination : adcp.types.generated_poc.core.pagination_response.PaginationResponse
var query_summary : adcp.types.generated_poc.protocol.list_tasks_response.QuerySummary
var tasks : list[adcp.types.generated_poc.protocol.list_tasks_response.Task]

Inherited members

class McpWebhookPayload (**data: Any)
Expand source code
class McpWebhookPayload(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    idempotency_key: Annotated[
        str,
        Field(
            description='Sender-generated key stable across retries of the same webhook event. Publishers MUST generate a cryptographically random value (UUID v4 recommended) per distinct event and reuse the same key on every retry of that event. Receivers MUST dedupe by this key, scoped to the authenticated sender identity (HMAC secret or Bearer credential) — keys from different publishers are independent. This is the canonical dedup field — the (task_id, status, timestamp) tuple is insufficient when a single transition is retried with unchanged timestamp or when two transitions share a timestamp.',
            max_length=255,
            min_length=16,
            pattern='^[A-Za-z0-9_.:-]{16,255}$',
        ),
    ]
    notification_id: Annotated[
        str | None,
        Field(
            description="Event-layer, per-state-event identifier. Stable across re-emissions of the same logical event — distinct from the per-fire `idempotency_key` issued at the transport layer. Receivers MUST track both: `idempotency_key` suppresses transport retries; `notification_id` correlates fires to current snapshot state. Seeing the same `notification_id` under two different `idempotency_key` values is a re-emission signal (e.g., the seller is re-firing because a prior fire was unreachable), not a transport retry — receivers SHOULD treat that as a missed-events warning rather than collapsing it. Population is event-shape-dependent (see notification-type.json enumDescriptions for per-type values): for state-shaped events (e.g., `impairment`), this equals the resource's stable id (e.g., `impairment_id`); for point-in-time data events with no persistent state id (e.g., `scheduled`/`final`/`delayed`/`adjusted` delivery report fires per snapshot-and-log Rule 1), this field is absent — the per-fire `idempotency_key` is all there is. Future notification types declare their per-type population in notification-type.json enumDescriptions. Charset is constrained to `[A-Za-z0-9_.:-]` — the same safe-to-log/safe-to-concat character class as `idempotency_key` — so receivers can write this value into log lines, dashboard URLs, and LLM prompts without escaping.",
            max_length=255,
            min_length=1,
            pattern='^[A-Za-z0-9_.:-]{1,255}$',
        ),
    ] = None
    operation_id: Annotated[
        str | None,
        Field(
            description='Client-generated correlation identifier for the operation that produced this webhook. Buyers supply this value at webhook registration time via `push_notification_config.operation_id`; sellers MUST echo it verbatim in every webhook payload. Sellers MUST NOT derive `operation_id` by parsing `push_notification_config.url` — the URL is opaque to the seller. Receivers MAY dispatch endpoints by URL path or query string, but MUST correlate the operation using this payload field, not URL-derived values. See [Webhooks — Operation IDs and URL templates](/docs/building/by-layer/L3/webhooks#operation-ids-and-url-templates) for the full normative wire contract.'
        ),
    ] = None
    task_id: Annotated[
        str,
        Field(
            description='Unique identifier for this task. Use this to correlate webhook notifications with the original task submission.'
        ),
    ]
    task_type: Annotated[
        task_type_1.TaskType,
        Field(
            description='Type of AdCP operation that triggered this webhook. Enables webhook handlers to route to appropriate processing logic.'
        ),
    ]
    protocol: Annotated[
        adcp_protocol.AdcpProtocol | None,
        Field(
            description='AdCP protocol this task belongs to. Helps classify the operation type at a high level.'
        ),
    ] = None
    status: Annotated[
        task_status.TaskStatus,
        Field(
            description='Current task status. Webhooks are triggered for status changes after initial submission.'
        ),
    ]
    timestamp: Annotated[
        AwareDatetime, Field(description='ISO 8601 timestamp when this webhook was generated.')
    ]
    message: Annotated[
        str | None,
        Field(
            description='Human-readable summary of the current task state. Provides context about what happened and what action may be needed.'
        ),
    ] = None
    context_id: Annotated[
        str | None,
        Field(
            description='Session/conversation identifier. Use this to continue the conversation if input-required status needs clarification or additional parameters.'
        ),
    ] = None
    token: Annotated[
        str | None,
        Field(
            description='Authentication token echoed verbatim from [`PushNotificationConfig.token`](/schemas/core/push-notification-config.json). Receivers that configured a token MUST compare it to this value to validate request authenticity, and SHOULD use a constant-time equality check to mitigate timing attacks. Absent when no token was configured at registration. Length bounds mirror the config-side field — receivers MAY reject payloads whose token length falls outside the configured range as a defensive check, provided the length check is performed only after the configured token is known to exist for this subscription, and the length comparison is not used as a fast-path to short-circuit the constant-time compare on equal-length inputs. Receivers MUST NOT treat absence as an authenticity failure when no token was configured.',
            max_length=4096,
            min_length=16,
        ),
    ] = None
    result: Annotated[
        async_response_data.AdcpAsyncResponseData | None,
        Field(
            description='Task-specific payload matching the status. For completed/failed, contains the full task response. For working/input-required/submitted, contains status-specific data. This is the data layer that AdCP specs - same structure used in A2A status.message.parts[].data.'
        ),
    ] = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var context_id : str | None
var idempotency_key : str
var message : str | None
var model_config
var notification_id : str | None
var operation_id : str | None
var protocol : adcp.types.generated_poc.enums.adcp_protocol.AdcpProtocol | None
var result : adcp.types.generated_poc.core.async_response_data.AdcpAsyncResponseData | None
var status : adcp.types.generated_poc.enums.task_status.TaskStatus
var task_id : str
var task_type : adcp.types.generated_poc.enums.task_type.TaskType
var timestamp : pydantic.types.AwareDatetime
var token : str | None

Inherited members

class Metadata (**data: Any)
Expand source code
class Metadata(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    canonical: Annotated[AnyUrl | None, Field(description='Canonical URL')] = None
    author: Annotated[str | None, Field(description='Artifact author name')] = None
    keywords: Annotated[str | None, Field(description='Artifact keywords')] = None
    open_graph: Annotated[
        dict[str, Any] | None, Field(description='Open Graph protocol metadata')
    ] = None
    twitter_card: Annotated[dict[str, Any] | None, Field(description='Twitter Card metadata')] = (
        None
    )
    json_ld: Annotated[
        list[dict[str, Any]] | None, Field(description='JSON-LD structured data (schema.org)')
    ] = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var author : str | None
var canonical : pydantic.networks.AnyUrl | None
var json_ld : list[dict[str, typing.Any]] | None
var keywords : str | None
var model_config
var open_graph : dict[str, typing.Any] | None
var twitter_card : dict[str, typing.Any] | None

Inherited members

class NotificationConfig (**data: Any)
Expand source code
class NotificationConfig(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    subscriber_id: Annotated[
        str,
        Field(
            description="Buyer-supplied identifier for this subscription endpoint. This is the stable logical key within one account's notification_configs[] set: re-sending the same subscriber_id for the same account replaces that subscriber's URL, event_types, authentication selector, and active flag rather than creating a duplicate. Echoed on every webhook payload and on every `webhook_activity[]` record fired against this config so the buyer can attribute fires across multiple endpoints. MUST be unique within the account's `notification_configs[]`. Sending two entries with the same `subscriber_id` in a single `sync_accounts` request array is rejected as a per-account validation failure with `INVALID_REQUEST` or `VALIDATION_ERROR`, and `error.field` MUST point at the duplicate entry. `subscriber_id` is the stable match key for the per-account declarative-replace diff. Always required (even with a single subscriber) so the SDK contract is uniform — no conditional required-when-multiple rules to trip up implementations. Format is opaque — recommended values are short kebab-case slugs (`buyer-primary`, `audit-bus`, `dx-team`).",
            max_length=64,
            min_length=1,
            pattern='^[A-Za-z0-9_.:-]{1,64}$',
        ),
    ]
    url: Annotated[
        AnyUrl,
        Field(
            description='Webhook endpoint URL. Same wire contract as `push-notification-config.url` — `format: "uri"`, no destination-port allowlist enforced by the protocol, SSRF protection via the IP-range check defined in docs/building/by-layer/L1/security.mdx#webhook-url-validation-ssrf. Sellers MUST validate URL syntax, HTTPS usage, hostname normalization, and reserved-range rejection when writing any config, including `active: false` configs. Sellers MUST complete an activation challenge or equivalent proof-of-control before treating a new or changed active subscriber as active.'
        ),
    ]
    event_types: Annotated[
        list[notification_type.NotificationType],
        Field(
            description='Notification types this subscriber wishes to receive on the registered `url`. The seller MUST NOT fire other types against this endpoint, and MUST NOT silently widen the filter when new types are added to `notification-type.json`. When omitted, the seller MUST default to a no-fire policy and surface an `errors[]` entry on `sync_accounts` so the buyer notices the missing filter. Values are drawn from `notification-type.json`, but only types whose contract anchors at the account scope are valid here — creative lifecycle events and wholesale feed change payloads are valid; media-buy-anchored types (`scheduled`, `final`, `delayed`, `adjusted`, `impairment`) and account-lifecycle names not present in the enum (for example, `account.status_changed`) are invalid on this surface; sellers MUST reject those entries as per-account validation failures with `INVALID_REQUEST` or `VALIDATION_ERROR` and `error.field` pointing at the invalid `event_types` entry rather than silently dropping them.',
            min_length=1,
        ),
    ]
    authentication: Annotated[
        Authentication | None,
        Field(
            description="Legacy authentication selector. Same precedence and semantics as `push-notification-config.authentication` — presence opts the seller into Bearer or HMAC-SHA256 signing; absence selects the default RFC 9421 webhook profile keyed off the seller's brand.json `agents[]` JWKS. The same signed-registration downgrade-resistance rules apply to accounts[].notification_configs[].authentication. Deprecated; removed in AdCP 4.0. Credentials are write-only and MUST NOT be echoed on `list_accounts` reads."
        ),
    ] = None
    active: Annotated[
        bool | None,
        Field(
            description="When false, the seller persists the configuration but suppresses fires. Use to pause a noisy subscriber without losing the registration. Sellers MUST NOT skip persisting the entry when `active: false` — the buyer's next `sync_accounts` MUST observe the same array, otherwise the buyer cannot distinguish pause from drop. Paused configs may skip only the outbound proof challenge while inactive; sellers MUST still enforce URL parsing, HTTPS, hostname normalization, and reserved-range rejection at write time. Reactivation requires full SSRF validation with connect pinning plus proof-of-control for any tuple without current valid proof."
        ),
    ] = True
    ext: ext_1.ExtensionObject | None = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var active : bool | None
var authentication : adcp.types.generated_poc.core.notification_config.Authentication | None
var event_types : list[adcp.types.generated_poc.enums.notification_type.NotificationType]
var ext : adcp.types.generated_poc.core.ext.ExtensionObject | None
var model_config
var subscriber_id : str
var url : pydantic.networks.AnyUrl

Inherited members

class NotificationType (*args, **kwds)
Expand source code
class NotificationType(StrEnum):
    scheduled = 'scheduled'
    final = 'final'
    delayed = 'delayed'
    adjusted = 'adjusted'
    impairment = 'impairment'
    creative_status_changed = 'creative.status_changed'
    creative_purged = 'creative.purged'
    product_created = 'product.created'
    product_updated = 'product.updated'
    product_priced = 'product.priced'
    product_removed = 'product.removed'
    signal_created = 'signal.created'
    signal_updated = 'signal.updated'
    signal_priced = 'signal.priced'
    signal_removed = 'signal.removed'
    wholesale_feed_bulk_change = 'wholesale_feed.bulk_change'

Enum where members are also (and must be) strings

Ancestors

  • enum.StrEnum
  • builtins.str
  • enum.ReprEnum
  • enum.Enum

Class variables

var adjusted
var creative_purged
var creative_status_changed
var delayed
var final
var impairment
var product_created
var product_priced
var product_removed
var product_updated
var scheduled
var signal_created
var signal_priced
var signal_removed
var signal_updated
var wholesale_feed_bulk_change
class Pagination (**data: Any)
Expand source code
class Pagination(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    max_results: Annotated[
        int | None,
        Field(description='Maximum number of collections to return per page', ge=1, le=10000),
    ] = 1000
    cursor: Annotated[
        str | None,
        Field(description='Opaque cursor from a previous response to fetch the next page'),
    ] = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var cursor : str | None
var max_results : int | None
var model_config

Inherited members

class PaginationRequest (**data: Any)
Expand source code
class PaginationRequest(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    max_results: Annotated[
        int | None, Field(description='Maximum number of items to return per page', ge=1, le=100)
    ] = 50
    cursor: Annotated[
        str | None,
        Field(description='Opaque cursor from a previous response to fetch the next page'),
    ] = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var cursor : str | None
var max_results : int | None
var model_config

Inherited members

class PaginationResponse (**data: Any)
Expand source code
class PaginationResponse(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    has_more: Annotated[
        bool, Field(description='Whether more results are available beyond this page')
    ]
    cursor: Annotated[
        str | None,
        Field(
            description='Opaque cursor to pass in the next request to fetch the next page. Only present when has_more is true.'
        ),
    ] = None
    total_count: Annotated[
        int | None,
        Field(
            description='Total number of items matching the query across all pages. Optional because not all backends can efficiently compute this.',
            ge=0,
        ),
    ] = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var cursor : str | None
var has_more : bool
var model_config
var total_count : int | None

Inherited members

class Protocol (*args, **kwds)
Expand source code
class Protocol(str, Enum):
    """Supported protocols."""

    A2A = "a2a"
    MCP = "mcp"

Supported protocols.

Ancestors

  • builtins.str
  • enum.Enum

Class variables

var A2A
var MCP
class ProtocolEnvelope (**data: Any)
Expand source code
class ProtocolEnvelope(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    context_id: Annotated[
        str | None,
        Field(
            description='Session/conversation identifier for tracking related operations across multiple task invocations. Managed by the protocol layer to maintain conversational context. Distinct from `context` (per-request opaque echo, see below).'
        ),
    ] = None
    context: Annotated[
        context_1.ContextObject | None,
        Field(
            description='Per-request opaque caller-supplied correlation object echoed unchanged in the response. Used for buyer-side tracking (UI session IDs, trace IDs, custom metadata) that the agent MUST preserve byte-for-byte without parsing. Distinct from `context_id` (server-managed session identifier) — `context` is caller-owned echo, `context_id` is server-owned session scope. Both MAY appear on the same response.\n\n**Relationship to per-task body-level `context` declarations.** Many task request/response schemas (147 as of 3.1) already declare a body-level `context` field that `$ref`s `/schemas/core/context.json` at the body root. Under the flat-on-the-wire MCP serialization (see `notes` below), envelope-level `context` and body-level `context` occupy the same key on the response root — they are NOT separate fields, they MUST share the same value, and they MUST both `$ref` `core/context.json`. The envelope declaration is **authoritative** for the schema definition; per-task body declarations are mirrors retained for tooling reasons (SDK codegen completeness, per-task validation against the response schema in isolation). Future versions MAY drop body-level `context` declarations from per-task schemas; conformance does not require either declaration to be present, only that the wire value `$ref`s `core/context.json`.'
        ),
    ] = None
    task_id: Annotated[
        str | None,
        Field(
            description='Unique identifier for tracking asynchronous operations. Present when a task requires extended processing time. Used to query task status and retrieve results when complete.'
        ),
    ] = None
    status: Annotated[
        task_status.TaskStatus,
        Field(
            description='Current task execution state. Indicates whether the task is completed, in progress (working), submitted for async processing, failed, or requires user input. REQUIRED on every task response envelope. Synchronous tasks (including read-only metadata calls like `get_adcp_capabilities`) MUST emit `status: "completed"`; async tasks emit `submitted`, `working`, `input-required`, etc. per their lifecycle. Agents MUST NOT emit the legacy task_status or response_status fields alongside this field — the status field is the single authoritative task state.'
        ),
    ] = task_status.TaskStatus.completed
    message: Annotated[
        str | None,
        Field(
            description='Human-readable summary of the task result. Provides natural language explanation of what happened, suitable for display to end users or for AI agent comprehension. Generated by the protocol layer based on the task response.'
        ),
    ] = None
    timestamp: Annotated[
        AwareDatetime | None,
        Field(
            description='ISO 8601 timestamp when the response was generated. Useful for debugging, logging, cache validation, and tracking async operation progress.'
        ),
    ] = None
    replayed: Annotated[
        bool | None,
        Field(
            description="Set to true when this response was returned from the idempotency cache rather than from a fresh execution. Set to false (or omitted) when the request was executed fresh. Buyers use this to distinguish cached replays from new executions — matters for billing reconciliation, audit logs, state-machine routing (cached state-tracking fields are historical snapshots, not current state — re-read via the resource's read endpoint), and any downstream system that assumes exactly-once event semantics. From 3.1 onward, `replayed` MAY appear on responses to any request that resolved via the idempotency cache, including read tools — universal `idempotency_key` (see security.mdx §Idempotency) means the cache holds read responses too."
        ),
    ] = False
    adcp_error: Annotated[
        error.Error | None,
        Field(
            description="Transport-envelope error signal for fatal task failures. Per the two-layer model in `error-handling.mdx#envelope-vs-payload-errors-the-two-layer-model`, a fatal task failure SHOULD populate both this envelope-level field AND the payload's `errors[]` array — the envelope carries a typed, extractable error so MCP/A2A clients can dispatch without re-parsing the payload, while the payload's structured `errors[]` remains the canonical normative shape. Non-fatal warnings populate ONLY `payload.errors[]` with `severity: warning` — the envelope MUST NOT carry `adcp_error` for non-failures."
        ),
    ] = None
    push_notification_config: Annotated[
        push_notification_config_1.PushNotificationConfig | None,
        Field(
            description='Push notification configuration for async task updates (A2A and REST protocols). Echoed from the request to confirm webhook settings. Specifies URL, authentication scheme (Bearer or HMAC-SHA256), and credentials. MCP uses progress notifications instead of webhooks.'
        ),
    ] = None
    governance_context: Annotated[
        str | None,
        Field(
            description="Governance context token issued by the account's governance agent during check_governance. Buyers attach it to governed purchase requests (media buys, rights acquisitions, signal activations, creative services); sellers persist it and include it on all subsequent governance calls for that action's lifecycle. An account binds to one governance agent (see sync_governance); governance is phased across `purchase` / `modification` / `delivery`, not partitioned across specialist agents, so the envelope carries a single token for the full lifecycle.\n\nValue format: governance agents MUST emit a compact JWS per the AdCP JWS profile (see Security — Signed Governance Context). Sellers MAY verify; sellers that do not verify MUST persist and forward the token unchanged. In 3.1 all sellers MUST verify. Non-JWS values from pre-3.0 governance agents are deprecated.\n\nThis is the primary correlation key for audit and reporting across the governance lifecycle.",
            max_length=4096,
            min_length=1,
            pattern='^[\\x20-\\x7E]+$',
        ),
    ] = None
    payload: Annotated[
        dict[str, Any] | None,
        Field(
            description='Conceptual grouping for the task-specific response data defined by individual task response schemas (e.g., get-products-response.json, create-media-buy-response.json). `payload` is a documentary construct — it is NOT a required wire field, and its on-the-wire shape depends on transport (see Transport serialization below). Task response schemas declare body fields without wrapping them in a `payload` object; the wire representation places those body fields per transport convention. On MCP the body fields appear as siblings of envelope fields at the root of the tool response; on A2A they appear inside `task.artifacts[0].parts[].DataPart`; on REST they appear at the root of the JSON body.'
        ),
    ] = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Subclasses

  • adcp.types.generated_poc.account.list_accounts_response.ListAccountsResponse
  • adcp.types.generated_poc.account.report_usage_response.ReportUsageResponse
  • adcp.types.generated_poc.account.sync_governance_response.SyncGovernanceResponse
  • adcp.types.generated_poc.brand.creative_approval_response.CreativeApprovalResponse
  • adcp.types.generated_poc.brand.search_brands_response.SearchBrandsResponse
  • adcp.types.generated_poc.brand.verify_brand_claim_response.VerifyBrandClaimErrorResponse
  • adcp.types.generated_poc.brand.verify_brand_claim_response.VerifyBrandClaimSuccessResponse
  • adcp.types.generated_poc.brand.verify_brand_claims_response.VerifyBrandClaimsErrorResponse
  • adcp.types.generated_poc.brand.verify_brand_claims_response.VerifyBrandClaimsResponseBulk
  • adcp.types.generated_poc.collection.create_collection_list_response.CreateCollectionListResponse
  • adcp.types.generated_poc.collection.delete_collection_list_response.DeleteCollectionListResponse
  • adcp.types.generated_poc.collection.get_collection_list_response.GetCollectionListResponse
  • adcp.types.generated_poc.collection.list_collection_lists_response.ListCollectionListsResponse
  • adcp.types.generated_poc.collection.update_collection_list_response.UpdateCollectionListResponse
  • adcp.types.generated_poc.compliance.comply_test_controller_response.ComplyTestControllerResponse
  • adcp.types.generated_poc.content_standards.create_content_standards_response.CreateContentStandardsResponse
  • adcp.types.generated_poc.content_standards.list_content_standards_response.ListContentStandardsResponse
  • adcp.types.generated_poc.content_standards.update_content_standards_response.UpdateContentStandardsResponse
  • adcp.types.generated_poc.core.tasks_get_response.TasksGetResponse
  • adcp.types.generated_poc.core.tasks_list_response.TasksListResponse
  • adcp.types.generated_poc.creative.get_creative_delivery_response.GetCreativeDeliveryResponse
  • adcp.types.generated_poc.creative.list_creative_formats_response.ListCreativeFormatsResponseCreativeAgent
  • adcp.types.generated_poc.creative.list_creatives_response.ListCreativesResponse
  • adcp.types.generated_poc.creative.list_transformers_response.ListTransformersResponseCreativeAgent
  • adcp.types.generated_poc.creative.sync_creatives_response.SyncCreativesResponse3
  • adcp.types.generated_poc.creative.validate_input_response.ValidateInputResponse
  • adcp.types.generated_poc.governance.get_plan_audit_logs_response.GetPlanAuditLogsResponse
  • adcp.types.generated_poc.governance.sync_plans_response.SyncPlansResponse
  • adcp.types.generated_poc.media_buy.build_creative_response.BuildCreativeResponse6
  • adcp.types.generated_poc.media_buy.create_media_buy_response.CreateMediaBuyResponse3
  • adcp.types.generated_poc.media_buy.get_media_buy_delivery_response.GetMediaBuyDeliveryResponse
  • adcp.types.generated_poc.media_buy.get_media_buys_response.GetMediaBuysResponse
  • adcp.types.generated_poc.media_buy.get_products_response.GetProductsResponse
  • adcp.types.generated_poc.media_buy.list_creative_formats_response.ListCreativeFormatsResponse
  • adcp.types.generated_poc.media_buy.sync_audiences_response.SyncAudiencesResponse3
  • adcp.types.generated_poc.media_buy.sync_catalogs_response.SyncCatalogsResponse3
  • adcp.types.generated_poc.media_buy.update_media_buy_response.UpdateMediaBuyResponse3
  • adcp.types.generated_poc.property.create_property_list_response.CreatePropertyListResponse
  • adcp.types.generated_poc.property.delete_property_list_response.DeletePropertyListResponse
  • adcp.types.generated_poc.property.get_property_list_response.GetPropertyListResponse
  • adcp.types.generated_poc.property.list_property_lists_response.ListPropertyListsResponse
  • adcp.types.generated_poc.property.update_property_list_response.UpdatePropertyListResponse
  • adcp.types.generated_poc.property.validate_property_delivery_response.ValidatePropertyDeliveryResponse
  • adcp.types.generated_poc.protocol.get_adcp_capabilities_response.GetAdcpCapabilitiesResponse
  • adcp.types.generated_poc.protocol.get_task_status_response.GetTaskStatusResponse
  • adcp.types.generated_poc.protocol.list_tasks_response.ListTasksResponse
  • adcp.types.generated_poc.signals.get_signals_response.GetSignalsResponse
  • adcp.types.generated_poc.sponsored_intelligence.si_get_offering_response.SiGetOfferingResponse
  • adcp.types.generated_poc.sponsored_intelligence.si_initiate_session_response.SiInitiateSessionResponse
  • adcp.types.generated_poc.sponsored_intelligence.si_send_message_response.SiSendMessageResponse
  • adcp.types.generated_poc.sponsored_intelligence.si_terminate_session_response.SiTerminateSessionResponse
  • adcp.types.generated_poc.trusted_match.context_match_response.ContextMatchResponse
  • adcp.types.generated_poc.trusted_match.identity_match_response.IdentityMatchResponse

Class variables

var adcp_error : adcp.types.generated_poc.core.error.Error | None
var context : adcp.types.generated_poc.core.context.ContextObject | None
var context_id : str | None
var governance_context : str | None
var message : str | None
var model_config
var payload : dict[str, typing.Any] | None
var push_notification_config : adcp.types.generated_poc.core.push_notification_config.PushNotificationConfig | None
var replayed : bool | None
var status : adcp.types.generated_poc.enums.task_status.TaskStatus
var task_id : str | None
var timestamp : pydantic.types.AwareDatetime | None

Inherited members

class ProtocolResponse (**data: Any)
Expand source code
class ProtocolResponse(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    message: Annotated[str, Field(description='Human-readable summary')]
    context_id: Annotated[str | None, Field(description='Session continuity identifier')] = None
    data: Annotated[
        Any | None,
        Field(
            description='AdCP task-specific response data (see individual task response schemas)'
        ),
    ] = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var context_id : str | None
var data : typing.Any | None
var message : str
var model_config

Inherited members

class PushNotificationConfig (**data: Any)
Expand source code
class PushNotificationConfig(AdCPBaseModel):
    url: Annotated[
        AnyUrl,
        Field(
            description='Webhook endpoint URL for task status notifications. The wire contract is unconstrained beyond `format: "uri"` — in particular, publishers SHOULD NOT enforce a destination-port allowlist by default, since buyers legitimately host receivers on non-standard TLS ports (`:9443`, `:4443`, path-routed multi-tenant gateways). The SSRF guard the protocol relies on is the IP-range check + DNS-rebinding-resistant connect pin defined in [Webhook URL validation (SSRF)](/docs/building/by-layer/L1/security#webhook-url-validation-ssrf), not port filtering. Operators who want a hardened destination-port allowlist as defense-in-depth (e.g., locked-down enterprise egress) opt in explicitly — see [Destination port: permissive by default](/docs/building/by-layer/L1/security#destination-port-permissive-by-default).'
        ),
    ]
    operation_id: Annotated[
        str | None,
        Field(
            description="Buyer-supplied correlation identifier for the operation that will produce webhooks against this registration. The seller MUST echo this value verbatim into every webhook payload's `operation_id` field (see [`mcp-webhook-payload.json`](/schemas/core/mcp-webhook-payload.json) and [Webhooks — Operation IDs](/docs/building/by-layer/L3/webhooks#operation-ids-and-url-templates)). Buyers SHOULD generate a unique value per task invocation (UUID recommended). This field is the canonical registration channel for `operation_id`; buyers MAY additionally embed routing values in the URL path or query as an aid for their own HTTP server, but the URL is opaque to the seller and the wire-level source of truth is this field. Sellers MUST NOT parse the URL to recover `operation_id`. Sellers that receive a webhook registration without `operation_id` MAY reject the task with `INVALID_REQUEST`.",
            max_length=255,
            min_length=1,
            pattern='^[A-Za-z0-9_.:-]{1,255}$',
        ),
    ] = None
    token: Annotated[
        str | None,
        Field(
            description="Optional client-provided token for webhook validation. The seller MUST echo this value verbatim in every webhook payload's `token` field (see [`mcp-webhook-payload.json`](/schemas/core/mcp-webhook-payload.json) for the receiver-side validation obligation). Length bounds give receivers a defensive range check on the echoed value; senders SHOULD generate tokens with at least 128 bits of entropy (≥22 base64url characters). This is a complementary authenticity mechanism that can layer on top of the RFC 9421 webhook signature — unlike the `authentication` block below, it is not on the 4.0 removal track. Receivers that registered both a signing key (RFC 9421) and a `token` MUST NOT treat a valid token echo as authorization to skip signature verification; both checks remain independent obligations.",
            max_length=4096,
            min_length=16,
        ),
    ] = None
    authentication: Annotated[
        Authentication | None,
        Field(
            description='Legacy authentication configuration (A2A-compatible). Opts the seller into Bearer or HMAC-SHA256 signing instead of the default RFC 9421 webhook profile. Deprecated; removed in AdCP 4.0. **Precedence is a switch, not a fallback:** presence of this block selects the legacy scheme; absence selects 9421. A seller MUST NOT sign the same webhook both ways, and a buyer MUST NOT attempt \'try 9421 first, fall back to HMAC\' verification — signature mode is determined solely by whether this block was present at registration time. The seller\'s baseline 9421 webhook key is published at its brand.json `agents[]` `jwks_uri` using `adcp_use: "request-signing"` (deprecated `webhook-signing` keys remain accepted during the compatibility window); it does not override this selector and is only used when `authentication` is omitted. See docs/building/by-layer/L1/security.mdx#webhook-callbacks for the full precedence and downgrade-resistance rules (including the `webhook_mode_mismatch` rejection a buyer MUST apply when a received webhook\'s signing mode does not match the registered mode).'
        ),
    ] = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var authentication : adcp.types.generated_poc.core.push_notification_config.Authentication | None
var model_config
var operation_id : str | None
var token : str | None
var url : pydantic.networks.AnyUrl

Inherited members

class QuerySummary (**data: Any)
Expand source code
class QuerySummary(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    total_matching: Annotated[
        int | None,
        Field(description='Total number of tasks matching filters (across all pages)', ge=0),
    ] = None
    returned: Annotated[
        int | None, Field(description='Number of tasks returned in this response', ge=0)
    ] = None
    domain_breakdown: Annotated[
        DomainBreakdown | None, Field(description='Count of tasks by domain')
    ] = None
    status_breakdown: Annotated[
        dict[str, int] | None, Field(description='Count of tasks by status')
    ] = None
    filters_applied: Annotated[
        list[str] | None, Field(description='List of filters that were applied to the query')
    ] = None
    sort_applied: Annotated[
        SortApplied | None, Field(description='Sort order that was applied')
    ] = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var domain_breakdown : adcp.types.generated_poc.core.tasks_list_response.DomainBreakdown | None
var filters_applied : list[str] | None
var model_config
var returned : int | None
var sort_applied : adcp.types.generated_poc.core.tasks_list_response.SortApplied | None
var status_breakdown : dict[str, int] | None
var total_matching : int | None

Inherited members

class Request (**data: Any)
Expand source code
class Request(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    format_id: Annotated[
        format_id_1.FormatReferenceStructuredObject | None,
        Field(
            description='Format identifier for rendering the preview. Defaults to creative_manifest_1.format_id if omitted.'
        ),
    ] = None
    creative_manifest: Annotated[
        creative_manifest_1.CreativeManifest,
        Field(description='Complete creative manifest with all required assets.'),
    ]
    inputs: Annotated[
        list[Input5] | None,
        Field(
            description='Array of input sets for generating multiple preview variants', min_length=1
        ),
    ] = None
    template_id: Annotated[
        str | None, Field(description='Specific template ID for custom format rendering')
    ] = None
    quality: Annotated[
        creative_quality.CreativeQuality | None,
        Field(description='Render quality for this preview. Overrides batch-level default.'),
    ] = None
    output_format: Annotated[
        preview_output_format.PreviewOutputFormat | None,
        Field(description='Output format for this preview. Overrides batch-level default.'),
    ] = preview_output_format.PreviewOutputFormat.url
    item_limit: Annotated[
        int | None,
        Field(description='Maximum number of catalog items to render in this preview.', ge=1),
    ] = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var creative_manifest : adcp.types.generated_poc.core.creative_manifest.CreativeManifest
var format_id : adcp.types.generated_poc.core.format_id.FormatReferenceStructuredObject | None
var inputs : list[adcp.types.generated_poc.creative.preview_creative_request.Input5] | None
var item_limit : int | None
var model_config
var output_format : adcp.types.generated_poc.enums.preview_output_format.PreviewOutputFormat | None
var quality : adcp.types.generated_poc.enums.creative_quality.CreativeQuality | None
var template_id : str | None

Inherited members

class Response (**data: Any)
Expand source code
class Response(AdcpVersionEnvelope):
    model_config = ConfigDict(extra='allow')
    previews: Annotated[list[Preview2], Field(min_length=1)]
    interactive_url: AnyUrl | None = None
    expires_at: AwareDatetime | None = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

  • adcp.types.generated_poc.core.version_envelope.AdcpVersionEnvelope
  • AdCPBaseModel
  • pydantic.main.BaseModel

Class variables

var expires_at : pydantic.types.AwareDatetime | None
var interactive_url : pydantic.networks.AnyUrl | None
var model_config
var previews : list[adcp.types.generated_poc.creative.preview_creative_response.Preview2]

Inherited members

class ResponsePayloadJwsEnvelope (**data: Any)
Expand source code
class ResponsePayloadJwsEnvelope(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    protected: Annotated[
        str,
        Field(
            description='Base64url-encoded JWS protected header. The decoded header MUST include alg, kid, and typ: adcp-response-payload+jws, and MUST NOT include the RFC 7797 b64 header. Verifiers enforce the key purpose by resolving kid to a JWK with adcp_use: response-signing.',
            pattern='^[A-Za-z0-9_-]+$',
        ),
    ]
    payload: Annotated[
        ResponsePayload,
        Field(
            description='Decoded signed payload. Signers compute the JWS payload bytes from the RFC 8785/JCS canonicalization of this object.'
        ),
    ]
    signature: Annotated[
        str,
        Field(
            description='Base64url-encoded JWS signature over the protected header and canonicalized payload.',
            pattern='^[A-Za-z0-9_-]+$',
        ),
    ]

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var model_config
var payload : adcp.types.generated_poc.core.response_payload_jws_envelope.ResponsePayload
var protected : str
var signature : str

Inherited members

class Security (**data: Any)
Expand source code
class Security(AdCPBaseModel):
    method: Annotated[
        webhook_security_method.WebhookSecurityMethod, Field(description='Authentication method')
    ]
    hmac_header: Annotated[
        str | None, Field(description="Header name for HMAC signature (e.g., 'X-Signature')")
    ] = None
    api_key_header: Annotated[
        str | None, Field(description="Header name for API key (e.g., 'X-API-Key')")
    ] = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var api_key_header : str | None
var hmac_header : str | None
var method : adcp.types.generated_poc.enums.webhook_security_method.WebhookSecurityMethod
var model_config

Inherited members

class Sort (**data: Any)
Expand source code
class Sort(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    field: Annotated[Field1 | None, Field(description='Field to sort by')] = Field1.created_at
    direction: Annotated[
        sort_direction.SortDirection | None, Field(description='Sort direction')
    ] = sort_direction.SortDirection.desc

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var direction : adcp.types.generated_poc.enums.sort_direction.SortDirection | None
var field : adcp.types.generated_poc.core.tasks_list_request.Field1 | None
var model_config

Inherited members

class SortApplied (**data: Any)
Expand source code
class SortApplied(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    field: str
    direction: Direction

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var direction : adcp.types.generated_poc.core.tasks_list_response.Direction
var field : str
var model_config

Inherited members

class SortDirection (*args, **kwds)
Expand source code
class SortDirection(StrEnum):
    asc = 'asc'
    desc = 'desc'

Enum where members are also (and must be) strings

Ancestors

  • enum.StrEnum
  • builtins.str
  • enum.ReprEnum
  • enum.Enum

Class variables

var asc
var desc
class StatusSummary (**data: Any)
Expand source code
class StatusSummary(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    processing: Annotated[
        int | None, Field(description='Number of creatives being processed', ge=0)
    ] = None
    approved: Annotated[int | None, Field(description='Number of approved creatives', ge=0)] = None
    pending_review: Annotated[
        int | None, Field(description='Number of creatives pending review', ge=0)
    ] = None
    rejected: Annotated[int | None, Field(description='Number of rejected creatives', ge=0)] = None
    archived: Annotated[int | None, Field(description='Number of archived creatives', ge=0)] = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var approved : int | None
var archived : int | None
var model_config
var pending_review : int | None
var processing : int | None
var rejected : int | None

Inherited members

class TaskResult (**data: Any)
Expand source code
class TaskResult(BaseModel, Generic[T]):
    """Result from task execution."""

    model_config = ConfigDict(arbitrary_types_allowed=True)

    status: TaskStatus
    data: T | None = None
    message: str | None = None  # Human-readable message from agent (e.g., MCP content text)
    submitted: SubmittedInfo | None = None
    needs_input: NeedsInputInfo | None = None
    error: str | None = None
    # Structured AdCP error per transport-errors.mdx (``adcp_error`` object:
    # ``code``, ``message``, ``detail``, ``field_path``, ``recovery`` ...).
    # Always populated on the MCP FAILED path when the seller returned a
    # spec-shaped ``adcp_error`` — independent of ``debug``. Callers should
    # branch on ``adcp_error.code`` rather than regex-matching ``error``.
    adcp_error: dict[str, Any] | None = None
    success: bool = Field(default=True)
    metadata: dict[str, Any] | None = None
    debug_info: DebugInfo | None = None
    # The full idempotency_key the SDK used for this request — echoed here so
    # buyers can correlate against their own records. SENSITIVE inside the
    # seller's replay_ttl_seconds window (serves as a retry-pattern oracle);
    # do not emit to shared logs. The SDK's debug capture redacts keys by
    # default; avoid ``model_dump_json()``-ing a TaskResult into shared sinks.
    idempotency_key: str | None = None
    # True when the seller returned a cached response for a replayed key.
    # Agents that emit side effects on success (notifications, memory writes,
    # downstream tool calls) must check this flag and suppress duplicates.
    replayed: bool = False

Result from task execution.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

  • pydantic.main.BaseModel
  • typing.Generic

Subclasses

  • adcp.types.core.TaskResult[AdcpAsyncResponseData]
  • adcp.types.core.TaskResult[Any]
  • adcp.types.core.TaskResult[CheckGovernanceResponse]
  • adcp.types.core.TaskResult[ComplyTestControllerResponse]
  • adcp.types.core.TaskResult[ContextMatchResponse]
  • adcp.types.core.TaskResult[CreateCollectionListResponse]
  • adcp.types.core.TaskResult[CreateContentStandardsResponse]
  • adcp.types.core.TaskResult[CreatePropertyListResponse]
  • adcp.types.core.TaskResult[DeleteCollectionListResponse]
  • adcp.types.core.TaskResult[DeletePropertyListResponse]
  • adcp.types.core.TaskResult[GetAdcpCapabilitiesResponse]
  • adcp.types.core.TaskResult[GetCollectionListResponse]
  • adcp.types.core.TaskResult[GetCreativeDeliveryResponse]
  • adcp.types.core.TaskResult[GetMediaBuyDeliveryResponse]
  • adcp.types.core.TaskResult[GetMediaBuysResponse]
  • adcp.types.core.TaskResult[GetPlanAuditLogsResponse]
  • adcp.types.core.TaskResult[GetProductsResponse]
  • adcp.types.core.TaskResult[GetPropertyListResponse]
  • adcp.types.core.TaskResult[GetSignalsResponse]
  • adcp.types.core.TaskResult[GetTaskStatusResponse]
  • adcp.types.core.TaskResult[IdentityMatchResponse]
  • adcp.types.core.TaskResult[ListAccountsResponse]
  • adcp.types.core.TaskResult[ListCollectionListsResponse]
  • adcp.types.core.TaskResult[ListContentStandardsResponse]
  • adcp.types.core.TaskResult[ListCreativeFormatsResponse]
  • adcp.types.core.TaskResult[ListCreativesResponse]
  • adcp.types.core.TaskResult[ListPropertyListsResponse]
  • adcp.types.core.TaskResult[ListTasksResponse]
  • adcp.types.core.TaskResult[ListTransformersResponseCreativeAgent]
  • adcp.types.core.TaskResult[ReportPlanOutcomeResponse]
  • adcp.types.core.TaskResult[ReportUsageResponse]
  • adcp.types.core.TaskResult[SiGetOfferingResponse]
  • adcp.types.core.TaskResult[SiInitiateSessionResponse]
  • adcp.types.core.TaskResult[SiSendMessageResponse]
  • adcp.types.core.TaskResult[SiTerminateSessionResponse]
  • adcp.types.core.TaskResult[SyncGovernanceResponse]
  • adcp.types.core.TaskResult[SyncPlansResponse]
  • adcp.types.core.TaskResult[Union[AcquireRightsResponse1, AcquireRightsResponse2, AcquireRightsResponse3, AcquireRightsResponse4]]
  • adcp.types.core.TaskResult[Union[ActivateSignalResponse1, ActivateSignalResponse2]]
  • adcp.types.core.TaskResult[Union[BuildCreativeResponse1, BuildCreativeResponse2, BuildCreativeResponse3, BuildCreativeResponse4, BuildCreativeResponse5, BuildCreativeResponse6]]
  • adcp.types.core.TaskResult[Union[CalibrateContentResponse1, CalibrateContentResponse2]]
  • adcp.types.core.TaskResult[Union[CreateMediaBuyResponse1, CreateMediaBuyResponse2, CreateMediaBuyResponse3]]
  • adcp.types.core.TaskResult[Union[GetAccountFinancialsResponse1, GetAccountFinancialsResponse2]]
  • adcp.types.core.TaskResult[Union[GetBrandIdentityResponse1, GetBrandIdentityResponse2]]
  • adcp.types.core.TaskResult[Union[GetContentStandardsResponse1, GetContentStandardsResponse2]]
  • adcp.types.core.TaskResult[Union[GetCreativeFeaturesResponse1, GetCreativeFeaturesResponse2]]
  • adcp.types.core.TaskResult[Union[GetMediaBuyArtifactsResponse1, GetMediaBuyArtifactsResponse2]]
  • adcp.types.core.TaskResult[Union[GetRightsResponse1, GetRightsResponse2]]
  • adcp.types.core.TaskResult[Union[LogEventResponse1, LogEventResponse2]]
  • adcp.types.core.TaskResult[Union[PreviewCreativeResponse1, PreviewCreativeResponse2, PreviewCreativeResponse3]]
  • adcp.types.core.TaskResult[Union[ProvidePerformanceFeedbackResponse1, ProvidePerformanceFeedbackResponse2]]
  • adcp.types.core.TaskResult[Union[SyncAccountsResponse1, SyncAccountsResponse2]]
  • adcp.types.core.TaskResult[Union[SyncAudiencesResponse1, SyncAudiencesResponse2, SyncAudiencesResponse3]]
  • adcp.types.core.TaskResult[Union[SyncCatalogsResponse1, SyncCatalogsResponse2, SyncCatalogsResponse3]]
  • adcp.types.core.TaskResult[Union[SyncCreativesResponse1, SyncCreativesResponse2, SyncCreativesResponse3]]
  • adcp.types.core.TaskResult[Union[SyncEventSourcesResponse1, SyncEventSourcesResponse2]]
  • adcp.types.core.TaskResult[Union[UpdateMediaBuyResponse1, UpdateMediaBuyResponse2, UpdateMediaBuyResponse3]]
  • adcp.types.core.TaskResult[Union[UpdateRightsResponse1, UpdateRightsResponse2]]
  • adcp.types.core.TaskResult[Union[ValidateContentDeliveryResponse1, ValidateContentDeliveryResponse2]]
  • adcp.types.core.TaskResult[UpdateCollectionListResponse]
  • adcp.types.core.TaskResult[UpdateContentStandardsResponse]
  • adcp.types.core.TaskResult[UpdatePropertyListResponse]

Class variables

var adcp_error : dict[str, typing.Any] | None
var data : ~T | None
var debug_infoDebugInfo | None
var error : str | None
var idempotency_key : str | None
var message : str | None
var metadata : dict[str, typing.Any] | None
var model_config
var needs_inputNeedsInputInfo | None
var replayed : bool
var statusTaskStatus
var submittedSubmittedInfo | None
var success : bool
class GeneratedTaskStatus (*args, **kwds)
Expand source code
class TaskStatus(StrEnum):
    submitted = 'submitted'
    working = 'working'
    input_required = 'input-required'
    completed = 'completed'
    canceled = 'canceled'
    failed = 'failed'
    rejected = 'rejected'
    auth_required = 'auth-required'
    unknown = 'unknown'

Enum where members are also (and must be) strings

Ancestors

  • enum.StrEnum
  • builtins.str
  • enum.ReprEnum
  • enum.Enum

Class variables

var auth_required
var canceled
var completed
var failed
var input_required
var rejected
var submitted
var unknown
var working
class TaskType (*args, **kwds)
Expand source code
class TaskType(StrEnum):
    create_media_buy = 'create_media_buy'
    update_media_buy = 'update_media_buy'
    media_buy_delivery = 'media_buy_delivery'
    sync_creatives = 'sync_creatives'
    build_creative = 'build_creative'
    activate_signal = 'activate_signal'
    get_products = 'get_products'
    get_signals = 'get_signals'
    create_property_list = 'create_property_list'
    update_property_list = 'update_property_list'
    get_property_list = 'get_property_list'
    list_property_lists = 'list_property_lists'
    delete_property_list = 'delete_property_list'
    sync_accounts = 'sync_accounts'
    get_account_financials = 'get_account_financials'
    get_creative_delivery = 'get_creative_delivery'
    sync_event_sources = 'sync_event_sources'
    sync_audiences = 'sync_audiences'
    sync_catalogs = 'sync_catalogs'
    log_event = 'log_event'
    get_brand_identity = 'get_brand_identity'
    search_brands = 'search_brands'
    get_rights = 'get_rights'
    acquire_rights = 'acquire_rights'

Enum where members are also (and must be) strings

Ancestors

  • enum.StrEnum
  • builtins.str
  • enum.ReprEnum
  • enum.Enum

Class variables

var acquire_rights
var activate_signal
var build_creative
var create_media_buy
var create_property_list
var delete_property_list
var get_account_financials
var get_brand_identity
var get_creative_delivery
var get_products
var get_property_list
var get_rights
var get_signals
var list_property_lists
var log_event
var media_buy_delivery
var search_brands
var sync_accounts
var sync_audiences
var sync_catalogs
var sync_creatives
var sync_event_sources
var update_media_buy
var update_property_list
class WebhookChallenge (**data: Any)
Expand source code
class WebhookChallenge(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    type: Annotated[
        Literal['webhook.challenge'],
        Field(description='Discriminator for endpoint proof-of-control challenges.'),
    ] = 'webhook.challenge'
    challenge: Annotated[
        str,
        Field(
            description='Opaque, cryptographically random value that the receiver must echo in the response body. Recommended encoding: base64url without padding.',
            max_length=255,
            min_length=32,
            pattern='^[A-Za-z0-9_.:-]{32,255}$',
        ),
    ]
    account_id: Annotated[
        str,
        Field(
            description='Seller account identifier for the account whose notification_configs[] entry is being challenged.'
        ),
    ]
    subscriber_id: Annotated[
        str,
        Field(
            description='Buyer-supplied subscriber identifier from the notification_configs[] entry being challenged.',
            max_length=64,
            min_length=1,
            pattern='^[A-Za-z0-9_.:-]{1,64}$',
        ),
    ]
    seller_agent_url: Annotated[
        AnyUrl,
        Field(
            description='Exact seller agent URL whose RFC 9421 webhook profile key signs this challenge and that will send subsequent webhooks.'
        ),
    ]
    delivery_auth: Annotated[
        DeliveryAuth,
        Field(
            description='Authentication/signing mode the seller will use for subsequent webhooks delivered to this notification config.'
        ),
    ]
    event_types: Annotated[
        list[notification_type.NotificationType],
        Field(
            description='Normalized notification types requested by the subscriber at the time of the challenge. Part of the endpoint proof scope; changing event_types[] requires a fresh challenge before the new set can become active.',
            min_length=1,
        ),
    ]

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var account_id : str
var challenge : str
var delivery_auth : adcp.types.generated_poc.core.webhook_challenge.DeliveryAuth
var event_types : list[adcp.types.generated_poc.enums.notification_type.NotificationType]
var model_config
var seller_agent_url : pydantic.networks.AnyUrl
var subscriber_id : str
var type : Literal['webhook.challenge']

Inherited members

class WebhookChallengeResponse (**data: Any)
Expand source code
class WebhookChallengeResponse(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    challenge: Annotated[
        str | None,
        Field(
            description='Echo of the challenge value supplied by the seller.',
            max_length=255,
            min_length=32,
            pattern='^[A-Za-z0-9_.:-]{32,255}$',
        ),
    ] = None
    token: Annotated[
        str | None,
        Field(
            description='Backward-compatible alias for `challenge`. Receivers SHOULD prefer `challenge`; sellers MUST accept either field.',
            max_length=255,
            min_length=32,
            pattern='^[A-Za-z0-9_.:-]{32,255}$',
        ),
    ] = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var challenge : str | None
var model_config
var token : str | None

Inherited members

class WebhookMetadata (**data: Any)
Expand source code
class WebhookMetadata(BaseModel):
    """Metadata passed to webhook handlers."""

    operation_id: str
    agent_id: str
    task_type: str
    status: TaskStatus
    sequence_number: int | None = None
    notification_type: Literal["scheduled", "final", "delayed"] | None = None
    timestamp: str

Metadata passed to webhook handlers.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

  • pydantic.main.BaseModel

Class variables

var agent_id : str
var model_config
var notification_type : Literal['scheduled', 'final', 'delayed'] | None
var operation_id : str
var sequence_number : int | None
var statusTaskStatus
var task_type : str
var timestamp : str
class WebhookResponseType (*args, **kwds)
Expand source code
class WebhookResponseType(StrEnum):
    html = 'html'
    json = 'json'
    xml = 'xml'
    javascript = 'javascript'

Enum where members are also (and must be) strings

Ancestors

  • enum.StrEnum
  • builtins.str
  • enum.ReprEnum
  • enum.Enum

Class variables

var html
var javascript
var json
var xml