Graphs API
Base path
Section titled “Base path”All graph endpoints are relative to /graphs.
Create a graph
Section titled “Create a graph”POST /graphsRequest body
{ "name": "my-knowledge-graph", "description": "Customer relationship graph"}Response 201
{ "id": "grph_01j9abc123", "name": "my-knowledge-graph", "description": "Customer relationship graph", "tenantId": "tnt_xyz", "createdAt": "2026-01-15T10:00:00Z"}List graphs
Section titled “List graphs”GET /graphsResponse 200
{ "graphs": [ { "id": "grph_01j9abc123", "name": "my-knowledge-graph", "createdAt": "2026-01-15T10:00:00Z" } ], "total": 1}Get a graph
Section titled “Get a graph”GET /graphs/{graphId}Response 200 — returns the graph object plus schema summary.
Delete a graph
Section titled “Delete a graph”DELETE /graphs/{graphId}Response 204 — no body.
Deleting a graph removes the D1 metadata record and clears the Durable Object storage. This operation is irreversible.
Error codes
Section titled “Error codes”| Status | Meaning |
|---|---|
404 | Graph not found or does not belong to your tenant |
409 | A graph with this name already exists |