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

# Update Pathway

> Update a conversational pathway's fields - including name, description, nodes and edges.

### Headers

**authorization** `string` *required*

Your API key for authentication.

### Path Parameters

**pathway\_id** `string` *required*

The unique identifier of the conversational pathway you want to update.

### Body

**name** `string`

The name of the conversational pathway

**description** `string`

A description of the pathway

**nodes** `object[]`

An array of node objects representing the conversation flow points in your pathway. Each node contains:

**Common Node Structure:**

```json theme={null}
{
    "id": "unique_node_identifier",
    "type": "Node_Type",
    "data": {
        "name": "Display Name",
        // Node-specific configuration goes here
    }
}
```

**Available Node Types:** `Default`, `End Call`, `Transfer Call`, `Webhook`, `Knowledge Base`, `SMS`, `Custom Code`, `Press Button`, `Wait for Response`, `Transfer Pathway`, `Scheduling`, and more.

**Node Examples:**

```json Start Node theme={null}
{
  "id": "1",
  "type": "Default"
  "data": {
      "name": "Start",
      "text": "Hey there, how are you doing today?",
      "isStart": true,
  },
}
  
```

```json Default Node theme={null}
{
  "id": "randomnode_1710288871721",
  "type": "Default"
  "data": {
      "name": "New Node",
      "text": "Select a node or edge and press backspace to remove it",
      "globalPrompt": "This is a phone call. Do not use exclamation marks.\n\nConvert 24HR format timings to 12 HR format - e.g 14:00 should be written as 2 PM.",
  },
}
```

```json End Node theme={null}
{
  "id": "randomnode_1710288752186",
  "type": "End Call"
  "data": {
      "name": "End call",
      "prompt": "Say goodbye to the user",
  },
}
```

```json Webhook Node theme={null}
{
  "id": "randomnode_1710288752186",
  "type": "Webhook",
  "data": {
      "url": "https://api.bland.ai/reservation",
      "body": "{\n    \"date\" : \"{{date}}\",\n    \"time\" : \"{{time}}\",\n    \"guests\": {{number_of_people}}\n}",
      "name": "Reservation Booking",
      "text": "Please give me a moment as I check our bookings..",
      "method": "POST",
      "extractVars": [
          [
              "date",
              "string",
              "Desired Date of reservation, in MM/DD/YYYY format"
          ],
          [
              "time",
              "string",
              "Desired Time of Reservation in 24HR Format e.g 13:30"
          ],
          [
              "number_of_people",
              "integer",
              "Number of people for the reservation"
          ]
      ],
      "responseData": [
          {
              "data": "$.reserved",
              "name": "reservation_success",
              "context": ""
          },
          {
              "data": "$.available_slots",
              "name": "available_slots",
              "context": "Available slots for the date provided"
          }
      ],
      "responsePathways": [
          [
              "reservation_success",
              "==",
              "true",
              {
                  "id": "randomnode_1710288752186",
                  "name": "Reservation Successful"
              }
          ],
          [
              "reservation_success",
              "==",
              "false",
              {
                  "id": "randomnode_1712265110018",
                  "name": "Find new timeslot"
              }
          ]
      ]
  }
}
```

```json Knowledge Base Node theme={null}
{
  "id": "randomnode_1710288752186",
  "type": "Knowledge Base",
  "data": {
      "name": "Restaurant Questions",
      "prompt": "Answer any questions that the user may have regarding the restaurant, by referring to the knowledge base you have. \n\nAnswer the question in 1 line, and then ask if they have any more questions."
      "kb": "Opening Hours : 9am - 5pm\nStore Locations : \n426 Ivy Street San Francisco, \nSan Jose"
  }
}
```

```json Global Node theme={null}
{
  "id": "randomnode_1710288871721",
  "type": "Default"
  "data": {
      "name": "Answer any questions",
      "prompt": "You are to answer any questions the user has.",
      "isGlobal": true,
      "globalLabel": "user asks a question"
  },
}
```

```json Transfer Call Node theme={null}
{
  "id": "randomnode_1710288752186",
  "type": "Transfer Call",
  "data": {
      "name": "Transferring the call",
      "text": "Transferring the call now. Please hold.."
      "transferNumber": "+19547951234"
  }
}
```

