Skip to content

Graphs API

All graph endpoints are relative to /graphs.


Terminal window
POST /graphs

Request 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"
}

Terminal window
GET /graphs

Response 200

{
"graphs": [
{ "id": "grph_01j9abc123", "name": "my-knowledge-graph", "createdAt": "2026-01-15T10:00:00Z" }
],
"total": 1
}

Terminal window
GET /graphs/{graphId}

Response 200 — returns the graph object plus schema summary.


Terminal window
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.


StatusMeaning
404Graph not found or does not belong to your tenant
409A graph with this name already exists