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

# Function Paths

API operations for function paths. Browse the routes below for parameters, request examples, and responses.

API version: Selected per operation

## List paths

Returns every function path in its function. A function path is one of the named exits a function can return through. The call takes no paging parameters, so one request yields the whole set.

### Endpoint

```http
GET /v1/stable/function-path
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Query parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string",
  "description": "The ID of the project to operate on."
}
```

#### `environmentAlias`

Required · string

The alias of the environment to operate on (e.g. `main`).

```json
{
  "type": "string",
  "description": "The alias of the environment to operate on (e.g. `main`)."
}
```

#### `functionID`

Required · string

The ID of the function whose paths to list.

```json
{
  "type": "string",
  "description": "The ID of the function whose paths to list."
}
```

### Responses

#### 200

Returns every exit path declared on the function, each with the name the function code returns to select it and the display label shown in Voiceflow.

Schema:

```json
{
  "$ref": "#/components/schemas/StableFunctionPathListResponse"
}
```

Example:

```json
{
  "paths": [
    {
      "id": "<string>",
      "name": "<string>",
      "label": "<string>",
      "createdAt": "2026-09-10T00:00:00.000Z",
      "updatedAt": "2026-09-10T00:00:00.000Z",
      "functionID": "<string>"
    }
  ]
}
```

### Request examples

#### cURL

```bash
curl --request GET \
  --url 'https://realtime-api.voiceflow.com/v1/stable/function-path?projectID=<projectID>&environmentAlias=<environmentAlias>&functionID=<functionID>' \
  --header 'Authorization: Bearer <token>'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/function-path?projectID=<projectID>&environmentAlias=<environmentAlias>&functionID=<functionID>', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer <token>',
  },
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.get(
    'https://realtime-api.voiceflow.com/v1/stable/function-path?projectID=<projectID>&environmentAlias=<environmentAlias>&functionID=<functionID>',
    headers={'Authorization': 'Bearer <token>'},
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf function path list --project-id <projectID> --environment-alias <environmentAlias> --function-id <functionID>
```


## Create path

Adds a function path to its function, one of the named exits a function can return through. The response carries the ID that later calls address it by.

### Endpoint

```http
POST /v1/stable/function-path
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Query parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string",
  "description": "The ID of the project to operate on."
}
```

#### `environmentAlias`

Required · string

The alias of the environment to operate on (e.g. `main`).

```json
{
  "type": "string",
  "description": "The alias of the environment to operate on (e.g. `main`)."
}
```

### Request body

Required

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StableFunctionPathCreateRequest"
      }
    }
  }
}
```

### Responses

#### 201

Creates the exit path and returns it with its generated ID and the function it belongs to. The name is the value the function code returns to send the workflow down this branch.

Schema:

```json
{
  "$ref": "#/components/schemas/StableFunctionPathResponse"
}
```

Example:

```json
{
  "path": {
    "id": "<string>",
    "name": "<string>",
    "label": "<string>",
    "createdAt": "2026-09-10T00:00:00.000Z",
    "updatedAt": "2026-09-10T00:00:00.000Z",
    "functionID": "<string>"
  }
}
```

### Request examples

#### cURL

```bash
curl --request POST \
  --url 'https://realtime-api.voiceflow.com/v1/stable/function-path?projectID=<projectID>&environmentAlias=<environmentAlias>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "functionID": "<string>",
  "label": null
}'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/function-path?projectID=<projectID>&environmentAlias=<environmentAlias>', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "name": "<string>",
    "functionID": "<string>",
    "label": null
  }),
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.post(
    'https://realtime-api.voiceflow.com/v1/stable/function-path?projectID=<projectID>&environmentAlias=<environmentAlias>',
    headers={'Authorization': 'Bearer <token>'},
    json={
      "name": "<string>",
      "functionID": "<string>",
      "label": None
    },
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf function path create --project-id <projectID> --environment-alias <environmentAlias> <<'JSON'
{
  "name": "<string>",
  "functionID": "<string>",
  "label": null
}
JSON
```


## Create many paths

Adds several function paths to its function in one request, each taking the fields the single-create call takes. The response carries the created function paths in the same shape the list call returns.

### Endpoint

```http
POST /v1/stable/function-path/batch
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Query parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string",
  "description": "The ID of the project to operate on."
}
```

#### `environmentAlias`

Required · string

The alias of the environment to operate on (e.g. `main`).

```json
{
  "type": "string",
  "description": "The alias of the environment to operate on (e.g. `main`)."
}
```

### Request body

Required

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StableFunctionPathCreateManyRequest"
      }
    }
  }
}
```

### Responses

#### 201

Creates every path in the request against the single function it names, and returns the created paths with their generated IDs and labels.

Schema:

