Infrastructure Note: As of version 0.4.1, the backend strictly requires vital environment variables (
GEMINI_API_KEYS,SECRET_KEY,MONGO_URI) validated via Pydantic. The server will refuse to start if the.envfile is incorrect or incomplete.
Global Error Standard: As of version 0.5.1, all API errors (HTTP 400, 401, 404, 409, 429, 500) return a standardized JSON object in the format
{"detail": "Descriptive error message."}.
Developer Mock Mode: The API supports a test mode by sending the
X-Mock-Mode: trueheader. When present, production services (Gemini) are replaced by fixed mock responses, and JWT expiration validation is ignored, allowing local simulations without consuming quotas.
This is the complete technical reference for all endpoints available in the FastAPI backend (/api/v1). All responses and requests (except file uploads) use the application/json format.
- Authentication and Account (
/auth) - Conversational Onboarding (
/onboarding) - AI Processing and Extraction (
/process) - Insight / Memory Management (
/insights&/confirm-insights) - User Rules (
/rules)
Security Warning (JWT): Most endpoints in this API (except open routes like /auth/signup and /auth/token) require JWT token authentication. You must include the Authorization: Bearer <your_token> header in protected requests.
Registers a new user and returns a JWT access token. Profile facts and suggested initial rules are also saved. This endpoint has Rate Limiting per IP.
Authenticates the user by validating the password and returns a JWT access token.
Updates an existing user's profile and saves additional rules if provided.
Requests password recovery by sending a secure link via email.
Sets a new password using a valid recovery token.
Permanently deletes the logged-in user's account and all associated data (rules and insights).
Starts the onboarding process, returning the virtual assistant's welcome message. This endpoint has Rate Limiting per IP.
Sends the chat history for Gemini to continuously analyze the user profile.
Receives an unstructured file, sends it to the AI (Google Gemini), and returns structured JSON data. (Note: Uses a deterministic Smart Scoring algorithm that ensures high availability by switching keys and models in milliseconds). This endpoint has Rate Limiting per IP.
Main (and central) endpoint for saving, editing, or merging memories. Contains internal logic for duplicate checking by identifiers (Tax ID, Email, Phone) to prevent repeated records.
This endpoint serves three distinct app flows depending on the payload parameters:
- New Memory Creation
- Existing Memory Editing
- Memory Consolidation/Merging
Lists all memories. Supports search query param for global textual search.
Returns the total count of a user's memories.
Returns the details of a specific memory by its ID.
Reschedules the date of a specific action trigger within a memory.
Permanently removes a specific action trigger within a memory.
Permanently deletes a memory.
Lists all registered guidelines for a user.
Creates a new rule for the AI.
Completely replaces a rule's data.
Deletes a rule.