> ## Documentation Index
> Fetch the complete documentation index at: https://www.plain.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Manage SLA policies

> Create, update, and delete SLA policies and their targets.

A policy is created with its targets in one call, and updated by passing the full set of targets it should have afterwards. For what each field means, see [What a policy contains](/docs/product/platform/slas#what-a-policy-contains).

<Snippet file="graphql/sdk-note.mdx" />

These operations require the following permissions:

* `serviceLevelAgreement:create`
* `serviceLevelAgreement:edit`
* `serviceLevelAgreement:delete`

## Create an SLA policy

Each target needs a `type`, a `minutes` value, and a `warnBefore` period that is shorter than the target. Pass `businessHoursScheduleIds` for a target to count only while one of those schedules is open. Leave it out or pass an empty array for the target to count around the clock. A policy only starts tracking once it's applied to a thread.

<Snippet file="graphql/create-sla-policy.mdx" />

## Update an SLA policy

`targets` is the full set the policy should have after the update. A target whose type already exists is updated in place, so threads tracking it keep their deadlines. A new type is added, and a type you leave out is removed along with its trackers. Leave `businessHoursScheduleIds` out of a target for it to keep the schedules it already has.

Field-level wrapper inputs apply to `name` and `description`: pass `{ "value": ... }` for the fields you want to change and omit the rest.

<Snippet file="graphql/update-sla-policy.mdx" />

## Delete an SLA policy

Deleting a policy deletes its targets and their trackers, and threads it was applied to stop tracking SLAs. If your workspace still has legacy tier SLAs, those threads return to their tier's SLAs.

<Snippet file="graphql/delete-sla-policy.mdx" />
