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

# Confirm the removal a sync held

> Accept the documents a re-sync would remove, after the removal guard held them, and queue the sync that removes them.

When a re-sync would remove **more than 45%** of a source's documents, the removal is held. Nothing is removed, the documents are still used for answers, and the run ends with `error_code` `removal_held` and an `error_message` that says how many documents it concerns. A listing that suddenly lost most of its pages (a moved sitemap, a renamed branch, an expired token) looks exactly like a real deletion, so a person decides. The percentage is the deployment setting `ARUKZ_KNOWLEDGE_SYNC_REMOVAL_GUARD_PERCENT`.

This call is the yes. It queues a sync with `trigger` `confirmed_removal`, the one kind of run the guard does not hold, and returns `202` with that job. The held run's `error_code` becomes `removal_confirmed`. The sync removes whatever the source no longer offers when it runs. To decline instead, call [Keep the held documents](https://docs.mithunai.com/api-reference/knowledge/keep-held-documents.md).

Confirming requires a role that can delete documents; others receive `403`. `409` means the source's latest run holds no removal. An unknown ID or another organization's source returns `404`. Every decision is recorded in the audit log as `knowledge_source.removal_confirm`.

**source\_id** `string` *required*

Source ID (a UUID).

## Response

Returns `202` with the queued job, in the shape [Sync a source](https://docs.mithunai.com/api-reference/knowledge/sync-source.md) returns, with `trigger` `confirmed_removal`.

```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl --request POST "$MITHUNAI_URL/mithunai/api/v1/knowledge/sources/3f1e7c2a-9b4d-4e61-8a05-6d2c9e7b1f30/removal/confirm" \
  --header "Authorization: Bearer $MITHUNAI_API_KEY"
```

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
import os, requests

source_id = "3f1e7c2a-9b4d-4e61-8a05-6d2c9e7b1f30"
response = requests.post(
    f"{os.environ['MITHUNAI_URL']}/mithunai/api/v1/knowledge/sources/{source_id}/removal/confirm",
    headers={"Authorization": f"Bearer {os.environ['MITHUNAI_API_KEY']}"},
    timeout=60,
)
response.raise_for_status()
print(response.json())
```

```json 202 theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "id": "7b2d4f10-3c8e-4a19-b6d7-0e5f9a1c2b48",
  "collection_id": "c4a9e2f1-7d30-4b85-9e16-2a8f0c5d7b93",
  "source_id": "3f1e7c2a-9b4d-4e61-8a05-6d2c9e7b1f30",
  "status": "queued",
  "trigger": "confirmed_removal",
  "source_version": null,
  "is_active": true,
  "attempt": 1,
  "max_attempts": 3,
  "queued_at": "2026-11-07T12:00:00Z",
  "started_at": null,
  "finished_at": null,
  "next_attempt_at": null,
  "error_code": null,
  "error_message": null,
  "counters": {
    "documents_discovered": 0,
    "documents_ingested": 0,
    "documents_unchanged": 0,
    "documents_skipped": 0,
    "documents_failed": 0,
    "documents_deleted": 0,
    "chunks_written": 0,
    "bytes_fetched": 0
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.