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

# Create Node

> Add a new node to the pathway

## Request

```bash theme={null}
POST https://api.pathors.com/v1/projects/{projectId}/pathway/nodes
```

### Path Parameters

<ParamField path="projectId" type="string" required>
  The project ID
</ParamField>

### Headers

<ParamField header="Authorization" type="string" required>
  Bearer token using your developer key
</ParamField>

### Body

<ParamField body="id" type="string" required>
  Unique node ID
</ParamField>

<ParamField body="position" type="object" required>
  Node position on canvas: `{ "x": number, "y": number }`
</ParamField>

<ParamField body="data" type="object" required>
  Node configuration. Must include `type` and type-specific fields.

  <Expandable title="fields">
    <ParamField body="data.type" type="string" required>`start`, `prompt`, `end`, or `goto`</ParamField>
    <ParamField body="data.title" type="string" required>Display title</ParamField>
    <ParamField body="data.prompt" type="string">Prompt text (required for `start`, `prompt`, `end`)</ParamField>
    <ParamField body="data.tools" type="string[]">Array of tool IDs bound to this node</ParamField>
    <ParamField body="data.referenceNodeId" type="string">Target node ID (required for `goto`)</ParamField>
  </Expandable>
</ParamField>

## Response

Returns the created node with status `201`.

Returns `409` if a node with the same ID already exists.

### Example

```bash theme={null}
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"]
    }
  }'
```
