> ## Documentation Index
> Fetch the complete documentation index at: https://docs.interactivelayers.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Save Draft



## OpenAPI

````yaml reference/openapi.json PUT /v1/adrouter/routers/{router_id}/draft
openapi: 3.1.0
info:
  title: Interactive Layers Context API
  description: >

    Interactive Layers reads what is said on your channel and turns it into ad
    signals.


    * **Signal mode** (`mode=signal`): your program is untouched; every break of
    the output manifest carries an
      `EXT-X-DATERANGE CLASS="com.interactivelayers.signal"` with the matching campaign ids, keywords, your external ids
      (e.g. SpringServe) and a brand-safety status, so your ad server can target the break.
    * **Live SSAI** (`mode=ssai`): supported live pipelines can stitch ads and
    in-band supers.

    * **Legacy URL scan**: enriched VOD manifest with signals; `ssai` adds
    supers. No ad segment replacement.

    * **Asset analysis and operations**: saved moments, campaign previews and
    airing/playback notifications.
      GAM profiles use client-side VAST/IMA. SpringServe profiles produce revision-bound SSAI signals;
      the OTTera transport remains pending external validation. Campaign synchronization is read-only.

    Authenticate with the `X-API-Key` header (keys are issued by Interactive
    Layers). Errors are `{"detail": "..."}`.

    Events can be polled (`GET /v1/events`) or pushed to a signed webhook (`PUT
    /v1/keys/me/webhook`).

    Content catalog and batch operations use their own scoped server key in
    `Authorization: Bearer …`.
  version: '1.2'
servers:
  - url: https://console.interactivelayers.com
security: []
tags:
  - name: AdRouter
    description: Advertising routing, simulation, delivery and reports per project.
  - name: Advertising providers
    description: >-
      GAM and SpringServe connections, profiles and read-only campaign
      synchronization.
  - name: Keys
    description: The calling API key and its signed webhook.
  - name: Campaigns
    description: >-
      Signal campaigns: categories, keywords and the external ids written into
      break markers when the context matches.
  - name: Sources
    description: >-
      Realtime sources (HLS or YouTube) in `signal` or `ssai` mode and their
      enriched output manifest.
  - name: Events
    description: 'Events of your sources: opportunities, break signals, brand-safety holds.'
  - name: Assets
    description: >-
      Create, list, retrieve, rename and delete private video assets. Use
      asset_id as the input to a VOD analysis.
  - name: VOD operations
    description: >-
      Evaluate campaigns from saved asset analyses, schedule airings and send
      playback notifications.
  - name: VOD
    description: >-
      Ahead-of-time VOD scans, faster than real time: transcript, opportunities,
      brand-safety holds, a targeting signal per break and the enriched VOD
      manifest.
