> ## Documentation Index
> Fetch the complete documentation index at: https://docs.interchange.io/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.interchange.io/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.interchange.io/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:
            description: Unique identifier for the campaign
            example: cmp_987654321
            type: string
            minLength: 1
          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:
      description: >-
        Optional request body for executing a campaign. Unknown fields are
        rejected.
      type: object
      properties:
        debug:
          description: >-
            When true, includes detailed debug information in error responses
            from media buy execution
          type: boolean
      additionalProperties: false
    CampaignStatusChangeResponse:
      description: Response from executing or pausing a campaign
      type: object
      properties:
        campaignId:
          description: Campaign ID
          example: cmp_987654321
          type: string
        previousStatus:
          description: Previous campaign status
          type: string
          enum:
            - DRAFT
            - ACTIVE
            - PAUSED
            - COMPLETED
            - CANCELED
            - ARCHIVED
        newStatus:
          description: New campaign status
          type: string
          enum:
            - DRAFT
            - ACTIVE
            - PAUSED
            - COMPLETED
            - CANCELED
            - ARCHIVED
        success:
          description: >-
            Whether the status change was fully successful. False when any media
            buy execution failed.
          type: boolean
        mediaBuysExecuted:
          description: >-
            Number of media buys that execution was attempted for. Always
            present on execute responses; absent on pause responses. 0 indicates
            a no-op execute (nothing to execute, campaign status preserved).
          example: 2
          type: integer
          minimum: 0
          maximum: 9007199254740991
        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).
            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
    ErrorResponse:
      description: Standard error response
      type: object
      properties:
        data:
          type: string
          nullable: true
          enum:
            - null
        error:
          $ref: '#/components/schemas/ApiError'
      required:
        - data
        - error
      additionalProperties: false
    ExecutionError:
      description: Structured error detail for a failed media buy execution
      type: object
      properties:
        mediaBuyId:
          description: The media buy ID that failed
          type: string
        salesAgentId:
          description: The sales agent ID associated with the failed media buy
          type: string
        message:
          description: Human-readable error message
          type: string
        debug:
          $ref: '#/components/schemas/ExecuteMediaBuyDebugInfo'
      required:
        - mediaBuyId
        - salesAgentId
        - message
      additionalProperties: false
    ExecuteWarning:
      description: A non-fatal outcome from campaign execution
      oneOf:
        - type: object
          properties:
            type:
              type: string
              enum:
                - creatives_dropped
            mediaBuyId:
              description: The media buy ID these creatives were dropped from
              type: string
            dropped:
              description: Creatives that were dropped and why
              type: array
              items:
                type: object
                properties:
                  creativeId:
                    description: Creative ID that was dropped
                    type: string
                  formatId:
                    description: Format ID of the dropped creative
                    type: string
                  reason:
                    description: Why the creative was dropped from this buy
                    type: string
                required:
                  - creativeId
                  - formatId
                  - reason
                additionalProperties: false
          required:
            - type
            - mediaBuyId
            - dropped
          additionalProperties: false
        - type: object
          properties:
            type:
              type: string
              enum:
                - stale_draft
            mediaBuyIds:
              description: IDs of the existing DRAFT media buys that were retried as-is
              type: array
              items:
                type: string
            hint:
              description: >-
                Actionable guidance: explains why the new discovery selection
                was not applied and how to apply it
              type: string
          required:
            - type
            - mediaBuyIds
            - hint
          additionalProperties: false
      type: object
    ApiError:
      description: Structured error object
      type: object
      properties:
        code:
          description: Machine-readable error code
          type: string
        message:
          description: Human-readable error message
          type: string
        field:
          description: Field path associated with the error
          type: string
        details:
          description: Additional error context
          type: object
          additionalProperties: {}
      required:
        - code
        - message
      additionalProperties: false
    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
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key or access token

````