{"version":"0.1.0","routes":{"sources":{"list":{"path":"/sources","methods":["GET"],"description":"List all sources with embedded capabilities and categories"},"get":{"path":"/sources/{id}","methods":["GET"],"description":"Get a specific source with embedded capabilities and categories"}},"ai":{"models":{"path":"/ai/models","methods":["POST"],"description":"Query AI models compatible with the requesting device (send device capabilities in body)"}},"capabilities":{"list":{"path":"/capabilities","methods":["GET"],"description":"List all available capabilities"}},"devices":{"key-response":{"path":"/account/devices/{device_id}/key-response","methods":["POST"],"description":"Existing device posts wrapped master key for requesting device"},"push-token":{"path":"/account/devices/{device_id}/push-token","methods":["POST"],"description":"Register or clear push notification token for a device"},"detail":{"path":"/account/devices/{device_id}","methods":["GET","PUT","DELETE"],"description":"Get, update, or delete a specific device"},"list":{"path":"/account/devices","methods":["GET","POST"],"description":"List and register devices"},"key-rotation":{"path":"/account/devices/key-rotation","methods":["POST"],"description":"Notify all devices that a key rotation has occurred"},"key-transfer":{"path":"/account/devices/{device_id}/key-transfer","methods":["GET"],"description":"New device retrieves and consumes the wrapped master key"},"key-request":{"path":"/account/devices/{device_id}/key-request","methods":["GET","POST"],"description":"Key exchange: POST public key (new device) or GET pending public key (existing device)"},"pairing-code":{"path":"/account/devices/{device_id}/pairing-code","methods":["POST"],"description":"Generate a 6-digit pairing code for QR-based device setup"}},"keys":{"kind":{"path":"/account/keys/{kind}","methods":["GET","PUT","DELETE"],"description":"Fetch, upsert, or remove a wrapped master-key blob"},"list":{"path":"/account/keys","methods":["GET"],"description":"List unlock methods (recovery_code, passphrase) — metadata only"}},"connections":{"list":{"path":"/connections","methods":["GET","POST"],"description":"List and create connections"},"refresh":{"path":"/connections/{id}/refresh","methods":["POST"],"description":"Refresh OAuth tokens - uses server credentials but returns tokens to client without storing"},"connect":{"path":"/connections/connect","methods":["POST"],"description":"Exchange OAuth code for tokens - returns tokens to client without storing on server"},"initiate":{"path":"/connections/initiate","methods":["POST"],"description":"Initiate OAuth flow - returns OAuth URL for client to open"},"tokens":{"path":"/connections/{id}/tokens","methods":["GET","PUT"],"description":"Get or store client-encrypted OAuth tokens for portable access"},"get":{"path":"/connections/{id}","methods":["GET","PATCH","DELETE"],"description":"Get, update, or delete a connection"}},"categories":{"list":{"path":"/categories","methods":["GET"],"description":"List all available categories"}},"webhooks":{"webhook":{"path":"/webhooks/{mode}/{source}/{capability}","methods":["POST"],"description":"Webhook relay - receives notifications from providers, sends push to clients"}},"channels":{"list":{"path":"/channels","methods":["GET"],"description":"List channels for a connection (requires ?connection_id=UUID)"},"rename":{"path":"/channels/{id}/rename","methods":["POST"],"description":"Rename a calendar channel on its provider"},"discover":{"path":"/channels/discover","methods":["POST"],"description":"Discover and create channels for a connection"},"detail":{"path":"/channels/{id}","methods":["GET","PATCH"],"description":"Get or update a specific channel"}},"general":{"readiness":{"path":"/health/ready","methods":["GET"],"description":"Readiness probe — checks database and NATS connectivity (503 if unavailable)"},"index":{"path":"/","methods":["GET"],"description":"API index and documentation"},"health":{"path":"/health","methods":["GET"],"description":"Liveness check — is the process up (no dependency probe)"}},"account":{"profiles-key-source":{"path":"/account/profiles/{source}/key","methods":["GET"],"description":"Get encrypted sync key for a specific source profile"},"connect":{"path":"/account/connect","methods":["POST"],"description":"Unified authentication - handles discovery, password auth, OAuth initiation, and OAuth callback all in one endpoint"},"password-reset-confirm":{"path":"/account/password-reset/confirm","methods":["POST"],"description":"Complete a password reset by redeeming the token and setting a new password. Invalidates all existing refresh tokens."},"profiles":{"path":"/account/profiles","methods":["GET"],"description":"List user authentication profiles"},"logout":{"path":"/account/logout","methods":["POST"],"description":"Clear session cookies for browser clients"},"cancel-deletion":{"path":"/account/me/cancel-deletion","methods":["POST"],"description":"Cancel a pending account deletion during the grace window"},"me":{"path":"/account/me","methods":["GET","PATCH","DELETE"],"description":"Get, update, or schedule deletion of the current user (DELETE soft-deletes with a 7-day grace period)"},"refresh":{"path":"/account/refresh","methods":["POST"],"description":"Refresh access token using a valid refresh token (body or HttpOnly cookie)"},"password-reset-request":{"path":"/account/password-reset/request","methods":["POST"],"description":"Start a password-reset flow by emailing a single-use link to the address on file. Always 204; rate-limited per user."},"profiles-key":{"path":"/account/profiles/key","methods":["GET","POST","PUT"],"description":"Manage encrypted sync key for primary profile (GET: retrieve, POST: create, PUT: update)"}},"suggestions":{"matches":{"path":"/suggestions/matches","methods":["POST"],"description":"Record client-detected detection-pattern matches"},"dismiss":{"path":"/suggestions/{source_slug}/dismiss","methods":["POST","DELETE"],"description":"Dismiss (POST) or undismiss (DELETE) a suggestion for a source"},"list":{"path":"/suggestions","methods":["GET"],"description":"List ranked suggested integrations for the authenticated user"}}}}