Skip to main content
POST
/
v1
/
projects
/
{projectId}
/
pathway
/
nodes
Create Node
curl --request POST \
  --url https://api.pathors.com/v1/projects/{projectId}/pathway/nodes \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "id": "<string>",
  "position": {},
  "data": {
    "data.type": "<string>",
    "data.title": "<string>",
    "data.prompt": "<string>",
    "data.tools": [
      "<string>"
    ],
    "data.referenceNodeId": "<string>"
  }
}
'

Request

POST https://api.pathors.com/v1/projects/{projectId}/pathway/nodes

Path Parameters

projectId
string
required
The project ID

Headers

Authorization
string
required
Bearer token using your developer key

Body

id
string
required
Unique node ID
position
object
required
Node position on canvas: { "x": number, "y": number }
data
object
required
Node configuration. Must include type and type-specific fields.

Response

Returns the created node with status 201. Returns 409 if a node with the same ID already exists.

Example

curl -X POST https://api.pathors.com/v1/projects/{projectId}/pathway/nodes \
  -H "Authorization: Bearer dk_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "node-booking",
    "position": { "x": 200, "y": 300 },
    "data": {
      "type": "prompt",
      "title": "Booking",
      "prompt": "Help the user complete their booking.",
      "tools": ["tool-uuid-1"]
    }
  }'