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

# Subscribe a directed-campaign account (alpha)

> Subscribe an advertiser-mapped adapter account, enumerate its upstream campaigns, and persist one read-only directed campaign per upstream media buy with a one-year historical window. PostHog-gated alpha.



## OpenAPI

````yaml /v2/buyer-api-v2.yaml post /storefront-connections/{connectionId}/accounts/{accountId}/directed-campaigns/subscribe
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/subscribe:
    post:
      tags:
        - Storefronts
      summary: Subscribe a directed-campaign account (alpha)
      description: >-
        Subscribe an advertiser-mapped adapter account, enumerate its upstream
        campaigns, and persist one read-only directed campaign per upstream
        media buy with a one-year historical window. PostHog-gated alpha.
      operationId: subscribeDirectedCampaigns
      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/SubscribeDirectedCampaignsBody'
      responses:
        '201':
          description: Subscribe a directed-campaign account (alpha)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscribeDirectedCampaignsResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: The directed-campaigns alpha is not enabled.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: The connection account was not found.
          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:
    SubscribeDirectedCampaignsBody:
      description: >-
        Subscribe a mapped seller account for read-only tracked-campaign
        mirroring.
      type: object
      properties:
        advertiserId:
          description: Numeric advertiser ID mapped to this provider account
          type: string
          pattern: ^[1-9]\d*$
        sourceId:
          description: >-
            Optional for official adapters, whose canonical provider ID is
            derived from connectionId. Required for external AdCP storefront
            sources.
          type: string
          minLength: 1
        governance:
          type: object
          properties:
            currency:
              description: >-
                Scope3-operator-only ISO 4217 currency for both directed-write
                governance caps.
              example: USD
              type: string
              pattern: ^[A-Z]{3}$
            maxMediaBuyBudget:
              description: >-
                Scope3-operator-only maximum budget a directed write may place
                on one upstream campaign.
              type: number
              minimum: 0
              exclusiveMinimum: true
            maxAccountBudget:
              description: >-
                Scope3-operator-only maximum aggregate budget for campaigns
                authored through directed writes on this account.
              type: number
              minimum: 0
              exclusiveMinimum: true
          required:
            - currency
            - maxMediaBuyBudget
            - maxAccountBudget
          additionalProperties: false
      required:
        - advertiserId
      additionalProperties: false
    SubscribeDirectedCampaignsResponse:
      description: >-
        The durable subscription plus the initial one-year mirror
        reconciliation.
      type: object
      properties:
        subscription:
          $ref: '#/components/schemas/DirectedCampaignSubscription'
        sync:
          $ref: '#/components/schemas/DirectedCampaignSyncOutcome'
      required:
        - subscription
        - sync
      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
    DirectedCampaignSubscription:
      description: Durable provider-account subscription and its read-only mirror health.
      type: object
      properties:
        id:
          type: string
        customerId:
          type: integer
          maximum: 9007199254740991
          minimum: 1
        advertiserId:
          type: string
        connectionId:
          type: string
        accountId:
          type: string
        sourceId:
          type: string
        providerType:
          type: string
        status:
          type: string
          enum:
            - ACTIVE
            - PAUSED
            - ERROR
        backfillStart:
          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))$
        maxMediaBuyBudget:
          nullable: true
          type: number
        maxAccountBudget:
          nullable: true
          type: number
        governanceCurrency:
          nullable: true
          type: string
          pattern: ^[A-Z]{3}$
        lastSyncedAt:
          nullable: true
          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))$
        lastSyncStatus:
          nullable: true
          type: string
          enum:
            - SUCCESS
            - ERROR
        lastSyncError:
          description: >-
            Fixed safe reconciliation summary. Provider messages and identifiers
            are never persisted or returned.
          nullable: true
          type: string
          enum:
            - Connected provider account could not be synchronized.
        createdAt:
          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))$
        updatedAt:
          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))$
        archivedAt:
          nullable: true
          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))$
      required:
        - id
        - customerId
        - advertiserId
        - connectionId
        - accountId
        - sourceId
        - providerType
        - status
        - backfillStart
        - maxMediaBuyBudget
        - maxAccountBudget
        - governanceCurrency
        - lastSyncedAt
        - lastSyncStatus
        - lastSyncError
        - createdAt
        - updatedAt
        - archivedAt
      additionalProperties: false
    DirectedCampaignSyncOutcome:
      description: >-
        Counts and bounded safe diagnostics from one account-wide mirror
        reconciliation.
      type: object
      properties:
        subscriptionId:
          type: string
        mirrored:
          type: integer
          minimum: 0
          maximum: 9007199254740991
        retired:
          type: integer
          minimum: 0
          maximum: 9007199254740991
        skipped:
          type: integer
          minimum: 0
          maximum: 9007199254740991
        errors:
          description: >-
            Empty on success; otherwise contains only the fixed safe
            reconciliation summary.
          maxItems: 1
          type: array
          items:
            type: string
            enum:
              - Connected provider account could not be synchronized.
        errorCode:
          description: >-
            Stable Scope3 service error code for a failed reconciliation.
            Provider messages and request identifiers are never returned.
          type: string
          enum:
            - NOT_FOUND
            - ACCESS_DENIED
            - VALIDATION_ERROR
            - CONFLICT
            - INTERNAL_ERROR
            - RATE_LIMITED
            - SERVICE_UNAVAILABLE
            - FEATURE_NOT_ENABLED
            - PRICING_NOT_CONFIGURED
            - CURRENCY_MISMATCH
            - INSUFFICIENT_MEDIA_BUDGET
            - ROUTED_AGENT_REQUIRES_OPERATOR_AUTH
            - ADAPTER_STOREFRONT_REQUIRES_ROUTED_CAMPAIGN
            - CAPABILITY_NOT_SUPPORTED
            - SELLER_APPROVAL_REQUIRED
            - SALES_AGENT_NOT_ACTIVE
            - CREDIT_LIMIT_EXCEEDED
            - FX_QUOTE_EXPIRED
            - FX_RATE_UNAVAILABLE
        errorField:
          description: >-
            Allowlisted request field associated with the failure, when one is
            safe to expose.
          type: string
          enum:
            - account.account_id
            - accountId
            - advertiserId
            - assets
            - assets.post.identity_id
            - brief
            - buying_mode
            - clicks
            - format_id
            - impressions
            - instagram_actor_id
            - page_id
            - sourceId
            - spend
        errorReason:
          description: Allowlisted machine-readable reconciliation reason, when available.
          type: string
          enum:
            - account_scope_mismatch
            - catalog_shape_invalid
            - cleanup_readback_mismatch
            - create_account_mismatch
            - delegated_auth_unready
            - lifecycle_readback_mismatch
            - missing_identity
            - pagination_incomplete
            - provider_response_malformed
            - readback_mismatch
            - scope_insufficient
            - selected_account_mismatch
        upstreamCode:
          description: >-
            Allowlisted provider error category. Raw provider messages, request
            IDs, and resource IDs are excluded.
          type: string
          enum:
            - ACCOUNT_NOT_AUTHORIZED
            - ACCOUNT_NOT_FOUND
            - ACCOUNT_SCOPE_MISMATCH
            - ADVERTISER_INFO_DENIED
            - ADVERTISER_INFO_MALFORMED
            - AUTH_REQUIRED
            - CATALOG_SCOPE_MISMATCH
            - CONFIGURATION_ERROR
            - INCOMPLETE_PAGINATION
            - INVALID_ADVERTISER_SCOPE
            - INVALID_PROVIDER_RESPONSE
            - INVALID_REQUEST
            - INVALID_SELECTED_ACCOUNT
            - NETWORK_ERROR
            - NOT_FOUND
            - OWNERSHIP_MISMATCH
            - PERMISSION_DENIED
            - PLATFORM_ERROR
            - POLICY_VIOLATION
            - RATE_LIMIT
            - RATE_LIMITED
            - SCOPE_INSUFFICIENT
            - SERVICE_UNAVAILABLE
            - SNAP_ME_MALFORMED
            - TIMEOUT
            - UPSTREAM_BAD_GATEWAY
            - UPSTREAM_NON_JSON
            - UPSTREAM_UNAVAILABLE
            - VALIDATION_ERROR
        liveConformanceFaultStage:
          description: >-
            Protected staging-only fault stage, reconstructed from an exact
            static allowlist. Never contains provider text or identifiers.
          type: string
          enum:
            - campaign
            - package
            - creative
            - reporting
            - targeting.excluded_geo_locations
            - targeting.locales
            - targeting.interests
            - targeting.behaviors
            - targeting.custom_audiences
            - targeting.excluded_custom_audiences
            - targeting.publisher_platforms
            - targeting.facebook_positions
            - targeting.instagram_positions
      required:
        - subscriptionId
        - mirrored
        - retired
        - skipped
        - errors
      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

````