> [accordion] Node Data Object Parameters
>
> * `name`
>   — name of the node
> * `isStart`
>   — whether the node is the start node. There can only be 1 start node in a pathway. Either `true` or `false`.
> * `isGlobal`
>   — whether the node is a global node. Global nodes are nodes that can be used in multiple pathways. Either `true` or `false`.
> * `globalLabel`
>   — the label of the global node. Should be present if `isGlobal` is true.
> * `type`
>   — Type of the node. Can be `Default`, `End Call`, `Transfer Node`, `Knowledge Base`, or `Webhook`.
> * `text`
>   — If static text is chosen, this is the text that will be said to the user.
> * `prompt`
>   — If dynamic text is chosen, this is the prompt that will be shown to the user.
> * `condition`
>   — The condition that needs to be met to proceed from this node.
> * `transferNumber`
>   * If the node is a transfer node, this is the number to which the call will be transferred.
> * `kb`
>   * If the node is a knowledge base node, this is the knowledge base item that will be used.
> * `pathwayExamples`
>   * The fine-tuning examples for the agent at this node for the pathways chosen
> * `conditionExamples`
>   * The fine-tuning examples for the condition at this node for the condition chosen
> * `dialogueExamples`
>   * The fine-tuning examples for the dialogue at this node for the dialogue chosen.
> * `modelOptions`
>   * `modelName`
>     — The name of the model to be used for this node.
>   * `interruptionThreshold`
>     Legacy. A fixed wait, in milliseconds, after the caller stops speaking before the AI responds on this node. We recommend leaving this unset; use `interruptibility` to control interruptions.
>   * `interruptibility`
>     — How readily the AI stops speaking when the caller talks over it on this node: `0` block (the AI finishes speaking, same as `block_interruptions: true`), `1` difficult, `2` balanced (default), `3` easy, `4` always interrupt. Applies only while this node is active; other nodes use the agent's setting. Useful per node: e.g. difficult on a legal-disclaimer node.
>   * `temperature`
>     — The temperature of the model.
> * `extractVars`
>   * An array of array of strings. \[\[`varName`, `varType`, `varDescription`]] e.g `[["name", "string", "The name of the user"], ["age", "integer", "The age of the user"]]`

Update the pathway's [**global prompt**](https://docs.bland.ai/tutorials/pathways.md#global-prompt-for-all-nodes) by adding an object to the array of nodes.

```json Global Prompt theme={null}
{
    "globalConfig": {
        "globalPrompt": "This is a phone call. Do not use exclamation marks.\n\nConvert 24HR format timings to 12 HR format - e.g 14:00 should be written as 2 PM."
    },
    "position": {
        "x": 0,
        "y": 0
    }
}
```

**edges** `object[]`

An array of edge objects that define the connections and flow between nodes in your pathway. Each edge contains:

**Common Edge Structure:**

```json theme={null}
{
    "source": "source_node_id",
    "target": "target_node_id",
    "data": {
        "label": "When this path should be taken",
        // Optional: conditions, descriptions, etc.
    }
}
```

> [accordion] Edge Object Parameters
>
> * `id`
>   — unique id of the edge
> * `source`
>   — id of the source node
> * `target`
>   — id of the target node
> * `label`
>   — Label for this edge. This is what the agent will use to decide which path to take.

## Complete JSON Structure Example

For a comprehensive example of how pathways are structured with multiple nodes and edges in a realistic use case, download our example template:

[Download pathway example](../../tutorials/tutorials-assets/pathway_json_example.json)

This example contains a complete car rental pathway with:

* Multiple node types (Default, Transfer Call, Webhook, End Call, etc.)
* Complex edge routing and conditions
* Variable extraction and model configuration
* Real-world conversation flow patterns

### Response

**status** `string`

Can be `success` or `error`.

**pathway\_id** `string`

A unique identifier for the pathway (present only if status is `success`).

**nodes** `array of objects`

Data about all the nodes in the pathway.

**edges** `array of objects`

Data about all the edges in the pathway.

```json Response theme={null}
{
  "status": "success",
  "message": "Pathway updated successfully",
  "pathway_data": {
    "pathway_id": "9d404c1b-6a23-4426-953a-a52c392ff8f1",
    "name": "Updated Demo Pathway",
    "description": "This is an updated description",
    "nodes": [
        {
            "id": "1",
            "data": {
                "name": "Start",
                "text": "Hey there, how are you doing today?",
                "isStart": true,
            },
            "type": "Default"
        },
        {
            "id": "randomnode_1710288752186",
            "data": {
                "name": "End call",
                "prompt": "Click 'Add New Node' on the right to add a new node",
            },
            "type": "End Call"
        },
        {
            "id": "randomnode_1710288871721",
            "data": {
                "name": "New Node",
                "prompt": "Click 'Add New Node' on the right to add a new node",
            },
            "type": "Default"
        }
    ],
    "edges": [
        {
            "id": "1",
            "source": "1",
            "target": "randomnode_1710288752186",
            "data": {
                "name": "End call",
                "prompt": "Click 'Add New Node' on the right to add a new node",
            }
        },
        {
            "id": "2",
            "source": "1",
            "target": "randomnode_1710288871721",
            "data": {
                "name": "New Node",
                "prompt": "Click 'Add New Node' on the right to add a new node",
            }
        }
    ]
  }
}
```

***

Docs for agents: [llms.txt](https://docs.bland.ai/llms.txt)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.