Create secret
POST
Create secret

Authorizations

Authorization
string
header
required

Voiceflow bearer token

Query Parameters

projectID
string
required

The ID of the project to operate on.

Body

name
string
required

The name of the secret. Letters, digits and underscores only, at most 64 characters — this is what a {token} in a default-value field binds to. Must be unique within the project.

defaultValue
string

The secret's value, written to the main environment's published version, the one serving live traffic. It cannot be empty. Omit it to create the secret as a placeholder with no value — a teammate can fill it in later through the Voiceflow UI or CLI.

visibility
object
default:"masked"

Whether the value can be revealed in the Voiceflow UI. restricted secrets can never be read back by anyone.

Response

201 - application/json

Returns the new secret with its generated ID, name, visibility and whether a value is stored. When a value was sent, the response also names the environment version it was written to.

secret
object
required
environmentAlias
string

Present when a defaultValue was sent: the alias of the environment that now serves the value (main). Omitted when no value was sent, or when the project has no main environment to name, such as a project that predates environments.

versionVariant
object

Present along with environmentAlias: the version of that environment that now serves the value, always published, the version serving live traffic.


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