Skip to main content
POST
/
environments
/
{org}
/
{env_name}
/
policies
Attach policy to environment
curl --request POST \
  --url https://app.kosli.com/api/v2/environments/{org}/{env_name}/policies \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "policy_names": [
    "<string>"
  ]
}
'

Authorizations

Authorization
string
header
required

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

Path Parameters

env_name
string
required
org
string
required

Body

application/json
policy_names
string[]
required

List of policy names to attach/detach

Response

Policy attached successfully

Last modified on April 7, 2026