> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apostra.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Execute campaign

> Launch/execute a campaign to start delivering ads. Pass `debug: true` in the request body to include detailed debug information in error responses.



## OpenAPI

````yaml /v2/buyer-api-v2.yaml post /campaigns/{campaignId}/execute
openapi: 3.0.0
info:
  title: Scope3 Buyer API
  version: 2.0.0
  description: |-
    REST API for advertisers to manage advertisers, campaigns, and reporting.

    ## Authentication

    All endpoints require a Bearer token in the Authorization header:
    ```
    Authorization: Bearer your-api-key
    ```

    ## Base URL

    `https://api.apostra.com/api/v2/buyer`

    ## For AI Agents

    AI agents can use the MCP endpoint at `/mcp/v2/buyer` with three tools:
    - `initialize`: Start an MCP session
    - `api_call`: Make REST API calls
    - `ask_about_capability`: Learn about API features
servers:
  - url: https://api.apostra.com/api/v2/buyer
    description: Production server
security: []
tags:
  - name: Signup
    description: Request reviewed access to Interchange
  - name: Account
    description: Account management, service tokens, and preferences
  - name: Asks
    description: >-
      What you are waiting on Scope3 for — support, product, and supply asks in
      one list
  - name: Advertisers
    description: Manage advertisers
  - name: Product Discovery
    description: Discover and select products
  - name: Campaigns
    description: Manage advertising campaigns
  - name: Creatives
    description: Build, manage, and sync campaign creatives via AdCP Creative Protocol
  - name: Reporting
    description: Access performance metrics
  - name: Event Sources
    description: >-
      Manage event source configurations and log conversion/marketing events for
      attribution
  - name: Property Lists
    description: Validate property lists against AAO registry
  - name: Sales Agents
    description: View and connect sales agents
  - name: Measurement
    description: Measurement sources, records, context, and freshness
  - name: Syndication
    description: Syndicate resources to ADCP agents
  - name: Tasks
    description: Track async operation status
  - name: Buyer Billing
    description: >-
      Consolidated invoicing for buyers — invoices and pending invoice items
      issued by Scope3 across the buyer customer.
  - name: MCP
    description: Model Context Protocol endpoints for AI agents
