Endpoint
GET
/v1/stable/function-variable

Returns every function variable in its function. A function variable is an input or output a function declares. The call takes no paging parameters, so one request yields the whole set.

Request
Response

Authentication

Authorization
string
header
required

Voiceflow bearer token

Query parameters

projectID
string
required

The ID of the project to operate on.

environmentAlias
string
required

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

functionID
string
required

The ID of the function whose variables to list.

Response

200 - application/json

Returns every variable declared on a single function, selected by the functionID query parameter, each marked as an input or an output and named as the function code references it.

variables
object[]
required
StableFunctionVariable — see its attributes above
Endpoint
POST
/v1/stable/function-variable

Adds a function variable to its function, an input or output a function declares. The response carries the ID that later calls address it by.

Request
Response

Authentication

Authorization
string
header
required

Voiceflow bearer token

Query parameters

projectID
string
required

The ID of the project to operate on.

environmentAlias
string
required

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

Request body

name
string
required

The name used to reference the variable in the function code.

type
object
required
Available options: input, output
FunctionVariableKind — see its attributes above
functionID
string
required

The ID of the function this variable belongs to.

description
string

A human-readable description of what the variable holds.

Response

201 - application/json

Creates the function variable and returns it, including its new ID, whether it is an input or an output, and the functionID of the function that declares it.

variable
object
required
StableFunctionVariable — see its attributes above
Endpoint
POST
/v1/stable/function-variable/batch

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

Request
Response

Authentication

Authorization
string
header
required

Voiceflow bearer token

Query parameters

projectID
string
required

The ID of the project to operate on.

environmentAlias
string
required

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

Request body

functionID
string
required

The ID of the function to create the variables for.

variables
object[]
required

Response

201 - application/json

Returns the newly created function variables, each with its own ID, its input or output kind, and the functionID of the function it was attached to.

variables
object[]
required
StableFunctionVariable — see its attributes above
Endpoint
GET
/v1/stable/function-variable/{variableID}

Returns a single function variable by ID, with the fields that define it. A function variable is an input or output a function declares.

Request
Response

Authentication

Authorization
string
header
required

Voiceflow bearer token

Path parameters

variableID
string
required

The ID of the variable to operate on.

Query parameters

projectID
string
required

The ID of the project to operate on.

environmentAlias
string
required

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

Response

200 - application/json

Returns a single function variable, with the name the function code uses to reference it, whether it is an input or an output, and the ID of the function that declares it.

variable
object
required
StableFunctionVariable — see its attributes above
Endpoint
PATCH
/v1/stable/function-variable/{variableID}

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

Request
Response

Authentication

Authorization
string
header
required

Voiceflow bearer token

Path parameters

variableID
string
required

The ID of the variable to operate on.

Query parameters

projectID
string
required

The ID of the project to operate on.

environmentAlias
string
required

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

Request body

name
string

The name used to reference the variable in the function code.

description
string

A human-readable description of what the variable holds.

Response

200 - application/json

Confirms the function variable was updated. The body confirms the write rather than returning the variable, so fetch the variable again to check its name, description, and whether it is an input or an output.

message
string
required

A human-readable message confirming the update.

Endpoint
DELETE
/v1/stable/function-variable/{variableID}

Deletes a single function variable by ID. A function variable is an input or output a function declares. The response carries only a confirmation message, so refetch the function variables to see what is left.

Request
Response

Authentication

Authorization
string
header
required

Voiceflow bearer token

Path parameters

variableID
string
required

The ID of the variable to operate on.

Query parameters

projectID
string
required

The ID of the project to operate on.

environmentAlias
string
required

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

Response

200 - application/json

Confirms the function variable was deleted. A message is all that comes back, so refetch the function's variables to see which inputs and outputs its code can still reference.

message
string
required

A human-readable message confirming the deletion.

Schemas

Use the up and down arrow keys to select a result, Enter to open it, and Escape to close the search.