# Delete eval

```http
DELETE /projects/{project_reference}/evals/{eval_id}
```

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.

## Parameters

| Name                 | In    | Required | Description                                                     |
| -------------------- | ----- | -------- | --------------------------------------------------------------- |
| `project_reference`  | path  | Yes      | Project slug, UUID, or domain that identifies the project.      |
| `eval_id`            | path  | Yes      |                                                                 |
| `source_target_kind` | query |          | Source to use: project or preview\_branch. Defaults to project. |
| `target_branch_id`   | query |          | Preview branch to use when the target kind is preview\_branch.  |

## Responses

| Status | Description                                                                                                 |
| ------ | ----------------------------------------------------------------------------------------------------------- |
| 200    | The eval source file was deleted.                                                                           |
| 400    | Bad request                                                                                                 |
| 401    | Unauthorized                                                                                                |
| 403    | Forbidden. API keys also require delete scope.                                                              |
| 404    | Not found                                                                                                   |
| 409    | Conflict                                                                                                    |
| 500    | Server error                                                                                                |
| 503    | internal: authentication state is temporarily unavailable and the request was not processed; retry shortly. |
