> ## 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.

# archiveServiceLevelAgreementPolicy

> Archive an SLA policy to retire it. Threads already on the policy keep it and their SLA trackers keep running, but it can no longer be assigned to other threads, by a user, the API or a workflow. Unarchive it to assign it again. Requires the `serviceLevelAgreement:edit` permission.



**mutation** `archiveServiceLevelAgreementPolicy(input: ArchiveServiceLevelAgreementPolicyInput!): ArchiveServiceLevelAgreementPolicyOutput!`

## Arguments

**`input`**: `ArchiveServiceLevelAgreementPolicyInput!` (required)

## Returns

`ArchiveServiceLevelAgreementPolicyOutput!`

**`serviceLevelAgreementPolicy`**: `ServiceLevelAgreementPolicy`

---

**`error`**: `MutationError`

## Examples

```graphql Mutation
mutation ArchiveServiceLevelAgreementPolicy($input: ArchiveServiceLevelAgreementPolicyInput!) {
  archiveServiceLevelAgreementPolicy(input: $input) {
    serviceLevelAgreementPolicy {
      id
      name
      description
      targets {
        id
        type
        minutes
        warnBefore {
          __typename
        }
        pauseOnStatusDetailTypes
        businessHoursSchedules {
          __typename
        }
      }
      isArchived
      archivedAt {
        unixTimestamp
        iso8601
      }
    }
    error {
      message
      type
      code
      fields {
        field
        message
        type
      }
    }
  }
}
```

```json Variables
{
  "input": {
    "serviceLevelAgreementPolicyId": "id"
  }
}
```

```json Response
{
  "data": {
    "archiveServiceLevelAgreementPolicy": {
      "serviceLevelAgreementPolicy": {
        "id": "id",
        "name": "string",
        "description": "string",
        "targets": [
          {
            "id": "id",
            "type": "FIRST_RESPONSE_TIME",
            "minutes": 1,
            "warnBefore": {
              "__typename": "ServiceLevelAgreementWarnBefore"
            },
            "pauseOnStatusDetailTypes": [
              "WAITING_FOR_CUSTOMER"
            ],
            "businessHoursSchedules": [
              {
                "__typename": "BusinessHoursSchedule"
              }
            ]
          }
        ],
        "isArchived": true,
        "archivedAt": {
          "unixTimestamp": "string",
          "iso8601": "string"
        }
      },
      "error": {
        "message": "string",
        "type": "VALIDATION",
        "code": "string",
        "fields": [
          {
            "field": "string",
            "message": "string",
            "type": "VALIDATION"
          }
        ]
      }
    }
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.