Update environment
curl --request PATCH \
--url https://app.kosli.com/api/v2/environments/{org}/{env_name} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "<string>",
"include_scaling": true,
"included_environments": [
"<string>"
],
"policies": [
"<string>"
]
}
'import requests
url = "https://app.kosli.com/api/v2/environments/{org}/{env_name}"
payload = {
"description": "<string>",
"include_scaling": True,
"included_environments": ["<string>"],
"policies": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
description: '<string>',
include_scaling: true,
included_environments: ['<string>'],
policies: ['<string>']
})
};
fetch('https://app.kosli.com/api/v2/environments/{org}/{env_name}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.kosli.com/api/v2/environments/{org}/{env_name}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'description' => '<string>',
'include_scaling' => true,
'included_environments' => [
'<string>'
],
'policies' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.kosli.com/api/v2/environments/{org}/{env_name}"
payload := strings.NewReader("{\n \"description\": \"<string>\",\n \"include_scaling\": true,\n \"included_environments\": [\n \"<string>\"\n ],\n \"policies\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://app.kosli.com/api/v2/environments/{org}/{env_name}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"<string>\",\n \"include_scaling\": true,\n \"included_environments\": [\n \"<string>\"\n ],\n \"policies\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.kosli.com/api/v2/environments/{org}/{env_name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"<string>\",\n \"include_scaling\": true,\n \"included_environments\": [\n \"<string>\"\n ],\n \"policies\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body"<string>"Update environment
Update an existing Environment for an organization. Only fields present in the request body are updated; omitted fields are left unchanged. Unlike the PUT endpoint, an empty string for description will clear the description.
PATCH
/
environments
/
{org}
/
{env_name}
Update environment
curl --request PATCH \
--url https://app.kosli.com/api/v2/environments/{org}/{env_name} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "<string>",
"include_scaling": true,
"included_environments": [
"<string>"
],
"policies": [
"<string>"
]
}
'import requests
url = "https://app.kosli.com/api/v2/environments/{org}/{env_name}"
payload = {
"description": "<string>",
"include_scaling": True,
"included_environments": ["<string>"],
"policies": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
description: '<string>',
include_scaling: true,
included_environments: ['<string>'],
policies: ['<string>']
})
};
fetch('https://app.kosli.com/api/v2/environments/{org}/{env_name}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.kosli.com/api/v2/environments/{org}/{env_name}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'description' => '<string>',
'include_scaling' => true,
'included_environments' => [
'<string>'
],
'policies' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.kosli.com/api/v2/environments/{org}/{env_name}"
payload := strings.NewReader("{\n \"description\": \"<string>\",\n \"include_scaling\": true,\n \"included_environments\": [\n \"<string>\"\n ],\n \"policies\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://app.kosli.com/api/v2/environments/{org}/{env_name}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"<string>\",\n \"include_scaling\": true,\n \"included_environments\": [\n \"<string>\"\n ],\n \"policies\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.kosli.com/api/v2/environments/{org}/{env_name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"<string>\",\n \"include_scaling\": true,\n \"included_environments\": [\n \"<string>\"\n ],\n \"policies\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body"<string>"Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
200 - application/json
Successful Response
The response is of type string.
Last modified on June 18, 2026
⌘I