Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.hopx.ai/llms.txt

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

Replace all global environment variables in the sandbox. This operation clears existing variables and sets new ones.
This replaces ALL environment variables. Use PATCH /env to merge variables instead.

Endpoint

PUT /env

Request

Headers

Authorization: Bearer YOUR_JWT_TOKEN
Content-Type: application/json

Body Parameters

ParameterTypeRequiredDescription
env_varsobjectYesDictionary of environment variables

Example Request

curl -X PUT https://sandbox_abc123xyz.hopx.dev/env \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "env_vars": {
      "DATABASE_URL": "postgres://localhost/prod",
      "API_KEY": "sk-prod-123",
      "DEBUG": "false"
    }
  }'

Response

Success (204 No Content)

Empty response on success.

Status Codes

CodeDescription
204Variables set successfully
400Invalid request
401Unauthorized

Use Cases

Reset Variables

curl -X PUT https://sandbox_abc123xyz.hopx.dev/env \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "env_vars": {
      "ENVIRONMENT": "production",
      "LOG_LEVEL": "info"
    }
  }'

Next Steps