API Reference
Entities
Query and explore entities in the knowledge graph
List Entities
Get known entities for a user.
GET /entities/:appId/:userIdQuery Parameters
| Parameter | Type | Description |
|---|---|---|
type | string | Filter by entity type |
limit | number | Max results (default: 50) |
offset | number | Pagination offset |
Example Request
curl "https://api.magneteco.io/v1/entities/tanda/user-123?type=Client&limit=10" \
-H "Authorization: Bearer $API_KEY"Response
{
"entities": [
{
"name": "Acme Corp",
"type": "Client",
"properties": {
"industry": "Manufacturing",
"size": "Enterprise"
},
"relationshipCount": 5,
"firstMentioned": "2024-01-01T00:00:00Z",
"lastMentioned": "2024-01-15T14:30:00Z"
}
],
"total": 1,
"hasMore": false
}Get Entity
Get detailed information about a specific entity.
GET /entities/:appId/:userId/:entityNameExample Request
curl "https://api.magneteco.io/v1/entities/tanda/user-123/Acme%20Corp" \
-H "Authorization: Bearer $API_KEY"Response
{
"entity": {
"name": "Acme Corp",
"type": "Client",
"properties": {
"industry": "Manufacturing",
"size": "Enterprise",
"location": "Chicago, IL"
},
"relationships": [
{
"type": "OWNS",
"direction": "outgoing",
"target": "NetSuite Implementation",
"targetType": "Project",
"properties": { "since": "2024-01-01" }
},
{
"type": "HAS_CONTACT",
"direction": "outgoing",
"target": "Jane Smith",
"targetType": "Contact",
"properties": { "role": "Project Sponsor" }
}
],
"mentions": [
{
"context": "Working with Acme Corp on NetSuite...",
"timestamp": "2024-01-15T14:30:00Z"
}
]
}
}Forget (GDPR)
Delete user memories for GDPR compliance.
POST /forgetRequest Body
{
"appId": string, // Required: Your app identifier
"userId": string, // Required: User to forget
"category"?: string, // Optional: Delete specific category only
"confirm": boolean // Required: Must be true
}Example Requests
# Delete all memories for a user
curl -X POST https://api.magneteco.io/v1/forget \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"appId": "tanda",
"userId": "user-123",
"confirm": true
}'
# Delete specific category
curl -X POST https://api.magneteco.io/v1/forget \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"appId": "tanda",
"userId": "user-123",
"category": "personal_info",
"confirm": true
}'Response
{
"status": "deleted",
"deletedItems": 47,
"deletedEntities": 12,
"deletedResources": 15
}Health Check
Check service health.
GET /healthResponse
{
"status": "healthy",
"components": {
"postgres": { "status": "healthy", "latency": 12 },
"neo4j": { "status": "healthy", "latency": 45 },
"s3": { "status": "healthy" },
"sqs": { "status": "healthy", "queueDepth": 23 }
},
"version": "1.0.0",
"uptime": 86400
}