Skip to content
Notice This app is in Beta Testing We are still testing Record Sender, so features may change.
Sign in

Knowledge — API reference

The Knowledge Access API: retrieval, answers, memory and the graph scoped by knowledge space, always as the authenticated person; space management; expert finding and entity timelines; entity resolution; EKEP peers. query, ask, memory, graph, experts and timeline are rate limited per key or person (default 120 a minute).

← All groups
POST /api/v1/knowledge/ask

Ask a question, answered from the space only

An answer with citations (`brain.ask` credits). Out of credits: 402 with `error` and the `citations` found.

Scope: knowledge:read · uses AI credits · Idempotency-Key · knowledge.ask

Request body application/json
knowledge_space_id string (uuid)
microbrains [string] Microbrain keys to use
organization_id string Must be the caller's account (or its EKEP org) when given
question * string `query` is accepted too
Responses 200 · 401 · 402 · 403 · 409 · 422 · 429

200 Success

answer * KnowledgeAnswer
fields

KnowledgeAnswer

answer string
citations [object]
credits any Credits spent
engine any
id string | null
microbrains any
space_id string | null

401 Problem details (401)

402 Problem details (402)

403 Problem details (403)

409 Problem details (409)

422 Problem details (422)

429 Problem details (429)

GET /api/v1/knowledge/ekep

The account's EKEP identity

What a peer needs to connect: the org id, the current Ed25519 public key and the endpoint.

Scope: knowledge:read · knowledge.ekep_identity

Responses 200 · 401 · 403 · 429

200 Success

algorithm "ed25519"
endpoint string (uri)
key_id * string
org * string
public_key * string Base64

401 Problem details (401)

403 Problem details (403)

429 Problem details (429)

POST /api/v1/knowledge/ekep/rotate

Rotate the EKEP signing key

Needs the knowledge:manage permission as well. Peers must be given the new key.

Scope: knowledge:write · Idempotency-Key · knowledge.rotate_key

Responses 200 · 401 · 402 · 403 · 409 · 422 · 429

200 Success

key_id * string
public_key * string Base64

401 Problem details (401)

402 Problem details (402)

403 Problem details (403)

409 Problem details (409)

422 Problem details (422)

429 Problem details (429)

GET /api/v1/knowledge/entities/duplicates

Entity duplicate candidates

Scope: knowledge:read · paginated · knowledge.duplicates

ParameterInTypeDescription
cursorquerystringThe `next_cursor` of the previous page
limitqueryintegerPage size
Responses 200 · 401 · 403 · 429

200 Success

candidates * [object]
fields
a KnowledgeEntity
fields

KnowledgeEntity

first_seen_at string | null
id * string (uuid)
last_seen_at string | null
mentions integer
name string
type string
b KnowledgeEntity
fields

KnowledgeEntity

first_seen_at string | null
id * string (uuid)
last_seen_at string | null
mentions integer
name string
type string
similarity number
has_more boolean
next_cursor string | null Pass as `cursor` for the next page; null on the last

401 Problem details (401)

403 Problem details (403)

429 Problem details (429)

POST /api/v1/knowledge/entities/merge

Merge two entities

Scope: knowledge:write · Idempotency-Key · knowledge.merge

Request body application/json
into_id * string (uuid) The entity kept
merged_id * string (uuid) The entity merged into it
reason string
Responses 201 · 401 · 402 · 403 · 409 · 422 · 429

201 Success

merge * KnowledgeMerge
fields

KnowledgeMerge

id * string (uuid)
inserted_at string (date-time)
into_id string (uuid)
merged_id string (uuid)
reason string | null
undone_at string | null

401 Problem details (401)

402 Problem details (402)

403 Problem details (403)

409 Problem details (409)

422 Problem details (422)

429 Problem details (429)

POST /api/v1/knowledge/entities/merges/{id}/undo

Undo an entity merge

Scope: knowledge:write · Idempotency-Key · knowledge.undo_merge

ParameterInTypeDescription
id *pathstring (uuid)
Responses 200 · 401 · 402 · 403 · 404 · 409 · 422 · 429

200 Success

merge * KnowledgeMerge
fields

KnowledgeMerge

id * string (uuid)
inserted_at string (date-time)
into_id string (uuid)
merged_id string (uuid)
reason string | null
undone_at string | null

401 Problem details (401)

402 Problem details (402)

403 Problem details (403)

404 Problem details (404)

409 Problem details (409)

422 Problem details (422)

429 Problem details (429)

GET /api/v1/knowledge/entities/{id}/timeline

An entity's timeline

