Skip to main content
Update or add environment variables. Merges with existing variables - only specified variables are updated, others are preserved.

Endpoint

PATCH /env

Request

Headers

Authorization: Bearer YOUR_JWT_TOKEN
Content-Type: application/json

Body Parameters

ParameterTypeRequiredDescription
env_varsobjectYesDictionary of variables to update/add
mergebooleanYesMust be true for merge behavior

Example Request

curl -X PATCH https://sandbox_abc123xyz.hopx.dev/env \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "env_vars": {
      "DEBUG": "true",
      "NEW_VAR": "value"
    },
    "merge": true
  }'

Response

Success (204 No Content)

Empty response on success.

Status Codes

CodeDescription
204Variables updated successfully
400Invalid request
401Unauthorized

Use Cases

Add New Variables

curl -X PATCH https://sandbox_abc123xyz.hopx.dev/env \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "env_vars": {
      "FEATURE_FLAG": "enabled"
    },
    "merge": true
  }'

Next Steps