paths:
  /v1/adrouter/routers/{router_id}/draft:
    put:
      tags:
        - AdRouter
      summary: Save Draft
      operationId: save_draft_v1_adrouter_routers__router_id__draft_put
      parameters:
        - name: router_id
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 80
            pattern: ^[A-Za-z0-9_-]+$
            title: Router Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DraftIn'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '401':
          description: Missing, invalid or revoked API key
        '403':
          description: The API key lacks the required scope
        '409':
          description: Revision conflict
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    DraftIn:
      properties:
        expected_revision:
          type: integer
          minimum: 0
          title: Expected Revision
        policy:
          $ref: '#/components/schemas/Policy'
      additionalProperties: false
      type: object
      required:
        - expected_revision
        - policy
      title: DraftIn
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Policy:
      properties:
        name:
          type: string
          maxLength: 100
          minLength: 1
          pattern: \S
          title: Name
        inherit_project:
          type: boolean
          title: Inherit Project
          default: false
        modes:
          items:
            type: string
            enum:
              - client_vast
              - sdk
              - ssai
              - ssai_signals
          type: array
          maxItems: 4
          minItems: 1
          title: Modes
        formats:
          items:
            type: string
            enum:
              - linear
              - nonlinear
              - companion
              - super
              - l_shape
              - squeeze_back
              - interactive
          type: array
          maxItems: 7
          minItems: 1
          title: Formats
        channel_id:
          anyOf:
            - type: string
              maxLength: 80
              minLength: 1
              pattern: ^[A-Za-z0-9_-]+$
            - type: 'null'
          title: Channel Id
        timezone:
          type: string
          maxLength: 64
          title: Timezone
          default: UTC
        origin_inventory_id:
          anyOf:
            - type: string
              maxLength: 220
            - type: 'null'
          title: Origin Inventory Id
        strict_content:
          type: boolean
          title: Strict Content
          default: false
        allow_unclassified:
          type: boolean
          title: Allow Unclassified
          default: false
        require_consent:
          type: boolean
          title: Require Consent
          default: false
        strict_duration:
          type: boolean
          title: Strict Duration
          default: false
        deadline_ms:
          type: integer
          maximum: 10000
          minimum: 100
          title: Deadline Ms
          default: 1500
        max_attempts:
          type: integer
          maximum: 5
          minimum: 1
          title: Max Attempts
          default: 1
        currency:
          type: string
          pattern: ^[A-Z]{3}$
          title: Currency
          default: USD
        direct_priority:
          type: string
          enum:
            - first
            - behind
            - free
          title: Direct Priority
          default: free
        pacing_fallback:
          type: string
          enum:
            - first
            - free
          title: Pacing Fallback
          default: first
        pacing_margin_pct:
          type: number
          maximum: 100
          minimum: 0
          title: Pacing Margin Pct
          default: 0
        destinations:
          items:
            $ref: '#/components/schemas/Destination'
          type: array
          maxItems: 40
          title: Destinations
        levels:
          items:
            $ref: '#/components/schemas/Level'
          type: array
          maxItems: 20
          title: Levels
        rules:
          items:
            $ref: '#/components/schemas/Rule'
          type: array
          maxItems: 50
          title: Rules
        publisher_blocks:
          items:
            $ref: '#/components/schemas/ConditionGroup'
          type: array
          maxItems: 30
          title: Publisher Blocks
        default_level_ids:
          anyOf:
            - items:
                type: string
                maxLength: 80
                minLength: 1
                pattern: ^[A-Za-z0-9_-]+$
              type: array
              maxItems: 20
            - type: 'null'
          title: Default Level Ids
        fallback_level_id:
          anyOf:
            - type: string
              maxLength: 80
              minLength: 1
              pattern: ^[A-Za-z0-9_-]+$
            - type: 'null'
          title: Fallback Level Id
      additionalProperties: false
      type: object
      required:
        - name
      title: Policy
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    Destination:
      properties:
        id:
          type: string
          maxLength: 80
          minLength: 1
          pattern: ^[A-Za-z0-9_-]+$
          title: Id
        provider:
          type: string
          enum:
            - gam
            - iadserver
            - springserve
          title: Provider
        connection_id:
          type: string
          maxLength: 80
          minLength: 1
          pattern: ^[A-Za-z0-9_-]+$
          title: Connection Id
        ad_profile_id:
          type: string
          maxLength: 80
          minLength: 1
          pattern: ^[A-Za-z0-9_-]+$
          title: Ad Profile Id
        inventory_id:
          type: string
          maxLength: 160
          minLength: 1
          pattern: ^[A-Za-z0-9_./:-]+$
          title: Inventory Id
        modes:
          items:
            type: string
            enum:
              - client_vast
              - sdk
              - ssai
              - ssai_signals
          type: array
          maxItems: 4
          minItems: 1
          title: Modes
        formats:
          items:
            type: string
            enum:
              - linear
              - nonlinear
              - companion
              - super
              - l_shape
              - squeeze_back
              - interactive
          type: array
          maxItems: 7
          minItems: 1
          title: Formats
        commercial:
          type: string
          enum:
            - direct
            - open
          title: Commercial
          default: open
        allow_unclassified:
          type: boolean
          title: Allow Unclassified
          default: false
        reciprocal_exclusion:
          type: boolean
          title: Reciprocal Exclusion
          default: false
        enforces_duration:
          type: boolean
          title: Enforces Duration
          default: false
        enforces_brand_safety:
          type: boolean
          title: Enforces Brand Safety
          default: false
        linear_fallback:
          type: boolean
          title: Linear Fallback
          default: false
        vast_certified:
          type: boolean
          title: Vast Certified
          default: false
        vast_url:
          anyOf:
            - type: string
              maxLength: 2048
            - type: 'null'
          title: Vast Url
        vast_hosts:
          items:
            type: string
          type: array
          maxItems: 12
          title: Vast Hosts
        openrtb:
          anyOf:
            - $ref: '#/components/schemas/Bidder'
            - type: string
              maxLength: 80
              minLength: 1
              pattern: ^[A-Za-z0-9_-]+$
            - type: 'null'
          title: Openrtb
        commitment_line_id:
          anyOf:
            - type: string
              maxLength: 160
              minLength: 1
              pattern: ^[A-Za-z0-9_./:-]+$
            - type: 'null'
          title: Commitment Line Id
        initial_cpm_micros:
          anyOf:
            - type: integer
              maximum: 1000000000
              minimum: 0
            - type: 'null'
          title: Initial Cpm Micros
        initial_fill_bps:
          anyOf:
            - type: integer
              maximum: 10000
              minimum: 0
            - type: 'null'
          title: Initial Fill Bps
        currency:
          anyOf:
            - type: string
              pattern: ^[A-Z]{3}$
            - type: 'null'
          title: Currency
      additionalProperties: false
      type: object
      required:
        - id
        - provider
        - connection_id
        - ad_profile_id
        - inventory_id
      title: Destination
    Level:
      properties:
        id:
          type: string
          maxLength: 80
          minLength: 1
          pattern: ^[A-Za-z0-9_-]+$
          title: Id
        strategy:
          type: string
          enum:
            - fixed
            - weighted
            - revenue
            - auction
          title: Strategy
        destinations:
          items:
            type: string
            maxLength: 80
            minLength: 1
            pattern: ^[A-Za-z0-9_-]+$
          type: array
          maxItems: 40
          minItems: 1
          title: Destinations
        weights:
          patternProperties:
            ^[A-Za-z0-9_-]+$:
              type: integer
          propertyNames:
            maxLength: 80
            minLength: 1
          type: object
          maxProperties: 40
          title: Weights
        optimize:
          type: boolean
          title: Optimize
          default: false
        control_pct:
          type: integer
          maximum: 99
          minimum: 0
          title: Control Pct
          default: 0
      additionalProperties: false
      type: object
      required:
        - id
        - strategy
        - destinations
      title: Level
    Rule:
      properties:
        id:
          type: string
          maxLength: 80
          minLength: 1
          pattern: ^[A-Za-z0-9_-]+$
          title: Id
        match:
          type: string
          enum:
            - all
            - any
          title: Match
          default: all
        conditions:
          items:
            $ref: '#/components/schemas/Condition'
          type: array
          maxItems: 16
          title: Conditions
        level_ids:
          items:
            type: string
            maxLength: 80
            minLength: 1
            pattern: ^[A-Za-z0-9_-]+$
          type: array
          maxItems: 16
          minItems: 1
          title: Level Ids
      additionalProperties: false
      type: object
      required:
        - id
        - level_ids
      title: Rule
    ConditionGroup:
      properties:
        id:
          type: string
          maxLength: 80
          minLength: 1
          pattern: ^[A-Za-z0-9_-]+$
          title: Id
        match:
          type: string
          enum:
            - all
            - any
          title: Match
          default: all
        conditions:
          items:
            $ref: '#/components/schemas/Condition'
          type: array
          maxItems: 16
          title: Conditions
      additionalProperties: false
      type: object
      required:
        - id
      title: ConditionGroup
    Bidder:
      properties:
        bidder_id:
          type: string
          maxLength: 80
          minLength: 1
          pattern: ^[A-Za-z0-9_-]+$
          title: Bidder Id
        imp_tag:
          anyOf:
            - type: string
              maxLength: 80
              minLength: 1
              pattern: ^[A-Za-z0-9_-]+$
            - type: 'null'
          title: Imp Tag
        floor_micros:
          type: integer
          maximum: 1000000000
          minimum: 0
          title: Floor Micros
          default: 0
        fee_bps:
          type: integer
          maximum: 10000
          minimum: 0
          title: Fee Bps
          default: 0
      additionalProperties: false
      type: object
      required:
        - bidder_id
      title: Bidder
    Condition:
      properties:
        field:
          type: string
          enum:
            - iab_category
            - topic
            - confidence
            - channel_id
            - position
            - duration_seconds
            - local_hour
            - mode
            - platform
            - language
            - country
            - format
            - cue_seconds
          title: Field
        operator:
          type: string
          enum:
            - eq
            - ne
            - in
            - between
            - gt
            - gte
            - lt
            - lte
          title: Operator
        value:
          anyOf:
            - type: string
            - type: number
            - items:
                anyOf:
                  - type: string
                  - type: number
              type: array
          title: Value
      additionalProperties: false
      type: object
      required:
        - field
        - operator
        - value
      title: Condition
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      description: >-
        Partner API key (`ck_…`). Created by Interactive Layers; shown only
        once.
      in: header
      name: X-API-Key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.