Update environment settings
Update the build, runtime, and regional settings for an environment.
All settings fields are optional. Omit a field to leave it unchanged. For
nullable fields (dockerfile, healthcheck, openapiSpecPath), send null
to clear the value. When regions is present it replaces the full set of
regions for the environment.
Required Permissions
Your root key must have one of the following permissions:
environment.*.update_environment(to update any environment)environment.<environment_id>.update_environment(to update 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_-]+$
Path to the Dockerfile used for builds.
Omit to leave unchanged; set null to clear and fall back to Railpack.
Length: 1–500
The directory your app lives in. Unkey builds from here.
Use "." for the repository root, or set a subdirectory when your app
is nested (e.g., services/api). Omit to leave unchanged.
Length: 1–500
Overrides the build command auto-detected by Railpack.
Omit to leave unchanged; set null to clear and fall back to auto-detection.
Length: 1–1000
Glob paths that trigger auto-deploys when changed.
Omit to leave unchanged.
Items: max 10
Whether pushes auto-deploy.
Omit to leave unchanged.
CPU allocation in vCPUs. Minimum 0.25 (1/4 vCPU), in steps of 0.25.
The upper bound is your workspace's per-instance quota; exceeding it returns 400.
Omit to leave unchanged.
Range: >= 0.25Multiple of: 0.25
Memory allocation in MiB. Minimum 256, in steps of 256.
The upper bound is your workspace's per-instance quota; exceeding it returns 400.
Omit to leave unchanged.
Range: >= 256Multiple of: 256
Ephemeral storage allocation in MiB, in steps of 512 (0 for none).
The upper bound is your workspace's per-instance quota; exceeding it returns 400.
Omit to leave unchanged.
Range: >= 0Multiple of: 512
HTTP healthcheck configuration.
Omit to leave unchanged; set null to remove.
Show child attributesHide child attributes
SIGTERMSIGINTSIGQUITSIGKILLPath to the OpenAPI spec file within the build. Must start with a slash.
Omit to leave unchanged; set null to clear.
Length: 1–512Pattern: ^(/[\w\-]+)+(\.[\w]+)?$
Desired set of regions with per-region replica bounds.
Omit to leave regions unchanged; when present, this replaces the full set
(regions absent from the list are removed). At least one region is required;
an empty list is rejected because an environment cannot have zero regions.
Items: 1–5
Show child attributesHide child attributes
Responses
requestId is particularly important when troubleshooting issues with the Unkey support team.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).