The records that mention the (canonical) entity, newest first.

Scope: knowledge:read · knowledge.timeline

ParameterInTypeDescription
id *pathstring (uuid)
Responses 200 · 401 · 403 · 404 · 429

200 Success

entity * KnowledgeEntity
fields

KnowledgeEntity

first_seen_at string | null
id * string (uuid)
last_seen_at string | null
mentions integer
name string
type string
timeline * [object]

401 Problem details (401)

403 Problem details (403)

404 Problem details (404)

429 Problem details (429)

GET /api/v1/knowledge/experts

Find experts on a topic

Scope: knowledge:read · paginated · knowledge.experts

ParameterInTypeDescription
topic *querystring`q` is accepted too
semanticquerybooleanDefault true
cursorquerystringThe `next_cursor` of the previous page
limitqueryintegerPage size
Responses 200 · 401 · 403 · 429

200 Success

experts * [object]
fields
email string (email)
examples [object]
fields
title string
type string
url string
latest string | null
member boolean A person of the account
name string
records integer
score number
types any Record type → count
user_id string | null
has_more boolean
next_cursor string | null Pass as `cursor` for the next page; null on the last

401 Problem details (401)

403 Problem details (403)

429 Problem details (429)

GET /api/v1/knowledge/graph

The knowledge graph

With `entity_id`: that entity and its relations; otherwise the entities matching `query`.

Scope: knowledge:read · knowledge.graph

ParameterInTypeDescription
organization_idquerystringMust be the caller's account (or its EKEP org) when given
entity_idquerystring (uuid)
queryquerystring
limitqueryintegerDefault 20, at most 100
historyquerybooleanInclude ended relations
Responses 200 · 401 · 403 · 429

200 Success

entities [KnowledgeEntity]
fields

KnowledgeEntity

first_seen_at string | null
id * string (uuid)
last_seen_at string | null
mentions integer
name string
type string
entity KnowledgeEntity
fields

KnowledgeEntity

first_seen_at string | null
id * string (uuid)
last_seen_at string | null
mentions integer
name string
type string
relations [KnowledgeRelation]
fields

KnowledgeRelation

confidence number | null
from string
from_id string (uuid)
source_id string | null
source_type string | null
to string
to_id string (uuid)
type string
valid_from string | null
valid_to string | null
verification string | null

401 Problem details (401)

403 Problem details (403)

429 Problem details (429)

POST /api/v1/knowledge/memory

Remember a note

Into a space the person contributes to (or their own memory without a space).

Scope: knowledge:write · Idempotency-Key · knowledge.memory

Request body application/json
knowledge_space_id string (uuid)
organization_id string Must be the caller's account (or its EKEP org) when given
text * string
title string
type "episodic" | "semantic" | "procedural" | "temporal" | "organizational" | "relationship" | "decision" | "commitment" Default semantic
Responses 201 · 401 · 402 · 403 · 409 · 422 · 429

201 Success

memory * object
fields
id string (uuid)
memory_type string
space_ids [string (uuid)]
title string | null

401 Problem details (401)

402 Problem details (402)

403 Problem details (403)

409 Problem details (409)

422 Problem details (422)

429 Problem details (429)

GET /api/v1/knowledge/peers

EKEP peers

Needs the knowledge:manage permission as well.

Scope: knowledge:read · paginated · knowledge.peers

ParameterInTypeDescription
cursorquerystringThe `next_cursor` of the previous page
limitqueryintegerPage size
Responses 200 · 401 · 403 · 429

200 Success

has_more boolean
next_cursor string | null Pass as `cursor` for the next page; null on the last
peers * [KnowledgePeer]
fields

KnowledgePeer

allowed_space_ids [string (uuid)]
base_url string | null
capabilities any
consent object
id * string (uuid)
key_id string | null
last_seen_at string | null
max_classification "public" | "internal" | "confidential" | "restricted"
name string
org string | null
platform "ekep" | "brainsilos" | "secondmem" | "burmeel"
status string active | paused …

401 Problem details (401)

403 Problem details (403)

429 Problem details (429)

POST /api/v1/knowledge/peers

Connect an EKEP peer

Needs the knowledge:manage permission as well. `ekep` peers need `base_url`, `key_id` and `public_key`; partner platforms (brainsilos, secondmem, burmeel) connect by platform.

Scope: knowledge:write · Idempotency-Key · knowledge.create_peer

