{"openapi":"3.1.0","info":{"title":"Moxie Docs API","version":"1","summary":"Read a repository's generated documentation and check whether a set of changed files has documentation drift.","description":"Free to start on one repo, no card required. PR checks that flag doc gaps, living docs re-checked on every merge, MCP context for AI agents, hosted public knowledgebases, and Friday Cleanup PRs from GitHub.","contact":{"name":"jackalope.digital","email":"contact@moxiedocs.com","url":"https://jackalope.digital"},"license":{"name":"Proprietary","url":"https://moxiedocs.com/terms"}},"servers":[{"url":"https://moxiedocs.com/api/v1","description":"Production"}],"security":[{"bearerAuth":[]}],"paths":{"/docs":{"get":{"operationId":"listRepositoryDocs","summary":"List generated docs for a repository","description":"Returns every generated documentation page for the repository resolved from the token or the `repository` query parameter, most recently updated first.","parameters":[{"name":"repository","in":"query","required":false,"description":"`owner/name` (case-insensitive). Required when the token has access to more than one repository.","schema":{"type":"string","example":"acme/api"}}],"responses":{"200":{"description":"Documentation pages for the resolved repository.","content":{"application/json":{"schema":{"type":"object","required":["docs"],"properties":{"docs":{"type":"array","items":{"$ref":"#/components/schemas/DocPage"}}}}}}},"400":{"description":"Missing or ambiguous `repository` - the response lists the repositories available to this token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. Retry after the `Retry-After` header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/check-drift":{"post":{"operationId":"checkDocumentationDrift","summary":"Check whether changed files have documentation drift","description":"Runs the same doc-impact analysis Moxie uses on pull requests against an arbitrary list of changed file paths, and reports whether any generated doc is now stale or any changed path is undocumented.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["changedPaths"],"properties":{"repository":{"type":"string","description":"`owner/name` (case-insensitive). Required when the token has access to more than one repository.","example":"acme/api"},"changedPaths":{"type":"array","description":"Repository-relative paths changed in the commit or PR being checked.","items":{"type":"string"},"minItems":1,"example":["apps/web/src/app/api/billing/webhook/route.ts"]}}}}}},"responses":{"200":{"description":"Drift analysis result.","content":{"application/json":{"schema":{"type":"object","required":["hasDrift","message","details"],"properties":{"hasDrift":{"type":"boolean"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"string"}}}}}}},"400":{"description":"Missing `changedPaths`, or missing/ambiguous `repository`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. Retry after the `Retry-After` header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Repository-scoped MCP token with the `context:read` scope, created from the Moxie Docs dashboard (Settings -> MCP tokens) - no sales call required, available on every plan including the free tier."}},"schemas":{"Error":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Machine-readable error code, e.g. `Unauthorized`."},"message":{"type":"string","description":"Human-readable resolution hint."}}},"DocPage":{"type":"object","required":["id","slug","title","section","markdown","sources","collection","updatedAt"],"properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"title":{"type":"string"},"section":{"type":"string","nullable":true},"markdown":{"type":"string","description":"Generated documentation body."},"sources":{"type":"array","items":{"type":"string"},"description":"Repository-relative source paths this page is cited to."},"collection":{"type":"string","nullable":true},"updatedAt":{"type":"string","format":"date-time"}}}}}}