{"openapi":"3.1.0","info":{"title":"EmailConnect","version":"0.2.0"},"paths":{"/api/accounts/register":{"post":{"summary":"Register","operationId":"register_api_accounts_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Registration"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/accounts/login":{"post":{"summary":"Login","operationId":"login_api_accounts_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Credentials"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/accounts/session":{"get":{"summary":"Session","operationId":"session_api_accounts_session_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"delete":{"summary":"Logout","operationId":"logout_api_accounts_session_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/accounts/logout-all":{"post":{"summary":"Logout All","operationId":"logout_all_api_accounts_logout_all_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/accounts/recover":{"post":{"summary":"Recover","operationId":"recover_api_accounts_recover_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Recovery"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/accounts/password":{"post":{"summary":"Change Password","operationId":"change_password_api_accounts_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePassword"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing":{"get":{"summary":"Status","operationId":"status_api_billing_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/billing/checkout":{"post":{"summary":"Checkout","operationId":"checkout_api_billing_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutInput"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/refresh":{"post":{"summary":"Refresh","operationId":"refresh_api_billing_refresh_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/billing/cancel":{"post":{"summary":"Cancel","operationId":"cancel_api_billing_cancel_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CancelInput"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/paypal/webhook":{"post":{"summary":"Webhook","operationId":"webhook_api_billing_paypal_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/accounts/google/start":{"post":{"summary":"Start","operationId":"start_api_accounts_google_start_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleStart"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/accounts/google/callback":{"get":{"summary":"Callback","operationId":"callback_api_accounts_google_callback_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/mailbox-oauth/{provider}/start":{"post":{"summary":"Start","operationId":"start_api_mailbox_oauth__provider__start_post","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MailboxOAuthStart"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/mailbox-oauth/{provider}/callback":{"get":{"summary":"Callback","operationId":"callback_api_mailbox_oauth__provider__callback_get","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/mailbox-oauth/{provider}/reset-baseline":{"post":{"summary":"Reset Baseline","description":"Owner acknowledges an unavailable provider history interval explicitly.\n\nExisting messages and AI consumer checkpoints are deliberately untouched.\nMonitoring remains paused; collection must be enabled separately.","operationId":"reset_baseline_api_mailbox_oauth__provider__reset_baseline_post","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MailboxBaselineReset"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/.well-known/oauth-authorization-server":{"get":{"summary":"Metadata","operationId":"metadata__well_known_oauth_authorization_server_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/oauth-protected-resource/mcp":{"get":{"summary":"Resource Metadata","operationId":"resource_metadata__well_known_oauth_protected_resource_mcp_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/oauth-protected-resource":{"get":{"summary":"Resource Metadata","operationId":"resource_metadata__well_known_oauth_protected_resource_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/register":{"post":{"summary":"Register","operationId":"register_register_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"options":{"summary":"Preflight","operationId":"preflight_register_options","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/authorize":{"get":{"summary":"Authorize","operationId":"authorize_authorize_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Authorize","operationId":"authorize_authorize_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/token":{"post":{"summary":"Token","operationId":"token_token_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"options":{"summary":"Preflight","operationId":"preflight_token_options","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/revoke":{"post":{"summary":"Revoke","operationId":"revoke_revoke_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"options":{"summary":"Preflight","operationId":"preflight_revoke_options","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/oauth/consent":{"get":{"summary":"Consent Page","operationId":"consent_page_oauth_consent_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Consent","operationId":"consent_oauth_consent_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/accounts/connections":{"get":{"summary":"Connections","operationId":"connections_api_accounts_connections_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/accounts/connections/{grant_id}/checkpoint":{"post":{"summary":"Import Checkpoint","operationId":"import_checkpoint_api_accounts_connections__grant_id__checkpoint_post","parameters":[{"name":"grant_id","in":"path","required":true,"schema":{"type":"string","title":"Grant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckpointImportInput"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/accounts/connections/{grant_id}/retention-gap":{"post":{"summary":"Accept Gap","operationId":"accept_gap_api_accounts_connections__grant_id__retention_gap_post","parameters":[{"name":"grant_id","in":"path","required":true,"schema":{"type":"string","title":"Grant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GapAcknowledgementInput"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/accounts/connections/{grant_id}/mailboxes":{"put":{"summary":"Set Connection Mailboxes","operationId":"set_connection_mailboxes_api_accounts_connections__grant_id__mailboxes_put","parameters":[{"name":"grant_id","in":"path","required":true,"schema":{"type":"string","title":"Grant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionMailboxesInput"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/accounts/connections/{grant_id}":{"delete":{"summary":"Disconnect","operationId":"disconnect_api_accounts_connections__grant_id__delete","parameters":[{"name":"grant_id","in":"path","required":true,"schema":{"type":"string","title":"Grant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/accounts/account":{"delete":{"summary":"Delete Account","operationId":"delete_account_api_accounts_account_delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteAccount"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/mailboxes/{mailbox_id}/outbound":{"get":{"summary":"Settings","operationId":"settings_api_mailboxes__mailbox_id__outbound_get","parameters":[{"name":"mailbox_id","in":"path","required":true,"schema":{"type":"string","title":"Mailbox Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Configure","operationId":"configure_api_mailboxes__mailbox_id__outbound_post","parameters":[{"name":"mailbox_id","in":"path","required":true,"schema":{"type":"string","title":"Mailbox Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutboundSettingInput"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/mailboxes/{mailbox_id}/outbound/incoming-credentials":{"post":{"summary":"Enable With Incoming","operationId":"enable_with_incoming_api_mailboxes__mailbox_id__outbound_incoming_credentials_post","parameters":[{"name":"mailbox_id","in":"path","required":true,"schema":{"type":"string","title":"Mailbox Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/outbound/drafts":{"get":{"summary":"Drafts","operationId":"drafts_api_outbound_drafts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/outbound/drafts/{draft_id}":{"get":{"summary":"Draft","operationId":"draft_api_outbound_drafts__draft_id__get","parameters":[{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","title":"Draft Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/outbound/drafts/{draft_id}/approve":{"post":{"summary":"Approve","operationId":"approve_api_outbound_drafts__draft_id__approve_post","parameters":[{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","title":"Draft Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftReviewInput"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/outbound/drafts/{draft_id}/reject":{"post":{"summary":"Reject","operationId":"reject_api_outbound_drafts__draft_id__reject_post","parameters":[{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","title":"Draft Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftReviewInput"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/outbound/drafts/{draft_id}/send":{"post":{"summary":"Send","operationId":"send_api_outbound_drafts__draft_id__send_post","parameters":[{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","title":"Draft Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftReviewInput"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/onboarding":{"get":{"summary":"Get Status","operationId":"get_status_api_onboarding_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/":{"get":{"summary":"Index","operationId":"index__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/capabilities":{"get":{"summary":"Capabilities","operationId":"capabilities_api_capabilities_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/mailboxes":{"get":{"summary":"Mailboxes","operationId":"mailboxes_api_mailboxes_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Connect","operationId":"connect_api_mailboxes_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MailboxInput"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/mailboxes/test-imap":{"post":{"summary":"Test Imap","operationId":"test_imap_api_mailboxes_test_imap_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImapTestInput"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/mailboxes/{mailbox_id}/folder-mode":{"put":{"summary":"Enable Auto Folders","operationId":"enable_auto_folders_api_mailboxes__mailbox_id__folder_mode_put","parameters":[{"name":"mailbox_id","in":"path","required":true,"schema":{"type":"string","title":"Mailbox Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderModeInput"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/mailboxes/{mailbox_id}/disconnect":{"post":{"summary":"Disconnect","operationId":"disconnect_api_mailboxes__mailbox_id__disconnect_post","parameters":[{"name":"mailbox_id","in":"path","required":true,"schema":{"type":"string","title":"Mailbox Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/mailboxes/{mailbox_id}":{"delete":{"summary":"Purge","operationId":"purge_api_mailboxes__mailbox_id__delete","parameters":[{"name":"mailbox_id","in":"path","required":true,"schema":{"type":"string","title":"Mailbox Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/mailboxes/{mailbox_id}/sync":{"post":{"summary":"Sync","operationId":"sync_api_mailboxes__mailbox_id__sync_post","parameters":[{"name":"mailbox_id","in":"path","required":true,"schema":{"type":"string","title":"Mailbox Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/events":{"get":{"summary":"Events","operationId":"events_api_events_get","parameters":[{"name":"after","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"After"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"latest","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Latest"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/monitoring":{"get":{"summary":"Monitoring Status","operationId":"monitoring_status_api_monitoring_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agent-prompt":{"get":{"summary":"Agent Prompt","operationId":"agent_prompt_api_agent_prompt_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"summary":"Update Agent Prompt","operationId":"update_agent_prompt_api_agent_prompt_put","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentPromptInput"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/mailboxes/{mailbox_id}/monitoring":{"post":{"summary":"Monitoring","operationId":"monitoring_api_mailboxes__mailbox_id__monitoring_post","parameters":[{"name":"mailbox_id","in":"path","required":true,"schema":{"type":"string","title":"Mailbox Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitoringInput"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/mailboxes/{mailbox_id}/grok-delivery":{"post":{"summary":"Grok Delivery","operationId":"grok_delivery_api_mailboxes__mailbox_id__grok_delivery_post","parameters":[{"name":"mailbox_id","in":"path","required":true,"schema":{"type":"string","title":"Mailbox Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrokDeliveryInput"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/monitoring/deliveries":{"get":{"summary":"Monitoring Deliveries","operationId":"monitoring_deliveries_api_monitoring_deliveries_get","parameters":[{"name":"mailbox_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mailbox Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/monitoring/events/{event_id}/retry":{"post":{"summary":"Retry Event","operationId":"retry_event_api_monitoring_events__event_id__retry_post","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetryInput"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/messages/{message_id}":{"get":{"summary":"Message","operationId":"message_api_messages__message_id__get","parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","title":"Message Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/grok/test-preview":{"get":{"summary":"Grok Test Preview","operationId":"grok_test_preview_api_grok_test_preview_get","parameters":[{"name":"message_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}],"title":"Message Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/grok/test":{"post":{"summary":"Grok Test","operationId":"grok_test_api_grok_test_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrokTestInput"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/grok/connection":{"get":{"summary":"Grok Connection","operationId":"grok_connection_api_grok_connection_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"summary":"Save Grok Connection","operationId":"save_grok_connection_api_grok_connection_put","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrokConnectionInput"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Grok Connection","operationId":"delete_grok_connection_api_grok_connection_delete","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/grok/test-runs":{"get":{"summary":"Grok Test Runs","operationId":"grok_test_runs_api_grok_test_runs_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/events/{event_id}/decision":{"post":{"summary":"Decision","operationId":"decision_api_events__event_id__decision_post","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionInput"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/demo/{mailbox_id}/messages":{"post":{"summary":"Seed","operationId":"seed_api_demo__mailbox_id__messages_post","parameters":[{"name":"mailbox_id","in":"path","required":true,"schema":{"type":"string","title":"Mailbox Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DemoInput"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AgentPromptInput":{"properties":{"text":{"type":"string","maxLength":8000,"title":"Text"},"default_locale":{"type":"string","enum":["en","zh-CN","es"],"title":"Default Locale","default":"en"}},"additionalProperties":false,"type":"object","required":["text"],"title":"AgentPromptInput"},"CancelInput":{"properties":{"plan":{"anyOf":[{"type":"string","enum":["plus","pro"]},{"type":"null"}],"title":"Plan"}},"additionalProperties":false,"type":"object","title":"CancelInput"},"ChangePassword":{"properties":{"current_password":{"type":"string","maxLength":1024,"minLength":1,"title":"Current Password"},"new_password":{"type":"string","maxLength":1024,"minLength":12,"title":"New Password"}},"additionalProperties":false,"type":"object","required":["current_password","new_password"],"title":"ChangePassword"},"CheckoutInput":{"properties":{"plan":{"type":"string","enum":["plus","pro"],"title":"Plan","default":"plus"},"interval":{"type":"string","enum":["month","year"],"title":"Interval"}},"additionalProperties":false,"type":"object","required":["interval"],"title":"CheckoutInput"},"CheckpointImportInput":{"properties":{"cursor":{"type":"integer","minimum":0.0,"title":"Cursor"},"confirmed":{"type":"boolean","title":"Confirmed"}},"additionalProperties":false,"type":"object","required":["cursor","confirmed"],"title":"CheckpointImportInput"},"ConnectionMailboxesInput":{"properties":{"mailbox_ids":{"items":{"type":"string"},"type":"array","maxItems":100,"minItems":1,"title":"Mailbox Ids"},"confirmed":{"type":"boolean","title":"Confirmed"}},"additionalProperties":false,"type":"object","required":["mailbox_ids","confirmed"],"title":"ConnectionMailboxesInput"},"Credentials":{"properties":{"username":{"type":"string","maxLength":64,"minLength":3,"title":"Username"},"password":{"type":"string","maxLength":1024,"minLength":1,"title":"Password"}},"additionalProperties":false,"type":"object","required":["username","password"],"title":"Credentials"},"DecisionInput":{"properties":{"decision":{"type":"string","enum":["notify","digest","silent"],"title":"Decision"},"reason":{"type":"string","maxLength":1000,"title":"Reason","default":""}},"additionalProperties":false,"type":"object","required":["decision"],"title":"DecisionInput"},"DeleteAccount":{"properties":{"current_password":{"anyOf":[{"type":"string","maxLength":1024,"minLength":1},{"type":"null"}],"title":"Current Password"},"confirmation":{"type":"string","maxLength":64,"minLength":1,"title":"Confirmation"}},"additionalProperties":false,"type":"object","required":["confirmation"],"title":"DeleteAccount"},"DemoInput":{"properties":{"kind":{"type":"string","enum":["important","newsletter","injection"],"title":"Kind","default":"important"},"external_id":{"type":"string","maxLength":100,"minLength":1,"title":"External Id"}},"additionalProperties":false,"type":"object","required":["external_id"],"title":"DemoInput"},"DraftReviewInput":{"properties":{"revision":{"type":"integer","minimum":1.0,"title":"Revision"}},"additionalProperties":false,"type":"object","required":["revision"],"title":"DraftReviewInput"},"FolderModeInput":{"properties":{"folder_mode":{"type":"string","const":"auto","title":"Folder Mode"}},"additionalProperties":false,"type":"object","required":["folder_mode"],"title":"FolderModeInput"},"GapAcknowledgementInput":{"properties":{"confirmed":{"type":"boolean","title":"Confirmed"}},"additionalProperties":false,"type":"object","required":["confirmed"],"title":"GapAcknowledgementInput"},"GoogleStart":{"properties":{"mode":{"type":"string","enum":["login","link","reauth"],"title":"Mode","default":"login"},"oauth_request":{"anyOf":[{"type":"string","maxLength":43,"minLength":43},{"type":"null"}],"title":"Oauth Request"},"setup_mailbox":{"type":"boolean","title":"Setup Mailbox","default":false},"attribution":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attribution"}},"additionalProperties":false,"type":"object","title":"GoogleStart"},"GrokConnectionInput":{"properties":{"webhook_url":{"anyOf":[{"type":"string","maxLength":2048,"minLength":1},{"type":"null"}],"title":"Webhook Url"},"webhook_secret":{"anyOf":[{"type":"string","maxLength":2048,"minLength":1},{"type":"null"}],"title":"Webhook Secret"}},"additionalProperties":false,"type":"object","title":"GrokConnectionInput"},"GrokDeliveryInput":{"properties":{"delivery_mode":{"type":"string","enum":["single","batch_v1"],"title":"Delivery Mode","default":"single"},"batch_compatible":{"type":"boolean","title":"Batch Compatible","default":false},"enabled":{"type":"boolean","title":"Enabled"},"expected_connection_updated_at":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Expected Connection Updated At"},"confirmed_host":{"type":"string","maxLength":253,"title":"Confirmed Host","default":"api2.cursor.sh"}},"additionalProperties":false,"type":"object","required":["enabled"],"title":"GrokDeliveryInput"},"GrokTestInput":{"properties":{"webhook_url":{"anyOf":[{"type":"string","maxLength":2048,"minLength":1},{"type":"null"}],"title":"Webhook Url"},"webhook_secret":{"anyOf":[{"type":"string","maxLength":2048,"minLength":1},{"type":"null"}],"title":"Webhook Secret"},"use_saved":{"type":"boolean","title":"Use Saved","default":false},"expected_connection_updated_at":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Expected Connection Updated At"},"message_id":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Message Id"}},"additionalProperties":false,"type":"object","title":"GrokTestInput"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ImapTestInput":{"properties":{"host":{"type":"string","maxLength":253,"minLength":1,"title":"Host"},"username":{"type":"string","maxLength":254,"minLength":1,"title":"Username"},"password":{"type":"string","maxLength":1000,"minLength":1,"title":"Password"},"folder_mode":{"type":"string","enum":["auto","single"],"title":"Folder Mode","default":"auto"},"folder":{"type":"string","maxLength":255,"minLength":1,"title":"Folder","default":"INBOX"}},"additionalProperties":false,"type":"object","required":["host","username","password"],"title":"ImapTestInput"},"MailboxBaselineReset":{"properties":{"mailbox_id":{"type":"string","maxLength":100,"pattern":"^mb_[a-f0-9]{32}$","title":"Mailbox Id"},"confirmed":{"type":"boolean","title":"Confirmed"}},"additionalProperties":false,"type":"object","required":["mailbox_id","confirmed"],"title":"MailboxBaselineReset"},"MailboxInput":{"properties":{"address":{"type":"string","maxLength":254,"minLength":3,"title":"Address"},"provider":{"type":"string","enum":["demo","imap"],"title":"Provider","default":"demo"},"platform":{"type":"string","enum":["demo","local","grok","chatgpt","muse"],"title":"Platform","default":"demo"},"host":{"anyOf":[{"type":"string","maxLength":253},{"type":"null"}],"title":"Host"},"username":{"anyOf":[{"type":"string","maxLength":254},{"type":"null"}],"title":"Username"},"password":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Password"},"folder_mode":{"type":"string","enum":["auto","single"],"title":"Folder Mode","default":"auto"},"folder":{"type":"string","maxLength":255,"minLength":1,"title":"Folder","default":"INBOX"},"initial_backfill":{"type":"boolean","title":"Initial Backfill","default":false},"initial_recent":{"anyOf":[{"type":"integer","maximum":50.0,"minimum":1.0},{"type":"null"}],"title":"Initial Recent"},"webhook_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Webhook Url"},"webhook_secret":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Webhook Secret"}},"additionalProperties":false,"type":"object","required":["address"],"title":"MailboxInput"},"MailboxOAuthStart":{"properties":{"oauth_request":{"anyOf":[{"type":"string","maxLength":43,"minLength":43,"pattern":"^[A-Za-z0-9_-]+$"},{"type":"null"}],"title":"Oauth Request"},"mailbox_id":{"anyOf":[{"type":"string","maxLength":100,"pattern":"^mb_[a-f0-9]{32}$"},{"type":"null"}],"title":"Mailbox Id"},"send_enabled":{"type":"boolean","title":"Send Enabled","default":false}},"additionalProperties":false,"type":"object","title":"MailboxOAuthStart"},"MonitoringInput":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"expected_connection_updated_at":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Expected Connection Updated At"},"confirmed_host":{"type":"string","maxLength":253,"title":"Confirmed Host","default":"api2.cursor.sh"},"interval_seconds":{"type":"integer","maximum":3600.0,"minimum":60.0,"title":"Interval Seconds","default":60}},"additionalProperties":false,"type":"object","required":["enabled"],"title":"MonitoringInput"},"OutboundSettingInput":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"host":{"anyOf":[{"type":"string","maxLength":253},{"type":"null"}],"title":"Host"},"port":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Port"},"security":{"anyOf":[{"type":"string","enum":["tls","starttls"]},{"type":"null"}],"title":"Security"},"username":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}],"title":"Username"},"password":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}],"title":"Password"}},"additionalProperties":false,"type":"object","required":["enabled"],"title":"OutboundSettingInput"},"Recovery":{"properties":{"username":{"type":"string","maxLength":64,"minLength":3,"title":"Username"},"recovery_code":{"type":"string","maxLength":100,"minLength":1,"title":"Recovery Code"},"new_password":{"type":"string","maxLength":1024,"minLength":12,"title":"New Password"}},"additionalProperties":false,"type":"object","required":["username","recovery_code","new_password"],"title":"Recovery"},"Registration":{"properties":{"username":{"type":"string","maxLength":64,"minLength":3,"title":"Username"},"password":{"type":"string","maxLength":1024,"minLength":1,"title":"Password"},"attribution":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attribution"}},"additionalProperties":false,"type":"object","required":["username","password"],"title":"Registration"},"RetryInput":{"properties":{"expected_connection_updated_at":{"type":"string","maxLength":100,"minLength":1,"title":"Expected Connection Updated At"},"allow_possible_duplicate":{"type":"boolean","title":"Allow Possible Duplicate","default":false}},"additionalProperties":false,"type":"object","required":["expected_connection_updated_at"],"title":"RetryInput"},"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"}}}}