Skip to main content
PATCH
/
projects
/
{slug}
/
environments
/
{environmentSlug}
/
variables
/
{name}
Update variable by name
curl --request PATCH \
  --url https://api.envless.cloud/projects/{slug}/environments/{environmentSlug}/variables/{name} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "DATABASE_URL",
  "value": "v1:5J9k...==",
  "isSecret": true
}
'
{
  "success": true,
  "code": 200,
  "message": "Variable updated.",
  "data": {
    "id": "<string>",
    "name": "<string>",
    "value": "<string>",
    "type": "<string>",
    "environmentId": "<string>",
    "updatedAt": "2023-11-07T05:31:56Z",
    "createdAt": "2023-11-07T05:31:56Z"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.envless.cloud/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Personal access key from https://app.envless.cloud/keys. Pass as Authorization: Bearer ev_live_....

Path Parameters

slug
string
required

The project's slug.

environmentSlug
string
required

The environment's slug.

name
string
required

The variable's current name (before rename, if any).

Body

application/json
name
string
Example:

"DATABASE_URL"

value
string

AES-GCM ciphertext, base64-encoded, prefixed with v1:.

Example:

"v1:5J9k...=="

type
enum<string>
Available options:
string,
number,
boolean
isSecret
boolean

Response

Variable updated

success
boolean
Example:

true

code
integer
Example:

200

message
string
Example:

"Variable updated."

data
object