Skip to content

API reference

API: Memory and graph

Markdown version

MethodPathWhat it doesScope
GET/v1/graph/neighborhoodA record's neighborhood in the business graph: linked records, recent conversations, owners and memory facts, with freshnesssearch:read
GET/v1/memoryFacts saved about a record (what agents and people learned, with evidence)knowledge:read
POST/v1/memorySave a fact about a record. Evidence quotes are checked against their source and pinned to a span. Saving the same fact again adds evidence.knowledge:write
PATCH/v1/memory/:idRevise a fact (a new revision; earlier ones stay)knowledge:write
GET/v1/memory/:id/historyEvery revision of a factknowledge:read
POST/v1/memory/:id/retractRetract a fact that's no longer true (kept in its history)knowledge:write
GET/v1/memory/evidenceThe evidence behind given revision ids of a record's memory (cite revision ids; read them back here)knowledge:read
GET/v1/relationshipsWho on the team knows a contact, how (emails each way, meetings, calls) and when they last had a two-way exchange; or warm paths into an account (its contacts' strongest relationships)records:read
POST/v1/relationships/recomputeRecalculate a contact's relationships now (they also update as conversations arrive and nightly)records:write

Examples

GET /v1/graph/neighborhood

A record's neighborhood in the business graph: linked records, recent conversations, owners and memory facts, with freshness

curl -s "https://api.closefinch.com/v1/graph/neighborhood" \
  -H "Authorization: Bearer $RA_API_KEY"
const res = await fetch(`https://api.closefinch.com/v1/graph/neighborhood`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}` },
});
const data = await res.json();

GET /v1/memory

Facts saved about a record (what agents and people learned, with evidence)

curl -s "https://api.closefinch.com/v1/memory" \
  -H "Authorization: Bearer $RA_API_KEY"
const res = await fetch(`https://api.closefinch.com/v1/memory`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}` },
});
const data = await res.json();

POST /v1/memory

Save a fact about a record. Evidence quotes are checked against their source and pinned to a span. Saving the same fact again adds evidence.

curl -s -X POST "https://api.closefinch.com/v1/memory" \
  -H "Authorization: Bearer $RA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.closefinch.com/v1/memory`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

PATCH /v1/memory/$ID

Revise a fact (a new revision; earlier ones stay)

curl -s -X PATCH "https://api.closefinch.com/v1/memory/$ID" \
  -H "Authorization: Bearer $RA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.closefinch.com/v1/memory/${id}`, {
  method: "PATCH",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

GET /v1/memory/$ID/history

Every revision of a fact

curl -s "https://api.closefinch.com/v1/memory/$ID/history" \
  -H "Authorization: Bearer $RA_API_KEY"
const res = await fetch(`https://api.closefinch.com/v1/memory/${id}/history`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}` },
});
const data = await res.json();

POST /v1/memory/$ID/retract

Retract a fact that's no longer true (kept in its history)

curl -s -X POST "https://api.closefinch.com/v1/memory/$ID/retract" \
  -H "Authorization: Bearer $RA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.closefinch.com/v1/memory/${id}/retract`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

GET /v1/memory/evidence

The evidence behind given revision ids of a record's memory (cite revision ids; read them back here)

curl -s "https://api.closefinch.com/v1/memory/evidence" \
  -H "Authorization: Bearer $RA_API_KEY"
const res = await fetch(`https://api.closefinch.com/v1/memory/evidence`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}` },
});
const data = await res.json();

GET /v1/relationships

Who on the team knows a contact, how (emails each way, meetings, calls) and when they last had a two-way exchange; or warm paths into an account (its contacts' strongest relationships)

curl -s "https://api.closefinch.com/v1/relationships" \
  -H "Authorization: Bearer $RA_API_KEY"
const res = await fetch(`https://api.closefinch.com/v1/relationships`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}` },
});
const data = await res.json();

POST /v1/relationships/recompute

Recalculate a contact's relationships now (they also update as conversations arrive and nightly)

curl -s -X POST "https://api.closefinch.com/v1/relationships/recompute" \
  -H "Authorization: Bearer $RA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.closefinch.com/v1/relationships/recompute`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

Request and response schemas: https://www.closefinch.com/openapi.json. All resources: API reference.

Send feedback

Tell us what's broken, confusing or missing on this page, or an idea. It goes to the team that builds the product.

Please don't include passwords or card numbers.
Only to reply about this. Never added to any mailing list.