{"openapi":"3.1.0","info":{"title":"AgentsMarkdown API","version":"0.2.0","description":"Live markdown documents for human and agent collaboration."},"servers":[{"url":"https://agentsmarkdown.com"}],"security":[{"shareKey":[]},{"appSession":[]},{"agentToken":[]}],"components":{"securitySchemes":{"shareKey":{"type":"apiKey","in":"query","name":"key","description":"Capability share key. X-Share-Key is also accepted."},"appSession":{"type":"http","scheme":"bearer","bearerFormat":"asess","description":"mere.world app-session token."},"agentToken":{"type":"http","scheme":"bearer","bearerFormat":"ai","description":"AgentsIdentify token for ADT agents."}}},"paths":{"/new":{"get":{"summary":"Create an anonymous document and redirect to its owner link","security":[],"responses":{"303":{"description":"Redirect to /d/{id}?key=..."}}},"post":{"summary":"Create an anonymous, agent-owned, or account-owned document","requestBody":{"required":false},"responses":{"201":{"description":"Created"}}}},"/sign-in":{"get":{"summary":"Start mere.world sign in","security":[],"responses":{"303":{"description":"Redirect to broker"}}}},"/sign-up":{"get":{"summary":"Start mere.world sign up","security":[],"responses":{"303":{"description":"Redirect to broker"}}}},"/api/me":{"get":{"summary":"Read current human account session","responses":{"200":{"description":"OK"}}}},"/api/docs":{"get":{"summary":"List docs owned by the current human account","responses":{"200":{"description":"OK"}}},"post":{"summary":"Create a document","requestBody":{"required":false},"responses":{"201":{"description":"Created"}}}},"/api/docs/{id}":{"get":{"summary":"Read document metadata and effective role","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}},"delete":{"summary":"Delete a document with owner access","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/d/{id}.md":{"get":{"summary":"Read canonical markdown","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Markdown content"}}}},"/api/docs/{id}/content":{"get":{"summary":"Read canonical markdown","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}},"put":{"summary":"Replace document markdown with optional If-Match or baseVersion conflict check","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Content replaced"},"409":{"description":"Version conflict"}}}},"/api/docs/{id}/comments":{"get":{"summary":"List comments","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}},"post":{"summary":"Create a comment","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"201":{"description":"Created"}}}},"/api/docs/{id}/comments/{commentId}/replies":{"post":{"summary":"Reply to a comment","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"commentId","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"201":{"description":"Created"}}}},"/api/docs/{id}/comments/{commentId}/resolve":{"post":{"summary":"Resolve or reopen a comment","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"commentId","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/api/docs/{id}/suggestions":{"get":{"summary":"List suggestions","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}},"post":{"summary":"Create a suggestion","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"201":{"description":"Created"}}}},"/api/docs/{id}/suggestions/{suggestionId}":{"post":{"summary":"Accept or reject a suggestion","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"suggestionId","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/api/docs/{id}/shares":{"get":{"summary":"List shares with owner access","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}},"post":{"summary":"Create a scoped share link","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"201":{"description":"Created"}}}},"/api/docs/{id}/shares/{secret}":{"delete":{"summary":"Revoke a share link with owner access","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"secret","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/api/docs/{id}/revisions":{"get":{"summary":"List revisions","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/api/docs/{id}/revisions/{revisionId}":{"get":{"summary":"Read a revision","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"revisionId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"key","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/api/docs/{id}/restore":{"post":{"summary":"Restore a revision","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/api/docs/{id}/events":{"get":{"summary":"Read or long-poll document activity","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/api/docs/{id}/assets":{"post":{"summary":"Upload image or video bytes and receive markdown","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"201":{"description":"Created"}}}},"/api/docs/{id}/claim":{"post":{"summary":"Claim an anonymous edit-link doc into the current human account","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/api/docs/{id}/publish":{"post":{"summary":"Publish or unpublish a document with owner access","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/pub/{id}":{"get":{"summary":"Read the public published page","security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/pub/{id}.md":{"get":{"summary":"Read published markdown","security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/api/health":{"get":{"summary":"Read service health","security":[],"responses":{"200":{"description":"OK"}}}},"/cli.md":{"get":{"summary":"Read human CLI documentation","security":[],"responses":{"200":{"description":"OK"}}}},"/install.sh":{"get":{"summary":"Download the shell installer for agmd","security":[],"responses":{"200":{"description":"OK"}}}},"/downloads/agmd":{"get":{"summary":"Download the bundled agmd Node CLI executable","security":[],"responses":{"200":{"description":"OK"}}}},"/downloads/agmd/checksum":{"get":{"summary":"Read the SHA-256 checksum for /downloads/agmd","security":[],"responses":{"200":{"description":"OK"}}}},"/api/cli/commands":{"get":{"summary":"Read machine-readable CLI command discovery","security":[],"responses":{"200":{"description":"OK"}}}},"/api/cli/device/start":{"post":{"summary":"Start the agmd mere.world device-login flow","security":[],"responses":{"200":{"description":"OK"}}}},"/api/cli/device/token":{"post":{"summary":"Poll an approved agmd device login for an app-session token","security":[],"responses":{"200":{"description":"OK"}}}},"/agents.md":{"get":{"summary":"Agent documentation","security":[],"responses":{"200":{"description":"OK"}}}},"/openapi.json":{"get":{"summary":"OpenAPI document","security":[],"responses":{"200":{"description":"OK"}}}},"/mcp":{"get":{"summary":"Minimal MCP discovery metadata","security":[],"responses":{"200":{"description":"OK"}}}}}}