Request body application/json
allowed_space_ids [string (uuid)] Spaces the peer may query
base_url string (uri)
consent object
fields
redact boolean Default true
semantic boolean Default false
key_id string
max_classification "public" | "internal" | "confidential" | "restricted" Default internal
name string
org string The peer's org id
platform "ekep" | "brainsilos" | "secondmem" | "burmeel" Default ekep
public_key string Base64 Ed25519 public key
Responses 201 · 401 · 402 · 403 · 409 · 422 · 429

201 Success

peer * KnowledgePeer
fields

KnowledgePeer

allowed_space_ids [string (uuid)]
base_url string | null
capabilities any
consent object
id * string (uuid)
key_id string | null
last_seen_at string | null
max_classification "public" | "internal" | "confidential" | "restricted"
name string
org string | null
platform "ekep" | "brainsilos" | "secondmem" | "burmeel"
status string active | paused …

401 Problem details (401)

402 Problem details (402)

403 Problem details (403)

409 Problem details (409)

422 Problem details (422)

429 Problem details (429)

DELETE /api/v1/knowledge/peers/{id}

Disconnect an EKEP peer

Needs the knowledge:manage permission as well.

Scope: knowledge:write · knowledge.delete_peer

ParameterInTypeDescription
id *pathstring (uuid)
Responses 204 · 401 · 402 · 403 · 404 · 422 · 429

204 Done (no content)

401 Problem details (401)

402 Problem details (402)

403 Problem details (403)

404 Problem details (404)

422 Problem details (422)

429 Problem details (429)

PATCH /api/v1/knowledge/peers/{id}

Change an EKEP peer

Needs the knowledge:manage permission as well.

Scope: knowledge:write · knowledge.update_peer

ParameterInTypeDescription
id *pathstring (uuid)
Request body application/json
allowed_space_ids [string (uuid)]
consent object Merged into the peer's consent
max_classification "public" | "internal" | "confidential" | "restricted"
status "active" | "paused"
Responses 200 · 401 · 402 · 403 · 404 · 422 · 429

200 Success

peer * KnowledgePeer
fields

KnowledgePeer

allowed_space_ids [string (uuid)]
base_url string | null
capabilities any
consent object
id * string (uuid)
key_id string | null
last_seen_at string | null
max_classification "public" | "internal" | "confidential" | "restricted"
name string
org string | null
platform "ekep" | "brainsilos" | "secondmem" | "burmeel"
status string active | paused …

401 Problem details (401)

402 Problem details (402)

403 Problem details (403)

404 Problem details (404)

422 Problem details (422)

429 Problem details (429)

POST /api/v1/knowledge/peers/{id}/capabilities

Ask a peer for its capabilities

Needs the knowledge:manage permission as well.

Scope: knowledge:write · Idempotency-Key · knowledge.peer_capabilities

ParameterInTypeDescription
id *pathstring (uuid)
Responses 200 · 401 · 402 · 403 · 404 · 409 · 422 · 429 · 502

200 Success

capabilities * object

401 Problem details (401)

402 Problem details (402)

403 Problem details (403)

404 Problem details (404)

409 Problem details (409)

422 Problem details (422)

429 Problem details (429)

502 The peer answered an error

Problem

