Skip to content

API reference

API: Knowledge

Markdown version

MethodPathWhat it doesScope
GET/v1/inbox/importsSpreadsheets that arrived in an agent inbox and are ready to import (CSV), newest first, that you're allowed to see. Import one by posting its content to /v1/imports.records:read
GET/v1/inbox/imports/:id/contentThe CSV text of an inbox spreadsheet you're allowed to see, to post to /v1/importsrecords:read
PUT/v1/kb/:key/audienceWho a knowledge base section is for: internal (the team), public (the website agent may quote and cite it) or private_context (it may reason with it, never show it) (owners)settings:write
GET/v1/knowledge/referencesCustomer references: which customers may (or may not) be named in outreach. The knowledge base's answer wins over an account's own fieldknowledge:read
PUT/v1/knowledge/referencesSay whether a customer may be named in outreach (owner; audited) (web app only)settings:write
DELETE/v1/knowledge/references/:idRemove a customer reference (the account's own field applies again; owner) (web app only)settings:write
GET/v1/knowledge/searchSearch indexed documents you're allowed to see (source permissions are kept), plus Slack messages read live with your own Slack account and never storedknowledge:read

Examples

GET /v1/inbox/imports

Spreadsheets that arrived in an agent inbox and are ready to import (CSV), newest first, that you're allowed to see. Import one by posting its content to /v1/imports.

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

GET /v1/inbox/imports/$ID/content

The CSV text of an inbox spreadsheet you're allowed to see, to post to /v1/imports

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

PUT /v1/kb/$KEY/audience

Who a knowledge base section is for: internal (the team), public (the website agent may quote and cite it) or private_context (it may reason with it, never show it) (owners)

curl -s -X PUT "https://api.closefinch.com/v1/kb/$KEY/audience" \
  -H "Authorization: Bearer $RA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.closefinch.com/v1/kb/${key}/audience`, {
  method: "PUT",
  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/knowledge/references

Customer references: which customers may (or may not) be named in outreach. The knowledge base's answer wins over an account's own field

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

Search indexed documents you're allowed to see (source permissions are kept), plus Slack messages read live with your own Slack account and never stored

curl -s "https://api.closefinch.com/v1/knowledge/search" \
  -H "Authorization: Bearer $RA_API_KEY"
const res = await fetch(`https://api.closefinch.com/v1/knowledge/search`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}` },
});
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.