Skip to main content
POST
Create variable

Authorizations

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).

Body

application/json
name
string
required

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

type
enum<string>
required
Available options:
input,
output
functionID
string
required

The ID of the function this variable belongs to.

description
string | null

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