{"openapi":"3.1.0","info":{"title":"Memara API","description":"API for Memara - External memory system for AI agents and workflows with Memory Spaces and Socket-Based Authentication support","version":"0.3.0"},"paths":{"/auth/me":{"get":{"tags":["authentication"],"summary":"Get current user","description":"Get the current authenticated user's profile information.","operationId":"get_user_profile_auth_me_get","responses":{"200":{"description":"Current user information","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/auth/logout":{"post":{"tags":["authentication"],"summary":"Logout user","description":"Logout the current user by clearing the authentication cookie.","operationId":"logout_auth_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/auth/status":{"get":{"tags":["authentication"],"summary":"Authentication status","description":"Check if the user is authenticated without requiring authentication.","operationId":"auth_status_auth_status_get","responses":{"200":{"description":"Authentication status information","content":{"application/json":{"schema":{}}}}}}},"/spaces":{"get":{"tags":["spaces"],"summary":"Get user spaces","description":"Get all spaces for the current user","operationId":"get_user_spaces_spaces_get","responses":{"200":{"description":"List of user spaces with metadata","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["spaces"],"summary":"Create a new space","description":"Create a new memory space for the current user","operationId":"create_space_spaces_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpaceCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Space"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/spaces/{space_id}":{"get":{"tags":["spaces"],"summary":"Get space details","description":"Get detailed information about a specific space","operationId":"get_space_spaces__space_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"space_id","in":"path","required":true,"schema":{"type":"string","title":"Space Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Space"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["spaces"],"summary":"Update space","description":"Update details of a specific space","operationId":"update_space_spaces__space_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"space_id","in":"path","required":true,"schema":{"type":"string","title":"Space Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpaceUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Space"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["spaces"],"summary":"Delete space","description":"Delete a space and all its memories permanently","operationId":"delete_space_spaces__space_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"space_id","in":"path","required":true,"schema":{"type":"string","title":"Space Id"}},{"name":"confirm","in":"query","required":false,"schema":{"type":"boolean","description":"Confirmation required to delete space","default":false,"title":"Confirm"},"description":"Confirmation required to delete space"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/spaces/{space_id}/access":{"post":{"tags":["spaces"],"summary":"Update last accessed timestamp","description":"Update the last accessed timestamp for a space.\n    \n    This is called automatically when:\n    - Viewing space details\n    - Creating memories in the space\n    - Searching within the space","operationId":"touch_space_spaces__space_id__access_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"space_id","in":"path","required":true,"schema":{"type":"string","title":"Space Id"}}],"responses":{"200":{"description":"Last accessed timestamp updated","content":{"application/json":{"schema":{}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Space not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/spaces/{space_id}/memory-map/summary":{"get":{"tags":["spaces"],"summary":"Memory map summary","description":"Lightweight counts and tag histogram for the Memory Workspace map. Does not return memory body text. When the space exceeds the scan cap, `meta.approximate_counts` is true and totals may be lower bounds. `top_tags` are derived from the first `meta.tag_sample_limit` objects (newest first) matching filters.","operationId":"get_memory_map_summary_spaces__space_id__memory_map_summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"space_id","in":"path","required":true,"schema":{"type":"string","title":"Space Id"}},{"name":"exclude_chunks","in":"query","required":false,"schema":{"type":"boolean","description":"When true, exclude chunk rows; map shows logical memories","default":true,"title":"Exclude Chunks"},"description":"When true, exclude chunk rows; map shows logical memories"},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Filter by tags (any match)","title":"Tags"},"description":"Filter by tags (any match)"},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by source","title":"Source"},"description":"Filter by source"},{"name":"min_importance","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":10,"minimum":1},{"type":"null"}],"description":"Minimum importance","title":"Min Importance"},"description":"Minimum importance"},{"name":"tag_sample_limit","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":100,"description":"Max objects scanned for top_tags histogram","default":2000,"title":"Tag Sample Limit"},"description":"Max objects scanned for top_tags histogram"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryMapSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/spaces/{space_id}/memory-map/nodes":{"get":{"tags":["spaces"],"summary":"Memory map nodes","description":"Paginated skeleton memories for the Memory Workspace map: facets and timestamps only—no `content` or `full_content`. Use `GET /memories/{id}` for full text.","operationId":"get_memory_map_nodes_spaces__space_id__memory_map_nodes_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"space_id","in":"path","required":true,"schema":{"type":"string","title":"Space Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"sort_by","in":"query","required":false,"schema":{"type":"string","description":"Sort field","default":"created_at","title":"Sort By"},"description":"Sort field"},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","description":"Sort order (asc or desc)","default":"desc","title":"Sort Order"},"description":"Sort order (asc or desc)"},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Filter by tags","title":"Tags"},"description":"Filter by tags"},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by source","title":"Source"},"description":"Filter by source"},{"name":"min_importance","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":10,"minimum":1},{"type":"null"}],"description":"Minimum importance","title":"Min Importance"},"description":"Minimum importance"},{"name":"exclude_chunks","in":"query","required":false,"schema":{"type":"boolean","description":"When true, exclude chunk rows from results","default":true,"title":"Exclude Chunks"},"description":"When true, exclude chunk rows from results"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryMapNodesPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/spaces/{space_id}/share":{"post":{"tags":["spaces"],"summary":"Share a space with another user (Future Feature)","description":"🚧 **Future Feature**: Share a memory space with another user.\n    \n    **Planned functionality:**\n    - Share spaces with specific users\n    - Grant editor or viewer permissions\n    - Manage collaborative access\n    \n    Currently returns 501 Not Implemented.","operationId":"share_space_spaces__space_id__share_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"space_id","in":"path","required":true,"schema":{"type":"string","title":"Space Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpaceShareRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"501":{"description":"Feature not yet implemented","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/spaces/{space_id}/analytics":{"get":{"tags":["spaces"],"summary":"Get space analytics (Future Feature)","description":"🚧 **Future Feature**: Get detailed analytics for a memory space.\n    \n    **Planned metrics:**\n    - Memory creation trends\n    - Search patterns\n    - Most used tags\n    - Usage statistics\n    \n    Currently returns 501 Not Implemented.","operationId":"get_space_analytics_spaces__space_id__analytics_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"space_id","in":"path","required":true,"schema":{"type":"string","title":"Space Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"501":{"description":"Feature not yet implemented","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memories/content-limits":{"get":{"tags":["memories"],"summary":"Get content size limits and guidelines","description":"Get information about content size limits and optimization guidelines.\n\nUseful for client applications to validate content before sending.","operationId":"get_content_limits_memories_content_limits_get","responses":{"200":{"description":"Content size limits and optimization guidelines","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Request Entity Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/memories":{"post":{"tags":["memories"],"summary":"Create a new memory","description":"Create a new memory.","operationId":"create_memory_endpoint_memories_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Space ID to create memory in (defaults to user's default space)","title":"Space Id"},"description":"Space ID to create memory in (defaults to user's default space)"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryCreate"}}}},"responses":{"201":{"description":"The created memory","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Memory"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Request Entity Too Large"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["memories"],"summary":"List memories","description":"List memories with pagination and filtering options.","operationId":"list_memories_endpoint_memories_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":10,"title":"Size"},"description":"Page size"},{"name":"sort_by","in":"query","required":false,"schema":{"type":"string","description":"Field to sort by","default":"created_at","title":"Sort By"},"description":"Field to sort by"},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","description":"Sort order (asc or desc)","default":"desc","title":"Sort Order"},"description":"Sort order (asc or desc)"},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Filter by tags","title":"Tags"},"description":"Filter by tags"},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by source","title":"Source"},"description":"Filter by source"},{"name":"min_importance","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":10,"minimum":1},{"type":"null"}],"description":"Minimum importance","title":"Min Importance"},"description":"Minimum importance"},{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Space ID to list memories from","title":"Space Id"},"description":"Space ID to list memories from"}],"responses":{"200":{"description":"Paginated list of memories","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryList"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Request Entity Too Large"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memories/audio":{"post":{"tags":["memories"],"summary":"Create audio memory with transcription","description":"Create a new audio memory with automatic transcription.\n\n**Process:**\n1. Upload audio file to S3\n2. Transcribe audio using OpenAI Whisper\n3. Create memory with content + transcription\n4. Memory is searchable via text queries\n\n**Supported Formats:** MP3, M4A, WAV, FLAC, OGG, AAC, WebM (e.g. browser recordings)\n\n**Tier Limits:**\n- Free: Not available\n- Starter: Up to 10MB audio files\n- Pro: Up to 25MB audio files\n- Enterprise: Up to 100MB audio files","operationId":"create_audio_memory_endpoint_memories_audio_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_audio_memory_endpoint_memories_audio_post"}}},"required":true},"responses":{"201":{"description":"The created audio memory with transcription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Memory"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Request Entity Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/memories/export":{"get":{"tags":["memories"],"summary":"Export memories","description":"Export memories to a portable JSON payload for backup/transfer.","operationId":"export_memories_endpoint_memories_export_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Space ID to export from","title":"Space Id"},"description":"Space ID to export from"}],"responses":{"200":{"description":"Portable memory export payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryExportResponse"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Request Entity Too Large"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memories/import":{"post":{"tags":["memories"],"summary":"Import memories","description":"Import memories into a user-owned space with payload validation.","operationId":"import_memories_endpoint_memories_import_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryImportRequest"}}},"required":true},"responses":{"200":{"description":"Import result summary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryImportResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Request Entity Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/memories/search":{"post":{"tags":["memories"],"summary":"Search memories","description":"Search memories with semantic similarity.","operationId":"search_memories_endpoint_memories_search_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Space ID to search in (defaults to user's default space)","title":"Space Id"},"description":"Space ID to search in (defaults to user's default space)"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchQuery"}}}},"responses":{"200":{"description":"List of matching memories","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Memory"},"title":"Response Search Memories Endpoint Memories Search Post"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Request Entity Too Large"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memories/{memory_id}":{"get":{"tags":["memories"],"summary":"Get a specific memory","description":"Get a specific memory by its ID.","operationId":"get_memory_endpoint_memories__memory_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","description":"The ID of the memory to get","title":"Memory Id"},"description":"The ID of the memory to get"},{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Space ID if memory is in a specific space","title":"Space Id"},"description":"Space ID if memory is in a specific space"}],"responses":{"200":{"description":"The requested memory","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Memory"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Request Entity Too Large"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["memories"],"summary":"Update a memory","description":"Update a memory with new data.","operationId":"update_memory_endpoint_memories__memory_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","description":"The ID of the memory to update","title":"Memory Id"},"description":"The ID of the memory to update"},{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Space ID if memory is in a specific space","title":"Space Id"},"description":"Space ID if memory is in a specific space"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryUpdate"}}}},"responses":{"200":{"description":"The updated memory","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Memory"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Request Entity Too Large"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["memories"],"summary":"Delete a memory","description":"Delete a memory by its ID.","operationId":"delete_memory_endpoint_memories__memory_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","description":"The ID of the memory to delete","title":"Memory Id"},"description":"The ID of the memory to delete"},{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Space ID for space-scoped deletion","title":"Space Id"},"description":"Space ID for space-scoped deletion"}],"responses":{"204":{"description":"Memory deleted successfully"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Request Entity Too Large"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memories/{memory_id}/chunks":{"get":{"tags":["memories"],"summary":"Get memory chunks (Legacy Feature)","description":"Get all chunks for a chunked memory.\n\n📋 **Note**: This is a legacy feature for chunked content handling.","operationId":"get_chunks_memories__memory_id__chunks_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","description":"Memory ID","title":"Memory Id"},"description":"Memory ID"}],"responses":{"200":{"description":"List of chunks for a chunked memory","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Memory"},"title":"Response Get Chunks Memories  Memory Id  Chunks Get"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Request Entity Too Large"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memories/{memory_id}/full-content":{"get":{"tags":["memories"],"summary":"Get reconstructed full content (Legacy Feature)","description":"Get the full content of a memory, reconstructed from chunks if necessary.\n\n📋 **Note**: This is a legacy feature for chunked content handling.","operationId":"get_full_content_memories__memory_id__full_content_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","description":"Memory ID","title":"Memory Id"},"description":"Memory ID"}],"responses":{"200":{"description":"Original full content reconstructed from chunks","content":{"application/json":{"schema":{}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Request Entity Too Large"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/activity":{"get":{"tags":["activity"],"summary":"List current user's activity events","description":"Newest-first feed of memory and search activity for the authenticated user.","operationId":"list_activity_api_v1_activity_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When set, only events for this space_id","title":"Space Id"},"description":"When set, only events for this space_id"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":0,"default":0,"title":"Offset"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor from `next_cursor` for stable keyset pagination","title":"Cursor"},"description":"Opaque cursor from `next_cursor` for stable keyset pagination"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserActivityFeedResponse"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/activity/weekly-summary":{"get":{"tags":["activity"],"summary":"Weekly Storage vs Retrieval counts for a space","description":"Rolling counts from durable activity events (last `window_days`, UTC). Requires a space the user can access.","operationId":"weekly_activity_summary_api_v1_activity_weekly_summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"space_id","in":"query","required":true,"schema":{"type":"string","description":"Space ID to scope counts","title":"Space Id"},"description":"Space ID to scope counts"},{"name":"window_days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"description":"Rolling window in days","default":7,"title":"Window Days"},"description":"Rolling window in days"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WeeklyActivitySummaryResponse"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/gamification":{"get":{"tags":["gamification"],"summary":"Get gamification state for the current user","description":"Authoritative counters, XP/level, streaks, achievements, and milestones.","operationId":"get_gamification_api_v1_gamification_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GamificationStateResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/realtime/memories/stream":{"get":{"tags":["realtime"],"summary":"Stream Memory Updates","description":"Server-Sent Events endpoint for real-time memory updates.\n\nStreams memory creation, updates, and deletions in real-time to replace polling.","operationId":"stream_memory_updates_api_realtime_memories_stream_get","parameters":[{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Space Id"}},{"name":"token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/realtime/memories/notify-created":{"post":{"tags":["realtime"],"summary":"Notify Memory Created","description":"Internal endpoint to broadcast memory creation events.\nCalled by memory service when new memories are created.","operationId":"notify_memory_created_api_realtime_memories_notify_created_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Memory Data"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/realtime/memories/notify-updated":{"post":{"tags":["realtime"],"summary":"Notify Memory Updated","description":"Internal endpoint to broadcast memory update events.","operationId":"notify_memory_updated_api_realtime_memories_notify_updated_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Memory Data"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/realtime/memories/notify-deleted":{"post":{"tags":["realtime"],"summary":"Notify Memory Deleted","description":"Internal endpoint to broadcast memory deletion events.","operationId":"notify_memory_deleted_api_realtime_memories_notify_deleted_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"memory_id","in":"query","required":true,"schema":{"type":"string","title":"Memory Id"}},{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Space Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/analytics/memory/overview":{"get":{"tags":["analytics"],"summary":"Get memory analytics overview","description":"Get comprehensive memory analytics overview with usage patterns and trends","operationId":"get_memory_analytics_overview_analytics_memory_overview_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"time_range","in":"query","required":false,"schema":{"type":"string","pattern":"^(7d|30d|90d)$","default":"30d","title":"Time Range"}},{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Space Id"}}],"responses":{"200":{"description":"Memory analytics data including totals, trends, and insights","content":{"application/json":{"schema":{}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/analytics/memory-reads/summary":{"get":{"tags":["analytics"],"summary":"Memory read outcomes summary (Redis)","description":"Aggregated memory read counts from Redis for dashboard use. Covers integration reads instrumented with `memory_read_analytics_enabled` (list, get, search). Does not query PostHog.","operationId":"get_memory_reads_summary_analytics_memory_reads_summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"time_range","in":"query","required":false,"schema":{"type":"string","pattern":"^(7d|30d|90d)$","default":"30d","title":"Time Range"}},{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When set, restrict breakdown to this space (must belong to user)","title":"Space Id"},"description":"When set, restrict breakdown to this space (must belong to user)"}],"responses":{"200":{"description":"JSON: time_range_days, total_reads, rollup (operation, integration_type, space_id, outcome, count), by_day (date, total_reads, breakdown), source.","content":{"application/json":{"schema":{}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/analytics/intelligence/recommendations":{"get":{"tags":["analytics"],"summary":"Get AI-powered intelligence recommendations","description":"Get advanced AI-powered recommendations for memory optimization and knowledge management","operationId":"get_intelligence_recommendations_analytics_intelligence_recommendations_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/analytics/recommendations":{"get":{"tags":["analytics"],"summary":"Get optimization recommendations","description":"Get AI-powered optimization recommendations for improving memory performance","operationId":"get_optimization_recommendations_analytics_recommendations_get","responses":{"200":{"description":"List of personalized optimization recommendations","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/analytics/spaces/{space_id}":{"get":{"tags":["analytics"],"summary":"Get detailed space analytics","description":"Get comprehensive analytics for a specific memory space","operationId":"get_space_analytics_analytics_spaces__space_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"space_id","in":"path","required":true,"schema":{"type":"string","title":"Space Id"}},{"name":"time_range","in":"query","required":false,"schema":{"type":"string","pattern":"^(7d|30d|90d)$","description":"Time range for analytics","default":"30d","title":"Time Range"},"description":"Time range for analytics"}],"responses":{"200":{"description":"Detailed analytics data for the specified space","content":{"application/json":{"schema":{}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/analytics/refresh-memory-counts":{"post":{"tags":["analytics"],"summary":"Refresh memory count cache","description":"Refresh cached memory counts for all spaces to fix analytics discrepancies","operationId":"refresh_memory_counts_analytics_refresh_memory_counts_post","responses":{"200":{"description":"Updated memory counts for all spaces","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/analytics/search/performance":{"get":{"tags":["analytics"],"summary":"Get search performance analytics","description":"Get detailed search performance metrics and patterns from comprehensive Redis analytics","operationId":"get_search_performance_analytics_analytics_search_performance_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"time_range","in":"query","required":false,"schema":{"type":"string","pattern":"^(7d|30d|90d)$","description":"Time range for analytics","default":"30d","title":"Time Range"},"description":"Time range for analytics"}],"responses":{"200":{"description":"Search performance analytics including success rates and patterns","content":{"application/json":{"schema":{}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/redis-analytics/memory-count":{"get":{"tags":["redis-analytics"],"summary":"Get user memory count from Redis (FAST)","description":"Get total memory count for user from Redis counters - optional space_id for space-scoped count","operationId":"get_user_memory_count_redis_redis_analytics_memory_count_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When provided, return memory count for this space only (user must have access)","title":"Space Id"},"description":"When provided, return memory count for this space only (user must have access)"}],"responses":{"200":{"description":"Total memory count from Redis","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/redis-analytics/memory-count/sync":{"post":{"tags":["redis-analytics"],"summary":"Sync Redis memory counts with database","description":"Sync Redis memory counts with actual database counts - use when Redis data is lost","operationId":"sync_memory_counts_redis_redis_analytics_memory_count_sync_post","responses":{"200":{"description":"Sync results with updated counts","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/redis-analytics/memory-count/health":{"get":{"tags":["redis-analytics"],"summary":"Check Redis memory counter health","description":"Check if Redis memory counter is healthy and working properly","operationId":"check_redis_memory_counter_health_redis_analytics_memory_count_health_get","responses":{"200":{"description":"Health status of Redis memory counter","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/tier/tier":{"get":{"tags":["tier"],"summary":"Get Tier Info","operationId":"get_tier_info_tier_tier_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/tier/upgrade-benefits/{target_tier}":{"get":{"tags":["tier"],"summary":"Get upgrade benefits comparison","description":"Compare current tier with target tier to show upgrade benefits","operationId":"get_upgrade_benefits_tier_upgrade_benefits__target_tier__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"target_tier","in":"path","required":true,"schema":{"type":"string","title":"Target Tier"}}],"responses":{"200":{"description":"Detailed comparison of features and limits","content":{"application/json":{"schema":{}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tier/check-feature/{feature_name}":{"post":{"tags":["tier"],"summary":"Check feature access with upgrade information","description":"Validate access to a specific feature and get upgrade info if needed","operationId":"check_feature_access_tier_check_feature__feature_name__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"feature_name","in":"path","required":true,"schema":{"type":"string","title":"Feature Name"}}],"responses":{"200":{"description":"Feature access status with upgrade recommendations","content":{"application/json":{"schema":{}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tier/usage-analytics":{"get":{"tags":["tier"],"summary":"Get detailed usage analytics","description":"Get comprehensive usage analytics and trends","operationId":"get_usage_analytics_tier_usage_analytics_get","responses":{"200":{"description":"Detailed usage analytics for the current user","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/tier/all-tiers":{"get":{"tags":["tier"],"summary":"Get information about all available tiers","description":"Get display information for all available subscription tiers","operationId":"get_all_tier_info_tier_all_tiers_get","responses":{"200":{"description":"List of all available tiers with their features","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/user/email-preferences":{"get":{"tags":["user-preferences"],"summary":"Get user email preferences (legacy)","description":"Legacy tier/product toggles stored in Supabase user_metadata. For Customer.io marketing topics, use GET /user/marketing-subscriptions instead.","operationId":"get_email_preferences_user_email_preferences_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailPreferencesResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["user-preferences"],"summary":"Update user email preferences (legacy)","description":"Legacy tier/product toggles in user_metadata. For marketing subscription topics, use PUT /user/marketing-subscriptions.","operationId":"update_email_preferences_user_email_preferences_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailPreferencesRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailPreferencesResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/user/notification-history":{"get":{"tags":["user-preferences"],"summary":"Get user notification history","description":"Retrieve history of email notifications sent to the user","operationId":"get_notification_history_user_notification_history_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/user/test-notification":{"post":{"tags":["user-preferences"],"summary":"Send test notification email","description":"Send a test email notification to verify email delivery","operationId":"send_test_notification_user_test_notification_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"notification_type","in":"query","required":false,"schema":{"type":"string","default":"test","title":"Notification Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/user/marketing-subscriptions":{"get":{"tags":["marketing-subscriptions"],"summary":"Get marketing email subscriptions","description":"Replica of Customer.io subscription topics for the authenticated user.","operationId":"get_marketing_subscriptions_user_marketing_subscriptions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketingSubscriptionsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["marketing-subscriptions"],"summary":"Update marketing email subscriptions","description":"Updates Supabase replica, Customer.io CDP traits, and PostHog person properties.","operationId":"put_marketing_subscriptions_user_marketing_subscriptions_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketingSubscriptionsPutRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketingSubscriptionsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/marketing/public-unsubscribe":{"post":{"tags":["marketing-public"],"summary":"Unsubscribe email from marketing (public)","description":"Opts the address out of Memara marketing emails. Always returns the same message to avoid email enumeration. Rate limited per IP and per email.","operationId":"public_unsubscribe_api_v1_marketing_public_unsubscribe_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicUnsubscribeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicUnsubscribeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sockets/templates":{"get":{"tags":["sockets"],"summary":"Get available socket templates","description":"Get all available socket templates with their configurations","operationId":"get_socket_templates_api_v1_sockets_templates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Response Get Socket Templates Api V1 Sockets Templates Get"}}}},"404":{"description":"Socket not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/sockets/templates/{template_id}":{"get":{"tags":["sockets"],"summary":"Get specific socket template","description":"Get detailed information about a specific socket template","operationId":"get_socket_template_api_v1_sockets_templates__template_id__get","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","title":"Template Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Socket Template Api V1 Sockets Templates  Template Id  Get"}}}},"404":{"description":"Socket not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/spaces/{space_id}/sockets/from-template":{"post":{"tags":["sockets"],"summary":"Create socket from template","description":"Create a new socket using a template","operationId":"create_socket_from_template_api_v1_spaces__space_id__sockets_from_template_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"space_id","in":"path","required":true,"schema":{"type":"string","title":"Space Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Request Data"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpaceSocket"}}}},"404":{"description":"Socket not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/spaces/{space_id}/sockets":{"post":{"tags":["sockets"],"summary":"Create a new socket for a space","description":"Create a new integration socket for the specified space","operationId":"create_socket_api_v1_spaces__space_id__sockets_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"space_id","in":"path","required":true,"schema":{"type":"string","title":"Space Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpaceSocketCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpaceSocket"}}}},"404":{"description":"Socket not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["sockets"],"summary":"List sockets for a space","description":"Get all integration sockets for the specified space","operationId":"list_sockets_api_v1_spaces__space_id__sockets_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"space_id","in":"path","required":true,"schema":{"type":"string","title":"Space Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocketList"}}}},"404":{"description":"Socket not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sockets/{socket_id}":{"get":{"tags":["sockets"],"summary":"Get socket details","description":"Get detailed information about a specific socket","operationId":"get_socket_api_v1_sockets__socket_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"socket_id","in":"path","required":true,"schema":{"type":"string","title":"Socket Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpaceSocket"}}}},"404":{"description":"Socket not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["sockets"],"summary":"Update socket","description":"Update socket configuration and settings","operationId":"update_socket_api_v1_sockets__socket_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"socket_id","in":"path","required":true,"schema":{"type":"string","title":"Socket Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpaceSocketUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpaceSocket"}}}},"404":{"description":"Socket not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["sockets"],"summary":"Delete socket","description":"Delete a socket and all its integration bindings","operationId":"delete_socket_api_v1_sockets__socket_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"socket_id","in":"path","required":true,"schema":{"type":"string","title":"Socket Id"}}],"responses":{"204":{"description":"Successful Response"},"404":{"description":"Socket not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sockets/{socket_id}/integrations":{"post":{"tags":["sockets"],"summary":"Create integration binding","description":"Create a new integration binding for a socket","operationId":"create_integration_binding_api_v1_sockets__socket_id__integrations_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"socket_id","in":"path","required":true,"schema":{"type":"string","title":"Socket Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationBindingCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationBinding"}}}},"404":{"description":"Socket not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["sockets"],"summary":"List integration bindings","description":"Get all integration bindings for a socket","operationId":"list_integration_bindings_api_v1_sockets__socket_id__integrations_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"socket_id","in":"path","required":true,"schema":{"type":"string","title":"Socket Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationBindingList"}}}},"404":{"description":"Socket not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sockets/{socket_id}/integrations/{binding_id}":{"put":{"tags":["sockets"],"summary":"Update integration binding","description":"Update integration binding configuration","operationId":"update_integration_binding_api_v1_sockets__socket_id__integrations__binding_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"socket_id","in":"path","required":true,"schema":{"type":"string","title":"Socket Id"}},{"name":"binding_id","in":"path","required":true,"schema":{"type":"string","title":"Binding Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationBindingUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationBinding"}}}},"404":{"description":"Socket not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["sockets"],"summary":"Delete integration binding","description":"Delete an integration binding","operationId":"delete_integration_binding_api_v1_sockets__socket_id__integrations__binding_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"socket_id","in":"path","required":true,"schema":{"type":"string","title":"Socket Id"}},{"name":"binding_id","in":"path","required":true,"schema":{"type":"string","title":"Binding Id"}}],"responses":{"204":{"description":"Successful Response"},"404":{"description":"Socket not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/socket-access/{binding_token}/memories":{"post":{"tags":["sockets","socket-access"],"summary":"Create memory via socket","description":"Create a new memory using socket access token","operationId":"create_memory_via_socket_api_v1_socket_access__binding_token__memories_post","parameters":[{"name":"binding_token","in":"path","required":true,"schema":{"type":"string","title":"Binding Token"}},{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Memory"}}}},"404":{"description":"Socket not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/socket-access/{binding_token}/memories/audio":{"post":{"tags":["sockets","socket-access"],"summary":"Create audio memory via socket","description":"Multipart audio upload with transcription; same fields as POST /memories/audio","operationId":"create_audio_memory_via_socket_api_v1_socket_access__binding_token__memories_audio_post","parameters":[{"name":"binding_token","in":"path","required":true,"schema":{"type":"string","title":"Binding Token"}},{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_audio_memory_via_socket_api_v1_socket_access__binding_token__memories_audio_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Memory"}}}},"404":{"description":"Socket not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/socket-access/{binding_token}/memories/search":{"get":{"tags":["sockets","socket-access"],"summary":"Search memories via socket","description":"Search memories using socket access token","operationId":"search_memories_via_socket_api_v1_socket_access__binding_token__memories_search_get","parameters":[{"name":"binding_token","in":"path","required":true,"schema":{"type":"string","title":"Binding Token"}},{"name":"query","in":"query","required":true,"schema":{"type":"string","title":"Query"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}},{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Memory"},"title":"Response Search Memories Via Socket Api V1 Socket Access  Binding Token  Memories Search Get"}}}},"404":{"description":"Socket not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["sockets","socket-access"],"summary":"Search memories via socket (POST)","description":"Search memories using socket access token with JSON request body","operationId":"search_memories_via_socket_post_api_v1_socket_access__binding_token__memories_search_post","parameters":[{"name":"binding_token","in":"path","required":true,"schema":{"type":"string","title":"Binding Token"}},{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchQuery"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Memory"},"title":"Response Search Memories Via Socket Post Api V1 Socket Access  Binding Token  Memories Search Post"}}}},"404":{"description":"Socket not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/socket-access/{binding_token}/memories/{memory_id}":{"get":{"tags":["sockets","socket-access"],"summary":"Get memory via socket","description":"Get a specific memory using socket access token","operationId":"get_memory_via_socket_api_v1_socket_access__binding_token__memories__memory_id__get","parameters":[{"name":"binding_token","in":"path","required":true,"schema":{"type":"string","title":"Binding Token"}},{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}},{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Memory"}}}},"404":{"description":"Socket not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["sockets","socket-access"],"summary":"Delete memory via socket","description":"Delete a memory using socket access token","operationId":"delete_memory_via_socket_api_v1_socket_access__binding_token__memories__memory_id__delete","parameters":[{"name":"binding_token","in":"path","required":true,"schema":{"type":"string","title":"Binding Token"}},{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}},{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"404":{"description":"Socket not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sockets/{socket_id}/test":{"post":{"tags":["sockets"],"summary":"Test socket configuration","description":"Test socket triggers and actions with sample data","operationId":"test_socket_api_v1_sockets__socket_id__test_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"socket_id","in":"path","required":true,"schema":{"type":"string","title":"Socket Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Test Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Test Socket Api V1 Sockets  Socket Id  Test Post"}}}},"404":{"description":"Socket not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sockets/{socket_id}/logs":{"get":{"tags":["sockets"],"summary":"Get socket execution logs","description":"Get execution logs for socket triggers and actions","operationId":"get_socket_logs_api_v1_sockets__socket_id__logs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"socket_id","in":"path","required":true,"schema":{"type":"string","title":"Socket Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Socket Logs Api V1 Sockets  Socket Id  Logs Get"}}}},"404":{"description":"Socket not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sockets/{socket_id}/analytics":{"get":{"tags":["sockets"],"summary":"Get socket analytics","description":"Get usage analytics and performance metrics for socket","operationId":"get_socket_analytics_api_v1_sockets__socket_id__analytics_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"socket_id","in":"path","required":true,"schema":{"type":"string","title":"Socket Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Socket Analytics Api V1 Sockets  Socket Id  Analytics Get"}}}},"404":{"description":"Socket not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sockets/{socket_id}/webhooks/generate-url":{"post":{"tags":["sockets"],"summary":"Generate webhook URL","description":"Generate webhook URL for external integrations","operationId":"generate_webhook_url_api_v1_sockets__socket_id__webhooks_generate_url_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"socket_id","in":"path","required":true,"schema":{"type":"string","title":"Socket Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Webhook Config"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Generate Webhook Url Api V1 Sockets  Socket Id  Webhooks Generate Url Post"}}}},"404":{"description":"Socket not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sockets/{socket_id}/webhooks":{"get":{"tags":["sockets"],"summary":"List webhook URLs","description":"List all webhook URLs for socket","operationId":"list_socket_webhooks_api_v1_sockets__socket_id__webhooks_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"socket_id","in":"path","required":true,"schema":{"type":"string","title":"Socket Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response List Socket Webhooks Api V1 Sockets  Socket Id  Webhooks Get"}}}},"404":{"description":"Socket not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/webhooks/{webhook_id}":{"post":{"tags":["sockets","webhooks"],"summary":"Process incoming webhook","description":"Process incoming webhook payload","operationId":"process_webhook_api_v1_webhooks__webhook_id__post","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Process Webhook Api V1 Webhooks  Webhook Id  Post"}}}},"404":{"description":"Socket not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sockets/{socket_id}/webhooks/{webhook_id}":{"delete":{"tags":["sockets"],"summary":"Delete webhook","description":"Delete webhook URL for socket","operationId":"delete_webhook_api_v1_sockets__socket_id__webhooks__webhook_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"socket_id","in":"path","required":true,"schema":{"type":"string","title":"Socket Id"}},{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}}],"responses":{"204":{"description":"Successful Response"},"404":{"description":"Socket not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations":{"get":{"tags":["integrations"],"summary":"List integrations for user","description":"Get integrations for the authenticated user with optional filters","operationId":"list_integrations_api_v1_integrations_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by integration type (e.g., 'claude_desktop', 'custom_gpt_action')","title":"Integration Type"},"description":"Filter by integration type (e.g., 'claude_desktop', 'custom_gpt_action')"},{"name":"space_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by space ID","title":"Space Id"},"description":"Filter by space ID"},{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by active status","title":"Is Active"},"description":"Filter by active status"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response List Integrations Api V1 Integrations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/{binding_id}/config":{"get":{"tags":["integrations"],"summary":"Get integration configuration","description":"Get detailed configuration for a specific integration binding","operationId":"get_integration_config_api_v1_integrations__binding_id__config_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"binding_id","in":"path","required":true,"schema":{"type":"string","title":"Binding Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Integration Config Api V1 Integrations  Binding Id  Config Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/recommended":{"get":{"tags":["integrations"],"summary":"Get recommended integrations","description":"Get integrations ordered by relevance based on user profile","operationId":"get_recommended_integrations_api_v1_integrations_recommended_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_size","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Company size (individual, 2-10, 11-50, 51-200, 201-1000, 1000+)","title":"Company Size"},"description":"Company size (individual, 2-10, 11-50, 51-200, 201-1000, 1000+)"},{"name":"primary_need","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Primary infrastructure need (claude, custom_gpt, multi_agent, etc.)","title":"Primary Need"},"description":"Primary infrastructure need (claude, custom_gpt, multi_agent, etc.)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Maximum number of integrations to return","default":20,"title":"Limit"},"description":"Maximum number of integrations to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Recommended Integrations Api V1 Integrations Recommended Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/extensions/generate":{"post":{"tags":["extensions"],"summary":"Generate Chrome extension","description":"Generate a custom Chrome extension with pre-configured API access","operationId":"generate_chrome_extension_api_v1_extensions_generate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtensionGenerateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtensionGenerateResponse"}}}},"404":{"description":"Socket not found"},"403":{"description":"Access denied"},"500":{"description":"Internal server error"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/extensions/download/{download_id}":{"get":{"tags":["extensions"],"summary":"Download generated extension","description":"Securely download a generated Chrome extension by ID","operationId":"download_extension_api_v1_extensions_download__download_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"download_id","in":"path","required":true,"schema":{"type":"string","title":"Download Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Socket not found"},"403":{"description":"Access denied"},"500":{"description":"Internal server error"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/extensions/info/{binding_id}":{"get":{"tags":["extensions"],"summary":"Get extension info for integration binding","description":"Retrieve extension metadata from integration binding and check file availability","operationId":"get_extension_info_api_v1_extensions_info__binding_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"binding_id","in":"path","required":true,"schema":{"type":"string","title":"Binding Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Socket not found"},"403":{"description":"Access denied"},"500":{"description":"Internal server error"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/extensions/health":{"get":{"tags":["extensions"],"summary":"Extension service health check","description":"Check if extension generation service is available","operationId":"extension_service_health_api_v1_extensions_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Socket not found"},"403":{"description":"Access denied"},"500":{"description":"Internal server error"}}}},"/mcp/integrations/{binding_id}/endpoint":{"get":{"tags":["mcp"],"summary":"Get MCP endpoint for integration binding","description":"Retrieve the secure MCP endpoint URL for a specific integration binding","operationId":"get_mcp_endpoint_mcp_integrations__binding_id__endpoint_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"binding_id","in":"path","required":true,"schema":{"type":"string","title":"Binding Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPEndpointInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mcp/endpoints":{"get":{"tags":["mcp"],"summary":"List all MCP endpoints for user","description":"Get all MCP endpoints for the authenticated user's integration bindings","operationId":"list_mcp_endpoints_mcp_endpoints_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPEndpointsList"}}}}},"security":[{"HTTPBearer":[]}]}},"/mcp/{binding_id}/config":{"get":{"tags":["mcp"],"summary":"Get MCP client configuration","description":"Get configuration information for setting up MCP clients (Claude Desktop, etc.)","operationId":"get_mcp_configuration_mcp__binding_id__config_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"binding_id","in":"path","required":true,"schema":{"type":"string","title":"Binding Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPConfigurationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mcp/integrations/{binding_id}/credentials":{"get":{"tags":["mcp"],"summary":"Get MCP binding credentials for OAuth","description":"Returns the integration API key and space ID for a binding owned by the caller. Used by the Memara MCP server during OAuth code exchange to cache credentials next to the Supabase access token.","operationId":"get_mcp_binding_credentials_mcp_integrations__binding_id__credentials_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"binding_id","in":"path","required":true,"schema":{"type":"string","title":"Binding Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPBindingCredentialsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mcp/integrations/{binding_id}/regenerate":{"post":{"tags":["mcp"],"summary":"Regenerate MCP endpoint","description":"Regenerate the secure endpoint for an integration binding (security rotation)","operationId":"regenerate_mcp_endpoint_mcp_integrations__binding_id__regenerate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"binding_id","in":"path","required":true,"schema":{"type":"string","title":"Binding Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPEndpointResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mcp/integrations/{binding_id}/token":{"get":{"tags":["mcp"],"summary":"Get access token for MCP integration","description":"Get the access token required for authenticating MCP client requests","operationId":"get_mcp_access_token_mcp_integrations__binding_id__token_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"binding_id","in":"path","required":true,"schema":{"type":"string","title":"Binding Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mcp/integrations/{binding_id}/oauth/register":{"post":{"tags":["mcp"],"summary":"Register OAuth client for integration binding","description":"Register OAuth 2.1 client for Claude Desktop MCP integration","operationId":"register_oauth_client_mcp_integrations__binding_id__oauth_register_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"binding_id","in":"path","required":true,"schema":{"type":"string","title":"Binding Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Redirect Uris"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mcp/integrations/{binding_id}/oauth/client":{"get":{"tags":["mcp"],"summary":"Get OAuth client information","description":"Get OAuth client configuration for integration binding","operationId":"get_oauth_client_mcp_integrations__binding_id__oauth_client_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"binding_id","in":"path","required":true,"schema":{"type":"string","title":"Binding Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mcp/integrations/{binding_id}/oauth/config":{"get":{"tags":["mcp"],"summary":"Get Claude Desktop OAuth configuration","description":"Get ready-to-use Claude Desktop configuration with OAuth 2.1","operationId":"get_claude_desktop_oauth_config_mcp_integrations__binding_id__oauth_config_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"binding_id","in":"path","required":true,"schema":{"type":"string","title":"Binding Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mcp/memories":{"post":{"tags":["mcp-integration"],"summary":"Create memory for MCP integration","description":"Create memory in the binding's canonical socket space.","operationId":"create_memory_mcp_api_v1_mcp_memories_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Memory"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["mcp-integration"],"summary":"List memories for MCP integration","description":"List memories in the binding's canonical socket space.","operationId":"list_memories_mcp_api_v1_mcp_memories_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":10,"title":"Size"}},{"name":"sort_by","in":"query","required":false,"schema":{"type":"string","default":"created_at","title":"Sort By"}},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","default":"desc","title":"Sort Order"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Tags"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},{"name":"min_importance","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":10,"minimum":1},{"type":"null"}],"title":"Min Importance"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mcp/memories/search":{"post":{"tags":["mcp-integration"],"summary":"Search memories for MCP integration","description":"Search memories in the binding's canonical socket space.","operationId":"search_memories_mcp_api_v1_mcp_memories_search_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchQuery"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Memory"},"title":"Response Search Memories Mcp Api V1 Mcp Memories Search Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mcp/memories/{memory_id}":{"get":{"tags":["mcp-integration"],"summary":"Get memory for MCP integration","description":"Get a specific memory in the binding's canonical socket space.","operationId":"get_memory_mcp_api_v1_mcp_memories__memory_id__get","parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","description":"The ID of the memory to retrieve","title":"Memory Id"},"description":"The ID of the memory to retrieve"},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Memory"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["mcp-integration"],"summary":"Update memory for MCP integration","description":"Update a memory in the binding's canonical socket space.","operationId":"update_memory_mcp_api_v1_mcp_memories__memory_id__patch","parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","description":"The ID of the memory to update","title":"Memory Id"},"description":"The ID of the memory to update"},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Memory"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["mcp-integration"],"summary":"Delete memory for MCP integration","description":"Delete a memory in the binding's canonical socket space.","operationId":"delete_memory_mcp_api_v1_mcp_memories__memory_id__delete","parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","description":"The ID of the memory to delete","title":"Memory Id"},"description":"The ID of the memory to delete"},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mcp/auth/resolve-key":{"get":{"tags":["mcp-integration"],"summary":"Resolve MCP integration API key","description":"Validates an integration API key and returns binding context for the hosted MCP server (bare /i/{binding_id}/mcp paths). Bearer token only.","operationId":"resolve_mcp_api_key_api_v1_mcp_auth_resolve_key_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPResolveKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/.well-known/oauth-authorization-server":{"get":{"tags":["oauth-discovery"],"summary":"Oauth Discovery","description":"Redirect to MCP host: OAuth AS metadata is served only on the MCP subdomain.","operationId":"oauth_discovery__well_known_oauth_authorization_server_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/oauth/authorize":{"get":{"tags":["oauth-discovery"],"summary":"OAuth 2.1 Authorization Endpoint","description":"RFC 6749 compliant authorization endpoint for OAuth 2.1 flow","operationId":"oauth_authorize_oauth_authorize_get","parameters":[{"name":"response_type","in":"query","required":true,"schema":{"type":"string","title":"Response Type"}},{"name":"client_id","in":"query","required":true,"schema":{"type":"string","title":"Client Id"}},{"name":"redirect_uri","in":"query","required":true,"schema":{"type":"string","title":"Redirect Uri"}},{"name":"scope","in":"query","required":false,"schema":{"type":"string","title":"Scope"}},{"name":"state","in":"query","required":false,"schema":{"type":"string","title":"State"}},{"name":"code_challenge","in":"query","required":false,"schema":{"type":"string","title":"Code Challenge"}},{"name":"code_challenge_method","in":"query","required":false,"schema":{"type":"string","title":"Code Challenge Method"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/authorize_submit":{"post":{"tags":["oauth-discovery"],"summary":"OAuth Authorization Submit","description":"Handle authorization form submission","operationId":"oauth_authorize_submit_oauth_authorize_submit_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_oauth_authorize_submit_oauth_authorize_submit_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/token":{"post":{"tags":["oauth-discovery"],"summary":"OAuth 2.1 Token Exchange Endpoint","description":"RFC 6749 compliant token endpoint for authorization code exchange","operationId":"oauth_token_oauth_token_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_oauth_token_oauth_token_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/introspect":{"post":{"tags":["oauth-discovery"],"summary":"OAuth Token Introspection","description":"RFC 7662 compliant token introspection endpoint","operationId":"oauth_introspect_oauth_introspect_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_oauth_introspect_oauth_introspect_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/revoke":{"post":{"tags":["oauth-discovery"],"summary":"OAuth Token Revocation","description":"RFC 7009 compliant token revocation endpoint","operationId":"oauth_revoke_oauth_revoke_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_oauth_revoke_oauth_revoke_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/authorize":{"get":{"tags":["oauth-discovery"],"summary":"Fastmcp Authorize Redirect","description":"Redirect FastMCP /authorize requests to /oauth/authorize","operationId":"fastmcp_authorize_redirect_authorize_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/token":{"post":{"tags":["oauth-discovery"],"summary":"Fastmcp Token Redirect","description":"Redirect FastMCP /token requests to /oauth/token","operationId":"fastmcp_token_redirect_token_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/register":{"post":{"tags":["oauth-discovery"],"summary":"Dynamic Client Registration","description":"OAuth 2.0 Dynamic Client Registration Protocol (RFC 7591)","operationId":"dynamic_client_registration_register_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/oauth/zapier/.well-known/oauth-authorization-server":{"get":{"tags":["zapier-oauth"],"summary":"Oauth Discovery","description":"OAuth 2.1 discovery endpoint for Zapier integration","operationId":"oauth_discovery_oauth_zapier__well_known_oauth_authorization_server_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/oauth/zapier/authorize":{"get":{"tags":["zapier-oauth"],"summary":"Oauth Authorize","description":"OAuth 2.1 Authorization Endpoint for Zapier","operationId":"oauth_authorize_oauth_zapier_authorize_get","parameters":[{"name":"response_type","in":"query","required":true,"schema":{"type":"string","description":"Must be 'code'","title":"Response Type"},"description":"Must be 'code'"},{"name":"client_id","in":"query","required":true,"schema":{"type":"string","description":"Zapier client ID","title":"Client Id"},"description":"Zapier client ID"},{"name":"redirect_uri","in":"query","required":true,"schema":{"type":"string","description":"Zapier callback URL","title":"Redirect Uri"},"description":"Zapier callback URL"},{"name":"scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Requested scopes","title":"Scope"},"description":"Requested scopes"},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"State parameter for CSRF protection","title":"State"},"description":"State parameter for CSRF protection"},{"name":"code_challenge","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"PKCE code challenge","title":"Code Challenge"},"description":"PKCE code challenge"},{"name":"code_challenge_method","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"PKCE challenge method","default":"S256","title":"Code Challenge Method"},"description":"PKCE challenge method"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["zapier-oauth"],"summary":"Oauth Authorize Submit","description":"Handle OAuth authorization form submission","operationId":"oauth_authorize_submit_oauth_zapier_authorize_post","requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_oauth_authorize_submit_oauth_zapier_authorize_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/zapier/token":{"post":{"tags":["zapier-oauth"],"summary":"Oauth Token","description":"OAuth 2.1 Token Exchange Endpoint","operationId":"oauth_token_oauth_zapier_token_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_oauth_token_oauth_zapier_token_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/zapier/revoke":{"post":{"tags":["zapier-oauth"],"summary":"Revoke Token","description":"Revoke an access or refresh token","operationId":"revoke_token_oauth_zapier_revoke_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_revoke_token_oauth_zapier_revoke_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/zapier/info":{"get":{"tags":["zapier-integration"],"summary":"Get Zapier integration info","description":"Get information about the Zapier integration and available operations","operationId":"get_integration_info_api_v1_zapier_info_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZapierIntegrationInfo"}}}},"401":{"description":"Invalid API key"},"403":{"description":"Insufficient permissions"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/zapier/memories":{"get":{"tags":["zapier-integration"],"summary":"List memories","description":"List memories for Zapier triggers and searches","operationId":"list_memories_zapier_api_v1_zapier_memories_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"sort_by","in":"query","required":false,"schema":{"type":"string","description":"Sort field","default":"created_at","title":"Sort By"},"description":"Sort field"},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","description":"Sort order","default":"desc","title":"Sort Order"},"description":"Sort order"},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Filter by tags","title":"Tags"},"description":"Filter by tags"},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by source","title":"Source"},"description":"Filter by source"},{"name":"min_importance","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":10,"minimum":1},{"type":"null"}],"description":"Minimum importance","title":"Min Importance"},"description":"Minimum importance"},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ZapierMemoryResponse"},"title":"Response List Memories Zapier Api V1 Zapier Memories Get"}}}},"401":{"description":"Invalid API key"},"403":{"description":"Insufficient permissions"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["zapier-integration"],"summary":"Create memory","description":"Create a new memory via Zapier action","operationId":"create_memory_zapier_api_v1_zapier_memories_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZapierMemoryCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZapierMemoryResponse"}}}},"401":{"description":"Invalid API key"},"403":{"description":"Insufficient permissions"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/zapier/memories/{memory_id}":{"get":{"tags":["zapier-integration"],"summary":"Get memory","description":"Get a specific memory by ID","operationId":"get_memory_zapier_api_v1_zapier_memories__memory_id__get","parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZapierMemoryResponse"}}}},"401":{"description":"Invalid API key"},"403":{"description":"Insufficient permissions"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["zapier-integration"],"summary":"Update memory","description":"Update an existing memory","operationId":"update_memory_zapier_api_v1_zapier_memories__memory_id__patch","parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZapierMemoryUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZapierMemoryResponse"}}}},"401":{"description":"Invalid API key"},"403":{"description":"Insufficient permissions"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["zapier-integration"],"summary":"Delete memory","description":"Delete a memory","operationId":"delete_memory_zapier_api_v1_zapier_memories__memory_id__delete","parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Invalid API key"},"403":{"description":"Insufficient permissions"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/zapier/memories/search":{"post":{"tags":["zapier-integration"],"summary":"Search memories","description":"Search memories using semantic similarity","operationId":"search_memories_zapier_api_v1_zapier_memories_search_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZapierSearchQuery"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ZapierMemoryResponse"},"title":"Response Search Memories Zapier Api V1 Zapier Memories Search Post"}}}},"401":{"description":"Invalid API key"},"403":{"description":"Insufficient permissions"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/zapier/health":{"get":{"tags":["zapier-integration"],"summary":"Zapier Health Check","description":"Health check for Zapier integration.","operationId":"zapier_health_check_api_v1_zapier_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Invalid API key"},"403":{"description":"Insufficient permissions"}}}},"/billing/subscription":{"get":{"tags":["billing"],"summary":"Get current subscription","description":"Get the current subscription status and tier (Supabase + Stripe when configured).","operationId":"get_subscription_billing_subscription_get","responses":{"200":{"description":"Current subscription status and details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionResponse"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["billing"],"summary":"Create subscription","description":"Create a new subscription for the user.","operationId":"create_subscription_billing_subscription_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionCreate"}}},"required":true},"responses":{"201":{"description":"Created subscription details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/billing/confirm-checkout-session":{"post":{"tags":["billing"],"summary":"Confirm Stripe Checkout and sync tier to Supabase","description":"Client-side recovery for tier upgrades: Stripe redirects with session_id\nbefore webhooks may have updated Supabase.","operationId":"confirm_checkout_session_billing_confirm_checkout_session_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmCheckoutSessionRequest"}}},"required":true},"responses":{"200":{"description":"Verifies a completed Checkout Session with Stripe and updates the current user's tier in Supabase. Use when webhooks are delayed or misconfigured (e.g. staging).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmCheckoutSessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/billing/sync-subscription-from-stripe":{"post":{"tags":["billing"],"summary":"Sync tier from Stripe customer subscriptions into Supabase","operationId":"sync_subscription_from_stripe_billing_sync_subscription_from_stripe_post","responses":{"200":{"description":"Uses stripe_customer_id on the current user to list active Stripe subscriptions, infers Memara tier from subscription prices (including lookup_key / product name), then updates Supabase. Use when webhooks never wrote tier/subscription_id (e.g. customer paid but raw_user_meta_data has only stripe_customer_id).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmCheckoutSessionResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/billing/webhook":{"post":{"tags":["billing"],"summary":"Handle billing webhook","description":"Handle incoming webhooks from the payment provider.","operationId":"handle_webhook_billing_webhook_post","responses":{"200":{"description":"Webhook processed successfully","content":{"application/json":{"schema":{}}}}}}},"/billing/subscription/cancel":{"post":{"tags":["billing"],"summary":"Cancel subscription","description":"Cancel the user's current subscription.","operationId":"cancel_subscription_billing_subscription_cancel_post","responses":{"200":{"description":"Cancelled subscription details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/billing/customer-portal":{"post":{"tags":["billing"],"summary":"Create Stripe Customer Portal session","description":"Create a Stripe Customer Portal session for subscription self-service.\n\nCustomers can:\n- Cancel subscription\n- Update payment methods\n- View invoices & billing history\n- Update billing information","operationId":"create_customer_portal_session_billing_customer_portal_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerPortalSessionRequest"}}}},"responses":{"200":{"description":"Customer Portal session URL","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/billing/upgrade":{"post":{"tags":["billing"],"summary":"Create checkout session for tier upgrade","description":"Create a checkout session for upgrading to a paid tier.","operationId":"upgrade_tier_billing_upgrade_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpgradeRequest"}}},"required":true},"responses":{"200":{"description":"Checkout session URL for Stripe","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/billing/stripe/webhook":{"post":{"tags":["billing"],"summary":"Stripe Webhook","description":"Handle Stripe webhook events (billing; not recorded in tenant integration monitoring).","operationId":"stripe_webhook_billing_stripe_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/billing/validate-coupon":{"post":{"tags":["billing"],"summary":"Validate coupon code","description":"Validate a coupon code and return discount information","operationId":"validate_coupon_billing_validate_coupon_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateCouponRequest"}}},"required":true},"responses":{"200":{"description":"Coupon validation result with discount information","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/billing/debug/coupon/{coupon_code}":{"get":{"tags":["billing"],"summary":"Debug coupon code (admin only)","description":"Debug endpoint to validate coupon codes and promotion codes (admin only)","operationId":"debug_coupon_billing_debug_coupon__coupon_code__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"coupon_code","in":"path","required":true,"schema":{"type":"string","title":"Coupon Code"}}],"responses":{"200":{"description":"Coupon validation details","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/tiers":{"get":{"tags":["billing"],"summary":"Get Tiers","operationId":"get_tiers_billing_tiers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/billing/pricing/debug":{"get":{"tags":["billing"],"summary":"Get Pricing Debug Info","description":"Get debug information about pricing configuration","operationId":"get_pricing_debug_info_billing_pricing_debug_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Pricing Debug Info Billing Pricing Debug Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/billing/usage":{"get":{"tags":["billing"],"summary":"Get Usage","operationId":"get_usage_billing_usage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/billing/usage/posthog":{"get":{"tags":["billing"],"summary":"Get Posthog Usage Data","description":"Get comprehensive usage data formatted for PostHog user properties.\nThis endpoint provides detailed usage analytics including tier limits,\nusage percentages, and business intelligence data.","operationId":"get_posthog_usage_data_billing_usage_posthog_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/email-test/send-test":{"post":{"tags":["email-test"],"summary":"Send test email","description":"Send a test email to verify SendGrid integration.\n\nThis endpoint is for development and testing purposes.\nRequires authentication to prevent abuse.","operationId":"send_test_email_email_test_send_test_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestEmailRequest"}}},"required":true},"responses":{"200":{"description":"Test email sending result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/email-test/status":{"get":{"tags":["email-test"],"summary":"Check email service status","description":"Check the status of the email service.\n\nReturns configuration status and availability.\nNote: This endpoint does not require authentication for testing purposes.","operationId":"email_service_status_email_test_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Email Service Status Email Test Status Get"}}}}}}},"/health":{"get":{"tags":["health"],"summary":"Check API health","description":"Check the health of the API and its dependencies.","operationId":"health_check_health_get","responses":{"200":{"description":"Health status information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/debug/whoami":{"get":{"tags":["debug"],"summary":"Whoami","description":"Debug endpoint to show resolved user information from JWT token.\nHelps troubleshoot user ID mismatches between authentication and database.\n\n⚠️  DEVELOPMENT ONLY - Contains sensitive user information","operationId":"whoami_debug_whoami_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/gpt-actions/memories":{"post":{"tags":["gpt-actions"],"summary":"Store memory via GPT","description":"Create a new memory in the space bound to this GPT integration","operationId":"store_memory_api_v1_gpt_actions_memories_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GPTMemoryCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GPTMemoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["gpt-actions"],"summary":"List recent memories via GPT","description":"Get recent memories from the space bound to this GPT integration","operationId":"list_memories_api_v1_gpt_actions_memories_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GPTMemoryResponse"},"title":"Response List Memories Api V1 Gpt Actions Memories Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/gpt-actions/search":{"post":{"tags":["gpt-actions"],"summary":"Search memories via GPT","description":"Search memories in the space bound to this GPT integration","operationId":"search_memories_api_v1_gpt_actions_search_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GPTSearchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GPTSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/gpt-actions/memories/{memory_id}":{"get":{"tags":["gpt-actions"],"summary":"Get specific memory via GPT","description":"Get a specific memory by ID via GPT integration","operationId":"get_memory_api_v1_gpt_actions_memories__memory_id__get","parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GPTMemoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["gpt-actions"],"summary":"Delete memory via GPT","description":"Delete a specific memory via GPT integration","operationId":"delete_memory_api_v1_gpt_actions_memories__memory_id__delete","parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/gpt-actions/integration/info":{"get":{"tags":["gpt-actions"],"summary":"Get integration info","description":"Get information about the current GPT integration including available operations","operationId":"get_integration_info_api_v1_gpt_actions_integration_info_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/gpt-actions/integration/{binding_id}/openapi.json":{"get":{"tags":["gpt-actions"],"summary":"Get Integration Openapi Json","description":"Get OpenAPI specification for a specific integration binding.","operationId":"get_integration_openapi_json_api_v1_gpt_actions_integration__binding_id__openapi_json_get","parameters":[{"name":"binding_id","in":"path","required":true,"schema":{"type":"string","title":"Binding Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Integration Openapi Json Api V1 Gpt Actions Integration  Binding Id  Openapi Json Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/gpt-actions/integration/{binding_id}/openapi.yaml":{"get":{"tags":["gpt-actions"],"summary":"Get Integration Openapi Yaml","description":"Get OpenAPI specification in YAML format.","operationId":"get_integration_openapi_yaml_api_v1_gpt_actions_integration__binding_id__openapi_yaml_get","parameters":[{"name":"binding_id","in":"path","required":true,"schema":{"type":"string","title":"Binding Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/gpt-actions/integration/{binding_id}/claude-mcp-config.json":{"get":{"tags":["gpt-actions"],"summary":"Get Claude Desktop Mcp Config","description":"Get Claude Desktop MCP configuration for a specific integration binding.","operationId":"get_claude_desktop_mcp_config_api_v1_gpt_actions_integration__binding_id__claude_mcp_config_json_get","parameters":[{"name":"binding_id","in":"path","required":true,"schema":{"type":"string","title":"Binding Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Claude Desktop Mcp Config Api V1 Gpt Actions Integration  Binding Id  Claude Mcp Config Json Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/n8n/memories":{"post":{"tags":["n8n"],"summary":"Store memory via n8n","description":"Create a new memory in the space bound to this n8n integration","operationId":"store_memory_api_v1_n8n_memories_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/N8NMemoryCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/N8NMemoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["n8n"],"summary":"List memories via n8n","description":"List memories in the space bound to this n8n integration","operationId":"list_memories_api_v1_n8n_memories_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of results","default":10,"title":"Limit"},"description":"Maximum number of results"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of results to skip","default":0,"title":"Offset"},"description":"Number of results to skip"},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Filter by tags","title":"Tags"},"description":"Filter by tags"},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by source","title":"Source"},"description":"Filter by source"},{"name":"min_importance","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":10,"minimum":1},{"type":"null"}],"description":"Minimum importance","title":"Min Importance"},"description":"Minimum importance"},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/N8NListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/n8n/search":{"post":{"tags":["n8n"],"summary":"Search memories via n8n","description":"Search memories in the space bound to this n8n integration","operationId":"search_memories_api_v1_n8n_search_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/N8NSearchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/N8NSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/n8n/memories/{memory_id}":{"get":{"tags":["n8n"],"summary":"Get specific memory via n8n","description":"Get a specific memory by ID via n8n integration","operationId":"get_memory_api_v1_n8n_memories__memory_id__get","parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/N8NMemoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["n8n"],"summary":"Delete memory via n8n","description":"Delete a specific memory via n8n integration","operationId":"delete_memory_api_v1_n8n_memories__memory_id__delete","parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["n8n"],"summary":"Update memory via n8n","description":"Update an existing memory via n8n integration","operationId":"update_memory_api_v1_n8n_memories__memory_id__put","parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/N8NMemoryUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/N8NMemoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/n8n/integration/info":{"get":{"tags":["n8n"],"summary":"Get integration info","description":"Get information about the current n8n integration including available operations","operationId":"get_integration_info_api_v1_n8n_integration_info_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/N8NIntegrationInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dify/memories":{"post":{"tags":["dify"],"summary":"Store memory via Dify","description":"Create a new memory in the space bound to this Dify integration","operationId":"store_memory_api_v1_dify_memories_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DifyMemoryCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DifyMemoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["dify"],"summary":"List memories via Dify","description":"List memories in the space bound to this Dify integration","operationId":"list_memories_api_v1_dify_memories_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of results","default":10,"title":"Limit"},"description":"Maximum number of results"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of results to skip","default":0,"title":"Offset"},"description":"Number of results to skip"},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Filter by tags","title":"Tags"},"description":"Filter by tags"},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by source","title":"Source"},"description":"Filter by source"},{"name":"min_importance","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":10,"minimum":1},{"type":"null"}],"description":"Minimum importance","title":"Min Importance"},"description":"Minimum importance"},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DifyListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dify/search":{"post":{"tags":["dify"],"summary":"Search memories via Dify","description":"Search memories in the space bound to this Dify integration","operationId":"search_memories_api_v1_dify_search_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DifySearchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DifySearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dify/memories/{memory_id}":{"get":{"tags":["dify"],"summary":"Get specific memory via Dify","description":"Get a specific memory by ID via Dify integration","operationId":"get_memory_api_v1_dify_memories__memory_id__get","parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DifyMemoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["dify"],"summary":"Delete memory via Dify","description":"Delete a specific memory via Dify integration","operationId":"delete_memory_api_v1_dify_memories__memory_id__delete","parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["dify"],"summary":"Update memory via Dify","description":"Update an existing memory via Dify integration","operationId":"update_memory_api_v1_dify_memories__memory_id__put","parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DifyMemoryUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DifyMemoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dify/integration/info":{"get":{"tags":["dify"],"summary":"Get integration info","description":"Get information about the current Dify integration including available operations","operationId":"get_integration_info_api_v1_dify_integration_info_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DifyIntegrationInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/supabase/user-created":{"post":{"tags":["webhooks"],"summary":"Handle Supabase user creation","description":"Process new user creation events from Supabase and initialize accounts","operationId":"handle_supabase_user_created_webhooks_supabase_user_created_post","parameters":[{"name":"x-supabase-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Supabase-Signature"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/stripe/events":{"post":{"tags":["webhooks"],"summary":"Handle Stripe events","description":"Process Stripe webhook events for subscription and payment updates","operationId":"handle_stripe_events_webhooks_stripe_events_post","parameters":[{"name":"stripe-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe-Signature"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/stripe/webhook":{"post":{"tags":["webhooks"],"summary":"Stripe Webhook","operationId":"stripe_webhook_webhooks_stripe_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/webhooks/customer-io/reporting":{"post":{"tags":["webhooks"],"summary":"Customer.io reporting webhooks","description":"Receives subscription preference and customer metrics from Customer.io (configure in Data & integrations → Reporting webhooks). Verifies X-CIO-Signature using CUSTOMERIO_REPORTING_WEBHOOK_SIGNING_SECRET.","operationId":"customer_io_reporting_webhook_webhooks_customer_io_reporting_post","parameters":[{"name":"X-CIO-Signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Cio-Signature"}},{"name":"X-CIO-Timestamp","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Cio-Timestamp"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/health":{"get":{"tags":["webhooks"],"summary":"Webhook endpoint health check","description":"Simple health check for webhook processing","operationId":"webhook_health_check_webhooks_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/whatsapp/integrations/{binding_id}/generate-code":{"post":{"tags":["WhatsApp Integration"],"summary":"Generate Connection Code","description":"Generate a secure connection code for WhatsApp integration.\nUsers send this code to the WhatsApp number to establish connection.","operationId":"generate_connection_code_whatsapp_integrations__binding_id__generate_code_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"binding_id","in":"path","required":true,"schema":{"type":"string","title":"Binding Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/whatsapp/integrations/{binding_id}/status":{"get":{"tags":["WhatsApp Integration"],"summary":"Get Connection Status","description":"Get the current status of WhatsApp integration for this binding.\nReturns connected phone numbers and recent activity.","operationId":"get_connection_status_whatsapp_integrations__binding_id__status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"binding_id","in":"path","required":true,"schema":{"type":"string","title":"Binding Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/whatsapp/webhook":{"post":{"tags":["WhatsApp Integration"],"summary":"Twilio Webhook Handler","description":"Handle incoming WhatsApp messages from Twilio webhook.\nThis endpoint processes connection requests and regular messages.\nEnhanced with comprehensive monitoring and observability.","operationId":"twilio_webhook_handler_whatsapp_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/whatsapp/integrations/{binding_id}/messages":{"get":{"tags":["WhatsApp Integration"],"summary":"Get Messages","description":"Get recent WhatsApp messages for this integration binding.","operationId":"get_messages_whatsapp_integrations__binding_id__messages_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"binding_id","in":"path","required":true,"schema":{"type":"string","title":"Binding Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/whatsapp/integrations/{binding_id}/phone/{phone_number}":{"delete":{"tags":["WhatsApp Integration"],"summary":"Disconnect Phone Number","description":"Disconnect a specific phone number from this WhatsApp integration.","operationId":"disconnect_phone_number_whatsapp_integrations__binding_id__phone__phone_number__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"binding_id","in":"path","required":true,"schema":{"type":"string","title":"Binding Id"}},{"name":"phone_number","in":"path","required":true,"schema":{"type":"string","title":"Phone Number"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/whatsapp/health":{"get":{"tags":["WhatsApp Integration"],"summary":"Whatsapp Health Check","description":"Health check endpoint for WhatsApp integration.","operationId":"whatsapp_health_check_whatsapp_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/oauth/x/authorize":{"get":{"tags":["X OAuth"],"summary":"X Oauth Authorize","operationId":"x_oauth_authorize_oauth_x_authorize_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"binding_id","in":"query","required":true,"schema":{"type":"string","title":"Binding Id"}},{"name":"redirect_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect After"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/x/callback":{"get":{"tags":["X OAuth"],"summary":"X Oauth Callback","operationId":"x_oauth_callback_oauth_x_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"error_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Description"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/x-bookmarks/{binding_id}/connect-url":{"get":{"tags":["X Bookmarks Integration"],"summary":"Get X Connect Url","description":"Return X OAuth authorize URL for browser redirect (authenticated).","operationId":"get_x_connect_url_api_v1_integrations_x_bookmarks__binding_id__connect_url_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"binding_id","in":"path","required":true,"schema":{"type":"string","title":"Binding Id"}},{"name":"redirect_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect After"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/x-bookmarks/{binding_id}/status":{"get":{"tags":["X Bookmarks Integration"],"summary":"Get X Bookmarks Status","operationId":"get_x_bookmarks_status_api_v1_integrations_x_bookmarks__binding_id__status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"binding_id","in":"path","required":true,"schema":{"type":"string","title":"Binding Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/x-bookmarks/{binding_id}/settings":{"patch":{"tags":["X Bookmarks Integration"],"summary":"Update X Bookmarks Settings","operationId":"update_x_bookmarks_settings_api_v1_integrations_x_bookmarks__binding_id__settings_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"binding_id","in":"path","required":true,"schema":{"type":"string","title":"Binding Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/XBookmarkSettingsUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/x-bookmarks/{binding_id}/sync":{"post":{"tags":["X Bookmarks Integration"],"summary":"Trigger X Bookmarks Sync","operationId":"trigger_x_bookmarks_sync_api_v1_integrations_x_bookmarks__binding_id__sync_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"binding_id","in":"path","required":true,"schema":{"type":"string","title":"Binding Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/x-bookmarks/{binding_id}/disconnect":{"delete":{"tags":["X Bookmarks Integration"],"summary":"Disconnect X Bookmarks","operationId":"disconnect_x_bookmarks_api_v1_integrations_x_bookmarks__binding_id__disconnect_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"binding_id","in":"path","required":true,"schema":{"type":"string","title":"Binding Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/x-bookmarks/{binding_id}/prepare":{"post":{"tags":["X Bookmarks Integration"],"summary":"Prepare X Bookmarks Binding","description":"Initialize sync state after binding creation.","operationId":"prepare_x_bookmarks_binding_api_v1_integrations_x_bookmarks__binding_id__prepare_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"binding_id","in":"path","required":true,"schema":{"type":"string","title":"Binding Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/XBookmarkSettingsUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/monitoring/webhooks/metrics":{"get":{"tags":["Production Monitoring"],"summary":"Get integration request metrics","description":"Retrieve integration request metrics for a space (space_id required)","operationId":"get_integration_metrics_endpoint_monitoring_webhooks_metrics_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"space_id","in":"query","required":true,"schema":{"type":"string","description":"Space to scope metrics","title":"Space Id"},"description":"Space to scope metrics"},{"name":"integration_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by integration type (e.g. bare_api, n8n, whatsapp_basic)","title":"Integration Type"},"description":"Filter by integration type (e.g. bare_api, n8n, whatsapp_basic)"},{"name":"hours","in":"query","required":false,"schema":{"type":"integer","maximum":168,"minimum":1,"description":"Time window in hours (1-168)","default":24,"title":"Hours"},"description":"Time window in hours (1-168)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationMetricsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/monitoring/webhooks/health":{"get":{"tags":["Production Monitoring"],"summary":"Get integration health status","description":"Integration health by integration type for a space","operationId":"get_integration_health_monitoring_webhooks_health_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"space_id","in":"query","required":true,"schema":{"type":"string","description":"Space to scope health metrics","title":"Space Id"},"description":"Space to scope health metrics"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationHealthResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/monitoring/webhooks/binding-health":{"post":{"tags":["Production Monitoring"],"summary":"Get per-binding integration health","description":"Health metrics from integration_requests for specific bindings in a space (max 100 bindings per request).","operationId":"post_binding_health_monitoring_webhooks_binding_health_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BindingHealthRequestBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BindingHealthResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/monitoring/webhooks/alerts":{"get":{"tags":["Production Monitoring"],"summary":"Get monitoring alerts","description":"Heuristic alerts for integration types in a space","operationId":"get_monitoring_alerts_monitoring_webhooks_alerts_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"space_id","in":"query","required":true,"schema":{"type":"string","description":"Space to scope alerts","title":"Space Id"},"description":"Space to scope alerts"},{"name":"severity","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by alert severity","title":"Severity"},"description":"Filter by alert severity"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Maximum number of alerts to return","default":50,"title":"Limit"},"description":"Maximum number of alerts to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/monitoring/dashboard":{"get":{"tags":["Production Monitoring"],"summary":"Get comprehensive monitoring dashboard","description":"All monitoring data for a space (space_id required)","operationId":"get_monitoring_dashboard_monitoring_dashboard_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"space_id","in":"query","required":true,"schema":{"type":"string","description":"Space to scope dashboard data","title":"Space Id"},"description":"Space to scope dashboard data"},{"name":"hours","in":"query","required":false,"schema":{"type":"integer","maximum":168,"minimum":1,"description":"Time window for metrics","default":24,"title":"Hours"},"description":"Time window for metrics"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitoringDashboardResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/monitoring/webhooks/test-alert":{"post":{"tags":["Production Monitoring"],"summary":"Test alert system","description":"Trigger a test alert for monitoring system validation (Admin only)","operationId":"test_monitoring_alert_monitoring_webhooks_test_alert_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"alert_type","in":"query","required":true,"schema":{"type":"string","description":"Type of test alert to trigger","title":"Alert Type"},"description":"Type of test alert to trigger"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/monitoring/system/status":{"get":{"tags":["Production Monitoring"],"summary":"Get monitoring system status","description":"Get status of the monitoring system infrastructure","operationId":"get_monitoring_system_status_monitoring_system_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/monitoring/health":{"get":{"tags":["Production Monitoring"],"summary":"Monitoring service health check","description":"Simple health check for monitoring service","operationId":"monitoring_health_check_monitoring_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/openapi.yaml":{"get":{"tags":["openapi"],"summary":"Get OpenAPI specification","description":"Dynamic OpenAPI spec with current server URL","operationId":"get_openapi_spec_openapi_yaml_get","responses":{"200":{"description":"Successful Response"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/.well-known/ai-plugin.json":{"get":{"tags":["openapi"],"summary":"Get AI plugin manifest","description":"Dynamic plugin manifest for CustomGPT integration","operationId":"get_plugin_manifest__well_known_ai_plugin_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/openapi/info":{"get":{"tags":["openapi"],"summary":"OpenAPI generation info","description":"Information about dynamic OpenAPI generation","operationId":"get_openapi_info_openapi_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/legal/":{"get":{"tags":["Legal"],"summary":"Legal information index","description":"Main legal information page with links to all legal documents","operationId":"get_legal_index_legal__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Legal Index Legal  Get"}}}}}}},"/legal/terms":{"get":{"tags":["Legal"],"summary":"Terms and Conditions","description":"Memara Terms and Conditions of Service","operationId":"get_terms_and_conditions_legal_terms_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/legal/privacy":{"get":{"tags":["Legal"],"summary":"Privacy Policy","description":"Memara Privacy Policy","operationId":"get_privacy_policy_legal_privacy_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/legal/api-terms":{"get":{"tags":["Legal"],"summary":"API Terms of Service","description":"Terms specific to API usage and integrations","operationId":"get_api_terms_legal_api_terms_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/legal/data-processing":{"get":{"tags":["Legal"],"summary":"Data Processing Information","description":"Information about how we process your data","operationId":"get_data_processing_info_legal_data_processing_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/legal/json":{"get":{"tags":["Legal"],"summary":"Legal information in JSON format","description":"Get all legal information in structured JSON format for API integrations","operationId":"get_legal_json_legal_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Legal Json Legal Json Get"}}}}}}},"/onboarding/memory-prefill":{"post":{"tags":["onboarding"],"summary":"Generate Memory Prefill","description":"Generate AI-powered memory pre-fill content based on user onboarding choices\n\nThis endpoint uses OpenAI's GPT-3.5-turbo to generate contextual, personalized\nmemory content based on the user's preferences and profile data from onboarding.","operationId":"generate_memory_prefill_onboarding_memory_prefill_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrefillRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrefillResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/onboarding/health":{"get":{"tags":["onboarding"],"summary":"Onboarding Health","description":"Health check for onboarding services","operationId":"onboarding_health_onboarding_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/email-collection/submit":{"post":{"tags":["Email Collection"],"summary":"Submit Email Collection","description":"Submit email collection form and integrate with Customer.io\n\nThis endpoint handles email submissions from frontend forms and\nsecurely integrates with Customer.io server-side to avoid CORS issues.","operationId":"submit_email_collection_email_collection_submit_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailCollectionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailCollectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/email-collection/health":{"get":{"tags":["Email Collection"],"summary":"Health Check","description":"Health check endpoint for email collection service","operationId":"health_check_email_collection_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/tracking/event":{"post":{"tags":["tracking"],"summary":"Track an event","description":"Track an event in all configured tracking providers (Customer.io, PostHog, etc.)","operationId":"track_event_tracking_event_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackEventRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackEventResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/tracking/identify":{"post":{"tags":["tracking"],"summary":"Identify a user","description":"Identify a user in all configured tracking providers","operationId":"identify_user_tracking_identify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentifyUserRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentifyUserResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/tracking/health":{"get":{"tags":["tracking"],"summary":"Tracking service health check","description":"Check status of tracking service and all providers","operationId":"tracking_health_tracking_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"AlertResponse":{"properties":{"alerts":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Alerts"},"total_count":{"type":"integer","title":"Total Count"},"severity_breakdown":{"additionalProperties":{"type":"integer"},"type":"object","title":"Severity Breakdown"}},"type":"object","required":["alerts","total_count","severity_breakdown"],"title":"AlertResponse"},"BindingHealthItem":{"properties":{"binding_id":{"type":"string","maxLength":256,"minLength":1,"title":"Binding Id"},"integration_type":{"type":"string","maxLength":128,"title":"Integration Type","default":""}},"type":"object","required":["binding_id"],"title":"BindingHealthItem"},"BindingHealthRequestBody":{"properties":{"space_id":{"type":"string","maxLength":128,"minLength":1,"title":"Space Id"},"bindings":{"items":{"$ref":"#/components/schemas/BindingHealthItem"},"type":"array","maxItems":100,"title":"Bindings"}},"type":"object","required":["space_id"],"title":"BindingHealthRequestBody"},"BindingHealthResponse":{"properties":{"bindings":{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object","title":"Bindings"},"window_hours":{"type":"integer","title":"Window Hours"},"window_label":{"type":"string","title":"Window Label"},"last_updated":{"type":"string","title":"Last Updated"}},"type":"object","required":["bindings","window_hours","window_label","last_updated"],"title":"BindingHealthResponse","description":"Per-integration-binding health within a space (Integrations UI)."},"Body_create_audio_memory_endpoint_memories_audio_post":{"properties":{"audio_file":{"type":"string","format":"binary","title":"Audio File","description":"Audio file (MP3, M4A, WAV, FLAC, OGG, AAC, WebM)"},"content":{"type":"string","title":"Content","description":"Memory content/title"},"tags":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags","description":"Comma-separated tags"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"Source of the memory","default":"audio_upload"},"importance":{"anyOf":[{"type":"integer","maximum":10.0,"minimum":1.0},{"type":"null"}],"title":"Importance","description":"Importance score (1-10)","default":5},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category","description":"Memory category","default":"audio"},"space_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Space Id","description":"Space ID to create memory in"}},"type":"object","required":["audio_file","content"],"title":"Body_create_audio_memory_endpoint_memories_audio_post"},"Body_create_audio_memory_via_socket_api_v1_socket_access__binding_token__memories_audio_post":{"properties":{"audio_file":{"type":"string","format":"binary","title":"Audio File","description":"Audio file (MP3, M4A, WAV, FLAC, OGG, AAC, WebM)"},"content":{"type":"string","title":"Content","description":"Memory content/title"},"tags":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags","description":"Comma-separated tags"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"Source of the memory","default":"audio_upload"},"importance":{"anyOf":[{"type":"integer","maximum":10.0,"minimum":1.0},{"type":"null"}],"title":"Importance","description":"Importance score (1-10)","default":5},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category","description":"Memory category","default":"audio"}},"type":"object","required":["audio_file","content"],"title":"Body_create_audio_memory_via_socket_api_v1_socket_access__binding_token__memories_audio_post"},"Body_oauth_authorize_submit_oauth_authorize_submit_post":{"properties":{"client_id":{"type":"string","title":"Client Id"},"redirect_uri":{"type":"string","title":"Redirect Uri"},"action":{"type":"string","title":"Action"},"scope":{"type":"string","title":"Scope"},"state":{"type":"string","title":"State"},"code_challenge":{"type":"string","title":"Code Challenge"},"code_challenge_method":{"type":"string","title":"Code Challenge Method"}},"type":"object","required":["client_id","redirect_uri","action"],"title":"Body_oauth_authorize_submit_oauth_authorize_submit_post"},"Body_oauth_authorize_submit_oauth_zapier_authorize_post":{"properties":{"client_id":{"type":"string","title":"Client Id"},"redirect_uri":{"type":"string","title":"Redirect Uri"},"action":{"type":"string","title":"Action"},"scope":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"code_challenge":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Challenge"},"code_challenge_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Challenge Method"}},"type":"object","required":["client_id","redirect_uri","action"],"title":"Body_oauth_authorize_submit_oauth_zapier_authorize_post"},"Body_oauth_introspect_oauth_introspect_post":{"properties":{"token":{"type":"string","title":"Token"}},"type":"object","required":["token"],"title":"Body_oauth_introspect_oauth_introspect_post"},"Body_oauth_revoke_oauth_revoke_post":{"properties":{"token":{"type":"string","title":"Token"},"token_type_hint":{"type":"string","title":"Token Type Hint"}},"type":"object","required":["token"],"title":"Body_oauth_revoke_oauth_revoke_post"},"Body_oauth_token_oauth_token_post":{"properties":{"grant_type":{"type":"string","title":"Grant Type"},"code":{"type":"string","title":"Code"},"redirect_uri":{"type":"string","title":"Redirect Uri"},"client_id":{"type":"string","title":"Client Id"},"client_secret":{"type":"string","title":"Client Secret"},"code_verifier":{"type":"string","title":"Code Verifier"},"refresh_token":{"type":"string","title":"Refresh Token"}},"type":"object","required":["grant_type"],"title":"Body_oauth_token_oauth_token_post"},"Body_oauth_token_oauth_zapier_token_post":{"properties":{"grant_type":{"type":"string","title":"Grant Type"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"redirect_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect Uri"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret"},"code_verifier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Verifier"},"refresh_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Token"},"scope":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope"}},"type":"object","required":["grant_type"],"title":"Body_oauth_token_oauth_zapier_token_post"},"Body_revoke_token_oauth_zapier_revoke_post":{"properties":{"token":{"type":"string","title":"Token"},"token_type_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Type Hint"}},"type":"object","required":["token"],"title":"Body_revoke_token_oauth_zapier_revoke_post"},"ConfirmCheckoutSessionRequest":{"properties":{"session_id":{"type":"string","minLength":1,"title":"Session Id","description":"Stripe Checkout Session id (cs_...)"}},"type":"object","required":["session_id"],"title":"ConfirmCheckoutSessionRequest"},"ConfirmCheckoutSessionResponse":{"properties":{"tier":{"type":"string","title":"Tier"},"synced":{"type":"boolean","title":"Synced","default":true},"subscription_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription Id"}},"type":"object","required":["tier"],"title":"ConfirmCheckoutSessionResponse"},"CustomerPortalSessionRequest":{"properties":{"return_origin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Return Origin","description":"Browser origin for return_url after Stripe Customer Portal"}},"type":"object","title":"CustomerPortalSessionRequest"},"DifyIntegrationInfo":{"properties":{"integration_name":{"type":"string","title":"Integration Name"},"space_id":{"type":"string","title":"Space Id"},"permissions":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Permissions"},"response_format":{"type":"string","title":"Response Format"},"binding_id":{"type":"string","title":"Binding Id"},"workflow_support":{"type":"boolean","title":"Workflow Support","default":true},"automation_capabilities":{"items":{"type":"string"},"type":"array","title":"Automation Capabilities","default":["memory_capture","context_retrieval","workflow_history"]}},"type":"object","required":["integration_name","space_id","permissions","response_format","binding_id"],"title":"DifyIntegrationInfo","description":"Integration information response for Dify."},"DifyListResponse":{"properties":{"memories":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Memories","description":"List of memories"},"total_count":{"type":"integer","title":"Total Count","description":"Total number of memories available"},"page":{"type":"integer","title":"Page","description":"Current page number"},"limit":{"type":"integer","title":"Limit","description":"Number of memories per page"}},"type":"object","required":["memories","total_count","page","limit"],"title":"DifyListResponse","description":"Response model for listing memories via Dify."},"DifyMemoryCreate":{"properties":{"content":{"type":"string","maxLength":50000,"title":"Content","description":"Memory content"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags","description":"Memory tags"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category","description":"Memory category"},"importance":{"anyOf":[{"type":"integer","maximum":10.0,"minimum":1.0},{"type":"null"}],"title":"Importance","description":"Importance (1-10)"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"Source identifier","default":"dify_workflow"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Additional metadata"},"workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Id","description":"Dify workflow ID"},"execution_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Execution Id","description":"Dify workflow run / execution identifier"}},"type":"object","required":["content"],"title":"DifyMemoryCreate","description":"Memory creation model optimized for Dify workflows."},"DifyMemoryResponse":{"properties":{"id":{"type":"string","title":"Id"},"content":{"type":"string","title":"Content"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"importance":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Importance"},"created_at":{"type":"string","title":"Created At"},"space_name":{"type":"string","title":"Space Name"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"relevance_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Relevance Score","description":"Relevance score for search results"},"workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Id"},"execution_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Execution Id"}},"type":"object","required":["id","content","created_at","space_name"],"title":"DifyMemoryResponse","description":"Response model for Dify memory operations."},"DifyMemoryUpdate":{"properties":{"content":{"anyOf":[{"type":"string","maxLength":50000},{"type":"null"}],"title":"Content","description":"Updated memory content"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags","description":"Updated memory tags"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category","description":"Updated memory category"},"importance":{"anyOf":[{"type":"integer","maximum":10.0,"minimum":1.0},{"type":"null"}],"title":"Importance","description":"Updated importance (1-10)"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"Updated source identifier"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Updated additional metadata"},"workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Id","description":"Updated Dify workflow ID"},"execution_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Execution Id","description":"Updated Dify workflow run / execution identifier"}},"type":"object","title":"DifyMemoryUpdate","description":"Memory update model optimized for Dify workflows."},"DifySearchRequest":{"properties":{"query":{"type":"string","title":"Query","description":"Search query"},"limit":{"anyOf":[{"type":"integer","maximum":50.0,"minimum":1.0},{"type":"null"}],"title":"Limit","description":"Maximum results","default":10},"filters":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Filters","description":"Optional filters"},"workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Id","description":"Filter by workflow ID"}},"type":"object","required":["query"],"title":"DifySearchRequest","description":"Search request model for Dify usage."},"DifySearchResponse":{"properties":{"memories":{"items":{"$ref":"#/components/schemas/DifyMemoryResponse"},"type":"array","title":"Memories"},"total_found":{"type":"integer","title":"Total Found"},"query":{"type":"string","title":"Query"},"filters_applied":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Filters Applied"}},"type":"object","required":["memories","total_found","query"],"title":"DifySearchResponse","description":"Search response model for Dify usage."},"EmailCollectionRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"source":{"type":"string","title":"Source"},"feature":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Feature"},"additional_traits":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Additional Traits"}},"type":"object","required":["email","source"],"title":"EmailCollectionRequest"},"EmailCollectionResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"customerio_success":{"type":"boolean","title":"Customerio Success"}},"type":"object","required":["success","message","customerio_success"],"title":"EmailCollectionResponse"},"EmailPreference":{"properties":{"id":{"type":"string","title":"Id","description":"Unique preference identifier"},"name":{"type":"string","title":"Name","description":"Display name for the preference"},"description":{"type":"string","title":"Description","description":"Description of what this preference controls"},"enabled":{"type":"boolean","title":"Enabled","description":"Whether this preference is enabled"},"category":{"type":"string","title":"Category","description":"Category: limits, billing, features"},"defaultEnabled":{"type":"boolean","title":"Defaultenabled","description":"Default enabled state"}},"type":"object","required":["id","name","description","enabled","category","defaultEnabled"],"title":"EmailPreference","description":"Email preference model"},"EmailPreferencesRequest":{"properties":{"preferences":{"items":{"$ref":"#/components/schemas/EmailPreference"},"type":"array","title":"Preferences","description":"List of email preferences"}},"type":"object","required":["preferences"],"title":"EmailPreferencesRequest","description":"Request model for updating email preferences"},"EmailPreferencesResponse":{"properties":{"preferences":{"items":{"$ref":"#/components/schemas/EmailPreference"},"type":"array","title":"Preferences","description":"User's email preferences"},"email_service_status":{"type":"string","title":"Email Service Status","description":"Email service status"}},"type":"object","required":["preferences","email_service_status"],"title":"EmailPreferencesResponse","description":"Response model for email preferences"},"EmailTestResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"details":{"additionalProperties":true,"type":"object","title":"Details"}},"type":"object","required":["success","message","details"],"title":"EmailTestResponse","description":"Response model for email test results."},"ErrorResponse":{"properties":{"detail":{"type":"string","title":"Detail"}},"type":"object","required":["detail"],"title":"ErrorResponse","description":"Standard error response.","example":{"detail":"Memory not found"}},"ExtensionConfig":{"properties":{"name":{"type":"string","title":"Name","description":"Custom extension name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Extension description"},"icon":{"type":"string","title":"Icon","description":"Extension icon (emoji)","default":"🧠"},"theme_color":{"type":"string","title":"Theme Color","description":"Extension theme color (hex)","default":"#007AFF"}},"type":"object","required":["name"],"title":"ExtensionConfig","description":"Extension configuration model."},"ExtensionGenerateRequest":{"properties":{"socket_id":{"type":"string","title":"Socket Id","description":"Socket ID for API access"},"extension_config":{"$ref":"#/components/schemas/ExtensionConfig","description":"Extension configuration"}},"type":"object","required":["socket_id","extension_config"],"title":"ExtensionGenerateRequest","description":"Request model for extension generation.","example":{"extension_config":{"description":"Capture work-related content","icon":"💼","name":"My Work Extension","theme_color":"#6366F1"},"socket_id":"socket_550e8400-e29b-41d4-a716-446655440000"}},"ExtensionGenerateResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Generation success status"},"extension":{"anyOf":[{"$ref":"#/components/schemas/GeneratedExtension"},{"type":"null"}],"description":"Generated extension details"},"message":{"type":"string","title":"Message","description":"Status message"},"generation_time_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Generation Time Ms","description":"Generation time in milliseconds"}},"type":"object","required":["success","message"],"title":"ExtensionGenerateResponse","description":"Extension generation response."},"GPTMemoryCreate":{"properties":{"content":{"type":"string","maxLength":50000,"title":"Content","description":"Memory content"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags","description":"Memory tags"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category","description":"Memory category"},"importance":{"anyOf":[{"type":"integer","maximum":10.0,"minimum":1.0},{"type":"null"}],"title":"Importance","description":"Importance (1-10)"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"Source identifier","default":"custom_gpt"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Additional metadata"},"space_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Space Name","description":"Space name (ignored - space determined by integration binding)"}},"type":"object","required":["content"],"title":"GPTMemoryCreate","description":"Memory creation model optimized for GPT usage."},"GPTMemoryResponse":{"properties":{"id":{"type":"string","title":"Id"},"content":{"type":"string","title":"Content"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"importance":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Importance"},"created_at":{"type":"string","title":"Created At"},"space_name":{"type":"string","title":"Space Name"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"relevance_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Relevance Score","description":"Relevance score for search results"}},"type":"object","required":["id","content","created_at","space_name"],"title":"GPTMemoryResponse","description":"Response model for GPT memory operations."},"GPTSearchRequest":{"properties":{"query":{"type":"string","title":"Query","description":"Search query"},"limit":{"anyOf":[{"type":"integer","maximum":50.0,"minimum":1.0},{"type":"null"}],"title":"Limit","description":"Maximum results","default":10},"filters":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Filters","description":"Optional filters"}},"type":"object","required":["query"],"title":"GPTSearchRequest","description":"Search request model for GPT usage."},"GPTSearchResponse":{"properties":{"memories":{"items":{"$ref":"#/components/schemas/GPTMemoryResponse"},"type":"array","title":"Memories"},"total_found":{"type":"integer","title":"Total Found"},"query":{"type":"string","title":"Query"},"filters_applied":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Filters Applied"}},"type":"object","required":["memories","total_found","query"],"title":"GPTSearchResponse","description":"Search response model for GPT usage."},"GamificationStateResponse":{"properties":{"userStats":{"additionalProperties":true,"type":"object","title":"Userstats"},"achievements":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Achievements"},"milestones":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Milestones"},"activitySummary":{"additionalProperties":true,"type":"object","title":"Activitysummary"}},"type":"object","title":"GamificationStateResponse","description":"UI-ready gamification payload (matches dashboard Progress widgets)."},"GeneratedExtension":{"properties":{"filename":{"type":"string","title":"Filename","description":"Generated extension filename"},"download_url":{"type":"string","title":"Download Url","description":"Secure download URL"},"size":{"type":"string","title":"Size","description":"File size (human readable)"},"extension_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extension Id","description":"Generated extension ID for tracking"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At","description":"Download URL expiration time"}},"type":"object","required":["filename","download_url","size"],"title":"GeneratedExtension","description":"Response model for generated extension."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthResponse":{"properties":{"status":{"type":"string","title":"Status"},"version":{"type":"string","title":"Version"},"weaviate":{"additionalProperties":true,"type":"object","title":"Weaviate"},"redis":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Redis"},"posthog":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Posthog"}},"type":"object","required":["status","version","weaviate"],"title":"HealthResponse","description":"API health check response.","example":{"posthog":{"api_key_configured":true,"enabled":true,"host":"https://us.i.posthog.com","initialized":true,"status":"ok"},"redis":{"connected":true,"connection_info":{"available_connections":18,"max_connections":20},"status":"ok"},"status":"healthy","version":"1.0.0","weaviate":{"status":"connected","version":"1.23.0"}}},"IdentifyUserRequest":{"properties":{"user_id":{"type":"string","title":"User Id","description":"User ID to identify"},"traits":{"additionalProperties":true,"type":"object","title":"Traits","description":"User properties/attributes"}},"type":"object","required":["user_id"],"title":"IdentifyUserRequest","description":"Request model for identifying a user"},"IdentifyUserResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"providers":{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object","title":"Providers","description":"Results from each provider (provider_name -> result)"},"enabled_providers":{"items":{"type":"string"},"type":"array","title":"Enabled Providers","description":"List of enabled provider names"}},"type":"object","required":["success"],"title":"IdentifyUserResponse","description":"Response model for identifying a user"},"IntegrationBinding":{"properties":{"integration_type":{"type":"string","title":"Integration Type","description":"Type of integration"},"integration_name":{"type":"string","title":"Integration Name","description":"Name of the integration"},"permissions":{"$ref":"#/components/schemas/SpacePermissions","description":"Integration permissions"},"auth_config":{"additionalProperties":true,"type":"object","title":"Auth Config","description":"Authentication configuration"},"binding_id":{"type":"string","title":"Binding Id","description":"Unique binding identifier"},"socket_id":{"type":"string","title":"Socket Id","description":"Socket this binding belongs to"},"is_active":{"type":"boolean","title":"Is Active","description":"Whether binding is active","default":true},"status":{"type":"string","title":"Status","description":"Binding status: pending (waiting for first memory), active (has received memory), inactive (manually deactivated)","default":"pending"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp"},"last_used":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used","description":"Last used timestamp"},"access_token_preview":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token Preview","description":"Preview of access token"}},"type":"object","required":["integration_type","integration_name","permissions","auth_config","binding_id","socket_id","created_at"],"title":"IntegrationBinding","description":"Full integration binding model.","example":{"access_token_preview":"sk_work_socket_abc123...","auth_config":{"plugin_id":"gpt-4-work-assistant"},"binding_id":"binding_550e8400-e29b-41d4-a716-446655440000","created_at":"2023-04-01T14:30:45.123Z","integration_name":"Work Assistant GPT","integration_type":"gpt_plugin","is_active":true,"last_used":"2023-04-01T16:45:10.456Z","permissions":{"can_delete":false,"can_read":true,"can_search":true,"can_write":true},"socket_id":"socket_123456789"}},"IntegrationBindingCreate":{"properties":{"integration_type":{"type":"string","title":"Integration Type","description":"Type of integration"},"integration_name":{"type":"string","title":"Integration Name","description":"Name of the integration"},"permissions":{"$ref":"#/components/schemas/SpacePermissions","description":"Integration permissions"},"auth_config":{"additionalProperties":true,"type":"object","title":"Auth Config","description":"Authentication configuration"}},"type":"object","required":["integration_type","integration_name","permissions","auth_config"],"title":"IntegrationBindingCreate","description":"Model for creating integration bindings."},"IntegrationBindingList":{"properties":{"bindings":{"items":{"$ref":"#/components/schemas/IntegrationBinding"},"type":"array","title":"Bindings"},"total_count":{"type":"integer","title":"Total Count"},"socket_id":{"type":"string","title":"Socket Id"}},"type":"object","required":["bindings","total_count","socket_id"],"title":"IntegrationBindingList","description":"List of integration bindings response."},"IntegrationBindingUpdate":{"properties":{"integration_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Integration Name"},"permissions":{"anyOf":[{"$ref":"#/components/schemas/SpacePermissions"},{"type":"null"}]},"auth_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Auth Config"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"IntegrationBindingUpdate","description":"Model for updating integration bindings."},"IntegrationHealthResponse":{"properties":{"integrations":{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object","title":"Integrations"},"overall_health":{"additionalProperties":true,"type":"object","title":"Overall Health"},"window_hours":{"type":"integer","title":"Window Hours"},"window_label":{"type":"string","title":"Window Label"},"last_updated":{"type":"string","title":"Last Updated"}},"type":"object","required":["integrations","overall_health","window_hours","window_label","last_updated"],"title":"IntegrationHealthResponse","description":"Per-integration-type health within a space."},"IntegrationMetricsResponse":{"properties":{"time_window":{"additionalProperties":true,"type":"object","title":"Time Window"},"real_time":{"additionalProperties":true,"type":"object","title":"Real Time"},"historical":{"additionalProperties":true,"type":"object","title":"Historical"},"summary":{"additionalProperties":true,"type":"object","title":"Summary"}},"type":"object","required":["time_window","real_time","historical","summary"],"title":"IntegrationMetricsResponse","description":"Aggregated integration request metrics for a space."},"MCPBindingCredentialsResponse":{"properties":{"binding_id":{"type":"string","title":"Binding Id"},"api_key":{"type":"string","title":"Api Key"},"space_id":{"type":"string","title":"Space Id"},"permissions":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Permissions","default":{}}},"type":"object","required":["binding_id","api_key","space_id"],"title":"MCPBindingCredentialsResponse","description":"Binding-scoped credentials for MCP OAuth token exchange (server-to-server)."},"MCPConfigurationResponse":{"properties":{"endpoint_url":{"type":"string","title":"Endpoint Url"},"binding_id":{"type":"string","title":"Binding Id"},"suggested_name":{"type":"string","title":"Suggested Name"},"client_config":{"additionalProperties":true,"type":"object","title":"Client Config"}},"type":"object","required":["endpoint_url","binding_id","suggested_name","client_config"],"title":"MCPConfigurationResponse","description":"MCP configuration for client setup."},"MCPEndpoint":{"properties":{"binding_id":{"type":"string","title":"Binding Id"},"secure_endpoint":{"type":"string","title":"Secure Endpoint"},"integration_name":{"type":"string","title":"Integration Name"},"integration_type":{"type":"string","title":"Integration Type"},"is_active":{"type":"boolean","title":"Is Active"},"last_used":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Used"}},"type":"object","required":["binding_id","secure_endpoint","integration_name","integration_type","is_active"],"title":"MCPEndpoint"},"MCPEndpointInfo":{"properties":{"endpoint_url":{"type":"string","title":"Endpoint Url"},"binding_id":{"type":"string","title":"Binding Id"},"integration_name":{"type":"string","title":"Integration Name"},"integration_type":{"type":"string","title":"Integration Type"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","title":"Created At"},"usage_stats":{"additionalProperties":true,"type":"object","title":"Usage Stats","default":{}}},"type":"object","required":["endpoint_url","binding_id","integration_name","integration_type","is_active","created_at"],"title":"MCPEndpointInfo","description":"MCP endpoint information for an integration binding."},"MCPEndpointResponse":{"properties":{"binding_id":{"type":"string","title":"Binding Id"},"secure_endpoint":{"type":"string","title":"Secure Endpoint"},"regenerated":{"type":"boolean","title":"Regenerated","default":false},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"}},"type":"object","required":["binding_id","secure_endpoint"],"title":"MCPEndpointResponse"},"MCPEndpointsList":{"properties":{"endpoints":{"items":{"$ref":"#/components/schemas/MCPEndpoint"},"type":"array","title":"Endpoints"},"total_count":{"type":"integer","title":"Total Count"}},"type":"object","required":["endpoints","total_count"],"title":"MCPEndpointsList"},"MCPResolveKeyResponse":{"properties":{"binding_id":{"type":"string","title":"Binding Id"},"space_id":{"type":"string","title":"Space Id"},"integration_type":{"type":"string","title":"Integration Type"},"api_key":{"type":"string","title":"Api Key"},"permissions":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Permissions","default":{}}},"type":"object","required":["binding_id","space_id","integration_type","api_key"],"title":"MCPResolveKeyResponse","description":"API key resolution for MCP server bare-path authentication."},"MarketingChannelsPayload":{"properties":{"email":{"type":"boolean","title":"Email","description":"Marketing email channel opt-in","default":true}},"type":"object","title":"MarketingChannelsPayload"},"MarketingSubscriptionsPutRequest":{"properties":{"topics":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Topics","description":"Topic id (string) -> subscribed e.g. {'1': true, '5': false}"},"channels":{"anyOf":[{"$ref":"#/components/schemas/MarketingChannelsPayload"},{"type":"null"}]}},"type":"object","required":["topics"],"title":"MarketingSubscriptionsPutRequest"},"MarketingSubscriptionsResponse":{"properties":{"topics":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Topics"},"channels":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Channels"},"cio_person_id_strategy":{"type":"string","title":"Cio Person Id Strategy"},"managed_topic_ids":{"items":{"type":"integer"},"type":"array","title":"Managed Topic Ids"},"customer_io_sync_ok":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Customer Io Sync Ok"},"customer_io_sync_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Io Sync Error"}},"type":"object","required":["topics","channels","cio_person_id_strategy","managed_topic_ids"],"title":"MarketingSubscriptionsResponse"},"Memory":{"properties":{"content":{"type":"string","maxLength":1048576,"title":"Content","description":"Memory content text"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags","description":"Tags for categorizing the memory"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"Source of the memory"},"importance":{"anyOf":[{"type":"integer","maximum":10.0,"minimum":1.0},{"type":"null"}],"title":"Importance","description":"Importance score (1-10)"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category","description":"Memory category within space"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Additional metadata"},"id":{"type":"string","title":"Id","description":"Unique identifier"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"Last update timestamp"},"created_by_user":{"type":"string","title":"Created By User","description":"User who created this memory"},"space_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Space Id","description":"Space this memory belongs to"},"space_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Space Name","description":"Name of the space"},"tenant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Id","description":"Legacy tenant identifier"},"full_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Content","description":"Complete original content (internal use)"},"is_chunk":{"type":"boolean","title":"Is Chunk","description":"Whether this memory is a chunk of larger content","default":false},"parent_memory_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Memory Id","description":"ID of parent memory if this is a chunk"},"chunk_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Chunk Index","description":"Index of this chunk within parent memory"},"total_chunks":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Chunks","description":"Total number of chunks in parent memory"},"chunk_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Chunk Metadata","description":"Chunk-specific metadata"}},"type":"object","required":["content","id","created_at","created_by_user"],"title":"Memory","description":"Full memory model including system fields.","example":{"category":"general","content":"Example memory content","created_at":"2023-04-01T14:30:45.123Z","created_by_user":"user123","id":"550e8400-e29b-41d4-a716-446655440000","importance":5,"is_chunk":false,"source":"api","space_id":"space_12345678","space_name":"Work Projects","tags":["example","memory"],"updated_at":"2023-04-01T14:45:10.456Z"}},"MemoryCreate":{"properties":{"content":{"type":"string","maxLength":1048576,"title":"Content","description":"Memory content text"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags","description":"Tags for categorizing the memory"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"Source of the memory"},"importance":{"anyOf":[{"type":"integer","maximum":10.0,"minimum":1.0},{"type":"null"}],"title":"Importance","description":"Importance score (1-10)"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category","description":"Memory category within space"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Additional metadata"},"space_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Space Id","description":"Space ID to create memory in"}},"type":"object","required":["content"],"title":"MemoryCreate","description":"Model for creating a new memory."},"MemoryExportResponse":{"properties":{"version":{"type":"string","title":"Version","description":"Export payload schema version"},"exported_at":{"type":"string","format":"date-time","title":"Exported At","description":"Export timestamp"},"checksum":{"type":"string","title":"Checksum","description":"SHA-256 checksum of exported memories"},"checksum_algorithm":{"type":"string","title":"Checksum Algorithm","description":"Checksum algorithm for integrity verification","default":"sha256"},"total":{"type":"integer","title":"Total","description":"Number of exported memories"},"space_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Space Id","description":"Requested export space"},"memories":{"items":{"$ref":"#/components/schemas/MemoryImportItem"},"type":"array","title":"Memories","description":"Memory items that can be re-imported"}},"type":"object","required":["version","exported_at","checksum","total","memories"],"title":"MemoryExportResponse","description":"Export payload for memory backup/download workflows."},"MemoryImportItem":{"properties":{"content":{"type":"string","maxLength":1048576,"title":"Content","description":"Memory content text"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags","description":"Tags for categorizing the memory"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"Source of the memory","default":"import"},"importance":{"anyOf":[{"type":"integer","maximum":10.0,"minimum":1.0},{"type":"null"}],"title":"Importance","description":"Importance score (1-10)","default":5},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category","description":"Memory category","default":"general"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Additional metadata"}},"type":"object","required":["content"],"title":"MemoryImportItem","description":"Single memory payload for import workflows."},"MemoryImportRequest":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version","description":"Export payload schema version used for this import","default":"1.0"},"checksum":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checksum","description":"SHA-256 checksum of the exported memories payload"},"checksum_algorithm":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checksum Algorithm","description":"Checksum algorithm used for integrity validation","default":"sha256"},"memories":{"items":{"$ref":"#/components/schemas/MemoryImportItem"},"type":"array","maxItems":100,"minItems":1,"title":"Memories","description":"Memories to import"},"space_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Space Id","description":"Target space for imported memories"}},"type":"object","required":["memories"],"title":"MemoryImportRequest","description":"Bulk import request for memories."},"MemoryImportResponse":{"properties":{"imported":{"type":"integer","title":"Imported","description":"Number of successfully imported memories"},"failed":{"type":"integer","title":"Failed","description":"Number of failed memory imports"},"errors":{"items":{"type":"string"},"type":"array","title":"Errors","description":"Validation/import errors"},"space_id":{"type":"string","title":"Space Id","description":"Space where memories were imported"}},"type":"object","required":["imported","failed","space_id"],"title":"MemoryImportResponse","description":"Import operation result details."},"MemoryList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Memory"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"size":{"type":"integer","title":"Size"},"pages":{"type":"integer","title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"MemoryList","description":"Paginated list of memories."},"MemoryMapNode":{"properties":{"id":{"type":"string","title":"Id","description":"Memory id (memory_id property)"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"Last update timestamp"},"importance":{"anyOf":[{"type":"integer","maximum":10.0,"minimum":1.0},{"type":"null"}],"title":"Importance"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category","description":"Category from metadata when set"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"label":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Label","description":"Optional display label from metadata (e.g. title), not full content"},"is_chunk":{"type":"boolean","title":"Is Chunk","default":false},"parent_memory_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Memory Id"},"total_chunks":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Chunks"}},"type":"object","required":["id","created_at"],"title":"MemoryMapNode","description":"Skeleton memory for graph layout and facets (no body text).\n\n``label`` is optional short text from structured metadata when available."},"MemoryMapNodesPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/MemoryMapNode"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"size":{"type":"integer","title":"Size"},"pages":{"type":"integer","title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"MemoryMapNodesPage","description":"Paginated memory map nodes (no content/full_content)."},"MemoryMapSummary":{"properties":{"space_id":{"type":"string","title":"Space Id","description":"Space identifier"},"total_nodes":{"type":"integer","minimum":0.0,"title":"Total Nodes","description":"Count of objects matching filters (and exclude_chunks when true)"},"total_raw_objects":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Raw Objects","description":"When exclude_chunks is true, total objects before excluding chunks"},"top_tags":{"items":{"$ref":"#/components/schemas/MemoryMapTagCount"},"type":"array","title":"Top Tags","description":"Most frequent tags in the sampled set (see meta.tag_sample_limit)"},"chunks_excluded_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Chunks Excluded Count","description":"When exclude_chunks is true, number of chunk rows not shown as nodes"},"meta":{"$ref":"#/components/schemas/MemoryMapSummaryMeta","description":"Computation metadata"}},"type":"object","required":["space_id","total_nodes","meta"],"title":"MemoryMapSummary","description":"Lightweight space-level stats for the Memory Map UI.\n\nTag histograms are computed from the first ``tag_sample_limit`` objects matching\nfilters and sort (newest first), not necessarily the full space."},"MemoryMapSummaryMeta":{"properties":{"computed_at":{"type":"string","format":"date-time","title":"Computed At","description":"Server time when the summary was built"},"sort_basis":{"type":"string","title":"Sort Basis","description":"Sort order used when sampling objects for tag histograms","default":"created_at_desc"},"tag_sample_limit":{"type":"integer","minimum":1.0,"title":"Tag Sample Limit","description":"Max number of objects scanned for top_tags (histogram may omit rare tags)"},"approximate_counts":{"type":"boolean","title":"Approximate Counts","description":"True if total_nodes hit the count scan cap and may be a lower bound","default":false}},"type":"object","required":["computed_at","tag_sample_limit"],"title":"MemoryMapSummaryMeta","description":"Metadata about how the memory map summary was computed."},"MemoryMapTagCount":{"properties":{"tag":{"type":"string","title":"Tag","description":"Lowercased tag name"},"count":{"type":"integer","minimum":0.0,"title":"Count","description":"Occurrences in the sampled set"}},"type":"object","required":["tag","count"],"title":"MemoryMapTagCount","description":"Tag frequency entry for memory map summary."},"MemoryUpdate":{"properties":{"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"importance":{"anyOf":[{"type":"integer","maximum":10.0,"minimum":1.0},{"type":"null"}],"title":"Importance"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","title":"MemoryUpdate","description":"Model for updating an existing memory.","example":{"content":"Updated memory content","importance":8,"tags":["updated","important"]}},"MonitoringDashboardResponse":{"properties":{"integration_metrics":{"$ref":"#/components/schemas/IntegrationMetricsResponse"},"integration_health":{"$ref":"#/components/schemas/IntegrationHealthResponse"},"alerts":{"$ref":"#/components/schemas/AlertResponse"},"system_status":{"additionalProperties":true,"type":"object","title":"System Status"}},"type":"object","required":["integration_metrics","integration_health","alerts","system_status"],"title":"MonitoringDashboardResponse"},"N8NIntegrationInfo":{"properties":{"integration_name":{"type":"string","title":"Integration Name"},"space_id":{"type":"string","title":"Space Id"},"permissions":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Permissions"},"response_format":{"type":"string","title":"Response Format"},"binding_id":{"type":"string","title":"Binding Id"},"workflow_support":{"type":"boolean","title":"Workflow Support","default":true},"automation_capabilities":{"items":{"type":"string"},"type":"array","title":"Automation Capabilities","default":["memory_capture","context_retrieval","workflow_history"]}},"type":"object","required":["integration_name","space_id","permissions","response_format","binding_id"],"title":"N8NIntegrationInfo","description":"Integration information response for n8n."},"N8NListResponse":{"properties":{"memories":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Memories","description":"List of memories"},"total_count":{"type":"integer","title":"Total Count","description":"Total number of memories available"},"page":{"type":"integer","title":"Page","description":"Current page number"},"limit":{"type":"integer","title":"Limit","description":"Number of memories per page"}},"type":"object","required":["memories","total_count","page","limit"],"title":"N8NListResponse","description":"Response model for listing memories via n8n."},"N8NMemoryCreate":{"properties":{"content":{"type":"string","maxLength":50000,"title":"Content","description":"Memory content"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags","description":"Memory tags"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category","description":"Memory category"},"importance":{"anyOf":[{"type":"integer","maximum":10.0,"minimum":1.0},{"type":"null"}],"title":"Importance","description":"Importance (1-10)"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"Source identifier","default":"n8n_workflow"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Additional metadata"},"workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Id","description":"n8n workflow ID"},"execution_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Execution Id","description":"n8n execution ID"}},"type":"object","required":["content"],"title":"N8NMemoryCreate","description":"Memory creation model optimized for n8n workflows."},"N8NMemoryResponse":{"properties":{"id":{"type":"string","title":"Id"},"content":{"type":"string","title":"Content"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"importance":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Importance"},"created_at":{"type":"string","title":"Created At"},"space_name":{"type":"string","title":"Space Name"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"relevance_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Relevance Score","description":"Relevance score for search results"},"workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Id"},"execution_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Execution Id"}},"type":"object","required":["id","content","created_at","space_name"],"title":"N8NMemoryResponse","description":"Response model for n8n memory operations."},"N8NMemoryUpdate":{"properties":{"content":{"anyOf":[{"type":"string","maxLength":50000},{"type":"null"}],"title":"Content","description":"Updated memory content"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags","description":"Updated memory tags"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category","description":"Updated memory category"},"importance":{"anyOf":[{"type":"integer","maximum":10.0,"minimum":1.0},{"type":"null"}],"title":"Importance","description":"Updated importance (1-10)"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"Updated source identifier"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Updated additional metadata"},"workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Id","description":"Updated n8n workflow ID"},"execution_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Execution Id","description":"Updated n8n execution ID"}},"type":"object","title":"N8NMemoryUpdate","description":"Memory update model optimized for n8n workflows."},"N8NSearchRequest":{"properties":{"query":{"type":"string","title":"Query","description":"Search query"},"limit":{"anyOf":[{"type":"integer","maximum":50.0,"minimum":1.0},{"type":"null"}],"title":"Limit","description":"Maximum results","default":10},"filters":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Filters","description":"Optional filters"},"workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Id","description":"Filter by workflow ID"}},"type":"object","required":["query"],"title":"N8NSearchRequest","description":"Search request model for n8n usage."},"N8NSearchResponse":{"properties":{"memories":{"items":{"$ref":"#/components/schemas/N8NMemoryResponse"},"type":"array","title":"Memories"},"total_found":{"type":"integer","title":"Total Found"},"query":{"type":"string","title":"Query"},"filters_applied":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Filters Applied"}},"type":"object","required":["memories","total_found","query"],"title":"N8NSearchResponse","description":"Search response model for n8n usage."},"PrefillRequest":{"properties":{"user_preferences":{"items":{"type":"string"},"type":"array","title":"User Preferences"},"user_profile":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"User Profile"},"selected_space":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Selected Space"}},"type":"object","required":["user_preferences"],"title":"PrefillRequest"},"PrefillResponse":{"properties":{"content":{"type":"string","title":"Content"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"confidence":{"type":"number","title":"Confidence"}},"type":"object","required":["content","tags","confidence"],"title":"PrefillResponse"},"PublicUnsubscribeRequest":{"properties":{"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"Email address to unsubscribe (legacy / form flow)"},"token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token","description":"Signed unsubscribe token (?token= from link)"}},"type":"object","title":"PublicUnsubscribeRequest"},"PublicUnsubscribeResponse":{"properties":{"message":{"type":"string","title":"Message"},"processed":{"type":"boolean","title":"Processed","default":true}},"type":"object","required":["message"],"title":"PublicUnsubscribeResponse"},"SearchQuery":{"properties":{"query":{"type":"string","title":"Query","description":"Search query text"},"limit":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":1.0},{"type":"null"}],"title":"Limit","description":"Maximum number of results","default":10},"filter_tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Filter Tags","description":"Filter by tags"},"filter_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filter Source","description":"Filter by source"},"min_importance":{"anyOf":[{"type":"integer","maximum":10.0,"minimum":1.0},{"type":"null"}],"title":"Min Importance","description":"Minimum importance"},"space_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Space Id","description":"Space to search in (omit for all spaces)"}},"type":"object","required":["query"],"title":"SearchQuery","description":"Model for memory search queries.","example":{"filter_tags":["learning","important"],"limit":5,"min_importance":3,"query":"What did I learn about machine learning?","space_id":"space_12345678"}},"SocketAction":{"properties":{"type":{"type":"string","title":"Type","description":"Action type"},"parameters":{"additionalProperties":true,"type":"object","title":"Parameters","description":"Action parameters"},"condition":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Condition","description":"Action condition"}},"type":"object","required":["type","parameters"],"title":"SocketAction","description":"Socket action configuration."},"SocketConfiguration":{"properties":{"triggers":{"items":{"$ref":"#/components/schemas/SocketTrigger"},"type":"array","title":"Triggers","description":"Socket triggers"},"actions":{"items":{"$ref":"#/components/schemas/SocketAction"},"type":"array","title":"Actions","description":"Socket actions"},"error_handling":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Error Handling","description":"Error handling configuration"},"execution_mode":{"type":"string","title":"Execution Mode","description":"Execution mode: sync or async","default":"async"},"priority":{"type":"integer","maximum":10.0,"minimum":1.0,"title":"Priority","description":"Socket execution priority","default":5}},"type":"object","title":"SocketConfiguration","description":"Socket configuration including triggers, conditions, and actions."},"SocketList":{"properties":{"sockets":{"items":{"$ref":"#/components/schemas/SpaceSocket"},"type":"array","title":"Sockets"},"total_count":{"type":"integer","title":"Total Count"},"space_id":{"type":"string","title":"Space Id"}},"type":"object","required":["sockets","total_count","space_id"],"title":"SocketList","description":"List of sockets response."},"SocketTrigger":{"properties":{"event":{"type":"string","title":"Event","description":"Trigger event type"},"conditions":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Conditions","description":"Trigger conditions"}},"type":"object","required":["event"],"title":"SocketTrigger","description":"Socket trigger configuration."},"Space":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name","description":"Space name"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon","description":"Emoji icon for space identification","default":"📁"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color","description":"Hex color code for space theming","default":"#6366F1"},"template_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Type","description":"Template used: work, personal, learning, custom","default":"custom"},"privacy_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Privacy Level","description":"Privacy setting: personal, shared, team","default":"personal"},"space_type":{"$ref":"#/components/schemas/SpaceType","description":"Space type: text_only (default) or multimodal","default":"text_only"},"id":{"type":"string","title":"Id","description":"Unique space identifier"},"space_id":{"type":"string","title":"Space Id","description":"Space ID for UI operations"},"space_tenant_id":{"type":"string","title":"Space Tenant Id","description":"Weaviate tenant ID for this space"},"role":{"type":"string","title":"Role","description":"User's role: owner, editor, viewer"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp"},"last_accessed":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Accessed","description":"Last access timestamp"},"memory_count":{"type":"integer","title":"Memory Count","description":"Number of memories in this space","default":0},"shared_with":{"items":{"type":"string"},"type":"array","title":"Shared With","description":"User IDs this space is shared with"},"collection_name":{"type":"string","title":"Collection Name","description":"Weaviate collection: Memory or MemoryMultimodal","default":"Memory"}},"type":"object","required":["name","id","space_id","space_tenant_id","role","created_at"],"title":"Space","description":"Full space model including system fields.","example":{"collection_name":"Memory","color":"#4F46E5","created_at":"2023-04-01T14:30:45.123Z","icon":"💼","id":"550e8400-e29b-41d4-a716-446655440000","last_accessed":"2023-04-01T16:45:10.456Z","memory_count":42,"name":"Work Projects","privacy_level":"personal","role":"owner","shared_with":[],"space_id":"space_12345678","space_tenant_id":"space_work_abc12345","space_type":"text_only","template_type":"work"}},"SpaceCreate":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name","description":"Space name"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon","description":"Emoji icon for space identification","default":"📁"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color","description":"Hex color code for space theming","default":"#6366F1"},"template_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Type","description":"Template used: work, personal, learning, custom","default":"custom"},"privacy_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Privacy Level","description":"Privacy setting: personal, shared, team","default":"personal"},"space_type":{"$ref":"#/components/schemas/SpaceType","description":"Space type: text_only (default) or multimodal","default":"text_only"}},"type":"object","required":["name"],"title":"SpaceCreate","description":"Model for creating a new space."},"SpacePermissions":{"properties":{"can_read":{"type":"boolean","title":"Can Read","description":"Permission to read memories","default":true},"can_write":{"type":"boolean","title":"Can Write","description":"Permission to create memories","default":false},"can_search":{"type":"boolean","title":"Can Search","description":"Permission to search memories","default":true},"can_delete":{"type":"boolean","title":"Can Delete","description":"Permission to delete memories","default":false},"filters":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Filters","description":"Content filtering rules"},"rate_limits":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Rate Limits","description":"Rate limiting configuration"}},"type":"object","title":"SpacePermissions","description":"Permission model for socket integration bindings.","example":{"can_delete":false,"can_read":true,"can_search":true,"can_write":true,"filters":{"categories":["meeting","project"],"exclude_tags":["personal","private"],"importance_min":5},"rate_limits":{"requests_per_day":10000,"requests_per_hour":500,"requests_per_minute":30}}},"SpaceShareRequest":{"properties":{"target_user_id":{"type":"string","title":"Target User Id","description":"User ID to share space with"},"role":{"type":"string","title":"Role","description":"Role to grant: editor, viewer"}},"type":"object","required":["target_user_id","role"],"title":"SpaceShareRequest","description":"Model for sharing a space with another user."},"SpaceSocket":{"properties":{"socket_name":{"type":"string","maxLength":100,"minLength":1,"title":"Socket Name","description":"Socket name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Socket description"},"socket_config":{"$ref":"#/components/schemas/SocketConfiguration","description":"Socket configuration"},"socket_id":{"type":"string","title":"Socket Id","description":"Unique socket identifier"},"space_id":{"type":"string","title":"Space Id","description":"Space this socket belongs to"},"user_id":{"type":"string","title":"User Id","description":"User who owns this socket"},"is_active":{"type":"boolean","title":"Is Active","description":"Whether socket is active","default":true},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"Last update timestamp"},"integration_bindings":{"items":{"$ref":"#/components/schemas/IntegrationBinding"},"type":"array","title":"Integration Bindings","description":"Socket integrations"}},"type":"object","required":["socket_name","socket_config","socket_id","space_id","user_id","created_at"],"title":"SpaceSocket","description":"Full space socket model.","example":{"created_at":"2023-04-01T14:30:45.123Z","description":"Automate work-related memory processing","integration_bindings":[],"is_active":true,"socket_config":{"actions":[{"parameters":{"tags":["work","auto-tagged"]},"type":"add_tags"}],"execution_mode":"async","priority":8,"triggers":[{"conditions":[{"type":"keyword_match","value":["meeting","client","project"]}],"event":"pre-remember"}]},"socket_id":"socket_550e8400-e29b-41d4-a716-446655440000","socket_name":"Professional Memory Hub","space_id":"space_work_123","updated_at":"2023-04-01T16:45:10.456Z","user_id":"user_123456789"}},"SpaceSocketCreate":{"properties":{"socket_name":{"type":"string","maxLength":100,"minLength":1,"title":"Socket Name","description":"Socket name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Socket description"},"socket_config":{"$ref":"#/components/schemas/SocketConfiguration","description":"Socket configuration"}},"type":"object","required":["socket_name","socket_config"],"title":"SpaceSocketCreate","description":"Model for creating space sockets."},"SpaceSocketUpdate":{"properties":{"socket_name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Socket Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"socket_config":{"anyOf":[{"$ref":"#/components/schemas/SocketConfiguration"},{"type":"null"}]},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"SpaceSocketUpdate","description":"Model for updating space sockets."},"SpaceType":{"type":"string","enum":["text_only","multimodal"],"title":"SpaceType","description":"Space type determines which Weaviate collection is used for storage."},"SpaceUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Name"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"privacy_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Privacy Level"}},"type":"object","title":"SpaceUpdate","description":"Model for updating an existing space."},"SubscriptionCreate":{"properties":{"tier":{"type":"string","title":"Tier"},"billing_cycle":{"type":"string","title":"Billing Cycle","default":"monthly"}},"type":"object","required":["tier"],"title":"SubscriptionCreate"},"SubscriptionResponse":{"properties":{"tier":{"type":"string","title":"Tier"},"status":{"type":"string","title":"Status","description":"Subscription state: none (free/no Stripe sub), active, trialing, past_due, canceled, unpaid, incomplete, paused, incomplete_expired, unknown"},"subscription_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription Id"}},"type":"object","required":["tier","status"],"title":"SubscriptionResponse"},"TestEmailRequest":{"properties":{"to_email":{"type":"string","title":"To Email"}},"type":"object","required":["to_email"],"title":"TestEmailRequest","description":"Request model for test email."},"TokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type"},"expires_in":{"type":"integer","title":"Expires In"},"refresh_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Token"},"scope":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope"}},"type":"object","required":["access_token","token_type","expires_in"],"title":"TokenResponse"},"TrackEventRequest":{"properties":{"event_name":{"type":"string","title":"Event Name","description":"Name of the event to track"},"properties":{"additionalProperties":true,"type":"object","title":"Properties","description":"Event properties/metadata"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"User ID (defaults to authenticated user)"}},"type":"object","required":["event_name"],"title":"TrackEventRequest","description":"Request model for tracking an event"},"TrackEventResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"providers":{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object","title":"Providers","description":"Results from each provider (provider_name -> result)"},"enabled_providers":{"items":{"type":"string"},"type":"array","title":"Enabled Providers","description":"List of enabled provider names"}},"type":"object","required":["success"],"title":"TrackEventResponse","description":"Response model for tracking an event"},"UpgradeRequest":{"properties":{"tier":{"type":"string","title":"Tier"},"billing_cycle":{"type":"string","title":"Billing Cycle","default":"monthly"},"coupon_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coupon Code"},"return_origin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Return Origin","description":"Browser origin (window.location.origin) for Stripe success/cancel URLs"}},"type":"object","required":["tier"],"title":"UpgradeRequest"},"UserActivityEventItem":{"properties":{"id":{"type":"string","title":"Id"},"user_id":{"type":"string","title":"User Id"},"space_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Space Id"},"event_type":{"type":"string","title":"Event Type"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"integration_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Integration Type"},"title":{"type":"string","title":"Title"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","user_id","event_type","title","created_at"],"title":"UserActivityEventItem","description":"One row from user_activity_events."},"UserActivityFeedResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/UserActivityEventItem"},"type":"array","title":"Items"},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset","description":"Pass as `offset` for the next page, or null if no more results"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Opaque cursor (created_at + id) for stable pagination; pass as `cursor`"}},"type":"object","required":["items"],"title":"UserActivityFeedResponse"},"ValidateCouponRequest":{"properties":{"coupon_code":{"type":"string","title":"Coupon Code","description":"Promotion code or coupon ID"},"tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tier","description":"Target tier (optional; reserved for future use)"},"billing_cycle":{"type":"string","title":"Billing Cycle","description":"Billing cycle: monthly or annual","default":"monthly"}},"type":"object","required":["coupon_code"],"title":"ValidateCouponRequest"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WebhookResponse":{"properties":{"status":{"type":"string","title":"Status"},"message":{"type":"string","title":"Message"}},"type":"object","required":["status","message"],"title":"WebhookResponse"},"WeeklyActivitySummaryResponse":{"properties":{"storage_this_week":{"type":"integer","minimum":0.0,"title":"Storage This Week","description":"Successful create/update/delete events in the window"},"retrieval_this_week":{"type":"integer","minimum":0.0,"title":"Retrieval This Week","description":"Successful search/list/get memory reads in the window"},"window_days":{"type":"integer","maximum":90.0,"minimum":1.0,"title":"Window Days","default":7}},"type":"object","required":["storage_this_week","retrieval_this_week"],"title":"WeeklyActivitySummaryResponse","description":"Rolling-window counts for dashboard Storage vs Retrieval (space-scoped)."},"XBookmarkSettingsUpdate":{"properties":{"sync_interval_minutes":{"type":"integer","maximum":60.0,"minimum":5.0,"title":"Sync Interval Minutes"}},"type":"object","required":["sync_interval_minutes"],"title":"XBookmarkSettingsUpdate"},"ZapierIntegrationInfo":{"properties":{"integration_name":{"type":"string","title":"Integration Name"},"integration_type":{"type":"string","title":"Integration Type","default":"zapier"},"space_name":{"type":"string","title":"Space Name"},"permissions":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Permissions"},"api_version":{"type":"string","title":"Api Version","default":"1.0"},"endpoints":{"items":{"type":"string"},"type":"array","title":"Endpoints","default":["GET /zapier/memories - List memories","POST /zapier/memories - Create memory","GET /zapier/memories/{id} - Get memory","PATCH /zapier/memories/{id} - Update memory","DELETE /zapier/memories/{id} - Delete memory","POST /zapier/memories/search - Search memories"]}},"type":"object","required":["integration_name","space_name","permissions"],"title":"ZapierIntegrationInfo"},"ZapierMemoryCreate":{"properties":{"content":{"type":"string","title":"Content"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags","default":[]},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","default":"zapier"},"importance":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Importance","default":5}},"type":"object","required":["content"],"title":"ZapierMemoryCreate"},"ZapierMemoryResponse":{"properties":{"id":{"type":"string","title":"Id"},"content":{"type":"string","title":"Content"},"tags":{"type":"string","title":"Tags","default":""},"source":{"type":"string","title":"Source","default":"zapier"},"importance":{"type":"integer","title":"Importance","default":5},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"space_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Space Id"},"metadata":{"type":"string","title":"Metadata","default":"{}"},"similarity_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Similarity Score"}},"type":"object","required":["id","content","created_at","updated_at"],"title":"ZapierMemoryResponse"},"ZapierMemoryUpdate":{"properties":{"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"importance":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Importance"}},"type":"object","title":"ZapierMemoryUpdate"},"ZapierSearchQuery":{"properties":{"query":{"type":"string","title":"Query"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit","default":10},"similarity_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Similarity Threshold","default":0.5}},"type":"object","required":["query"],"title":"ZapierSearchQuery"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}