Create function
POST
Create function

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

name
string
required
code
string
required

The JavaScript source code executed when the function runs.

settings
object
description
string

A human-readable description of what the function does.

Response

201 - application/json

Creates the function and returns it in full, including its new ID and the JavaScript source stored for it.

function
object
required

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