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

# Restore advertiser

> Restore a previously deleted (archived) advertiser, making it active again.



## OpenAPI

````yaml /v2/buyer-api-v2.yaml post /advertisers/{advertiserId}/restore
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:
  /advertisers/{advertiserId}/restore:
    post:
      tags:
        - Advertisers
      summary: Restore advertiser
      description: >-
        Restore a previously deleted (archived) advertiser, making it active
        again.
      operationId: restoreAdvertiser
      parameters:
        - in: path
          name: advertiserId
          schema:
            description: Unique identifier for the advertiser
            example: '12345'
            type: string
            minLength: 1
          required: true
          description: Unique identifier for the advertiser
      responses:
        '200':
          description: Restore advertiser
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Advertiser'
        '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: No archived advertiser with this id.
          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:
    Advertiser:
      description: Advertiser resource representation
      type: object
      properties:
        id:
          description: Unique identifier for the advertiser
          example: '12345'
          type: string
        name:
          description: Name of the advertiser
          example: Acme Corp
          type: string
        description:
          description: Description of the advertiser
          example: Global advertising account for Acme Corporation
          type: string
        status:
          description: Current status of the advertiser
          type: string
          enum:
            - ACTIVE
            - ARCHIVED
        createdAt:
          description: When the advertiser was created (ISO 8601)
          example: '2025-01-15T10:30:00Z'
          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:
          description: When the advertiser was last updated (ISO 8601)
          example: '2025-01-20T14:45:00Z'
          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))$
        linkedBrand:
          description: >-
            The brand linked to this advertiser. Only present when
            includeBrand=true is passed to the list endpoint.
          type: object
          properties:
            id:
              description: Brand ID
              example: brand_123
              type: string
            name:
              description: Brand name
              example: Acme Brand
              type: string
            domain:
              description: Brand domain
              example: acme.com
              type: string
            manifest:
              description: >-
                Full resolved brand identity data — includes logos, colors,
                fonts, tone, tagline, assets, product catalog, disclaimers, and
                more
              allOf:
                - $ref: '#/components/schemas/BrandManifestJson'
            logoUrl:
              description: Primary brand logo URL
              example: https://acme.com/logo.png
              type: string
            industry:
              description: Brand industry
              example: Technology
              type: string
            colors:
              description: Brand color palette
              example:
                primary: '#FF5733'
              type: object
              additionalProperties:
                type: string
            tagline:
              description: Brand tagline
              example: Innovation for Everyone
              type: string
            tone:
              description: Brand voice and tone
              example: Professional, friendly, and innovative
              type: string
          required:
            - id
            - name
            - domain
            - manifest
          additionalProperties: false
        brand:
          description: The brand domain associated with this advertiser
          example: nike.com
          type: string
        brandWarning:
          description: Warning about brand resolution (e.g., manifest not found)
          type: string
        sandbox:
          description: >-
            When true, this advertiser is in sandbox mode. All ADCP operations
            use sandbox-flagged accounts. Cannot be changed after creation.
          type: boolean
        optimizationApplyMode:
          description: >-
            Default mode for applying Scope3 AI model optimizations to media
            buys for campaigns under this advertiser. When set to "AUTO",
            optimizations are applied automatically; when "MANUAL", they require
            approval.
          allOf:
            - $ref: '#/components/schemas/OptimizationApplyMode'
        primaryCurrency:
          description: >-
            Primary ISO 4217 currency for this advertiser. Every campaign under
            this advertiser is created in this currency, and selected product
            pricing must match it.
          example: USD
          type: string
          minLength: 3
          maxLength: 3
          pattern: ^[A-Z]{3}$
        currencyLocked:
          description: >-
            True once the advertiser has at least one campaign. While false,
            `primaryCurrency` can still be changed; once true it is locked.
          type: boolean
        linkedAccounts:
          description: >-
            Linked partner accounts for this advertiser. Only present when
            includeAccounts=true is passed to the list endpoint.
          type: array
          items:
            $ref: '#/components/schemas/LinkedAccount'
        utmConfig:
          description: >-
            Advertiser-level UTM parameter configuration. Only present when UTM
            params are configured for this advertiser.
          type: array
          items:
            type: object
            properties:
              paramKey:
                description: Output query parameter key
                example: utm_campaign
                type: string
              paramValue:
                description: Macro or static value
                example: '{CAMPAIGN_ID}'
                type: string
              source:
                description: >-
                  Where this param was configured — "advertiser" for advertiser
                  default, "campaign" for campaign override
                type: string
                enum:
                  - advertiser
                  - campaign
            required:
              - paramKey
              - paramValue
              - source
            additionalProperties: false
        dataDelivery:
          $ref: '#/components/schemas/AdvertiserDataDelivery'
        frequencyCaps:
          description: >-
            Buyer-side frequency cap configs for this advertiser. Always present
            on single-GET; on LIST only when includeFrequencyCaps=true.
          type: array
          items:
            $ref: '#/components/schemas/FrequencyCapConfig'
      required:
        - id
        - name
        - status
        - createdAt
        - updatedAt
        - sandbox
        - optimizationApplyMode
        - primaryCurrency
        - currencyLocked
      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
    BrandManifestJson:
      description: Full brand.json profile conforming to the ADCP v2 schema
      type: object
      properties:
        name:
          description: Brand name (required)
          example: Acme Corporation
          type: string
          minLength: 1
          maxLength: 500
        url:
          description: Brand website URL
          example: https://www.acme.com
          type: string
          format: uri
        logos:
          description: Brand logos
          type: array
          items:
            type: object
            properties:
              url:
                description: URL to the logo image
                type: string
                format: uri
              tags:
                description: Tags categorizing the logo (e.g., "primary", "dark", "square")
                type: array
                items:
                  type: string
              background:
                description: >-
                  Backdrop the logo is designed for (dark-bg for a light or
                  knockout logo, light-bg for a dark logo, transparent-bg for a
                  logo with no baked-in background).
                type: string
                enum:
                  - dark-bg
                  - light-bg
                  - transparent-bg
              width:
                description: Width of the logo in pixels
                type: integer
                maximum: 9007199254740991
                minimum: 1
              height:
                description: Height of the logo in pixels
                type: integer
                maximum: 9007199254740991
                minimum: 1
            required:
              - url
            additionalProperties: {}
        colors:
          description: Brand color palette
          type: object
          properties:
            primary:
              description: Primary brand color in hex format
              example: '#FF5733'
              type: string
              pattern: ^#[0-9A-Fa-f]{6}$
            secondary:
              description: Secondary brand color in hex format
              type: string
              pattern: ^#[0-9A-Fa-f]{6}$
            accent:
              description: Accent brand color in hex format
              type: string
              pattern: ^#[0-9A-Fa-f]{6}$
            background:
              description: Background color in hex format
              type: string
              pattern: ^#[0-9A-Fa-f]{6}$
            text:
              description: Text color in hex format
              type: string
              pattern: ^#[0-9A-Fa-f]{6}$
          additionalProperties: {}
        fonts:
          description: Brand typography
          anyOf:
            - type: object
              properties:
                primary:
                  description: Primary font family name
                  example: Roboto
                  type: string
                secondary:
                  description: Secondary font family name
                  type: string
                fontUrls:
                  description: URLs to font files
                  type: array
                  items:
                    type: string
                    format: uri
              additionalProperties: {}
            - description: Font list from enrichment sources (Brandfetch format)
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                  role:
                    type: string
                required:
                  - name
                additionalProperties: {}
        tone:
          description: Brand voice and tone description
          example: Professional, friendly, and innovative
          type: string
          maxLength: 2000
        tagline:
          description: Brand tagline or slogan
          example: Innovation for Everyone
          type: string
          maxLength: 500
        assets:
          description: Brand assets (images, videos, etc.)
          type: array
          items:
            type: object
            properties:
              assetId:
                description: Unique identifier for the asset
                type: string
              assetType:
                description: Type of asset (e.g., "image", "video", "audio")
                type: string
              url:
                description: URL to the asset
                type: string
                format: uri
              name:
                description: Human-readable name for the asset
                type: string
              description:
                description: Description of the asset
                type: string
              tags:
                description: Tags categorizing the asset
                type: array
                items:
                  type: string
              width:
                description: Width in pixels (for images/videos)
                type: integer
                maximum: 9007199254740991
                minimum: 1
              height:
                description: Height in pixels (for images/videos)
                type: integer
                maximum: 9007199254740991
                minimum: 1
              durationSeconds:
                description: Duration in seconds (for audio/video)
                type: number
                minimum: 0
                exclusiveMinimum: true
              fileSizeBytes:
                description: File size in bytes
                type: integer
                maximum: 9007199254740991
                minimum: 1
              format:
                description: File format (e.g., "png", "mp4")
                type: string
              metadata:
                description: Additional metadata
                type: object
                additionalProperties: {}
            required:
              - assetId
              - assetType
              - url
            additionalProperties: {}
        productCatalog:
          description: Product catalog configuration
          type: object
          properties:
            feedUrl:
              description: URL to the product feed
              type: string
              format: uri
            feedFormat:
              description: Format of the product feed
              type: string
              enum:
                - google_merchant_center
                - facebook_catalog
                - custom
            categories:
              description: Product categories
              type: array
              items:
                type: string
            lastUpdated:
              description: When the catalog was last updated (ISO 8601)
              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))$
            updateFrequency:
              description: How often the catalog is updated
              type: string
              enum:
                - realtime
                - hourly
                - daily
                - weekly
          required:
            - feedUrl
          additionalProperties: {}
        disclaimers:
          description: Legal disclaimers and required text
          type: array
          items:
            type: object
            properties:
              text:
                description: Disclaimer text
                type: string
              context:
                description: Context in which the disclaimer applies
                type: string
              required:
                description: Whether the disclaimer is required
                default: true
                type: boolean
            required:
              - text
              - required
            additionalProperties: {}
        industry:
          description: Industry or sector
          example: Technology
          type: string
          maxLength: 255
        advertiserIndustry:
          description: >-
            Canonical AdCP advertiser-industry code (normalized from the
            free-text industry). Drives category-based starter briefs and
            cross-platform interop.
          example: food_beverage.restaurants
          type: string
          enum:
            - automotive
            - automotive.electric_vehicles
            - automotive.parts_accessories
            - automotive.luxury
            - beauty_cosmetics
            - beauty_cosmetics.skincare
            - beauty_cosmetics.fragrance
            - beauty_cosmetics.haircare
            - cannabis
            - cpg
            - cpg.personal_care
            - cpg.household
            - dating
            - education
            - education.higher_education
            - education.online_learning
            - education.k12
            - energy_utilities
            - energy_utilities.renewable
            - fashion_apparel
            - fashion_apparel.luxury
            - fashion_apparel.sportswear
            - finance
            - finance.banking
            - finance.insurance
            - finance.investment
            - finance.cryptocurrency
            - food_beverage
            - food_beverage.alcohol
            - food_beverage.restaurants
            - food_beverage.packaged_goods
            - gambling_betting
            - gambling_betting.sports_betting
            - gambling_betting.casino
            - gaming
            - gaming.mobile
            - gaming.console_pc
            - gaming.esports
            - government_nonprofit
            - government_nonprofit.political
            - government_nonprofit.charity
            - healthcare
            - healthcare.pharmaceutical
            - healthcare.medical_devices
            - healthcare.wellness
            - home_garden
            - home_garden.furniture
            - home_garden.home_improvement
            - media_entertainment
            - media_entertainment.podcasts
            - media_entertainment.music
            - media_entertainment.film_tv
            - media_entertainment.publishing
            - media_entertainment.live_events
            - pets
            - professional_services
            - professional_services.legal
            - professional_services.consulting
            - real_estate
            - real_estate.residential
            - real_estate.commercial
            - recruitment_hr
            - retail
            - retail.ecommerce
            - retail.department_stores
            - sports_fitness
            - sports_fitness.equipment
            - sports_fitness.teams_leagues
            - technology
            - technology.software
            - technology.hardware
            - technology.ai_ml
            - telecom
            - telecom.mobile_carriers
            - telecom.internet_providers
            - transportation_logistics
            - travel_hospitality
            - travel_hospitality.airlines
            - travel_hospitality.hotels
            - travel_hospitality.cruise
            - travel_hospitality.tourism
        targetAudience:
          description: Target audience description
          example: Small business owners aged 25-45
          type: string
          maxLength: 1000
        contact:
          description: Contact information
          type: object
          properties:
            email:
              description: Contact email address
              type: string
              format: email
              pattern: >-
                ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
            phone:
              description: Contact phone number
              type: string
            website:
              description: Contact website URL
              type: string
              format: uri
          additionalProperties: {}
        metadata:
          description: Manifest metadata
          type: object
          properties:
            createdDate:
              description: When the manifest was created (ISO 8601)
              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))$
            updatedDate:
              description: When the manifest was last updated (ISO 8601)
              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))$
            version:
              description: Version of the manifest
              example: 1.0.0
              type: string
          additionalProperties: {}
      required:
        - name
      additionalProperties: {}
    OptimizationApplyMode:
      description: >-
        Whether optimization suggestions are automatically applied or require
        human approval.
      type: string
      enum:
        - AUTO
        - MANUAL
    LinkedAccount:
      description: A partner account linked to this advertiser
      type: object
      properties:
        linkId:
          description: Unique link identifier
          type: string
        accountId:
          description: Account identifier on the partner platform
          type: string
        credentialId:
          description: >-
            Credential row that owns this linked account. Include this value
            when updating linked accounts so duplicate account IDs across mapped
            connections remain unambiguous.
          example: '42'
          nullable: true
          type: string
        name:
          description: Account name
          nullable: true
          type: string
        sources:
          description: >-
            Storefront sources that surface this linked account to the buyer.
            Empty when the underlying agent is no longer linked to any active
            storefront source.
          type: array
          items:
            $ref: '#/components/schemas/BuyerCredentialSourceRef'
        status:
          description: Account status
          type: string
        createdAt:
          description: When linked (ISO 8601)
          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:
          description: When last updated (ISO 8601)
          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:
        - linkId
        - accountId
        - name
        - sources
        - status
        - createdAt
        - updatedAt
      additionalProperties: false
    AdvertiserDataDelivery:
      description: >-
        Data-delivery configuration for this advertiser. Groups standing Data
        Delivery Outputs and the credentials they reference. Distinct from
        media-buy reporting fields elsewhere in the API.
      type: object
      properties:
        credentials:
          description: >-
            Live Data Delivery Credentials owned by this advertiser. Only
            present when at least one credential exists.
          type: array
          items:
            $ref: '#/components/schemas/DataDeliveryCredential'
        outputs:
          description: >-
            Advertiser-scoped Data Delivery Outputs (standing LLD
            subscriptions). Only present when at least one Output is configured.
          type: array
          items:
            $ref: '#/components/schemas/DataDeliveryOutput'
      additionalProperties: false
    FrequencyCapConfig:
      description: Buyer-side frequency cap configuration
      type: object
      properties:
        max_impressions:
          description: Maximum number of impressions allowed within the window
          example: 3
          type: integer
          maximum: 9007199254740991
          minimum: 1
        window:
          $ref: '#/components/schemas/FrequencyCapWindow'
        id:
          description: Unique identifier for the frequency cap config
          example: '12345'
          type: string
        targetLevel:
          description: Level of the entity the cap applies to
          allOf:
            - $ref: '#/components/schemas/FrequencyCapTargetLevel'
        targetId:
          description: >-
            Identifier of the entity at the chosen target level: advertiser_id
            when targetLevel is ADVERTISER, campaign_id when CAMPAIGN,
            creative_id when CREATIVE.
          example: camp_abc123
          type: string
        createdAt:
          description: ISO 8601 creation timestamp
          type: string
        updatedAt:
          description: ISO 8601 last-updated timestamp
          type: string
        archivedAt:
          description: ISO 8601 archive timestamp; null for active configs
          nullable: true
          type: string
      required:
        - max_impressions
        - window
        - id
        - targetLevel
        - targetId
        - createdAt
        - updatedAt
      additionalProperties: {}
    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
    BuyerCredentialSourceRef:
      description: >-
        A storefront/source pair that a single credential row gives the buyer
        access to
      type: object
      properties:
        storefrontId:
          description: Storefront ID this credential covers
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        storefrontName:
          description: Storefront display name
          type: string
        sourceId:
          description: Inventory source ID within the storefront
          type: string
        sourceName:
          description: Inventory source display name
          type: string
      required:
        - storefrontId
        - storefrontName
        - sourceId
        - sourceName
      additionalProperties: false
    DataDeliveryCredential:
      description: Resolved Data Delivery Credential as returned by the API.
      type: object
      properties:
        credentialId:
          description: Database identifier for the credential row.
          type: string
        name:
          type: string
        destinationType:
          type: string
          enum:
            - GCS
            - S3
            - AZURE_BLOB
            - SNOWFLAKE
            - DATABRICKS
        config:
          $ref: '#/components/schemas/CredentialConfig'
        status:
          description: >-
            Outcome of the most recent Probe. PENDING until the first Probe
            completes, VALIDATED when the credential is reachable, FAILED when
            not. Data Delivery Outputs may reference any status;
            ReportDeliveryWorkflow checks at run time.
          type: string
          enum:
            - PENDING
            - VALIDATED
            - FAILED
        statusError:
          description: Human-readable Probe failure reason when status=FAILED.
          type: string
        validatedAt:
          description: ISO timestamp of the most recent successful Probe.
          type: string
        expiresAt:
          description: >-
            ISO timestamp at which the credential is known to expire. Populated
            for credential shapes that carry an expiry claim (e.g., the `se=`
            field of an Azure SAS token). Absent when the destination does not
            encode an expiry.
          type: string
        createdAt:
          type: string
        updatedAt:
          type: string
      required:
        - credentialId
        - name
        - destinationType
        - config
        - status
        - createdAt
        - updatedAt
      additionalProperties: false
    DataDeliveryOutput:
      description: Resolved Data Delivery Output as returned by the API.
      type: object
      properties:
        outputConfigId:
          description: Database identifier for the underlying output config row.
          type: string
        dataDeliveryType:
          type: string
          enum:
            - MB_DELIVERY
            - IMPRESSIONS
            - CLICKS
            - VAST_EVENTS
            - CAPI_ATTRIBUTION
            - MMP_POSTBACKS
        cadence:
          type: string
          enum:
            - HOURLY
            - DAILY
            - WEEKLY
        syncWeeklyDay:
          type: integer
          minimum: 0
          maximum: 6
        enabled:
          type: boolean
        credentialId:
          description: >-
            Database identifier of the Data Delivery Credential authenticating
            this Output.
          type: string
        credentialName:
          description: >-
            Name of the Data Delivery Credential authenticating this Output
            (advertiser-scoped, unique among live credentials).
          type: string
        deliveryConfig:
          $ref: '#/components/schemas/DeliveryConfigOutput'
        source:
          description: >-
            Where this Output was configured — "advertiser" for default,
            "campaign" for an override.
          type: string
          enum:
            - advertiser
            - campaign
        createdAt:
          type: string
        updatedAt:
          type: string
      required:
        - outputConfigId
        - dataDeliveryType
        - cadence
        - enabled
        - credentialId
        - credentialName
        - deliveryConfig
        - source
        - createdAt
        - updatedAt
      additionalProperties: false
    FrequencyCapWindow:
      description: >-
        Rolling time window over which max_impressions applies (AdCP Duration
        shape).
      type: object
      properties:
        interval:
          type: number
          minimum: 1
        unit:
          anyOf:
            - type: string
              enum:
                - seconds
            - type: string
              enum:
                - minutes
            - type: string
              enum:
                - hours
            - type: string
              enum:
                - days
            - type: string
              enum:
                - campaign
      required:
        - interval
        - unit
      additionalProperties: {}
    FrequencyCapTargetLevel:
      description: Level of the entity the frequency cap applies to
      type: string
      enum:
        - ADVERTISER
        - CAMPAIGN
        - CREATIVE
    CredentialConfig:
      description: >-
        Destination-specific auth target as stored on the credential row.
        AZURE_BLOB omits the SAS token — the token lives in Google Secret
        Manager and is fetched at probe / delivery time.
      oneOf:
        - $ref: '#/components/schemas/GcsCredentialConfigOutput'
        - $ref: '#/components/schemas/S3CredentialConfigOutput'
        - $ref: '#/components/schemas/AzureBlobCredentialConfig'
      type: object
      discriminator:
        propertyName: type
        mapping:
          GCS:
            $ref: '#/components/schemas/GcsCredentialConfigOutput'
          S3:
            $ref: '#/components/schemas/S3CredentialConfigOutput'
          AZURE_BLOB:
            $ref: '#/components/schemas/AzureBlobCredentialConfig'
    DeliveryConfigOutput:
      description: >-
        Per-Output destination shape (non-secret). Additional destination types
        are added as new variants in this discriminated union.
      oneOf:
        - $ref: '#/components/schemas/GcsDeliveryConfigOutput'
        - $ref: '#/components/schemas/S3DeliveryConfigOutput'
        - $ref: '#/components/schemas/AzureBlobDeliveryConfigOutput'
      type: object
      discriminator:
        propertyName: type
        mapping:
          GCS:
            $ref: '#/components/schemas/GcsDeliveryConfigOutput'
          S3:
            $ref: '#/components/schemas/S3DeliveryConfigOutput'
          AZURE_BLOB:
            $ref: '#/components/schemas/AzureBlobDeliveryConfigOutput'
    GcsCredentialConfigOutput:
      type: object
      properties:
        type:
          type: string
          enum:
            - GCS
        bucket:
          description: >-
            Target GCS bucket the Probe writes to and Data Delivery Outputs ship
            objects into. The Scope3 service account must have objectCreator on
            this bucket.
          type: string
          minLength: 1
          maxLength: 222
          pattern: ^[a-z0-9][a-z0-9._-]*[a-z0-9]$
      required:
        - type
        - bucket
      additionalProperties: false
    S3CredentialConfigOutput:
      type: object
      properties:
        type:
          type: string
          enum:
            - S3
        bucket:
          description: >-
            Target S3 bucket the Probe writes to and Data Delivery Outputs ship
            objects into. The bucket policy must grant the Scope3 AWS IAM
            principal s3:PutObject (and s3:DeleteObject for the Probe sweep) on
            objects under the Output path prefix.
          type: string
          minLength: 3
          maxLength: 63
          pattern: ^[a-z0-9][a-z0-9.-]*[a-z0-9]$
        region:
          description: >-
            AWS region of the target bucket. Supports commercial, GovCloud, and
            ISO partitions (e.g., us-east-1, us-gov-east-1).
          type: string
          pattern: ^[a-z]{2}(-[a-z]+)+-\d+$
      required:
        - type
        - bucket
        - region
      additionalProperties: false
    AzureBlobCredentialConfig:
      type: object
      properties:
        type:
          type: string
          enum:
            - AZURE_BLOB
        storageAccountName:
          description: >-
            Azure Storage account hosting the target container, e.g.
            `datareports`. The container is accessed at
            `https://<storageAccountName>.blob.core.windows.net/`.
          type: string
          minLength: 3
          maxLength: 24
          pattern: ^[a-z0-9]+$
        containerName:
          description: >-
            Azure Blob container that the Probe writes to and Data Delivery
            Outputs ship objects into.
          type: string
          minLength: 3
          maxLength: 63
          pattern: ^(?!.*--)[a-z0-9][a-z0-9-]*[a-z0-9]$
        auth:
          $ref: '#/components/schemas/AzureBlobAuthStored'
      required:
        - type
        - storageAccountName
        - containerName
        - auth
      additionalProperties: false
    GcsDeliveryConfigOutput:
      type: object
      properties:
        type:
          type: string
          enum:
            - GCS
        pathPrefix:
          description: >-
            Object key prefix within the credential's bucket. Leading slashes
            are not stripped. The tokens {YYYY}, {MM}, {DD}, {HH} (from the
            delivery period start, UTC) and {DATA_DELIVERY_TYPE} are substituted
            at delivery time — e.g.
            "lld/{YYYY}/{MM}/{DD}/{HH}/{DATA_DELIVERY_TYPE}/" →
            "lld/2026/06/03/14/IMPRESSIONS/". Any other text is used verbatim.
          default: ''
          type: string
          maxLength: 1024
        format:
          default: JSONL
          type: string
          enum:
            - JSONL
            - PARQUET
            - CSV
      required:
        - type
        - pathPrefix
        - format
      additionalProperties: false
    S3DeliveryConfigOutput:
      type: object
      properties:
        type:
          type: string
          enum:
            - S3
        pathPrefix:
          description: >-
            Object key prefix within the credential's S3 bucket. Leading slashes
            are not stripped. The tokens {YYYY}, {MM}, {DD}, {HH} (from the
            delivery period start, UTC) and {DATA_DELIVERY_TYPE} are substituted
            at delivery time — e.g.
            "lld/{YYYY}/{MM}/{DD}/{HH}/{DATA_DELIVERY_TYPE}/" →
            "lld/2026/06/03/14/IMPRESSIONS/". Any other text is used verbatim.
          default: ''
          type: string
          maxLength: 1024
        format:
          default: JSONL
          type: string
          enum:
            - JSONL
            - PARQUET
            - CSV
      required:
        - type
        - pathPrefix
        - format
      additionalProperties: false
    AzureBlobDeliveryConfigOutput:
      type: object
      properties:
        type:
          type: string
          enum:
            - AZURE_BLOB
        pathPrefix:
          description: >-
            Blob name prefix within the credential's Azure container. Leading
            slashes are not stripped. The tokens {YYYY}, {MM}, {DD}, {HH} (from
            the delivery period start, UTC) and {DATA_DELIVERY_TYPE} are
            substituted at delivery time — e.g.
            "lld/{YYYY}/{MM}/{DD}/{HH}/{DATA_DELIVERY_TYPE}/" →
            "lld/2026/06/03/14/IMPRESSIONS/". Any other text is used verbatim.
          default: ''
          type: string
          maxLength: 1024
        format:
          default: JSONL
          type: string
          enum:
            - JSONL
            - PARQUET
            - CSV
      required:
        - type
        - pathPrefix
        - format
      additionalProperties: false
    AzureBlobAuthStored:
      oneOf:
        - $ref: '#/components/schemas/AzureBlobSasAuthStored'
      type: object
      discriminator:
        propertyName: mode
        mapping:
          SAS_TOKEN:
            $ref: '#/components/schemas/AzureBlobSasAuthStored'
    AzureBlobSasAuthStored:
      type: object
      properties:
        mode:
          type: string
          enum:
            - SAS_TOKEN
      required:
        - mode
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key or access token

````