Get environment
Retrieve a single environment by its id.
Use this to fetch environment details after creation or to verify an environment exists before performing operations.
Required Permissions
Your root key must have one of the following permissions:
environment.*.read_environment(to read any environment)environment.<environment_id>.read_environment(to read a specific environment)
Authorization
Body
application/jsonIdentifies a resource by either its unique ID or its slug.
Accepts a prefixed ID (such as 'proj_' or 'app_') or a slug.
Length: 3–255Pattern: ^[a-zA-Z0-9_-]+$
Identifies a resource by either its unique ID or its slug.
Accepts a prefixed ID (such as 'proj_' or 'app_') or a slug.
Length: 3–255Pattern: ^[a-zA-Z0-9_-]+$
Identifies a resource by either its unique ID or its slug.
Accepts a prefixed ID (such as 'proj_' or 'app_') or a slug.
Length: 3–255Pattern: ^[a-zA-Z0-9_-]+$
Responses
requestId is particularly important when troubleshooting issues with the Unkey support team.Show child attributesHide child attributes
Show child attributesHide child attributes
Human-readable description of this environment.
Empty string if none was provided.
The deployment lifecycle role of an environment.
production: Deployments serve production traffic, support promotion and rollback, and cannot be stopped.preview: Deployments can be stopped and started and are eligible for preview lifecycle automation.
productionpreviewWhether delete protection is enabled for this environment.
When true, the environment cannot be deleted until protection is disabled.
Range: 0–9223372036854776000
Unix timestamp in milliseconds when the environment was last updated.
Omitted if the environment has never been updated.
Range: 0–9223372036854776000
Runtime settings that control how the container runs.
Omitted until the environment has runtime settings.
Show child attributesHide child attributes
Show child attributesHide child attributes
Length: 1–512Pattern: ^(/[\w\-]+)+(\.[\w]+)?$
Range: 1–3600
Range: 1–100
Range: 0–3600
SIGTERMSIGINTSIGQUITSIGKILLBuild settings that control how the app is built.
Omitted until the environment has build settings.
Show child attributesHide child attributes
Overrides the build command auto-detected by Railpack, so monorepos can
scope the build to a single app. Omitted when left to auto-detection or
for Dockerfile builds.
Per-region deployment settings for this environment.
Empty until regional settings are configured.
Show child attributesHide child attributes
requestId is particularly important when troubleshooting issues with the Unkey support team.Show child attributesHide child attributes
Show child attributesHide child attributes
400 (Bad Request), 401 (Unauthorized), 403 (Forbidden), 404 (Not Found), 409 (Conflict), and 500 (Internal Server Error).Show child attributesHide child attributes
JSON path indicating exactly where in the request the error occurred. This helps pinpoint the problematic field or parameter. Examples include:
- 'body.name' (field in request body)
- 'body.items[3].tags' (nested array element)
- 'path.apiId' (path parameter)
- 'query.limit' (query parameter)
Use this location to identify exactly which part of your request needs correction.
requestId is particularly important when troubleshooting issues with the Unkey support team.Show child attributesHide child attributes
Show child attributesHide child attributes
400 (Bad Request), 401 (Unauthorized), 403 (Forbidden), 404 (Not Found), 409 (Conflict), and 500 (Internal Server Error).requestId is particularly important when troubleshooting issues with the Unkey support team.Show child attributesHide child attributes
Show child attributesHide child attributes
400 (Bad Request), 401 (Unauthorized), 403 (Forbidden), 404 (Not Found), 409 (Conflict), and 500 (Internal Server Error).requestId is particularly important when troubleshooting issues with the Unkey support team.Show child attributesHide child attributes
Show child attributesHide child attributes
400 (Bad Request), 401 (Unauthorized), 403 (Forbidden), 404 (Not Found), 409 (Conflict), and 500 (Internal Server Error).requestId is particularly important when troubleshooting issues with the Unkey support team.Show child attributesHide child attributes
Show child attributesHide child attributes
400 (Bad Request), 401 (Unauthorized), 403 (Forbidden), 404 (Not Found), 409 (Conflict), and 500 (Internal Server Error).requestId is particularly important when troubleshooting issues with the Unkey support team.Show child attributesHide child attributes
Show child attributesHide child attributes
400 (Bad Request), 401 (Unauthorized), 403 (Forbidden), 404 (Not Found), 409 (Conflict), and 500 (Internal Server Error).