{"components":{"schemas":{"APIKeyRequest":{"properties":{"name":{"type":"string"}},"type":"object"},"MagicLinkRequest":{"properties":{"email":{"format":"email","type":"string"},"name":{"type":"string"}},"required":["email"],"type":"object"},"PublishRequest":{"examples":[{"files":{"index.html":"\u003c!doctype html\u003e\u003chtml\u003e\u003cbody\u003e\u003ch1\u003eBoard report\u003c/h1\u003e\u003c/body\u003e\u003c/html\u003e"},"folder":"board-report","mode":"registered","share":{"emails":["reader@example.com"]},"title":"Board report","visibility":"recipients"}],"properties":{"agent_id":{"type":"string"},"agent_name":{"type":"string"},"expires_at":{"format":"date-time","type":"string"},"files":{"additionalProperties":{"type":"string"},"type":"object"},"folder":{"description":"Optional URL folder name for /f/{folder}/. It is normalized and must not already exist.","type":"string"},"mode":{"enum":["fast","registered"],"type":"string"},"require_registration":{"type":"boolean"},"share":{"properties":{"emails":{"items":{"type":"string"},"type":"array"},"message":{"type":"string"}},"type":"object"},"slug":{"description":"Alias for folder.","type":"string"},"title":{"type":"string"},"ttl_seconds":{"type":"integer"},"visibility":{"enum":["private","company","magic","recipients","signed","public"],"type":"string"}},"required":["files"],"type":"object"},"ShareRequest":{"properties":{"emails":{"items":{"type":"string"},"type":"array"},"id":{"type":"string"},"message":{"type":"string"},"publication_id":{"type":"string"},"slug":{"type":"string"}},"required":["emails"],"type":"object"}},"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"},"sessionCookie":{"in":"cookie","name":"htmlshare_session","type":"apiKey"}}},"info":{"description":"API for publishing and sharing generated HTML pages. Publishing requires a confirmed publisher account or bearer API key. Viewer accounts can sign in and open files shared with them.","title":"htmlshare API","version":"v1"},"openapi":"3.1.0","paths":{"/abuse-reports":{"post":{"responses":{"201":{"description":"Abuse notice accepted"}},"summary":"Submit abuse or illegal content notice"}},"/ai/signup":{"post":{"description":"Only emails whose domains are configured in PUBLISHER_EMAIL_DOMAINS can receive publisher API keys. Other accounts may sign in as viewers for shared files.","responses":{"201":{"description":"Magic link created"}},"summary":"Start registered-account automation signup with a magic link"}},"/api-keys":{"post":{"description":"Requires a confirmed authenticated publisher/admin session. Domains allowed to become publishers are configured with PUBLISHER_EMAIL_DOMAINS.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyRequest"}}},"required":true},"responses":{"201":{"description":"Agent key created"}},"security":[{"sessionCookie":[]}],"summary":"Create an agent API key"}},"/auth/magic-link":{"post":{"description":"Use this for browser login. It sends a single-use /auth/magic link and never returns or emails an hsk_... agent token.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MagicLinkRequest"}}},"required":true},"responses":{"202":{"description":"Sign-in link sent"}},"summary":"Send a human sign-in link by email"}},"/mcp":{"post":{"description":"Use Authorization: Bearer hsk_... and JSON-RPC methods initialize, tools/list, and tools/call.","responses":{"200":{"description":"MCP JSON-RPC response"}},"security":[{"bearerAuth":[]}],"summary":"Remote MCP JSON-RPC endpoint"}},"/publish":{"post":{"description":"Canonical publishing endpoint. Use mode=registered with bearer/session auth for account-owned sharing, dashboard control, signed access, audit history, or long-lived library storage. Fast mode is only available when ENABLE_FAST_PUBLISH=true is configured.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishRequest"}}},"required":true},"responses":{"201":{"description":"HTML published"}},"security":[{"bearerAuth":[]},{"sessionCookie":[]}],"summary":"Publish an HTML bundle with a publisher account or API key."}},"/share":{"post":{"description":"Creates magic links for recipients and sends email when email delivery is configured.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareRequest"}}},"required":true},"responses":{"201":{"description":"Publication shared"}},"security":[{"bearerAuth":[]}],"summary":"Share an existing publication by email"}}},"servers":[{"url":"https://appshare.ecija.ai/api/v1"}]}
