Skip to content

Set (upsert) one environment variable on the app

PUT
/api/workspaces/{workspaceId}/apps/{id}/env

Values are encrypted at rest. secret: true keeps the value out of the publish build and forbids the VITE_ prefix (Vite inlines VITE_* into the public bundle). A running dev server picks the change up on its next restart.

workspaceId
required
string
id
required
string
object
key
required
string
>= 1 characters <= 128 characters
value
required
string
<= 8192 characters
secret
boolean

Successful response

object
success

Whether the request succeeded.

boolean
data

Endpoint-specific response payload.

message
string
Example
Operation completed
error
string
Example
Error message

Invalid request

object
success
boolean
error
string
Example
Error message

Internal server error

object
success
boolean
error
string
Example
Error message