> ## 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.

# Plan a directed campaign from a brief (alpha)

> Resolve an advertiser brief into reviewable provider-native decisions before any directed write. Ambiguous or unsupported inputs return clarification requirements and no actionable products. Requires both directed-campaign alpha flags, an active advertiser mapping and subscription, and provider write support.



## OpenAPI

````yaml /v2/buyer-api-v2.yaml post /storefront-connections/{connectionId}/accounts/{accountId}/directed-campaigns/plan
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: Account
    description: Account management, service tokens, and preferences
  - 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: Planning Briefs
    description: >-
      Share prospective briefs with publishers and collect their
      fit/quote/clarify/decline/book responses (gated by the
      demand-supply-signals flag).
  - 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:
  /storefront-connections/{connectionId}/accounts/{accountId}/directed-campaigns/plan:
    post:
      tags:
        - Storefronts
      summary: Plan a directed campaign from a brief (alpha)
      description: >-
        Resolve an advertiser brief into reviewable provider-native decisions
        before any directed write. Ambiguous or unsupported inputs return
        clarification requirements and no actionable products. Requires both
        directed-campaign alpha flags, an active advertiser mapping and
        subscription, and provider write support.
      operationId: planDirectedCampaign
      parameters:
        - in: path
          name: connectionId
          schema:
            description: Storefront connection ID
            type: integer
            format: int64
          required: true
          description: Storefront connection ID
        - in: path
          name: accountId
          schema:
            description: Storefront connection account ID
            type: integer
            format: int64
          required: true
          description: Storefront connection account ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlanDirectedCampaignBody'
      responses:
        '200':
          description: Plan a directed campaign from a brief (alpha)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlanDirectedCampaignResponse'
        '400':
          description: >-
            The request is invalid or the account is not actively subscribed for
            directed campaigns.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: >-
            Directed campaign reads or writes are not enabled, or the advertiser
            is inaccessible.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: >-
            The connected provider does not support controlled brief planning or
            directed campaign writes.
          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:
    PlanDirectedCampaignBody:
      description: Read-only planning request for a connected directed-campaign account.
      type: object
      properties:
        advertiserId:
          description: Numeric advertiser ID mapped to the subscribed provider account
          type: string
          pattern: ^[1-9]\d*$
        brief:
          description: >-
            Advertiser brief to resolve into reviewable provider-native
            decisions before any directed write
          type: string
          minLength: 20
          maxLength: 4000
      required:
        - advertiserId
        - brief
      additionalProperties: false
    PlanDirectedCampaignResponse:
      description: >-
        A read-only, provider-grounded directed-campaign plan or explicit
        clarification request. No provider extension fields are exposed.
      oneOf:
        - type: object
          properties:
            provider:
              type: string
              minLength: 1
            products:
              minItems: 1
              type: array
              items:
                type: object
                properties:
                  product_id:
                    type: string
                    minLength: 1
                  name:
                    type: string
                  pricing_options:
                    type: array
                    items:
                      type: object
                      properties:
                        pricing_option_id:
                          type: string
                          minLength: 1
                      required:
                        - pricing_option_id
                      additionalProperties: {}
                required:
                  - product_id
                  - pricing_options
                additionalProperties: {}
            schema_version:
              type: number
              enum:
                - 1
            intent:
              anyOf:
                - type: object
                  properties:
                    goal:
                      nullable: true
                      type: string
                      minLength: 1
                    geo_countries:
                      type: array
                      items:
                        type: string
                        pattern: ^[A-Z]{2}$
                    age_ranges:
                      type: array
                      items:
                        type: string
                        enum:
                          - 18-24
                          - 25-34
                          - 35-44
                          - 45-54
                          - 55-64
                          - 65+
                    genders:
                      type: array
                      items:
                        type: string
                        enum:
                          - FEMALE
                          - MALE
                    creative_format:
                      nullable: true
                      type: string
                      enum:
                        - meta_image_feed
                        - meta_video_feed
                  required:
                    - goal
                    - geo_countries
                    - age_ranges
                    - genders
                    - creative_format
                  additionalProperties: false
                - type: object
                  properties:
                    goal:
                      nullable: true
                      type: string
                      minLength: 1
                    geo_countries:
                      type: array
                      items:
                        type: string
                        pattern: ^[A-Z]{2}$
                    age_ranges:
                      type: array
                      items:
                        type: string
                        enum:
                          - 13-17
                          - 18-24
                          - 25-34
                          - 35+
                    genders:
                      type: array
                      items:
                        type: string
                        enum:
                          - FEMALE
                          - MALE
                    creative_format:
                      nullable: true
                      type: string
                      enum:
                        - snap_ad_image_9x16
                        - snap_ad_video_9x16
                  required:
                    - goal
                    - geo_countries
                    - age_ranges
                    - genders
                    - creative_format
                  additionalProperties: false
            assumptions:
              type: array
              items:
                type: string
                minLength: 1
            rationale_codes:
              type: array
              items:
                type: string
                minLength: 1
            review:
              type: object
              properties:
                audience_description:
                  type: string
                confidence:
                  type: string
                  enum:
                    - high
                    - medium
                    - low
              required:
                - audience_description
                - confidence
              additionalProperties: false
            status:
              type: string
              enum:
                - ready
            plan:
              type: object
              properties:
                schema_version:
                  type: number
                  enum:
                    - 1
                decision_mode:
                  type: string
                  enum:
                    - assisted
                    - raw
                provider:
                  type: string
                  minLength: 1
                  maxLength: 100
                product_id:
                  type: string
                  minLength: 1
                concrete_product_id:
                  nullable: true
                  type: string
                  minLength: 1
                pricing_option_id:
                  nullable: true
                  type: string
                  minLength: 1
                execution_snapshot:
                  nullable: true
                  type: object
                  properties:
                    provider:
                      type: string
                      minLength: 1
                      maxLength: 100
                    product_id:
                      type: string
                      minLength: 1
                    base_product_id:
                      type: string
                      minLength: 1
                    objective:
                      type: string
                      minLength: 1
                    optimization_goal:
                      type: string
                      minLength: 1
                    targeting:
                      type: object
                      properties:
                        geo_countries:
                          minItems: 1
                          type: array
                          items:
                            type: string
                            pattern: ^[A-Z]{2}$
                        age_ranges:
                          type: array
                          items:
                            type: string
                            minLength: 1
                        genders:
                          type: array
                          items:
                            type: string
                            enum:
                              - FEMALE
                              - MALE
                      required:
                        - geo_countries
                        - age_ranges
                        - genders
                      additionalProperties: false
                    pricing:
                      type: object
                      properties:
                        pricing_option_id:
                          type: string
                          minLength: 1
                        pricing_model:
                          type: string
                          minLength: 1
                        currency:
                          type: string
                          pattern: ^[A-Z]{3}$
                        floor_price:
                          type: number
                          minimum: 0
                      required:
                        - pricing_option_id
                        - pricing_model
                        - currency
                        - floor_price
                      additionalProperties: false
                  required:
                    - provider
                    - product_id
                    - base_product_id
                    - objective
                    - optimization_goal
                    - targeting
                    - pricing
                  additionalProperties: false
                outcome:
                  type: string
                  minLength: 1
                objective:
                  type: string
                  minLength: 1
                optimization_goal:
                  type: string
                  minLength: 1
                targeting:
                  type: object
                  properties:
                    geo_countries_included:
                      type: array
                      items:
                        type: string
                        pattern: ^[A-Z]{2}$
                    geo_countries_excluded:
                      type: array
                      items:
                        type: string
                        pattern: ^[A-Z]{2}$
                    resolved_audiences:
                      type: array
                      items:
                        type: object
                        properties:
                          kind:
                            type: string
                            minLength: 1
                          provider_id:
                            type: string
                            minLength: 1
                          name:
                            type: string
                            minLength: 1
                        required:
                          - kind
                          - provider_id
                        additionalProperties: false
                    age_ranges:
                      type: array
                      items:
                        type: string
                        minLength: 1
                    genders:
                      type: array
                      items:
                        type: string
                        minLength: 1
                  required:
                    - geo_countries_included
                    - geo_countries_excluded
                    - resolved_audiences
                    - age_ranges
                    - genders
                  additionalProperties: false
                creative:
                  type: object
                  properties:
                    format_ids:
                      minItems: 1
                      type: array
                      items:
                        type: string
                        minLength: 1
                    placements:
                      type: array
                      items:
                        type: string
                        minLength: 1
                    identity_refs:
                      type: array
                      items:
                        type: object
                        properties:
                          kind:
                            type: string
                            minLength: 1
                          provider_id:
                            type: string
                            minLength: 1
                        required:
                          - kind
                          - provider_id
                        additionalProperties: false
                    assets:
                      type: array
                      items:
                        type: object
                        properties:
                          asset_id:
                            type: string
                            minLength: 1
                          availability:
                            type: string
                            enum:
                              - available
                              - required
                              - unavailable
                          digest:
                            type: string
                            pattern: ^sha256:[a-f0-9]{64}$
                        required:
                          - asset_id
                          - availability
                        additionalProperties: false
                    call_to_action:
                      nullable: true
                      type: string
                      minLength: 1
                    landing_page_url:
                      nullable: true
                      type: string
                      format: uri
                  required:
                    - format_ids
                    - placements
                    - identity_refs
                    - assets
                    - call_to_action
                    - landing_page_url
                  additionalProperties: false
                measurement_prerequisites:
                  type: array
                  items:
                    type: string
                    minLength: 1
                setup_prerequisites:
                  type: array
                  items:
                    type: string
                    minLength: 1
                assumptions:
                  type: array
                  items:
                    type: string
                    minLength: 1
                rationale_codes:
                  type: array
                  items:
                    type: string
                    minLength: 1
                clarification_requirements:
                  minItems: 0
                  maxItems: 0
                  type: array
                  items:
                    type: string
                    minLength: 1
              required:
                - schema_version
                - decision_mode
                - provider
                - product_id
                - concrete_product_id
                - pricing_option_id
                - execution_snapshot
                - outcome
                - objective
                - optimization_goal
                - targeting
                - creative
                - measurement_prerequisites
                - setup_prerequisites
                - assumptions
                - rationale_codes
                - clarification_requirements
              additionalProperties: false
            plan_ref:
              oneOf:
                - type: object
                  properties:
                    plan_id:
                      type: string
                      format: uuid
                      pattern: >-
                        ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                    plan_digest:
                      type: string
                      pattern: ^sha256:[a-f0-9]{64}$
                    write_intent_digest:
                      type: string
                      nullable: true
                      enum:
                        - null
                    expires_at:
                      type: string
                      format: date-time
                      pattern: >-
                        ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                    acceptance_status:
                      type: string
                      enum:
                        - proposed
                  required:
                    - plan_id
                    - plan_digest
                    - write_intent_digest
                    - expires_at
                    - acceptance_status
                  additionalProperties: false
                - $ref: '#/components/schemas/AcceptedCampaignDecisionPlanRef'
              type: object
            clarification_codes:
              minItems: 0
              maxItems: 0
              type: array
              items:
                not: {}
          required:
            - provider
            - products
            - schema_version
            - intent
            - assumptions
            - rationale_codes
            - review
            - status
            - plan
            - plan_ref
            - clarification_codes
          additionalProperties: false
        - type: object
          properties:
            provider:
              type: string
              minLength: 1
            products:
              minItems: 0
              maxItems: 0
              type: array
              items:
                type: object
                properties:
                  product_id:
                    type: string
                    minLength: 1
                  name:
                    type: string
                  pricing_options:
                    type: array
                    items:
                      type: object
                      properties:
                        pricing_option_id:
                          type: string
                          minLength: 1
                      required:
                        - pricing_option_id
                      additionalProperties: {}
                required:
                  - product_id
                  - pricing_options
                additionalProperties: {}
            schema_version:
              type: number
              enum:
                - 1
            intent:
              anyOf:
                - type: object
                  properties:
                    goal:
                      nullable: true
                      type: string
                      minLength: 1
                    geo_countries:
                      type: array
                      items:
                        type: string
                        pattern: ^[A-Z]{2}$
                    age_ranges:
                      type: array
                      items:
                        type: string
                        enum:
                          - 18-24
                          - 25-34
                          - 35-44
                          - 45-54
                          - 55-64
                          - 65+
                    genders:
                      type: array
                      items:
                        type: string
                        enum:
                          - FEMALE
                          - MALE
                    creative_format:
                      nullable: true
                      type: string
                      enum:
                        - meta_image_feed
                        - meta_video_feed
                  required:
                    - goal
                    - geo_countries
                    - age_ranges
                    - genders
                    - creative_format
                  additionalProperties: false
                - type: object
                  properties:
                    goal:
                      nullable: true
                      type: string
                      minLength: 1
                    geo_countries:
                      type: array
                      items:
                        type: string
                        pattern: ^[A-Z]{2}$
                    age_ranges:
                      type: array
                      items:
                        type: string
                        enum:
                          - 13-17
                          - 18-24
                          - 25-34
                          - 35+
                    genders:
                      type: array
                      items:
                        type: string
                        enum:
                          - FEMALE
                          - MALE
                    creative_format:
                      nullable: true
                      type: string
                      enum:
                        - snap_ad_image_9x16
                        - snap_ad_video_9x16
                  required:
                    - goal
                    - geo_countries
                    - age_ranges
                    - genders
                    - creative_format
                  additionalProperties: false
            assumptions:
              type: array
              items:
                type: string
                minLength: 1
            rationale_codes:
              type: array
              items:
                type: string
                minLength: 1
            review:
              type: object
              properties:
                audience_description:
                  type: string
                confidence:
                  type: string
                  enum:
                    - high
                    - medium
                    - low
              required:
                - audience_description
                - confidence
              additionalProperties: false
            status:
              type: string
              enum:
                - clarification_required
            plan:
              type: string
              nullable: true
              enum:
                - null
            plan_ref:
              type: string
              nullable: true
              enum:
                - null
            clarification_codes:
              minItems: 1
              type: array
              items:
                type: string
                enum:
                  - ambiguous_brief
                  - ambiguous_geography
                  - ambiguous_objective
                  - execution_setup_unavailable
                  - invalid_geography
                  - missing_creative_format
                  - missing_geography
                  - missing_objective
                  - native_localization_unverified
                  - unsupported_age_targeting
                  - unsupported_creative_format
                  - unsupported_gender_targeting
                  - unsupported_interest_targeting
                  - unsupported_targeting_exclusion
          required:
            - provider
            - products
            - schema_version
            - intent
            - assumptions
            - rationale_codes
            - review
            - status
            - plan
            - plan_ref
            - clarification_codes
          additionalProperties: false
      type: object
    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
    AcceptedCampaignDecisionPlanRef:
      description: >-
        An unexpired assisted campaign decision plan accepted by the
        authenticated proposing principal.
      type: object
      properties:
        plan_id:
          type: string
          format: uuid
          pattern: >-
            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
        plan_digest:
          type: string
          pattern: ^sha256:[a-f0-9]{64}$
        write_intent_digest:
          type: string
          pattern: ^sha256:[a-f0-9]{64}$
        expires_at:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        acceptance_status:
          type: string
          enum:
            - accepted
      required:
        - plan_id
        - plan_digest
        - write_intent_digest
        - expires_at
        - acceptance_status
      additionalProperties: false
    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
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key or access token

````