Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.qoder.com/llms.txt

Use this file to discover all available pages before exploring further.

PUT /v1/environments/{environment_id} Updates the properties of the specified environment (name, description, configuration, and so on).

Headers

HeaderRequiredDescription
AuthorizationYesBearer <PAT>
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
namestringNoNew environment name
descriptionstringNoNew environment description
configobjectNoNew environment configuration
config.typestringYes (when config is sent)Always "cloud"
config.networkingobjectNoNetwork access configuration
config.networking.typestringNoNetwork type: "unrestricted", "limited", or "allowlist"
config.networking.allowed_hostsarrayNoAllowlist of hosts
config.networking.allow_package_managersbooleanNoWhether to allow package manager network access
config.packagesobjectNoPre-installed package configuration
config.packages.aptarrayNoList of apt packages
config.packages.piparrayNoList of pip packages
config.packages.npmarrayNoList of npm packages
metadataobjectNoCustom metadata key-value pairs

Example request

curl -s -X PUT 'https://openapi.qoder.sh/api/v1/cloud/environments/env_019e3bb39b6774d8878cd0b9d237574b' \
  -H "Authorization: Bearer $QODER_PAT" \
  -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",
  "status": "ready",
  "config": {
    "type": "cloud",
    "networking": {
      "type": "limited"
    },
    "packages": {
      "apt": [
        "curl"
      ]
    }
  },
  "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
statusstringEnvironment status
configobjectEnvironment configuration
created_atstringCreation time (ISO 8601)
updated_atstringLast update time (refreshed)

Errors

HTTPTypeTrigger
400invalid_request_errorInvalid request parameters
401authentication_errorPAT 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.