---
title: "Delete the knowledge graph for a collection."
method: DELETE
path: "/graph/{collection_id}"
tags: ["GraphRAG"]
---

# Delete the knowledge graph for a collection.

`DELETE /graph/{collection_id}`

## Request

- Base URL: `https://h2ogpte.genai.h2o.ai/api/v1`
- URL: `https://h2ogpte.genai.h2o.ai/api/v1/graph/{collection_id}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/h2o/apis/h2ogpte-rest-api/docs/graph/:collection_id/delete.ts> (a function with typed inputs; its response is checked against the schema)

Tears down the collection's knowledge graph: removes the stored
tarball from object storage, drops the in-memory per-collection
lock and event loop, removes the local LightRAG cache directory,
and resets graph_status to 'none'. The collection itself is
unaffected. Auto-RAG selection will revert to normal RAG until
a new graph is built.

## Path parameters

- `collection_id` string, uuid, required

## Response `204`

Graph deleted successfully.

## Other responses

- `401`: Unauthorized - Invalid or missing API key
- `403`: Forbidden
- `default`: Unexpected error

---

[API](https://skmtc.dev/h2o/apis/h2ogpte-rest-api.md) - [All operations](https://skmtc.dev/h2o/apis/h2ogpte-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/h2o/apis/h2ogpte-rest-api/revisions/a82a117320f4?raw)
