Magneteco
API Reference

API Reference

Complete Magneteco API documentation

API Reference

Magneteco exposes a RESTful API for all memory operations. All endpoints require authentication via API key.

Base URL

https://api.magneteco.io/v1

Or your self-hosted URL.

Authentication

Include API key in header:

Authorization: Bearer <your-api-key>

Endpoints

EndpointMethodPurpose
/memorizePOSTStore content in memory
/retrievePOSTQuery memory for context
/eventsPOSTTrack structured events
/webhooks/:sourcePOSTReceive external webhooks
/context/:appId/:userIdGETGet all summaries
/categories/:appId/:userIdGETList available categories
/entities/:appId/:userIdGETList known entities
/forgetPOSTGDPR deletion
/healthGETService health check

Error Responses

All errors follow a consistent format:

{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid request body",
    "details": {
      "field": "userId",
      "issue": "Required field missing"
    }
  }
}

Error Codes

CodeHTTP StatusDescription
UNAUTHORIZED401Invalid or missing API key
FORBIDDEN403API key lacks required permissions
NOT_FOUND404Resource not found
VALIDATION_ERROR400Invalid request body
RATE_LIMITED429Too many requests
INTERNAL_ERROR500Server error
SERVICE_UNAVAILABLE503Dependency unavailable

Rate Limits

EndpointLimit
POST /memorize100/min per app
POST /retrieve200/min per app
POST /events500/min per app
POST /webhooks/*1000/min per source
GET /*500/min per app

Rate limit headers included in responses:

X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1705330800

Pagination

List endpoints support cursor-based pagination:

# First page
curl "https://api.magneteco.io/v1/entities/tanda/user-123?limit=20"

# Next page
curl "https://api.magneteco.io/v1/entities/tanda/user-123?limit=20&cursor=eyJpZCI6MTIzfQ"

Response includes pagination info:

{
  "data": [...],
  "pagination": {
    "total": 150,
    "limit": 20,
    "hasMore": true,
    "nextCursor": "eyJpZCI6MTQzfQ"
  }
}

On this page