```json
{
  "$ref": "#/components/schemas/StableFunctionPathListResponse"
}
```

Example:

```json
{
  "paths": [
    {
      "id": "<string>",
      "name": "<string>",
      "label": "<string>",
      "createdAt": "2026-09-10T00:00:00.000Z",
      "updatedAt": "2026-09-10T00:00:00.000Z",
      "functionID": "<string>"
    }
  ]
}
```

### Request examples

#### cURL

```bash
curl --request POST \
  --url 'https://realtime-api.voiceflow.com/v1/stable/function-path/batch?projectID=<projectID>&environmentAlias=<environmentAlias>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "functionID": "<string>",
  "paths": [
    {
      "name": "<string>",
      "label": null
    }
  ]
}'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/function-path/batch?projectID=<projectID>&environmentAlias=<environmentAlias>', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "functionID": "<string>",
    "paths": [
      {
        "name": "<string>",
        "label": null
      }
    ]
  }),
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.post(
    'https://realtime-api.voiceflow.com/v1/stable/function-path/batch?projectID=<projectID>&environmentAlias=<environmentAlias>',
    headers={'Authorization': 'Bearer <token>'},
    json={
      "functionID": "<string>",
      "paths": [
        {
          "name": "<string>",
          "label": None
        }
      ]
    },
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf function path create-many --project-id <projectID> --environment-alias <environmentAlias> <<'JSON'
{
  "functionID": "<string>",
  "paths": [
    {
      "name": "<string>",
      "label": null
    }
  ]
}
JSON
```


## Get path

Returns a single function path by ID, with the fields that define it. A function path is one of the named exits a function can return through.

### Endpoint

```http
GET /v1/stable/function-path/{pathID}
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `pathID`

Required · string

The ID of the function path to operate on.

```json
{
  "type": "string"
}
```

### Query parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string",
  "description": "The ID of the project to operate on."
}
```

#### `environmentAlias`

Required · string

The alias of the environment to operate on (e.g. `main`).

```json
{
  "type": "string",
  "description": "The alias of the environment to operate on (e.g. `main`)."
}
```

### Responses

#### 200

Returns one exit path, including the function it belongs to, the name its code returns to select it, and the label displayed for it.

Schema:

```json
{
  "$ref": "#/components/schemas/StableFunctionPathResponse"
}
```

Example:

```json
{
  "path": {
    "id": "<string>",
    "name": "<string>",
    "label": "<string>",
    "createdAt": "2026-09-10T00:00:00.000Z",
    "updatedAt": "2026-09-10T00:00:00.000Z",
    "functionID": "<string>"
  }
}
```

### Request examples

#### cURL

```bash
curl --request GET \
  --url 'https://realtime-api.voiceflow.com/v1/stable/function-path/<pathID>?projectID=<projectID>&environmentAlias=<environmentAlias>' \
  --header 'Authorization: Bearer <token>'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/function-path/<pathID>?projectID=<projectID>&environmentAlias=<environmentAlias>', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer <token>',
  },
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.get(
    'https://realtime-api.voiceflow.com/v1/stable/function-path/<pathID>?projectID=<projectID>&environmentAlias=<environmentAlias>',
    headers={'Authorization': 'Bearer <token>'},
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf function path get --path-id <pathID> --project-id <projectID> --environment-alias <environmentAlias>
```


## Update path

Changes an existing function path in place. The response carries only a confirmation message, so refetch the function path to read its new values.

### Endpoint

```http
PATCH /v1/stable/function-path/{pathID}
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `pathID`

Required · string

The ID of the function path to operate on.

```json
{
  "type": "string"
}
```

### Query parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string",
  "description": "The ID of the project to operate on."
}
```

#### `environmentAlias`

Required · string

The alias of the environment to operate on (e.g. `main`).

```json
{
  "type": "string",
  "description": "The alias of the environment to operate on (e.g. `main`)."
}
```

### Request body

