# deleteRun

```graphql
mutation DeleteRun($command: RunsDeleteRunCommand!) {
  deleteRun(command: $command) {
    ok
  }
}
```

Delete a run. Requires project.runs.admin; API keys also need delete scope.

## Arguments

| Name            | Type                  | Required | Description                                                                                                                                                                                                                                                                                                                                                                         |
| --------------- | --------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `command`       | RunsDeleteRunCommand! | Yes      |                                                                                                                                                                                                                                                                                                                                                                                     |
| `command.runId` | ID!                   | Yes      | Run to delete. Must be completed, failed or cancelled, with execution stopped, no direct children, and no active parent; otherwise deletion returns 409. Conversation-owned runs also require admin access on the conversation. Run-scoped credentials cannot delete runs. Deleting a run also deletes its events and owned input requests; referenced artifact files are retained. |

## Variables

```json
{
  "command": {
    "runId": "string"
  }
}
```

## Responses

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

## 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 DeleteRun($command: RunsDeleteRunCommand!) {\n  deleteRun(command: $command) {\n    ok\n  }\n}",
  "variables": {
    "command": {
      "runId": "string"
    }
  }
}'
```

## Example response

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