Projects

Create a new environment variable

post/projects/{project_id}/env-vars

Request

  • Base URL: /api (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /api/projects/{project_id}/env-vars
  • Auth: none declared

Path parameters

project_idinteger required

Project ID or slug

Request body

environment_idsinteger[] required
include_in_previewboolean

Include this environment variable in preview environments (default: false)

is_secretboolean

When true the stored value is write-only: it is omitted from API responses and cannot be revealed, even by an administrator. Updates that omit the value preserve the existing ciphertext. The flag is one-way — secret vars cannot be demoted to regular vars.

keystring required
valuestring required

Response

Environment variables created successfully

created_atinteger required
idinteger required
include_in_previewboolean required

Include this environment variable in preview environments

is_secretboolean required

Whether the stored value is write-only. Marked secrets always have value: None in API responses and cannot be revealed.

keystring required
updated_atinteger required
valuestring nullable

Plaintext for regular variables in create/update responses, or "***" in list responses. Always None for marked secrets. Only regular variables can be read through the audited per-variable reveal endpoint.

Changes

No recorded changes to this operation across all 50 revisions of this API.