Required

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "allOf": [
          {
            "$ref": "#/components/schemas/StableFunctionPathUpdateRequest"
          }
        ]
      }
    }
  }
}
```

### Responses

#### 200

Confirms the path's name or label was changed. The body is a message only, and because the name is what function code returns to select this path, renaming it affects that code.

Schema:

```json
{
  "$ref": "#/components/schemas/StableUpdateResponse"
}
```

Example:

```json
{
  "message": "<string>"
}
```

### Request examples

#### cURL

```bash
curl --request PATCH \
  --url 'https://realtime-api.voiceflow.com/v1/stable/function-path/<pathID>?projectID=<projectID>&environmentAlias=<environmentAlias>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "label": "<string>"
}'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/function-path/<pathID>?projectID=<projectID>&environmentAlias=<environmentAlias>', {
  method: 'PATCH',
  headers: {
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "name": "<string>",
    "label": "<string>"
  }),
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.patch(
    'https://realtime-api.voiceflow.com/v1/stable/function-path/<pathID>?projectID=<projectID>&environmentAlias=<environmentAlias>',
    headers={'Authorization': 'Bearer <token>'},
    json={
      "name": "<string>",
      "label": "<string>"
    },
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf function path update --path-id <pathID> --project-id <projectID> --environment-alias <environmentAlias> <<'JSON'
{
  "name": "<string>",
  "label": "<string>"
}
JSON
```


## Delete path

Deletes a single function path by ID. A function path is one of the named exits a function can return through. The response carries only a confirmation message, so refetch the function paths to see what is left.

### Endpoint

```http
DELETE /v1/stable/function-path/{pathID}
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `pathID`

Required · string

The ID of the function path to operate on.

```json
{
  "type": "string"
}
```

### Query parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string",
  "description": "The ID of the project to operate on."
}
```

#### `environmentAlias`

Required · string

The alias of the environment to operate on (e.g. `main`).

```json
{
  "type": "string",
  "description": "The alias of the environment to operate on (e.g. `main`)."
}
```

### Responses

#### 200

Confirms the exit path was removed from its function. The body is a message only, so refetch the function's paths to see the branches it can still take.

Schema:

```json
{
  "$ref": "#/components/schemas/StableDeleteResponse"
}
```

Example:

```json
{
  "message": "<string>"
}
```

### Request examples

#### cURL

```bash
curl --request DELETE \
  --url 'https://realtime-api.voiceflow.com/v1/stable/function-path/<pathID>?projectID=<projectID>&environmentAlias=<environmentAlias>' \
  --header 'Authorization: Bearer <token>'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/function-path/<pathID>?projectID=<projectID>&environmentAlias=<environmentAlias>', {
  method: 'DELETE',
  headers: {
    Authorization: 'Bearer <token>',
  },
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.delete(
    'https://realtime-api.voiceflow.com/v1/stable/function-path/<pathID>?projectID=<projectID>&environmentAlias=<environmentAlias>',
    headers={'Authorization': 'Bearer <token>'},
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf function path delete --path-id <pathID> --project-id <projectID> --environment-alias <environmentAlias>
```


## Schema definitions

### StableDeleteResponse

```json
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "A human-readable message confirming the deletion."
    }
  },
  "required": [
    "message"
  ]
}
```

### StableFunctionPath

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string",
      "description": "The name of the exit path, referenced by the function code when returning which path to take."
    },
    "label": {
      "nullable": true,
      "description": "The display label shown for this path in the Voiceflow UI; falls back to `name` when null.",
      "type": "string"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
    },
    "functionID": {
      "type": "string",
      "description": "The ID of the function this path belongs to."
    }
  },
  "required": [
    "id",
    "name",
    "label",
    "createdAt",
    "updatedAt",
    "functionID"
  ]
}
```

### StableFunctionPathCreateManyRequest

```json
{
  "type": "object",
  "properties": {
    "functionID": {
      "type": "string",
      "description": "The ID of the function to create the paths for."
    },
    "paths": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the exit path, referenced by the function code when returning which path to take."
          },
          "label": {
            "default": null,
            "nullable": true,
            "description": "The display label shown for this path in the Voiceflow UI; falls back to `name` when null.",
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "functionID",
    "paths"
  ]
}
```

### StableFunctionPathCreateRequest

```json
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the exit path, referenced by the function code when returning which path to take."
    },
    "functionID": {
      "type": "string",
      "description": "The ID of the function this path belongs to."
    },
    "label": {
      "default": null,
      "nullable": true,
      "description": "The display label shown for this path in the Voiceflow UI; falls back to `name` when null.",
      "type": "string"
    }
  },
  "required": [
    "name",
    "functionID"
  ],
  "additionalProperties": false
}
```

### StableFunctionPathListResponse

```json
{
  "type": "object",
  "properties": {
    "paths": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/StableFunctionPath"
      }
    }
  },
  "required": [
    "paths"
  ]
}
```

### StableFunctionPathResponse

```json
{
  "type": "object",
  "properties": {
    "path": {
      "$ref": "#/components/schemas/StableFunctionPath"
    }
  },
  "required": [
    "path"
  ]
}
```

### StableFunctionPathUpdateRequest

```json
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the exit path, referenced by the function code when returning which path to take."
    },
    "label": {
      "nullable": true,
      "description": "The display label shown for this path in the Voiceflow UI; falls back to `name` when null.",
      "type": "string"
    }
  },
  "additionalProperties": false
}
```

### StableUpdateResponse

```json
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "A human-readable message confirming the update."
    }
  },
  "required": [
    "message"
  ]
}
```
