Konto

Den API-Key als Verbindungstest prüfen und das zugehörige Konto abfragen.

Authentifizierung

Jeder Request braucht einen API-Key im Header. Keys entstehen unter Einstellungen → API (nur Business-Tarif). Details zu Scopes, Idempotenz und Rate-Limits auf der Übersichtsseite.

Authorization: Bearer mxr_live_…

Bleibt in diesem Browser-Tab (sessionStorage), nur für „Ausprobieren“ auf dieser Seite, und geht direkt aus deinem Browser an /api/v1 — kein Versand an unseren Server, kein Log.

API-Key prüfen (Whoami)

get/api/v1/me

Validiert den API-Key und gibt das zugehörige Konto (ID, E-Mail, Firma, Tarif) sowie den Key selbst (Präfix, Name, Scopes, Zeitstempel) zurück. Kein Scope nötig — nur ein gültiger Key. Gedacht als Verbindungstest und für das Konto-Label in Integrationen (n8n, Make, MCP …); label ist bereits fertig formatiert (Firma, sonst E-Mail). account.plan ist der Tarif, an dem x-min-plan jeder Operation gemessen wird; account.upgrade_url führt zum Tarifwechsel.

curl -X GET "https://maxrechnung.de/api/v1/me" \
  -H "Authorization: Bearer $MXR_API_KEY"

MXR_API_KEY als Umgebungsvariable setzen. GUI-Clients (Postman, Insomnia, Bruno …): /api/openapi.json importieren.

Antworten

  • 200 Konto und Key zum vorgelegten API-Key
  • 401 Kein oder ungültiger API-Key
  • 403 Scope fehlt oder der Tarif reicht nicht (plan_required)
  • 429 Rate Limit überschritten

Schema 200

  • object "identity"
  • account object
    • id string · uuid
    • email string · nullable
    • company_name string · nullable
    • plan "free" | "pro" | "business"
    • upgrade_url string · uriTarif wechseln (App, /app/tarif).
  • api_key object
    • id string · uuid
    • prefix string
    • name string · nullable
    • scopes string[]
    • created_at string · date-time · nullable
    • last_used_at string · date-time · nullable
    • expires_at string · date-time · nullable
  • label string

Beispiel 200

{
  "object": "identity",
  "account": {
    "id": "00000000-0000-0000-0000-000000000000",
    "email": "…",
    "company_name": "…",
    "plan": "free",
    "upgrade_url": "…"
  },
  "api_key": {
    "id": "00000000-0000-0000-0000-000000000000",
    "prefix": "mxr_live_ab12cd",
    "name": "…",
    "scopes": [
      "…"
    ],
    "created_at": "2026-01-31T12:00:00Z",
    "last_used_at": "2026-01-31T12:00:00Z",
    "expires_at": "2026-01-31T12:00:00Z"
  },
  "label": "Muster GmbH"
}

Schemas

Von den Endpunkten oben referenzierte Objekte. Vollständig auch in der OpenAPI-Spezifikation.