Skip to content
Docs

Environment Variables

Read and update project environment variables, inspect custom environments, and read shared environment variables.

Create one or more environment variables.

Parameters

ParameterTypeRequiredDescription
idOrNamestringYesThe unique project identifier or the project name
upsertstringNoAllow override of environment variable if it already exists
teamIdstringNoTeam ID to use for this operation.
slugstringNoTeam slug to use for this operation. Use instead of teamId.
requestBodyobject | Array<object>YesRequest body for this tool.

Edit an environment variable.

Parameters

ParameterTypeRequiredDescription
idOrNamestringYesThe unique project identifier or the project name
idstringYesThe unique environment variable identifier
teamIdstringNoTeam ID to use for this operation.
slugstringNoTeam slug to use for this operation. Use instead of teamId.
requestBodyobjectYesRequest body for this tool.

Retrieve the environment variables of a project by id or name.

Parameters

ParameterTypeRequiredDescription
idOrNamestringYesThe unique project identifier or the project name
gitBranchstringNoIf defined, the git branch of the environment variable to filter the results (must have target=preview)
decryptstringNoIf true, the environment variable value will be decrypted Allowed values: "true", "false".
sourcestringNoThe source that is calling the endpoint.
customEnvironmentIdstringNoThe unique custom environment identifier within the project
customEnvironmentSlugstringNoThe custom environment slug (name) within the project
teamIdstringNoTeam ID to use for this operation.
slugstringNoTeam slug to use for this operation. Use instead of teamId.

Retrieve a custom environment.

Parameters

ParameterTypeRequiredDescription
idOrNamestringYesThe unique project identifier or the project name
environmentSlugOrIdstringYesThe unique custom environment identifier within the project
teamIdstringNoTeam ID to use for this operation.
slugstringNoTeam slug to use for this operation. Use instead of teamId.

Retrieve the decrypted value of an environment variable of a project by id.

Parameters

ParameterTypeRequiredDescription
idOrNamestringYesThe unique project identifier or the project name
idstringYesThe unique ID for the environment variable to get the decrypted value.
teamIdstringNoTeam ID to use for this operation.
slugstringNoTeam slug to use for this operation. Use instead of teamId.

Retrieve the decrypted value of a Shared Environment Variable by id.

Parameters

ParameterTypeRequiredDescription
idstringYesThe unique ID for the Shared Environment Variable to get the decrypted value.
teamIdstringNoTeam ID to use for this operation.
slugstringNoTeam slug to use for this operation. Use instead of teamId.

Retrieve custom environments.

Parameters

ParameterTypeRequiredDescription
idOrNamestringYesThe unique project identifier or the project name
gitBranchstringNoFetch custom environments for a specific git branch
teamIdstringNoTeam ID to use for this operation.
slugstringNoTeam slug to use for this operation. Use instead of teamId.

Was this helpful?

supported.