# Delete Schedule

{% hint style="info" %}
If you attempt to delete a schedule that is mentioned in any escalation policies, you will receive an error. You need to replace the schedule with another schedule/user/squad. Please follow the example below to achieve this.
{% endhint %}

```
mutation{
  deleteSchedule(
  ID:001,
  input:[
    {
      escalationPolicyID:"6459bfd03921290fba093f98",
      scheduleIDs:[9054,9053],
      userIDs:[],
      squadIDs:[]
    }
  ]){
    schedule{
      ID,
      name,
      escalationPolicies{
        name,
        ID
      }
    }
    conflictingEscalationPolicies{
      name
    }
  }
}
```

**Response:**

```
{
  "data": {
    "deleteSchedule": {
      "schedule": {
        "ID": 001,
        "name": "Product Schedule1",
        "escalationPolicies": []
      },
      "conflictingEscalationPolicies": []
    }
  }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://support.incidents.cloud.solarwinds.com/terraform-and-api-documentation/getting-started-with-squadcast-graphql/schedules/delete-schedule.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
