# deleteWorkflow

```graphql
mutation DeleteWorkflow($projectReference: String!, $workflowId: String!) {
  deleteWorkflow(projectReference: $projectReference, workflowId: $workflowId) {
    ok
  }
}
```

Delete the source file of a workflow that is no longer needed; returns the acknowledgement ok: true. Requires project.runs.write.

## Arguments

| Name                     | Type             | Required | Description                                                               |
| ------------------------ | ---------------- | -------- | ------------------------------------------------------------------------- |
| `projectReference`       | String!          | Yes      |                                                                           |
| `workflowId`             | String!          | Yes      |                                                                           |
| `input`                  | WriteTargetInput |          |                                                                           |
| `input.sourceTargetKind` | WriteTargetKind  |          | The source to write; default project. One of `project`, `preview_branch`. |
| `input.targetBranchId`   | ID               |          | Required with the kind preview\_branch.                                   |

## Variables

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

## Responses

| Status | Description                                       |
| ------ | ------------------------------------------------- |
| 200    | The SourceDeletionResult! in data.deleteWorkflow. |

## 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 DeleteWorkflow($projectReference: String!, $workflowId: String!) {\n  deleteWorkflow(projectReference: $projectReference, workflowId: $workflowId) {\n    ok\n  }\n}",
  "variables": {
    "projectReference": "string",
    "workflowId": "string"
  }
}'
```

## Example response

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