Skip to main content

API Endpoints

KnowledgeFlowDB exposes a REST API at:

https://api.knowledgedataflow.org

Auth Contract

For hosted interactive usage, the normal auth contract is:

Authorization: Bearer <token>
x-derive-session-id: <session_id>
x-derive-key: <derive_key_hex>

The docs app attaches those headers automatically after Privy login.

Advanced programmatic clients may use bearer tokens or API keys directly. X-Wallet-Address remains a compatibility path only where older tooling still expects it.

Health

MethodEndpointAuthDescription
GET/healthNoHealth check
GET/api/v1/statusNoDetailed system status
GET/api/v1/docsNoJSON API docs

Wallet / Derive Auth

MethodEndpointAuthDescription
GET/auth/challengeNoGet wallet auth challenge
POST/auth/verifyNoExchange signed challenge for bearer token
POST/api/v1/auth/derive-challengeNoGet sign-to-derive challenge
POST/api/v1/auth/derive-keyNoRegister derive session from signed payload

See Wallet Authentication for the full flow.

Query

MethodEndpointAuthDescription
POST/api/v1/queryYesExecute KQL
POST/api/v1/query/sqlYesExecute SQL
POST/api/v1/query/explainNoExplain plan without execution
GET/api/v1/statsYesDatabase statistics

Discovery / Schema

The primary discovery surface is through query HELP and SHOW commands:

HELP
SHOW LABELS
SHOW EDGE_TYPES
SHOW PROPERTIES File
SHOW SCHEMA

Tenant / Hosted Service

MethodEndpointAuthDescription
GET/api/v1/tenant/meYesGet current tenant status
POST/api/v1/tenant/activateYesActivate current tenant plan
POST/api/v1/tenants/createNoPublic tenant creation route
GET/api/v1/tenant/plansNoAvailable plans

Data APIs

CategoryExamples
Graph writes/api/v1/write, /api/v1/bulk/upload
Entities/api/v1/entities/labels, /api/v1/entities/{label}
Notes/api/v1/notes, /api/v1/public/notes
Workspaces/api/v1/workspaces
Tasks/api/v1/tasks
Sessions/api/v1/sessions
Search/api/v1/search, /api/v1/semantic/search
Automation/api/v1/automation/*

Error Format

Errors are returned as structured JSON. The exact shape varies slightly by endpoint, but you should expect an HTTP status plus an error/message payload.

Common statuses:

StatusMeaning
400Invalid input or malformed query
401Authentication required
403Authenticated but missing required user-key/permission context
404Resource not found
429Rate limited
500Internal server error