Create Environment
Request Body
Name of the environment. Must be at least 1 character. Cannot be
production (this name is reserved for the default environment).Optional description of the environment’s purpose.
ID of the project this environment belongs to.
Response
Unique identifier for the created environment.
Environment name.
Environment description.
Associated project ID.
Environment variables (empty string by default).
Whether this is the default environment.
ISO 8601 timestamp when the environment was created.
Get Environment
Query Parameters
ID of the environment to retrieve.
Response
Returns the environment object with all associated applications, databases, and compose services. For member users, only services they have access to are included.Environment identifier.
Environment name.
Environment description.
Environment variables in KEY=VALUE format (newline-separated).
Project this environment belongs to.
Array of applications in this environment.
Array of PostgreSQL databases in this environment.
Array of MySQL databases in this environment.
Array of MariaDB databases in this environment.
Array of MongoDB databases in this environment.
Array of Redis databases in this environment.
Array of compose services in this environment.
Get Environments by Project
Query Parameters
ID of the project.
Response
Returns an array of environments belonging to the project. For member users, only environments they have access to are included.Update Environment
Request Body
ID of the environment to update.
New name for the environment. Cannot rename the default environment.
Updated description.
Environment variables in KEY=VALUE format, separated by newlines. These variables are available to all services in the environment.Example:
Project ID (cannot be changed for existing environments).
Delete Environment
Request Body
ID of the environment to delete.
Duplicate Environment
Create a copy of an existing environment with all its configuration.Request Body
ID of the environment to duplicate.
Name for the new environment.
Description for the new environment.
Response
Returns the newly created environment with the same configuration as the source environment.Environment Variables Best Practices
Variable Format
Environment variables should be inKEY=VALUE format, with one variable per line:
Security
- Store sensitive values like API keys and passwords in environment variables
- Never commit environment variables to version control
- Use different values for different environments (staging vs production)
- Rotate secrets regularly
Variable Precedence
When the same variable is defined in multiple places:- Service-level environment variables (highest priority)
- Environment-level variables
- Default values in your application code (lowest priority)