MemNexus
Reference

Facts API

Fact extraction and management endpoints

Fact extraction and management endpoints

GET /api/facts

List facts

Query parameters:

ParameterTypeRequiredDescription
limitintegerNoMaximum number of facts to return
offsetintegerNoNumber of facts to skip

Response: 200 OK

FieldTypeRequiredDescription
dataFact[]No
countintegerNo

Example:

curl -X GET "https://api.memnexus.ai/api/facts" \
  -H "Authorization: Bearer cmk_live_xxx.yyy"

POST /api/facts

Create fact

Request body:

FieldTypeRequiredDescription
subjectstringYesFact subject (entity name)
predicatestringYesRelationship type
objectstringYesFact object (related entity)

Response: 201 Created

FieldTypeRequiredDescription
dataFactNo

Example:

curl -X POST "https://api.memnexus.ai/api/facts" \
  -H "Authorization: Bearer cmk_live_xxx.yyy" \
  -H "Content-Type: application/json" \
  -d '{}'

GET /api/facts/{id}

Get fact by ID

Path parameters:

ParameterTypeRequiredDescription
idstringYesThe fact ID

Response: 200 OK

FieldTypeRequiredDescription
dataFactNo

Example:

curl -X GET "https://api.memnexus.ai/api/facts/mem_abc123" \
  -H "Authorization: Bearer cmk_live_xxx.yyy"

PUT /api/facts/{id}

Update fact

Path parameters:

ParameterTypeRequiredDescription
idstringYesThe fact ID

Request body:

FieldTypeRequiredDescription
subjectstringNoFact subject (entity name)
predicatestringNoRelationship type
objectstringNoFact object (related entity)
confidencenumberNoConfidence score (0-1)

Response: 200 OK

FieldTypeRequiredDescription
dataFactNo

Example:

curl -X PUT "https://api.memnexus.ai/api/facts/mem_abc123" \
  -H "Authorization: Bearer cmk_live_xxx.yyy" \
  -H "Content-Type: application/json" \
  -d '{}'

DELETE /api/facts/{id}

Delete fact

Path parameters:

ParameterTypeRequiredDescription
idstringYesThe fact ID

Response: 204 No Content

Example:

curl -X DELETE "https://api.memnexus.ai/api/facts/mem_abc123" \
  -H "Authorization: Bearer cmk_live_xxx.yyy"

POST /api/facts/search

Search facts

Request body:

FieldTypeRequiredDescription
querystringYesSearch query string
limitintegerNoMaximum number of results to return

Response: 200 OK

FieldTypeRequiredDescription
dataFact[]No
countintegerNoTotal number of results
metadataobjectNoSearch metadata

Example:

curl -X POST "https://api.memnexus.ai/api/facts/search" \
  -H "Authorization: Bearer cmk_live_xxx.yyy" \
  -H "Content-Type: application/json" \
  -d '{}'