Skip to main content
PATCH
Update function

Authorizations

Authorization
string
header
required

Voiceflow bearer token

Path Parameters

functionID
string
required

The ID of the function 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).

Body

application/json
name
string
code
string

The JavaScript source code executed when the function runs.

Maximum string length: 1048576
settings
object | null
pathOrder
string[]

An ordered list of path IDs controlling the display order of the function's exit paths.

description
string | null

A human-readable description of what the function does.

Response

200 - application/json

Confirms the function was updated. Only a message is returned, not the revised function, so fetch the function again to read back its saved code.

message
string
required

A human-readable message confirming the update.