# deleteSchedule

```graphql
mutation DeleteSchedule($projectReference: String!, $scheduleId: ID!) {
  deleteSchedule(projectReference: $projectReference, scheduleId: $scheduleId) {
    ok
  }
}
```

Delete a schedule that is no longer needed so that it starts no more runs; returns the acknowledgement ok: true. Requires project.runs.write; API keys also need delete scope.

## Arguments

| Name               | Type    | Required | Description |
| ------------------ | ------- | -------- | ----------- |
| `projectReference` | String! | Yes      |             |
| `scheduleId`       | ID!     | Yes      |             |

## Variables

```json
{
  "projectReference": "string",
  "scheduleId": "string"
}
```

## Responses

| Status | Description                                         |
| ------ | --------------------------------------------------- |
| 200    | The ScheduleDeletionResult! in data.deleteSchedule. |

## Call it

```bash
curl -X POST "https://api.veryfront.com/graphql" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "query": "mutation DeleteSchedule($projectReference: String!, $scheduleId: ID!) {\n  deleteSchedule(projectReference: $projectReference, scheduleId: $scheduleId) {\n    ok\n  }\n}",
  "variables": {
    "projectReference": "string",
    "scheduleId": "string"
  }
}'
```

## Example response

```json
{
  "data": {
    "deleteSchedule": {
      "ok": false
    }
  }
}
```
