Skip to content

Quickstart

Terminal window
curl -X POST https://magnusdb.dev/api/auth/signup \
-H "Content-Type: application/json" \
-d '{"orgName": "acme", "email": "you@acme.com"}'

Response:

{ "apiKey": "mk_live_...", "user": {...}, "tenant": {...} }

Save your apiKey — it won’t be shown again.

Terminal window
curl https://magnusdb.dev/api/health \
-H "Authorization: Bearer mk_live_..."
Terminal window
curl -X POST https://magnusdb.dev/api/sql/query \
-H "Authorization: Bearer mk_live_..." \
-H "Content-Type: application/json" \
-d '{"sql": "SELECT 1 + 1 AS result"}'
Terminal window
# Insert
curl -X POST https://magnusdb.dev/api/mql/insertOne \
-H "Authorization: Bearer mk_live_..." \
-H "Content-Type: application/json" \
-d '{"collection": "notes", "document": {"title": "Hello", "tags": ["intro"]}}'
# Find
curl -X POST https://magnusdb.dev/api/mql/find \
-H "Authorization: Bearer mk_live_..." \
-H "Content-Type: application/json" \
-d '{"collection": "notes", "filter": {"tags": {"$in": ["intro"]}}}'
Terminal window
curl -X PUT https://magnusdb.dev/api/kv/session:abc123 \
-H "Authorization: Bearer mk_live_..." \
-H "Content-Type: application/json" \
-d '{"value": "active", "ttl": 3600}'
curl https://magnusdb.dev/api/kv/session:abc123 \
-H "Authorization: Bearer mk_live_..."
Terminal window
# Upsert a vector
curl -X POST https://magnusdb.dev/api/vector/upsert \
-H "Authorization: Bearer mk_live_..." \
-H "Content-Type: application/json" \
-d '{"id": "doc1", "text": "Magnus is a multi-model database", "metadata": {"type": "docs"}}'
# Search
curl -X POST https://magnusdb.dev/api/vector/query \
-H "Authorization: Bearer mk_live_..." \
-H "Content-Type: application/json" \
-d '{"query": "what is Magnus", "topK": 5}'