---
title: "Update Policy"
method: PUT
path: "/policies"
tags: ["Projects"]
---

# Update Policy

`PUT /policies`

## Request body

- EnvironmentApiUpdatePoliciesRequestBody
  - `projectId` string, required
  - `numberOfEnvironments` number, nullable
  - `numberOfEnvironmentsTotal` number, nullable
  - `maxTtl` string, nullable — The maximum allowed TTL. Must be 6-h, 12-h, 1-d, 3-d, 1-w, 2-w, 1-M, inherit or explicit null which means infinite
  - `defaultTtl` string, nullable — The default TTL set when creating environments. Must be 6-h, 12-h, 1-d, 3-d, 1-w, 2-w, 1-M, inherit or explicit null which means infinite
  - `requiresApprovalDefault` boolean
  - `includeCostEstimation` boolean
  - `skipApplyWhenPlanIsEmpty` boolean
  - `disableDestroyEnvironments` boolean
  - `forceCheckoutOnTtlDestroy` boolean
  - `skipRedundantDeployments` boolean
  - `continuousDeploymentDefault` boolean
  - `runPullRequestPlanDefault` boolean
  - `vcsPrCommentsEnabledDefault` boolean
  - `forceRemoteBackend` boolean
  - `driftDetectionEnabled` boolean
  - `driftDetectionCron` string
  - `autoDriftRemediation` 'DISABLED' | 'CODE_TO_CLOUD' | 'CLOUD_TO_CODE' | 'SMART_REMEDIATION' | 'DISABLED' | 'CODE_TO_CLOUD' | 'CLOUD_TO_CODE' | 'SMART_REMEDIATION'
  - `outputsAsInputsEnabled` boolean

## Response `200`

- EnvironmentApiUpdatePoliciesResponse
  - `id` string, required
  - `updatedBy` string, required
  - `projectId` string, required
  - `organizationId` string
  - `numberOfEnvironments` number, nullable, required
  - `numberOfEnvironmentsTotal` number, nullable, required
  - `maxTtl` string, nullable, required
  - `defaultTtl` string, nullable, required
  - `requiresApprovalDefault` boolean, required
  - `includeCostEstimation` boolean, required
  - `skipApplyWhenPlanIsEmpty` boolean, required
  - `disableDestroyEnvironments` boolean, required
  - `forceCheckoutOnTtlDestroy` boolean, required
  - `skipRedundantDeployments` boolean, required
  - `continuousDeploymentDefault` boolean, required
  - `runPullRequestPlanDefault` boolean, required
  - `vcsPrCommentsEnabledDefault` boolean, required
  - `forceRemoteBackend` boolean, required
  - `driftDetectionEnabled` boolean
  - `driftDetectionCron` string
  - `outputsAsInputsEnabled` boolean, required
  - `autoDriftRemediation` 'DISABLED' | 'CODE_TO_CLOUD' | 'CLOUD_TO_CODE' | 'SMART_REMEDIATION' | 'DISABLED' | 'CODE_TO_CLOUD' | 'CLOUD_TO_CODE' | 'SMART_REMEDIATION'

---

[API](https://skmtc.dev/envzero/apis/env0-api.md) · [All operations](https://skmtc.dev/envzero/apis/env0-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/envzero/env0-api/revisions/513441cbe9dc/schema)
