CLI API
Push environment variables
Merge or replace variables in an existing project environment.
POST
Merge or replace variables in an existing project environment.
Use a developer access key. This endpoint is part of the CLI API, with its own response format and rate limit.
Required scopes:
This request changes workspace data. A timeout does not prove that the write failed; inspect the result before retrying.
env:write.
The key owner must still be a workspace owner or administrator. Missing scope or admin access returns 403; an unavailable or differently pinned project returns 404. The environment must already exist. A push writes a version snapshot and activity. Review replace carefully: an empty vars map replaces the environment with no variables.
Parameters
string
required
Nonempty project record ID, respecting any project pin.
string
required
1–40 characters; letters, numbers, hyphens, or underscores, starting with a letter or number. Names are trimmed.
object
required
String map. Keys are 1–128 characters matching /^[A-Za-z_][A-Za-z0-9_]*$/. Values are strings up to 65,536 characters.
string
merge (default) preserves unspecified keys; replace removes keys not supplied.
Response
200 — Top-level snapshotversion, summary with added/changed/removed key arrays, and human-readable change. Change wording is illustrative.