code * string Stable machine-readable code (snake_case)
detail string A sentence an app can show
error object | string Legacy member kept for existing clients (deprecated)
errors object Field → messages, for validation errors
instance string The request path
message string Legacy member of the mobile sign-in errors (deprecated)
request_id string
status * integer
title * string
type string (uri) A URI identifying the problem type (https://recordsender.com/problems/<code>)
POST /api/v1/knowledge/peers/{id}/query

Query a peer

Needs the knowledge:manage permission as well. Sends a signed query to the peer (or the partner platform) and answers what it returned.

Scope: knowledge:write · Idempotency-Key · knowledge.peer_query

ParameterInTypeDescription
id *pathstring (uuid)
Request body application/json
query * string
space string The peer's space (EKEP peers)
Responses 200 · 401 · 402 · 403 · 404 · 409 · 422 · 429 · 502

200 Success

answer * any The peer's answer

401 Problem details (401)

402 Problem details (402)

403 Problem details (403)

404 Problem details (404)

409 Problem details (409)

422 Problem details (422)

429 Problem details (429)

502 The peer answered an error

Problem

code * string Stable machine-readable code (snake_case)
detail string A sentence an app can show
error object | string Legacy member kept for existing clients (deprecated)
errors object Field → messages, for validation errors
instance string The request path
message string Legacy member of the mobile sign-in errors (deprecated)
request_id string
status * integer
title * string
type string (uri) A URI identifying the problem type (https://recordsender.com/problems/<code>)
POST /api/v1/knowledge/query

Retrieve knowledge

Semantic, keyword, graph and temporal legs (all on by default) over what the person may read, optionally inside one space. The semantic leg spends `brain.search` credits; without credits the free legs answer and `semantic_used: false` says so.

Scope: knowledge:read · uses AI credits · Idempotency-Key · knowledge.query

Request body application/json
include_history boolean With temporal: include superseded items
include_sources boolean Include snippets (default true)
knowledge_space_id string (uuid)
limit integer Default 10, at most 50
organization_id string Must be the caller's account (or its EKEP org) when given
query * string At most 1000 characters
retrieval object
fields
graph boolean
keyword boolean
semantic boolean
temporal boolean
Responses 200 · 401 · 402 · 403 · 409 · 422 · 429

200 Success

KnowledgeQueryResult

knowledge_space_id string | null
relationships [object]
fields
from string
relationship string
source string
source_type string
target string
target_id string (uuid)
target_type string
results * [object]
fields
freshness any
item_id string (uuid)
memory_type string | null
origin any
permissions_verified boolean Always true
relevance number
signals [string]
snippet string With include_sources
source_date string | null
source_id string | null
title string | null
type string Source type (email, document, contact …)
verified boolean
semantic_used boolean
status * string success

401 Problem details (401)

402 Problem details (402)

403 Problem details (403)

409 Problem details (409)

422 Problem details (422)

429 Problem details (429)

GET /api/v1/knowledge/spaces

Knowledge spaces the caller may use

Scope: knowledge:read · paginated · knowledge.spaces

ParameterInTypeDescription
cursorquerystringThe `next_cursor` of the previous page
limitqueryintegerPage size
Responses 200 · 401 · 403 · 429

200 Success

has_more boolean
next_cursor string | null Pass as `cursor` for the next page; null on the last
spaces * [KnowledgeSpace]
fields

KnowledgeSpace

description string | null
federated boolean
id * string (uuid)
kind "personal" | "department" | "team" | "project" | "workspace" | "account" | "federated"
microbrains [string]
name string
restricted boolean
retention_days integer | null
role string | null The caller's role: viewer | contributor | manager

401 Problem details (401)

403 Problem details (403)

429 Problem details (429)

POST /api/v1/knowledge/spaces

Create a knowledge space

Anyone who may write memory can start a `project` space (and becomes its manager); other kinds need knowledge:manage. `department` / `team` need `org_unit_id`.

Scope: knowledge:write · Idempotency-Key · knowledge.create_space

Request body application/json
description string
federation object Federation settings (federated spaces)
kind "project" | "department" | "team" | "federated" Default project
microbrain_keys [string] | string
name * string
org_unit_id string (uuid)
restricted boolean
retention_days integer | null
workspace_id string (uuid)
Responses 201 · 401 · 402 · 403 · 409 · 422 · 429

201 Success

space * KnowledgeSpace
fields

KnowledgeSpace

description string | null
federated boolean
id * string (uuid)
kind "personal" | "department" | "team" | "project" | "workspace" | "account" | "federated"
microbrains [string]
name string
restricted boolean
retention_days integer | null
role string | null The caller's role: viewer | contributor | manager

401 Problem details (401)

402 Problem details (402)

403 Problem details (403)

409 Problem details (409)

422 Problem details (422)

429 Problem details (429)

DELETE /api/v1/knowledge/spaces/{id}

Archive a space

The space's managers. Its items stay in the brain but leave the space; system spaces can't be archived.

Scope: knowledge:write · knowledge.delete_space

ParameterInTypeDescription
id *pathstring (uuid)
Responses 204 · 401 · 402 · 403 · 404 · 422 · 429

204 Done (no content)

401 Problem details (401)

402 Problem details (402)

403 Problem details (403)

404 Problem details (404)

422 Problem details (422)

429 Problem details (429)

GET /api/v1/knowledge/spaces/{id}

One space

Sources, members and federation settings are filled for the space's managers only.

Scope: knowledge:read · knowledge.show_space

ParameterInTypeDescription
id *pathstring (uuid)
Responses 200 · 401 · 403 · 404 · 429

200 Success

space * object A KnowledgeSpace plus items, sources, members and federation
fields
federation object
items integer
members [KnowledgeMember]
fields

KnowledgeMember

email string (email)
id string (uuid)
name string | null
role "viewer" | "contributor" | "manager"
user_id * string (uuid)
sources [KnowledgeSource]
fields

KnowledgeSource

id * string (uuid)
kind string
label string | null
ref string

401 Problem details (401)

403 Problem details (403)

404 Problem details (404)

429 Problem details (429)

PATCH /api/v1/knowledge/spaces/{id}

Change a space

The space's managers.

Scope: knowledge:write · knowledge.update_space

ParameterInTypeDescription
id *pathstring (uuid)
Request body application/json
description string
federation object
microbrain_keys [string] | string
name string
restricted boolean
retention_days integer | null
settings object
Responses 200 · 401 · 402 · 403 · 404 · 422 · 429

200 Success

space * KnowledgeSpace
fields

KnowledgeSpace

description string | null
federated boolean
id * string (uuid)
kind "personal" | "department" | "team" | "project" | "workspace" | "account" | "federated"
microbrains [string]
name string
restricted boolean
retention_days integer | null
role string | null The caller's role: viewer | contributor | manager

401 Problem details (401)

402 Problem details (402)

403 Problem details (403)

404 Problem details (404)

422 Problem details (422)

429 Problem details (429)

POST /api/v1/knowledge/spaces/{id}/members

Add or change a space member

People of the same account only.

Scope: knowledge:write · Idempotency-Key · knowledge.add_member

ParameterInTypeDescription
id *pathstring (uuid)
Request body application/json
role "viewer" | "contributor" | "manager" Default viewer
user_id * string (uuid)
Responses 200 · 401 · 402 · 403 · 404 · 409 · 422 · 429

200 Success

members * [KnowledgeMember]
fields

KnowledgeMember

email string (email)
id string (uuid)
name string | null
role "viewer" | "contributor" | "manager"
user_id * string (uuid)

401 Problem details (401)

402 Problem details (402)

403 Problem details (403)

404 Problem details (404)

409 Problem details (409)

422 Problem details (422)

429 Problem details (429)

DELETE /api/v1/knowledge/spaces/{id}/members/{user_id}

Remove a space member

Scope: knowledge:write · knowledge.remove_member

ParameterInTypeDescription
id *pathstring (uuid)
user_id *pathstring (uuid)The member
Responses 204 · 401 · 402 · 403 · 404 · 422 · 429

204 Done (no content)

401 Problem details (401)

402 Problem details (402)

403 Problem details (403)

404 Problem details (404)

422 Problem details (422)

429 Problem details (429)

POST /api/v1/knowledge/spaces/{id}/sources

Add a source to a space

Items of the source join the space; answers the space's item count and sources.

Scope: knowledge:write · Idempotency-Key · knowledge.add_source

ParameterInTypeDescription
id *pathstring (uuid)
Request body application/json
kind * "audience" | "workspace" | "source_type" | "mailbox" | "mail_folder" | "mail_label" | "chat_channel" | "file_folder" | "document_collection" | "meeting" | "notes"
label string
ref * string The source's id or key
Responses 201 · 401 · 402 · 403 · 404 · 409 · 422 · 429

201 Success

items * integer
sources * [KnowledgeSource]
fields

KnowledgeSource

id * string (uuid)
kind string
label string | null
ref string

401 Problem details (401)

402 Problem details (402)

403 Problem details (403)

404 Problem details (404)

409 Problem details (409)

422 Problem details (422)

429 Problem details (429)

DELETE /api/v1/knowledge/spaces/{id}/sources/{source_id}

Remove a source from a space

Scope: knowledge:write · knowledge.remove_source

ParameterInTypeDescription
id *pathstring (uuid)
source_id *pathstring (uuid)The source
Responses 200 · 401 · 402 · 403 · 404 · 422 · 429

200 Success

items * integer The space's item count

401 Problem details (401)

402 Problem details (402)

403 Problem details (403)

404 Problem details (404)

422 Problem details (422)

429 Problem details (429)

GET /api/v1/knowledge/usage

Usage per space

Needs the knowledge:manage permission as well.

Scope: knowledge:read · paginated · knowledge.usage

ParameterInTypeDescription
cursorquerystringThe `next_cursor` of the previous page
limitqueryintegerPage size
Responses 200 · 401 · 403 · 429

200 Success

has_more boolean
next_cursor string | null Pass as `cursor` for the next page; null on the last
usage * [object]
fields
asks integer
items integer
last_asked_at string | null
members integer
sources integer
space KnowledgeSpace
fields

KnowledgeSpace

description string | null
federated boolean
id * string (uuid)
kind "personal" | "department" | "team" | "project" | "workspace" | "account" | "federated"
microbrains [string]
name string
restricted boolean
retention_days integer | null
role string | null The caller's role: viewer | contributor | manager

401 Problem details (401)

403 Problem details (403)

429 Problem details (429)