# This OpenAPI specification is auto-generated
# DO NOT EDIT THIS FILE MANUALLY
# API Type: STOREFRONT
# API Version: V2

openapi: 3.0.0
info:
  title: Scope3 Storefront API
  version: 2.0.0
  description: |-
    REST API for partners to manage storefronts, inventory sources, and billing.

    ## Authentication

    All endpoints require a Bearer token in the Authorization header:
    ```
    Authorization: Bearer your-api-key
    ```

    ## Base URL

    `https://api.interchange.io/api/v2/storefront`

    ## For AI Agents

    AI agents can use the MCP endpoint at `/mcp/v2/storefront` 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/storefront
    description: Production server
  - url: https://api.staging.interchange.io/api/v2/storefront
    description: Staging server
tags:
  - name: Account
    description: Account management, service tokens, and preferences
  - name: Storefront
    description: Manage storefront and inventory sources
  - name: Storefront Agents
    description: List and manage registered sales, signals, and outcomes agents
  - name: Storefront Activity
    description: Audit log of configuration and inventory changes on the storefront
  - name: Storefront Billing
    description: Stripe Connect billing for storefronts
  - name: MCP
    description: Model Context Protocol endpoints
paths:
  /accounts/current:
    servers: &ref_0
      - url: https://api.interchange.io/api/v2
        description: Production server
      - url: https://api.staging.interchange.io/api/v2
        description: Staging server
    get:
      operationId: getCurrentAccount
      summary: Get current account
      description: Get the authenticated user's current customer account context.
      tags:
        - Account
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Get current account
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CurrentAccountResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /accounts:
    servers: *ref_0
    get:
      operationId: listCustomerAccounts
      summary: List customer accounts
      description: List all customer accounts the authenticated user has active membership on.
      tags:
        - Account
      security:
        - bearerAuth: []
      responses:
        '200':
          description: List customer accounts
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListCustomerAccountsResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /accounts/create-child:
    servers: *ref_0
    post:
      operationId: createChildAccount
      summary: Create child account
      description: >-
        Create a new child customer account. For standalone customers, creates a parent/child hierarchy first. Requires
        ADMIN role.
      tags:
        - Account
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateChildAccountBody'
      responses:
        '201':
          description: Create child account
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateChildAccountResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /accounts/{customerId}/domain:
    servers: *ref_0
    patch:
      operationId: updateCustomerDomain
      summary: Update customer domain
      description: >-
        Update a customer's registered organization domain. Requires ADMIN role on the target customer (direct
        membership, parent admin via the customer hierarchy, or SuperAdmin).
      tags:
        - Account
      security:
        - bearerAuth: []
      parameters:
        - in: path
          name: customerId
          schema:
            description: Customer ID
            example: '200'
            type: string
            minLength: 1
          required: true
          description: Customer ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCustomerDomainBody'
      responses:
        '200':
          description: Update customer domain
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateCustomerDomainResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /notification-preferences:
    servers: *ref_0
    get:
      operationId: getNotificationPreferences
      summary: Get notification preferences
      description: Get notification opt-in preferences for the authenticated user.
      tags:
        - Account
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Get notification preferences
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    put:
      operationId: updateNotificationPreferences
      summary: Update notification preferences
      description: Set notification opt-in preferences for the authenticated user. Replaces all existing opt-ins.
      tags:
        - Account
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                optIns:
                  maxItems: 200
                  type: array
                  items:
                    type: object
                    properties:
                      notificationType:
                        type: string
                        enum:
                          - brand_agent.created
                          - brand_agent.updated
                          - brand_agent.deleted
                          - campaign.healthy
                          - campaign.unhealthy
                          - campaign.created
                          - campaign.updated
                          - campaign.deleted
                          - campaign.completed
                          - creative.approved
                          - creative.rejected
                          - creative.changes_requested
                          - creative.sync_started
                          - creative.sync_completed
                          - creative.sync_failed
                          - creative.created
                          - creative.updated
                          - creative.deleted
                          - strategy.created
                          - strategy.updated
                          - strategy.deleted
                          - media_buy.created
                          - media_buy.updated
                          - media_buy.deleted
                          - salesagent.available
                          - salesagent.unavailable
                          - salesagent.registered
                          - salesagent.unregistered
                          - salesagent.updated
                          - signalsagent.registered
                          - signalsagent.unregistered
                          - signalsagent.updated
                          - signalsagent.signal_activated
                          - signalsagent.signals_fetched
                          - outcomesagent.registered
                          - outcomesagent.unregistered
                          - outcomesagent.updated
                          - syndication.completed
                          - syndication.failed
                          - audience.synced
                          - audience.sync_failed
                          - optimization.suggestion_received
                          - optimization.suggestion_approved
                          - optimization.suggestion_rejected
                          - optimization.suggestion_applied
                          - optimization.suggestion_failed
                          - system.warning
                          - system.error
                          - learning_cycle.completed
                          - learning_cycle.failed
                          - hypothesis.status_changed
                          - hypothesis.review_requested
                          - hypothesis.proven
                          - hypothesis.disproven
                          - measurement.received
                          - measurement.stale
                          - opportunity.evaluated
                          - opportunity.recommended
                          - opportunity.flagged
                          - opportunity.explore
                      channel:
                        type: string
                        enum:
                          - email
                          - in_app
                    required:
                      - notificationType
                      - channel
              required:
                - optIns
      responses:
        '200':
          description: Update notification preferences
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /moderation/check:
    servers: *ref_0
    post:
      operationId: checkModeration
      summary: Pre-check content against moderation policy
      description: >-
        Runs the content-moderation engine against the supplied text WITHOUT blocking. Returns structured findings
        (category, severity, suggestion) so buyer agents can validate input before submitting it to a campaign create or
        other blocking surface. Mirrors the engine that powers `POST /v2/campaigns` brief screening.
      tags:
        - Moderation
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                text:
                  description: The text to evaluate. Up to 10,000 characters; longer text is truncated server-side.
                  type: string
                  minLength: 1
                  maxLength: 10000
                direction:
                  description: >-
                    Which pattern set to apply. "input" runs the brief/jailbreak/policy patterns; "output" runs the
                    LLM-output (refusal/identity/PII) patterns.
                  default: input
                  type: string
                  enum:
                    - input
                    - output
                surface:
                  description: Optional surface label for metric attribution. Defaults to "moderation.check".
                  default: moderation.check
                  type: string
                  minLength: 1
                  maxLength: 100
              required:
                - text
      responses:
        '200':
          description: Pre-check content against moderation policy
          content:
            application/json:
              schema:
                type: object
                properties:
                  passed:
                    description: True when no moderation patterns matched.
                    type: boolean
                  wouldBlock:
                    description: >-
                      True when at least one finding would trigger a 422 if this content were submitted to a blocking
                      surface.
                    type: boolean
                  findings:
                    description: >-
                      All matching findings. Empty when `passed` is true. Both blocking and non-blocking findings are
                      reported so callers can observe medium-severity signals.
                    type: array
                    items:
                      type: object
                      properties:
                        category:
                          description: Moderation category (e.g. "jailbreak_attempt", "pii_leak").
                          type: string
                        severity:
                          description: Severity tier. "high" and above is what blocks at default thresholds.
                          type: string
                          enum:
                            - low
                            - medium
                            - high
                            - critical
                        suggestion:
                          description: Human-readable remediation guidance for the buyer agent to self-correct.
                          type: string
                      required:
                        - category
                        - severity
                        - suggestion
                      additionalProperties: false
                required:
                  - passed
                  - wouldBlock
                  - findings
                additionalProperties: false
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /:
    servers: &ref_1
      - url: https://api.interchange.io/mcp/v2/storefront
        description: Production MCP server
      - url: https://api.staging.interchange.io/mcp/v2/storefront
        description: Staging MCP server
    post:
      operationId: mcpInitialize
      summary: Initialize MCP session
      description: |-
        Start a new MCP (Model Context Protocol) session. This must be called before using any other MCP tools.

        ## Request Format

        Send a JSON-RPC 2.0 request with:
        - `method`: "initialize"
        - `params.protocolVersion`: "2024-11-05"
        - `params.capabilities`: {} (empty object)
        - `params.clientInfo`: Your agent info

        ## Example Request

        ```json
        {
          "jsonrpc": "2.0",
          "id": 1,
          "method": "initialize",
          "params": {
            "protocolVersion": "2024-11-05",
            "capabilities": {},
            "clientInfo": { "name": "your-agent", "version": "1.0" }
          }
        }
        ```

        ## Example Response

        ```json
        {
          "jsonrpc": "2.0",
          "id": 1,
          "result": {
            "protocolVersion": "2024-11-05",
            "capabilities": { "tools": {} },
            "serverInfo": { "name": "scope3-storefront-api", "version": "2.0.0" }
          }
        }
        ```
      tags:
        - MCP
      parameters:
        - name: mcp-session-id
          in: header
          required: true
          schema:
            type: string
            format: uuid
          description: MCP session identifier. Generate a new UUID for this request.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/McpInitializeRequest'
            example:
              jsonrpc: '2.0'
              id: 1
              method: initialize
              params:
                protocolVersion: '2024-11-05'
                capabilities: {}
                clientInfo:
                  name: your-agent
                  version: '1.0'
      responses:
        '200':
          description: Session initialized successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/McpInitializeResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
  /readiness:
    get:
      operationId: getStorefrontReadiness
      summary: Get storefront readiness
      description: >-
        Check if the storefront is ready to go live. Returns blocking checks for inventory sources, agent status, and
        agent auth.
      tags:
        - Storefront
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Get storefront readiness
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StorefrontReadinessResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /resolve-brand:
    post:
      operationId: resolveBrand
      summary: Resolve brand manifest
      description: >-
        Look up a brand manifest on agenticadvertising.org by domain. Returns brand name, logo URL, and manifest
        metadata when found; returns resolved=false plus a builderUrl when no manifest exists.
      tags:
        - Storefront
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResolveBrandBody'
      responses:
        '200':
          description: Resolve brand manifest
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResolveBrandResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /discover-agents:
    get:
      operationId: discoverAgents
      summary: Discover agents for a domain
      description: >-
        Query the agenticadvertising.org registry (with an adagents.json fallback) for the operator and publisher agents
        authorized for a domain. Server-side cached for 2 minutes; pass refresh=true to bypass.
      tags:
        - Storefront
      security:
        - bearerAuth: []
      parameters:
        - in: query
          name: domain
          schema:
            description: Operator domain to discover agents for
            type: string
            minLength: 1
          required: true
          description: Operator domain to discover agents for
        - in: query
          name: refresh
          schema:
            description: Set to "true" to bypass the 2-minute server-side cache and refetch
            anyOf:
              - type: string
                enum:
                  - 'true'
              - type: string
                enum:
                  - 'false'
          description: Set to "true" to bypass the 2-minute server-side cache and refetch
      responses:
        '200':
          description: Discover agents for a domain
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DiscoverAgentsResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /inventory-sources:
    get:
      operationId: listInventorySources
      summary: List inventory sources
      description: List all inventory sources for the storefront.
      tags:
        - Storefront
      security:
        - bearerAuth: []
      responses:
        '200':
          description: List inventory sources
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/InventorySourceResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      operationId: createInventorySource
      summary: Create inventory source
      description: Create an inventory source and optionally register an agent for it.
      tags:
        - Storefront
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                sourceId:
                  description: >-
                    Unique identifier for this source within the storefront. Defaults to a slugified version of the name
                    if not provided.
                  example: snap-ads-agent
                  type: string
                  minLength: 1
                  maxLength: 255
                name:
                  description: Display name for the inventory source
                  example: Snap Ads Agent
                  type: string
                  minLength: 1
                  maxLength: 255
                executionType:
                  description: How the source executes requests
                  default: agent
                  type: string
                  enum:
                    - agent
                executionConfig:
                  description: Configuration for the execution type (e.g. agent URL, auth, headers)
                  type: object
                  additionalProperties: {}
                type:
                  description: Agent type — required when executionType is "agent"
                  type: string
                  enum:
                    - SALES
                    - SIGNAL
                    - CREATIVE
                    - OUTCOME
                endpointUrl:
                  description: Agent endpoint URL — required when executionType is "agent"
                  type: string
                  maxLength: 2048
                  format: uri
                protocol:
                  description: Agent protocol — required when executionType is "agent"
                  type: string
                  enum:
                    - MCP
                    - A2A
                authenticationType:
                  description: Auth method for the agent — required when executionType is "agent"
                  type: string
                  enum:
                    - API_KEY
                    - NO_AUTH
                    - JWT
                    - OAUTH
                auth:
                  description: Initial credentials for testing. Required for non-OAUTH agents when executionType is "agent".
                  anyOf:
                    - type: object
                      properties:
                        type:
                          type: string
                          enum:
                            - jwt
                        privateKey:
                          type: string
                          minLength: 1
                        issuer:
                          type: string
                          minLength: 1
                        subject:
                          type: string
                          minLength: 1
                        keyId:
                          type: string
                          minLength: 1
                        scope:
                          type: string
                          minLength: 1
                        tokenEndpointUrl:
                          type: string
                          format: uri
                        audienceUrl:
                          type: string
                          format: uri
                        algorithm:
                          type: string
                          enum:
                            - ES256
                            - RS256
                        environment:
                          type: string
                      required:
                        - type
                        - privateKey
                        - issuer
                        - subject
                        - keyId
                        - scope
                        - tokenEndpointUrl
                        - audienceUrl
                    - type: object
                      properties:
                        type:
                          type: string
                          enum:
                            - bearer
                            - apikey
                            - api_key
                        token:
                          type: string
                          minLength: 1
                      required:
                        - type
                        - token
                    - type: object
                      properties: {}
                description:
                  description: Agent description
                  type: string
                  maxLength: 2000
              required:
                - name
      responses:
        '201':
          description: Create inventory source
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InventorySourceResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /inventory-sources/{sourceId}:
    get:
      operationId: getInventorySource
      summary: Get inventory source
      description: Get a specific inventory source by its source ID.
      tags:
        - Storefront
      security:
        - bearerAuth: []
      parameters:
        - in: path
          name: sourceId
          schema:
            description: Inventory source ID
            type: string
            minLength: 1
          required: true
          description: Inventory source ID
      responses:
        '200':
          description: Get inventory source
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InventorySourceResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    put:
      operationId: updateInventorySource
      summary: Update inventory source
      description: Update an inventory source. Status transitions manage the linked agent lifecycle.
      tags:
        - Storefront
      security:
        - bearerAuth: []
      parameters:
        - in: path
          name: sourceId
          schema:
            description: Inventory source ID
            type: string
            minLength: 1
          required: true
          description: Inventory source ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  description: Updated display name
                  type: string
                  minLength: 1
                  maxLength: 255
                executionType:
                  description: Updated execution type
                  type: string
                  enum:
                    - agent
                executionConfig:
                  description: Updated execution configuration
                  type: object
                  additionalProperties: {}
                status:
                  description: Updated source status (pending → active, active → disabled)
                  type: string
                  enum:
                    - pending
                    - active
                    - disabled
                description:
                  description: Updated agent description
                  type: string
                  maxLength: 2000
                endpointUrl:
                  description: Updated agent endpoint URL
                  type: string
                  maxLength: 2048
                  format: uri
                protocol:
                  description: Updated agent protocol
                  type: string
                  enum:
                    - MCP
                    - A2A
                authenticationType:
                  description: Updated agent authentication type
                  type: string
                  enum:
                    - API_KEY
                    - NO_AUTH
                    - JWT
                    - OAUTH
                auth:
                  description: Updated authentication credentials. Omit to keep existing credentials.
                  anyOf:
                    - type: object
                      properties:
                        type:
                          type: string
                          enum:
                            - jwt
                        privateKey:
                          type: string
                          minLength: 1
                        issuer:
                          type: string
                          minLength: 1
                        subject:
                          type: string
                          minLength: 1
                        keyId:
                          type: string
                          minLength: 1
                        scope:
                          type: string
                          minLength: 1
                        tokenEndpointUrl:
                          type: string
                          format: uri
                        audienceUrl:
                          type: string
                          format: uri
                        algorithm:
                          type: string
                          enum:
                            - ES256
                            - RS256
                        environment:
                          type: string
                      required:
                        - type
                        - privateKey
                        - issuer
                        - subject
                        - keyId
                        - scope
                        - tokenEndpointUrl
                        - audienceUrl
                    - type: object
                      properties:
                        type:
                          type: string
                          enum:
                            - bearer
                            - apikey
                            - api_key
                        token:
                          type: string
                          minLength: 1
                      required:
                        - type
                        - token
                    - type: object
                      properties: {}
      responses:
        '200':
          description: Update inventory source
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InventorySourceResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      operationId: deleteInventorySource
      summary: Delete inventory source
      description: Delete an inventory source. The linked agent is disabled before removal.
      tags:
        - Storefront
      security:
        - bearerAuth: []
      parameters:
        - in: path
          name: sourceId
          schema:
            description: Inventory source ID
            type: string
            minLength: 1
          required: true
          description: Inventory source ID
      responses:
        '204':
          description: No content
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /billing/connect:
    post:
      operationId: provisionStripeConnect
      summary: Provision Stripe Connect account
      description: Create a Stripe Express account for the storefront and return an onboarding URL.
      tags:
        - Storefront Billing
      security:
        - bearerAuth: []
      responses:
        '201':
          description: Provision Stripe Connect account
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProvisionConnectResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /billing:
    get:
      operationId: getStorefrontBilling
      summary: Get billing config
      description: Get the billing configuration for the storefront.
      tags:
        - Storefront Billing
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Get billing config
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetBillingResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    put:
      operationId: updateStorefrontBilling
      summary: Update billing configuration (admin)
      description: >-
        Update the storefront billing configuration (platform fee percent, additional fees, currency, default net days).
        Admin-only.
      tags:
        - Storefront Billing
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                platformFeePercent:
                  description: Platform fee percentage (0–100)
                  type: number
                  minimum: 0
                  maximum: 100
                fees:
                  description: Additional partner fees
                  type: array
                  items:
                    $ref: '#/components/schemas/BillingFee'
                currency:
                  description: ISO 4217 currency code
                  example: USD
                  type: string
                  minLength: 3
                  maxLength: 3
                  pattern: ^[A-Z]{3}$
                defaultNetDays:
                  description: Payment terms in days
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
      responses:
        '200':
          description: Update billing configuration (admin)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateStorefrontBillingResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /billing/status:
    get:
      operationId: getStripeAccountStatus
      summary: Get Stripe account status
      description: Retrieve Stripe Connect account verification status and balance.
      tags:
        - Storefront Billing
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Get Stripe account status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectAccountStatusResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /billing/transactions:
    get:
      operationId: getBalanceTransactions
      summary: Get balance transactions
      description: Cursor-paginated list of balance transactions for the connected Stripe account.
      tags:
        - Storefront Billing
      security:
        - bearerAuth: []
      parameters:
        - in: query
          name: limit
          schema:
            description: Maximum number of results (1–100, default 25)
            type: integer
            minimum: 1
            maximum: 100
          description: Maximum number of results (1–100, default 25)
        - in: query
          name: starting_after
          schema:
            description: Cursor for pagination (ID of last item from previous page)
            type: string
          description: Cursor for pagination (ID of last item from previous page)
      responses:
        '200':
          description: Get balance transactions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionsResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /billing/payouts:
    get:
      operationId: getPayouts
      summary: Get payouts
      description: Cursor-paginated list of payouts for the connected Stripe account.
      tags:
        - Storefront Billing
      security:
        - bearerAuth: []
      parameters:
        - in: query
          name: limit
          schema:
            description: Maximum number of results (1–100, default 25)
            type: integer
            minimum: 1
            maximum: 100
          description: Maximum number of results (1–100, default 25)
        - in: query
          name: starting_after
          schema:
            description: Cursor for pagination (ID of last item from previous page)
            type: string
          description: Cursor for pagination (ID of last item from previous page)
      responses:
        '200':
          description: Get payouts
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayoutsResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /billing/invoices:
    get:
      operationId: listStorefrontInvoices
      summary: List invoices
      description: Cursor-paginated list of invoices issued on the connected Stripe account.
      tags:
        - Storefront Billing
      security:
        - bearerAuth: []
      parameters:
        - in: query
          name: limit
          schema:
            description: Maximum number of results (1–100, default 25)
            type: integer
            minimum: 1
            maximum: 100
          description: Maximum number of results (1–100, default 25)
        - in: query
          name: starting_after
          schema:
            description: Cursor for pagination (ID of last item from previous page)
            type: string
          description: Cursor for pagination (ID of last item from previous page)
      responses:
        '200':
          description: List invoices
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvoicesResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /billing/pending-invoice-items:
    get:
      operationId: listStorefrontPendingInvoiceItems
      summary: List pending invoice items
      description: >-
        Cursor-paginated list of invoice line items that have not yet been attached to an invoice on the connected
        Stripe account.
      tags:
        - Storefront Billing
      security:
        - bearerAuth: []
      parameters:
        - in: query
          name: limit
          schema:
            description: Maximum number of results (1–100, default 25)
            type: integer
            minimum: 1
            maximum: 100
          description: Maximum number of results (1–100, default 25)
        - in: query
          name: starting_after
          schema:
            description: Cursor for pagination (ID of last item from previous page)
            type: string
          description: Cursor for pagination (ID of last item from previous page)
      responses:
        '200':
          description: List pending invoice items
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PendingInvoiceItemsResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /billing/onboard:
    get:
      operationId: getOnboardingUrl
      summary: Get onboarding URL
      description: Get a fresh Stripe onboarding URL. Onboarding links expire after 24 hours.
      tags:
        - Storefront Billing
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Get onboarding URL
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OnboardingUrlResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /billing/accounts:
    get:
      operationId: listBillingAccounts
      summary: List billing accounts
      description: Get billing status for managed accounts of a parent customer.
      tags:
        - Storefront Billing
      security:
        - bearerAuth: []
      responses:
        '200':
          description: List billing accounts
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingAccountsResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /signals:
    post:
      operationId: createSignal
      summary: Create signal
      description: Register a signal with key types, regions, and access configurations.
      tags:
        - Signals
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegisterSignalInput'
      responses:
        '201':
          description: Create signal
          content:
            application/json:
              schema:
                type: object
                properties:
                  signal:
                    type: object
                    properties:
                      id:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      signalId:
                        type: string
                      adcpAgentId:
                        nullable: true
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      name:
                        type: string
                      description:
                        nullable: true
                        type: string
                      keyType:
                        type: array
                        items:
                          type: string
                          enum:
                            - property
                            - postal_code
                            - uk_postal_district
                            - maid
                            - rampid
                            - lat_long_radius
                            - id5
                            - coreid
                            - yahoo_connect
                            - uid2
                            - euid
                            - pairid
                            - url
                      regions:
                        nullable: true
                        type: array
                        items:
                          type: string
                          enum:
                            - NORAM
                            - LATAM
                            - EMEA
                            - APAC
                            - ANZ
                            - GLOBAL
                      metadata:
                        nullable: true
                        type: object
                        additionalProperties: {}
                      isLive:
                        type: boolean
                      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))$
                      createdBy:
                        nullable: true
                        type: string
                      updatedBy:
                        nullable: true
                        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))$
                    required:
                      - id
                      - signalId
                      - adcpAgentId
                      - name
                      - description
                      - keyType
                      - regions
                      - metadata
                      - isLive
                      - archivedAt
                      - createdBy
                      - updatedBy
                      - createdAt
                      - updatedAt
                    additionalProperties: false
                  access:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                        signalId:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                        seatId:
                          type: integer
                          format: int64
                        visibility:
                          type: string
                          enum:
                            - PUBLIC
                            - PROPRIETARY
                        price:
                          nullable: true
                          anyOf:
                            - type: object
                              properties:
                                pricing_option_id:
                                  type: string
                                pricing_model:
                                  type: string
                                  enum:
                                    - cpm
                                currency:
                                  type: string
                                fixed_price:
                                  type: number
                                floor_price:
                                  type: number
                                max_bid:
                                  type: boolean
                                price_guidance:
                                  type: object
                                  properties:
                                    p25:
                                      type: number
                                    p50:
                                      type: number
                                    p75:
                                      type: number
                                    p90:
                                      type: number
                                  additionalProperties: {}
                                min_spend_per_package:
                                  type: number
                                price_breakdown:
                                  type: object
                                  properties:
                                    list_price:
                                      type: number
                                    adjustments:
                                      type: array
                                      items:
                                        type: object
                                        additionalProperties: {}
                                  required:
                                    - list_price
                                    - adjustments
                                  additionalProperties: {}
                                eligible_adjustments:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - fee
                                      - type: string
                                        enum:
                                          - discount
                                      - type: string
                                        enum:
                                          - commission
                                      - type: string
                                        enum:
                                          - settlement
                              required:
                                - pricing_option_id
                                - pricing_model
                                - currency
                              additionalProperties: {}
                            - type: object
                              properties:
                                pricing_option_id:
                                  type: string
                                pricing_model:
                                  type: string
                                  enum:
                                    - vcpm
                                currency:
                                  type: string
                                fixed_price:
                                  type: number
                                floor_price:
                                  type: number
                                max_bid:
                                  type: boolean
                                price_guidance:
                                  type: object
                                  properties:
                                    p25:
                                      type: number
                                    p50:
                                      type: number
                                    p75:
                                      type: number
                                    p90:
                                      type: number
                                  additionalProperties: {}
                                min_spend_per_package:
                                  type: number
                                price_breakdown:
                                  type: object
                                  properties:
                                    list_price:
                                      type: number
                                    adjustments:
                                      type: array
                                      items:
                                        type: object
                                        additionalProperties: {}
                                  required:
                                    - list_price
                                    - adjustments
                                  additionalProperties: {}
                                eligible_adjustments:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - fee
                                      - type: string
                                        enum:
                                          - discount
                                      - type: string
                                        enum:
                                          - commission
                                      - type: string
                                        enum:
                                          - settlement
                              required:
                                - pricing_option_id
                                - pricing_model
                                - currency
                              additionalProperties: {}
                            - type: object
                              properties:
                                pricing_option_id:
                                  type: string
                                pricing_model:
                                  type: string
                                  enum:
                                    - cpc
                                currency:
                                  type: string
                                fixed_price:
                                  type: number
                                floor_price:
                                  type: number
                                max_bid:
                                  type: boolean
                                price_guidance:
                                  type: object
                                  properties:
                                    p25:
                                      type: number
                                    p50:
                                      type: number
                                    p75:
                                      type: number
                                    p90:
                                      type: number
                                  additionalProperties: {}
                                min_spend_per_package:
                                  type: number
                                price_breakdown:
                                  type: object
                                  properties:
                                    list_price:
                                      type: number
                                    adjustments:
                                      type: array
                                      items:
                                        type: object
                                        additionalProperties: {}
                                  required:
                                    - list_price
                                    - adjustments
                                  additionalProperties: {}
                                eligible_adjustments:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - fee
                                      - type: string
                                        enum:
                                          - discount
                                      - type: string
                                        enum:
                                          - commission
                                      - type: string
                                        enum:
                                          - settlement
                              required:
                                - pricing_option_id
                                - pricing_model
                                - currency
                              additionalProperties: {}
                            - type: object
                              properties:
                                pricing_option_id:
                                  type: string
                                pricing_model:
                                  type: string
                                  enum:
                                    - cpcv
                                currency:
                                  type: string
                                fixed_price:
                                  type: number
                                floor_price:
                                  type: number
                                max_bid:
                                  type: boolean
                                price_guidance:
                                  type: object
                                  properties:
                                    p25:
                                      type: number
                                    p50:
                                      type: number
                                    p75:
                                      type: number
                                    p90:
                                      type: number
                                  additionalProperties: {}
                                min_spend_per_package:
                                  type: number
                                price_breakdown:
                                  type: object
                                  properties:
                                    list_price:
                                      type: number
                                    adjustments:
                                      type: array
                                      items:
                                        type: object
                                        additionalProperties: {}
                                  required:
                                    - list_price
                                    - adjustments
                                  additionalProperties: {}
                                eligible_adjustments:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - fee
                                      - type: string
                                        enum:
                                          - discount
                                      - type: string
                                        enum:
                                          - commission
                                      - type: string
                                        enum:
                                          - settlement
                              required:
                                - pricing_option_id
                                - pricing_model
                                - currency
                              additionalProperties: {}
                            - type: object
                              properties:
                                pricing_option_id:
                                  type: string
                                pricing_model:
                                  type: string
                                  enum:
                                    - cpv
                                currency:
                                  type: string
                                fixed_price:
                                  type: number
                                floor_price:
                                  type: number
                                max_bid:
                                  type: boolean
                                price_guidance:
                                  type: object
                                  properties:
                                    p25:
                                      type: number
                                    p50:
                                      type: number
                                    p75:
                                      type: number
                                    p90:
                                      type: number
                                  additionalProperties: {}
                                parameters:
                                  type: object
                                  properties:
                                    view_threshold:
                                      anyOf:
                                        - type: number
                                        - type: object
                                          properties:
                                            duration_seconds:
                                              type: number
                                          required:
                                            - duration_seconds
                                          additionalProperties: {}
                                  required:
                                    - view_threshold
                                  additionalProperties: {}
                                min_spend_per_package:
                                  type: number
                                price_breakdown:
                                  type: object
                                  properties:
                                    list_price:
                                      type: number
                                    adjustments:
                                      type: array
                                      items:
                                        type: object
                                        additionalProperties: {}
                                  required:
                                    - list_price
                                    - adjustments
                                  additionalProperties: {}
                                eligible_adjustments:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - fee
                                      - type: string
                                        enum:
                                          - discount
                                      - type: string
                                        enum:
                                          - commission
                                      - type: string
                                        enum:
                                          - settlement
                              required:
                                - pricing_option_id
                                - pricing_model
                                - currency
                                - parameters
                              additionalProperties: {}
                            - type: object
                              properties:
                                pricing_option_id:
                                  type: string
                                pricing_model:
                                  type: string
                                  enum:
                                    - cpp
                                currency:
                                  type: string
                                fixed_price:
                                  type: number
                                floor_price:
                                  type: number
                                price_guidance:
                                  type: object
                                  properties:
                                    p25:
                                      type: number
                                    p50:
                                      type: number
                                    p75:
                                      type: number
                                    p90:
                                      type: number
                                  additionalProperties: {}
                                parameters:
                                  type: object
                                  properties:
                                    demographic_system:
                                      anyOf:
                                        - type: string
                                          enum:
                                            - nielsen
                                        - type: string
                                          enum:
                                            - barb
                                        - type: string
                                          enum:
                                            - agf
                                        - type: string
                                          enum:
                                            - oztam
                                        - type: string
                                          enum:
                                            - mediametrie
                                        - type: string
                                          enum:
                                            - custom
                                    demographic:
                                      type: string
                                    min_points:
                                      type: number
                                  required:
                                    - demographic
                                  additionalProperties: {}
                                min_spend_per_package:
                                  type: number
                                price_breakdown:
                                  type: object
                                  properties:
                                    list_price:
                                      type: number
                                    adjustments:
                                      type: array
                                      items:
                                        type: object
                                        additionalProperties: {}
                                  required:
                                    - list_price
                                    - adjustments
                                  additionalProperties: {}
                                eligible_adjustments:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - fee
                                      - type: string
                                        enum:
                                          - discount
                                      - type: string
                                        enum:
                                          - commission
                                      - type: string
                                        enum:
                                          - settlement
                              required:
                                - pricing_option_id
                                - pricing_model
                                - currency
                                - parameters
                              additionalProperties: {}
                            - type: object
                              properties:
                                pricing_option_id:
                                  type: string
                                pricing_model:
                                  type: string
                                  enum:
                                    - cpa
                                event_type:
                                  anyOf:
                                    - type: string
                                      enum:
                                        - page_view
                                    - type: string
                                      enum:
                                        - view_content
                                    - type: string
                                      enum:
                                        - select_content
                                    - type: string
                                      enum:
                                        - select_item
                                    - type: string
                                      enum:
                                        - search
                                    - type: string
                                      enum:
                                        - share
                                    - type: string
                                      enum:
                                        - add_to_cart
                                    - type: string
                                      enum:
                                        - remove_from_cart
                                    - type: string
                                      enum:
                                        - viewed_cart
                                    - type: string
                                      enum:
                                        - add_to_wishlist
                                    - type: string
                                      enum:
                                        - initiate_checkout
                                    - type: string
                                      enum:
                                        - add_payment_info
                                    - type: string
                                      enum:
                                        - purchase
                                    - type: string
                                      enum:
                                        - refund
                                    - type: string
                                      enum:
                                        - lead
                                    - type: string
                                      enum:
                                        - qualify_lead
                                    - type: string
                                      enum:
                                        - close_convert_lead
                                    - type: string
                                      enum:
                                        - disqualify_lead
                                    - type: string
                                      enum:
                                        - complete_registration
                                    - type: string
                                      enum:
                                        - subscribe
                                    - type: string
                                      enum:
                                        - start_trial
                                    - type: string
                                      enum:
                                        - app_install
                                    - type: string
                                      enum:
                                        - app_launch
                                    - type: string
                                      enum:
                                        - contact
                                    - type: string
                                      enum:
                                        - schedule
                                    - type: string
                                      enum:
                                        - donate
                                    - type: string
                                      enum:
                                        - submit_application
                                    - type: string
                                      enum:
                                        - custom
                                custom_event_name:
                                  type: string
                                event_source_id:
                                  type: string
                                currency:
                                  type: string
                                fixed_price:
                                  type: number
                                min_spend_per_package:
                                  type: number
                                price_breakdown:
                                  type: object
                                  properties:
                                    list_price:
                                      type: number
                                    adjustments:
                                      type: array
                                      items:
                                        type: object
                                        additionalProperties: {}
                                  required:
                                    - list_price
                                    - adjustments
                                  additionalProperties: {}
                                eligible_adjustments:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - fee
                                      - type: string
                                        enum:
                                          - discount
                                      - type: string
                                        enum:
                                          - commission
                                      - type: string
                                        enum:
                                          - settlement
                              required:
                                - pricing_option_id
                                - pricing_model
                                - event_type
                                - currency
                                - fixed_price
                              additionalProperties: {}
                            - type: object
                              properties:
                                pricing_option_id:
                                  type: string
                                pricing_model:
                                  type: string
                                  enum:
                                    - flat_rate
                                currency:
                                  type: string
                                fixed_price:
                                  type: number
                                floor_price:
                                  type: number
                                price_guidance:
                                  type: object
                                  properties:
                                    p25:
                                      type: number
                                    p50:
                                      type: number
                                    p75:
                                      type: number
                                    p90:
                                      type: number
                                  additionalProperties: {}
                                parameters:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - dooh
                                    sov_percentage:
                                      type: number
                                    loop_duration_seconds:
                                      type: number
                                    min_plays_per_hour:
                                      type: number
                                    venue_package:
                                      type: string
                                    duration_hours:
                                      type: number
                                    daypart:
                                      type: string
                                    estimated_impressions:
                                      type: number
                                  required:
                                    - type
                                  additionalProperties: {}
                                min_spend_per_package:
                                  type: number
                                price_breakdown:
                                  type: object
                                  properties:
                                    list_price:
                                      type: number
                                    adjustments:
                                      type: array
                                      items:
                                        type: object
                                        additionalProperties: {}
                                  required:
                                    - list_price
                                    - adjustments
                                  additionalProperties: {}
                                eligible_adjustments:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - fee
                                      - type: string
                                        enum:
                                          - discount
                                      - type: string
                                        enum:
                                          - commission
                                      - type: string
                                        enum:
                                          - settlement
                              required:
                                - pricing_option_id
                                - pricing_model
                                - currency
                              additionalProperties: {}
                            - type: object
                              properties:
                                pricing_option_id:
                                  type: string
                                pricing_model:
                                  type: string
                                  enum:
                                    - time
                                currency:
                                  type: string
                                fixed_price:
                                  type: number
                                floor_price:
                                  type: number
                                price_guidance:
                                  type: object
                                  properties:
                                    p25:
                                      type: number
                                    p50:
                                      type: number
                                    p75:
                                      type: number
                                    p90:
                                      type: number
                                  additionalProperties: {}
                                parameters:
                                  type: object
                                  properties:
                                    time_unit:
                                      anyOf:
                                        - type: string
                                          enum:
                                            - hour
                                        - type: string
                                          enum:
                                            - day
                                        - type: string
                                          enum:
                                            - week
                                        - type: string
                                          enum:
                                            - month
                                    min_duration:
                                      type: number
                                    max_duration:
                                      type: number
                                  required:
                                    - time_unit
                                  additionalProperties: {}
                                min_spend_per_package:
                                  type: number
                                price_breakdown:
                                  type: object
                                  properties:
                                    list_price:
                                      type: number
                                    adjustments:
                                      type: array
                                      items:
                                        type: object
                                        additionalProperties: {}
                                  required:
                                    - list_price
                                    - adjustments
                                  additionalProperties: {}
                                eligible_adjustments:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - fee
                                      - type: string
                                        enum:
                                          - discount
                                      - type: string
                                        enum:
                                          - commission
                                      - type: string
                                        enum:
                                          - settlement
                              required:
                                - pricing_option_id
                                - pricing_model
                                - currency
                                - parameters
                              additionalProperties: {}
                        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))$
                        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))$
                      required:
                        - id
                        - signalId
                        - seatId
                        - visibility
                        - price
                        - archivedAt
                        - createdAt
                        - updatedAt
                      additionalProperties: false
                required:
                  - signal
                  - access
                additionalProperties: false
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    get:
      operationId: listSignals
      summary: List signals
      description: List signals with optional filtering by agent, visibility, live status, and seat.
      tags:
        - Signals
      security:
        - bearerAuth: []
      parameters:
        - in: query
          name: agentId
          schema:
            type: string
            minLength: 1
            maxLength: 255
        - in: query
          name: visibility
          schema:
            type: string
            enum:
              - PUBLIC
              - PROPRIETARY
        - in: query
          name: isLive
          schema:
            type: boolean
        - in: query
          name: seatId
          schema:
            type: integer
            format: int64
        - in: query
          name: limit
          schema:
            default: 20
            type: integer
            exclusiveMinimum: true
            maximum: 100
        - in: query
          name: offset
          schema:
            default: 0
            type: integer
            minimum: 0
            maximum: 9007199254740991
        - in: query
          name: includeArchived
          schema:
            default: false
            type: boolean
      responses:
        '200':
          description: List signals
          content:
            application/json:
              schema:
                type: object
                properties:
                  signals:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                        signalId:
                          type: string
                        adcpAgentId:
                          nullable: true
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                        name:
                          type: string
                        description:
                          nullable: true
                          type: string
                        keyType:
                          type: array
                          items:
                            type: string
                            enum:
                              - property
                              - postal_code
                              - uk_postal_district
                              - maid
                              - rampid
                              - lat_long_radius
                              - id5
                              - coreid
                              - yahoo_connect
                              - uid2
                              - euid
                              - pairid
                              - url
                        regions:
                          nullable: true
                          type: array
                          items:
                            type: string
                            enum:
                              - NORAM
                              - LATAM
                              - EMEA
                              - APAC
                              - ANZ
                              - GLOBAL
                        metadata:
                          nullable: true
                          type: object
                          additionalProperties: {}
                        isLive:
                          type: boolean
                        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))$
                        createdBy:
                          nullable: true
                          type: string
                        updatedBy:
                          nullable: true
                          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))$
                        access:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                                minimum: -9007199254740991
                                maximum: 9007199254740991
                              signalId:
                                type: integer
                                minimum: -9007199254740991
                                maximum: 9007199254740991
                              seatId:
                                type: integer
                                format: int64
                              visibility:
                                type: string
                                enum:
                                  - PUBLIC
                                  - PROPRIETARY
                              price:
                                nullable: true
                                anyOf:
                                  - type: object
                                    properties:
                                      pricing_option_id:
                                        type: string
                                      pricing_model:
                                        type: string
                                        enum:
                                          - cpm
                                      currency:
                                        type: string
                                      fixed_price:
                                        type: number
                                      floor_price:
                                        type: number
                                      max_bid:
                                        type: boolean
                                      price_guidance:
                                        type: object
                                        properties:
                                          p25:
                                            type: number
                                          p50:
                                            type: number
                                          p75:
                                            type: number
                                          p90:
                                            type: number
                                        additionalProperties: {}
                                      min_spend_per_package:
                                        type: number
                                      price_breakdown:
                                        type: object
                                        properties:
                                          list_price:
                                            type: number
                                          adjustments:
                                            type: array
                                            items:
                                              type: object
                                              additionalProperties: {}
                                        required:
                                          - list_price
                                          - adjustments
                                        additionalProperties: {}
                                      eligible_adjustments:
                                        type: array
                                        items:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - fee
                                            - type: string
                                              enum:
                                                - discount
                                            - type: string
                                              enum:
                                                - commission
                                            - type: string
                                              enum:
                                                - settlement
                                    required:
                                      - pricing_option_id
                                      - pricing_model
                                      - currency
                                    additionalProperties: {}
                                  - type: object
                                    properties:
                                      pricing_option_id:
                                        type: string
                                      pricing_model:
                                        type: string
                                        enum:
                                          - vcpm
                                      currency:
                                        type: string
                                      fixed_price:
                                        type: number
                                      floor_price:
                                        type: number
                                      max_bid:
                                        type: boolean
                                      price_guidance:
                                        type: object
                                        properties:
                                          p25:
                                            type: number
                                          p50:
                                            type: number
                                          p75:
                                            type: number
                                          p90:
                                            type: number
                                        additionalProperties: {}
                                      min_spend_per_package:
                                        type: number
                                      price_breakdown:
                                        type: object
                                        properties:
                                          list_price:
                                            type: number
                                          adjustments:
                                            type: array
                                            items:
                                              type: object
                                              additionalProperties: {}
                                        required:
                                          - list_price
                                          - adjustments
                                        additionalProperties: {}
                                      eligible_adjustments:
                                        type: array
                                        items:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - fee
                                            - type: string
                                              enum:
                                                - discount
                                            - type: string
                                              enum:
                                                - commission
                                            - type: string
                                              enum:
                                                - settlement
                                    required:
                                      - pricing_option_id
                                      - pricing_model
                                      - currency
                                    additionalProperties: {}
                                  - type: object
                                    properties:
                                      pricing_option_id:
                                        type: string
                                      pricing_model:
                                        type: string
                                        enum:
                                          - cpc
                                      currency:
                                        type: string
                                      fixed_price:
                                        type: number
                                      floor_price:
                                        type: number
                                      max_bid:
                                        type: boolean
                                      price_guidance:
                                        type: object
                                        properties:
                                          p25:
                                            type: number
                                          p50:
                                            type: number
                                          p75:
                                            type: number
                                          p90:
                                            type: number
                                        additionalProperties: {}
                                      min_spend_per_package:
                                        type: number
                                      price_breakdown:
                                        type: object
                                        properties:
                                          list_price:
                                            type: number
                                          adjustments:
                                            type: array
                                            items:
                                              type: object
                                              additionalProperties: {}
                                        required:
                                          - list_price
                                          - adjustments
                                        additionalProperties: {}
                                      eligible_adjustments:
                                        type: array
                                        items:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - fee
                                            - type: string
                                              enum:
                                                - discount
                                            - type: string
                                              enum:
                                                - commission
                                            - type: string
                                              enum:
                                                - settlement
                                    required:
                                      - pricing_option_id
                                      - pricing_model
                                      - currency
                                    additionalProperties: {}
                                  - type: object
                                    properties:
                                      pricing_option_id:
                                        type: string
                                      pricing_model:
                                        type: string
                                        enum:
                                          - cpcv
                                      currency:
                                        type: string
                                      fixed_price:
                                        type: number
                                      floor_price:
                                        type: number
                                      max_bid:
                                        type: boolean
                                      price_guidance:
                                        type: object
                                        properties:
                                          p25:
                                            type: number
                                          p50:
                                            type: number
                                          p75:
                                            type: number
                                          p90:
                                            type: number
                                        additionalProperties: {}
                                      min_spend_per_package:
                                        type: number
                                      price_breakdown:
                                        type: object
                                        properties:
                                          list_price:
                                            type: number
                                          adjustments:
                                            type: array
                                            items:
                                              type: object
                                              additionalProperties: {}
                                        required:
                                          - list_price
                                          - adjustments
                                        additionalProperties: {}
                                      eligible_adjustments:
                                        type: array
                                        items:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - fee
                                            - type: string
                                              enum:
                                                - discount
                                            - type: string
                                              enum:
                                                - commission
                                            - type: string
                                              enum:
                                                - settlement
                                    required:
                                      - pricing_option_id
                                      - pricing_model
                                      - currency
                                    additionalProperties: {}
                                  - type: object
                                    properties:
                                      pricing_option_id:
                                        type: string
                                      pricing_model:
                                        type: string
                                        enum:
                                          - cpv
                                      currency:
                                        type: string
                                      fixed_price:
                                        type: number
                                      floor_price:
                                        type: number
                                      max_bid:
                                        type: boolean
                                      price_guidance:
                                        type: object
                                        properties:
                                          p25:
                                            type: number
                                          p50:
                                            type: number
                                          p75:
                                            type: number
                                          p90:
                                            type: number
                                        additionalProperties: {}
                                      parameters:
                                        type: object
                                        properties:
                                          view_threshold:
                                            anyOf:
                                              - type: number
                                              - type: object
                                                properties:
                                                  duration_seconds:
                                                    type: number
                                                required:
                                                  - duration_seconds
                                                additionalProperties: {}
                                        required:
                                          - view_threshold
                                        additionalProperties: {}
                                      min_spend_per_package:
                                        type: number
                                      price_breakdown:
                                        type: object
                                        properties:
                                          list_price:
                                            type: number
                                          adjustments:
                                            type: array
                                            items:
                                              type: object
                                              additionalProperties: {}
                                        required:
                                          - list_price
                                          - adjustments
                                        additionalProperties: {}
                                      eligible_adjustments:
                                        type: array
                                        items:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - fee
                                            - type: string
                                              enum:
                                                - discount
                                            - type: string
                                              enum:
                                                - commission
                                            - type: string
                                              enum:
                                                - settlement
                                    required:
                                      - pricing_option_id
                                      - pricing_model
                                      - currency
                                      - parameters
                                    additionalProperties: {}
                                  - type: object
                                    properties:
                                      pricing_option_id:
                                        type: string
                                      pricing_model:
                                        type: string
                                        enum:
                                          - cpp
                                      currency:
                                        type: string
                                      fixed_price:
                                        type: number
                                      floor_price:
                                        type: number
                                      price_guidance:
                                        type: object
                                        properties:
                                          p25:
                                            type: number
                                          p50:
                                            type: number
                                          p75:
                                            type: number
                                          p90:
                                            type: number
                                        additionalProperties: {}
                                      parameters:
                                        type: object
                                        properties:
                                          demographic_system:
                                            anyOf:
                                              - type: string
                                                enum:
                                                  - nielsen
                                              - type: string
                                                enum:
                                                  - barb
                                              - type: string
                                                enum:
                                                  - agf
                                              - type: string
                                                enum:
                                                  - oztam
                                              - type: string
                                                enum:
                                                  - mediametrie
                                              - type: string
                                                enum:
                                                  - custom
                                          demographic:
                                            type: string
                                          min_points:
                                            type: number
                                        required:
                                          - demographic
                                        additionalProperties: {}
                                      min_spend_per_package:
                                        type: number
                                      price_breakdown:
                                        type: object
                                        properties:
                                          list_price:
                                            type: number
                                          adjustments:
                                            type: array
                                            items:
                                              type: object
                                              additionalProperties: {}
                                        required:
                                          - list_price
                                          - adjustments
                                        additionalProperties: {}
                                      eligible_adjustments:
                                        type: array
                                        items:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - fee
                                            - type: string
                                              enum:
                                                - discount
                                            - type: string
                                              enum:
                                                - commission
                                            - type: string
                                              enum:
                                                - settlement
                                    required:
                                      - pricing_option_id
                                      - pricing_model
                                      - currency
                                      - parameters
                                    additionalProperties: {}
                                  - type: object
                                    properties:
                                      pricing_option_id:
                                        type: string
                                      pricing_model:
                                        type: string
                                        enum:
                                          - cpa
                                      event_type:
                                        anyOf:
                                          - type: string
                                            enum:
                                              - page_view
                                          - type: string
                                            enum:
                                              - view_content
                                          - type: string
                                            enum:
                                              - select_content
                                          - type: string
                                            enum:
                                              - select_item
                                          - type: string
                                            enum:
                                              - search
                                          - type: string
                                            enum:
                                              - share
                                          - type: string
                                            enum:
                                              - add_to_cart
                                          - type: string
                                            enum:
                                              - remove_from_cart
                                          - type: string
                                            enum:
                                              - viewed_cart
                                          - type: string
                                            enum:
                                              - add_to_wishlist
                                          - type: string
                                            enum:
                                              - initiate_checkout
                                          - type: string
                                            enum:
                                              - add_payment_info
                                          - type: string
                                            enum:
                                              - purchase
                                          - type: string
                                            enum:
                                              - refund
                                          - type: string
                                            enum:
                                              - lead
                                          - type: string
                                            enum:
                                              - qualify_lead
                                          - type: string
                                            enum:
                                              - close_convert_lead
                                          - type: string
                                            enum:
                                              - disqualify_lead
                                          - type: string
                                            enum:
                                              - complete_registration
                                          - type: string
                                            enum:
                                              - subscribe
                                          - type: string
                                            enum:
                                              - start_trial
                                          - type: string
                                            enum:
                                              - app_install
                                          - type: string
                                            enum:
                                              - app_launch
                                          - type: string
                                            enum:
                                              - contact
                                          - type: string
                                            enum:
                                              - schedule
                                          - type: string
                                            enum:
                                              - donate
                                          - type: string
                                            enum:
                                              - submit_application
                                          - type: string
                                            enum:
                                              - custom
                                      custom_event_name:
                                        type: string
                                      event_source_id:
                                        type: string
                                      currency:
                                        type: string
                                      fixed_price:
                                        type: number
                                      min_spend_per_package:
                                        type: number
                                      price_breakdown:
                                        type: object
                                        properties:
                                          list_price:
                                            type: number
                                          adjustments:
                                            type: array
                                            items:
                                              type: object
                                              additionalProperties: {}
                                        required:
                                          - list_price
                                          - adjustments
                                        additionalProperties: {}
                                      eligible_adjustments:
                                        type: array
                                        items:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - fee
                                            - type: string
                                              enum:
                                                - discount
                                            - type: string
                                              enum:
                                                - commission
                                            - type: string
                                              enum:
                                                - settlement
                                    required:
                                      - pricing_option_id
                                      - pricing_model
                                      - event_type
                                      - currency
                                      - fixed_price
                                    additionalProperties: {}
                                  - type: object
                                    properties:
                                      pricing_option_id:
                                        type: string
                                      pricing_model:
                                        type: string
                                        enum:
                                          - flat_rate
                                      currency:
                                        type: string
                                      fixed_price:
                                        type: number
                                      floor_price:
                                        type: number
                                      price_guidance:
                                        type: object
                                        properties:
                                          p25:
                                            type: number
                                          p50:
                                            type: number
                                          p75:
                                            type: number
                                          p90:
                                            type: number
                                        additionalProperties: {}
                                      parameters:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - dooh
                                          sov_percentage:
                                            type: number
                                          loop_duration_seconds:
                                            type: number
                                          min_plays_per_hour:
                                            type: number
                                          venue_package:
                                            type: string
                                          duration_hours:
                                            type: number
                                          daypart:
                                            type: string
                                          estimated_impressions:
                                            type: number
                                        required:
                                          - type
                                        additionalProperties: {}
                                      min_spend_per_package:
                                        type: number
                                      price_breakdown:
                                        type: object
                                        properties:
                                          list_price:
                                            type: number
                                          adjustments:
                                            type: array
                                            items:
                                              type: object
                                              additionalProperties: {}
                                        required:
                                          - list_price
                                          - adjustments
                                        additionalProperties: {}
                                      eligible_adjustments:
                                        type: array
                                        items:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - fee
                                            - type: string
                                              enum:
                                                - discount
                                            - type: string
                                              enum:
                                                - commission
                                            - type: string
                                              enum:
                                                - settlement
                                    required:
                                      - pricing_option_id
                                      - pricing_model
                                      - currency
                                    additionalProperties: {}
                                  - type: object
                                    properties:
                                      pricing_option_id:
                                        type: string
                                      pricing_model:
                                        type: string
                                        enum:
                                          - time
                                      currency:
                                        type: string
                                      fixed_price:
                                        type: number
                                      floor_price:
                                        type: number
                                      price_guidance:
                                        type: object
                                        properties:
                                          p25:
                                            type: number
                                          p50:
                                            type: number
                                          p75:
                                            type: number
                                          p90:
                                            type: number
                                        additionalProperties: {}
                                      parameters:
                                        type: object
                                        properties:
                                          time_unit:
                                            anyOf:
                                              - type: string
                                                enum:
                                                  - hour
                                              - type: string
                                                enum:
                                                  - day
                                              - type: string
                                                enum:
                                                  - week
                                              - type: string
                                                enum:
                                                  - month
                                          min_duration:
                                            type: number
                                          max_duration:
                                            type: number
                                        required:
                                          - time_unit
                                        additionalProperties: {}
                                      min_spend_per_package:
                                        type: number
                                      price_breakdown:
                                        type: object
                                        properties:
                                          list_price:
                                            type: number
                                          adjustments:
                                            type: array
                                            items:
                                              type: object
                                              additionalProperties: {}
                                        required:
                                          - list_price
                                          - adjustments
                                        additionalProperties: {}
                                      eligible_adjustments:
                                        type: array
                                        items:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - fee
                                            - type: string
                                              enum:
                                                - discount
                                            - type: string
                                              enum:
                                                - commission
                                            - type: string
                                              enum:
                                                - settlement
                                    required:
                                      - pricing_option_id
                                      - pricing_model
                                      - currency
                                      - parameters
                                    additionalProperties: {}
                              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))$
                              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))$
                            required:
                              - id
                              - signalId
                              - seatId
                              - visibility
                              - price
                              - archivedAt
                              - createdAt
                              - updatedAt
                            additionalProperties: false
                      required:
                        - id
                        - signalId
                        - adcpAgentId
                        - name
                        - description
                        - keyType
                        - regions
                        - metadata
                        - isLive
                        - archivedAt
                        - createdBy
                        - updatedBy
                        - createdAt
                        - updatedAt
                        - access
                      additionalProperties: false
                  total:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  limit:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  offset:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                required:
                  - signals
                  - total
                  - limit
                  - offset
                additionalProperties: false
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /signals/{signalId}:
    get:
      operationId: getSignal
      summary: Get signal
      description: Get a signal by its identifier, including access records.
      tags:
        - Signals
      security:
        - bearerAuth: []
      parameters:
        - in: path
          name: signalId
          schema:
            description: Signal identifier
            type: string
            minLength: 1
          required: true
          description: Signal identifier
      responses:
        '200':
          description: Get signal
          content:
            application/json:
              schema:
                type: object
                properties:
                  signal:
                    type: object
                    properties:
                      id:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      signalId:
                        type: string
                      adcpAgentId:
                        nullable: true
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      name:
                        type: string
                      description:
                        nullable: true
                        type: string
                      keyType:
                        type: array
                        items:
                          type: string
                          enum:
                            - property
                            - postal_code
                            - uk_postal_district
                            - maid
                            - rampid
                            - lat_long_radius
                            - id5
                            - coreid
                            - yahoo_connect
                            - uid2
                            - euid
                            - pairid
                            - url
                      regions:
                        nullable: true
                        type: array
                        items:
                          type: string
                          enum:
                            - NORAM
                            - LATAM
                            - EMEA
                            - APAC
                            - ANZ
                            - GLOBAL
                      metadata:
                        nullable: true
                        type: object
                        additionalProperties: {}
                      isLive:
                        type: boolean
                      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))$
                      createdBy:
                        nullable: true
                        type: string
                      updatedBy:
                        nullable: true
                        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))$
                    required:
                      - id
                      - signalId
                      - adcpAgentId
                      - name
                      - description
                      - keyType
                      - regions
                      - metadata
                      - isLive
                      - archivedAt
                      - createdBy
                      - updatedBy
                      - createdAt
                      - updatedAt
                    additionalProperties: false
                  access:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                        signalId:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                        seatId:
                          type: integer
                          format: int64
                        visibility:
                          type: string
                          enum:
                            - PUBLIC
                            - PROPRIETARY
                        price:
                          nullable: true
                          anyOf:
                            - type: object
                              properties:
                                pricing_option_id:
                                  type: string
                                pricing_model:
                                  type: string
                                  enum:
                                    - cpm
                                currency:
                                  type: string
                                fixed_price:
                                  type: number
                                floor_price:
                                  type: number
                                max_bid:
                                  type: boolean
                                price_guidance:
                                  type: object
                                  properties:
                                    p25:
                                      type: number
                                    p50:
                                      type: number
                                    p75:
                                      type: number
                                    p90:
                                      type: number
                                  additionalProperties: {}
                                min_spend_per_package:
                                  type: number
                                price_breakdown:
                                  type: object
                                  properties:
                                    list_price:
                                      type: number
                                    adjustments:
                                      type: array
                                      items:
                                        type: object
                                        additionalProperties: {}
                                  required:
                                    - list_price
                                    - adjustments
                                  additionalProperties: {}
                                eligible_adjustments:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - fee
                                      - type: string
                                        enum:
                                          - discount
                                      - type: string
                                        enum:
                                          - commission
                                      - type: string
                                        enum:
                                          - settlement
                              required:
                                - pricing_option_id
                                - pricing_model
                                - currency
                              additionalProperties: {}
                            - type: object
                              properties:
                                pricing_option_id:
                                  type: string
                                pricing_model:
                                  type: string
                                  enum:
                                    - vcpm
                                currency:
                                  type: string
                                fixed_price:
                                  type: number
                                floor_price:
                                  type: number
                                max_bid:
                                  type: boolean
                                price_guidance:
                                  type: object
                                  properties:
                                    p25:
                                      type: number
                                    p50:
                                      type: number
                                    p75:
                                      type: number
                                    p90:
                                      type: number
                                  additionalProperties: {}
                                min_spend_per_package:
                                  type: number
                                price_breakdown:
                                  type: object
                                  properties:
                                    list_price:
                                      type: number
                                    adjustments:
                                      type: array
                                      items:
                                        type: object
                                        additionalProperties: {}
                                  required:
                                    - list_price
                                    - adjustments
                                  additionalProperties: {}
                                eligible_adjustments:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - fee
                                      - type: string
                                        enum:
                                          - discount
                                      - type: string
                                        enum:
                                          - commission
                                      - type: string
                                        enum:
                                          - settlement
                              required:
                                - pricing_option_id
                                - pricing_model
                                - currency
                              additionalProperties: {}
                            - type: object
                              properties:
                                pricing_option_id:
                                  type: string
                                pricing_model:
                                  type: string
                                  enum:
                                    - cpc
                                currency:
                                  type: string
                                fixed_price:
                                  type: number
                                floor_price:
                                  type: number
                                max_bid:
                                  type: boolean
                                price_guidance:
                                  type: object
                                  properties:
                                    p25:
                                      type: number
                                    p50:
                                      type: number
                                    p75:
                                      type: number
                                    p90:
                                      type: number
                                  additionalProperties: {}
                                min_spend_per_package:
                                  type: number
                                price_breakdown:
                                  type: object
                                  properties:
                                    list_price:
                                      type: number
                                    adjustments:
                                      type: array
                                      items:
                                        type: object
                                        additionalProperties: {}
                                  required:
                                    - list_price
                                    - adjustments
                                  additionalProperties: {}
                                eligible_adjustments:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - fee
                                      - type: string
                                        enum:
                                          - discount
                                      - type: string
                                        enum:
                                          - commission
                                      - type: string
                                        enum:
                                          - settlement
                              required:
                                - pricing_option_id
                                - pricing_model
                                - currency
                              additionalProperties: {}
                            - type: object
                              properties:
                                pricing_option_id:
                                  type: string
                                pricing_model:
                                  type: string
                                  enum:
                                    - cpcv
                                currency:
                                  type: string
                                fixed_price:
                                  type: number
                                floor_price:
                                  type: number
                                max_bid:
                                  type: boolean
                                price_guidance:
                                  type: object
                                  properties:
                                    p25:
                                      type: number
                                    p50:
                                      type: number
                                    p75:
                                      type: number
                                    p90:
                                      type: number
                                  additionalProperties: {}
                                min_spend_per_package:
                                  type: number
                                price_breakdown:
                                  type: object
                                  properties:
                                    list_price:
                                      type: number
                                    adjustments:
                                      type: array
                                      items:
                                        type: object
                                        additionalProperties: {}
                                  required:
                                    - list_price
                                    - adjustments
                                  additionalProperties: {}
                                eligible_adjustments:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - fee
                                      - type: string
                                        enum:
                                          - discount
                                      - type: string
                                        enum:
                                          - commission
                                      - type: string
                                        enum:
                                          - settlement
                              required:
                                - pricing_option_id
                                - pricing_model
                                - currency
                              additionalProperties: {}
                            - type: object
                              properties:
                                pricing_option_id:
                                  type: string
                                pricing_model:
                                  type: string
                                  enum:
                                    - cpv
                                currency:
                                  type: string
                                fixed_price:
                                  type: number
                                floor_price:
                                  type: number
                                max_bid:
                                  type: boolean
                                price_guidance:
                                  type: object
                                  properties:
                                    p25:
                                      type: number
                                    p50:
                                      type: number
                                    p75:
                                      type: number
                                    p90:
                                      type: number
                                  additionalProperties: {}
                                parameters:
                                  type: object
                                  properties:
                                    view_threshold:
                                      anyOf:
                                        - type: number
                                        - type: object
                                          properties:
                                            duration_seconds:
                                              type: number
                                          required:
                                            - duration_seconds
                                          additionalProperties: {}
                                  required:
                                    - view_threshold
                                  additionalProperties: {}
                                min_spend_per_package:
                                  type: number
                                price_breakdown:
                                  type: object
                                  properties:
                                    list_price:
                                      type: number
                                    adjustments:
                                      type: array
                                      items:
                                        type: object
                                        additionalProperties: {}
                                  required:
                                    - list_price
                                    - adjustments
                                  additionalProperties: {}
                                eligible_adjustments:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - fee
                                      - type: string
                                        enum:
                                          - discount
                                      - type: string
                                        enum:
                                          - commission
                                      - type: string
                                        enum:
                                          - settlement
                              required:
                                - pricing_option_id
                                - pricing_model
                                - currency
                                - parameters
                              additionalProperties: {}
                            - type: object
                              properties:
                                pricing_option_id:
                                  type: string
                                pricing_model:
                                  type: string
                                  enum:
                                    - cpp
                                currency:
                                  type: string
                                fixed_price:
                                  type: number
                                floor_price:
                                  type: number
                                price_guidance:
                                  type: object
                                  properties:
                                    p25:
                                      type: number
                                    p50:
                                      type: number
                                    p75:
                                      type: number
                                    p90:
                                      type: number
                                  additionalProperties: {}
                                parameters:
                                  type: object
                                  properties:
                                    demographic_system:
                                      anyOf:
                                        - type: string
                                          enum:
                                            - nielsen
                                        - type: string
                                          enum:
                                            - barb
                                        - type: string
                                          enum:
                                            - agf
                                        - type: string
                                          enum:
                                            - oztam
                                        - type: string
                                          enum:
                                            - mediametrie
                                        - type: string
                                          enum:
                                            - custom
                                    demographic:
                                      type: string
                                    min_points:
                                      type: number
                                  required:
                                    - demographic
                                  additionalProperties: {}
                                min_spend_per_package:
                                  type: number
                                price_breakdown:
                                  type: object
                                  properties:
                                    list_price:
                                      type: number
                                    adjustments:
                                      type: array
                                      items:
                                        type: object
                                        additionalProperties: {}
                                  required:
                                    - list_price
                                    - adjustments
                                  additionalProperties: {}
                                eligible_adjustments:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - fee
                                      - type: string
                                        enum:
                                          - discount
                                      - type: string
                                        enum:
                                          - commission
                                      - type: string
                                        enum:
                                          - settlement
                              required:
                                - pricing_option_id
                                - pricing_model
                                - currency
                                - parameters
                              additionalProperties: {}
                            - type: object
                              properties:
                                pricing_option_id:
                                  type: string
                                pricing_model:
                                  type: string
                                  enum:
                                    - cpa
                                event_type:
                                  anyOf:
                                    - type: string
                                      enum:
                                        - page_view
                                    - type: string
                                      enum:
                                        - view_content
                                    - type: string
                                      enum:
                                        - select_content
                                    - type: string
                                      enum:
                                        - select_item
                                    - type: string
                                      enum:
                                        - search
                                    - type: string
                                      enum:
                                        - share
                                    - type: string
                                      enum:
                                        - add_to_cart
                                    - type: string
                                      enum:
                                        - remove_from_cart
                                    - type: string
                                      enum:
                                        - viewed_cart
                                    - type: string
                                      enum:
                                        - add_to_wishlist
                                    - type: string
                                      enum:
                                        - initiate_checkout
                                    - type: string
                                      enum:
                                        - add_payment_info
                                    - type: string
                                      enum:
                                        - purchase
                                    - type: string
                                      enum:
                                        - refund
                                    - type: string
                                      enum:
                                        - lead
                                    - type: string
                                      enum:
                                        - qualify_lead
                                    - type: string
                                      enum:
                                        - close_convert_lead
                                    - type: string
                                      enum:
                                        - disqualify_lead
                                    - type: string
                                      enum:
                                        - complete_registration
                                    - type: string
                                      enum:
                                        - subscribe
                                    - type: string
                                      enum:
                                        - start_trial
                                    - type: string
                                      enum:
                                        - app_install
                                    - type: string
                                      enum:
                                        - app_launch
                                    - type: string
                                      enum:
                                        - contact
                                    - type: string
                                      enum:
                                        - schedule
                                    - type: string
                                      enum:
                                        - donate
                                    - type: string
                                      enum:
                                        - submit_application
                                    - type: string
                                      enum:
                                        - custom
                                custom_event_name:
                                  type: string
                                event_source_id:
                                  type: string
                                currency:
                                  type: string
                                fixed_price:
                                  type: number
                                min_spend_per_package:
                                  type: number
                                price_breakdown:
                                  type: object
                                  properties:
                                    list_price:
                                      type: number
                                    adjustments:
                                      type: array
                                      items:
                                        type: object
                                        additionalProperties: {}
                                  required:
                                    - list_price
                                    - adjustments
                                  additionalProperties: {}
                                eligible_adjustments:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - fee
                                      - type: string
                                        enum:
                                          - discount
                                      - type: string
                                        enum:
                                          - commission
                                      - type: string
                                        enum:
                                          - settlement
                              required:
                                - pricing_option_id
                                - pricing_model
                                - event_type
                                - currency
                                - fixed_price
                              additionalProperties: {}
                            - type: object
                              properties:
                                pricing_option_id:
                                  type: string
                                pricing_model:
                                  type: string
                                  enum:
                                    - flat_rate
                                currency:
                                  type: string
                                fixed_price:
                                  type: number
                                floor_price:
                                  type: number
                                price_guidance:
                                  type: object
                                  properties:
                                    p25:
                                      type: number
                                    p50:
                                      type: number
                                    p75:
                                      type: number
                                    p90:
                                      type: number
                                  additionalProperties: {}
                                parameters:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - dooh
                                    sov_percentage:
                                      type: number
                                    loop_duration_seconds:
                                      type: number
                                    min_plays_per_hour:
                                      type: number
                                    venue_package:
                                      type: string
                                    duration_hours:
                                      type: number
                                    daypart:
                                      type: string
                                    estimated_impressions:
                                      type: number
                                  required:
                                    - type
                                  additionalProperties: {}
                                min_spend_per_package:
                                  type: number
                                price_breakdown:
                                  type: object
                                  properties:
                                    list_price:
                                      type: number
                                    adjustments:
                                      type: array
                                      items:
                                        type: object
                                        additionalProperties: {}
                                  required:
                                    - list_price
                                    - adjustments
                                  additionalProperties: {}
                                eligible_adjustments:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - fee
                                      - type: string
                                        enum:
                                          - discount
                                      - type: string
                                        enum:
                                          - commission
                                      - type: string
                                        enum:
                                          - settlement
                              required:
                                - pricing_option_id
                                - pricing_model
                                - currency
                              additionalProperties: {}
                            - type: object
                              properties:
                                pricing_option_id:
                                  type: string
                                pricing_model:
                                  type: string
                                  enum:
                                    - time
                                currency:
                                  type: string
                                fixed_price:
                                  type: number
                                floor_price:
                                  type: number
                                price_guidance:
                                  type: object
                                  properties:
                                    p25:
                                      type: number
                                    p50:
                                      type: number
                                    p75:
                                      type: number
                                    p90:
                                      type: number
                                  additionalProperties: {}
                                parameters:
                                  type: object
                                  properties:
                                    time_unit:
                                      anyOf:
                                        - type: string
                                          enum:
                                            - hour
                                        - type: string
                                          enum:
                                            - day
                                        - type: string
                                          enum:
                                            - week
                                        - type: string
                                          enum:
                                            - month
                                    min_duration:
                                      type: number
                                    max_duration:
                                      type: number
                                  required:
                                    - time_unit
                                  additionalProperties: {}
                                min_spend_per_package:
                                  type: number
                                price_breakdown:
                                  type: object
                                  properties:
                                    list_price:
                                      type: number
                                    adjustments:
                                      type: array
                                      items:
                                        type: object
                                        additionalProperties: {}
                                  required:
                                    - list_price
                                    - adjustments
                                  additionalProperties: {}
                                eligible_adjustments:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - fee
                                      - type: string
                                        enum:
                                          - discount
                                      - type: string
                                        enum:
                                          - commission
                                      - type: string
                                        enum:
                                          - settlement
                              required:
                                - pricing_option_id
                                - pricing_model
                                - currency
                                - parameters
                              additionalProperties: {}
                        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))$
                        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))$
                      required:
                        - id
                        - signalId
                        - seatId
                        - visibility
                        - price
                        - archivedAt
                        - createdAt
                        - updatedAt
                      additionalProperties: false
                required:
                  - signal
                  - access
                additionalProperties: false
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    put:
      operationId: updateSignal
      summary: Update signal
      description: Update signal metadata and manage access records. Cannot change signalId, keyType, or regions after creation.
      tags:
        - Signals
      security:
        - bearerAuth: []
      parameters:
        - in: path
          name: signalId
          schema:
            description: Signal identifier
            type: string
            minLength: 1
          required: true
          description: Signal identifier
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateSignalFromAgentInput'
      responses:
        '200':
          description: Update signal
          content:
            application/json:
              schema:
                type: object
                properties:
                  signal:
                    type: object
                    properties:
                      id:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      signalId:
                        type: string
                      adcpAgentId:
                        nullable: true
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      name:
                        type: string
                      description:
                        nullable: true
                        type: string
                      keyType:
                        type: array
                        items:
                          type: string
                          enum:
                            - property
                            - postal_code
                            - uk_postal_district
                            - maid
                            - rampid
                            - lat_long_radius
                            - id5
                            - coreid
                            - yahoo_connect
                            - uid2
                            - euid
                            - pairid
                            - url
                      regions:
                        nullable: true
                        type: array
                        items:
                          type: string
                          enum:
                            - NORAM
                            - LATAM
                            - EMEA
                            - APAC
                            - ANZ
                            - GLOBAL
                      metadata:
                        nullable: true
                        type: object
                        additionalProperties: {}
                      isLive:
                        type: boolean
                      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))$
                      createdBy:
                        nullable: true
                        type: string
                      updatedBy:
                        nullable: true
                        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))$
                    required:
                      - id
                      - signalId
                      - adcpAgentId
                      - name
                      - description
                      - keyType
                      - regions
                      - metadata
                      - isLive
                      - archivedAt
                      - createdBy
                      - updatedBy
                      - createdAt
                      - updatedAt
                    additionalProperties: false
                  access:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                        signalId:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                        seatId:
                          type: integer
                          format: int64
                        visibility:
                          type: string
                          enum:
                            - PUBLIC
                            - PROPRIETARY
                        price:
                          nullable: true
                          anyOf:
                            - type: object
                              properties:
                                pricing_option_id:
                                  type: string
                                pricing_model:
                                  type: string
                                  enum:
                                    - cpm
                                currency:
                                  type: string
                                fixed_price:
                                  type: number
                                floor_price:
                                  type: number
                                max_bid:
                                  type: boolean
                                price_guidance:
                                  type: object
                                  properties:
                                    p25:
                                      type: number
                                    p50:
                                      type: number
                                    p75:
                                      type: number
                                    p90:
                                      type: number
                                  additionalProperties: {}
                                min_spend_per_package:
                                  type: number
                                price_breakdown:
                                  type: object
                                  properties:
                                    list_price:
                                      type: number
                                    adjustments:
                                      type: array
                                      items:
                                        type: object
                                        additionalProperties: {}
                                  required:
                                    - list_price
                                    - adjustments
                                  additionalProperties: {}
                                eligible_adjustments:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - fee
                                      - type: string
                                        enum:
                                          - discount
                                      - type: string
                                        enum:
                                          - commission
                                      - type: string
                                        enum:
                                          - settlement
                              required:
                                - pricing_option_id
                                - pricing_model
                                - currency
                              additionalProperties: {}
                            - type: object
                              properties:
                                pricing_option_id:
                                  type: string
                                pricing_model:
                                  type: string
                                  enum:
                                    - vcpm
                                currency:
                                  type: string
                                fixed_price:
                                  type: number
                                floor_price:
                                  type: number
                                max_bid:
                                  type: boolean
                                price_guidance:
                                  type: object
                                  properties:
                                    p25:
                                      type: number
                                    p50:
                                      type: number
                                    p75:
                                      type: number
                                    p90:
                                      type: number
                                  additionalProperties: {}
                                min_spend_per_package:
                                  type: number
                                price_breakdown:
                                  type: object
                                  properties:
                                    list_price:
                                      type: number
                                    adjustments:
                                      type: array
                                      items:
                                        type: object
                                        additionalProperties: {}
                                  required:
                                    - list_price
                                    - adjustments
                                  additionalProperties: {}
                                eligible_adjustments:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - fee
                                      - type: string
                                        enum:
                                          - discount
                                      - type: string
                                        enum:
                                          - commission
                                      - type: string
                                        enum:
                                          - settlement
                              required:
                                - pricing_option_id
                                - pricing_model
                                - currency
                              additionalProperties: {}
                            - type: object
                              properties:
                                pricing_option_id:
                                  type: string
                                pricing_model:
                                  type: string
                                  enum:
                                    - cpc
                                currency:
                                  type: string
                                fixed_price:
                                  type: number
                                floor_price:
                                  type: number
                                max_bid:
                                  type: boolean
                                price_guidance:
                                  type: object
                                  properties:
                                    p25:
                                      type: number
                                    p50:
                                      type: number
                                    p75:
                                      type: number
                                    p90:
                                      type: number
                                  additionalProperties: {}
                                min_spend_per_package:
                                  type: number
                                price_breakdown:
                                  type: object
                                  properties:
                                    list_price:
                                      type: number
                                    adjustments:
                                      type: array
                                      items:
                                        type: object
                                        additionalProperties: {}
                                  required:
                                    - list_price
                                    - adjustments
                                  additionalProperties: {}
                                eligible_adjustments:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - fee
                                      - type: string
                                        enum:
                                          - discount
                                      - type: string
                                        enum:
                                          - commission
                                      - type: string
                                        enum:
                                          - settlement
                              required:
                                - pricing_option_id
                                - pricing_model
                                - currency
                              additionalProperties: {}
                            - type: object
                              properties:
                                pricing_option_id:
                                  type: string
                                pricing_model:
                                  type: string
                                  enum:
                                    - cpcv
                                currency:
                                  type: string
                                fixed_price:
                                  type: number
                                floor_price:
                                  type: number
                                max_bid:
                                  type: boolean
                                price_guidance:
                                  type: object
                                  properties:
                                    p25:
                                      type: number
                                    p50:
                                      type: number
                                    p75:
                                      type: number
                                    p90:
                                      type: number
                                  additionalProperties: {}
                                min_spend_per_package:
                                  type: number
                                price_breakdown:
                                  type: object
                                  properties:
                                    list_price:
                                      type: number
                                    adjustments:
                                      type: array
                                      items:
                                        type: object
                                        additionalProperties: {}
                                  required:
                                    - list_price
                                    - adjustments
                                  additionalProperties: {}
                                eligible_adjustments:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - fee
                                      - type: string
                                        enum:
                                          - discount
                                      - type: string
                                        enum:
                                          - commission
                                      - type: string
                                        enum:
                                          - settlement
                              required:
                                - pricing_option_id
                                - pricing_model
                                - currency
                              additionalProperties: {}
                            - type: object
                              properties:
                                pricing_option_id:
                                  type: string
                                pricing_model:
                                  type: string
                                  enum:
                                    - cpv
                                currency:
                                  type: string
                                fixed_price:
                                  type: number
                                floor_price:
                                  type: number
                                max_bid:
                                  type: boolean
                                price_guidance:
                                  type: object
                                  properties:
                                    p25:
                                      type: number
                                    p50:
                                      type: number
                                    p75:
                                      type: number
                                    p90:
                                      type: number
                                  additionalProperties: {}
                                parameters:
                                  type: object
                                  properties:
                                    view_threshold:
                                      anyOf:
                                        - type: number
                                        - type: object
                                          properties:
                                            duration_seconds:
                                              type: number
                                          required:
                                            - duration_seconds
                                          additionalProperties: {}
                                  required:
                                    - view_threshold
                                  additionalProperties: {}
                                min_spend_per_package:
                                  type: number
                                price_breakdown:
                                  type: object
                                  properties:
                                    list_price:
                                      type: number
                                    adjustments:
                                      type: array
                                      items:
                                        type: object
                                        additionalProperties: {}
                                  required:
                                    - list_price
                                    - adjustments
                                  additionalProperties: {}
                                eligible_adjustments:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - fee
                                      - type: string
                                        enum:
                                          - discount
                                      - type: string
                                        enum:
                                          - commission
                                      - type: string
                                        enum:
                                          - settlement
                              required:
                                - pricing_option_id
                                - pricing_model
                                - currency
                                - parameters
                              additionalProperties: {}
                            - type: object
                              properties:
                                pricing_option_id:
                                  type: string
                                pricing_model:
                                  type: string
                                  enum:
                                    - cpp
                                currency:
                                  type: string
                                fixed_price:
                                  type: number
                                floor_price:
                                  type: number
                                price_guidance:
                                  type: object
                                  properties:
                                    p25:
                                      type: number
                                    p50:
                                      type: number
                                    p75:
                                      type: number
                                    p90:
                                      type: number
                                  additionalProperties: {}
                                parameters:
                                  type: object
                                  properties:
                                    demographic_system:
                                      anyOf:
                                        - type: string
                                          enum:
                                            - nielsen
                                        - type: string
                                          enum:
                                            - barb
                                        - type: string
                                          enum:
                                            - agf
                                        - type: string
                                          enum:
                                            - oztam
                                        - type: string
                                          enum:
                                            - mediametrie
                                        - type: string
                                          enum:
                                            - custom
                                    demographic:
                                      type: string
                                    min_points:
                                      type: number
                                  required:
                                    - demographic
                                  additionalProperties: {}
                                min_spend_per_package:
                                  type: number
                                price_breakdown:
                                  type: object
                                  properties:
                                    list_price:
                                      type: number
                                    adjustments:
                                      type: array
                                      items:
                                        type: object
                                        additionalProperties: {}
                                  required:
                                    - list_price
                                    - adjustments
                                  additionalProperties: {}
                                eligible_adjustments:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - fee
                                      - type: string
                                        enum:
                                          - discount
                                      - type: string
                                        enum:
                                          - commission
                                      - type: string
                                        enum:
                                          - settlement
                              required:
                                - pricing_option_id
                                - pricing_model
                                - currency
                                - parameters
                              additionalProperties: {}
                            - type: object
                              properties:
                                pricing_option_id:
                                  type: string
                                pricing_model:
                                  type: string
                                  enum:
                                    - cpa
                                event_type:
                                  anyOf:
                                    - type: string
                                      enum:
                                        - page_view
                                    - type: string
                                      enum:
                                        - view_content
                                    - type: string
                                      enum:
                                        - select_content
                                    - type: string
                                      enum:
                                        - select_item
                                    - type: string
                                      enum:
                                        - search
                                    - type: string
                                      enum:
                                        - share
                                    - type: string
                                      enum:
                                        - add_to_cart
                                    - type: string
                                      enum:
                                        - remove_from_cart
                                    - type: string
                                      enum:
                                        - viewed_cart
                                    - type: string
                                      enum:
                                        - add_to_wishlist
                                    - type: string
                                      enum:
                                        - initiate_checkout
                                    - type: string
                                      enum:
                                        - add_payment_info
                                    - type: string
                                      enum:
                                        - purchase
                                    - type: string
                                      enum:
                                        - refund
                                    - type: string
                                      enum:
                                        - lead
                                    - type: string
                                      enum:
                                        - qualify_lead
                                    - type: string
                                      enum:
                                        - close_convert_lead
                                    - type: string
                                      enum:
                                        - disqualify_lead
                                    - type: string
                                      enum:
                                        - complete_registration
                                    - type: string
                                      enum:
                                        - subscribe
                                    - type: string
                                      enum:
                                        - start_trial
                                    - type: string
                                      enum:
                                        - app_install
                                    - type: string
                                      enum:
                                        - app_launch
                                    - type: string
                                      enum:
                                        - contact
                                    - type: string
                                      enum:
                                        - schedule
                                    - type: string
                                      enum:
                                        - donate
                                    - type: string
                                      enum:
                                        - submit_application
                                    - type: string
                                      enum:
                                        - custom
                                custom_event_name:
                                  type: string
                                event_source_id:
                                  type: string
                                currency:
                                  type: string
                                fixed_price:
                                  type: number
                                min_spend_per_package:
                                  type: number
                                price_breakdown:
                                  type: object
                                  properties:
                                    list_price:
                                      type: number
                                    adjustments:
                                      type: array
                                      items:
                                        type: object
                                        additionalProperties: {}
                                  required:
                                    - list_price
                                    - adjustments
                                  additionalProperties: {}
                                eligible_adjustments:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - fee
                                      - type: string
                                        enum:
                                          - discount
                                      - type: string
                                        enum:
                                          - commission
                                      - type: string
                                        enum:
                                          - settlement
                              required:
                                - pricing_option_id
                                - pricing_model
                                - event_type
                                - currency
                                - fixed_price
                              additionalProperties: {}
                            - type: object
                              properties:
                                pricing_option_id:
                                  type: string
                                pricing_model:
                                  type: string
                                  enum:
                                    - flat_rate
                                currency:
                                  type: string
                                fixed_price:
                                  type: number
                                floor_price:
                                  type: number
                                price_guidance:
                                  type: object
                                  properties:
                                    p25:
                                      type: number
                                    p50:
                                      type: number
                                    p75:
                                      type: number
                                    p90:
                                      type: number
                                  additionalProperties: {}
                                parameters:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - dooh
                                    sov_percentage:
                                      type: number
                                    loop_duration_seconds:
                                      type: number
                                    min_plays_per_hour:
                                      type: number
                                    venue_package:
                                      type: string
                                    duration_hours:
                                      type: number
                                    daypart:
                                      type: string
                                    estimated_impressions:
                                      type: number
                                  required:
                                    - type
                                  additionalProperties: {}
                                min_spend_per_package:
                                  type: number
                                price_breakdown:
                                  type: object
                                  properties:
                                    list_price:
                                      type: number
                                    adjustments:
                                      type: array
                                      items:
                                        type: object
                                        additionalProperties: {}
                                  required:
                                    - list_price
                                    - adjustments
                                  additionalProperties: {}
                                eligible_adjustments:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - fee
                                      - type: string
                                        enum:
                                          - discount
                                      - type: string
                                        enum:
                                          - commission
                                      - type: string
                                        enum:
                                          - settlement
                              required:
                                - pricing_option_id
                                - pricing_model
                                - currency
                              additionalProperties: {}
                            - type: object
                              properties:
                                pricing_option_id:
                                  type: string
                                pricing_model:
                                  type: string
                                  enum:
                                    - time
                                currency:
                                  type: string
                                fixed_price:
                                  type: number
                                floor_price:
                                  type: number
                                price_guidance:
                                  type: object
                                  properties:
                                    p25:
                                      type: number
                                    p50:
                                      type: number
                                    p75:
                                      type: number
                                    p90:
                                      type: number
                                  additionalProperties: {}
                                parameters:
                                  type: object
                                  properties:
                                    time_unit:
                                      anyOf:
                                        - type: string
                                          enum:
                                            - hour
                                        - type: string
                                          enum:
                                            - day
                                        - type: string
                                          enum:
                                            - week
                                        - type: string
                                          enum:
                                            - month
                                    min_duration:
                                      type: number
                                    max_duration:
                                      type: number
                                  required:
                                    - time_unit
                                  additionalProperties: {}
                                min_spend_per_package:
                                  type: number
                                price_breakdown:
                                  type: object
                                  properties:
                                    list_price:
                                      type: number
                                    adjustments:
                                      type: array
                                      items:
                                        type: object
                                        additionalProperties: {}
                                  required:
                                    - list_price
                                    - adjustments
                                  additionalProperties: {}
                                eligible_adjustments:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - fee
                                      - type: string
                                        enum:
                                          - discount
                                      - type: string
                                        enum:
                                          - commission
                                      - type: string
                                        enum:
                                          - settlement
                              required:
                                - pricing_option_id
                                - pricing_model
                                - currency
                                - parameters
                              additionalProperties: {}
                        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))$
                        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))$
                      required:
                        - id
                        - signalId
                        - seatId
                        - visibility
                        - price
                        - archivedAt
                        - createdAt
                        - updatedAt
                      additionalProperties: false
                required:
                  - signal
                  - access
                additionalProperties: false
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      operationId: deleteSignal
      summary: Delete signal
      description: Soft-delete (archive) a signal and all its access records.
      tags:
        - Signals
      security:
        - bearerAuth: []
      parameters:
        - in: path
          name: signalId
          schema:
            description: Signal identifier
            type: string
            minLength: 1
          required: true
          description: Signal identifier
      responses:
        '204':
          description: No content
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /signals/discover:
    post:
      operationId: discoverSignals
      summary: Discover signals
      description: Query signal agents via ADCP to discover available signals. Does not persist results.
      tags:
        - Signals
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DiscoverSignalsInput'
      responses:
        '200':
          description: Discover signals
          content:
            application/json:
              schema:
                type: object
                properties:
                  agentResults:
                    type: array
                    items:
                      type: object
                      properties:
                        agentId:
                          type: string
                        agentName:
                          type: string
                        success:
                          type: boolean
                        signalCount:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                        error:
                          type: string
                      required:
                        - agentId
                        - agentName
                        - success
                        - signalCount
                      additionalProperties: false
                  signals:
                    type: array
                    items:
                      type: object
                      properties:
                        signalId:
                          type: string
                        name:
                          type: string
                        description:
                          type: string
                        dataProvider:
                          type: string
                        coveragePercentage:
                          nullable: true
                          type: number
                        access:
                          type: array
                          items:
                            type: object
                            properties:
                              seatId:
                                nullable: true
                                type: integer
                                format: int64
                              visibility:
                                type: string
                              price:
                                nullable: true
                                anyOf:
                                  - type: object
                                    properties:
                                      pricing_option_id:
                                        type: string
                                      pricing_model:
                                        type: string
                                        enum:
                                          - cpm
                                      currency:
                                        type: string
                                      fixed_price:
                                        type: number
                                      floor_price:
                                        type: number
                                      max_bid:
                                        type: boolean
                                      price_guidance:
                                        type: object
                                        properties:
                                          p25:
                                            type: number
                                          p50:
                                            type: number
                                          p75:
                                            type: number
                                          p90:
                                            type: number
                                        additionalProperties: {}
                                      min_spend_per_package:
                                        type: number
                                      price_breakdown:
                                        type: object
                                        properties:
                                          list_price:
                                            type: number
                                          adjustments:
                                            type: array
                                            items:
                                              type: object
                                              additionalProperties: {}
                                        required:
                                          - list_price
                                          - adjustments
                                        additionalProperties: {}
                                      eligible_adjustments:
                                        type: array
                                        items:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - fee
                                            - type: string
                                              enum:
                                                - discount
                                            - type: string
                                              enum:
                                                - commission
                                            - type: string
                                              enum:
                                                - settlement
                                    required:
                                      - pricing_option_id
                                      - pricing_model
                                      - currency
                                    additionalProperties: {}
                                  - type: object
                                    properties:
                                      pricing_option_id:
                                        type: string
                                      pricing_model:
                                        type: string
                                        enum:
                                          - vcpm
                                      currency:
                                        type: string
                                      fixed_price:
                                        type: number
                                      floor_price:
                                        type: number
                                      max_bid:
                                        type: boolean
                                      price_guidance:
                                        type: object
                                        properties:
                                          p25:
                                            type: number
                                          p50:
                                            type: number
                                          p75:
                                            type: number
                                          p90:
                                            type: number
                                        additionalProperties: {}
                                      min_spend_per_package:
                                        type: number
                                      price_breakdown:
                                        type: object
                                        properties:
                                          list_price:
                                            type: number
                                          adjustments:
                                            type: array
                                            items:
                                              type: object
                                              additionalProperties: {}
                                        required:
                                          - list_price
                                          - adjustments
                                        additionalProperties: {}
                                      eligible_adjustments:
                                        type: array
                                        items:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - fee
                                            - type: string
                                              enum:
                                                - discount
                                            - type: string
                                              enum:
                                                - commission
                                            - type: string
                                              enum:
                                                - settlement
                                    required:
                                      - pricing_option_id
                                      - pricing_model
                                      - currency
                                    additionalProperties: {}
                                  - type: object
                                    properties:
                                      pricing_option_id:
                                        type: string
                                      pricing_model:
                                        type: string
                                        enum:
                                          - cpc
                                      currency:
                                        type: string
                                      fixed_price:
                                        type: number
                                      floor_price:
                                        type: number
                                      max_bid:
                                        type: boolean
                                      price_guidance:
                                        type: object
                                        properties:
                                          p25:
                                            type: number
                                          p50:
                                            type: number
                                          p75:
                                            type: number
                                          p90:
                                            type: number
                                        additionalProperties: {}
                                      min_spend_per_package:
                                        type: number
                                      price_breakdown:
                                        type: object
                                        properties:
                                          list_price:
                                            type: number
                                          adjustments:
                                            type: array
                                            items:
                                              type: object
                                              additionalProperties: {}
                                        required:
                                          - list_price
                                          - adjustments
                                        additionalProperties: {}
                                      eligible_adjustments:
                                        type: array
                                        items:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - fee
                                            - type: string
                                              enum:
                                                - discount
                                            - type: string
                                              enum:
                                                - commission
                                            - type: string
                                              enum:
                                                - settlement
                                    required:
                                      - pricing_option_id
                                      - pricing_model
                                      - currency
                                    additionalProperties: {}
                                  - type: object
                                    properties:
                                      pricing_option_id:
                                        type: string
                                      pricing_model:
                                        type: string
                                        enum:
                                          - cpcv
                                      currency:
                                        type: string
                                      fixed_price:
                                        type: number
                                      floor_price:
                                        type: number
                                      max_bid:
                                        type: boolean
                                      price_guidance:
                                        type: object
                                        properties:
                                          p25:
                                            type: number
                                          p50:
                                            type: number
                                          p75:
                                            type: number
                                          p90:
                                            type: number
                                        additionalProperties: {}
                                      min_spend_per_package:
                                        type: number
                                      price_breakdown:
                                        type: object
                                        properties:
                                          list_price:
                                            type: number
                                          adjustments:
                                            type: array
                                            items:
                                              type: object
                                              additionalProperties: {}
                                        required:
                                          - list_price
                                          - adjustments
                                        additionalProperties: {}
                                      eligible_adjustments:
                                        type: array
                                        items:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - fee
                                            - type: string
                                              enum:
                                                - discount
                                            - type: string
                                              enum:
                                                - commission
                                            - type: string
                                              enum:
                                                - settlement
                                    required:
                                      - pricing_option_id
                                      - pricing_model
                                      - currency
                                    additionalProperties: {}
                                  - type: object
                                    properties:
                                      pricing_option_id:
                                        type: string
                                      pricing_model:
                                        type: string
                                        enum:
                                          - cpv
                                      currency:
                                        type: string
                                      fixed_price:
                                        type: number
                                      floor_price:
                                        type: number
                                      max_bid:
                                        type: boolean
                                      price_guidance:
                                        type: object
                                        properties:
                                          p25:
                                            type: number
                                          p50:
                                            type: number
                                          p75:
                                            type: number
                                          p90:
                                            type: number
                                        additionalProperties: {}
                                      parameters:
                                        type: object
                                        properties:
                                          view_threshold:
                                            anyOf:
                                              - type: number
                                              - type: object
                                                properties:
                                                  duration_seconds:
                                                    type: number
                                                required:
                                                  - duration_seconds
                                                additionalProperties: {}
                                        required:
                                          - view_threshold
                                        additionalProperties: {}
                                      min_spend_per_package:
                                        type: number
                                      price_breakdown:
                                        type: object
                                        properties:
                                          list_price:
                                            type: number
                                          adjustments:
                                            type: array
                                            items:
                                              type: object
                                              additionalProperties: {}
                                        required:
                                          - list_price
                                          - adjustments
                                        additionalProperties: {}
                                      eligible_adjustments:
                                        type: array
                                        items:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - fee
                                            - type: string
                                              enum:
                                                - discount
                                            - type: string
                                              enum:
                                                - commission
                                            - type: string
                                              enum:
                                                - settlement
                                    required:
                                      - pricing_option_id
                                      - pricing_model
                                      - currency
                                      - parameters
                                    additionalProperties: {}
                                  - type: object
                                    properties:
                                      pricing_option_id:
                                        type: string
                                      pricing_model:
                                        type: string
                                        enum:
                                          - cpp
                                      currency:
                                        type: string
                                      fixed_price:
                                        type: number
                                      floor_price:
                                        type: number
                                      price_guidance:
                                        type: object
                                        properties:
                                          p25:
                                            type: number
                                          p50:
                                            type: number
                                          p75:
                                            type: number
                                          p90:
                                            type: number
                                        additionalProperties: {}
                                      parameters:
                                        type: object
                                        properties:
                                          demographic_system:
                                            anyOf:
                                              - type: string
                                                enum:
                                                  - nielsen
                                              - type: string
                                                enum:
                                                  - barb
                                              - type: string
                                                enum:
                                                  - agf
                                              - type: string
                                                enum:
                                                  - oztam
                                              - type: string
                                                enum:
                                                  - mediametrie
                                              - type: string
                                                enum:
                                                  - custom
                                          demographic:
                                            type: string
                                          min_points:
                                            type: number
                                        required:
                                          - demographic
                                        additionalProperties: {}
                                      min_spend_per_package:
                                        type: number
                                      price_breakdown:
                                        type: object
                                        properties:
                                          list_price:
                                            type: number
                                          adjustments:
                                            type: array
                                            items:
                                              type: object
                                              additionalProperties: {}
                                        required:
                                          - list_price
                                          - adjustments
                                        additionalProperties: {}
                                      eligible_adjustments:
                                        type: array
                                        items:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - fee
                                            - type: string
                                              enum:
                                                - discount
                                            - type: string
                                              enum:
                                                - commission
                                            - type: string
                                              enum:
                                                - settlement
                                    required:
                                      - pricing_option_id
                                      - pricing_model
                                      - currency
                                      - parameters
                                    additionalProperties: {}
                                  - type: object
                                    properties:
                                      pricing_option_id:
                                        type: string
                                      pricing_model:
                                        type: string
                                        enum:
                                          - cpa
                                      event_type:
                                        anyOf:
                                          - type: string
                                            enum:
                                              - page_view
                                          - type: string
                                            enum:
                                              - view_content
                                          - type: string
                                            enum:
                                              - select_content
                                          - type: string
                                            enum:
                                              - select_item
                                          - type: string
                                            enum:
                                              - search
                                          - type: string
                                            enum:
                                              - share
                                          - type: string
                                            enum:
                                              - add_to_cart
                                          - type: string
                                            enum:
                                              - remove_from_cart
                                          - type: string
                                            enum:
                                              - viewed_cart
                                          - type: string
                                            enum:
                                              - add_to_wishlist
                                          - type: string
                                            enum:
                                              - initiate_checkout
                                          - type: string
                                            enum:
                                              - add_payment_info
                                          - type: string
                                            enum:
                                              - purchase
                                          - type: string
                                            enum:
                                              - refund
                                          - type: string
                                            enum:
                                              - lead
                                          - type: string
                                            enum:
                                              - qualify_lead
                                          - type: string
                                            enum:
                                              - close_convert_lead
                                          - type: string
                                            enum:
                                              - disqualify_lead
                                          - type: string
                                            enum:
                                              - complete_registration
                                          - type: string
                                            enum:
                                              - subscribe
                                          - type: string
                                            enum:
                                              - start_trial
                                          - type: string
                                            enum:
                                              - app_install
                                          - type: string
                                            enum:
                                              - app_launch
                                          - type: string
                                            enum:
                                              - contact
                                          - type: string
                                            enum:
                                              - schedule
                                          - type: string
                                            enum:
                                              - donate
                                          - type: string
                                            enum:
                                              - submit_application
                                          - type: string
                                            enum:
                                              - custom
                                      custom_event_name:
                                        type: string
                                      event_source_id:
                                        type: string
                                      currency:
                                        type: string
                                      fixed_price:
                                        type: number
                                      min_spend_per_package:
                                        type: number
                                      price_breakdown:
                                        type: object
                                        properties:
                                          list_price:
                                            type: number
                                          adjustments:
                                            type: array
                                            items:
                                              type: object
                                              additionalProperties: {}
                                        required:
                                          - list_price
                                          - adjustments
                                        additionalProperties: {}
                                      eligible_adjustments:
                                        type: array
                                        items:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - fee
                                            - type: string
                                              enum:
                                                - discount
                                            - type: string
                                              enum:
                                                - commission
                                            - type: string
                                              enum:
                                                - settlement
                                    required:
                                      - pricing_option_id
                                      - pricing_model
                                      - event_type
                                      - currency
                                      - fixed_price
                                    additionalProperties: {}
                                  - type: object
                                    properties:
                                      pricing_option_id:
                                        type: string
                                      pricing_model:
                                        type: string
                                        enum:
                                          - flat_rate
                                      currency:
                                        type: string
                                      fixed_price:
                                        type: number
                                      floor_price:
                                        type: number
                                      price_guidance:
                                        type: object
                                        properties:
                                          p25:
                                            type: number
                                          p50:
                                            type: number
                                          p75:
                                            type: number
                                          p90:
                                            type: number
                                        additionalProperties: {}
                                      parameters:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - dooh
                                          sov_percentage:
                                            type: number
                                          loop_duration_seconds:
                                            type: number
                                          min_plays_per_hour:
                                            type: number
                                          venue_package:
                                            type: string
                                          duration_hours:
                                            type: number
                                          daypart:
                                            type: string
                                          estimated_impressions:
                                            type: number
                                        required:
                                          - type
                                        additionalProperties: {}
                                      min_spend_per_package:
                                        type: number
                                      price_breakdown:
                                        type: object
                                        properties:
                                          list_price:
                                            type: number
                                          adjustments:
                                            type: array
                                            items:
                                              type: object
                                              additionalProperties: {}
                                        required:
                                          - list_price
                                          - adjustments
                                        additionalProperties: {}
                                      eligible_adjustments:
                                        type: array
                                        items:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - fee
                                            - type: string
                                              enum:
                                                - discount
                                            - type: string
                                              enum:
                                                - commission
                                            - type: string
                                              enum:
                                                - settlement
                                    required:
                                      - pricing_option_id
                                      - pricing_model
                                      - currency
                                    additionalProperties: {}
                                  - type: object
                                    properties:
                                      pricing_option_id:
                                        type: string
                                      pricing_model:
                                        type: string
                                        enum:
                                          - time
                                      currency:
                                        type: string
                                      fixed_price:
                                        type: number
                                      floor_price:
                                        type: number
                                      price_guidance:
                                        type: object
                                        properties:
                                          p25:
                                            type: number
                                          p50:
                                            type: number
                                          p75:
                                            type: number
                                          p90:
                                            type: number
                                        additionalProperties: {}
                                      parameters:
                                        type: object
                                        properties:
                                          time_unit:
                                            anyOf:
                                              - type: string
                                                enum:
                                                  - hour
                                              - type: string
                                                enum:
                                                  - day
                                              - type: string
                                                enum:
                                                  - week
                                              - type: string
                                                enum:
                                                  - month
                                          min_duration:
                                            type: number
                                          max_duration:
                                            type: number
                                        required:
                                          - time_unit
                                        additionalProperties: {}
                                      min_spend_per_package:
                                        type: number
                                      price_breakdown:
                                        type: object
                                        properties:
                                          list_price:
                                            type: number
                                          adjustments:
                                            type: array
                                            items:
                                              type: object
                                              additionalProperties: {}
                                        required:
                                          - list_price
                                          - adjustments
                                        additionalProperties: {}
                                      eligible_adjustments:
                                        type: array
                                        items:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - fee
                                            - type: string
                                              enum:
                                                - discount
                                            - type: string
                                              enum:
                                                - commission
                                            - type: string
                                              enum:
                                                - settlement
                                    required:
                                      - pricing_option_id
                                      - pricing_model
                                      - currency
                                      - parameters
                                    additionalProperties: {}
                            required:
                              - seatId
                              - visibility
                              - price
                            additionalProperties: false
                        regions:
                          nullable: true
                          type: array
                          items:
                            type: string
                            enum:
                              - NORAM
                              - LATAM
                              - EMEA
                              - APAC
                              - ANZ
                              - GLOBAL
                        keyType:
                          nullable: true
                          type: array
                          items:
                            type: string
                            enum:
                              - property
                              - postal_code
                              - uk_postal_district
                              - maid
                              - rampid
                              - lat_long_radius
                              - id5
                              - coreid
                              - yahoo_connect
                              - uid2
                              - euid
                              - pairid
                              - url
                        metadata:
                          nullable: true
                          type: object
                          additionalProperties: {}
                      required:
                        - signalId
                        - name
                        - description
                        - dataProvider
                        - coveragePercentage
                        - access
                        - regions
                        - keyType
                        - metadata
                      additionalProperties: false
                  total:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                required:
                  - agentResults
                  - signals
                  - total
                additionalProperties: false
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /agents:
    get:
      operationId: listStorefrontAgents
      summary: List registered agents
      description: >-
        List sales, signals, and outcomes agents registered to this storefront, with capability metadata and per-agent
        account counts.
      tags:
        - Storefront Agents
      security:
        - bearerAuth: []
      parameters:
        - in: query
          name: type
          schema:
            description: Filter by agent type
            type: string
            enum:
              - SALES
              - SIGNAL
              - CREATIVE
              - OUTCOME
          description: Filter by agent type
        - in: query
          name: status
          schema:
            description: Filter by agent status
            type: string
            enum:
              - PENDING
              - ACTIVE
              - DISABLED
          description: Filter by agent status
        - in: query
          name: relationship
          schema:
            description: 'Filter by relationship: SELF = owned by you, MARKETPLACE = all other marketplace agents'
            type: string
            enum:
              - SELF
              - MARKETPLACE
          description: 'Filter by relationship: SELF = owned by you, MARKETPLACE = all other marketplace agents'
        - in: query
          name: name
          schema:
            description: Filter by agent name (partial match, case-insensitive)
            type: string
          description: Filter by agent name (partial match, case-insensitive)
        - in: query
          name: supportsRegistration
          schema:
            description: When true, return only agents that require operator authentication (require_operator_auth = true)
            type: string
            enum:
              - 'true'
              - 'false'
          description: When true, return only agents that require operator authentication (require_operator_auth = true)
        - in: query
          name: limit
          schema:
            description: 'Maximum number of agents to return per page (default: 10, max: 10)'
            type: integer
            exclusiveMinimum: true
            maximum: 10
          description: 'Maximum number of agents to return per page (default: 10, max: 10)'
        - in: query
          name: offset
          schema:
            description: 'Number of agents to skip for pagination (default: 0)'
            type: integer
            minimum: 0
            maximum: 9007199254740991
          description: 'Number of agents to skip for pagination (default: 0)'
      responses:
        '200':
          description: List registered agents
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentList'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /agents/{agentId}:
    get:
      operationId: getStorefrontAgent
      summary: Get agent details
      description: >-
        Retrieve detailed information about a registered agent, including capabilities, master/customer account flags,
        and account counts.
      tags:
        - Storefront Agents
      security:
        - bearerAuth: []
      parameters:
        - in: path
          name: agentId
          schema:
            type: string
            minLength: 1
          required: true
      responses:
        '200':
          description: Get agent details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentDetail'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /agents/{agentId}/oauth/authorize:
    post:
      operationId: startAgentOAuth
      summary: Start agent OAuth flow
      description: >-
        Initiate the OAuth flow for agent-level setup. Tokens are stored in the agent configuration and used by the
        platform when calling the agent.
      tags:
        - Storefront Agents
      security:
        - bearerAuth: []
      parameters:
        - in: path
          name: agentId
          schema:
            type: string
            minLength: 1
          required: true
      responses:
        '200':
          description: Start agent OAuth flow
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OAuthAuthorizeResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /agents/{agentId}/accounts/oauth/authorize:
    post:
      operationId: startAgentAccountOAuth
      summary: Start per-account OAuth flow
      description: >-
        Initiate the OAuth flow for per-account agent registration. Tokens are stored against the buyer/operator account
        that the OAuth grant represents.
      tags:
        - Storefront Agents
      security:
        - bearerAuth: []
      parameters:
        - in: path
          name: agentId
          schema:
            type: string
            minLength: 1
          required: true
      responses:
        '200':
          description: Start per-account OAuth flow
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OAuthAuthorizeResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /audit-logs:
    get:
      operationId: listStorefrontAuditLogs
      summary: List storefront activity
      description: >-
        List recent configuration and inventory-source changes on the storefront. Supports filters by resource type
        (`INVENTORY_SOURCE`, `AGENT`), inventory source ID, action, and date range.
      tags:
        - Storefront Activity
      security:
        - bearerAuth: []
      parameters:
        - in: query
          name: startDate
          schema:
            description: ISO timestamp; only include audit logs at or after this time
            example: '2026-03-01T00:00:00Z'
            type: string
          description: ISO timestamp; only include audit logs at or after this time
        - in: query
          name: endDate
          schema:
            description: ISO timestamp; only include audit logs at or before this time
            example: '2026-04-01T00:00:00Z'
            type: string
          description: ISO timestamp; only include audit logs at or before this time
        - in: query
          name: inventorySourceId
          schema:
            description: Filter to a single storefront inventory source by source ID
            example: source_abc123
            type: string
          description: Filter to a single storefront inventory source by source ID
        - in: query
          name: resourceTypes
          schema:
            description: Filter to a subset of storefront resource types. Defaults to all storefront resource types.
            anyOf:
              - type: array
                items:
                  type: string
                  enum:
                    - STOREFRONT
                    - STOREFRONT_INVENTORY_SOURCE
              - type: string
          description: Filter to a subset of storefront resource types. Defaults to all storefront resource types.
        - in: query
          name: take
          schema:
            description: Number of results to return (max 500)
            example: 50
            default: 50
            type: integer
            exclusiveMinimum: true
            maximum: 500
          description: Number of results to return (max 500)
        - in: query
          name: skip
          schema:
            description: Number of results to skip for pagination
            example: 0
            default: 0
            type: integer
            minimum: 0
            maximum: 9007199254740991
          description: Number of results to skip for pagination
      responses:
        '200':
          description: List storefront activity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListStorefrontActivityResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /billing/account-session:
    post:
      operationId: createStorefrontAccountSession
      summary: Create embedded Stripe Connect session
      description: >-
        Create an embedded Stripe Connect account session for in-app onboarding UI. Returns a `clientSecret` to mount
        Stripe Connect components.
      tags:
        - Storefront Billing
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Create embedded Stripe Connect session
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountSessionResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api-call:
    servers: *ref_1
    post:
      operationId: mcpApiCall
      summary: Make API call via MCP
      description: |-
        Make REST API calls to any Storefront API endpoint through MCP.

        ## Parameters

        - `method`: HTTP method (GET, POST, PUT, DELETE)
        - `path`: API path (e.g., "/inventory-sources", "/campaigns/{id}")
        - `body`: Request body for POST/PUT requests (optional)
        - `query`: Query parameters (optional)

        ## Example: List Storefronts

        ```json
        {
          "jsonrpc": "2.0",
          "id": 2,
          "method": "tools/call",
          "params": {
            "name": "api_call",
            "arguments": {
              "method": "GET",
              "path": "/inventory-sources",
              "query": { "take": 10 }
            }
          }
        }
        ```

        ## Example Response

        ```json
        {
          "jsonrpc": "2.0",
          "id": 2,
          "result": {
            "content": [
              {
                "type": "text",
                "text": "{ \"inventory-sources\": [...], \"total\": 5 }"
              }
            ]
          }
        }
        ```
      tags:
        - MCP
      parameters:
        - name: mcp-session-id
          in: header
          required: true
          schema:
            type: string
            format: uuid
          description: MCP session identifier from the initialize call.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/McpApiCallRequest'
            example:
              jsonrpc: '2.0'
              id: 2
              method: tools/call
              params:
                name: api_call
                arguments:
                  method: GET
                  path: /inventory-sources
                  query:
                    take: 10
      responses:
        '200':
          description: API call executed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/McpToolResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
  /ask-about-capability:
    servers: *ref_1
    post:
      operationId: mcpAskAboutCapability
      summary: Ask about API capabilities
      description: |-
        Learn about Storefront API features and capabilities using natural language questions.

        This tool helps AI agents understand what the API can do without needing to read documentation.

        ## Parameters

        - `question`: A natural language question about API capabilities

        ## Example Questions

        - "How do I create a campaign?"
        - "What can I configure on a campaign?"
        - "What authentication is required?"

        ## Example Request

        ```json
        {
          "jsonrpc": "2.0",
          "id": 4,
          "method": "tools/call",
          "params": {
            "name": "ask_about_capability",
            "arguments": {
              "question": "How do I create a campaign?"
            }
          }
        }
        ```

        ## Example Response

        ```json
        {
          "jsonrpc": "2.0",
          "id": 4,
          "result": {
            "content": [
              {
                "type": "text",
                "text": "To create a campaign, use POST /campaigns with..."
              }
            ]
          }
        }
        ```
      tags:
        - MCP
      parameters:
        - name: mcp-session-id
          in: header
          required: true
          schema:
            type: string
            format: uuid
          description: MCP session identifier from the initialize call.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/McpAskCapabilityRequest'
            example:
              jsonrpc: '2.0'
              id: 4
              method: tools/call
              params:
                name: ask_about_capability
                arguments:
                  question: How do I create a campaign?
      responses:
        '200':
          description: Capability information returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/McpToolResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    CreateChildAccountBody:
      description: Request body for creating a child customer account
      type: object
      properties:
        name:
          description: Name for the new child account
          example: Nike
          type: string
          minLength: 1
          maxLength: 255
        customerRole:
          description: Whether the account is a buyer or seller
          example: BUYER
          type: string
          enum:
            - BUYER
            - SELLER
        parentName:
          description: >-
            Name for the parent account created during standalone conversion. Defaults to "{company} (Admin)" if
            omitted.
          example: Acme HQ
          type: string
          minLength: 1
          maxLength: 255
        customerDomain:
          description: >-
            Registered organization domain. For SELLER accounts, also seeds the auto-created storefront's publisher and
            operator domain.
          example: nike.com
          type: string
          maxLength: 255
          pattern: ^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$
      required:
        - name
        - customerRole
    UpdateCustomerDomainBody:
      description: Request body for updating a customer's organization domain
      type: object
      properties:
        customerDomain:
          description: Registered organization domain to set on the customer.
          example: nike.com
          type: string
          maxLength: 255
          pattern: ^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$
      required:
        - customerDomain
    ResolveBrandBody:
      type: object
      properties:
        domain:
          description: Brand domain to resolve (e.g., "nike.com")
          type: string
          minLength: 1
      required:
        - domain
    BillingFee:
      description: An additional billing fee entry
      type: object
      properties:
        name:
          description: Fee label
          type: string
          minLength: 1
          maxLength: 255
        description:
          description: Fee description
          type: string
          maxLength: 500
        feePercent:
          description: Fee percentage (0–100)
          type: number
          minimum: 0
          maximum: 100
      required:
        - name
        - feePercent
    RegisterSignalInput:
      type: object
      properties:
        agentId:
          type: string
          minLength: 1
          maxLength: 255
        signalId:
          type: string
          minLength: 1
          maxLength: 255
          pattern: ^[\w\-:.]+$
        name:
          type: string
          minLength: 1
          maxLength: 255
        description:
          type: string
          maxLength: 5000
        keyType:
          minItems: 1
          type: array
          items:
            type: string
            enum:
              - property
              - postal_code
              - uk_postal_district
              - maid
              - rampid
              - lat_long_radius
              - id5
              - coreid
              - yahoo_connect
              - uid2
              - euid
              - pairid
              - url
        regions:
          maxItems: 6
          type: array
          items:
            type: string
            enum:
              - NORAM
              - LATAM
              - EMEA
              - APAC
              - ANZ
              - GLOBAL
        metadata:
          type: object
          additionalProperties: {}
        access:
          type: array
          items:
            type: object
            properties:
              seatId:
                description: Scope3 Seat ID that has access
                type: integer
                format: int64
              visibility:
                description: PUBLIC or PROPRIETARY
                type: string
                enum:
                  - PUBLIC
                  - PROPRIETARY
              price:
                anyOf:
                  - type: object
                    properties:
                      pricing_option_id:
                        type: string
                      pricing_model:
                        type: string
                        enum:
                          - cpm
                      currency:
                        type: string
                      fixed_price:
                        type: number
                      floor_price:
                        type: number
                      max_bid:
                        type: boolean
                      price_guidance:
                        type: object
                        properties:
                          p25:
                            type: number
                          p50:
                            type: number
                          p75:
                            type: number
                          p90:
                            type: number
                        additionalProperties: {}
                      min_spend_per_package:
                        type: number
                      price_breakdown:
                        type: object
                        properties:
                          list_price:
                            type: number
                          adjustments:
                            type: array
                            items:
                              type: object
                              additionalProperties: {}
                        required:
                          - list_price
                          - adjustments
                        additionalProperties: {}
                      eligible_adjustments:
                        type: array
                        items:
                          anyOf:
                            - type: string
                              enum:
                                - fee
                            - type: string
                              enum:
                                - discount
                            - type: string
                              enum:
                                - commission
                            - type: string
                              enum:
                                - settlement
                    required:
                      - pricing_option_id
                      - pricing_model
                      - currency
                    additionalProperties: {}
                  - type: object
                    properties:
                      pricing_option_id:
                        type: string
                      pricing_model:
                        type: string
                        enum:
                          - vcpm
                      currency:
                        type: string
                      fixed_price:
                        type: number
                      floor_price:
                        type: number
                      max_bid:
                        type: boolean
                      price_guidance:
                        type: object
                        properties:
                          p25:
                            type: number
                          p50:
                            type: number
                          p75:
                            type: number
                          p90:
                            type: number
                        additionalProperties: {}
                      min_spend_per_package:
                        type: number
                      price_breakdown:
                        type: object
                        properties:
                          list_price:
                            type: number
                          adjustments:
                            type: array
                            items:
                              type: object
                              additionalProperties: {}
                        required:
                          - list_price
                          - adjustments
                        additionalProperties: {}
                      eligible_adjustments:
                        type: array
                        items:
                          anyOf:
                            - type: string
                              enum:
                                - fee
                            - type: string
                              enum:
                                - discount
                            - type: string
                              enum:
                                - commission
                            - type: string
                              enum:
                                - settlement
                    required:
                      - pricing_option_id
                      - pricing_model
                      - currency
                    additionalProperties: {}
                  - type: object
                    properties:
                      pricing_option_id:
                        type: string
                      pricing_model:
                        type: string
                        enum:
                          - cpc
                      currency:
                        type: string
                      fixed_price:
                        type: number
                      floor_price:
                        type: number
                      max_bid:
                        type: boolean
                      price_guidance:
                        type: object
                        properties:
                          p25:
                            type: number
                          p50:
                            type: number
                          p75:
                            type: number
                          p90:
                            type: number
                        additionalProperties: {}
                      min_spend_per_package:
                        type: number
                      price_breakdown:
                        type: object
                        properties:
                          list_price:
                            type: number
                          adjustments:
                            type: array
                            items:
                              type: object
                              additionalProperties: {}
                        required:
                          - list_price
                          - adjustments
                        additionalProperties: {}
                      eligible_adjustments:
                        type: array
                        items:
                          anyOf:
                            - type: string
                              enum:
                                - fee
                            - type: string
                              enum:
                                - discount
                            - type: string
                              enum:
                                - commission
                            - type: string
                              enum:
                                - settlement
                    required:
                      - pricing_option_id
                      - pricing_model
                      - currency
                    additionalProperties: {}
                  - type: object
                    properties:
                      pricing_option_id:
                        type: string
                      pricing_model:
                        type: string
                        enum:
                          - cpcv
                      currency:
                        type: string
                      fixed_price:
                        type: number
                      floor_price:
                        type: number
                      max_bid:
                        type: boolean
                      price_guidance:
                        type: object
                        properties:
                          p25:
                            type: number
                          p50:
                            type: number
                          p75:
                            type: number
                          p90:
                            type: number
                        additionalProperties: {}
                      min_spend_per_package:
                        type: number
                      price_breakdown:
                        type: object
                        properties:
                          list_price:
                            type: number
                          adjustments:
                            type: array
                            items:
                              type: object
                              additionalProperties: {}
                        required:
                          - list_price
                          - adjustments
                        additionalProperties: {}
                      eligible_adjustments:
                        type: array
                        items:
                          anyOf:
                            - type: string
                              enum:
                                - fee
                            - type: string
                              enum:
                                - discount
                            - type: string
                              enum:
                                - commission
                            - type: string
                              enum:
                                - settlement
                    required:
                      - pricing_option_id
                      - pricing_model
                      - currency
                    additionalProperties: {}
                  - type: object
                    properties:
                      pricing_option_id:
                        type: string
                      pricing_model:
                        type: string
                        enum:
                          - cpv
                      currency:
                        type: string
                      fixed_price:
                        type: number
                      floor_price:
                        type: number
                      max_bid:
                        type: boolean
                      price_guidance:
                        type: object
                        properties:
                          p25:
                            type: number
                          p50:
                            type: number
                          p75:
                            type: number
                          p90:
                            type: number
                        additionalProperties: {}
                      parameters:
                        type: object
                        properties:
                          view_threshold:
                            anyOf:
                              - type: number
                              - type: object
                                properties:
                                  duration_seconds:
                                    type: number
                                required:
                                  - duration_seconds
                                additionalProperties: {}
                        required:
                          - view_threshold
                        additionalProperties: {}
                      min_spend_per_package:
                        type: number
                      price_breakdown:
                        type: object
                        properties:
                          list_price:
                            type: number
                          adjustments:
                            type: array
                            items:
                              type: object
                              additionalProperties: {}
                        required:
                          - list_price
                          - adjustments
                        additionalProperties: {}
                      eligible_adjustments:
                        type: array
                        items:
                          anyOf:
                            - type: string
                              enum:
                                - fee
                            - type: string
                              enum:
                                - discount
                            - type: string
                              enum:
                                - commission
                            - type: string
                              enum:
                                - settlement
                    required:
                      - pricing_option_id
                      - pricing_model
                      - currency
                      - parameters
                    additionalProperties: {}
                  - type: object
                    properties:
                      pricing_option_id:
                        type: string
                      pricing_model:
                        type: string
                        enum:
                          - cpp
                      currency:
                        type: string
                      fixed_price:
                        type: number
                      floor_price:
                        type: number
                      price_guidance:
                        type: object
                        properties:
                          p25:
                            type: number
                          p50:
                            type: number
                          p75:
                            type: number
                          p90:
                            type: number
                        additionalProperties: {}
                      parameters:
                        type: object
                        properties:
                          demographic_system:
                            anyOf:
                              - type: string
                                enum:
                                  - nielsen
                              - type: string
                                enum:
                                  - barb
                              - type: string
                                enum:
                                  - agf
                              - type: string
                                enum:
                                  - oztam
                              - type: string
                                enum:
                                  - mediametrie
                              - type: string
                                enum:
                                  - custom
                          demographic:
                            type: string
                          min_points:
                            type: number
                        required:
                          - demographic
                        additionalProperties: {}
                      min_spend_per_package:
                        type: number
                      price_breakdown:
                        type: object
                        properties:
                          list_price:
                            type: number
                          adjustments:
                            type: array
                            items:
                              type: object
                              additionalProperties: {}
                        required:
                          - list_price
                          - adjustments
                        additionalProperties: {}
                      eligible_adjustments:
                        type: array
                        items:
                          anyOf:
                            - type: string
                              enum:
                                - fee
                            - type: string
                              enum:
                                - discount
                            - type: string
                              enum:
                                - commission
                            - type: string
                              enum:
                                - settlement
                    required:
                      - pricing_option_id
                      - pricing_model
                      - currency
                      - parameters
                    additionalProperties: {}
                  - type: object
                    properties:
                      pricing_option_id:
                        type: string
                      pricing_model:
                        type: string
                        enum:
                          - cpa
                      event_type:
                        anyOf:
                          - type: string
                            enum:
                              - page_view
                          - type: string
                            enum:
                              - view_content
                          - type: string
                            enum:
                              - select_content
                          - type: string
                            enum:
                              - select_item
                          - type: string
                            enum:
                              - search
                          - type: string
                            enum:
                              - share
                          - type: string
                            enum:
                              - add_to_cart
                          - type: string
                            enum:
                              - remove_from_cart
                          - type: string
                            enum:
                              - viewed_cart
                          - type: string
                            enum:
                              - add_to_wishlist
                          - type: string
                            enum:
                              - initiate_checkout
                          - type: string
                            enum:
                              - add_payment_info
                          - type: string
                            enum:
                              - purchase
                          - type: string
                            enum:
                              - refund
                          - type: string
                            enum:
                              - lead
                          - type: string
                            enum:
                              - qualify_lead
                          - type: string
                            enum:
                              - close_convert_lead
                          - type: string
                            enum:
                              - disqualify_lead
                          - type: string
                            enum:
                              - complete_registration
                          - type: string
                            enum:
                              - subscribe
                          - type: string
                            enum:
                              - start_trial
                          - type: string
                            enum:
                              - app_install
                          - type: string
                            enum:
                              - app_launch
                          - type: string
                            enum:
                              - contact
                          - type: string
                            enum:
                              - schedule
                          - type: string
                            enum:
                              - donate
                          - type: string
                            enum:
                              - submit_application
                          - type: string
                            enum:
                              - custom
                      custom_event_name:
                        type: string
                      event_source_id:
                        type: string
                      currency:
                        type: string
                      fixed_price:
                        type: number
                      min_spend_per_package:
                        type: number
                      price_breakdown:
                        type: object
                        properties:
                          list_price:
                            type: number
                          adjustments:
                            type: array
                            items:
                              type: object
                              additionalProperties: {}
                        required:
                          - list_price
                          - adjustments
                        additionalProperties: {}
                      eligible_adjustments:
                        type: array
                        items:
                          anyOf:
                            - type: string
                              enum:
                                - fee
                            - type: string
                              enum:
                                - discount
                            - type: string
                              enum:
                                - commission
                            - type: string
                              enum:
                                - settlement
                    required:
                      - pricing_option_id
                      - pricing_model
                      - event_type
                      - currency
                      - fixed_price
                    additionalProperties: {}
                  - type: object
                    properties:
                      pricing_option_id:
                        type: string
                      pricing_model:
                        type: string
                        enum:
                          - flat_rate
                      currency:
                        type: string
                      fixed_price:
                        type: number
                      floor_price:
                        type: number
                      price_guidance:
                        type: object
                        properties:
                          p25:
                            type: number
                          p50:
                            type: number
                          p75:
                            type: number
                          p90:
                            type: number
                        additionalProperties: {}
                      parameters:
                        type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - dooh
                          sov_percentage:
                            type: number
                          loop_duration_seconds:
                            type: number
                          min_plays_per_hour:
                            type: number
                          venue_package:
                            type: string
                          duration_hours:
                            type: number
                          daypart:
                            type: string
                          estimated_impressions:
                            type: number
                        required:
                          - type
                        additionalProperties: {}
                      min_spend_per_package:
                        type: number
                      price_breakdown:
                        type: object
                        properties:
                          list_price:
                            type: number
                          adjustments:
                            type: array
                            items:
                              type: object
                              additionalProperties: {}
                        required:
                          - list_price
                          - adjustments
                        additionalProperties: {}
                      eligible_adjustments:
                        type: array
                        items:
                          anyOf:
                            - type: string
                              enum:
                                - fee
                            - type: string
                              enum:
                                - discount
                            - type: string
                              enum:
                                - commission
                            - type: string
                              enum:
                                - settlement
                    required:
                      - pricing_option_id
                      - pricing_model
                      - currency
                    additionalProperties: {}
                  - type: object
                    properties:
                      pricing_option_id:
                        type: string
                      pricing_model:
                        type: string
                        enum:
                          - time
                      currency:
                        type: string
                      fixed_price:
                        type: number
                      floor_price:
                        type: number
                      price_guidance:
                        type: object
                        properties:
                          p25:
                            type: number
                          p50:
                            type: number
                          p75:
                            type: number
                          p90:
                            type: number
                        additionalProperties: {}
                      parameters:
                        type: object
                        properties:
                          time_unit:
                            anyOf:
                              - type: string
                                enum:
                                  - hour
                              - type: string
                                enum:
                                  - day
                              - type: string
                                enum:
                                  - week
                              - type: string
                                enum:
                                  - month
                          min_duration:
                            type: number
                          max_duration:
                            type: number
                        required:
                          - time_unit
                        additionalProperties: {}
                      min_spend_per_package:
                        type: number
                      price_breakdown:
                        type: object
                        properties:
                          list_price:
                            type: number
                          adjustments:
                            type: array
                            items:
                              type: object
                              additionalProperties: {}
                        required:
                          - list_price
                          - adjustments
                        additionalProperties: {}
                      eligible_adjustments:
                        type: array
                        items:
                          anyOf:
                            - type: string
                              enum:
                                - fee
                            - type: string
                              enum:
                                - discount
                            - type: string
                              enum:
                                - commission
                            - type: string
                              enum:
                                - settlement
                    required:
                      - pricing_option_id
                      - pricing_model
                      - currency
                      - parameters
                    additionalProperties: {}
            required:
              - seatId
              - visibility
        isLive:
          default: false
          type: boolean
      required:
        - signalId
        - name
        - keyType
    UpdateSignalFromAgentInput:
      type: object
      properties:
        signalId:
          type: string
          minLength: 1
          maxLength: 255
          pattern: ^[\w\-:.]+$
        name:
          type: string
          minLength: 1
          maxLength: 255
        description:
          type: string
          maxLength: 5000
        isLive:
          type: boolean
        addAccess:
          type: array
          items:
            type: object
            properties:
              seatId:
                description: Scope3 Seat ID that has access
                type: integer
                format: int64
              visibility:
                description: PUBLIC or PROPRIETARY
                type: string
                enum:
                  - PUBLIC
                  - PROPRIETARY
              price:
                anyOf:
                  - type: object
                    properties:
                      pricing_option_id:
                        type: string
                      pricing_model:
                        type: string
                        enum:
                          - cpm
                      currency:
                        type: string
                      fixed_price:
                        type: number
                      floor_price:
                        type: number
                      max_bid:
                        type: boolean
                      price_guidance:
                        type: object
                        properties:
                          p25:
                            type: number
                          p50:
                            type: number
                          p75:
                            type: number
                          p90:
                            type: number
                        additionalProperties: {}
                      min_spend_per_package:
                        type: number
                      price_breakdown:
                        type: object
                        properties:
                          list_price:
                            type: number
                          adjustments:
                            type: array
                            items:
                              type: object
                              additionalProperties: {}
                        required:
                          - list_price
                          - adjustments
                        additionalProperties: {}
                      eligible_adjustments:
                        type: array
                        items:
                          anyOf:
                            - type: string
                              enum:
                                - fee
                            - type: string
                              enum:
                                - discount
                            - type: string
                              enum:
                                - commission
                            - type: string
                              enum:
                                - settlement
                    required:
                      - pricing_option_id
                      - pricing_model
                      - currency
                    additionalProperties: {}
                  - type: object
                    properties:
                      pricing_option_id:
                        type: string
                      pricing_model:
                        type: string
                        enum:
                          - vcpm
                      currency:
                        type: string
                      fixed_price:
                        type: number
                      floor_price:
                        type: number
                      max_bid:
                        type: boolean
                      price_guidance:
                        type: object
                        properties:
                          p25:
                            type: number
                          p50:
                            type: number
                          p75:
                            type: number
                          p90:
                            type: number
                        additionalProperties: {}
                      min_spend_per_package:
                        type: number
                      price_breakdown:
                        type: object
                        properties:
                          list_price:
                            type: number
                          adjustments:
                            type: array
                            items:
                              type: object
                              additionalProperties: {}
                        required:
                          - list_price
                          - adjustments
                        additionalProperties: {}
                      eligible_adjustments:
                        type: array
                        items:
                          anyOf:
                            - type: string
                              enum:
                                - fee
                            - type: string
                              enum:
                                - discount
                            - type: string
                              enum:
                                - commission
                            - type: string
                              enum:
                                - settlement
                    required:
                      - pricing_option_id
                      - pricing_model
                      - currency
                    additionalProperties: {}
                  - type: object
                    properties:
                      pricing_option_id:
                        type: string
                      pricing_model:
                        type: string
                        enum:
                          - cpc
                      currency:
                        type: string
                      fixed_price:
                        type: number
                      floor_price:
                        type: number
                      max_bid:
                        type: boolean
                      price_guidance:
                        type: object
                        properties:
                          p25:
                            type: number
                          p50:
                            type: number
                          p75:
                            type: number
                          p90:
                            type: number
                        additionalProperties: {}
                      min_spend_per_package:
                        type: number
                      price_breakdown:
                        type: object
                        properties:
                          list_price:
                            type: number
                          adjustments:
                            type: array
                            items:
                              type: object
                              additionalProperties: {}
                        required:
                          - list_price
                          - adjustments
                        additionalProperties: {}
                      eligible_adjustments:
                        type: array
                        items:
                          anyOf:
                            - type: string
                              enum:
                                - fee
                            - type: string
                              enum:
                                - discount
                            - type: string
                              enum:
                                - commission
                            - type: string
                              enum:
                                - settlement
                    required:
                      - pricing_option_id
                      - pricing_model
                      - currency
                    additionalProperties: {}
                  - type: object
                    properties:
                      pricing_option_id:
                        type: string
                      pricing_model:
                        type: string
                        enum:
                          - cpcv
                      currency:
                        type: string
                      fixed_price:
                        type: number
                      floor_price:
                        type: number
                      max_bid:
                        type: boolean
                      price_guidance:
                        type: object
                        properties:
                          p25:
                            type: number
                          p50:
                            type: number
                          p75:
                            type: number
                          p90:
                            type: number
                        additionalProperties: {}
                      min_spend_per_package:
                        type: number
                      price_breakdown:
                        type: object
                        properties:
                          list_price:
                            type: number
                          adjustments:
                            type: array
                            items:
                              type: object
                              additionalProperties: {}
                        required:
                          - list_price
                          - adjustments
                        additionalProperties: {}
                      eligible_adjustments:
                        type: array
                        items:
                          anyOf:
                            - type: string
                              enum:
                                - fee
                            - type: string
                              enum:
                                - discount
                            - type: string
                              enum:
                                - commission
                            - type: string
                              enum:
                                - settlement
                    required:
                      - pricing_option_id
                      - pricing_model
                      - currency
                    additionalProperties: {}
                  - type: object
                    properties:
                      pricing_option_id:
                        type: string
                      pricing_model:
                        type: string
                        enum:
                          - cpv
                      currency:
                        type: string
                      fixed_price:
                        type: number
                      floor_price:
                        type: number
                      max_bid:
                        type: boolean
                      price_guidance:
                        type: object
                        properties:
                          p25:
                            type: number
                          p50:
                            type: number
                          p75:
                            type: number
                          p90:
                            type: number
                        additionalProperties: {}
                      parameters:
                        type: object
                        properties:
                          view_threshold:
                            anyOf:
                              - type: number
                              - type: object
                                properties:
                                  duration_seconds:
                                    type: number
                                required:
                                  - duration_seconds
                                additionalProperties: {}
                        required:
                          - view_threshold
                        additionalProperties: {}
                      min_spend_per_package:
                        type: number
                      price_breakdown:
                        type: object
                        properties:
                          list_price:
                            type: number
                          adjustments:
                            type: array
                            items:
                              type: object
                              additionalProperties: {}
                        required:
                          - list_price
                          - adjustments
                        additionalProperties: {}
                      eligible_adjustments:
                        type: array
                        items:
                          anyOf:
                            - type: string
                              enum:
                                - fee
                            - type: string
                              enum:
                                - discount
                            - type: string
                              enum:
                                - commission
                            - type: string
                              enum:
                                - settlement
                    required:
                      - pricing_option_id
                      - pricing_model
                      - currency
                      - parameters
                    additionalProperties: {}
                  - type: object
                    properties:
                      pricing_option_id:
                        type: string
                      pricing_model:
                        type: string
                        enum:
                          - cpp
                      currency:
                        type: string
                      fixed_price:
                        type: number
                      floor_price:
                        type: number
                      price_guidance:
                        type: object
                        properties:
                          p25:
                            type: number
                          p50:
                            type: number
                          p75:
                            type: number
                          p90:
                            type: number
                        additionalProperties: {}
                      parameters:
                        type: object
                        properties:
                          demographic_system:
                            anyOf:
                              - type: string
                                enum:
                                  - nielsen
                              - type: string
                                enum:
                                  - barb
                              - type: string
                                enum:
                                  - agf
                              - type: string
                                enum:
                                  - oztam
                              - type: string
                                enum:
                                  - mediametrie
                              - type: string
                                enum:
                                  - custom
                          demographic:
                            type: string
                          min_points:
                            type: number
                        required:
                          - demographic
                        additionalProperties: {}
                      min_spend_per_package:
                        type: number
                      price_breakdown:
                        type: object
                        properties:
                          list_price:
                            type: number
                          adjustments:
                            type: array
                            items:
                              type: object
                              additionalProperties: {}
                        required:
                          - list_price
                          - adjustments
                        additionalProperties: {}
                      eligible_adjustments:
                        type: array
                        items:
                          anyOf:
                            - type: string
                              enum:
                                - fee
                            - type: string
                              enum:
                                - discount
                            - type: string
                              enum:
                                - commission
                            - type: string
                              enum:
                                - settlement
                    required:
                      - pricing_option_id
                      - pricing_model
                      - currency
                      - parameters
                    additionalProperties: {}
                  - type: object
                    properties:
                      pricing_option_id:
                        type: string
                      pricing_model:
                        type: string
                        enum:
                          - cpa
                      event_type:
                        anyOf:
                          - type: string
                            enum:
                              - page_view
                          - type: string
                            enum:
                              - view_content
                          - type: string
                            enum:
                              - select_content
                          - type: string
                            enum:
                              - select_item
                          - type: string
                            enum:
                              - search
                          - type: string
                            enum:
                              - share
                          - type: string
                            enum:
                              - add_to_cart
                          - type: string
                            enum:
                              - remove_from_cart
                          - type: string
                            enum:
                              - viewed_cart
                          - type: string
                            enum:
                              - add_to_wishlist
                          - type: string
                            enum:
                              - initiate_checkout
                          - type: string
                            enum:
                              - add_payment_info
                          - type: string
                            enum:
                              - purchase
                          - type: string
                            enum:
                              - refund
                          - type: string
                            enum:
                              - lead
                          - type: string
                            enum:
                              - qualify_lead
                          - type: string
                            enum:
                              - close_convert_lead
                          - type: string
                            enum:
                              - disqualify_lead
                          - type: string
                            enum:
                              - complete_registration
                          - type: string
                            enum:
                              - subscribe
                          - type: string
                            enum:
                              - start_trial
                          - type: string
                            enum:
                              - app_install
                          - type: string
                            enum:
                              - app_launch
                          - type: string
                            enum:
                              - contact
                          - type: string
                            enum:
                              - schedule
                          - type: string
                            enum:
                              - donate
                          - type: string
                            enum:
                              - submit_application
                          - type: string
                            enum:
                              - custom
                      custom_event_name:
                        type: string
                      event_source_id:
                        type: string
                      currency:
                        type: string
                      fixed_price:
                        type: number
                      min_spend_per_package:
                        type: number
                      price_breakdown:
                        type: object
                        properties:
                          list_price:
                            type: number
                          adjustments:
                            type: array
                            items:
                              type: object
                              additionalProperties: {}
                        required:
                          - list_price
                          - adjustments
                        additionalProperties: {}
                      eligible_adjustments:
                        type: array
                        items:
                          anyOf:
                            - type: string
                              enum:
                                - fee
                            - type: string
                              enum:
                                - discount
                            - type: string
                              enum:
                                - commission
                            - type: string
                              enum:
                                - settlement
                    required:
                      - pricing_option_id
                      - pricing_model
                      - event_type
                      - currency
                      - fixed_price
                    additionalProperties: {}
                  - type: object
                    properties:
                      pricing_option_id:
                        type: string
                      pricing_model:
                        type: string
                        enum:
                          - flat_rate
                      currency:
                        type: string
                      fixed_price:
                        type: number
                      floor_price:
                        type: number
                      price_guidance:
                        type: object
                        properties:
                          p25:
                            type: number
                          p50:
                            type: number
                          p75:
                            type: number
                          p90:
                            type: number
                        additionalProperties: {}
                      parameters:
                        type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - dooh
                          sov_percentage:
                            type: number
                          loop_duration_seconds:
                            type: number
                          min_plays_per_hour:
                            type: number
                          venue_package:
                            type: string
                          duration_hours:
                            type: number
                          daypart:
                            type: string
                          estimated_impressions:
                            type: number
                        required:
                          - type
                        additionalProperties: {}
                      min_spend_per_package:
                        type: number
                      price_breakdown:
                        type: object
                        properties:
                          list_price:
                            type: number
                          adjustments:
                            type: array
                            items:
                              type: object
                              additionalProperties: {}
                        required:
                          - list_price
                          - adjustments
                        additionalProperties: {}
                      eligible_adjustments:
                        type: array
                        items:
                          anyOf:
                            - type: string
                              enum:
                                - fee
                            - type: string
                              enum:
                                - discount
                            - type: string
                              enum:
                                - commission
                            - type: string
                              enum:
                                - settlement
                    required:
                      - pricing_option_id
                      - pricing_model
                      - currency
                    additionalProperties: {}
                  - type: object
                    properties:
                      pricing_option_id:
                        type: string
                      pricing_model:
                        type: string
                        enum:
                          - time
                      currency:
                        type: string
                      fixed_price:
                        type: number
                      floor_price:
                        type: number
                      price_guidance:
                        type: object
                        properties:
                          p25:
                            type: number
                          p50:
                            type: number
                          p75:
                            type: number
                          p90:
                            type: number
                        additionalProperties: {}
                      parameters:
                        type: object
                        properties:
                          time_unit:
                            anyOf:
                              - type: string
                                enum:
                                  - hour
                              - type: string
                                enum:
                                  - day
                              - type: string
                                enum:
                                  - week
                              - type: string
                                enum:
                                  - month
                          min_duration:
                            type: number
                          max_duration:
                            type: number
                        required:
                          - time_unit
                        additionalProperties: {}
                      min_spend_per_package:
                        type: number
                      price_breakdown:
                        type: object
                        properties:
                          list_price:
                            type: number
                          adjustments:
                            type: array
                            items:
                              type: object
                              additionalProperties: {}
                        required:
                          - list_price
                          - adjustments
                        additionalProperties: {}
                      eligible_adjustments:
                        type: array
                        items:
                          anyOf:
                            - type: string
                              enum:
                                - fee
                            - type: string
                              enum:
                                - discount
                            - type: string
                              enum:
                                - commission
                            - type: string
                              enum:
                                - settlement
                    required:
                      - pricing_option_id
                      - pricing_model
                      - currency
                      - parameters
                    additionalProperties: {}
            required:
              - seatId
              - visibility
        updateAccess:
          type: array
          items:
            type: object
            properties:
              accessId:
                type: integer
                exclusiveMinimum: true
                maximum: 9007199254740991
              price:
                anyOf:
                  - type: object
                    properties:
                      pricing_option_id:
                        type: string
                      pricing_model:
                        type: string
                        enum:
                          - cpm
                      currency:
                        type: string
                      fixed_price:
                        type: number
                      floor_price:
                        type: number
                      max_bid:
                        type: boolean
                      price_guidance:
                        type: object
                        properties:
                          p25:
                            type: number
                          p50:
                            type: number
                          p75:
                            type: number
                          p90:
                            type: number
                        additionalProperties: {}
                      min_spend_per_package:
                        type: number
                      price_breakdown:
                        type: object
                        properties:
                          list_price:
                            type: number
                          adjustments:
                            type: array
                            items:
                              type: object
                              additionalProperties: {}
                        required:
                          - list_price
                          - adjustments
                        additionalProperties: {}
                      eligible_adjustments:
                        type: array
                        items:
                          anyOf:
                            - type: string
                              enum:
                                - fee
                            - type: string
                              enum:
                                - discount
                            - type: string
                              enum:
                                - commission
                            - type: string
                              enum:
                                - settlement
                    required:
                      - pricing_option_id
                      - pricing_model
                      - currency
                    additionalProperties: {}
                  - type: object
                    properties:
                      pricing_option_id:
                        type: string
                      pricing_model:
                        type: string
                        enum:
                          - vcpm
                      currency:
                        type: string
                      fixed_price:
                        type: number
                      floor_price:
                        type: number
                      max_bid:
                        type: boolean
                      price_guidance:
                        type: object
                        properties:
                          p25:
                            type: number
                          p50:
                            type: number
                          p75:
                            type: number
                          p90:
                            type: number
                        additionalProperties: {}
                      min_spend_per_package:
                        type: number
                      price_breakdown:
                        type: object
                        properties:
                          list_price:
                            type: number
                          adjustments:
                            type: array
                            items:
                              type: object
                              additionalProperties: {}
                        required:
                          - list_price
                          - adjustments
                        additionalProperties: {}
                      eligible_adjustments:
                        type: array
                        items:
                          anyOf:
                            - type: string
                              enum:
                                - fee
                            - type: string
                              enum:
                                - discount
                            - type: string
                              enum:
                                - commission
                            - type: string
                              enum:
                                - settlement
                    required:
                      - pricing_option_id
                      - pricing_model
                      - currency
                    additionalProperties: {}
                  - type: object
                    properties:
                      pricing_option_id:
                        type: string
                      pricing_model:
                        type: string
                        enum:
                          - cpc
                      currency:
                        type: string
                      fixed_price:
                        type: number
                      floor_price:
                        type: number
                      max_bid:
                        type: boolean
                      price_guidance:
                        type: object
                        properties:
                          p25:
                            type: number
                          p50:
                            type: number
                          p75:
                            type: number
                          p90:
                            type: number
                        additionalProperties: {}
                      min_spend_per_package:
                        type: number
                      price_breakdown:
                        type: object
                        properties:
                          list_price:
                            type: number
                          adjustments:
                            type: array
                            items:
                              type: object
                              additionalProperties: {}
                        required:
                          - list_price
                          - adjustments
                        additionalProperties: {}
                      eligible_adjustments:
                        type: array
                        items:
                          anyOf:
                            - type: string
                              enum:
                                - fee
                            - type: string
                              enum:
                                - discount
                            - type: string
                              enum:
                                - commission
                            - type: string
                              enum:
                                - settlement
                    required:
                      - pricing_option_id
                      - pricing_model
                      - currency
                    additionalProperties: {}
                  - type: object
                    properties:
                      pricing_option_id:
                        type: string
                      pricing_model:
                        type: string
                        enum:
                          - cpcv
                      currency:
                        type: string
                      fixed_price:
                        type: number
                      floor_price:
                        type: number
                      max_bid:
                        type: boolean
                      price_guidance:
                        type: object
                        properties:
                          p25:
                            type: number
                          p50:
                            type: number
                          p75:
                            type: number
                          p90:
                            type: number
                        additionalProperties: {}
                      min_spend_per_package:
                        type: number
                      price_breakdown:
                        type: object
                        properties:
                          list_price:
                            type: number
                          adjustments:
                            type: array
                            items:
                              type: object
                              additionalProperties: {}
                        required:
                          - list_price
                          - adjustments
                        additionalProperties: {}
                      eligible_adjustments:
                        type: array
                        items:
                          anyOf:
                            - type: string
                              enum:
                                - fee
                            - type: string
                              enum:
                                - discount
                            - type: string
                              enum:
                                - commission
                            - type: string
                              enum:
                                - settlement
                    required:
                      - pricing_option_id
                      - pricing_model
                      - currency
                    additionalProperties: {}
                  - type: object
                    properties:
                      pricing_option_id:
                        type: string
                      pricing_model:
                        type: string
                        enum:
                          - cpv
                      currency:
                        type: string
                      fixed_price:
                        type: number
                      floor_price:
                        type: number
                      max_bid:
                        type: boolean
                      price_guidance:
                        type: object
                        properties:
                          p25:
                            type: number
                          p50:
                            type: number
                          p75:
                            type: number
                          p90:
                            type: number
                        additionalProperties: {}
                      parameters:
                        type: object
                        properties:
                          view_threshold:
                            anyOf:
                              - type: number
                              - type: object
                                properties:
                                  duration_seconds:
                                    type: number
                                required:
                                  - duration_seconds
                                additionalProperties: {}
                        required:
                          - view_threshold
                        additionalProperties: {}
                      min_spend_per_package:
                        type: number
                      price_breakdown:
                        type: object
                        properties:
                          list_price:
                            type: number
                          adjustments:
                            type: array
                            items:
                              type: object
                              additionalProperties: {}
                        required:
                          - list_price
                          - adjustments
                        additionalProperties: {}
                      eligible_adjustments:
                        type: array
                        items:
                          anyOf:
                            - type: string
                              enum:
                                - fee
                            - type: string
                              enum:
                                - discount
                            - type: string
                              enum:
                                - commission
                            - type: string
                              enum:
                                - settlement
                    required:
                      - pricing_option_id
                      - pricing_model
                      - currency
                      - parameters
                    additionalProperties: {}
                  - type: object
                    properties:
                      pricing_option_id:
                        type: string
                      pricing_model:
                        type: string
                        enum:
                          - cpp
                      currency:
                        type: string
                      fixed_price:
                        type: number
                      floor_price:
                        type: number
                      price_guidance:
                        type: object
                        properties:
                          p25:
                            type: number
                          p50:
                            type: number
                          p75:
                            type: number
                          p90:
                            type: number
                        additionalProperties: {}
                      parameters:
                        type: object
                        properties:
                          demographic_system:
                            anyOf:
                              - type: string
                                enum:
                                  - nielsen
                              - type: string
                                enum:
                                  - barb
                              - type: string
                                enum:
                                  - agf
                              - type: string
                                enum:
                                  - oztam
                              - type: string
                                enum:
                                  - mediametrie
                              - type: string
                                enum:
                                  - custom
                          demographic:
                            type: string
                          min_points:
                            type: number
                        required:
                          - demographic
                        additionalProperties: {}
                      min_spend_per_package:
                        type: number
                      price_breakdown:
                        type: object
                        properties:
                          list_price:
                            type: number
                          adjustments:
                            type: array
                            items:
                              type: object
                              additionalProperties: {}
                        required:
                          - list_price
                          - adjustments
                        additionalProperties: {}
                      eligible_adjustments:
                        type: array
                        items:
                          anyOf:
                            - type: string
                              enum:
                                - fee
                            - type: string
                              enum:
                                - discount
                            - type: string
                              enum:
                                - commission
                            - type: string
                              enum:
                                - settlement
                    required:
                      - pricing_option_id
                      - pricing_model
                      - currency
                      - parameters
                    additionalProperties: {}
                  - type: object
                    properties:
                      pricing_option_id:
                        type: string
                      pricing_model:
                        type: string
                        enum:
                          - cpa
                      event_type:
                        anyOf:
                          - type: string
                            enum:
                              - page_view
                          - type: string
                            enum:
                              - view_content
                          - type: string
                            enum:
                              - select_content
                          - type: string
                            enum:
                              - select_item
                          - type: string
                            enum:
                              - search
                          - type: string
                            enum:
                              - share
                          - type: string
                            enum:
                              - add_to_cart
                          - type: string
                            enum:
                              - remove_from_cart
                          - type: string
                            enum:
                              - viewed_cart
                          - type: string
                            enum:
                              - add_to_wishlist
                          - type: string
                            enum:
                              - initiate_checkout
                          - type: string
                            enum:
                              - add_payment_info
                          - type: string
                            enum:
                              - purchase
                          - type: string
                            enum:
                              - refund
                          - type: string
                            enum:
                              - lead
                          - type: string
                            enum:
                              - qualify_lead
                          - type: string
                            enum:
                              - close_convert_lead
                          - type: string
                            enum:
                              - disqualify_lead
                          - type: string
                            enum:
                              - complete_registration
                          - type: string
                            enum:
                              - subscribe
                          - type: string
                            enum:
                              - start_trial
                          - type: string
                            enum:
                              - app_install
                          - type: string
                            enum:
                              - app_launch
                          - type: string
                            enum:
                              - contact
                          - type: string
                            enum:
                              - schedule
                          - type: string
                            enum:
                              - donate
                          - type: string
                            enum:
                              - submit_application
                          - type: string
                            enum:
                              - custom
                      custom_event_name:
                        type: string
                      event_source_id:
                        type: string
                      currency:
                        type: string
                      fixed_price:
                        type: number
                      min_spend_per_package:
                        type: number
                      price_breakdown:
                        type: object
                        properties:
                          list_price:
                            type: number
                          adjustments:
                            type: array
                            items:
                              type: object
                              additionalProperties: {}
                        required:
                          - list_price
                          - adjustments
                        additionalProperties: {}
                      eligible_adjustments:
                        type: array
                        items:
                          anyOf:
                            - type: string
                              enum:
                                - fee
                            - type: string
                              enum:
                                - discount
                            - type: string
                              enum:
                                - commission
                            - type: string
                              enum:
                                - settlement
                    required:
                      - pricing_option_id
                      - pricing_model
                      - event_type
                      - currency
                      - fixed_price
                    additionalProperties: {}
                  - type: object
                    properties:
                      pricing_option_id:
                        type: string
                      pricing_model:
                        type: string
                        enum:
                          - flat_rate
                      currency:
                        type: string
                      fixed_price:
                        type: number
                      floor_price:
                        type: number
                      price_guidance:
                        type: object
                        properties:
                          p25:
                            type: number
                          p50:
                            type: number
                          p75:
                            type: number
                          p90:
                            type: number
                        additionalProperties: {}
                      parameters:
                        type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - dooh
                          sov_percentage:
                            type: number
                          loop_duration_seconds:
                            type: number
                          min_plays_per_hour:
                            type: number
                          venue_package:
                            type: string
                          duration_hours:
                            type: number
                          daypart:
                            type: string
                          estimated_impressions:
                            type: number
                        required:
                          - type
                        additionalProperties: {}
                      min_spend_per_package:
                        type: number
                      price_breakdown:
                        type: object
                        properties:
                          list_price:
                            type: number
                          adjustments:
                            type: array
                            items:
                              type: object
                              additionalProperties: {}
                        required:
                          - list_price
                          - adjustments
                        additionalProperties: {}
                      eligible_adjustments:
                        type: array
                        items:
                          anyOf:
                            - type: string
                              enum:
                                - fee
                            - type: string
                              enum:
                                - discount
                            - type: string
                              enum:
                                - commission
                            - type: string
                              enum:
                                - settlement
                    required:
                      - pricing_option_id
                      - pricing_model
                      - currency
                    additionalProperties: {}
                  - type: object
                    properties:
                      pricing_option_id:
                        type: string
                      pricing_model:
                        type: string
                        enum:
                          - time
                      currency:
                        type: string
                      fixed_price:
                        type: number
                      floor_price:
                        type: number
                      price_guidance:
                        type: object
                        properties:
                          p25:
                            type: number
                          p50:
                            type: number
                          p75:
                            type: number
                          p90:
                            type: number
                        additionalProperties: {}
                      parameters:
                        type: object
                        properties:
                          time_unit:
                            anyOf:
                              - type: string
                                enum:
                                  - hour
                              - type: string
                                enum:
                                  - day
                              - type: string
                                enum:
                                  - week
                              - type: string
                                enum:
                                  - month
                          min_duration:
                            type: number
                          max_duration:
                            type: number
                        required:
                          - time_unit
                        additionalProperties: {}
                      min_spend_per_package:
                        type: number
                      price_breakdown:
                        type: object
                        properties:
                          list_price:
                            type: number
                          adjustments:
                            type: array
                            items:
                              type: object
                              additionalProperties: {}
                        required:
                          - list_price
                          - adjustments
                        additionalProperties: {}
                      eligible_adjustments:
                        type: array
                        items:
                          anyOf:
                            - type: string
                              enum:
                                - fee
                            - type: string
                              enum:
                                - discount
                            - type: string
                              enum:
                                - commission
                            - type: string
                              enum:
                                - settlement
                    required:
                      - pricing_option_id
                      - pricing_model
                      - currency
                      - parameters
                    additionalProperties: {}
              visibility:
                type: string
                enum:
                  - PUBLIC
                  - PROPRIETARY
            required:
              - accessId
        archiveAccess:
          type: array
          items:
            type: integer
            exclusiveMinimum: true
            maximum: 9007199254740991
      required:
        - signalId
    DiscoverSignalsInput:
      type: object
      properties:
        agentId:
          type: string
          maxLength: 255
        signalSpec:
          type: string
          maxLength: 5000
        signalIds:
          maxItems: 100
          type: array
          items:
            type: string
            maxLength: 255
        limit:
          default: 20
          type: integer
          exclusiveMinimum: true
          maximum: 100
        offset:
          default: 0
          type: integer
          minimum: 0
          maximum: 9007199254740991
    CurrentAccountResponse:
      description: Current customer account context
      type: object
      properties:
        id:
          description: Customer ID
          example: 100
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        company:
          description: Company name
          example: Acme Inc
          type: string
        name:
          description: Display name
          example: Acme
          type: string
        role:
          description: User role on this customer
          example: ADMIN
          type: string
      required:
        - id
        - company
        - name
      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
    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
    ListCustomerAccountsResponse:
      description: List of customer accounts for the authenticated user
      type: object
      properties:
        accounts:
          description: Customer accounts the user has access to
          type: array
          items:
            $ref: '#/components/schemas/OrgAccountSummary'
      required:
        - accounts
      additionalProperties: false
    OrgAccountSummary:
      description: Summary of a customer organization account
      type: object
      properties:
        id:
          description: Customer ID
          example: 100
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        company:
          description: Company name
          example: Acme Inc
          type: string
        name:
          description: Display name
          example: Acme
          type: string
        role:
          description: User role on this customer (MEMBER, ADMIN, SUPER_ADMIN)
          example: ADMIN
          type: string
      required:
        - id
        - company
        - name
      additionalProperties: false
    CreateChildAccountResponse:
      description: Full user context scoped to the new child customer
      type: object
      properties:
        user:
          description: User profile data
          type: object
          properties: {}
          additionalProperties: {}
        customer:
          description: Customer context for the newly created child
          type: object
          properties: {}
          additionalProperties: {}
        customers:
          description: All accessible customer accounts
          type: array
          items:
            type: object
            properties: {}
            additionalProperties: {}
        showPsaBox:
          description: Whether to show the ToS acceptance dialog
          type: boolean
        tosBlockedReason:
          description: >-
            When set, the user cannot accept ToS themselves and must contact an organization admin. Only emitted when
            showPsaBox is also true.
          type: string
          enum:
            - PARENT_MUST_ACCEPT_TOS
        hasContract:
          description: Whether the customer has an active contract
          type: boolean
        latestPsaVersion:
          description: Latest PSA version identifier
          type: string
        convertedFromStandalone:
          description: True if the request triggered a standalone-to-parent conversion
          type: boolean
      required:
        - user
        - customer
        - customers
        - showPsaBox
        - hasContract
        - latestPsaVersion
        - convertedFromStandalone
      additionalProperties: false
    UpdateCustomerDomainResponse:
      description: Updated customer domain
      type: object
      properties:
        id:
          description: Customer ID
          example: 200
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        customerDomain:
          description: Registered organization domain on the customer
          example: nike.com
          nullable: true
          type: string
      required:
        - id
        - customerDomain
      additionalProperties: false
    StorefrontResponse:
      description: Storefront configuration response
      type: object
      properties:
        platformId:
          description: Public-facing slug
          example: acme-media
          type: string
        name:
          description: Display name
          example: Acme Media
          type: string
        publisherDomain:
          description: Publisher domain for Stripe Connect
          example: acme.com
          nullable: true
          type: string
        operatorDomain:
          description: Canonical operator domain
          example: scope3.com
          nullable: true
          type: string
        brandName:
          description: Brand name from AAO registry
          example: Scope3
          nullable: true
          type: string
        logoUrl:
          description: Logo URL from brand.json
          nullable: true
          type: string
        operatorDomainVerified:
          description: Whether the operator domain has been verified (email match or manual KYC)
          type: boolean
        plan:
          description: Storefront plan tier
          type: string
          enum:
            - basic
        status:
          description: Storefront lifecycle status
          type: string
          enum:
            - PENDING
            - ACTIVE
            - DISABLED
        createdAt:
          description: Creation timestamp (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: Last update timestamp (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:
        - platformId
        - name
        - publisherDomain
        - operatorDomain
        - brandName
        - logoUrl
        - operatorDomainVerified
        - plan
        - status
        - createdAt
        - updatedAt
      additionalProperties: false
    StorefrontReadinessResponse:
      description: Storefront readiness assessment
      type: object
      properties:
        platformId:
          type: string
        status:
          description: Overall storefront readiness status
          type: string
          enum:
            - ready
            - blocked
        checks:
          type: array
          items:
            $ref: '#/components/schemas/ReadinessCheck'
      required:
        - platformId
        - status
        - checks
      additionalProperties: false
    ReadinessCheck:
      description: Individual readiness check result
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type: string
        category:
          type: string
        status:
          description: >-
            Status of a readiness check. `optional` is reserved for checks that are explicitly skipped (e.g. billing in
            non-production environments) — they are not required to go live.
          type: string
          enum:
            - complete
            - partial
            - missing
            - optional
        isBlocker:
          type: boolean
        method:
          type: string
        details:
          type: string
        compliance:
          description: Per-agent compliance results (present on agent_connectivity checks)
          type: array
          items:
            $ref: '#/components/schemas/AgentComplianceResult'
      required:
        - id
        - name
        - description
        - category
        - status
        - isBlocker
      additionalProperties: false
    AgentComplianceResult:
      description: Compliance assessment for a single agent
      type: object
      properties:
        agentId:
          type: string
        agentUrl:
          type: string
        passed:
          type: boolean
        tracks:
          type: array
          items:
            $ref: '#/components/schemas/ComplianceTrackResult'
        summary:
          description: One-line compliance headline
          type: string
        observations:
          description: Advisory observations from compliance checks
          type: array
          items:
            type: object
            properties:
              category:
                type: string
              severity:
                type: string
                enum:
                  - info
                  - suggestion
                  - warning
                  - error
              message:
                type: string
            required:
              - category
              - severity
              - message
            additionalProperties: false
        durationMs:
          type: number
        error:
          type: string
      required:
        - agentId
        - agentUrl
        - passed
        - tracks
        - summary
        - observations
        - durationMs
      additionalProperties: false
    ComplianceTrackResult:
      description: Result for a single compliance track
      type: object
      properties:
        track:
          description: Compliance track name
          type: string
        status:
          description: >-
            Track assessment result. 'silent' means the track was wired but observation-based assertions saw zero
            resources — distinct from 'pass' (verified) and 'skip' (didn't run).
          type: string
          enum:
            - pass
            - fail
            - skip
            - partial
            - silent
        label:
          description: Human-readable track label
          type: string
        durationMs:
          description: Track duration in ms
          type: number
        failureReason:
          description: Why this track failed or partially passed
          type: string
      required:
        - track
        - status
        - label
        - durationMs
      additionalProperties: false
    ResolveBrandResponse:
      type: object
      properties:
        resolved:
          description: Whether a brand manifest was found
          type: boolean
        domain:
          type: string
        brandName:
          type: string
        logoUrl:
          nullable: true
          type: string
        manifestUrl:
          type: string
        manifest:
          type: object
          additionalProperties: {}
        registryEntry:
          nullable: true
          type: object
          additionalProperties: {}
        authorizedOperators:
          type: array
          items:
            type: object
            additionalProperties: {}
        houseBrand:
          type: boolean
        warning:
          type: string
        error:
          type: string
        builderUrl:
          description: Set when resolved is false -- URL where the caller can register a manifest
          type: string
      required:
        - resolved
        - domain
      additionalProperties: false
    DiscoverAgentsResponse:
      type: object
      properties:
        domain:
          type: string
        operator:
          description: Agents registered to this operator domain
          type: object
          properties:
            domain:
              type: string
            member:
              nullable: true
              type: object
              properties:
                slug:
                  type: string
                display_name:
                  type: string
              required:
                - slug
                - display_name
              additionalProperties: false
            agents:
              type: array
              items:
                type: object
                properties:
                  url:
                    type: string
                  name:
                    type: string
                  type:
                    type: string
                  compliance:
                    type: object
                    additionalProperties: {}
                  storyboards:
                    type: array
                    items: {}
                  authorized_by:
                    type: array
                    items: {}
                required:
                  - url
                  - name
                  - type
                additionalProperties: false
          required:
            - domain
            - member
            - agents
          additionalProperties: false
        publisher:
          description: Publisher record from the AAO registry or the adagents.json fallback
          type: object
          properties:
            domain:
              type: string
            member:
              nullable: true
              type: object
              properties:
                slug:
                  type: string
                display_name:
                  type: string
              required:
                - slug
                - display_name
              additionalProperties: false
            adagents_valid:
              nullable: true
              type: boolean
            properties:
              type: array
              items:
                type: object
                additionalProperties: {}
            authorized_agents:
              type: array
              items:
                type: object
                additionalProperties: {}
          required:
            - domain
            - member
            - adagents_valid
            - properties
            - authorized_agents
          additionalProperties: false
      required:
        - domain
        - operator
        - publisher
      additionalProperties: false
    InventorySourceResponse:
      description: Inventory source response
      type: object
      properties:
        sourceId:
          description: Unique identifier within the storefront
          type: string
        name:
          description: Display name
          type: string
        executionType:
          description: Execution type
          type: string
        executionConfig:
          description: Execution configuration
          nullable: true
          type: object
          additionalProperties: {}
        status:
          description: Source lifecycle status
          type: string
          enum:
            - pending
            - active
            - disabled
        agentId:
          description: Linked agent ID (when executionType is agent)
          nullable: true
          type: string
        type:
          description: Agent type
          nullable: true
          type: string
          enum:
            - SALES
            - SIGNAL
            - CREATIVE
            - OUTCOME
        endpointUrl:
          description: Agent endpoint URL
          nullable: true
          type: string
        protocol:
          description: Agent protocol
          nullable: true
          type: string
          enum:
            - MCP
            - A2A
        description:
          description: Agent description
          nullable: true
          type: string
        authenticationType:
          description: Agent authentication type
          nullable: true
          type: string
          enum:
            - API_KEY
            - NO_AUTH
            - JWT
            - OAUTH
        authConfigured:
          description: Whether the agent has authentication configured
          type: boolean
        oauth:
          description: OAuth authorization info (for OAUTH agents)
          type: object
          properties:
            authorizationUrl:
              type: string
            agentId:
              type: string
            agentName:
              type: string
          required:
            - authorizationUrl
            - agentId
            - agentName
          additionalProperties: false
        createdAt:
          description: Creation timestamp (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: Last update timestamp (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:
        - sourceId
        - name
        - executionType
        - executionConfig
        - status
        - agentId
        - createdAt
        - updatedAt
      additionalProperties: false
    ProvisionConnectResponse:
      type: object
      properties:
        stripeConnectedAccountId:
          type: string
        onboardingUrl:
          type: string
      required:
        - stripeConnectedAccountId
        - onboardingUrl
      additionalProperties: false
    GetBillingResponse:
      type: object
      properties:
        billing:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/StorefrontBillingResponse'
      required:
        - billing
      additionalProperties: false
    StorefrontBillingResponse:
      description: >-
        Storefront billing configuration. Storefront billing setup is optional. Connect Stripe so Scope3 can handle
        consolidated payment processing — otherwise your sales agent will be limited to external agreements only and you
        will bill the buyer directly.
      type: object
      properties:
        stripeConnectedAccountId:
          description: Stripe Express account ID
          nullable: true
          type: string
        onboardingStatus:
          description: Stripe Connect onboarding status
          type: string
          enum:
            - pending
            - complete
            - restricted
        platformFeePercent:
          description: Platform fee percentage
          nullable: true
          type: number
        fees:
          description: Additional fees
          nullable: true
          type: array
          items:
            $ref: '#/components/schemas/BillingFeeOutput'
        currency:
          description: ISO 4217 currency code
          nullable: true
          type: string
        defaultNetDays:
          description: Payment terms in days
          nullable: true
          type: number
        inherited:
          description: Whether this billing config is inherited from a parent customer
          type: boolean
        createdAt:
          description: Creation timestamp (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: Last update timestamp (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:
        - stripeConnectedAccountId
        - onboardingStatus
        - platformFeePercent
        - fees
        - currency
        - defaultNetDays
        - inherited
        - createdAt
        - updatedAt
      additionalProperties: false
    UpdateStorefrontBillingResponse:
      type: object
      properties:
        billing:
          $ref: '#/components/schemas/StorefrontBillingResponse'
      required:
        - billing
      additionalProperties: false
    ConnectAccountStatusResponse:
      description: Stripe Connect account status and balance
      type: object
      properties:
        accountId:
          type: string
        chargesEnabled:
          type: boolean
        payoutsEnabled:
          type: boolean
        requirements:
          type: object
          properties:
            currentlyDue:
              type: array
              items:
                type: string
            eventuallyDue:
              type: array
              items:
                type: string
          required:
            - currentlyDue
            - eventuallyDue
          additionalProperties: false
        balance:
          type: object
          properties:
            available:
              type: array
              items:
                type: object
                properties:
                  amount:
                    type: number
                  currency:
                    type: string
                required:
                  - amount
                  - currency
                additionalProperties: false
            pending:
              type: array
              items:
                type: object
                properties:
                  amount:
                    type: number
                  currency:
                    type: string
                required:
                  - amount
                  - currency
                additionalProperties: false
          required:
            - available
            - pending
          additionalProperties: false
      required:
        - accountId
        - chargesEnabled
        - payoutsEnabled
        - requirements
        - balance
      additionalProperties: false
    TransactionsResponse:
      description: Paginated balance transactions
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/BalanceTransactionItem'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
      required:
        - data
        - meta
      additionalProperties: false
    BalanceTransactionItem:
      description: A Stripe balance transaction
      type: object
      properties:
        id:
          type: string
        type:
          type: string
        amount:
          type: number
        currency:
          type: string
        created:
          type: number
        description:
          nullable: true
          type: string
        status:
          type: string
        fee:
          type: number
        net:
          type: number
      required:
        - id
        - type
        - amount
        - currency
        - created
        - description
        - status
        - fee
        - net
      additionalProperties: false
    PaginationMeta:
      description: Cursor-based pagination metadata
      type: object
      properties:
        count:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        limit:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        hasMore:
          type: boolean
        cursor:
          nullable: true
          type: string
      required:
        - count
        - limit
        - hasMore
        - cursor
      additionalProperties: false
    PayoutsResponse:
      description: Paginated payouts
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/PayoutItem'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
      required:
        - data
        - meta
      additionalProperties: false
    PayoutItem:
      description: A Stripe payout
      type: object
      properties:
        id:
          type: string
        amount:
          type: number
        currency:
          type: string
        created:
          type: number
        arrivalDate:
          type: number
        status:
          type: string
        method:
          type: string
        description:
          nullable: true
          type: string
      required:
        - id
        - amount
        - currency
        - created
        - arrivalDate
        - status
        - method
        - description
      additionalProperties: false
    InvoicesResponse:
      description: Paginated invoices
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceItem'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
      required:
        - data
        - meta
      additionalProperties: false
    InvoiceItem:
      description: A Stripe invoice summary
      type: object
      properties:
        id:
          type: string
        number:
          nullable: true
          type: string
        status:
          nullable: true
          type: string
        currency:
          type: string
        amountDue:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        amountPaid:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        amountRemaining:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        total:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        created:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        dueDate:
          nullable: true
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        periodStart:
          nullable: true
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        periodEnd:
          nullable: true
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        hostedInvoiceUrl:
          nullable: true
          type: string
        invoicePdf:
          nullable: true
          type: string
        description:
          nullable: true
          type: string
        customerEmail:
          nullable: true
          type: string
        customerName:
          nullable: true
          type: string
      required:
        - id
        - number
        - status
        - currency
        - amountDue
        - amountPaid
        - amountRemaining
        - total
        - created
        - dueDate
        - periodStart
        - periodEnd
        - hostedInvoiceUrl
        - invoicePdf
        - description
        - customerEmail
        - customerName
      additionalProperties: false
    PendingInvoiceItemsResponse:
      description: Paginated pending invoice items
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/PendingInvoiceItem'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
      required:
        - data
        - meta
      additionalProperties: false
    PendingInvoiceItem:
      description: A Stripe invoice line item not yet attached to an invoice
      type: object
      properties:
        id:
          type: string
        description:
          nullable: true
          type: string
        currency:
          type: string
        amount:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        quantity:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        unitAmount:
          nullable: true
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        date:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        period:
          type: object
          properties:
            start:
              type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            end:
              type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
          required:
            - start
            - end
          additionalProperties: false
        proration:
          type: boolean
        customerId:
          nullable: true
          type: string
      required:
        - id
        - description
        - currency
        - amount
        - quantity
        - unitAmount
        - date
        - period
        - proration
        - customerId
      additionalProperties: false
    OnboardingUrlResponse:
      type: object
      properties:
        onboardingUrl:
          type: string
      required:
        - onboardingUrl
      additionalProperties: false
    BillingAccountsResponse:
      description: Billing status for managed accounts of a parent customer
      type: object
      properties:
        accounts:
          type: array
          items:
            $ref: '#/components/schemas/ChildBillingStatus'
      required:
        - accounts
      additionalProperties: false
    ChildBillingStatus:
      description: Billing status for a child customer
      type: object
      properties:
        customerId:
          description: Child customer ID
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        name:
          description: Child customer name
          type: string
        company:
          description: Child company name
          nullable: true
          type: string
        inherited:
          description: Whether billing is inherited from parent (true) or has own account (false)
          type: boolean
        onboardingStatus:
          description: Onboarding status of the child account, or "none" if inherited
          type: string
          enum:
            - pending
            - complete
            - restricted
            - none
      required:
        - customerId
        - name
        - company
        - inherited
        - onboardingStatus
      additionalProperties: false
    AgentList:
      description: Paginated list of agent summaries
      type: object
      properties:
        items:
          description: Partner agents projected to the summary shape. Use the detail endpoint for the full resource.
          type: array
          items:
            $ref: '#/components/schemas/AgentSummary'
        total:
          description: Total number of agents matching the query
          type: integer
          minimum: 0
          maximum: 9007199254740991
        hasMore:
          description: Whether there are more items available beyond this page. When true, use nextOffset to fetch the next page.
          type: boolean
        nextOffset:
          description: >-
            The offset to use for the next page of results. Pass this as the offset parameter to get the next page. Null
            when there are no more results.
          nullable: true
          type: integer
          minimum: 0
          maximum: 9007199254740991
      required:
        - items
        - total
        - hasMore
        - nextOffset
      additionalProperties: false
    AgentSummary:
      description: Compact partner-agent view returned by list endpoints. Use the detail endpoint for the full resource.
      type: object
      properties:
        agentId:
          description: Unique agent identifier
          type: string
        type:
          description: >-
            Agent type: SALES = sales/media agent, SIGNAL = signal/data agent, CREATIVE = creative agent, OUTCOME =
            outcome measurement agent
          type: string
          enum:
            - SALES
            - SIGNAL
            - CREATIVE
            - OUTCOME
        name:
          description: Agent display name
          type: string
        protocol:
          description: Agent protocol
          type: string
          enum:
            - MCP
            - A2A
        status:
          description: Agent status. COMING_SOON is returned for PENDING agents not owned by the caller.
          type: string
          enum:
            - PENDING
            - ACTIVE
            - DISABLED
            - COMING_SOON
        relationship:
          description: 'Relationship: SELF = owned by you, MARKETPLACE = all other marketplace agents'
          type: string
          enum:
            - SELF
            - MARKETPLACE
        requiresOperatorAuth:
          description: >-
            Whether the agent requires the operator to provide credentials. When true, buyers must register their own
            credentials.
          type: boolean
        requiresAccount:
          description: True when agent supports per-account registration and caller has no accounts
          type: boolean
        authConfigured:
          description: Whether the agent has working authentication configured
          type: boolean
        createdAt:
          description: When the agent 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))$
        customerAccountCount:
          description: >-
            Number of caller-owned accounts on this agent. Replaces the embedded `customerAccounts[]` array on summary
            rows.
          example: 2
          type: integer
          minimum: 0
          maximum: 9007199254740991
      required:
        - agentId
        - type
        - name
        - protocol
        - status
        - relationship
        - requiresOperatorAuth
        - requiresAccount
        - authConfigured
        - createdAt
        - customerAccountCount
      additionalProperties: false
    AgentDetail:
      description: Detailed agent info including account data
      type: object
      properties:
        agentId:
          description: Unique agent identifier
          type: string
        type:
          description: >-
            Agent type: SALES = sales/media agent, SIGNAL = signal/data agent, CREATIVE = creative agent, OUTCOME =
            outcome measurement agent
          type: string
          enum:
            - SALES
            - SIGNAL
            - CREATIVE
            - OUTCOME
        name:
          description: Agent display name
          type: string
        description:
          description: Agent description
          nullable: true
          type: string
        endpointUrl:
          description: Agent endpoint URL (empty string for COMING_SOON agents)
          type: string
        protocol:
          description: Agent protocol
          type: string
          enum:
            - MCP
            - A2A
        authenticationType:
          description: Authentication method
          type: string
          enum:
            - API_KEY
            - NO_AUTH
            - JWT
            - OAUTH
        requiresOperatorAuth:
          description: >-
            Whether the agent requires the operator to provide credentials. When true, buyers must register their own
            credentials.
          type: boolean
        billingOptions:
          description: >-
            Billing arrangement options supported by this partner, from its ADCP capabilities. Null when capabilities
            have not been fetched yet.
          nullable: true
          type: object
          properties:
            default:
              nullable: true
              type: string
            supported:
              type: array
              items:
                type: string
          required:
            - default
            - supported
          additionalProperties: false
        status:
          description: Agent status. COMING_SOON is returned for PENDING agents not owned by the caller.
          type: string
          enum:
            - PENDING
            - ACTIVE
            - DISABLED
            - COMING_SOON
        relationship:
          description: 'Relationship: SELF = owned by you, MARKETPLACE = all other marketplace agents'
          type: string
          enum:
            - SELF
            - MARKETPLACE
        customerId:
          description: Owner customer ID
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        reportingType:
          description: Reporting type
          nullable: true
          type: string
          enum:
            - WEBHOOK
            - BUCKET
            - POLLING
        reportingPollingCadence:
          description: Polling cadence (when reportingType is POLLING)
          nullable: true
          type: string
          enum:
            - DAILY
            - MONTHLY
        customerAccountCount:
          description: Number of customer accounts for this agent
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        hasCustomerAccount:
          description: Whether the caller has an account for this agent
          type: boolean
        hasMasterAccount:
          description: Whether a marketplace account exists for this agent
          type: boolean
        customerAccount:
          description: Caller's account details, if any
          type: object
          properties:
            id:
              description: Account ID
              type: string
            accountIdentifier:
              description: Unique account identifier
              type: string
            status:
              description: Account status
              type: string
            registeredBy:
              description: Who registered this account
              nullable: true
              type: string
            createdAt:
              description: When the account 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))$
          required:
            - id
            - accountIdentifier
            - status
            - registeredBy
            - createdAt
          additionalProperties: false
        createdAt:
          description: When the agent 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))$
        updatedAt:
          description: When the agent 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))$
        oauth:
          description: Present for owner PENDING OAUTH agents without tokens
          nullable: true
          allOf:
            - $ref: '#/components/schemas/OAuthInfo'
      required:
        - agentId
        - type
        - name
        - endpointUrl
        - protocol
        - authenticationType
        - requiresOperatorAuth
        - status
        - relationship
        - customerId
        - customerAccountCount
        - hasCustomerAccount
        - hasMasterAccount
        - createdAt
        - updatedAt
      additionalProperties: false
    OAuthInfo:
      description: OAuth authorization info
      type: object
      properties:
        authorizationUrl:
          description: URL the user must visit to authorize
          type: string
          format: uri
        agentId:
          description: Agent identifier
          type: string
        agentName:
          description: Agent display name
          type: string
      required:
        - authorizationUrl
        - agentId
        - agentName
      additionalProperties: false
    OAuthAuthorizeResponse:
      description: Response containing OAuth authorization URL
      type: object
      properties:
        authorizationUrl:
          description: URL to redirect the user to for OAuth authorization
          type: string
          format: uri
        agentId:
          description: Agent identifier
          type: string
        agentName:
          description: Agent display name
          type: string
      required:
        - authorizationUrl
        - agentId
        - agentName
      additionalProperties: false
    ListStorefrontActivityResponse:
      description: Paginated list of storefront activity audit logs
      type: object
      properties:
        logs:
          type: array
          items:
            $ref: '#/components/schemas/StorefrontAuditLog'
        total:
          type: integer
          minimum: 0
          maximum: 9007199254740991
      required:
        - logs
        - total
      additionalProperties: false
    StorefrontAuditLog:
      description: Audit log row surfaced to the storefront activity feed
      type: object
      properties:
        id:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        timestamp:
          type: string
        createdAt:
          type: string
        action:
          type: string
        resourceType:
          type: string
        resourceId:
          nullable: true
          type: string
        resourceName:
          nullable: true
          type: string
        userId:
          nullable: true
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        userEmail:
          nullable: true
          type: string
        userName:
          nullable: true
          type: string
        serviceTokenId:
          nullable: true
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        serviceTokenName:
          nullable: true
          type: string
        parameters:
          nullable: true
          type: object
          additionalProperties: {}
        changes:
          nullable: true
          type: object
          additionalProperties: {}
        description:
          type: string
      required:
        - id
        - timestamp
        - createdAt
        - action
        - resourceType
        - resourceId
        - resourceName
        - userId
        - userEmail
        - userName
        - serviceTokenId
        - serviceTokenName
        - parameters
        - changes
        - description
      additionalProperties: false
    AccountSessionResponse:
      type: object
      properties:
        clientSecret:
          type: string
      required:
        - clientSecret
      additionalProperties: false
    BillingFeeOutput:
      description: An additional billing fee entry
      type: object
      properties:
        name:
          description: Fee label
          type: string
          minLength: 1
          maxLength: 255
        description:
          description: Fee description
          type: string
          maxLength: 500
        feePercent:
          description: Fee percentage (0–100)
          type: number
          minimum: 0
          maximum: 100
      required:
        - name
        - feePercent
      additionalProperties: false
    McpInitializeRequest:
      type: object
      properties:
        jsonrpc:
          type: string
          enum:
            - '2.0'
          description: JSON-RPC version
        id:
          oneOf:
            - type: string
            - type: number
          description: Request ID
        method:
          type: string
          enum:
            - initialize
          description: Method name
        params:
          type: object
          properties:
            protocolVersion:
              type: string
              description: MCP protocol version
              example: '2024-11-05'
            capabilities:
              type: object
              description: Client capabilities
            clientInfo:
              type: object
              properties:
                name:
                  type: string
                  description: Client name
                version:
                  type: string
                  description: Client version
              required:
                - name
                - version
          required:
            - protocolVersion
            - capabilities
            - clientInfo
      required:
        - jsonrpc
        - id
        - method
        - params
    McpInitializeResponse:
      type: object
      properties:
        jsonrpc:
          type: string
          enum:
            - '2.0'
        id:
          oneOf:
            - type: string
            - type: number
        result:
          type: object
          properties:
            protocolVersion:
              type: string
            capabilities:
              type: object
            serverInfo:
              type: object
              properties:
                name:
                  type: string
                version:
                  type: string
    McpApiCallRequest:
      type: object
      properties:
        jsonrpc:
          type: string
          enum:
            - '2.0'
          description: JSON-RPC version
        id:
          oneOf:
            - type: string
            - type: number
          description: Request ID
        method:
          type: string
          enum:
            - tools/call
          description: Method name
        params:
          type: object
          properties:
            name:
              type: string
              enum:
                - api_call
              description: Tool name
            arguments:
              type: object
              properties:
                method:
                  type: string
                  enum:
                    - GET
                    - POST
                    - PUT
                    - DELETE
                  description: HTTP method
                path:
                  type: string
                  description: API path (e.g., "/inventory-sources")
                body:
                  type: object
                  description: Request body for POST/PUT
                query:
                  type: object
                  description: Query parameters
              required:
                - method
                - path
          required:
            - name
            - arguments
      required:
        - jsonrpc
        - id
        - method
        - params
    McpAskCapabilityRequest:
      type: object
      properties:
        jsonrpc:
          type: string
          enum:
            - '2.0'
          description: JSON-RPC version
        id:
          oneOf:
            - type: string
            - type: number
          description: Request ID
        method:
          type: string
          enum:
            - tools/call
          description: Method name
        params:
          type: object
          properties:
            name:
              type: string
              enum:
                - ask_about_capability
              description: Tool name
            arguments:
              type: object
              properties:
                question:
                  type: string
                  description: Natural language question about API capabilities
              required:
                - question
          required:
            - name
            - arguments
      required:
        - jsonrpc
        - id
        - method
        - params
    McpToolResponse:
      type: object
      properties:
        jsonrpc:
          type: string
          enum:
            - '2.0'
        id:
          oneOf:
            - type: string
            - type: number
        result:
          type: object
          properties:
            content:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                      - text
                  text:
                    type: string
                    description: Response content
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key or access token
