Create a new shared conversation flow component

post/create-conversation-flow-component

Request body

namestring required

Name of the component

start_node_idstring nullable

ID of the starting node

Example request

{
  "name": "Customer Information Collector",
  "tools": [
    {
      "type": "custom",
      "name": "get_customer_info",
      "description": "Get customer information from database",
      "tool_id": "tool_001",
      "url": "https://api.example.com/customer",
      "method": "GET"
    }
  ],
  "mcps": [
    {
      "headers": {
        "Authorization": "Bearer 1234567890"
      },
      "query_params": {
        "index": "1",
        "key": "value"
      }
    }
  ],
  "nodes": [
    {
      "id": "collect_info",
      "type": "conversation",
      "instruction": {
        "type": "prompt",
        "text": "Ask the customer for their name and contact information."
      }
    }
  ],
  "start_node_id": "collect_info",
  "begin_tag_display_position": {
    "x": 100,
    "y": 200
  }
}

Response

Successfully created conversation flow component

namestring required

Name of the component

start_node_idstring nullable

ID of the starting node

conversation_flow_component_idstring required

Unique identifier for the component

user_modified_timestampinteger required

Timestamp of last user modification

linked_conversation_flow_idsstring[]

IDs of conversation flows linked to this shared component

Example response

{
  "name": "Customer Information Collector",
  "tools": [
    {
      "type": "custom",
      "name": "get_customer_info",
      "description": "Get customer information from database",
      "tool_id": "tool_001",
      "url": "https://api.example.com/customer",
      "method": "GET"
    }
  ],
  "mcps": [
    {
      "headers": {
        "Authorization": "Bearer 1234567890"
      },
      "query_params": {
        "index": "1",
        "key": "value"
      }
    }
  ],
  "nodes": [
    {
      "id": "collect_info",
      "type": "conversation",
      "instruction": {
        "type": "prompt",
        "text": "Ask the customer for their name and contact information."
      }
    }
  ],
  "start_node_id": "collect_info",
  "begin_tag_display_position": {
    "x": 100,
    "y": 200
  }
}

Changes