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

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



## 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: 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:
  /storefront-connections/{connectionId}/accounts/{accountId}/directed-campaigns/subscribe:
    post:
      tags:
        - Storefronts
      summary: Subscribe a directed-campaign account
      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.
      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
          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'
        '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:
      type: object
      properties:
        advertiserId:
          type: string
          pattern: ^[1-9]\d*$
          description: Numeric advertiser ID mapped to this provider account
        sourceId:
          description: >-
            Optional for official adapters, whose canonical provider ID is
            derived from connectionId. Required for external AdCP storefront
            sources.
          type: string
          minLength: 1
      required:
        - advertiserId
      additionalProperties: false
      description: >-
        Subscribe a mapped provider account for read-only tracked-campaign
        mirroring.
    SubscribeDirectedCampaignsResponse:
      type: object
      properties:
        subscription:
          $ref: '#/components/schemas/DirectedCampaignSubscription'
        sync:
          $ref: '#/components/schemas/DirectedCampaignSyncOutcome'
      required:
        - subscription
        - sync
      additionalProperties: false
      description: >-
        The durable subscription plus the initial one-year mirror
        reconciliation.
    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
    DirectedCampaignSubscription:
      type: object
      properties:
        id:
          type: string
        customerId:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          maximum: 9007199254740991
        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))$
        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:
          nullable: true
          description: >-
            Fixed safe reconciliation summary. Provider messages and identifiers
            are never persisted or returned.
          type: string
          enum:
            - Connected provider account could not be synchronized.
        errorCode:
          nullable: true
          description: >-
            Machine-readable diagnosis of the most recent failed periodic sweep.
            Stable Scope3 service error code; null after a successful sweep.
            Provider messages and request identifiers are never returned.
          type: string
          enum:
            - NOT_FOUND
            - ACCESS_DENIED
            - VALIDATION_ERROR
            - INVALID_REQUEST
            - CONFLICT
            - INTERNAL_ERROR
            - RATE_LIMITED
            - SERVICE_UNAVAILABLE
            - BUYER_SETUP_REQUIRED
            - 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
            - SPEND_DENOMINATION_UNRESOLVED
            - WORKOS_RESOURCE_TYPE_NOT_CONFIGURED
            - UNIT_CONTAINS_PRICING
            - UNIT_NOT_REUSABLE_KIND
        errorField:
          nullable: true
          description: >-
            Allowlisted request field associated with the most recent failed
            sweep, when one is safe to expose; null after success.
          type: string
          enum:
            - account.account_id
            - accountId
            - advertiserId
            - assets
            - assets.post.identity_id
            - brief
            - buying_mode
            - clicks
            - format_id
            - impressions
            - instagram_actor_id
            - liveConformance.account
            - liveConformance.inventory
            - liveConformance.pagination
            - liveConformance.providerInventory
            - mediaBuy.canceled
            - mediaBuys.account
            - mediaBuys.currency
            - mediaBuys.envelope
            - mediaBuys.identity
            - mediaBuys.lifecycle
            - mediaBuys.numeric
            - mediaBuys.packages
            - mediaBuys.revision
            - mediaBuys.retirement
            - mediaBuys.schedule
            - operation
            - page_id
            - pixel_id
            - sourceId
            - spend
            - spotify.ads.identity
            - spotify.ads.rejectReasons
            - spotify.ads.status
            - (root)
            - address
            - advertiser_id
            - advertiser_name
            - balance
            - company
            - contacter
            - create_time
            - currency
            - description
            - email
            - industry
            - language
            - license_no
            - license_url
            - name
            - phonenumber
            - promotion_area
            - role
            - status
            - timezone
        errorReason:
          nullable: true
          description: >-
            Allowlisted machine-readable reconciliation reason from the most
            recent failed sweep; null after success.
          type: string
          enum:
            - account_scope_mismatch
            - actor_relationship_rejected
            - catalog_shape_invalid
            - cleanup_readback_mismatch
            - create_account_mismatch
            - delegated_auth_unready
            - delivery_deadline_exceeded
            - delivery_reconciliation_mismatch
            - discovery_pricing_superseded
            - lifecycle_readback_mismatch
            - meta_geo_city_response_schema_mismatch
            - meta_dsa_defaults_missing
            - meta_account_readback_failed
            - meta_preview_generation_failed
            - meta_preview_preflight_rejected
            - missing_identity
            - instagram_actor_not_authorized
            - instagram_actor_selection_required
            - page_not_authorized
            - page_selection_required
            - nested_subdivision_hierarchy_unproven
            - value_optimization_not_eligible
            - pagination_incomplete
            - pagination_page_bound_exceeded
            - pagination_deadline_exceeded
            - pagination_response_malformed
            - pagination_list_malformed
            - pagination_page_info_missing
            - pagination_counters_invalid
            - pagination_page_mismatch
            - pagination_page_size_mismatch
            - pagination_bounds_exceeded
            - pagination_totals_inconsistent
            - pagination_totals_changed
            - pagination_page_count_mismatch
            - pagination_page_oversized
            - pagination_identity_invalid
            - pagination_duplicate_identity
            - pagination_terminal_confirmation_mismatch
            - pagination_collected_count_mismatch
            - provider_response_malformed
            - readback_mismatch
            - scope_insufficient
            - selected_account_mismatch
            - snap_account_restricted
            - snap_bid_rejected
            - snap_billing_rejected
            - snap_budget_rejected
            - snap_creative_rejected
            - snap_currency_rejected
            - snap_date_rejected
            - snap_objective_rejected
            - snap_pixel_rejected
            - snap_placement_rejected
            - snap_status_rejected
            - snap_targeting_rejected
            - snap_unclassified_rejected
            - unsupported_targeting_dimension
            - deprecated_targeting_dimension
            - spark_provenance_inconsistent
            - spark_tuple_inconsistent
            - spark_provider_tuple_conflict
            - carousel_provider_identity_mismatch
            - carousel_child_owner_conflict
            - carousel_child_standalone_conflict
            - carousel_assignment_identity_mismatch
            - active_identity_omitted
            - video_format_provenance_inconsistent
            - video_provider_digest_mismatch
            - video_format_selector_missing
            - image_format_provenance_inconsistent
            - image_provider_digest_mismatch
            - carousel_provider_inventory_missing
            - image_format_selector_missing
            - spark_provider_digest_mismatch
        upstreamCode:
          nullable: true
          description: >-
            Allowlisted provider error category from the most recent failed
            sweep; null after success. Raw provider messages, request IDs, and
            resource IDs are excluded.
          type: string
          enum:
            - ACCOUNT_NOT_AUTHORIZED
            - ACCOUNT_NOT_FOUND
            - ACCOUNT_SCOPE_MISMATCH
            - ACTIVATION_FAILED
            - ACTIVATION_READBACK_FAILED
            - ACTIVATION_RESPONSE_MISMATCH
            - ADVERTISER_INFO_DENIED
            - ADVERTISER_INFO_MALFORMED
            - AD_READBACK_FAILED
            - AMBIGUOUS_AUDIENCE_DETAIL
            - AMBIGUOUS_PROVIDER_SURFACE
            - APPLICATION_NOT_AUTHORIZED
            - APPLICATION_READBACK_MISMATCH
            - APPLICATION_REQUIRED
            - APP_OPTIMIZATION_EVENT_BID_TYPE_UNAVAILABLE
            - APP_OPTIMIZATION_EVENT_NOT_AUTHORIZED
            - APP_OPTIMIZATION_EVENT_REQUIRED
            - APP_OPTIMIZATION_EVENT_SOURCE_MISMATCH
            - APP_OPTIMIZATION_STATISTIC_READBACK_MISMATCH
            - APP_PROMOTION_TYPE_READBACK_MISMATCH
            - APP_PURCHASE_VALUE_GOAL_REQUIRED
            - APP_RETARGETING_AUDIENCE_REQUIRED
            - AUDIENCE_DETAIL_ID_MISMATCH
            - AUDIENCE_RUN_NOT_READY
            - AUDIENCE_UPLOAD_NOT_VERIFIED
            - AUTH_REQUIRED
            - BIDDING_READBACK_MISMATCH
            - BUDGET_TOO_LOW
            - CALL_DESTINATION_REGION_MISMATCH
            - CALL_DESTINATION_REQUIRED
            - CALL_TARGETING_AGE_RESTRICTED
            - CALL_TARGETING_LOCATION_REQUIRED
            - CAMPAIGN_IDENTITY_MALFORMED
            - CAMPAIGN_OBJECTIVE_READBACK_MISMATCH
            - CAMPAIGN_OWNERSHIP_MISMATCH
            - CAMPAIGN_PRODUCT_SOURCE_READBACK_MISMATCH
            - CAMPAIGN_READBACK_FAILED
            - CAMPAIGN_READBACK_INTERRUPTED
            - CAMPAIGN_STATUS_DRIFT
            - CATALOG_ATTACHMENT_CONFLICT
            - CATALOG_BINDING_READBACK_MISMATCH
            - CATALOG_CREATIVE_FORMAT_UNSUPPORTED
            - CATALOG_CREATIVE_REQUIRED
            - CATALOG_EVENT_SOURCE_NOT_BOUND
            - CATALOG_NOT_AUTHORIZED
            - CATALOG_RESOURCES_REQUIRED
            - CATALOG_SCOPE_MISMATCH
            - CONFIGURATION_ERROR
            - CONVERSION_EVENT_SOURCE_REQUIRED
            - CONVERSION_RESOURCE_READBACK_MISMATCH
            - CREATIVE_COPY_UNAVAILABLE
            - CREATIVE_FORMAT_LOOKUP_FAILED
            - CREATIVE_IDENTITY_DRIFT
            - CREATIVE_IDENTITY_MALFORMED
            - CREATIVE_IDENTITY_STORE_UNAVAILABLE
            - CREATIVE_IDENTITY_UNAVAILABLE
            - CREATIVE_MUSIC_UNAVAILABLE
            - CREATIVE_NOT_READY
            - DIRECT_MESSAGE_CREATIVE_IDENTITY_MISMATCH
            - DIRECT_MESSAGE_CREATIVE_REQUIRED
            - DIRECT_MESSAGE_IDENTITY_NOT_AUTHORIZED
            - DURABLE_TENANT_SCOPE_REQUIRED
            - EVENT_SOURCE_NOT_AUTHORIZED
            - INCOMPATIBLE_APP_PROMOTION_TYPES
            - INCOMPATIBLE_CAMPAIGN_OBJECTIVES
            - INCOMPATIBLE_CAMPAIGN_PRODUCT_SOURCES
            - INCOMPATIBLE_CAMPAIGN_TYPES
            - INCOMPATIBLE_OPTIMIZATION_GOALS
            - INCOMPLETE_PAGINATION
            - INVALID_ADVERTISER_SCOPE
            - INVALID_APPLICATION_INVENTORY
            - INVALID_AUDIENCE_DETAIL
            - INVALID_AUDIENCE_INVENTORY
            - INVALID_AUDIENCE_REFERENCE
            - INVALID_AUDIENCE_RESPONSE
            - INVALID_BUSINESS_IDENTITY_INVENTORY
            - INVALID_CALL_DESTINATION
            - INVALID_CATALOG_INVENTORY
            - INVALID_LEAD_FORM_INVENTORY
            - INVALID_MESSAGE_EVENT_SET
            - INVALID_MESSAGING_APP_DESTINATION
            - INVALID_PARAMS
            - INVALID_PIXEL_INVENTORY
            - INVALID_PROVIDER_RESPONSE
            - INVALID_REQUEST
            - INVALID_SELECTED_ACCOUNT
            - INVALID_SPARK_IDENTITY_INVENTORY
            - INVALID_SUCCESS_ENVELOPE
            - INVALID_WELCOME_MESSAGE_INVENTORY
            - LEAD_FORM_NOT_AUTHORIZED
            - LEAD_FORM_REQUIRED
            - MEDIA_BUY_CURRENCY_MISMATCH
            - MESSAGE_EVENT_SET_MISMATCH
            - MESSAGE_EVENT_SET_NOT_AUTHORIZED
            - MESSAGE_EVENT_SET_READBACK_MISMATCH
            - MESSAGE_EVENT_SET_REQUIRED
            - MESSAGING_APP_DESTINATION_READBACK_MISMATCH
            - MESSAGING_APP_DESTINATION_REQUIRED
            - MISSING_ACCOUNT_ID
            - MISSING_TARGETING_GEO
            - NETWORK_ERROR
            - NOT_FOUND
            - OPTIMIZATION_GOAL_READBACK_MISMATCH
            - OWNERSHIP_MISMATCH
            - PARTIAL_UPDATE_UNRECOVERED
            - PERMISSION_DENIED
            - PLACEMENT_READBACK_MALFORMED
            - PLACEMENT_READBACK_MISMATCH
            - PLATFORM_ERROR
            - PLATFORM_IDENTITY_NOT_AUTHORIZED
            - PLATFORM_IDENTITY_REQUIRED
            - POLICY_VIOLATION
            - PRODUCT_CURRENCY_MISMATCH
            - PRODUCT_SET_NOT_AUTHORIZED
            - PROMOTION_TARGET_TYPE_READBACK_MISMATCH
            - PROMOTION_TYPE_READBACK_MISMATCH
            - PROVIDER_READBACK_MISMATCH
            - PROVIDER_READBACK_UNAVAILABLE
            - RATE_LIMIT
            - RATE_LIMITED
            - REQUEST_ABORTED
            - REVISION_CONFLICT
            - REVISION_LEDGER_UNAVAILABLE
            - SCOPE_INSUFFICIENT
            - SERVICE_UNAVAILABLE
            - SMART_PLUS_ACTIVATION_FAILED
            - SMART_PLUS_ACTIVATION_READBACK_MISMATCH
            - SMART_PLUS_ADGROUP_READBACK_MISMATCH
            - SMART_PLUS_AD_READBACK_MISMATCH
            - SMART_PLUS_APP_REQUIRED
            - SMART_PLUS_CALL_TO_ACTION_UNSUPPORTED
            - SMART_PLUS_CAMPAIGN_READBACK_MISMATCH
            - SMART_PLUS_CATALOG_NOT_SUPPORTED
            - SMART_PLUS_COPY_REQUIRED
            - SMART_PLUS_CREATIVE_FORMAT_UNSUPPORTED
            - SMART_PLUS_CREATIVE_MODE_MISMATCH
            - SMART_PLUS_CREATIVE_REQUIRED
            - SMART_PLUS_DESTINATION_REQUIRED
            - SMART_PLUS_IDENTITY_MISMATCH
            - SMART_PLUS_IDENTITY_REQUIRED
            - SMART_PLUS_OPTIMIZATION_REQUIRED
            - SMART_PLUS_SELECTED_IDENTITY_MISMATCH
            - SMART_PLUS_SINGLE_PACKAGE_REQUIRED
            - SNAP_ME_MALFORMED
            - SPARK_CREATIVE_IDENTITY_MISMATCH
            - SPARK_CREATIVE_REQUIRED
            - TARGETING_LEDGER_CLEANUP_FAILED
            - TARGETING_LEDGER_INVALID
            - TARGETING_LEDGER_MISMATCH
            - TARGETING_LEDGER_UNAVAILABLE
            - TARGETING_READBACK_FAILED
            - TARGETING_READBACK_IDENTITY_MISMATCH
            - TARGETING_READBACK_MALFORMED
            - TARGETING_READBACK_MISMATCH
            - TERMINAL_MEDIA_BUY
            - TIMEOUT
            - UNKNOWN_CREATIVE_ID
            - UNSUPPORTED_CONVERSATION_DESTINATION
            - UNSUPPORTED_OFFERING_CREATIVE_PATH
            - UNSUPPORTED_OPTIMIZATION_GOAL
            - UNSUPPORTED_PLACEMENT_MUTATION
            - UNSUPPORTED_TARGETING_DIMENSION
            - UNSUPPORTED_UPDATE_FIELD
            - UPSTREAM_BAD_GATEWAY
            - UPSTREAM_HTTP_ERROR
            - UPSTREAM_NON_JSON
            - UPSTREAM_UNAVAILABLE
            - VALIDATION_ERROR
            - WELCOME_MESSAGE_NOT_AUTHORIZED
            - WELCOME_MESSAGE_REQUIRED
        lastPresenceSyncedAt:
          nullable: true
          description: >-
            When the tracked-presence sweep (audiences and event sources) last
            visited this subscription; null until the first presence sweep runs.
          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))$
        lastPresenceSyncStatus:
          nullable: true
          description: >-
            Outcome of the most recent tracked-presence sweep. SKIPPED means the
            sweep visited the subscription but presence discovery did not apply
            (for example, the feature is not enabled for this customer); null
            until the first sweep.
          type: string
          enum:
            - SUCCESS
            - ERROR
            - SKIPPED
        lastPresenceSyncError:
          nullable: true
          description: >-
            Bounded, sanitized summary of the most recent presence sweep failure
            or skip reason; null after a fully successful sweep. Provider
            messages and identifiers are never returned.
          type: string
        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
        - lastSyncedAt
        - lastSyncStatus
        - lastSyncError
        - errorCode
        - errorField
        - errorReason
        - upstreamCode
        - lastPresenceSyncedAt
        - lastPresenceSyncStatus
        - lastPresenceSyncError
        - createdAt
        - updatedAt
        - archivedAt
      additionalProperties: false
      description: Durable provider-account subscription and its read-only mirror health.
    DirectedCampaignSyncOutcome:
      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:
          maxItems: 1
          type: array
          items:
            type: string
            enum:
              - Connected provider account could not be synchronized.
          description: >-
            Empty on success; otherwise contains only the fixed safe
            reconciliation summary.
        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
            - INVALID_REQUEST
            - CONFLICT
            - INTERNAL_ERROR
            - RATE_LIMITED
            - SERVICE_UNAVAILABLE
            - BUYER_SETUP_REQUIRED
            - 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
            - SPEND_DENOMINATION_UNRESOLVED
            - WORKOS_RESOURCE_TYPE_NOT_CONFIGURED
            - UNIT_CONTAINS_PRICING
            - UNIT_NOT_REUSABLE_KIND
        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
            - liveConformance.account
            - liveConformance.inventory
            - liveConformance.pagination
            - liveConformance.providerInventory
            - mediaBuy.canceled
            - mediaBuys.account
            - mediaBuys.currency
            - mediaBuys.envelope
            - mediaBuys.identity
            - mediaBuys.lifecycle
            - mediaBuys.numeric
            - mediaBuys.packages
            - mediaBuys.revision
            - mediaBuys.retirement
            - mediaBuys.schedule
            - operation
            - page_id
            - pixel_id
            - sourceId
            - spend
            - spotify.ads.identity
            - spotify.ads.rejectReasons
            - spotify.ads.status
            - (root)
            - address
            - advertiser_id
            - advertiser_name
            - balance
            - company
            - contacter
            - create_time
            - currency
            - description
            - email
            - industry
            - language
            - license_no
            - license_url
            - name
            - phonenumber
            - promotion_area
            - role
            - status
            - timezone
        errorReason:
          description: Allowlisted machine-readable reconciliation reason, when available.
          type: string
          enum:
            - account_scope_mismatch
            - actor_relationship_rejected
            - catalog_shape_invalid
            - cleanup_readback_mismatch
            - create_account_mismatch
            - delegated_auth_unready
            - delivery_deadline_exceeded
            - delivery_reconciliation_mismatch
            - discovery_pricing_superseded
            - lifecycle_readback_mismatch
            - meta_geo_city_response_schema_mismatch
            - meta_dsa_defaults_missing
            - meta_account_readback_failed
            - meta_preview_generation_failed
            - meta_preview_preflight_rejected
            - missing_identity
            - instagram_actor_not_authorized
            - instagram_actor_selection_required
            - page_not_authorized
            - page_selection_required
            - nested_subdivision_hierarchy_unproven
            - value_optimization_not_eligible
            - pagination_incomplete
            - pagination_page_bound_exceeded
            - pagination_deadline_exceeded
            - pagination_response_malformed
            - pagination_list_malformed
            - pagination_page_info_missing
            - pagination_counters_invalid
            - pagination_page_mismatch
            - pagination_page_size_mismatch
            - pagination_bounds_exceeded
            - pagination_totals_inconsistent
            - pagination_totals_changed
            - pagination_page_count_mismatch
            - pagination_page_oversized
            - pagination_identity_invalid
            - pagination_duplicate_identity
            - pagination_terminal_confirmation_mismatch
            - pagination_collected_count_mismatch
            - provider_response_malformed
            - readback_mismatch
            - scope_insufficient
            - selected_account_mismatch
            - snap_account_restricted
            - snap_bid_rejected
            - snap_billing_rejected
            - snap_budget_rejected
            - snap_creative_rejected
            - snap_currency_rejected
            - snap_date_rejected
            - snap_objective_rejected
            - snap_pixel_rejected
            - snap_placement_rejected
            - snap_status_rejected
            - snap_targeting_rejected
            - snap_unclassified_rejected
            - unsupported_targeting_dimension
            - deprecated_targeting_dimension
            - spark_provenance_inconsistent
            - spark_tuple_inconsistent
            - spark_provider_tuple_conflict
            - carousel_provider_identity_mismatch
            - carousel_child_owner_conflict
            - carousel_child_standalone_conflict
            - carousel_assignment_identity_mismatch
            - active_identity_omitted
            - video_format_provenance_inconsistent
            - video_provider_digest_mismatch
            - video_format_selector_missing
            - image_format_provenance_inconsistent
            - image_provider_digest_mismatch
            - carousel_provider_inventory_missing
            - image_format_selector_missing
            - spark_provider_digest_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
            - ACTIVATION_FAILED
            - ACTIVATION_READBACK_FAILED
            - ACTIVATION_RESPONSE_MISMATCH
            - ADVERTISER_INFO_DENIED
            - ADVERTISER_INFO_MALFORMED
            - AD_READBACK_FAILED
            - AMBIGUOUS_AUDIENCE_DETAIL
            - AMBIGUOUS_PROVIDER_SURFACE
            - APPLICATION_NOT_AUTHORIZED
            - APPLICATION_READBACK_MISMATCH
            - APPLICATION_REQUIRED
            - APP_OPTIMIZATION_EVENT_BID_TYPE_UNAVAILABLE
            - APP_OPTIMIZATION_EVENT_NOT_AUTHORIZED
            - APP_OPTIMIZATION_EVENT_REQUIRED
            - APP_OPTIMIZATION_EVENT_SOURCE_MISMATCH
            - APP_OPTIMIZATION_STATISTIC_READBACK_MISMATCH
            - APP_PROMOTION_TYPE_READBACK_MISMATCH
            - APP_PURCHASE_VALUE_GOAL_REQUIRED
            - APP_RETARGETING_AUDIENCE_REQUIRED
            - AUDIENCE_DETAIL_ID_MISMATCH
            - AUDIENCE_RUN_NOT_READY
            - AUDIENCE_UPLOAD_NOT_VERIFIED
            - AUTH_REQUIRED
            - BIDDING_READBACK_MISMATCH
            - BUDGET_TOO_LOW
            - CALL_DESTINATION_REGION_MISMATCH
            - CALL_DESTINATION_REQUIRED
            - CALL_TARGETING_AGE_RESTRICTED
            - CALL_TARGETING_LOCATION_REQUIRED
            - CAMPAIGN_IDENTITY_MALFORMED
            - CAMPAIGN_OBJECTIVE_READBACK_MISMATCH
            - CAMPAIGN_OWNERSHIP_MISMATCH
            - CAMPAIGN_PRODUCT_SOURCE_READBACK_MISMATCH
            - CAMPAIGN_READBACK_FAILED
            - CAMPAIGN_READBACK_INTERRUPTED
            - CAMPAIGN_STATUS_DRIFT
            - CATALOG_ATTACHMENT_CONFLICT
            - CATALOG_BINDING_READBACK_MISMATCH
            - CATALOG_CREATIVE_FORMAT_UNSUPPORTED
            - CATALOG_CREATIVE_REQUIRED
            - CATALOG_EVENT_SOURCE_NOT_BOUND
            - CATALOG_NOT_AUTHORIZED
            - CATALOG_RESOURCES_REQUIRED
            - CATALOG_SCOPE_MISMATCH
            - CONFIGURATION_ERROR
            - CONVERSION_EVENT_SOURCE_REQUIRED
            - CONVERSION_RESOURCE_READBACK_MISMATCH
            - CREATIVE_COPY_UNAVAILABLE
            - CREATIVE_FORMAT_LOOKUP_FAILED
            - CREATIVE_IDENTITY_DRIFT
            - CREATIVE_IDENTITY_MALFORMED
            - CREATIVE_IDENTITY_STORE_UNAVAILABLE
            - CREATIVE_IDENTITY_UNAVAILABLE
            - CREATIVE_MUSIC_UNAVAILABLE
            - CREATIVE_NOT_READY
            - DIRECT_MESSAGE_CREATIVE_IDENTITY_MISMATCH
            - DIRECT_MESSAGE_CREATIVE_REQUIRED
            - DIRECT_MESSAGE_IDENTITY_NOT_AUTHORIZED
            - DURABLE_TENANT_SCOPE_REQUIRED
            - EVENT_SOURCE_NOT_AUTHORIZED
            - INCOMPATIBLE_APP_PROMOTION_TYPES
            - INCOMPATIBLE_CAMPAIGN_OBJECTIVES
            - INCOMPATIBLE_CAMPAIGN_PRODUCT_SOURCES
            - INCOMPATIBLE_CAMPAIGN_TYPES
            - INCOMPATIBLE_OPTIMIZATION_GOALS
            - INCOMPLETE_PAGINATION
            - INVALID_ADVERTISER_SCOPE
            - INVALID_APPLICATION_INVENTORY
            - INVALID_AUDIENCE_DETAIL
            - INVALID_AUDIENCE_INVENTORY
            - INVALID_AUDIENCE_REFERENCE
            - INVALID_AUDIENCE_RESPONSE
            - INVALID_BUSINESS_IDENTITY_INVENTORY
            - INVALID_CALL_DESTINATION
            - INVALID_CATALOG_INVENTORY
            - INVALID_LEAD_FORM_INVENTORY
            - INVALID_MESSAGE_EVENT_SET
            - INVALID_MESSAGING_APP_DESTINATION
            - INVALID_PARAMS
            - INVALID_PIXEL_INVENTORY
            - INVALID_PROVIDER_RESPONSE
            - INVALID_REQUEST
            - INVALID_SELECTED_ACCOUNT
            - INVALID_SPARK_IDENTITY_INVENTORY
            - INVALID_SUCCESS_ENVELOPE
            - INVALID_WELCOME_MESSAGE_INVENTORY
            - LEAD_FORM_NOT_AUTHORIZED
            - LEAD_FORM_REQUIRED
            - MEDIA_BUY_CURRENCY_MISMATCH
            - MESSAGE_EVENT_SET_MISMATCH
            - MESSAGE_EVENT_SET_NOT_AUTHORIZED
            - MESSAGE_EVENT_SET_READBACK_MISMATCH
            - MESSAGE_EVENT_SET_REQUIRED
            - MESSAGING_APP_DESTINATION_READBACK_MISMATCH
            - MESSAGING_APP_DESTINATION_REQUIRED
            - MISSING_ACCOUNT_ID
            - MISSING_TARGETING_GEO
            - NETWORK_ERROR
            - NOT_FOUND
            - OPTIMIZATION_GOAL_READBACK_MISMATCH
            - OWNERSHIP_MISMATCH
            - PARTIAL_UPDATE_UNRECOVERED
            - PERMISSION_DENIED
            - PLACEMENT_READBACK_MALFORMED
            - PLACEMENT_READBACK_MISMATCH
            - PLATFORM_ERROR
            - PLATFORM_IDENTITY_NOT_AUTHORIZED
            - PLATFORM_IDENTITY_REQUIRED
            - POLICY_VIOLATION
            - PRODUCT_CURRENCY_MISMATCH
            - PRODUCT_SET_NOT_AUTHORIZED
            - PROMOTION_TARGET_TYPE_READBACK_MISMATCH
            - PROMOTION_TYPE_READBACK_MISMATCH
            - PROVIDER_READBACK_MISMATCH
            - PROVIDER_READBACK_UNAVAILABLE
            - RATE_LIMIT
            - RATE_LIMITED
            - REQUEST_ABORTED
            - REVISION_CONFLICT
            - REVISION_LEDGER_UNAVAILABLE
            - SCOPE_INSUFFICIENT
            - SERVICE_UNAVAILABLE
            - SMART_PLUS_ACTIVATION_FAILED
            - SMART_PLUS_ACTIVATION_READBACK_MISMATCH
            - SMART_PLUS_ADGROUP_READBACK_MISMATCH
            - SMART_PLUS_AD_READBACK_MISMATCH
            - SMART_PLUS_APP_REQUIRED
            - SMART_PLUS_CALL_TO_ACTION_UNSUPPORTED
            - SMART_PLUS_CAMPAIGN_READBACK_MISMATCH
            - SMART_PLUS_CATALOG_NOT_SUPPORTED
            - SMART_PLUS_COPY_REQUIRED
            - SMART_PLUS_CREATIVE_FORMAT_UNSUPPORTED
            - SMART_PLUS_CREATIVE_MODE_MISMATCH
            - SMART_PLUS_CREATIVE_REQUIRED
            - SMART_PLUS_DESTINATION_REQUIRED
            - SMART_PLUS_IDENTITY_MISMATCH
            - SMART_PLUS_IDENTITY_REQUIRED
            - SMART_PLUS_OPTIMIZATION_REQUIRED
            - SMART_PLUS_SELECTED_IDENTITY_MISMATCH
            - SMART_PLUS_SINGLE_PACKAGE_REQUIRED
            - SNAP_ME_MALFORMED
            - SPARK_CREATIVE_IDENTITY_MISMATCH
            - SPARK_CREATIVE_REQUIRED
            - TARGETING_LEDGER_CLEANUP_FAILED
            - TARGETING_LEDGER_INVALID
            - TARGETING_LEDGER_MISMATCH
            - TARGETING_LEDGER_UNAVAILABLE
            - TARGETING_READBACK_FAILED
            - TARGETING_READBACK_IDENTITY_MISMATCH
            - TARGETING_READBACK_MALFORMED
            - TARGETING_READBACK_MISMATCH
            - TERMINAL_MEDIA_BUY
            - TIMEOUT
            - UNKNOWN_CREATIVE_ID
            - UNSUPPORTED_CONVERSATION_DESTINATION
            - UNSUPPORTED_OFFERING_CREATIVE_PATH
            - UNSUPPORTED_OPTIMIZATION_GOAL
            - UNSUPPORTED_PLACEMENT_MUTATION
            - UNSUPPORTED_TARGETING_DIMENSION
            - UNSUPPORTED_UPDATE_FIELD
            - UPSTREAM_BAD_GATEWAY
            - UPSTREAM_HTTP_ERROR
            - UPSTREAM_NON_JSON
            - UPSTREAM_UNAVAILABLE
            - VALIDATION_ERROR
            - WELCOME_MESSAGE_NOT_AUTHORIZED
            - WELCOME_MESSAGE_REQUIRED
        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.behaviors
      required:
        - subscriptionId
        - mirrored
        - retired
        - skipped
        - errors
      additionalProperties: false
      description: >-
        Counts and bounded safe diagnostics from one account-wide mirror
        reconciliation.
    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
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key or access token

````