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

# unarchiveServiceLevelAgreementPolicy

> Restore an archived SLA policy so it can be assigned to threads again. Requires the `serviceLevelAgreement:edit` permission.



**mutation** `unarchiveServiceLevelAgreementPolicy(input: UnarchiveServiceLevelAgreementPolicyInput!): UnarchiveServiceLevelAgreementPolicyOutput!`

## Arguments

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

## Returns

`UnarchiveServiceLevelAgreementPolicyOutput!`

**`serviceLevelAgreementPolicy`**: `ServiceLevelAgreementPolicy`

---

**`error`**: `MutationError`

## Examples

```graphql Mutation
mutation UnarchiveServiceLevelAgreementPolicy($input: UnarchiveServiceLevelAgreementPolicyInput!) {
  unarchiveServiceLevelAgreementPolicy(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": {
    "unarchiveServiceLevelAgreementPolicy": {
      "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.