# deleteEval

```graphql
mutation DeleteEval($projectReference: String!, $evalId: String!) {
  deleteEval(projectReference: $projectReference, evalId: $evalId) {
    ok
  }
}
```

Delete the source file of a structured eval that is no longer needed, from the project source or a preview branch; returns an acknowledgement, or a conflict when the file must be edited in code because it defines other evals or builds the eval in code. Requires project.evals.write; API keys also need delete scope.

## Arguments

| Name                     | Type             | Required | Description                                                               |
| ------------------------ | ---------------- | -------- | ------------------------------------------------------------------------- |
| `projectReference`       | String!          | Yes      |                                                                           |
| `evalId`                 | 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",
  "evalId": "string"
}
```

## Responses

| Status | Description                              |
| ------ | ---------------------------------------- |
| 200    | The Acknowledgement! in data.deleteEval. |

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

## Example response

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