Skip to main content
PUT
/
environments
/
{org}
Create or update environment
curl --request PUT \
  --url https://app.kosli.com/api/v2/environments/{org} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "type": "K8S",
  "description": "<string>",
  "include_scaling": true,
  "require_provenance": true,
  "included_environments": [
    "<string>"
  ],
  "policies": [
    "<string>"
  ]
}
'

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

org
string
required

Body

application/json
name
string
required
Pattern: ^[a-zA-Z0-9][a-zA-Z0-9\.\-_~]*$
type
enum<string>
required
Available options:
K8S,
ECS,
S3,
lambda,
server,
docker,
azure-apps,
logical
description
string
required
include_scaling
boolean | null
require_provenance
boolean | null
deprecated

This field is deprecated and will be removed in a future version. Use policies instead.

included_environments
string[] | null
policies
string[] | null

Response

201 - application/json

Successful Response

Last modified on April 9, 2026