Create a zettel note directly.
Bypasses /memory/add's LLM-classification pipeline so the consumer's
explicit memory_type=zettel intent is preserved. Tags and title land
on the [Zettel] row's top-level properties, queryable via /by-tag and
/by-property.
Send Authorization: Bearer <token>. The token is either a Clerk session JWT or a SmartMemory API key (prefix sm_live_, sm_test_, or legacy sk_).
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/memory/zettel/notes" \ -H "Content-Type: application/json" \ -d '{ "content": "string" }'null{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}Create Workspace
Create an independent Workspace: shared with an initial same-tenant Team, or private to the caller. WS-MGMT-4: the transition service decides authority (``create``: tenant admin, never an agent), writes the row and its audit row. The initial Team is checked after authority and before the write, so a non-admin still gets 403 before a missing Team's 404. WS-POLICY-10 B (OWNER D-0147): with no ``team_id`` the authority is ``create_private`` (any member acting as themselves, with agents, service principals and bound keys refused) and the row is exactly ``team_access={}``, ``user_access={caller: admin}``, the caller's tenant and owner, ``is_personal=False``. Nobody else can see it. WS-POLICY-5-FU-1 (review M1, L1): a ``template``/``privacy`` create writes the settings row FIRST, inside the lifecycle's ``before_write`` (after authority and the Team check, before the Mongo insert). The workspace row therefore never exists without its settings: a seed failure writes no workspace and no lifecycle audit row (503), and a crash after the seed leaves only a settings row no workspace id reaches. When the insert does not apply, the settings row is erased again (a left-over one is logged at ERROR and is unreachable: the id is a fresh uuid4).
Dedup Entities
Dedup cross-extractor fragmented entity nodes for the workspace (CORE-GRAPH-CANONICAL-DEDUP-1). Collapses same-name entity-node fragments (the same entity split across >1 node because two extractors disagreed on its type -> divergent canonical_key -> the write-time dedup missed them) into one node, precision-first. Unblocks ensemble alias disambiguation, since a fragmented canonical makes `resolve_aliases(disambiguate=true)` abstain. Workspace-scoped (tenant isolation). Opt-in, default-off. Recommended ensemble sequence: dedup-entities then resolve-aliases?disambiguate=true. **Parameters:** - `dry_run`: If true, report the dedup plan without mutating the graph. - `require_structural_confirmation`: If true (default), a same-name pair merges only on T0 (same Wikidata QID), T1 (same canonical_key), or T2 (>= tau_min shared typed entity-neighbors). If false, exact same-name clusters merge on name alone once T0/T1 fail (riskier disjoint-edge-tail recovery). **Returns:** - `merged_clusters`: same-name fragment (sub-)clusters collapsed into one node - `merged_nodes`: total fragment nodes merged away - `redirected_edges`: external edges moved onto survivors (0 when dry_run) - `abstained_clusters`: clusters left untouched (no confident identity tier, the disjoint-edge tail) - `dry_run`: echoes the request flag - plus scope context (`workspace_id`, `user_id`)