{"openapi":"3.1.0","info":{"title":"PermitIQx API","description":"Construction opportunity intelligence API","version":"1.0.0"},"servers":[{"url":"https://permitiq-api.onrender.com","description":"PermitIQx API"}],"paths":{"/health/":{"get":{"tags":["health"],"summary":"Health Check","operationId":"health_check_health__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health/live":{"get":{"tags":["health"],"summary":"Liveness","description":"Ultra-light liveness probe — used by keep-warm pings and uptime\nmonitors. Never imports models, never opens a DB connection,\nreturns instantly so the response time reflects pure container\nwarmth (not Neon's wake-up latency).","operationId":"liveness_health_live_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health/healthz":{"get":{"tags":["health"],"summary":"Healthz","description":"Deep health check: DB connect + simple query + table count.\n\nPublic callers get a minimal payload. Full diagnostics require\n``X-Cron-Secret`` matching ``settings.CRON_SECRET``.","operationId":"healthz_health_healthz_get","parameters":[{"name":"X-Cron-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Cron-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/register":{"post":{"tags":["auth"],"summary":"Register","operationId":"register_api_v1_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRegister"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/verify-email":{"post":{"tags":["auth"],"summary":"Verify Email","description":"Validate the OTP, mark the user verified, start the trial clock.","operationId":"verify_email_api_v1_auth_verify_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyEmailRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyEmailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/resend-verification":{"post":{"tags":["auth"],"summary":"Resend Verification","description":"Generate + email a fresh OTP. Always returns 200 to avoid leaking\nwhether the email is registered (beyond the cooldown rate-limit).","operationId":"resend_verification_api_v1_auth_resend_verification_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendVerificationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendVerificationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/login":{"post":{"tags":["auth"],"summary":"Login","operationId":"login_api_v1_auth_login_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_login_api_v1_auth_login_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"}}}}}}},"/api/v1/auth/anonymous":{"post":{"tags":["auth"],"summary":"Create Anonymous Session","description":"Create an anonymous session token for scrapers and automated systems.\nDisabled in production — use ``/scraper/cron`` with ``X-Cron-Secret``.","operationId":"create_anonymous_session_api_v1_auth_anonymous_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}}}}},"/api/v1/auth/me":{"get":{"tags":["auth"],"summary":"Get Current User Info","operationId":"get_current_user_info_api_v1_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"put":{"tags":["auth"],"summary":"Update Profile","operationId":"update_profile_api_v1_auth_me_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/teaser":{"get":{"tags":["opportunities"],"summary":"Get Landing Teaser","description":"Public, no-auth endpoint used by the marketing landing page.\n\nReturns a small list of the freshest, highest-scored opportunities with\ncontact info masked, plus aggregate stats. Designed to make a visitor say\n\"wait, this is real?\" and click sign-up.","operationId":"get_landing_teaser_api_v1_teaser_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":12,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/opportunities_unified":{"options":{"tags":["opportunities"],"summary":"Options Opportunities Unified","description":"Handle CORS preflight requests","operationId":"options_opportunities_unified_api_v1_opportunities_unified_options","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"get":{"tags":["opportunities"],"summary":"Get Opportunities Unified","description":"Get opportunities from the database for the map / list views.\n\nCapped by `limit` (default 5000, max 25000) so we don't OOM the API\ninstance trying to serialize the entire table — the map clusters render\njust as well from 5k pins as from 137k.","operationId":"get_opportunities_unified_api_v1_opportunities_unified_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"city","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by city (e.g., 'Austin, TX')","title":"City"},"description":"Filter by city (e.g., 'Austin, TX')"},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by state (e.g., 'TX')","title":"State"},"description":"Filter by state (e.g., 'TX')"},{"name":"min_score","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":0,"description":"Minimum score threshold","default":0,"title":"Min Score"},"description":"Minimum score threshold"},{"name":"max_score","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":0,"description":"Maximum score threshold","default":100,"title":"Max Score"},"description":"Maximum score threshold"},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Start date (YYYY-MM-DD)","title":"Start Date"},"description":"Start date (YYYY-MM-DD)"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"End date (YYYY-MM-DD)","title":"End Date"},"description":"End date (YYYY-MM-DD)"},{"name":"days_back","in":"query","required":false,"schema":{"type":"integer","maximum":3650,"minimum":1,"description":"Days back from today (default 365, max 10 years)","default":365,"title":"Days Back"},"description":"Days back from today (default 365, max 10 years)"},{"name":"date_mode","in":"query","required":false,"schema":{"type":"string","description":"Date window: filed (permit issue date), activity (last scrape), or both","default":"filed","title":"Date Mode"},"description":"Date window: filed (permit issue date), activity (last scrape), or both"},{"name":"permit_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by permit type","title":"Permit Type"},"description":"Filter by permit type"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","maximum":100000,"minimum":0,"description":"Pagination offset","default":0,"title":"Offset"},"description":"Pagination offset"},{"name":"include_count","in":"query","required":false,"schema":{"type":"boolean","description":"Include total_matching COUNT (skip for faster map tiles)","default":true,"title":"Include Count"},"description":"Include total_matching COUNT (skip for faster map tiles)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":25000,"minimum":1,"description":"Max opportunities to return","default":5000,"title":"Limit"},"description":"Max opportunities to return"},{"name":"actionable_only","in":"query","required":false,"schema":{"type":"boolean","description":"If true, only rows with validated phone or email+name (sales filter)","default":false,"title":"Actionable Only"},"description":"If true, only rows with validated phone or email+name (sales filter)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/opportunities/{opportunity_id}":{"get":{"tags":["opportunities"],"summary":"Get Opportunity By Id","description":"Get a single opportunity by ID\nFor the detail page /opportunities/[id]\n\nAnonymous users + expired trials get masked contact info (paywall).","operationId":"get_opportunity_by_id_api_v1_opportunities__opportunity_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"opportunity_id","in":"path","required":true,"schema":{"type":"string","title":"Opportunity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/opportunities/":{"get":{"tags":["opportunities-legacy"],"summary":"List Opportunities","operationId":"list_opportunities_api_v1_opportunities__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OpportunityResponse"},"title":"Response List Opportunities Api V1 Opportunities  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/freshness":{"get":{"tags":["freshness"],"summary":"Get Freshness","description":"Get freshness data for cities from database","operationId":"get_freshness_api_v1_freshness_get","parameters":[{"name":"city","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by city (e.g., 'Austin, TX')","title":"City"},"description":"Filter by city (e.g., 'Austin, TX')"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/territories/":{"get":{"tags":["territories"],"summary":"List Territories","operationId":"list_territories_api_v1_territories__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TerritoryResponse"},"type":"array","title":"Response List Territories Api V1 Territories  Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/territories/{territory_id}/claim":{"post":{"tags":["territories"],"summary":"Claim Territory","operationId":"claim_territory_api_v1_territories__territory_id__claim_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"territory_id","in":"path","required":true,"schema":{"type":"string","title":"Territory Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/alerts/preferences":{"get":{"tags":["alerts"],"summary":"Get Alert Preferences","description":"Get user's alert preferences","operationId":"get_alert_preferences_api_v1_alerts_preferences_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertPreferencesResponse"}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"put":{"tags":["alerts"],"summary":"Update Alert Preferences","description":"Update user's alert preferences","operationId":"update_alert_preferences_api_v1_alerts_preferences_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertPreferencesRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertPreferencesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/alerts/digest/send":{"post":{"tags":["alerts"],"summary":"Trigger Daily Digest For User","description":"Manually trigger daily digest for the current user (useful for testing)","operationId":"trigger_daily_digest_for_user_api_v1_alerts_digest_send_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/alerts/digest/send-all":{"post":{"tags":["alerts"],"summary":"Trigger All Daily Digests","description":"Trigger daily digests for ALL users with daily_digest enabled.\n\nIntended for cron schedulers — requires ``X-Cron-Secret``.","operationId":"trigger_all_daily_digests_api_v1_alerts_digest_send_all_post","parameters":[{"name":"X-Cron-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Cron-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/subscription/checkout":{"post":{"tags":["billing"],"summary":"Create Subscription Checkout","description":"Start a Stripe Checkout session for the Pro ($329/mo) or Elite ($799/mo) plan.\n\nRequires STRIPE_PRICE_PRO and STRIPE_PRICE_ELITE to be set in the API\nenvironment. Creates a Stripe customer for the company on first checkout.","operationId":"create_subscription_checkout_api_v1_billing_subscription_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionCheckoutRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/billing/subscription/portal":{"post":{"tags":["billing"],"summary":"Create Subscription Portal","description":"Open Stripe Customer Portal to manage an active subscription.","operationId":"create_subscription_portal_api_v1_billing_subscription_portal_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionPortalRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/billing/territory/checkout":{"post":{"tags":["billing"],"summary":"Create Territory Checkout","description":"Create Stripe checkout session for territory purchase","operationId":"create_territory_checkout_api_v1_billing_territory_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TerritoryCheckoutRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/billing/webhook":{"post":{"tags":["billing"],"summary":"Stripe Webhook","description":"Handle Stripe webhook events.\n\nSubscribed events (configure in Stripe Dashboard):\n  - checkout.session.completed\n  - customer.subscription.created\n  - customer.subscription.updated\n  - customer.subscription.deleted","operationId":"stripe_webhook_api_v1_billing_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/billing-docs/clients":{"get":{"tags":["billing-docs"],"summary":"List Clients","operationId":"list_clients_api_v1_billing_docs_clients_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search name/email/company","title":"Q"},"description":"Search name/email/company"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ClientOut"},"title":"Response List Clients Api V1 Billing Docs Clients Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["billing-docs"],"summary":"Create Client","operationId":"create_client_api_v1_billing_docs_clients_post","security":[{"OAuth2PasswordBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing-docs/clients/{client_id}":{"get":{"tags":["billing-docs"],"summary":"Get Client","operationId":"get_client_api_v1_billing_docs_clients__client_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["billing-docs"],"summary":"Update Client","operationId":"update_client_api_v1_billing_docs_clients__client_id__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["billing-docs"],"summary":"Delete Client","operationId":"delete_client_api_v1_billing_docs_clients__client_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing-docs/docs":{"get":{"tags":["billing-docs"],"summary":"List Docs","operationId":"list_docs_api_v1_billing_docs_docs_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(estimate|invoice|contract)$"},{"type":"null"}],"title":"Kind"}},{"name":"status_in","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated statuses","title":"Status In"},"description":"Comma-separated statuses"},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search number/title/client","title":"Q"},"description":"Search number/title/client"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DocSummary"},"title":"Response List Docs Api V1 Billing Docs Docs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["billing-docs"],"summary":"Create Doc","operationId":"create_doc_api_v1_billing_docs_docs_post","security":[{"OAuth2PasswordBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing-docs/docs/stats":{"get":{"tags":["billing-docs"],"summary":"Doc Stats","operationId":"doc_stats_api_v1_billing_docs_docs_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatsOut"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/billing-docs/docs/{doc_id}":{"get":{"tags":["billing-docs"],"summary":"Get Doc","operationId":"get_doc_api_v1_billing_docs_docs__doc_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"string","title":"Doc Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["billing-docs"],"summary":"Update Doc","operationId":"update_doc_api_v1_billing_docs_docs__doc_id__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"string","title":"Doc Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["billing-docs"],"summary":"Delete Doc","operationId":"delete_doc_api_v1_billing_docs_docs__doc_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"string","title":"Doc Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing-docs/docs/{doc_id}/pdf":{"get":{"tags":["billing-docs"],"summary":"Doc Pdf","operationId":"doc_pdf_api_v1_billing_docs_docs__doc_id__pdf_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"string","title":"Doc Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing-docs/docs/{doc_id}/send":{"post":{"tags":["billing-docs"],"summary":"Send Doc","operationId":"send_doc_api_v1_billing_docs_docs__doc_id__send_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"string","title":"Doc Id"}}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SendBody"}],"default":{"skip_email":false,"skip_payment_link":false},"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing-docs/docs/{doc_id}/convert":{"post":{"tags":["billing-docs"],"summary":"Convert Estimate To Invoice","operationId":"convert_estimate_to_invoice_api_v1_billing_docs_docs__doc_id__convert_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"string","title":"Doc Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing-docs/docs/{doc_id}/void":{"post":{"tags":["billing-docs"],"summary":"Void Doc","operationId":"void_doc_api_v1_billing_docs_docs__doc_id__void_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"string","title":"Doc Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing-docs/docs/{doc_id}/duplicate":{"post":{"tags":["billing-docs"],"summary":"Duplicate Doc","operationId":"duplicate_doc_api_v1_billing_docs_docs__doc_id__duplicate_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"string","title":"Doc Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing-docs/docs/{doc_id}/payments":{"post":{"tags":["billing-docs"],"summary":"Record Payment","operationId":"record_payment_api_v1_billing_docs_docs__doc_id__payments_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"string","title":"Doc Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing-docs/public/{token}":{"get":{"tags":["billing-docs"],"summary":"Public Doc","operationId":"public_doc_api_v1_billing_docs_public__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing-docs/public/{token}/pdf":{"get":{"tags":["billing-docs"],"summary":"Public Doc Pdf","operationId":"public_doc_pdf_api_v1_billing_docs_public__token__pdf_get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing-docs/public/{token}/accept":{"post":{"tags":["billing-docs"],"summary":"Public Accept Estimate","operationId":"public_accept_estimate_api_v1_billing_docs_public__token__accept_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing-docs/public/{token}/decline":{"post":{"tags":["billing-docs"],"summary":"Public Decline Estimate","operationId":"public_decline_estimate_api_v1_billing_docs_public__token__decline_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing-docs/webhook/stripe":{"post":{"tags":["billing-docs"],"summary":"Billing Stripe Webhook","description":"Listen for ``checkout.session.completed`` and apply a Payment\nagainst the matching BillingDocument (by ``metadata.permitiq_doc_id``).","operationId":"billing_stripe_webhook_api_v1_billing_docs_webhook_stripe_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/billing-docs/brand":{"get":{"tags":["billing-docs"],"summary":"Get Company Brand","operationId":"get_company_brand_api_v1_billing_docs_brand_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyBrandOut"}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"put":{"tags":["billing-docs"],"summary":"Update Company Brand","operationId":"update_company_brand_api_v1_billing_docs_brand_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyBrandUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyBrandOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/billing-docs/templates":{"get":{"tags":["billing-docs"],"summary":"List Billing Templates","operationId":"list_billing_templates_api_v1_billing_docs_templates_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(estimate|invoice|contract)$"},{"type":"null"}],"title":"Kind"}},{"name":"region","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":8},{"type":"null"}],"title":"Region"}},{"name":"trade","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Trade"}},{"name":"client_state","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Client State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BillingTemplateOut"},"title":"Response List Billing Templates Api V1 Billing Docs Templates Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["billing-docs"],"summary":"Save Billing Template","operationId":"save_billing_template_api_v1_billing_docs_templates_post","security":[{"OAuth2PasswordBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingTemplateSaveIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingTemplateOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing-docs/templates/{template_id}":{"delete":{"tags":["billing-docs"],"summary":"Delete Billing Template","operationId":"delete_billing_template_api_v1_billing_docs_templates__template_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","title":"Template Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing-docs/craftbot/draft":{"post":{"tags":["billing-docs"],"summary":"Craftbot Draft Billing Doc","operationId":"craftbot_draft_billing_doc_api_v1_billing_docs_craftbot_draft_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CraftbotDraftIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CraftbotDraftOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/scraper/cron":{"post":{"tags":["scraper"],"summary":"Cron Trigger","description":"Secret-protected scraper trigger for external schedulers.\n\nRender cron, cron-job.org, GitHub Actions etc. all support setting\na custom request header. Configure the scheduler with\n`X-Cron-Secret: $CRON_SECRET` and it can fire safely.\n\nReturns 401 if the secret is missing/wrong, 503 if the secret hasn't\nbeen configured on the server (so misconfiguration fails closed).","operationId":"cron_trigger_api_v1_scraper_cron_post","parameters":[{"name":"X-Cron-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Cron-Secret"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"allOf":[{"$ref":"#/components/schemas/Body_cron_trigger_api_v1_scraper_cron_post"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/scraper/run":{"post":{"tags":["scraper"],"summary":"Run Scrapers","description":"Authenticated background scrape trigger.\n\nUsed by the admin dashboard. Anonymous access is no longer allowed\nhere — that path is the cron endpoint.","operationId":"run_scrapers_api_v1_scraper_run_post","requestBody":{"content":{"multipart/form-data":{"schema":{"allOf":[{"$ref":"#/components/schemas/Body_run_scrapers_api_v1_scraper_run_post"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/scraper/run/sync":{"post":{"tags":["scraper"],"summary":"Run Scrapers Sync Endpoint","description":"Synchronous scraper trigger — returns the summary. Admin only.","operationId":"run_scrapers_sync_endpoint_api_v1_scraper_run_sync_post","requestBody":{"content":{"multipart/form-data":{"schema":{"allOf":[{"$ref":"#/components/schemas/Body_run_scrapers_sync_endpoint_api_v1_scraper_run_sync_post"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/scraper/status":{"get":{"tags":["scraper"],"summary":"Scraper Status","description":"Get scraper status and city counts (open endpoint).","operationId":"scraper_status_api_v1_scraper_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/white-label/config":{"get":{"tags":["white-label"],"summary":"Get White Label Config","description":"Get white-label configuration for user's company","operationId":"get_white_label_config_api_v1_white_label_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhiteLabelConfigResponse"}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"put":{"tags":["white-label"],"summary":"Update White Label Config","description":"Update white-label configuration for user's company","operationId":"update_white_label_config_api_v1_white_label_config_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhiteLabelConfigRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhiteLabelConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/enrichment/status":{"get":{"tags":["enrichment"],"summary":"Get Enrichment Status","description":"How many opportunities have been enriched (run through the pipeline at least once).","operationId":"get_enrichment_status_api_v1_enrichment_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/enrichment/run":{"post":{"tags":["enrichment"],"summary":"Run Enrichment","description":"Run the unified contact enrichment pipeline (free tier + optional Places/LLM).\n\nRequires ``X-Cron-Secret`` (schedulers) or an admin session.","operationId":"run_enrichment_api_v1_enrichment_run_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"description":"Max opportunities to enrich","default":100,"title":"Limit"},"description":"Max opportunities to enrich"},{"name":"cities","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Optional city filter, e.g. Houston, TX","title":"Cities"},"description":"Optional city filter, e.g. Houston, TX"},{"name":"use_llm","in":"query","required":false,"schema":{"type":"boolean","description":"After regex + OSM + parcel + open data, optional OpenAI extraction","default":false,"title":"Use Llm"},"description":"After regex + OSM + parcel + open data, optional OpenAI extraction"},{"name":"X-Cron-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Cron-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/enrichment/single/{opportunity_id}":{"post":{"tags":["enrichment"],"summary":"Enrich Single","description":"Run the full enrichment pipeline for one opportunity by UUID.","operationId":"enrich_single_api_v1_enrichment_single__opportunity_id__post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"opportunity_id","in":"path","required":true,"schema":{"type":"string","title":"Opportunity Id"}},{"name":"use_llm","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Use Llm"}},{"name":"X-Cron-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Cron-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/enrichment/sanitize-phones":{"post":{"tags":["enrichment"],"summary":"Sanitize Phones Cron","description":"Clear permit IDs / junk from ``opportunities.phone`` (batched).\n\nRender free tier has no shell — trigger from your machine or GitHub Actions:\n\n    curl -X POST \\\n      -H \"X-Cron-Secret: $CRON_SECRET\" \\\n      \"https://permitiq-api.onrender.com/api/v1/enrichment/sanitize-phones\"\n\nAlso runs automatically on API boot (up to 2000 rows per deploy).","operationId":"sanitize_phones_cron_api_v1_enrichment_sanitize_phones_post","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":25000,"minimum":1,"default":5000,"title":"Limit"}},{"name":"dry_run","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Dry Run"}},{"name":"X-Cron-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Cron-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/enrichment/merge-leads":{"post":{"tags":["enrichment"],"summary":"Merge Enriched Leads","description":"Copy enriched contact fields onto matching production rows (by city + address).\n\nUsed by ``app.scripts.push_enriched_leads`` to land locally enriched\nHouston / Austin / Toronto / Harris County leads on the deployed DB.","operationId":"merge_enriched_leads_api_v1_enrichment_merge_leads_post","parameters":[{"name":"X-Cron-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Cron-Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeLeadsIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/saved-leads":{"get":{"tags":["saved-leads"],"summary":"List Saved Leads","operationId":"list_saved_leads_api_v1_saved_leads_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SavedLeadOut"},"type":"array","title":"Response List Saved Leads Api V1 Saved Leads Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"post":{"tags":["saved-leads"],"summary":"Save Lead","operationId":"save_lead_api_v1_saved_leads_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedLeadIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedLeadOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/saved-leads/{lead_id}":{"delete":{"tags":["saved-leads"],"summary":"Delete Saved Lead","operationId":"delete_saved_lead_api_v1_saved_leads__lead_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string","title":"Lead Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/saved-leads/{lead_id}/status":{"patch":{"tags":["saved-leads"],"summary":"Update Status","operationId":"update_status_api_v1_saved_leads__lead_id__status_patch","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string","title":"Lead Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedLeadOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/saved-leads/{lead_id}/notes":{"patch":{"tags":["saved-leads"],"summary":"Update Notes","operationId":"update_notes_api_v1_saved_leads__lead_id__notes_patch","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string","title":"Lead Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotesUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedLeadOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/saved-leads/sync":{"post":{"tags":["saved-leads"],"summary":"Sync Saved Leads","description":"Bulk upsert from the client. Idempotent — server timestamps win on\nconflicts so re-syncing the same data doesn't reset status/notes.","operationId":"sync_saved_leads_api_v1_saved_leads_sync_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SavedLeadOut"},"type":"array","title":"Response Sync Saved Leads Api V1 Saved Leads Sync Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/saved-leads/{lead_id}/outreach":{"post":{"tags":["saved-leads"],"summary":"Log Outreach","operationId":"log_outreach_api_v1_saved_leads__lead_id__outreach_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string","title":"Lead Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutreachLogIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/hub/jobs":{"get":{"tags":["hub"],"summary":"List Jobs","description":"Public: browse published jobs (with optional filters).","operationId":"list_jobs_api_v1_hub_jobs_get","parameters":[{"name":"trade","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trade"}},{"name":"city","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"zip","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/JobPostOut"},"title":"Response List Jobs Api V1 Hub Jobs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["hub"],"summary":"Create Job","operationId":"create_job_api_v1_hub_jobs_post","security":[{"OAuth2PasswordBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobPostIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobPostOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/hub/jobs/{job_id}":{"get":{"tags":["hub"],"summary":"Get Job","operationId":"get_job_api_v1_hub_jobs__job_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobPostOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/hub/jobs/{job_id}/applications":{"post":{"tags":["hub"],"summary":"Apply To Job","operationId":"apply_to_job_api_v1_hub_jobs__job_id__applications_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/hub/jobs/{job_id}/messages":{"get":{"tags":["hub"],"summary":"List Messages","operationId":"list_messages_api_v1_hub_jobs__job_id__messages_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["hub"],"summary":"Send Message","operationId":"send_message_api_v1_hub_jobs__job_id__messages_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/contractor/me":{"get":{"tags":["contractor"],"summary":"Get My Profile","operationId":"get_my_profile_api_v1_contractor_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractorProfileOut"}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"put":{"tags":["contractor"],"summary":"Update My Profile","operationId":"update_my_profile_api_v1_contractor_me_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractorProfileIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractorProfileOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/contractor/verify/apply":{"post":{"tags":["contractor"],"summary":"Apply For Verification","description":"Submit a Verified Contractor application. Today this stages the\ninformation for staff review; v2 will hit state contractor-board\nAPIs (TX TDLR, CA CSLB, FL DBPR…) automatically.","operationId":"apply_for_verification_api_v1_contractor_verify_apply_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerificationApplyIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractorProfileOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/contractor/verify/{user_id}/grant":{"post":{"tags":["contractor"],"summary":"Admin Grant Verification","description":"Admin / staff-only — flips is_verified=True.","operationId":"admin_grant_verification_api_v1_contractor_verify__user_id__grant_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractorProfileOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agent/status":{"get":{"tags":["agent"],"summary":"Agent Status","description":"Tell the UI which CraftBot capabilities are live in this environment.","operationId":"agent_status_api_v1_agent_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/agent/chat":{"post":{"tags":["agent"],"summary":"Chat","operationId":"chat_api_v1_agent_chat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/agent/messages":{"get":{"tags":["agent"],"summary":"List Messages","operationId":"list_messages_api_v1_agent_messages_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"thread_id","in":"query","required":false,"schema":{"type":"string","default":"default","title":"Thread Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agent/compose":{"post":{"tags":["agent"],"summary":"Compose","operationId":"compose_api_v1_agent_compose_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComposeIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComposeOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/agent/brief":{"get":{"tags":["agent"],"summary":"Get Brief","operationId":"get_brief_api_v1_agent_brief_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/agent/brief/{brief_id}/export":{"get":{"tags":["agent"],"summary":"Export Brief","operationId":"export_brief_api_v1_agent_brief__brief_id__export_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"brief_id","in":"path","required":true,"schema":{"type":"string","title":"Brief Id"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","pattern":"^(docx|pdf)$","default":"docx","title":"Format"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agent/drafts/{draft_id}/send-email":{"post":{"tags":["agent"],"summary":"Send Draft Email","operationId":"send_draft_email_api_v1_agent_drafts__draft_id__send_email_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","title":"Draft Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendEmailIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agent/drafts/{draft_id}/send-sms":{"post":{"tags":["agent"],"summary":"Send Draft Sms","operationId":"send_draft_sms_api_v1_agent_drafts__draft_id__send_sms_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","title":"Draft Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendSmsIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/developer/account":{"get":{"tags":["developer","developer-portal"],"summary":"Developer Account Status","operationId":"developer_account_status_api_v1_developer_account_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/developer/keys":{"get":{"tags":["developer","developer-portal"],"summary":"List Api Keys","operationId":"list_api_keys_api_v1_developer_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"post":{"tags":["developer","developer-portal"],"summary":"Create Api Key","operationId":"create_api_key_api_v1_developer_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateKeyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/developer/keys/{key_id}":{"delete":{"tags":["developer","developer-portal"],"summary":"Revoke Api Key","operationId":"revoke_api_key_api_v1_developer_keys__key_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/developer/usage":{"get":{"tags":["developer","developer-portal"],"summary":"Usage Stats","operationId":"usage_stats_api_v1_developer_usage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/developer/permits/search":{"get":{"tags":["developer","developer"],"summary":"Search Permits","operationId":"search_permits_api_v1_developer_permits_search_get","parameters":[{"name":"city","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"zip","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip"}},{"name":"permit_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Permit Type"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"minValue","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Minvalue"}},{"name":"maxValue","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Maxvalue"}},{"name":"lat","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lat"}},{"name":"lng","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lng"}},{"name":"radius","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":250,"minimum":0.1},{"type":"null"}],"title":"Radius"}},{"name":"dateFrom","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Datefrom"}},{"name":"dateTo","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dateto"}},{"name":"days_back","in":"query","required":false,"schema":{"type":"integer","maximum":3650,"minimum":1,"default":90,"title":"Days Back"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/developer/permits/{permit_id}":{"get":{"tags":["developer","developer"],"summary":"Get Permit","operationId":"get_permit_api_v1_developer_permits__permit_id__get","parameters":[{"name":"permit_id","in":"path","required":true,"schema":{"type":"string","title":"Permit Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/developer/activity/feed":{"get":{"tags":["developer","developer"],"summary":"Activity Feed","operationId":"activity_feed_api_v1_developer_activity_feed_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"city","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/developer/leads/score":{"get":{"tags":["developer","developer"],"summary":"Lead Score","operationId":"lead_score_api_v1_developer_leads_score_get","parameters":[{"name":"permitId","in":"query","required":true,"schema":{"type":"string","title":"Permitid"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/developer/contractors/search":{"get":{"tags":["developer","developer"],"summary":"Search Contractors","description":"Aggregates enriched business contacts from permit records (not a separate CRM).","operationId":"search_contractors_api_v1_developer_contractors_search_get","parameters":[{"name":"city","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"}},{"name":"specialty","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Specialty"}},{"name":"minPermits","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Minpermits"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Limit"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/developer/contractors/{contractor_id}":{"get":{"tags":["developer","developer"],"summary":"Get Contractor","operationId":"get_contractor_api_v1_developer_contractors__contractor_id__get","parameters":[{"name":"contractor_id","in":"path","required":true,"schema":{"type":"string","title":"Contractor Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/developer/webhooks":{"get":{"tags":["developer","developer-portal"],"summary":"List Webhooks Portal","operationId":"list_webhooks_portal_api_v1_developer_webhooks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"post":{"tags":["developer","developer-portal"],"summary":"Register Webhook Portal","operationId":"register_webhook_portal_api_v1_developer_webhooks_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalWebhookRegisterRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/developer/webhooks/{webhook_id}/portal":{"delete":{"tags":["developer","developer-portal"],"summary":"Delete Webhook Portal","operationId":"delete_webhook_portal_api_v1_developer_webhooks__webhook_id__portal_delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/developer/webhooks/test-portal":{"post":{"tags":["developer","developer-portal"],"summary":"Test Webhook Portal","operationId":"test_webhook_portal_api_v1_developer_webhooks_test_portal_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/developer/webhooks/register":{"post":{"tags":["developer","developer"],"summary":"Register Webhook","operationId":"register_webhook_api_v1_developer_webhooks_register_post","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookRegisterRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/developer/webhooks/{webhook_id}":{"delete":{"tags":["developer","developer"],"summary":"Delete Webhook","operationId":"delete_webhook_api_v1_developer_webhooks__webhook_id__delete","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/developer/webhooks/test":{"post":{"tags":["developer","developer"],"summary":"Test Webhook","operationId":"test_webhook_api_v1_developer_webhooks_test_post","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/developer/analytics/heatmap":{"get":{"tags":["developer","developer"],"summary":"Activity Heatmap","operationId":"activity_heatmap_api_v1_developer_analytics_heatmap_get","parameters":[{"name":"city","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"}},{"name":"days_back","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days Back"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/developer/analytics/zip-velocity":{"get":{"tags":["developer","developer"],"summary":"Zip Velocity","operationId":"zip_velocity_api_v1_developer_analytics_zip_velocity_get","parameters":[{"name":"city","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"}},{"name":"days_back","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":7,"default":90,"title":"Days Back"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/developer/postman":{"get":{"tags":["developer","developer"],"summary":"Postman Collection","description":"Postman collection for Developer API endpoints.","operationId":"postman_collection_api_v1_developer_postman_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/developer/docs":{"get":{"tags":["developer","developer"],"summary":"Developer Docs Redirect","description":"Points integrators to the live OpenAPI spec (Swagger UI on the API host).","operationId":"developer_docs_redirect_api_v1_developer_docs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/":{"get":{"summary":"Root","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/test-cors":{"get":{"summary":"Test Cors","operationId":"test_cors_test_cors_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AlertPreferencesRequest":{"properties":{"real_time":{"type":"boolean","title":"Real Time","default":true},"daily_digest":{"type":"boolean","title":"Daily Digest","default":true},"permit_types":{"items":{"type":"string"},"type":"array","title":"Permit Types","default":[]},"value_threshold":{"type":"integer","title":"Value Threshold","default":10000},"push_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Push Token"}},"type":"object","title":"AlertPreferencesRequest"},"AlertPreferencesResponse":{"properties":{"real_time":{"type":"boolean","title":"Real Time"},"daily_digest":{"type":"boolean","title":"Daily Digest"},"permit_types":{"items":{"type":"string"},"type":"array","title":"Permit Types"},"value_threshold":{"type":"integer","title":"Value Threshold"},"push_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Push Token"}},"type":"object","required":["real_time","daily_digest","permit_types","value_threshold"],"title":"AlertPreferencesResponse"},"ApplicationIn":{"properties":{"bid_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Bid Amount"},"timeline_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Timeline Days"},"cover_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cover Message"}},"type":"object","title":"ApplicationIn"},"BillingTemplateLineIn":{"properties":{"description":{"type":"string","title":"Description","default":""},"quantity_thousandths":{"type":"integer","title":"Quantity Thousandths","default":1000},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"},"unit_price_cents":{"type":"integer","title":"Unit Price Cents","default":0},"taxable":{"type":"boolean","title":"Taxable","default":true}},"type":"object","title":"BillingTemplateLineIn"},"BillingTemplateOut":{"properties":{"id":{"type":"string","title":"Id"},"label":{"type":"string","title":"Label"},"kind":{"type":"string","title":"Kind"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"trade":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trade"},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"},"region_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region Label"},"title":{"type":"string","title":"Title"},"terms":{"type":"string","title":"Terms"},"currency":{"type":"string","title":"Currency"},"tax_rate_bps":{"type":"integer","title":"Tax Rate Bps"},"line_items":{"items":{"$ref":"#/components/schemas/BillingTemplateLineIn"},"type":"array","title":"Line Items"},"is_custom":{"type":"boolean","title":"Is Custom","default":false}},"type":"object","required":["id","label","kind","title","terms","currency","tax_rate_bps","line_items"],"title":"BillingTemplateOut"},"BillingTemplateSaveIn":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"label":{"type":"string","maxLength":120,"minLength":1,"title":"Label"},"kind":{"type":"string","enum":["estimate","invoice","contract"],"title":"Kind"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"trade":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trade"},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"terms":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Terms"},"currency":{"type":"string","title":"Currency","default":"USD"},"tax_rate_bps":{"type":"integer","title":"Tax Rate Bps","default":0},"line_items":{"items":{"$ref":"#/components/schemas/BillingTemplateLineIn"},"type":"array","title":"Line Items"}},"type":"object","required":["label","kind"],"title":"BillingTemplateSaveIn"},"Body_cron_trigger_api_v1_scraper_cron_post":{"properties":{"city_ids":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"City Ids"}},"type":"object","title":"Body_cron_trigger_api_v1_scraper_cron_post"},"Body_login_api_v1_auth_login_post":{"properties":{"grant_type":{"anyOf":[{"type":"string","pattern":"password"},{"type":"null"}],"title":"Grant Type"},"username":{"type":"string","title":"Username"},"password":{"type":"string","title":"Password"},"scope":{"type":"string","title":"Scope","default":""},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret"}},"type":"object","required":["username","password"],"title":"Body_login_api_v1_auth_login_post"},"Body_run_scrapers_api_v1_scraper_run_post":{"properties":{"city_ids":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"City Ids"}},"type":"object","title":"Body_run_scrapers_api_v1_scraper_run_post"},"Body_run_scrapers_sync_endpoint_api_v1_scraper_run_sync_post":{"properties":{"city_ids":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"City Ids"}},"type":"object","title":"Body_run_scrapers_sync_endpoint_api_v1_scraper_run_sync_post"},"ChatIn":{"properties":{"message":{"type":"string","title":"Message"},"thread_id":{"type":"string","title":"Thread Id","default":"default"}},"type":"object","required":["message"],"title":"ChatIn"},"ChatOut":{"properties":{"message":{"type":"string","title":"Message"},"thread_id":{"type":"string","title":"Thread Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["message","thread_id","created_at"],"title":"ChatOut"},"ClientCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"address_line1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line1"},"address_line2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line2"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"postal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postal Code"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country","default":"US"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["name"],"title":"ClientCreate"},"ClientOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"address_line1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line1"},"address_line2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line2"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"postal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postal Code"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","company_name","email","phone","address_line1","address_line2","city","state","postal_code","country","notes","created_at","updated_at"],"title":"ClientOut"},"ClientUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"address_line1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line1"},"address_line2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line2"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"postal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postal Code"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country","default":"US"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"ClientUpdate"},"CompanyBrandOut":{"properties":{"company_name":{"type":"string","title":"Company Name"},"contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Email"},"contact_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Phone"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"}},"type":"object","required":["company_name"],"title":"CompanyBrandOut"},"CompanyBrandUpdate":{"properties":{"company_name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Company Name"},"contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Email"},"contact_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Phone"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"}},"type":"object","title":"CompanyBrandUpdate"},"ComposeIn":{"properties":{"channel":{"type":"string","title":"Channel"},"opportunity":{"type":"object","title":"Opportunity"},"saved_lead_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Saved Lead Id"}},"type":"object","required":["channel","opportunity"],"title":"ComposeIn"},"ComposeOut":{"properties":{"id":{"type":"string","title":"Id"},"channel":{"type":"string","title":"Channel"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"},"body":{"type":"string","title":"Body"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","channel","subject","body","created_at"],"title":"ComposeOut"},"ContractorProfileIn":{"properties":{"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"bio":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bio"},"primary_trade_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Trade Id"},"additional_trade_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Additional Trade Ids"},"service_zips":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Service Zips"},"service_radius_miles":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Service Radius Miles"},"target_ticket_min":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Target Ticket Min"},"target_ticket_max":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Target Ticket Max"},"years_experience":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Years Experience"},"crew_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Crew Size"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"}},"type":"object","title":"ContractorProfileIn"},"ContractorProfileOut":{"properties":{"user_id":{"type":"string","title":"User Id"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"bio":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bio"},"primary_trade_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Trade Id"},"additional_trade_ids":{"items":{"type":"string"},"type":"array","title":"Additional Trade Ids"},"service_zips":{"items":{"type":"string"},"type":"array","title":"Service Zips"},"service_radius_miles":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Service Radius Miles"},"target_ticket_min":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Target Ticket Min"},"target_ticket_max":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Target Ticket Max"},"years_experience":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Years Experience"},"crew_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Crew Size"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"license_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"License Number"},"license_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"License State"},"insurance_carrier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Insurance Carrier"},"is_verified":{"type":"boolean","title":"Is Verified"},"verified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Verified At"},"plan_tier":{"type":"string","title":"Plan Tier"},"plan_status":{"type":"string","title":"Plan Status"},"is_staff":{"type":"boolean","title":"Is Staff"}},"type":"object","required":["user_id","full_name","bio","primary_trade_id","additional_trade_ids","service_zips","service_radius_miles","target_ticket_min","target_ticket_max","years_experience","crew_size","website","phone","license_number","license_state","insurance_carrier","is_verified","verified_at","plan_tier","plan_status","is_staff"],"title":"ContractorProfileOut"},"CraftbotDraftIn":{"properties":{"kind":{"type":"string","enum":["estimate","invoice","contract"],"title":"Kind"},"template_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Id"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"project_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Address"},"client_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Name"},"client_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client State"},"trade":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trade"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["kind"],"title":"CraftbotDraftIn"},"CraftbotDraftOut":{"properties":{"title":{"type":"string","title":"Title"},"terms":{"type":"string","title":"Terms"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"currency":{"type":"string","title":"Currency"},"tax_rate_bps":{"type":"integer","title":"Tax Rate Bps"},"line_items":{"items":{"$ref":"#/components/schemas/BillingTemplateLineIn"},"type":"array","title":"Line Items"},"provider":{"type":"string","title":"Provider"},"region":{"type":"string","title":"Region"}},"type":"object","required":["title","terms","currency","tax_rate_bps","line_items","provider","region"],"title":"CraftbotDraftOut"},"CreateKeyRequest":{"properties":{"name":{"type":"string","maxLength":120,"title":"Name","default":"Production"}},"type":"object","title":"CreateKeyRequest"},"DocCreate":{"properties":{"kind":{"type":"string","enum":["estimate","invoice","contract"],"title":"Kind","default":"estimate"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"opportunity_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Opportunity Key"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"project_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Address"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"terms":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Terms"},"currency":{"type":"string","title":"Currency","default":"USD"},"discount_cents":{"type":"integer","title":"Discount Cents","default":0},"tax_rate_bps":{"type":"integer","title":"Tax Rate Bps","default":0},"issue_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Issue Date"},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"},"valid_until":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Valid Until"},"line_items":{"items":{"$ref":"#/components/schemas/LineItemIn"},"type":"array","title":"Line Items"}},"type":"object","title":"DocCreate"},"DocOut":{"properties":{"id":{"type":"string","title":"Id"},"kind":{"type":"string","title":"Kind"},"number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Number"},"status":{"type":"string","title":"Status"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client":{"anyOf":[{"$ref":"#/components/schemas/ClientOut"},{"type":"null"}]},"opportunity_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Opportunity Key"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"project_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Address"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"terms":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Terms"},"currency":{"type":"string","title":"Currency"},"subtotal_cents":{"type":"integer","title":"Subtotal Cents"},"discount_cents":{"type":"integer","title":"Discount Cents"},"tax_rate_bps":{"type":"integer","title":"Tax Rate Bps"},"tax_cents":{"type":"integer","title":"Tax Cents"},"total_cents":{"type":"integer","title":"Total Cents"},"amount_paid_cents":{"type":"integer","title":"Amount Paid Cents"},"amount_due_cents":{"type":"integer","title":"Amount Due Cents"},"issue_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Issue Date"},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"},"valid_until":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Valid Until"},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sent At"},"viewed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Viewed At"},"accepted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Accepted At"},"declined_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Declined At"},"paid_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Paid At"},"voided_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Voided At"},"line_items":{"items":{"$ref":"#/components/schemas/LineItemOut"},"type":"array","title":"Line Items"},"payments":{"items":{"$ref":"#/components/schemas/PaymentOut"},"type":"array","title":"Payments"},"public_token":{"type":"string","title":"Public Token"},"public_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Url"},"stripe_payment_link_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Payment Link Url"},"converted_to_invoice_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Converted To Invoice Id"},"converted_from_estimate_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Converted From Estimate Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","kind","number","status","client_id","client","opportunity_key","title","project_address","notes","terms","currency","subtotal_cents","discount_cents","tax_rate_bps","tax_cents","total_cents","amount_paid_cents","amount_due_cents","issue_date","due_date","valid_until","sent_at","viewed_at","accepted_at","declined_at","paid_at","voided_at","line_items","payments","public_token","public_url","stripe_payment_link_url","converted_to_invoice_id","converted_from_estimate_id","created_at","updated_at"],"title":"DocOut"},"DocSummary":{"properties":{"id":{"type":"string","title":"Id"},"kind":{"type":"string","title":"Kind"},"number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Number"},"status":{"type":"string","title":"Status"},"client_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Name"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"total_cents":{"type":"integer","title":"Total Cents"},"amount_due_cents":{"type":"integer","title":"Amount Due Cents"},"currency":{"type":"string","title":"Currency"},"issue_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Issue Date"},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","kind","number","status","client_name","title","total_cents","amount_due_cents","currency","issue_date","due_date","updated_at"],"title":"DocSummary","description":"Lighter-weight representation for list views."},"DocUpdate":{"properties":{"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"project_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Address"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"terms":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Terms"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"discount_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Discount Cents"},"tax_rate_bps":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tax Rate Bps"},"issue_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Issue Date"},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"},"valid_until":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Valid Until"},"line_items":{"anyOf":[{"items":{"$ref":"#/components/schemas/LineItemIn"},"type":"array"},{"type":"null"}],"title":"Line Items"}},"type":"object","title":"DocUpdate"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"JobPostIn":{"properties":{"title":{"type":"string","maxLength":200,"title":"Title"},"description":{"type":"string","title":"Description"},"primary_trade_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Trade Id"},"additional_trade_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Additional Trade Ids"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"zip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip"},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latitude"},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Longitude"},"budget_min":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Budget Min"},"budget_max":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Budget Max"},"timeline":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timeline"},"poster_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Poster Name"},"poster_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Poster Email"},"poster_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Poster Phone"},"is_verified_only":{"type":"boolean","title":"Is Verified Only","default":false},"photos":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Photos"}},"type":"object","required":["title","description"],"title":"JobPostIn"},"JobPostOut":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description"},"primary_trade_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Trade Id"},"additional_trade_ids":{"items":{"type":"string"},"type":"array","title":"Additional Trade Ids"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"zip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip"},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latitude"},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Longitude"},"budget_min":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Budget Min"},"budget_max":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Budget Max"},"timeline":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timeline"},"status":{"type":"string","title":"Status"},"is_published":{"type":"boolean","title":"Is Published"},"is_verified_only":{"type":"boolean","title":"Is Verified Only"},"photos":{"items":{"type":"string"},"type":"array","title":"Photos"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","title","description","primary_trade_id","additional_trade_ids","address","city","state","zip","latitude","longitude","budget_min","budget_max","timeline","status","is_published","is_verified_only","photos","created_at","updated_at"],"title":"JobPostOut"},"LineItemIn":{"properties":{"description":{"type":"string","title":"Description","default":""},"quantity_thousandths":{"type":"integer","title":"Quantity Thousandths","default":1000},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"},"unit_price_cents":{"type":"integer","title":"Unit Price Cents","default":0},"taxable":{"type":"boolean","title":"Taxable","default":true}},"type":"object","title":"LineItemIn"},"LineItemOut":{"properties":{"description":{"type":"string","title":"Description","default":""},"quantity_thousandths":{"type":"integer","title":"Quantity Thousandths","default":1000},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"},"unit_price_cents":{"type":"integer","title":"Unit Price Cents","default":0},"taxable":{"type":"boolean","title":"Taxable","default":true},"id":{"type":"string","title":"Id"},"position":{"type":"integer","title":"Position"},"line_total_cents":{"type":"integer","title":"Line Total Cents"}},"type":"object","required":["id","position","line_total_cents"],"title":"LineItemOut"},"MergeLeadRow":{"properties":{"city":{"type":"string","title":"City"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"business_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Name"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"owner_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Name"},"contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Name"},"contact_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Title"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"is_residential":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Is Residential"},"enriched_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Enriched At"}},"type":"object","required":["city"],"title":"MergeLeadRow"},"MergeLeadsIn":{"properties":{"leads":{"items":{"$ref":"#/components/schemas/MergeLeadRow"},"type":"array","maxItems":500,"title":"Leads"},"dry_run":{"type":"boolean","title":"Dry Run","default":false},"force_phones":{"type":"boolean","title":"Force Phones","default":false}},"type":"object","required":["leads"],"title":"MergeLeadsIn"},"MessageIn":{"properties":{"body":{"type":"string","title":"Body"},"recipient_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipient User Id"}},"type":"object","required":["body"],"title":"MessageIn"},"NotesUpdate":{"properties":{"notes":{"type":"string","title":"Notes"}},"type":"object","required":["notes"],"title":"NotesUpdate"},"OpportunityResponse":{"properties":{"id":{"type":"string","title":"Id"},"source":{"type":"string","title":"Source"},"zip":{"type":"string","title":"Zip"},"trade":{"type":"string","title":"Trade"},"description":{"type":"string","title":"Description"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"estimated_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Estimated Value"},"score":{"type":"integer","title":"Score"},"permit_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Permit Type"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"filing_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Filing Date"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","source","zip","trade","description","address","estimated_value","score","permit_type","status","filing_date","created_at"],"title":"OpportunityResponse"},"OutreachLogIn":{"properties":{"channel":{"type":"string","title":"Channel"},"direction":{"type":"string","title":"Direction","default":"outbound"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"},"occurred_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Occurred At"}},"type":"object","required":["channel"],"title":"OutreachLogIn"},"PaymentIn":{"properties":{"amount_cents":{"type":"integer","exclusiveMinimum":0,"title":"Amount Cents"},"method":{"type":"string","enum":["card","check","cash","ach","other"],"title":"Method","default":"other"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"paid_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Paid At"}},"type":"object","required":["amount_cents"],"title":"PaymentIn"},"PaymentOut":{"properties":{"id":{"type":"string","title":"Id"},"amount_cents":{"type":"integer","title":"Amount Cents"},"method":{"type":"string","title":"Method"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"paid_at":{"type":"string","format":"date-time","title":"Paid At"}},"type":"object","required":["id","amount_cents","method","reference","note","paid_at"],"title":"PaymentOut"},"PortalWebhookRegisterRequest":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"event_types":{"items":{"type":"string"},"type":"array","title":"Event Types"}},"type":"object","required":["url"],"title":"PortalWebhookRegisterRequest"},"ProfileUpdateRequest":{"properties":{"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company"}},"type":"object","title":"ProfileUpdateRequest"},"RegisterResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"email_verified":{"type":"boolean","title":"Email Verified","default":false},"email":{"type":"string","format":"email","title":"Email"},"verification_email_sent":{"type":"boolean","title":"Verification Email Sent","default":false}},"type":"object","required":["access_token","email"],"title":"RegisterResponse"},"ResendVerificationRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"ResendVerificationRequest"},"ResendVerificationResponse":{"properties":{"ok":{"type":"boolean","title":"Ok","default":true},"cooldown_seconds":{"type":"integer","title":"Cooldown Seconds","default":60},"verification_email_sent":{"type":"boolean","title":"Verification Email Sent","default":false}},"type":"object","title":"ResendVerificationResponse"},"SavedLeadIn":{"properties":{"opportunity_key":{"type":"string","title":"Opportunity Key","description":"DB id or synthetic signature for the opportunity"},"snapshot":{"type":"object","title":"Snapshot","description":"Frozen snapshot of the opportunity"},"status":{"type":"string","title":"Status","default":"new"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes","default":""},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"follow_up_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Follow Up At"}},"type":"object","required":["opportunity_key","snapshot"],"title":"SavedLeadIn"},"SavedLeadOut":{"properties":{"id":{"type":"string","title":"Id"},"opportunity_key":{"type":"string","title":"Opportunity Key"},"snapshot":{"type":"object","title":"Snapshot"},"status":{"type":"string","title":"Status"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"follow_up_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Follow Up At"},"saved_at":{"type":"string","format":"date-time","title":"Saved At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","opportunity_key","snapshot","status","notes","tags","follow_up_at","saved_at","updated_at"],"title":"SavedLeadOut"},"SendBody":{"properties":{"to_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"To Email"},"cc":{"anyOf":[{"items":{"type":"string","format":"email"},"type":"array"},{"type":"null"}],"title":"Cc"},"skip_email":{"type":"boolean","title":"Skip Email","default":false},"skip_payment_link":{"type":"boolean","title":"Skip Payment Link","default":false}},"type":"object","title":"SendBody"},"SendEmailIn":{"properties":{"to_email":{"type":"string","format":"email","title":"To Email"},"attach_leads_docx":{"type":"boolean","title":"Attach Leads Docx","default":false}},"type":"object","required":["to_email"],"title":"SendEmailIn"},"SendSmsIn":{"properties":{"to_phone":{"type":"string","title":"To Phone"}},"type":"object","required":["to_phone"],"title":"SendSmsIn"},"StatsOut":{"properties":{"estimates_open_cents":{"type":"integer","title":"Estimates Open Cents"},"estimates_open_count":{"type":"integer","title":"Estimates Open Count"},"invoices_outstanding_cents":{"type":"integer","title":"Invoices Outstanding Cents"},"invoices_outstanding_count":{"type":"integer","title":"Invoices Outstanding Count"},"invoices_overdue_cents":{"type":"integer","title":"Invoices Overdue Cents"},"invoices_overdue_count":{"type":"integer","title":"Invoices Overdue Count"},"paid_last_30d_cents":{"type":"integer","title":"Paid Last 30D Cents"}},"type":"object","required":["estimates_open_cents","estimates_open_count","invoices_outstanding_cents","invoices_outstanding_count","invoices_overdue_cents","invoices_overdue_count","paid_last_30d_cents"],"title":"StatsOut"},"StatusUpdate":{"properties":{"status":{"type":"string","title":"Status"}},"type":"object","required":["status"],"title":"StatusUpdate"},"SubscriptionCheckoutRequest":{"properties":{"plan":{"type":"string","enum":["pro","elite","developer"],"title":"Plan"},"success_url":{"type":"string","title":"Success Url"},"cancel_url":{"type":"string","title":"Cancel Url"}},"type":"object","required":["plan","success_url","cancel_url"],"title":"SubscriptionCheckoutRequest"},"SubscriptionPortalRequest":{"properties":{"return_url":{"type":"string","title":"Return Url"}},"type":"object","required":["return_url"],"title":"SubscriptionPortalRequest"},"SyncRequest":{"properties":{"leads":{"items":{"$ref":"#/components/schemas/SavedLeadIn"},"type":"array","title":"Leads"}},"type":"object","required":["leads"],"title":"SyncRequest"},"TerritoryCheckoutRequest":{"properties":{"territory_id":{"type":"string","title":"Territory Id"},"success_url":{"type":"string","title":"Success Url"},"cancel_url":{"type":"string","title":"Cancel Url"}},"type":"object","required":["territory_id","success_url","cancel_url"],"title":"TerritoryCheckoutRequest"},"TerritoryResponse":{"properties":{"id":{"type":"string","title":"Id"},"zip":{"type":"string","title":"Zip"},"trade":{"type":"string","title":"Trade"},"status":{"type":"string","title":"Status"},"locked_by_company_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Locked By Company Id"},"monthly_price":{"type":"integer","title":"Monthly Price"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","zip","trade","status","locked_by_company_id","monthly_price","created_at","updated_at"],"title":"TerritoryResponse"},"TokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"}},"type":"object","required":["access_token"],"title":"TokenResponse"},"UserRegister":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"},"company_name":{"type":"string","title":"Company Name"},"referral_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referral Source"},"referral_city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referral City"},"utm_campaign":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Campaign"},"utm_medium":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Medium"},"utm_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Content"}},"type":"object","required":["email","password","company_name"],"title":"UserRegister"},"UserResponse":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"company_id":{"type":"string","title":"Company Id"},"subscription_status":{"type":"string","title":"Subscription Status"},"trial_ends_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trial Ends At"},"trial_days_remaining":{"type":"integer","title":"Trial Days Remaining"},"has_active_access":{"type":"boolean","title":"Has Active Access"},"is_admin":{"type":"boolean","title":"Is Admin"},"email_verified":{"type":"boolean","title":"Email Verified"},"needs_verification":{"type":"boolean","title":"Needs Verification","default":false},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company"},"is_verified":{"type":"boolean","title":"Is Verified","default":false},"plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan"}},"type":"object","required":["id","email","company_id","subscription_status","trial_days_remaining","has_active_access","is_admin","email_verified"],"title":"UserResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VerificationApplyIn":{"properties":{"license_number":{"type":"string","minLength":2,"title":"License Number"},"license_state":{"type":"string","maxLength":8,"minLength":2,"title":"License State"},"license_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"License Expires At"},"insurance_carrier":{"type":"string","title":"Insurance Carrier"},"insurance_policy_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Insurance Policy Number"},"insurance_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Insurance Expires At"},"insurance_doc_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Insurance Doc Url"}},"type":"object","required":["license_number","license_state","insurance_carrier"],"title":"VerificationApplyIn"},"VerifyEmailRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"code":{"type":"string","title":"Code"}},"type":"object","required":["email","code"],"title":"VerifyEmailRequest"},"VerifyEmailResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"email_verified":{"type":"boolean","title":"Email Verified","default":true},"trial_days_remaining":{"type":"integer","title":"Trial Days Remaining"},"user":{"type":"object","title":"User"}},"type":"object","required":["access_token","trial_days_remaining","user"],"title":"VerifyEmailResponse"},"WebhookRegisterRequest":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"event_types":{"items":{"type":"string"},"type":"array","title":"Event Types"}},"type":"object","required":["url"],"title":"WebhookRegisterRequest"},"WhiteLabelConfigRequest":{"properties":{"app_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"App Name"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"},"primary_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Color"},"email_branding":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Branding"}},"type":"object","title":"WhiteLabelConfigRequest"},"WhiteLabelConfigResponse":{"properties":{"app_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"App Name"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"},"primary_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Color"},"email_branding":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Branding"}},"type":"object","required":["app_name","logo_url","primary_color","email_branding"],"title":"WhiteLabelConfigResponse"}},"securitySchemes":{"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"/api/v1/auth/login"}}}}}}