Saltar al contenido principal
POST
/
v1
/
path
Create Path
import requests

url = "http://localhost:3000/v1/path/"

payload = {
    "name": "<string>",
    "description": "<string>",
    "global_prompt": "<string>",
    "nodes": [
        {
            "name": "<string>",
            "node_type": "start",
            "branches": [],
            "pos_x": 123,
            "pos_y": 123,
            "is_global": False,
            "global_condition": "<string>",
            "wait_user": False,
            "time_before_start": 123
        }
    ]
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "nodes": [
    {
      "name": "<string>",
      "node_type": "start",
      "branches": [],
      "pos_x": 123,
      "pos_y": 123,
      "is_global": false,
      "global_condition": "<string>",
      "wait_user": false,
      "time_before_start": 123
    }
  ],
  "description": "<string>",
  "global_prompt": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request model for create or update path.

name
string | null
required

The name of the path

description
string | null

The description of the path

global_prompt
string | null

The global prompt for the path

nodes
(StartNodeCreateSchema · object | ConversationNodeCreateSchema · object | EndNodeCreateSchema · object | ToolNodeCreateSchema · object | TransferNodeCreateSchema · object)[]

The nodes in the path

  • StartNodeCreateSchema
  • ConversationNodeCreateSchema
  • EndNodeCreateSchema
  • ToolNodeCreateSchema
  • TransferNodeCreateSchema

Response

Successful Response

Response model for path

id
string<uuid>
required

Unique identifier for the path

name
string | null
required

The name of the path

nodes
(StartNodeResponseSchema · object | ConversationNodeResponseSchema · object | EndNodeResponseSchema · object | ToolNodeResponseSchema · object | TransferNodeResponseSchema · object)[]
required

The nodes in the path

Defines a start node with all its properties.

  • StartNodeResponseSchema
  • ConversationNodeResponseSchema
  • EndNodeResponseSchema
  • ToolNodeResponseSchema
  • TransferNodeResponseSchema
description
string | null

The description of the path

global_prompt
string | null

The global prompt for the path