- Documents: files and websites that ImpelLabs reads into searchable parts.
- Groups: sets of documents and facts. An agent reads the groups you connect to it.
- Facts: short values such as an address or an opening time.
- Conflicts: two claims about the same fact that disagree. A person decides which is right.
https://api.impellabs.tech/api/v1. Send Authorization: Bearer imp_... on each request. See
Authentication and Conventions. The API reference lists every field.
Who can do what
A token acts as the person who made it.
A group that a person may not see answers
404 with This knowledge group does not exist. A group has a
visibility:
An agent that is connected to a group reads it even when its owner cannot see the group.
Add a file
POST /fileswith a multipartfile. The reply is201with the file:id,name,content_type,size,status.POST /knowledge/documentswith{ "file_id": "<id>" }. ImpelLabs reads the text and splits it into parts. The reply is201with the document.
GET /files lists the file library (q, status, kind, sort, order, page, page_size).
GET /files/{file_id}/info adds a text preview. POST /files/{file_id}/retry reads a failed file again; any other
file answers 409. A file that cannot be read is rejected with 400 and a reason.
Documents
GET /knowledge/documentslists the documents you may see.kindisfileorwebsite.PATCH /knowledge/documents/{document_id}with{ "tags": [...] }sets the sensitive-data tags of the source. The tags arepersonal,healthandpayment.DELETE /knowledge/documents/{document_id}archives the document and answers204.
Add a website
POST /knowledge/sites/discoverwith{ "url": "<address>" }finds the pages of the site.POST /knowledge/sites/readwith{ "url", "pages": [...], "group_id"? }reads the pages you choose. The reading runs in the background. Usegroup_idto file the result in a group you may change.GET /knowledge/sitesshows each site (id,site,title,pages,blocks,groups) andreading, the reads that are not done.
400 with This address cannot be read.
POST /knowledge/groups/{group_id}/deep-scan with { "url": "<one page>" } reads one page for facts and files them
in the group. GET /knowledge/groups/{group_id}/sources lists what the group was built from.
Groups
GET /knowledge/groups lists the groups you see. archived=1 lists archived groups.
POST /knowledge/groups makes a group.
201:
GET,PATCHandDELETE /knowledge/groups/{group_id}.DELETEarchives the group and its items.POST /knowledge/groups/{group_id}/restorebrings an archived group back with its items.POST /knowledge/groups/{group_id}/itemswith{ "document_id" }or{ "fact_key" }files an item in the group. The reply is201with the group.DELETE /knowledge/groups/{group_id}/items/{item_id}takes an item out. The reply is204.
knowledge_groups. See Agents.
Facts
A fact has akey, a value and a source.
PATCH /knowledge/facts/{key}with{ "value": "<text>" }sets a new value. It has 2000 characters at most.DELETE /knowledge/facts/{key}archives the fact.
Conflicts and published facts
GET /knowledge/conflictslists open conflicts.statusshows others. Each conflict hasid,status,fact,keyandclaims; each claim hasid,value,said_by,confidence,whenandquote.POST /knowledge/conflicts/{conflict_id}/resolvewith{ "action", "claim_id"?, "text"? }.actionisselect(the default; useclaim_id),edit(usetext),deleteorkeep_both. An owner or an admin only.GET /knowledge/published-factslists published facts.statusfilters them.POST /knowledge/published-factswith{ "claim_id" }publishes a claim. An owner or an admin only.POST /knowledge/published-facts/{fact_id}/retractwith{ "note"? }retracts a published fact.
Questions your agents could not answer
GET /knowledge/unanswered lists the questions that agents could not answer. status is open (the default),
resolved or dismissed. agent filters by agent. The reply is { "questions": [...], "open": <number> }.
POST /knowledge/unanswered/{question_id}/draftdrafts an answer from your knowledge. Nothing is saved.POST /knowledge/unanswered/{question_id}/answerwith{ "text", "group_ids"? }saves the answer as a fact and files it in the groups.POST /knowledge/unanswered/{question_id}/dismisscloses the question.
Search
GET /search searches across what the person may see.
{ "q": "...", "groups": [ { "kind", "label", "items": [ ... ] } ] }. With fewer than two characters,
groups is empty.
Memories
A memory is a short line that someone keeps, of 300 characters at most.GET and POST /memories are your own and
private. PATCH and DELETE /memories/{memory_id} change one. PUT /memories/settings with { "on": true } or
false turns your memories on or off. GET and POST /contacts/{contact_id}/memories, and DELETE /contacts/{contact_id}/memories/{memory_id}, hold
what your agents remember about a customer. Memories of an agent are on Agents.