Skip to main content
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

application/json
name
string
required
code
string
required

The JavaScript source code executed when the function runs.

Maximum string length: 1048576
settings
object | null
description
string | null

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