================================================================================ API DOCUMENTATION Generated: 2026-08-19T01:43:16.788Z ================================================================================ BASE URL: http://www.diabeteswarrior.net AUTHENTICATION -------------- Bearer token required in Authorization header: Authorization: Bearer Get token via OAuth flow at: http://www.diabeteswarrior.net/auth CORE ENDPOINTS -------------- Authentication: GET /api/auth/me - Get current user info POST /api/auth/logout - Logout current session POST /api/auth/refresh - Refresh access token Entities: Recipes: GET /api/entities/recipes - List all recipess GET /api/entities/recipes/{id} - Get single recipes Fields: title, description, category, meal_type, image_url, prep_minutes, cook_minutes, servings, calories, carbs_grams, protein_grams, fat_grams, fiber_grams, glycemic_load, ingredients, instructions, tags 18 additional private entities not shown. Authenticate with a Bearer token to see full entity documentation. Custom Endpoints: POST /api/track-event [Public] Platform-agnostic user-state event emitter. Forwards Warrior lifecycle events (trial_started, trial_day_X, subscription_charged, etc.) to a configurable downstream webhook (ClickFunnels / Salesforce / Zapier-Make middleware) set via EVENT_WEBHOOK_URL. Destination is swappable without a rebuild; if unset, events are logged and accepted so the app never breaks. INTEGRATIONS ------------ GET /api/composio/connections - List Composio connections POST /api/composio/execute - Execute Composio action Body: { action, params, provider, alias? }. `alias` names ONE of the signed-in user's own connected accounts for that provider (e.g. "Work Gmail"); omit it to use their default account. ANALYTICS --------- POST /api/analytics/record - Record analytics event BACKGROUND JOBS --------------- POST /api/backend/queue-job - Queue background job GET /api/backend/job-status/{id} - Get job status AI FEATURES ----------- POST /api/ai/chat - AI chat completion POST /api/ai/object - Generate structured JSON (schema-constrained) POST /api/ai/vision - Image/OCR understanding (base64 image -> text/JSON) POST /api/ai/embedding - Generate embeddings KNOWLEDGE BASE -------------- POST /api/rag/upload - Upload document POST /api/rag/query - Query knowledge base GET /api/rag/documents - List documents DELETE /api/rag/documents/{id} - Delete document -------------------------------------------------------------------------------- For detailed OpenAPI specification: http://www.diabeteswarrior.net/api/openapi.json For interactive docs: http://www.diabeteswarrior.net/api-docs