MemoireMemoire
Reference

Gateway API

The Memoire gateway runs at api.trymemoire.com. Most surfaces are private and used only by the dashboard, but a few are public so you can monitor health and integrate with your own observability.

GET /readyz

Deep health check. Returns 200 if all subsystems are ready, 503 if anything is failing.

curl https://api.trymemoire.com/readyz | jq
Example responsejson
{
  "ready": true,
  "uptime": 1247,
  "build": {
    "version": "0.1.0",
    "commit": "b10e6536",
    "builtAt": "2026-04-26T14:31:00.000Z"
  },
  "fly": {
    "app": "memi-gateway",
    "machine_id": "d89763df42d498",
    "region": "sjc",
    "image_ref": "registry.fly.io/memi-gateway:deployment-..."
  },
  "errors_recent": 0,
  "checks": {
    "memory": { "ok": true, "detail": "23 blocks" },
    "runners": { "ok": true, "detail": "2 available (claude, codex)" },
    "llm_router": { "ok": true, "detail": "direct API key" },
    "slack": { "ok": true, "detail": "2 workspace(s)" },
    "watchdog": { "ok": true, "detail": "0 active process(es)" },
    "activity_bus": { "ok": true, "detail": "0 SSE client(s)" }
  }
}

The check list is conservative — Memi being temporarily unable to reach Slack does not flip ready to false, because the gateway can recover when Slack comes back. Failing memory, no available runners, or no LLM config doflip it, because those mean Memi can't take new work.

GET /diagnostics

Recent error stacks and a per-category event ring. Useful for debugging without SSHing.

curl 'https://api.trymemoire.com/diagnostics?limit=20'

Query parameters:

  • limit — max entries to return (default 50, max 200)
  • category — filter events to one stream (e.g. slack-status, runner, procedure)
Example responsejson
{
  "uptime": 1247,
  "build": { "version": "0.1.0", "commit": "b10e6536", ... },
  "fly": { ... },
  "errors": [
    {
      "ts": "2026-04-26T14:50:12.000Z",
      "source": "slack",
      "message": "Slack manager start error: socket closed",
      "stack": "..."
    }
  ],
  "error_count": 1,
  "events": [
    {
      "ts": "2026-04-26T14:51:00.000Z",
      "category": "slack-status",
      "message": "C123/1745... → thinking-eager",
      "metadata": { "target": "C123/1745...", "transition": "thinking-eager" }
    }
  ],
  "event_categories": ["slack-status"]
}

GET /healthz

Liveness only. Returns 200 if the process is up. Use this for load-balancer probes; use /readyz for actual readiness gating.

POST /v1/admin/wipe-org

Used by the dashboard during workspace and account deletion to clear in-memory caches and the on-disk org directory. Requires the gateway admin token in Authorization: Bearer .... Not intended for direct use.

Webhooks (inbound)

  • POST /webhooks/github — receives GitHub App events (PR check completions, push, etc.). Requires the GitHub App secret for signature verification.
  • POST /webhooks/linear — receives Linear webhook events (issue assigned, comment posted).
  • POST /webhooks/stripe — Stripe billing events. Lives on the dashboard, not the gateway.

Dashboard surfaces

For programmatic access, prefer the dashboard's authenticated API at trymemoire.com/api/* over hitting the gateway directly. The dashboard handles Clerk auth, Supabase RLS, and rate-limiting; the gateway is intentionally minimal.

Full API key management lives at /dashboard/api-keys.