# Update an Environment Endpoint: PATCH /2/teams/{teamSlug}/environments/{ID} Version: 1.0.0 Security: bearerAuth ## Path parameters: - `teamSlug` (string, required) The slug of the Team - `ID` (string, required) A unique identifier ## Request fields (application/vnd.api+json): - `data` (object, required) - `data.id` (string, required) - `data.type` (string, required) Enum: "environments" - `data.attributes` (object, required) - `data.attributes.description` (string) - `data.attributes.color` (string) Enum: "blue", "green", "gold", "red", "purple", "lightBlue", "lightGreen", "lightGold", "lightRed", "lightPurple" - `data.attributes.settings` (object) - `data.attributes.settings.delete_protected` (boolean) If true, the environment cannot be deleted. ## Response 200 fields (application/vnd.api+json): - `data` (object, required) - `data.id` (string, required) - `data.type` (string, required) Enum: "environments" - `data.links` (object, required) - `data.links.self` (string, required) - `data.attributes` (object, required) - `data.attributes.name` (string, required) - `data.attributes.description` (string, required) - `data.attributes.color` (any, required) 'classic' color is used only for auto-created Classic environments and cannot be set on any other environment. Classic environments cannot be set to any other color. - `data.attributes.slug` (string, required) - `data.attributes.settings` (object, required) - `data.attributes.settings.delete_protected` (boolean, required) If true, the environment cannot be deleted. ## Response 400 fields (application/problem+json): - `error` (string, required) - `status` (number, required) The HTTP status code of the error. - `type` (string, required) Type is a URI used to uniquely identify the type of error. - `title` (string, required) Title is a human-readable summary that explains the of the problem. - `detail` (string) The general, human-readable error message. - `instance` (string) The unique identifier (ID) for this specific error. ## Response 401 fields (application/json): - `error` (string) ## Response 403 fields (application/json): - `error` (string) ## Response 404 fields (application/json): - `error` (string) ## Response 413 fields (application/json): - `error` (string, required) - `status` (number, required) The HTTP status code of the error. - `type` (string, required) Type is a URI used to uniquely identify the type of error. - `title` (string, required) Title is a human-readable summary that explains the of the problem. - `detail` (string) The general, human-readable error message. - `instance` (string) The unique identifier (ID) for this specific error. ## Response 415 fields (application/vnd.api+json): - `errors` (array) - `errors.id` (string, required) - `errors.status` (string) - `errors.code` (string, required) - `errors.title` (string) - `errors.detail` (string) - `errors.source` (object) - `errors.source.pointer` (string) - `errors.source.header` (string) - `errors.source.parameter` (string) ## Response 422 fields (application/problem+json): - `error` (string, required) - `status` (number, required) The HTTP status code of the error. - `type` (string, required) Type is a URI used to uniquely identify the type of error. - `title` (string, required) Title is a human-readable summary that explains the of the problem. - `detail` (string) The general, human-readable error message. - `instance` (string) The unique identifier (ID) for this specific error. - `type_detail` (array) - `type_detail.field` (string) - `type_detail.code` (string) Enum: "invalid", "missing", "incorrect_type", "already_exists" - `type_detail.description` (string) ## Response 429 fields (application/json): - `error` (string) ## Response 500 fields (application/problem+json): - `error` (string, required) - `status` (number, required) The HTTP status code of the error. - `type` (string, required) Type is a URI used to uniquely identify the type of error. - `title` (string, required) Title is a human-readable summary that explains the of the problem. - `detail` (string) The general, human-readable error message. - `instance` (string) The unique identifier (ID) for this specific error.