Skip to content

Environment variables

The project's environment variables; changes apply from the next version.

On this page

Concepts: Environment variables and cron jobs

Endpoint summaries come from the OpenAPI document.

GET/v1/projects/{project}/env

Environment variables, including the system ones. Sensitive values are never returned

Operation (MCP tool)
listEnvVars
Authentication
API key (pfa_…)OAuth token (pfo_…)

Parameters

Parameters
NameInTypeDescription
projectRequiredpathstring

Responses

Responses
StatusDescriptionBody
200OKobject
401ProblemProblem (RFC 9457)
403ProblemProblem (RFC 9457)
404ProblemProblem (RFC 9457)

Related error codes

Error codes this endpoint and its part of the API answer with. Each one explains what happened and what to do.

PUT/v1/projects/{project}/env/{key}

Add or change a variable; applies from the next version. Not with an agent profile

Operation (MCP tool)
setEnvVar
Authentication
API key (pfa_…)OAuth token (pfo_…)

Parameters

Parameters
NameInTypeDescription
projectRequiredpathstring
keyRequiredpathstring

Request body

application/jsonobjectRequired

Request body
NameTypeDescription
valueRequiredstring
sensitiveOptionalbooleandefault true

Responses

Responses
StatusDescriptionBody
200OKEnvVar
201CreatedEnvVar
400ProblemProblem (RFC 9457)
401ProblemProblem (RFC 9457)
403ProblemProblem (RFC 9457)
404ProblemProblem (RFC 9457)
409ProblemProblem (RFC 9457)
413ProblemProblem (RFC 9457)

Related error codes

Error codes this endpoint and its part of the API answer with. Each one explains what happened and what to do.

DELETE/v1/projects/{project}/env/{key}

Remove a variable

Operation (MCP tool)
deleteEnvVar
Authentication
API key (pfa_…)OAuth token (pfo_…)

Parameters

Parameters
NameInTypeDescription
projectRequiredpathstring
keyRequiredpathstring

Responses

Responses
StatusDescriptionBody
204RemovedNo content
401ProblemProblem (RFC 9457)
403ProblemProblem (RFC 9457)
404ProblemProblem (RFC 9457)

Related error codes

Error codes this endpoint and its part of the API answer with. Each one explains what happened and what to do.