---
title: "Delete ALL nodes and edges in a KG"
method: DELETE
path: "/api/v0/knowledge-bases/{kb_id}/graph/nodes"
tags: ["Knowledge Base Graph"]
---

# Delete ALL nodes and edges in a KG

`DELETE /api/v0/knowledge-bases/{kb_id}/graph/nodes`

## Request

- Base URL: `https://api.outerport.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.outerport.com/api/v0/knowledge-bases/{kb_id}/graph/nodes`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/outerport/apis/outerport-api/docs/api/v0/knowledge-bases/:kb_id/graph/nodes/delete.ts> (a function with typed inputs; its response is checked against the schema)

Clears the knowledge graph: every node and every edge (projected, bootstrapped, and manually created alike) is deleted. Documents, their visual components, and package subscriptions are untouched, so a subsequent initialize/project starts from a clean slate. If extraction provenance, current/historical claims, or resolutions exist, the request returns 409 unless discard_evidence=true explicitly permits their permanent deletion. Export an archive before discarding them.

## Path parameters

- `kb_id` string, uuid, required

## Query parameters

- `discard_evidence` boolean: Explicitly and permanently delete all extraction runs, extraction sources, current or historical attribute claims, and fact resolutions with the graph.

## Response `200`

Successful Response

- NodesDeleteAllResponse
  - `nodes_deleted` integer, required
  - `edges_deleted` integer, required

## Other responses

- `422`: Validation Error

## Changes

- **2026-09-25** `fcd15f6d35b4`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/outerport/apis/outerport-api/changes/api/v0/knowledge-bases/:kb_id/graph/nodes/delete.md)

---

[API](https://skmtc.dev/outerport/apis/outerport-api.md) - [All operations](https://skmtc.dev/outerport/apis/outerport-api/llms.txt) - [OpenAPI document](https://skmtc.dev/outerport/apis/outerport-api/revisions/08b5bf6f7f18?raw)
