> ## Documentation Index
> Fetch the complete documentation index at: https://docs.withmithras.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Cancel Legacy

> Cancel a legacy queue item created through ingest.

# Cancel Legacy

`POST /cancel` is the compatibility cancellation endpoint for legacy queue-item posting.

```http theme={null}
POST /cancel
```

Use this only for queue items addressed by `account_id + content_id`.

## Request Example

```bash theme={null}
curl -X POST "$PHONEFARM_BASE_URL/cancel" \
  -H "Authorization: Bearer $PHONEFARM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content_id": "content-2026-03-22-001",
    "account_id": "account_user095916355",
    "reason": "video needs re-editing"
  }'
```

## Success Response

```json theme={null}
{
  "status": "cancelled",
  "queue_item_id": "7c1a07f6-1d55-4f79-a403-8a8420f1b62b",
  "previous_status": "QUEUED"
}
```

## Cancelability Rules

Currently cancellable:

* `QUEUED`
* `SCHEDULED`

Currently not cancellable:

* `CLAIMED`
* `EXECUTING`
* `DONE`

Non-cancellable states return `409`.

## Failure Modes

| Status code | Meaning                                                      |
| ----------- | ------------------------------------------------------------ |
| `401`       | Missing or invalid bearer token.                             |
| `404`       | Queue item not found.                                        |
| `409`       | Queue item already in progress or otherwise not cancellable. |
| `422`       | Invalid payload.                                             |
| `500`       | Unexpected cancellation failure.                             |

## Read Next

* [Ingest Legacy](./ingest-legacy)
* [Cancel Process](./processes-cancel)
