Create environment variable

http
POST /projects/{project_reference}/environments/{environment_id}/variables

Create an environment variable; a key that exists already is a conflict. Requires project.env_vars.write.

Parameters

NameInRequiredDescription
project_referencepathYes
environment_idpathYesEnvironment ID containing the variable.

Request body

FieldTypeRequiredDescription
keystringYesEnvironment variable key. Must start with a letter or underscore and contain only letters, numbers, and underscores.
valuestringYesEnvironment variable value.

Responses

StatusDescription
201Environment variable created; the value is masked
400Bad request
401Unauthorized
403Forbidden
404Not found
409Conflict
500Server error
503internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.