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

# Publish As Super Node

> Publish a workflow version as a reusable super node by defining its interface.

If version_number is omitted, resolves to the workflow's active_version_number.
Creates (or updates) a SuperNodesModel document for this (workflow, version) pair.
The workflow itself is not modified — the encapsulated workflow remains unaware of
its super node status.

Captures a fully-hydrated snapshot of the workflow at publish time and stores it
alongside the interface so the GET endpoint can serve it without a DB re-fetch.

Validates that:
- All NODE_CONFIG_FIELD and EDGE_CONFIG_FIELD references exist in the workflow version
- All WORKFLOW_CONFIG_FIELD paths have a valid top-level WorkflowConfig key



## OpenAPI

````yaml https://api-prod.interactly.ai/api-docs/workflows/api.json put /workflows/v1/workflows/{workflow_id}/super-node-interface
openapi: 3.1.0
info:
  title: Interactly API
  description: API for building interactly.ai services
  version: 1.1.0
  contact:
    name: Interactly
    url: https://interactly.ai
    email: developers@interactly.ai
servers:
  - url: https://api-prod.interactly.ai
    description: API Server
security: []
paths:
  /workflows/v1/workflows/{workflow_id}/super-node-interface:
    put:
      tags:
        - Super Nodes
      summary: Publish As Super Node
      description: >-
        Publish a workflow version as a reusable super node by defining its
        interface.


        If version_number is omitted, resolves to the workflow's
        active_version_number.

        Creates (or updates) a SuperNodesModel document for this (workflow,
        version) pair.

        The workflow itself is not modified — the encapsulated workflow remains
        unaware of

        its super node status.


        Captures a fully-hydrated snapshot of the workflow at publish time and
        stores it

        alongside the interface so the GET endpoint can serve it without a DB
        re-fetch.


        Validates that:

        - All NODE_CONFIG_FIELD and EDGE_CONFIG_FIELD references exist in the
        workflow version

        - All WORKFLOW_CONFIG_FIELD paths have a valid top-level WorkflowConfig
        key
      operationId: >-
        workflow_service_publish_as_super_node_v1_workflows__workflow_id__super_node_interface_put
      parameters:
        - name: workflow_id
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/PydanticObjectId'
        - name: version_number
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Version Number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublishSuperNodeRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublishSuperNodeResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - bearer: []
components:
  schemas:
    PydanticObjectId:
      type: string
      maxLength: 24
      minLength: 24
      pattern: ^[0-9a-f]{24}$
      example: 5eb7cf5a86d9755df3a6c593
    PublishSuperNodeRequest:
      properties:
        interface:
          $ref: '#/components/schemas/SuperNodeInterface'
          description: Input field definitions and their mappings into the sub-workflow
      type: object
      required:
        - interface
      title: PublishSuperNodeRequest
      description: Payload for publishing a workflow as a super node.
    PublishSuperNodeResponse:
      properties:
        workflow_id:
          type: string
          title: Workflow Id
        workflow_version_number:
          type: integer
          title: Workflow Version Number
        message:
          type: string
          title: Message
        num_input_fields:
          type: integer
          title: Num Input Fields
      type: object
      required:
        - workflow_id
        - workflow_version_number
        - message
        - num_input_fields
      title: PublishSuperNodeResponse
      description: Response after publishing a workflow as a super node.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SuperNodeInterface:
      properties:
        input_fields:
          items:
            $ref: '#/components/schemas/SuperNodeInputField'
          type: array
          title: Input Fields
          description: List of input fields exposed by this super node to calling workflows
      type: object
      title: SuperNodeInterface
      description: >-
        The interface definition of a super node.


        Describes what configuration fields callers must provide when
        instantiating this super node,

        and how those field values map into the encapsulated sub-workflow's
        nodes, edges, and dynamic variables.
    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
    SuperNodeInputField:
      properties:
        name:
          type: string
          title: Field Name
          description: >-
            Unique key for this field within the super node interface. Callers
            set field_values[name] = value.
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Human-readable description of what this field controls
        required:
          type: boolean
          title: Required
          description: >-
            Whether this field must be provided by callers. If False and not
            provided, default_value is used.
          default: true
        default_value:
          anyOf:
            - {}
            - type: 'null'
          title: Default Value
          description: >-
            Default value used when required=False and the caller does not
            provide a value
        json_schema:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: JSON Schema
          description: >-
            JSON Schema for this field, used by the UI to render and validate
            the config form
        mappings:
          items:
            $ref: '#/components/schemas/SuperNodeFieldMapping'
          type: array
          title: Mappings
          description: >-
            Where and how to inject the provided value into the sub-workflow
            (node/edge config fields or dynamic variables)
        value_type:
          $ref: '#/components/schemas/SuperNodeInputFieldValueType'
          title: Value Type
          description: >-
            Declared shape of the leaf value. Used at publish time to reject
            malformed field_values. Default 'any' preserves legacy behaviour (no
            shape check).
          default: any
        enum_values:
          anyOf:
            - items: {}
              type: array
            - type: 'null'
          title: Enum Values
          description: >-
            Required when value_type='enum'. Caller's value must be in this
            list.
        min_value:
          anyOf:
            - type: number
            - type: 'null'
          title: Min Value
          description: Inclusive lower bound for integer/number value types.
        max_value:
          anyOf:
            - type: number
            - type: 'null'
          title: Max Value
          description: Inclusive upper bound for integer/number value types.
        min_length:
          anyOf:
            - type: integer
            - type: 'null'
          title: Min Length
          description: Inclusive lower length for string/array value types.
        max_length:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max Length
          description: Inclusive upper length for string/array value types.
      type: object
      required:
        - name
      title: SuperNodeInputField
      description: >-
        Defines one configuration field that callers must provide when
        instantiating this super node.
    SuperNodeFieldMapping:
      properties:
        target_type:
          $ref: '#/components/schemas/SuperNodeFieldMappingTargetType'
          title: Target Type
          description: >-
            Where to inject the field value: into a node's config field
            ('node_config_field'), an edge's config field ('edge_config_field'),
            the sub-workflow's WorkflowConfig ('workflow_config_field'), a
            dynamic variable ('dynamic_variable'), or a runtime variable
            ('runtime_variable').
        target_node_or_edge_logical_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Target Node or Edge Logical ID
          description: >-
            Logical ID of the node or edge in the sub-workflow whose config
            field should be set. Required when target_type is
            'node_config_field' or 'edge_config_field'.
        target_field_path:
          anyOf:
            - type: string
            - type: 'null'
          title: Target Field Path
          description: >-
            Dot-separated path to the target field. For 'node_config_field':
            path within the target node's config, e.g.
            'main_response_config.prompt'. For 'edge_config_field': path within
            the target edge's config, e.g. 'condition.condition_string'. For
            'workflow_config_field': path within the sub-workflow's
            WorkflowConfig, e.g. 'default_prompt_prefix'. Required when
            target_type is 'node_config_field', 'edge_config_field', or
            'workflow_config_field'.
        target_variable_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Target Variable Name
          description: >-
            Name of the variable to set. For 'dynamic_variable': sets a {{var}}
            dynamic variable, e.g. 'patient_name'. For 'runtime_variable':
            injects into the sub-workflow's runtime_variables dict. Required
            when target_type is 'dynamic_variable' or 'runtime_variable'.
      type: object
      required:
        - target_type
      title: SuperNodeFieldMapping
      description: Defines where a super node input field value should be injected.
    SuperNodeInputFieldValueType:
      type: string
      enum:
        - string
        - integer
        - number
        - boolean
        - object
        - array
        - enum
        - any
      title: SuperNodeInputFieldValueType
      description: >-
        Declared shape of a super node input field's leaf value.


        Used at parent-workflow publish time to validate
        ``SuperNodeConfig.field_values``

        against the interface declared by the sub-workflow.
    SuperNodeFieldMappingTargetType:
      type: string
      enum:
        - node_config_field
        - dynamic_variable
        - edge_config_field
        - workflow_config_field
        - runtime_variable
      title: SuperNodeFieldMappingTargetType
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: Bearer
      type: http
      description: >-
        Retrieve your API Key from [Dashboard API Keys
        Section](https://dashboard.interactly.ai/api-keys).

````