# deleteDraftContent

```graphql
mutation DeleteDraftContent($input: DeleteDraftContentInput!) {
  deleteDraftContent(input: $input) {
    ok
  }
}
```

Delete draft content. Requires project.files.write; API keys also need delete scope.

## Arguments

| Name                     | Type                     | Required | Description                                                                                     |
| ------------------------ | ------------------------ | -------- | ----------------------------------------------------------------------------------------------- |
| `input`                  | DeleteDraftContentInput! | Yes      |                                                                                                 |
| `input.projectReference` | String                   |          |                                                                                                 |
| `input.entityId`         | ID!                      | Yes      | Source-file path or UUID whose pending updates are discarded without deleting committed source. |
| `input.entityType`       | DraftEntityType!         | Yes      | Retained legacy hint. One of `page`, `component`, `function`, `virtual_file`.                   |
| `input.branchId`         | ID                       |          |                                                                                                 |
| `input.branchReference`  | String                   |          | Branch name or UUID. Conflicting branchId aliases are rejected; omit/null for main.             |

## Variables

```json
{
  "input": {
    "entityId": "string",
    "entityType": "page"
  }
}
```

## Responses

| Status | Description                                                |
| ------ | ---------------------------------------------------------- |
| 200    | The DeleteDraftContentPayload! in data.deleteDraftContent. |

## 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 DeleteDraftContent($input: DeleteDraftContentInput!) {\n  deleteDraftContent(input: $input) {\n    ok\n  }\n}",
  "variables": {
    "input": {
      "entityId": "string",
      "entityType": "page"
    }
  }
}'
```

## Example response

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