Get Kg Graph
The nodes and **current** edges within `depth` hops of a root (give exactly one of `node`, `lead_id` and `company_id`), most recently touched first, at most `limit` nodes (`truncated` says the limit cut it). Every edge cites the source that created or last touched it; each node has its count of current facts. To expand a node, ask again with it as `node`. 404 if the root is not in this workspace's graph (or its lead/company is deleted).
API key access
leads:read scope with an API key (ro_pat_...). A signed-in session uses the caller's role./api/v1/kg/graphAccess token from /api/v1/auth/login, or an API key (ro_pat_..., RO-176) from /api/v1/workspaces/current/api-keys: the key implies its workspace and needs the route's scope. MCP connectors (/api/v1/mcp only) may use an OAuth access token (ro_oat_..., RO-284).
In: header
Query Parameters
The root: a graph node id (from a previous answer).
The root: this lead's person node.
The root: this company's node.
Hops from the root.
11 <= value <= 3Most nodes returned.
601 <= value <= 200Header Parameters
Id of the workspace to act on (must be a member).
Response Body
curl -X GET "http://localhost:8000/api/v1/kg/graph?node=497f6eca-6276-4993-bfeb-53cbbbba6f08&lead_id=497f6eca-6276-4993-bfeb-53cbbbba6f08&company_id=497f6eca-6276-4993-bfeb-53cbbbba6f08&depth=1&limit=60" \ -H "X-Workspace-Id: string"{
"root_id": "9b451279-6241-4fe6-9ea0-54b426fb7a24",
"depth": 0,
"nodes": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"kind": "string",
"label": "string",
"ref_id": "58ed4a6c-926f-4b2f-b688-ecd86db2ed34",
"lead_id": "9bddab70-98e6-43a9-8f32-c9788b9de0c0",
"company_id": "b2e6a1c3-1a5e-44ae-a8fd-81f76fd715cf",
"depth": 0,
"fact_count": 0
}
],
"edges": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"source": "07b8e003-7027-443f-88b0-24a5eb1cc68b",
"target": "65a17d54-9c67-4477-8b80-d3f97e165aa5",
"kind": "string",
"weight": 0,
"since": "2019-08-24T14:15:22Z",
"last_at": "2019-08-24T14:15:22Z",
"citations": [
0
]
}
],
"citations": [
{
"n": 0,
"type": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"at": "2019-08-24T14:15:22Z",
"url": "string",
"label": "string"
}
],
"truncated": true
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}Get Kg Duplicates
Entity resolution (RO-227): groups of live leads (same phone, LinkedIn profile, or name at the same company) or companies (same name without its legal suffix, or a name matching another one's domain) that are probably the same entity, largest groups first. Suggestions only: nothing is merged or changed.
Get Lead Memory
The lead's memory: current facts (with confidence and sources), open objections, relationships (company, sequences, touches with counts) and recent interactions. Every item cites its source (`citations`: a timeline event, call, classified reply, research run or the lead record, plus the URL for research facts); `text` is the same memory as a compact block with `[n]` markers, as the AI writer and voice agent see it. 404 if the lead is missing or deleted.