paths:
  /campaigns/{campaignId}/execute:
    post:
      tags:
        - Campaigns
      summary: Execute campaign
      description: >-
        Launch/execute a campaign to start delivering ads. Pass `debug: true` in
        the request body to include detailed debug information in error
        responses.
      operationId: executeCampaign
      parameters:
        - in: path
          name: id
          schema:
            type: string
            minLength: 1
            description: Unique identifier for the campaign
            example: cmp_987654321
          required: true
          description: Unique identifier for the campaign
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExecuteCampaignBody'
      responses:
        '200':
          description: Execute campaign
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignStatusChangeResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    ExecuteCampaignBody:
      type: object
      properties:
        debug:
          description: >-
            When true, includes detailed debug information in error responses
            from media buy execution
          type: boolean
      additionalProperties: false
      description: >-
        Optional request body for executing a campaign. Unknown fields are
        rejected.
    CampaignStatusChangeResponse:
      type: object
      properties:
        campaignId:
          type: string
          description: Campaign ID
          example: cmp_987654321
        previousStatus:
          type: string
          enum:
            - DRAFT
            - ACTIVE
            - PAUSED
            - ENDING
            - COMPLETED
            - CANCELED
            - ARCHIVED
          description: Previous campaign status
        newStatus:
          type: string
          enum:
            - DRAFT
            - ACTIVE
            - PAUSED
            - ENDING
            - COMPLETED
            - CANCELED
            - ARCHIVED
          description: New campaign status
        success:
          type: boolean
          description: >-
            Whether the status change was fully successful. False when any media
            buy execution failed.
        mediaBuysExecuted:
          description: >-
            Number of DRAFT media buys for which execution was attempted. Always
            present on execute responses; absent on pause responses. This
            existing field can include failed attempts; use mediaBuysSucceeded
            for successful executions.
          example: 2
          type: integer
          minimum: 0
          maximum: 9007199254740991
        mediaBuysAttempted:
          description: >-
            Number of DRAFT media buys for which execution was attempted. Always
            present on execute responses; absent on pause responses. This equals
            mediaBuysExecuted and mediaBuysSucceeded plus mediaBuysFailed.
          type: integer
          minimum: 0
          maximum: 9007199254740991
        mediaBuysSucceeded:
          type: integer
          minimum: 0
          maximum: 9007199254740991
          description: >-
            Number of attempted media buys that executed successfully. Use this
            field to identify successful executions.
        mediaBuysFailed:
          type: integer
          minimum: 0
          maximum: 9007199254740991
          description: >-
            Number of attempted media buys that failed. Each failure has an
            entry in errors.
        reason:
          description: >-
            Machine-readable reason for a no-op execute. Present only when the
            campaign had no media buys to execute, in which case the campaign
            status is preserved rather than set to ACTIVE.
          type: string
          enum:
            - no_media_buys_to_execute
        errors:
          description: >-
            Structured error details per failed media buy. Only present when
            there are failures.
          type: array
          items:
            $ref: '#/components/schemas/ExecutionError'
        warnings:
          description: >-
            Non-fatal outcomes from execution. creatives_dropped: a buy
            forwarded with a compatible creative subset (which may be empty).
            optimization_goals_dropped: a buy forwarded without optimization
            goals its product does not declare it can optimize to (the goals
            were still disclosed in the seller brief). pacing_not_applied: a buy
            launched without the campaign's asap or front_loaded pacing because
            the seller (Meta) does not accept a pacing instruction; it runs on
            the seller's standard even pacing. stale_draft: the existing DRAFT
            cart was retried as-is because discovery products were updated via
            add_discovery_products after the last staging run — call
            create_media_buys with replace: true to apply the new selection.
          type: array
          items:
            $ref: '#/components/schemas/ExecuteWarning'
      required:
        - campaignId
        - previousStatus
        - newStatus
        - success
      additionalProperties: false
      description: Response from executing or pausing a campaign
    ErrorResponse:
      type: object
      properties:
        data:
          type: string
          nullable: true
          enum:
            - null
        error:
          $ref: '#/components/schemas/ApiError'
      required:
        - data
        - error
      additionalProperties: false
      description: Standard error response
    ExecutionError:
      type: object
      properties:
        mediaBuyId:
          type: string
          description: The media buy ID that failed
        salesAgentId:
          type: string
          description: >-
            The public sales agent ID associated with the failed media buy.
            Typed Storefront routes use their stable storefront agent identity.
        message:
          type: string
          description: Human-readable error message
        code:
          description: >-
            Bounded structured execution error code. Seller-defined codes remain
            available in structured data but are not automatically rendered into
            model-facing text.
          type: string
          minLength: 1
          maxLength: 128
        recovery:
          type: string
          enum:
            - transient
            - correctable
            - terminal
        scope3_partial_creation:
          type: object
          properties:
            provider:
              type: string
              enum:
                - amazon
            provider_account_id:
              type: string
              minLength: 1
            media_buy_id:
              type: string
              pattern: ^[1-9][0-9]*$
            resource_type:
              type: string
              enum:
                - sp_campaign
            failure_stage:
              type: string
              enum:
                - ad_group_create
                - product_ads_create
                - keywords_create
                - campaign_activate
            disposition:
              type: string
              enum:
                - retained_paused
            cleanup_required:
              type: boolean
              enum:
                - true
            retry_safe:
              type: boolean
              enum:
                - false
          required:
            - provider
            - provider_account_id
            - media_buy_id
            - resource_type
            - failure_stage
            - disposition
            - cleanup_required
            - retry_safe
          additionalProperties: false
        scope3_create_uncertain:
          anyOf:
            - type: object
              properties:
                provider:
                  type: string
                  enum:
                    - amazon
                provider_account_id:
                  type: string
                  minLength: 1
                resource_type:
                  type: string
                  enum:
                    - sp_campaign
                    - sb_campaign
                    - sd_campaign
                    - dsp_order
                operation:
                  type: string
                  enum:
                    - create
                disposition:
                  type: string
                  enum:
                    - accepted_unknown
                cleanup_required:
                  type: boolean
                  enum:
                    - true
                retry_safe:
                  type: boolean
                  enum:
                    - false
              required:
                - provider
                - provider_account_id
                - resource_type
                - operation
                - disposition
                - cleanup_required
                - retry_safe
              additionalProperties: false
            - type: object
              properties:
                provider:
                  type: string
                  enum:
                    - amazon
                provider_account_id:
                  type: string
                  minLength: 1
                operation:
                  type: string
                  enum:
                    - create
                disposition:
                  type: string
                  enum:
                    - accepted_unknown
                identity_status:
                  type: string
                  enum:
                    - invalid
                cleanup_required:
                  type: boolean
                  enum:
                    - true
                retry_safe:
                  type: boolean
                  enum:
                    - false
              required:
                - provider
                - provider_account_id
                - operation
                - disposition
                - identity_status
                - cleanup_required
                - retry_safe
              additionalProperties: false
            - type: object
              properties:
                provider:
                  type: string
                  enum:
                    - amazon
                provider_account_id:
                  type: string
                  minLength: 1
                operation:
                  type: string
                  enum:
                    - create
                identity_status:
                  type: string
                  enum:
                    - invalid
                disposition:
                  type: string
                  enum:
                    - accepted_unknown
                cleanup_required:
                  type: boolean
                  enum:
                    - true
                retry_safe:
                  type: boolean
                  enum:
                    - false
              required:
                - provider
                - provider_account_id
                - operation
                - identity_status
                - disposition
                - cleanup_required
                - retry_safe
              additionalProperties: false
        scope3_mutation_uncertain:
          oneOf:
            - type: object
              properties:
                provider:
                  type: string
                  enum:
                    - amazon
                provider_account_id:
                  type: string
                  minLength: 1
                media_buy_id:
                  type: string
                  pattern: ^[1-9][0-9]*$
                resource_type:
                  type: string
                  enum:
                    - sp_campaign
                disposition:
                  type: string
                  enum:
                    - accepted_unconfirmed
                cleanup_required:
                  type: boolean
                  enum:
                    - true
                retry_safe:
                  type: boolean
                  enum:
                    - false
                operation:
                  type: string
                  enum:
                    - cancel
                requested_state:
                  type: string
                  enum:
                    - paused
              required:
                - provider
                - provider_account_id
                - media_buy_id
                - resource_type
                - disposition
                - cleanup_required
                - retry_safe
                - operation
                - requested_state
              additionalProperties: false
            - type: object
              properties:
                provider:
                  type: string
                  enum:
                    - amazon
                provider_account_id:
                  type: string
                  minLength: 1
                media_buy_id:
                  type: string
                  pattern: ^[1-9][0-9]*$
                resource_type:
                  type: string
                  enum:
                    - sp_campaign
                disposition:
                  type: string
                  enum:
                    - accepted_unconfirmed
                cleanup_required:
                  type: boolean
                  enum:
                    - true
                retry_safe:
                  type: boolean
                  enum:
                    - false
                operation:
                  type: string
                  enum:
                    - update
                requested_state:
                  type: string
                  enum:
                    - paused
                    - enabled
              required:
                - provider
                - provider_account_id
                - media_buy_id
                - resource_type
                - disposition
                - cleanup_required
                - retry_safe
                - operation
              additionalProperties: false
            - type: object
              properties:
                provider:
                  type: string
                  enum:
                    - amazon
                provider_account_id:
                  type: string
                  minLength: 1
                media_buy_id:
                  type: string
                  pattern: ^[1-9][0-9]*$
                resource_type:
                  type: string
                  enum:
                    - sp_campaign
                disposition:
                  type: string
                  enum:
                    - accepted_unconfirmed
                cleanup_required:
                  type: boolean
                  enum:
                    - true
                retry_safe:
                  type: boolean
                  enum:
                    - false
                operation:
                  type: string
                  enum:
                    - create_activation
                requested_state:
                  type: string
                  enum:
                    - enabled
              required:
                - provider
                - provider_account_id
                - media_buy_id
                - resource_type
                - disposition
                - cleanup_required
                - retry_safe
                - operation
                - requested_state
              additionalProperties: false
          type: object
        cleanup_required:
          type: boolean
          enum:
            - true
        retry_safe:
          type: boolean
          enum:
            - false
        debug:
          $ref: '#/components/schemas/ExecuteMediaBuyDebugInfo'
      required:
        - mediaBuyId
        - salesAgentId
        - message
      additionalProperties: false
      description: Structured error detail for a failed media buy execution
    ExecuteWarning:
      oneOf:
        - type: object
          properties:
            type:
              type: string
              enum:
                - creatives_dropped
            mediaBuyId:
              type: string
              description: The media buy ID these creatives were dropped from
            dropped:
              type: array
              items:
                type: object
                properties:
                  creativeId:
                    type: string
                    description: Creative ID that was dropped
                  formatId:
                    type: string
                    description: Format ID of the dropped creative
                  reason:
                    type: string
                    description: Why the creative was dropped from this buy
                required:
                  - creativeId
                  - formatId
                  - reason
                additionalProperties: false
              description: Creatives that were dropped and why
          required:
            - type
            - mediaBuyId
            - dropped
          additionalProperties: false
        - type: object
          properties:
            type:
              type: string
              enum:
                - optimization_goals_dropped
            mediaBuyId:
              type: string
              description: The media buy these optimization goals were not sent on
            dropped:
              type: array
              items:
                type: object
                properties:
                  productId:
                    type: string
                    description: Product whose package was sent without this goal
                  buyerRef:
                    type: string
                    description: >-
                      The line item's buyer_ref (every pacing period of the line
                      item shares it)
                  goal:
                    anyOf:
                      - type: object
                        properties:
                          kind:
                            type: string
                            enum:
                              - metric
                          metric:
                            anyOf:
                              - type: string
                                enum:
                                  - clicks
                              - type: string
                                enum:
                                  - views
                              - type: string
                                enum:
                                  - completed_views
                              - type: string
                                enum:
                                  - viewed_seconds
                              - type: string
                                enum:
                                  - viewable_rate
                              - type: string
                                enum:
                                  - attention_seconds
                              - type: string
                                enum:
                                  - attention_score
                              - type: string
                                enum:
                                  - engagements
                              - type: string
                                enum:
                                  - follows
                              - type: string
                                enum:
                                  - saves
                              - type: string
                                enum:
                                  - profile_visits
                              - type: string
                                enum:
                                  - reach
                          standard:
                            anyOf:
                              - type: string
                                enum:
                                  - mrc
                              - type: string
                                enum:
                                  - groupm
                          vendor:
                            type: object
                            properties:
                              domain:
                                type: string
                                pattern: >-
                                  ^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$
                              brand_id:
                                type: string
                                pattern: ^[a-z0-9_]+$
                              countries:
                                type: array
                                items:
                                  type: string
                              industries:
                                type: array
                                items:
                                  type: string
                              data_subject_contestation:
                                type: object
                                properties: {}
                                additionalProperties: {}
                              brand_kit_override:
                                type: object
                                properties:
                                  logo:
                                    type: object
                                    properties:
                                      asset_type:
                                        type: string
                                        enum:
                                          - image
                                      url:
                                        type: string
                                      width:
                                        type: integer
                                        minimum: 1
                                        maximum: 9007199254740991
                                      height:
                                        type: integer
                                        minimum: 1
                                        maximum: 9007199254740991
                                      file_size_bytes:
                                        type: integer
                                        minimum: 1
                                        maximum: 9007199254740991
                                      pixel_ratio:
                                        type: number
                                        minimum: 0
                                        exclusiveMinimum: true
                                      state_id:
                                        type: string
                                      breakpoint_id:
                                        type: string
                                      focal_point:
                                        type: array
                                        items:
                                          anyOf:
                                            - type: number
                                            - type: number
                                        minItems: 2
                                        maxItems: 2
                                      format:
                                        type: string
                                      alt_text:
                                        type: string
                                      provenance:
                                        type: object
                                        properties:
                                          digital_source_type:
                                            anyOf:
                                              - type: string
                                                enum:
                                                  - digital_capture
                                              - type: string
                                                enum:
                                                  - digital_creation
                                              - type: string
                                                enum:
                                                  - trained_algorithmic_media
                                              - type: string
                                                enum:
                                                  - composite_with_trained_algorithmic_media
                                              - type: string
                                                enum:
                                                  - algorithmic_media
                                              - type: string
                                                enum:
                                                  - composite_capture
                                              - type: string
                                                enum:
                                                  - composite_synthetic
                                              - type: string
                                                enum:
                                                  - human_edits
                                              - type: string
                                                enum:
                                                  - data_driven_media
                                          synthetic_depiction:
                                            type: boolean
                                          ai_tool:
                                            type: object
                                            properties:
                                              name:
                                                type: string
                                              version:
                                                type: string
                                              provider:
                                                type: string
                                            required:
                                              - name
                                            additionalProperties: {}
                                          human_oversight:
                                            anyOf:
                                              - type: string
                                                enum:
                                                  - none
                                              - type: string
                                                enum:
                                                  - prompt_only
                                              - type: string
                                                enum:
                                                  - selected
                                              - type: string
                                                enum:
                                                  - edited
                                              - type: string
                                                enum:
                                                  - directed
                                          declared_by:
                                            type: object
                                            properties:
                                              agent_url:
                                                type: string
                                              role:
                                                anyOf:
                                                  - type: string
                                                    enum:
                                                      - creator
                                                  - type: string
                                                    enum:
                                                      - advertiser
                                                  - type: string
                                                    enum:
                                                      - agency
                                                  - type: string
                                                    enum:
                                                      - platform
                                                  - type: string
                                                    enum:
                                                      - tool
                                            required:
                                              - role
                                            additionalProperties: {}
                                          declared_at:
                                            type: string
                                          created_time:
                                            type: string
                                          c2pa:
                                            type: object
                                            properties:
                                              manifest_url:
                                                type: string
                                            required:
                                              - manifest_url
                                            additionalProperties: {}
                                          embedded_provenance:
                                            type: array
                                            items:
                                              type: object
                                              properties:
                                                method:
                                                  anyOf:
                                                    - type: string
                                                      enum:
                                                        - manifest_wrapper
                                                    - type: string
                                                      enum:
                                                        - provenance_markers
                                                standard:
                                                  type: string
                                                provider:
                                                  type: string
                                                verify_agent:
                                                  type: object
                                                  properties:
                                                    agent_url:
                                                      type: string
                                                    feature_id:
                                                      type: string
                                                  required:
                                                    - agent_url
                                                  additionalProperties: {}
                                                embedded_at:
                                                  type: string
                                              required:
                                                - method
                                                - provider
                                              additionalProperties: {}
                                          watermarks:
                                            type: array
                                            items:
                                              type: object
                                              properties:
                                                media_type:
                                                  anyOf:
                                                    - type: string
                                                      enum:
                                                        - audio
                                                    - type: string
                                                      enum:
                                                        - image
                                                    - type: string
                                                      enum:
                                                        - video
                                                    - type: string
                                                      enum:
                                                        - text
                                                provider:
                                                  type: string
                                                verify_agent:
                                                  type: object
                                                  properties:
                                                    agent_url:
                                                      type: string
                                                    feature_id:
                                                      type: string
                                                  required:
                                                    - agent_url
                                                  additionalProperties: {}
                                                c2pa_action:
                                                  anyOf:
                                                    - type: string
                                                      enum:
                                                        - c2pa.watermarked.bound
                                                    - type: string
                                                      enum:
                                                        - c2pa.watermarked.unbound
                                                embedded_at:
                                                  type: string
                                              required:
                                                - media_type
                                                - provider
                                              additionalProperties: {}
                                          disclosure:
                                            type: object
                                            properties:
                                              required:
                                                type: boolean
                                              jurisdictions:
                                                type: array
                                                items:
                                                  type: object
                                                  properties:
                                                    country:
                                                      type: string
                                                    region:
                                                      type: string
                                                    regulation:
                                                      type: string
                                                    label_text:
                                                      type: string
                                                    render_guidance:
                                                      type: object
                                                      properties:
                                                        persistence:
                                                          anyOf:
                                                            - type: string
                                                              enum:
                                                                - continuous
                                                            - type: string
                                                              enum:
                                                                - initial
                                                            - type: string
                                                              enum:
                                                                - flexible
                                                        min_duration_ms:
                                                          type: integer
                                                          minimum: 1
                                                          maximum: 9007199254740991
                                                        positions:
                                                          type: array
                                                          items:
                                                            anyOf:
                                                              - type: string
                                                                enum:
                                                                  - prominent
                                                              - type: string
                                                                enum:
                                                                  - footer
                                                              - type: string
                                                                enum:
                                                                  - audio
                                                              - type: string
                                                                enum:
                                                                  - subtitle
                                                              - type: string
                                                                enum:
                                                                  - overlay
                                                              - type: string
                                                                enum:
                                                                  - end_card
                                                              - type: string
                                                                enum:
                                                                  - pre_roll
                                                              - type: string
                                                                enum:
                                                                  - companion
                                                        ext:
                                                          type: object
                                                          additionalProperties: {}
                                                      additionalProperties: {}
                                                  required:
                                                    - country
                                                    - regulation
                                                  additionalProperties: {}
                                            required:
                                              - required
                                            additionalProperties: {}
                                          verification:
                                            type: array
                                            items:
                                              type: object
                                              properties:
                                                verified_by:
                                                  type: string
                                                verified_time:
                                                  type: string
                                                result:
                                                  anyOf:
                                                    - type: string
                                                      enum:
                                                        - authentic
                                                    - type: string
                                                      enum:
                                                        - ai_generated
                                                    - type: string
                                                      enum:
                                                        - ai_modified
                                                    - type: string
                                                      enum:
                                                        - inconclusive
                                                confidence:
                                                  type: number
                                                  minimum: 0
                                                  maximum: 1
                                                details_url:
                                                  type: string
                                              required:
                                                - verified_by
                                                - result
                                              additionalProperties: {}
                                          ext:
                                            type: object
                                            additionalProperties: {}
                                        additionalProperties: {}
                                    required:
                                      - asset_type
                                      - url
                                      - width
                                      - height
                                    additionalProperties: {}
                                  colors:
                                    type: object
                                    properties:
                                      primary:
                                        type: string
                                        pattern: ^#[0-9a-fA-F]{6}$
                                      secondary:
                                        type: string
                                        pattern: ^#[0-9a-fA-F]{6}$
                                      accent:
                                        type: string
                                        pattern: ^#[0-9a-fA-F]{6}$
                                    additionalProperties: {}
                                  voice:
                                    type: string
                                  tagline:
                                    type: string
                                additionalProperties: {}
                            required:
                              - domain
                            additionalProperties: {}
                          reach_unit:
                            anyOf:
                              - type: string
                                enum:
                                  - individuals
                              - type: string
                                enum:
                                  - households
                              - type: string
                                enum:
                                  - devices
                              - type: string
                                enum:
                                  - accounts
                              - type: string
                                enum:
                                  - cookies
                              - type: string
                                enum:
                                  - custom
                          target_frequency:
                            type: object
                            properties:
                              min:
                                type: integer
                                minimum: 1
                                maximum: 9007199254740991
                              max:
                                type: integer
                                minimum: 1
                                maximum: 9007199254740991
                              window:
                                type: object
                                properties:
                                  interval:
                                    type: integer
                                    minimum: 1
                                    maximum: 9007199254740991
                                  unit:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - seconds
                                      - type: string
                                        enum:
                                          - minutes
                                      - type: string
                                        enum:
                                          - hours
                                      - type: string
                                        enum:
                                          - days
                                      - type: string
                                        enum:
                                          - campaign
                                required:
                                  - interval
                                  - unit
                                additionalProperties: {}
                            required:
                              - window
                            additionalProperties: {}
                          view_duration_seconds:
                            type: number
                            minimum: 0
                            exclusiveMinimum: true
                          target:
                            anyOf:
                              - type: object
                                properties:
                                  kind:
                                    type: string
                                    enum:
                                      - cost_per
                                  value:
                                    type: number
                                    minimum: 0
                                    exclusiveMinimum: true
                                required:
                                  - kind
                                  - value
                                additionalProperties: {}
                              - type: object
                                properties:
                                  kind:
                                    type: string
                                    enum:
                                      - threshold_rate
                                  value:
                                    type: number
                                    minimum: 0
                                    exclusiveMinimum: true
                                required:
                                  - kind
                                  - value
                                additionalProperties: {}
                          priority:
                            type: integer
                            minimum: 1
                            maximum: 9007199254740991
                        required:
                          - kind
                          - metric
                        additionalProperties: {}
                      - type: object
                        properties:
                          kind:
                            type: string
                            enum:
                              - event
                          event_sources:
                            type: array
                            items:
                              type: object
                              properties:
                                event_source_id:
                                  type: string
                                  minLength: 1
                                event_type:
                                  anyOf:
                                    - type: string
                                      enum:
                                        - page_view
                                    - type: string
                                      enum:
                                        - view_content
                                    - type: string
                                      enum:
                                        - select_content
                                    - type: string
                                      enum:
                                        - select_item
                                    - type: string
                                      enum:
                                        - search
                                    - type: string
                                      enum:
                                        - share
                                    - type: string
                                      enum:
                                        - add_to_cart
                                    - type: string
                                      enum:
                                        - remove_from_cart
                                    - type: string
                                      enum:
                                        - viewed_cart
                                    - type: string
                                      enum:
                                        - add_to_wishlist
                                    - type: string
                                      enum:
                                        - initiate_checkout
                                    - type: string
                                      enum:
                                        - add_payment_info
                                    - type: string
                                      enum:
                                        - purchase
                                    - type: string
                                      enum:
                                        - refund
                                    - type: string
                                      enum:
                                        - lead
                                    - type: string
                                      enum:
                                        - qualify_lead
                                    - type: string
                                      enum:
                                        - close_convert_lead
                                    - type: string
                                      enum:
                                        - disqualify_lead
                                    - type: string
                                      enum:
                                        - complete_registration
                                    - type: string
                                      enum:
                                        - subscribe
                                    - type: string
                                      enum:
                                        - follow
                                    - type: string
                                      enum:
                                        - content_view
                                    - type: string
                                      enum:
                                        - watch_milestone
                                    - type: string
                                      enum:
                                        - start_trial
                                    - type: string
                                      enum:
                                        - app_install
                                    - type: string
                                      enum:
                                        - app_launch
                                    - type: string
                                      enum:
                                        - contact
                                    - type: string
                                      enum:
                                        - schedule
                                    - type: string
                                      enum:
                                        - donate
                                    - type: string
                                      enum:
                                        - submit_application
                                    - type: string
                                      enum:
                                        - custom
                                custom_event_name:
                                  type: string
                                value_field:
                                  type: string
                                value_factor:
                                  type: number
                              required:
                                - event_source_id
                                - event_type
                              additionalProperties: {}
                          target:
                            anyOf:
                              - type: object
                                properties:
                                  kind:
                                    type: string
                                    enum:
                                      - cost_per
                                  value:
                                    type: number
                                    minimum: 0
                                    exclusiveMinimum: true
                                required:
                                  - kind
                                  - value
                                additionalProperties: {}
                              - type: object
                                properties:
                                  kind:
                                    type: string
                                    enum:
                                      - per_ad_spend
                                  value:
                                    type: number
                                    minimum: 0
                                    exclusiveMinimum: true
                                required:
                                  - kind
                                  - value
                                additionalProperties: {}
                              - type: object
                                properties:
                                  kind:
                                    type: string
                                    enum:
                                      - maximize_value
                                required:
                                  - kind
                                additionalProperties: {}
                          attribution_window:
                            type: object
                            properties:
                              post_click:
                                type: object
                                properties:
                                  interval:
                                    type: integer
                                    minimum: 1
                                    maximum: 9007199254740991
                                  unit:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - seconds
                                      - type: string
                                        enum:
                                          - minutes
                                      - type: string
                                        enum:
                                          - hours
                                      - type: string
                                        enum:
                                          - days
                                      - type: string
                                        enum:
                                          - campaign
                                required:
                                  - interval
                                  - unit
                                additionalProperties: {}
                              post_view:
                                type: object
                                properties:
                                  interval:
                                    type: integer
                                    minimum: 1
                                    maximum: 9007199254740991
                                  unit:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - seconds
                                      - type: string
                                        enum:
                                          - minutes
                                      - type: string
                                        enum:
                                          - hours
                                      - type: string
                                        enum:
                                          - days
                                      - type: string
                                        enum:
                                          - campaign
                                required:
                                  - interval
                                  - unit
                                additionalProperties: {}
                              model:
                                anyOf:
                                  - type: string
                                    enum:
                                      - last_touch
                                  - type: string
                                    enum:
                                      - first_touch
                                  - type: string
                                    enum:
                                      - linear
                                  - type: string
                                    enum:
                                      - time_decay
                                  - type: string
                                    enum:
                                      - data_driven
                            additionalProperties: {}
                          priority:
                            type: integer
                            minimum: 1
                            maximum: 9007199254740991
                        required:
                          - kind
                          - event_sources
                        additionalProperties: {}
                      - type: object
                        properties:
                          kind:
                            type: string
                            enum:
                              - vendor_metric
                          vendor:
                            type: object
                            properties:
                              domain:
                                type: string
                                pattern: >-
                                  ^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$
                              brand_id:
                                type: string
                                pattern: ^[a-z0-9_]+$
                              countries:
                                type: array
                                items:
                                  type: string
                              industries:
                                type: array
                                items:
                                  type: string
                              data_subject_contestation:
                                type: object
                                properties: {}
                                additionalProperties: {}
                              brand_kit_override:
                                type: object
                                properties:
                                  logo:
                                    type: object
                                    properties:
                                      asset_type:
                                        type: string
                                        enum:
                                          - image
                                      url:
                                        type: string
                                      width:
                                        type: integer
                                        minimum: 1
                                        maximum: 9007199254740991
                                      height:
                                        type: integer
                                        minimum: 1
                                        maximum: 9007199254740991
                                      file_size_bytes:
                                        type: integer
                                        minimum: 1
                                        maximum: 9007199254740991
                                      pixel_ratio:
                                        type: number
                                        minimum: 0
                                        exclusiveMinimum: true
                                      state_id:
                                        type: string
                                      breakpoint_id:
                                        type: string
                                      focal_point:
                                        type: array
                                        items:
                                          anyOf:
                                            - type: number
                                            - type: number
                                        minItems: 2
                                        maxItems: 2
                                      format:
                                        type: string
                                      alt_text:
                                        type: string
                                      provenance:
                                        type: object
                                        properties:
                                          digital_source_type:
                                            anyOf:
                                              - type: string
                                                enum:
                                                  - digital_capture
                                              - type: string
                                                enum:
                                                  - digital_creation
                                              - type: string
                                                enum:
                                                  - trained_algorithmic_media
                                              - type: string
                                                enum:
                                                  - composite_with_trained_algorithmic_media
                                              - type: string
                                                enum:
                                                  - algorithmic_media
                                              - type: string
                                                enum:
                                                  - composite_capture
                                              - type: string
                                                enum:
                                                  - composite_synthetic
                                              - type: string
                                                enum:
                                                  - human_edits
                                              - type: string
                                                enum:
                                                  - data_driven_media
                                          synthetic_depiction:
                                            type: boolean
                                          ai_tool:
                                            type: object
                                            properties:
                                              name:
                                                type: string
                                              version:
                                                type: string
                                              provider:
                                                type: string
                                            required:
                                              - name
                                            additionalProperties: {}
                                          human_oversight:
                                            anyOf:
                                              - type: string
                                                enum:
                                                  - none
                                              - type: string
                                                enum:
                                                  - prompt_only
                                              - type: string
                                                enum:
                                                  - selected
                                              - type: string
                                                enum:
                                                  - edited
                                              - type: string
                                                enum:
                                                  - directed
                                          declared_by:
                                            type: object
                                            properties:
                                              agent_url:
                                                type: string
                                              role:
                                                anyOf:
                                                  - type: string
                                                    enum:
                                                      - creator
                                                  - type: string
                                                    enum:
                                                      - advertiser
                                                  - type: string
                                                    enum:
                                                      - agency
                                                  - type: string
                                                    enum:
                                                      - platform
                                                  - type: string
                                                    enum:
                                                      - tool
                                            required:
                                              - role
                                            additionalProperties: {}
                                          declared_at:
                                            type: string
                                          created_time:
                                            type: string
                                          c2pa:
                                            type: object
                                            properties:
                                              manifest_url:
                                                type: string
                                            required:
                                              - manifest_url
                                            additionalProperties: {}
                                          embedded_provenance:
                                            type: array
                                            items:
                                              type: object
                                              properties:
                                                method:
                                                  anyOf:
                                                    - type: string
                                                      enum:
                                                        - manifest_wrapper
                                                    - type: string
                                                      enum:
                                                        - provenance_markers
                                                standard:
                                                  type: string
                                                provider:
                                                  type: string
                                                verify_agent:
                                                  type: object
                                                  properties:
                                                    agent_url:
                                                      type: string
                                                    feature_id:
                                                      type: string
                                                  required:
                                                    - agent_url
                                                  additionalProperties: {}
                                                embedded_at:
                                                  type: string
                                              required:
                                                - method
                                                - provider
                                              additionalProperties: {}
                                          watermarks:
                                            type: array
                                            items:
                                              type: object
                                              properties:
                                                media_type:
                                                  anyOf:
                                                    - type: string
                                                      enum:
                                                        - audio
                                                    - type: string
                                                      enum:
                                                        - image
                                                    - type: string
                                                      enum:
                                                        - video
                                                    - type: string
                                                      enum:
                                                        - text
                                                provider:
                                                  type: string
                                                verify_agent:
                                                  type: object
                                                  properties:
                                                    agent_url:
                                                      type: string
                                                    feature_id:
                                                      type: string
                                                  required:
                                                    - agent_url
                                                  additionalProperties: {}
                                                c2pa_action:
                                                  anyOf:
                                                    - type: string
                                                      enum:
                                                        - c2pa.watermarked.bound
                                                    - type: string
                                                      enum:
                                                        - c2pa.watermarked.unbound
                                                embedded_at:
                                                  type: string
                                              required:
                                                - media_type
                                                - provider
                                              additionalProperties: {}
                                          disclosure:
                                            type: object
                                            properties:
                                              required:
                                                type: boolean
                                              jurisdictions:
                                                type: array
                                                items:
                                                  type: object
                                                  properties:
                                                    country:
                                                      type: string
                                                    region:
                                                      type: string
                                                    regulation:
                                                      type: string
                                                    label_text:
                                                      type: string
                                                    render_guidance:
                                                      type: object
                                                      properties:
                                                        persistence:
                                                          anyOf:
                                                            - type: string
                                                              enum:
                                                                - continuous
                                                            - type: string
                                                              enum:
                                                                - initial
                                                            - type: string
                                                              enum:
                                                                - flexible
                                                        min_duration_ms:
                                                          type: integer
                                                          minimum: 1
                                                          maximum: 9007199254740991
                                                        positions:
                                                          type: array
                                                          items:
                                                            anyOf:
                                                              - type: string
                                                                enum:
                                                                  - prominent
                                                              - type: string
                                                                enum:
                                                                  - footer
                                                              - type: string
                                                                enum:
                                                                  - audio
                                                              - type: string
                                                                enum:
                                                                  - subtitle
                                                              - type: string
                                                                enum:
                                                                  - overlay
                                                              - type: string
                                                                enum:
                                                                  - end_card
                                                              - type: string
                                                                enum:
                                                                  - pre_roll
                                                              - type: string
                                                                enum:
                                                                  - companion
                                                        ext:
                                                          type: object
                                                          additionalProperties: {}
                                                      additionalProperties: {}
                                                  required:
                                                    - country
                                                    - regulation
                                                  additionalProperties: {}
                                            required:
                                              - required
                                            additionalProperties: {}
                                          verification:
                                            type: array
                                            items:
                                              type: object
                                              properties:
                                                verified_by:
                                                  type: string
                                                verified_time:
                                                  type: string
                                                result:
                                                  anyOf:
                                                    - type: string
                                                      enum:
                                                        - authentic
                                                    - type: string
                                                      enum:
                                                        - ai_generated
                                                    - type: string
                                                      enum:
                                                        - ai_modified
                                                    - type: string
                                                      enum:
                                                        - inconclusive
                                                confidence:
                                                  type: number
                                                  minimum: 0
                                                  maximum: 1
                                                details_url:
                                                  type: string
                                              required:
                                                - verified_by
                                                - result
                                              additionalProperties: {}
                                          ext:
                                            type: object
                                            additionalProperties: {}
                                        additionalProperties: {}
                                    required:
                                      - asset_type
                                      - url
                                      - width
                                      - height
                                    additionalProperties: {}
                                  colors:
                                    type: object
                                    properties:
                                      primary:
                                        type: string
                                        pattern: ^#[0-9a-fA-F]{6}$
                                      secondary:
                                        type: string
                                        pattern: ^#[0-9a-fA-F]{6}$
                                      accent:
                                        type: string
                                        pattern: ^#[0-9a-fA-F]{6}$
                                    additionalProperties: {}
                                  voice:
                                    type: string
                                  tagline:
                                    type: string
                                additionalProperties: {}
                            required:
                              - domain
                            additionalProperties: {}
                          metric_id:
                            type: string
                            minLength: 1
                            maxLength: 64
                            pattern: ^[a-z][a-z0-9_]*$
                          target:
                            anyOf:
                              - type: object
                                properties:
                                  kind:
                                    type: string
                                    enum:
                                      - cost_per
                                  value:
                                    type: number
                                    minimum: 0
                                    exclusiveMinimum: true
                                required:
                                  - kind
                                  - value
                                additionalProperties: {}
                              - type: object
                                properties:
                                  kind:
                                    type: string
                                    enum:
                                      - threshold_rate
                                  value:
                                    type: number
                                    minimum: 0
                                    exclusiveMinimum: true
                                required:
                                  - kind
                                  - value
                                additionalProperties: {}
                          priority:
                            type: integer
                            minimum: 1
                            maximum: 9007199254740991
                        required:
                          - kind
                          - vendor
                          - metric_id
                        additionalProperties: {}
                    description: The AdCP optimization goal that was not sent
                  code:
                    $ref: '#/components/schemas/DroppedOptimizationGoalCode'
                  reason:
                    type: string
                    description: Why the goal was not sent on this package
                required:
                  - productId
                  - buyerRef
                  - goal
                  - code
                  - reason
                additionalProperties: false
              description: >-
                Goals left off the buy's packages because the product does not
                declare it can optimize to them, and why
          required:
            - type
            - mediaBuyId
            - dropped
          additionalProperties: false
        - type: object
          properties:
            type:
              type: string
              enum:
                - pacing_not_applied
            mediaBuyId:
              type: string
              description: The media buy whose packages run on the seller pacing
            dropped:
              type: array
              items:
                type: object
                properties:
                  productId:
                    type: string
                    description: Product whose package runs on the seller default pacing
                  buyerRef:
                    type: string
                    description: >-
                      The line item's buyer_ref (every pacing period of the line
                      item shares it)
                  requestedPacing:
                    type: string
                    enum:
                      - even
                      - asap
                      - front_loaded
                    description: The campaign pacing that was not sent to the seller
                  appliedPacing:
                    type: string
                    enum:
                      - even
                      - asap
                      - front_loaded
                    description: The pacing the seller applies instead
                  reason:
                    type: string
                    description: >-
                      Why the pacing was not sent and what the seller does
                      instead
                required:
                  - productId
                  - buyerRef
                  - requestedPacing
                  - appliedPacing
                  - reason
                additionalProperties: false
              description: >-
                Packages whose campaign pacing the seller cannot take, so they
                run on the seller's standard even pacing, and why
          required:
            - type
            - mediaBuyId
            - dropped
          additionalProperties: false
        - type: object
          properties:
            type:
              type: string
              enum:
                - stale_draft
            mediaBuyIds:
              type: array
              items:
                type: string
              description: IDs of the existing DRAFT media buys that were retried as-is
            hint:
              type: string
              description: >-
                Actionable guidance: explains why the new discovery selection
                was not applied and how to apply it
          required:
            - type
            - mediaBuyIds
            - hint
          additionalProperties: false
      description: A non-fatal outcome from campaign execution
      type: object
    ApiError:
      type: object
      properties:
        code:
          type: string
          description: Machine-readable error code
        message:
          type: string
          description: Human-readable error message
        field:
          description: Field path associated with the error
          type: string
        details:
          description: Additional error context
          type: object
          additionalProperties: {}
      required:
        - code
        - message
      additionalProperties: false
      description: Structured error object
    ExecuteMediaBuyDebugInfo:
      description: >-
        Full debug info including ADCP request, response, and A2A debug logs.
        Only present when debug=true. Same structure as v1 execute_media_buy
        debug output.
      type: object
      properties:
        request:
          description: >-
            The full ADCP create_media_buy request payload sent to the sales
            agent
          type: object
          additionalProperties: {}
        response:
          description: The full ADCP response from the sales agent
          type: object
          additionalProperties: {}
        debugLogs:
          description: Full A2A request/response debug logs from the ADCP client
          type: array
          items:
            type: object
            additionalProperties: {}
        error:
          description: Error message if the execution failed
          type: string
      additionalProperties: false
    DroppedOptimizationGoalCode:
      type: string
      enum:
        - goal_kind_not_declared
        - metric_not_declared
        - target_kind_not_declared
        - reach_unit_not_declared
        - view_duration_not_declared
        - viewability_standard_not_declared
        - vendor_metric_not_declared
        - over_max_optimization_goals
      description: >-
        Why the goal was not sent: the product's AdCP optimization declaration
        (metric_optimization, conversion_tracking, vendor_metric_optimization)
        does not cover the goal's kind, metric, target kind, reach unit, view
        duration, viewability standard or vendor metric, or the product's
        max_optimization_goals was reached.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key or access token

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.