{
  "ok": true,
  "schemaVersion": 1,
  "service": "open10x-api",
  "mode": "service-contract",
  "publishingPolicy": {
    "stage": "publishing-ready-preview",
    "dataMode": "preview-or-api-contract",
    "handoffMode": "url-or-api-contract-only",
    "persistenceBoundary": "no new production DB/Auth/storage/provider wiring in web publishing phase",
    "crossServiceBoundary": "no source-code import from other OPEN10X services",
    "accountStateBoundary": "no durable per-user state unless owned by open10x-api contract"
  },
  "exposure": "public-api",
  "responsibilities": [
    "API diagnostics and operational readiness view",
    "auth boundary",
    "Story persistence",
    "moderation and quotas",
    "search API boundary and provider normalization",
    "Wangchobo Supabase curated search and provider caches",
    "admin metadata operations"
  ],
  "provides": [
    {
      "method": "GET",
      "path": "/",
      "summary": "API diagnostics page for operators and developers"
    },
    {
      "method": "GET",
      "path": "/health",
      "summary": "API health, auth posture, storage posture"
    },
    {
      "method": "GET",
      "path": "/contract",
      "summary": "API service contract"
    },
    {
      "method": "GET",
      "path": "/system/status",
      "summary": "runtime write and export status"
    },
    {
      "method": "GET",
      "path": "/.well-known/open10x-bridge.json",
      "summary": "machine-readable Bridge intake discovery"
    },
    {
      "method": "GET",
      "path": "/me",
      "summary": "current session boundary"
    },
    {
      "method": "GET",
      "path": "/auth/login",
      "summary": "local preview Google-style login form"
    },
    {
      "method": "POST",
      "path": "/auth/login",
      "summary": "local preview login with Google ID and display name"
    },
    {
      "method": "GET",
      "path": "/auth/logout",
      "summary": "local preview logout switch, redirects with preview guest cookie"
    },
    {
      "method": "GET",
      "path": "/profile",
      "summary": "local preview profile settings form"
    },
    {
      "method": "POST",
      "path": "/profile",
      "summary": "update local preview public profile fields"
    },
    {
      "method": "GET",
      "path": "/profiles/:handle",
      "summary": "public local preview profile by handle"
    },
    {
      "method": "GET",
      "path": "/my/profile",
      "summary": "active user public profile contract"
    },
    {
      "method": "PATCH",
      "path": "/my/profile",
      "summary": "update active user public profile contract"
    },
    {
      "method": "GET",
      "path": "/search?q=",
      "summary": "search result boundary"
    },
    {
      "method": "POST",
      "path": "/search/events",
      "summary": "metadata-only search event"
    },
    {
      "method": "GET",
      "path": "/public/story/posts",
      "summary": "published safe Story archive only"
    },
    {
      "method": "GET",
      "path": "/public/story/posts/:id",
      "summary": "published safe Story detail only"
    },
    {
      "method": "GET",
      "path": "/story/posts",
      "summary": "Story posts for active user"
    },
    {
      "method": "POST",
      "path": "/story/posts",
      "summary": "create Story draft or review request"
    },
    {
      "method": "PATCH",
      "path": "/story/posts/:id",
      "summary": "update owner Story post"
    },
    {
      "method": "POST",
      "path": "/story/posts/:id/publish",
      "summary": "publish with moderation"
    },
    {
      "method": "POST",
      "path": "/story/posts/:id/report",
      "summary": "public report handoff"
    },
    {
      "method": "POST",
      "path": "/studio/authoring/assist",
      "summary": "OAuth-bound AI authoring assist for Bridge and Studio drafts"
    },
    {
      "method": "GET",
      "path": "/studio/drafts",
      "summary": "creator drafts across Bridge content types"
    },
    {
      "method": "POST",
      "path": "/studio/drafts",
      "summary": "Bridge intake draft creation for MCP, skills, desktop, and API clients"
    },
    {
      "method": "GET",
      "path": "/studio/drafts/:id",
      "summary": "owner review detail for an imported Bridge draft"
    },
    {
      "method": "GET",
      "path": "/studio/drafts/:id/review",
      "summary": "owner review handoff for an imported Bridge draft"
    },
    {
      "method": "GET",
      "path": "/export/status",
      "summary": "emergency export availability"
    },
    {
      "method": "GET",
      "path": "/export/user",
      "summary": "active-user emergency export when enabled"
    },
    {
      "method": "POST",
      "path": "/account/delete",
      "summary": "account deletion preview or confirmed redaction"
    },
    {
      "method": "POST",
      "path": "/moderation/check",
      "summary": "local moderation rules placeholder"
    },
    {
      "method": "GET",
      "path": "/moderation/queue",
      "summary": "admin-only metadata moderation queue"
    },
    {
      "method": "GET",
      "path": "/admin/moderation/events",
      "summary": "admin-only metadata moderation events"
    },
    {
      "method": "GET",
      "path": "/admin/audit/events",
      "summary": "admin-only metadata audit stream"
    },
    {
      "method": "GET",
      "path": "/admin/accounts",
      "summary": "admin account metadata"
    },
    {
      "method": "POST",
      "path": "/admin/accounts/:id/state",
      "summary": "admin account state update"
    },
    {
      "method": "POST",
      "path": "/admin/accounts/:id/limits",
      "summary": "admin quota limit update"
    },
    {
      "method": "POST",
      "path": "/admin/emergency-mode",
      "summary": "admin emergency export/write freeze switch"
    },
    {
      "method": "POST",
      "path": "/admin/story/posts/:id/hide",
      "summary": "admin hide action"
    },
    {
      "method": "POST",
      "path": "/admin/story/posts/:id/reject",
      "summary": "admin reject action"
    },
    {
      "method": "POST",
      "path": "/admin/story/posts/:id/restore",
      "summary": "admin restore action"
    },
    {
      "method": "POST",
      "path": "/abuse/events",
      "summary": "metadata-only abuse event"
    }
  ],
  "consumes": [
    {
      "provider": "Naver Open API",
      "purpose": "web/blog/cafe/qna/news/book/encyc/shop/doc/local/image search"
    },
    {
      "provider": "YouTube Data API",
      "purpose": "video search"
    },
    {
      "provider": "OpenRouter",
      "purpose": "source-grounded AI answer synthesis"
    },
    {
      "provider": "Supabase REST",
      "purpose": "Wangchobo curated search, AI answer cache, and YouTube result cache when configured"
    }
  ],
  "dataOwner": [
    "Story text",
    "public archive metadata",
    "moderation metadata",
    "quota metadata",
    "search event hashes"
  ],
  "boundaries": [
    "reads provider credentials from environment only",
    "does not store user email in local preview",
    "does not store raw search query text in durable search events",
    "uses Supabase only for Wangchobo search cache tables when explicit Supabase env keys are configured",
    "does not store large user files",
    "does not appear in Portal or OS public launch surfaces",
    "does not present itself as a public content service",
    "admin operations require admin session"
  ]
}