Skip to content
Guides / Reference
Reference

API reference

Generated from the OpenAPI 3.1 spec that also validates the server (Zod contracts): this page can never drift from the implementation.

Same spec as the running server. If an endpoint drifts, the build fails.

Version 0.2.0https://api.minealyze.comDownload openapi.json

Authentication

Session token issued by Better Auth. Send it as a Bearer token for account-scoped endpoints (analytics, briefings, billing).

Per-server API key, generated when you add a server. Send it as X-Api-Key for plugin ingestion endpoints: it only authorizes ingestion for that one server.

health

get/healthLiveness

No request body.

Responses

200Service vivant
statusstringokrequired

cURL example

curl -X GET "https://api.minealyze.com/health" \
get/health/readyReadiness (vérifie l’accès à la base)

No request body.

Responses

200Service prêt
statusstringreadyrequired
503Base de données indisponible
statusCodeintegerrequired
errorstringrequired
messagestringrequired
codestring

cURL example

curl -X GET "https://api.minealyze.com/health/ready" \

plugin

post/ingestBatch d'events phone-home (idempotent par batchId, max 500 events)
X-Api-Key

Bodyrequired

batchIdstring·uuidrequired
serverIdstringrequired
pluginVersionstringrequired
minecraftVersionstring
sentAtstring·date-timerequired
eventsobject[]required
array of:
droppedEventsinteger

Responses

202Batch accepté + actions en attente pour ce serveur
batchIdstring·uuidrequired
acceptedintegerrequired
rejectedintegerrequired
pendingActionsobject[]
array of:
actionIdstring·uuidrequired
kindstringdispatch_commandbroadcastdiscord_webhookrequired
commandstring
messagestring
targetPlayerUuidstring·uuid
idempotencyKeystringrequired
expiresAtstring·date-timerequired
update
algstringed25519-v1required
keyIdstringrequired
versionstringrequired
filenamestringrequired
sizeintegerrequired
sha256stringrequired
urlstring·urirequired
signaturestringrequired
400Requête invalide
statusCodeintegerrequired
errorstringrequired
messagestringrequired
codestring
401Non authentifié
statusCodeintegerrequired
errorstringrequired
messagestringrequired
codestring

cURL example

curl -X POST "https://api.minealyze.com/ingest" \
  -H "X-Api-Key: <api-key>" \
  -H "Content-Type: application/json" \
  -d '{"batchId":"00000000-0000-4000-8000-000000000000","serverId":"string","pluginVersion":"string","sentAt":"2026-08-20T21:57:29.673Z","events":[null]}'
post/ingest/action-resultsAccusés d'exécution des actions livrées dans l'ACK (idempotent : un accusé répété est ignoré)
X-Api-Key

Bodyrequired

array of:
actionIdstring·uuidrequired
statusstringexecutedexpiredfailedrejectedrequired
executedAtstring·date-time
errorMessagestring

Responses

200Résultats journalisés (audit) / ignorés (déjà accusés ou hors tenant)
recordedintegerrequired
ignoredintegerrequired
400Requête invalide
statusCodeintegerrequired
errorstringrequired
messagestringrequired
codestring
401Non authentifié
statusCodeintegerrequired
errorstringrequired
messagestringrequired
codestring

cURL example

curl -X POST "https://api.minealyze.com/ingest/action-results" \
  -H "X-Api-Key: <api-key>" \
  -H "Content-Type: application/json" \
  -d '[{"actionId":"00000000-0000-4000-8000-000000000000","status":"executed"}]'

Get a key and call it for real

Each server you add issues its own key. Ingestion keys authorize one server; the session token scopes account endpoints.