SmartMemory
POST
/memory/graph/bulk

Bulk upsert nodes and edges into the knowledge graph.

Optionally deletes all nodes matching delete_prefix (scoped to the caller's workspace) before writing, enabling clean replace-all semantics.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Request body for bulk graph writes with optional prefix deletion.

Response Body

application/json

application/json

curl -X POST "https://example.com/memory/graph/bulk" \  -H "Content-Type: application/json" \  -d '{}'
{
  "nodes_upserted": 0,
  "edges_upserted": 0,
  "nodes_deleted": 0
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}