Manage the environment variables stored on a container: list the current set, merge a batch of updates, set a single variable, or remove one. Use these endpoints to inject configuration — database URLs, feature flags, runtime flags, secrets — that processes inside the container can read via their environment or from /etc/environment.
Changes are written to /etc/environment inside the container (visible to PAM and SSH on next login) and applied to the container runtime environment (visible to new exec or console sessions). Already-running processes keep their previous copy until they re-exec.
Merge environment variables into the container using merge semantics: existing keys are overwritten, new keys are added, and keys not present in the body are left unchanged.
The body is a JSON object whose keys are the environment variable names and whose values are the corresponding string values. Each value is a string with a maximum length of 32,768 characters. Keys must match the pattern ^[a-zA-Z_][a-zA-Z0-9_]*$ and be at most 256 characters long. Between 1 and 200 keys must be provided.
Check the error message for specific field requirements and correct your input
INVALID_ENV_KEY
Invalid Environment Variable Key
The environment variable key is invalid. Keys must start with a letter or underscore, contain only alphanumeric characters and underscores, and must not start with the reserved HOODY_ prefix.
Use a key that matches [a-zA-Z_][a-zA-Z0-9_]* and does not start with HOODY_.
RESERVED_ENV_PREFIX
Reserved Environment Variable Prefix
Environment variable keys starting with HOODY_ are reserved for system use and cannot be set or deleted by users.
Use a different key name that does not start with HOODY_.
MISSING_TOKEN
Authentication token missing
No authentication token was provided in the request
Include a valid JWT token in the Authorization header as Bearer <token>
RESOURCE_ACCESS_DENIED
Resource access denied
You do not have permission to access this specific resource
Ensure you own this resource or have been granted access by the owner
CONTAINER_NOT_FOUND
Container not found
The requested container does not exist or you do not have permission to access it.
Verify the container ID is correct and that you have access to the project it belongs to.
Check the error message for specific field requirements and correct your input
INVALID_ENV_KEY
Invalid Environment Variable Key
The environment variable key is invalid. Keys must start with a letter or underscore, contain only alphanumeric characters and underscores, and must not start with the reserved HOODY_ prefix.
Use a key that matches [a-zA-Z_][a-zA-Z0-9_]* and does not start with HOODY_.
RESERVED_ENV_PREFIX
Reserved Environment Variable Prefix
Environment variable keys starting with HOODY_ are reserved for system use and cannot be set or deleted by users.
Use a different key name that does not start with HOODY_.
MISSING_TOKEN
Authentication token missing
No authentication token was provided in the request
Include a valid JWT token in the Authorization header as Bearer <token>
RESOURCE_ACCESS_DENIED
Resource access denied
You do not have permission to access this specific resource
Ensure you own this resource or have been granted access by the owner
CONTAINER_NOT_FOUND
Container not found
The requested container does not exist or you do not have permission to access it.
Verify the container ID is correct and that you have access to the project it belongs to.
Remove a single environment variable from the container. The operation is idempotent — it returns 200 whether the key existed or not — and the variable is removed from both /etc/environment and the container runtime environment.