Skip to main content
Environments

Update an environment

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

HeaderRequiredDescription
AuthorizationYesBearer <PAT or SAT>
Content-TypeYesapplication/json

Path parameters

ParameterTypeRequiredDescription
environment_idstringYesEnvironment unique identifier (with the env_ prefix)

Request body

Only the fields included in the request are updated; omitted fields remain unchanged.
FieldTypeRequiredDescription
namestringNoEnvironment name
descriptionstringNoEnvironment description
configEnvironment configNoReplaces the stored environment configuration
metadataobjectNoMetadata patch. String values upsert keys; null values delete keys from stored metadata

Example request

curl -s -X POST 'https://api.qoder.com/api/v1/cloud/environments/env_019e3bb39b6774d8878cd0b9d237574b' \
  -H "Authorization: Bearer $QODER_ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "description": "Environment used for API documentation testing"
  }'

Example response

HTTP 200 OK
{
  "id": "env_019e3bb39b6774d8878cd0b9d237574b",
  "type": "environment",
  "name": "doc-test-env",
  "description": "Environment used for API documentation testing",
  "config": {
    "type": "cloud",
    "packages": {
      "type": "packages",
      "apt": ["curl"],
      "cargo": [],
      "gem": [],
      "go": [],
      "npm": [],
      "pip": []
    }
  },
  "metadata": {},
  "archived_at": null,
  "created_at": "2026-05-18T15:28:07.017808Z",
  "updated_at": "2026-05-18T15:28:08.093156Z"
}

Response fields

FieldTypeDescription
idstringEnvironment unique identifier
typestringAlways "environment"
namestringEnvironment name
descriptionstringUpdated description
configEnvironment configEnvironment configuration
metadataMetadata objectCustom metadata
archived_atstring|nullArchive time (ISO 8601), null when not archived
created_atstringCreation time (ISO 8601)
updated_atstringLast update time (refreshed)

Errors

HTTPTypeTrigger
400invalid_request_errorInvalid request body, config, or metadata value
401authentication_errorPAT or SAT invalid or expired
403permission_errorNot authorized for this resource
404not_found_errorEnvironment with the given ID does not exist
See Errors for the full error envelope.

Notes

  • Omitted fields remain unchanged.
  • When config is provided, it replaces the stored configuration.
  • When metadata is provided, string values are merged into the stored metadata object and null values delete existing keys.