Update the properties of an environment, such as name, description, or configuration.
POST /api/v1/cloud/environments/{environment_id}
Updates the properties of the specified environment (name, description, configuration, and so on).
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer <PAT or SAT> |
Content-Type | Yes | application/json |
x-qoder-beta | Conditional | Required when the updated config contains storage.buckets; value oss-bucket-2026-09-23 |
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
environment_id | string | Yes | Environment unique identifier (with the env_ prefix) |
Request body
Only the fields included in the request are updated; omitted fields remain unchanged.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | Environment name |
description | string | No | Environment description |
config | Environment config | No | Replaces the stored environment configuration |
metadata | object | No | Metadata patch. String values upsert keys; null values delete keys from stored metadata |
Example request
Example response
HTTP 200 OK
Response fields
| Field | Type | Description |
|---|---|---|
id | string | Environment unique identifier |
type | string | Always "environment" |
name | string | Environment name |
description | string | Updated description |
config | Environment config | Environment configuration |
metadata | Metadata object | Custom metadata |
archived_at | string|null | Archive time (ISO 8601), null when not archived |
created_at | string | Creation time (ISO 8601) |
updated_at | string | Last update time (refreshed) |
Errors
| HTTP | Type | Trigger |
|---|---|---|
| 400 | invalid_request_error | Invalid request body, config, or metadata value |
| 400 | invalid_request_error | Invalid config.storage.buckets, missing the x-qoder-beta header, or the save-time probe was refused |
| 401 | authentication_error | PAT or SAT invalid or expired |
| 403 | permission_error | Not authorized for this resource |
| 404 | not_found_error | Environment with the given ID does not exist |
| 503 | feature_not_available | The account is not eligible for the oss_bucket Beta |
| 503 | api_error | OSS / STS was temporarily unavailable during the save-time probe; retry |
Notes
- Omitted fields remain unchanged.
- When
configis provided, it replaces the stored configuration. config.storage.buckets[].credentialis write-only and preserved per bucketname. Omitting a bucket'scredential, or echoing the masked value you read back, keeps the stored credential; renaming the bucket, changingcredential.type, or sendingnullrequires a full credential.- Removing a bucket from
config.storage.buckets, or sending"buckets": [], removes its mount. - When
metadatais provided, string values are merged into the stored metadata object andnullvalues delete existing keys. - See Mount your own OSS buckets (Beta) for the full bucket mount contract.