{"openapi": "3.1.0", "info": {"title": "LoanFlo API", "version": "1.0.0", "description": "Voice-First AI Mortgage Platform"}, "paths": {"/api/v1/lucy/ping": {"get": {"operationId": "src_apps_lucy_api_ping", "summary": "Ping", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PingOut"}}}}}, "tags": ["Lucy"]}}, "/api/v1/lucy/browser/result": {"post": {"operationId": "src_apps_lucy_api_browser_result", "summary": "Browser Result", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PingOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrOut"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrOut"}}}}}, "description": "Fulfill a pending Chrome action. JWT user/org must match the waiter.", "tags": ["Lucy"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/BrowserResultIn"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/lucy/browser/file": {"get": {"operationId": "src_apps_lucy_api_browser_file", "summary": "Browser File", "parameters": [{"in": "query", "name": "thread_id", "schema": {"title": "Thread Id", "type": "string"}, "required": true}, {"in": "query", "name": "request_id", "schema": {"title": "Request Id", "type": "string"}, "required": true}, {"in": "query", "name": "doc_id", "schema": {"default": "", "title": "Doc Id", "type": "string"}, "required": false}], "responses": {"200": {"description": "OK"}}, "description": "One-time fetch of a MISMO export or a loan document. JWT must match.", "tags": ["Lucy"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/lucy/token": {"get": {"operationId": "src_apps_lucy_api_get_token", "summary": "Get Token", "parameters": [{"in": "query", "name": "thread_id", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Thread Id"}, "required": false}, {"in": "query", "name": "contact_id", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Contact Id"}, "required": false}, {"in": "query", "name": "fresh", "schema": {"default": false, "title": "Fresh", "type": "boolean"}, "required": false}, {"in": "query", "name": "client_id", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Client Id"}, "required": false}, {"in": "query", "name": "client", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Client"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TokenOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrOut"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrOut"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrOut"}}}}}, "description": "Generates a LiveKit Access Token for the authenticated user.\nThis token allows the frontend to connect to the Voice/Chat Room.\nIf contact_id is provided, it connects to the conversation for that contact.\nIf thread_id is provided, it connects to that specific conversation.\nOtherwise, it creates a new conversation.\nIf fresh=True, clears existing session state for a clean start.\nclient=extension is the Chrome panel. Omit for CRM. Distinct from client_id\n(LiveKit participant identity).", "tags": ["Lucy"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/lucy/history/{thread_id}": {"get": {"operationId": "src_apps_lucy_api_get_history", "summary": "Get History", "parameters": [{"in": "path", "name": "thread_id", "schema": {"title": "Thread Id", "type": "string"}, "required": true}, {"in": "query", "name": "include_internal", "schema": {"default": false, "title": "Include Internal", "type": "boolean"}, "required": false}, {"in": "query", "name": "limit", "schema": {"default": 50, "title": "Limit", "type": "integer"}, "required": false}, {"in": "query", "name": "before_ts", "schema": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Before Ts"}, "required": false}, {"in": "query", "name": "active_turn_only", "schema": {"default": false, "title": "Active Turn Only", "type": "boolean"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HistoryOut"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrOut"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrOut"}}}}}, "description": "Retrieves the chat history for a given thread.\nPass active_turn_only=true on reconnect to fetch only the in-flight turn.", "tags": ["Lucy"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/lucy/view/{thread_id}": {"get": {"operationId": "src_apps_lucy_api_get_view", "summary": "Get View", "parameters": [{"in": "path", "name": "thread_id", "schema": {"title": "Thread Id", "type": "string"}, "required": true}, {"in": "query", "name": "include_internal", "schema": {"default": false, "title": "Include Internal", "type": "boolean"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThreadViewOut"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrOut"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrOut"}}}}}, "description": "Return a typed thread view for transcript surfaces.", "tags": ["Lucy"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/lucy/threads": {"get": {"operationId": "src_apps_lucy_api_list_threads", "summary": "List Threads", "parameters": [{"in": "query", "name": "page", "schema": {"default": 1, "title": "Page", "type": "integer"}, "required": false}, {"in": "query", "name": "limit", "schema": {"default": 20, "title": "Limit", "type": "integer"}, "required": false}, {"in": "query", "name": "search", "schema": {"default": "", "title": "Search", "type": "string"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThreadListOut"}}}}}, "description": "List conversation threads for the current user, newest first.", "tags": ["Lucy"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/lucy/conversations": {"get": {"operationId": "src_apps_lucy_api_list_convos", "summary": "List Convos", "parameters": [{"in": "query", "name": "page", "schema": {"default": 1, "title": "Page", "type": "integer"}, "required": false}, {"in": "query", "name": "limit", "schema": {"default": 50, "title": "Limit", "type": "integer"}, "required": false}, {"in": "query", "name": "channel", "schema": {"default": "", "title": "Channel", "type": "string"}, "required": false}, {"in": "query", "name": "flow", "schema": {"default": "", "title": "Flow", "type": "string"}, "required": false}, {"in": "query", "name": "contact_id", "schema": {"default": "", "title": "Contact Id", "type": "string"}, "required": false}, {"in": "query", "name": "range_key", "schema": {"default": "day", "title": "Range Key", "type": "string"}, "required": false}, {"in": "query", "name": "start_date", "schema": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "Start Date"}, "required": false}, {"in": "query", "name": "end_date", "schema": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "End Date"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ConvPageOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrOut"}}}}}, "tags": ["Lucy"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/lucy/config": {"get": {"operationId": "src_apps_lucy_api_get_lucy_config", "summary": "Get Lucy Config", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LucyConfigOut"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrOut"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrOut"}}}}}, "description": "Get the global configuration for Lucy (Identity, Voice, Prompts, Channels).\nOnly accessible by Org Admins/Owners.", "tags": ["Lucy"], "security": [{"NinjaJWTAuth": []}]}, "post": {"operationId": "src_apps_lucy_api_update_lucy_config", "summary": "Update Lucy Config", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LucyConfigOut"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrOut"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrOut"}}}}}, "description": "Update Lucy's configuration.", "tags": ["Lucy"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/LucyConfigUpdate"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/lucy/user-prompt": {"get": {"operationId": "src_apps_lucy_api_get_user_prompt", "summary": "Get User Prompt", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserPromptOut"}}}}}, "description": "Get the current user's personal AI prompt.", "tags": ["Lucy"], "security": [{"NinjaJWTAuth": []}]}, "put": {"operationId": "src_apps_lucy_api_update_user_prompt", "summary": "Update User Prompt", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserPromptOut"}}}}}, "description": "Update the current user's personal AI prompt.", "tags": ["Lucy"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserPromptUpdate"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/lucy/widget/config/{widget_id}": {"get": {"operationId": "src_apps_lucy_api_get_widget_config", "summary": "Get Widget Config", "parameters": [{"in": "path", "name": "widget_id", "schema": {"title": "Widget Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WidgetConfigOut"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrOut"}}}}}, "description": "Public \u2014 returns widget customization for initial button render.", "tags": ["Lucy"]}}, "/api/v1/lucy/widget/token": {"get": {"operationId": "src_apps_lucy_api_get_widget_token", "summary": "Get Widget Token", "parameters": [{"in": "query", "name": "widget_id", "schema": {"title": "Widget Id", "type": "string"}, "required": true}, {"in": "query", "name": "visitor_id", "schema": {"title": "Visitor Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WidgetTokenOut"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrOut"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrOut"}}}}, "429": {"description": "Too Many Requests", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrOut"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrOut"}}}}}, "description": "Public \u2014 issues a LiveKit token for widget visitors.", "tags": ["Lucy"]}}, "/api/v1/lucy/widget/optin": {"post": {"operationId": "src_apps_lucy_api_save_widget_optin", "summary": "Save Widget Optin", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WidgetOptInOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrOut"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrOut"}}}}}, "description": "Public \u2014 save widget consent on the session contact.", "tags": ["Lucy"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/WidgetOptInIn"}}}, "required": true}}}, "/api/v1/lucy/widget/consent-preview/{slug}": {"get": {"operationId": "src_apps_lucy_api_consent_preview", "summary": "Consent Preview", "parameters": [{"in": "path", "name": "slug", "schema": {"title": "Slug", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK"}}, "description": "Public \u2014 renders the standardized widget consent form as a standalone HTML page.\nTwilio reviewers visit this URL as opt-in proof for TFN verification.", "tags": ["Lucy"]}}, "/api/v1/auth/csrf/": {"get": {"operationId": "src_apps_accounts_api_csrf_token", "summary": "Csrf Token", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Return a CSRF cookie. Frontend calls this on app load.", "tags": ["Auth"]}}, "/api/v1/auth/signup": {"post": {"operationId": "src_apps_accounts_api_signup", "summary": "Signup", "parameters": [], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MessageResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Register a new user and organization.", "tags": ["Auth"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/SignupRequest"}}}, "required": true}}}, "/api/v1/auth/verify-email": {"post": {"operationId": "src_apps_accounts_api_verify_email", "summary": "Verify Email", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MessageResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Verify email address using the token sent via email.", "tags": ["Auth"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/VerifyEmailRequest"}}}, "required": true}}}, "/api/v1/auth/logout": {"post": {"operationId": "src_apps_accounts_api_logout", "summary": "Logout", "parameters": [], "responses": {"205": {"description": "Reset Content"}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Blacklist the refresh token (read from cookie) and clear auth cookies.", "tags": ["Auth"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/auth/google-sso/": {"post": {"operationId": "src_apps_accounts_api_google_sso", "summary": "Google Sso", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Handle Google SSO login. Returns JWT cookies for existing users\nor needs_company flag for new users.", "tags": ["Auth"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/GoogleSSOIn"}}}, "required": true}}}, "/api/v1/auth/google-complete/": {"post": {"operationId": "src_apps_accounts_api_google_complete", "summary": "Google Complete", "parameters": [], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Complete Google SSO registration with company name.\nCreates org + user, returns JWT cookies.", "tags": ["Auth"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/GoogleCompleteIn"}}}, "required": true}}}, "/api/v1/auth/me": {"get": {"operationId": "src_apps_accounts_api_me", "summary": "Me", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserSchema"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Return the currently logged-in user.", "tags": ["Auth"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/auth/profile": {"get": {"operationId": "src_apps_accounts_api_get_profile", "summary": "Get Profile", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ProfileOutSchema"}}}}}, "description": "Get the current user's profile information.", "tags": ["Auth"], "security": [{"NinjaJWTAuth": []}]}, "put": {"operationId": "src_apps_accounts_api_update_profile", "summary": "Update Profile", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ProfileOutSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Update the current user's profile information.", "tags": ["Auth"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ProfileUpdateSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/auth/profile/lucy-contact": {"post": {"operationId": "src_apps_accounts_api_ensure_lucy_contact", "summary": "Ensure Lucy Contact", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ProfileOutSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Create or return the current user's tenant/internal Lucy contact profile.", "tags": ["Auth"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/auth/profile/routines": {"get": {"operationId": "src_apps_accounts_api_list_profile_routines", "summary": "List Profile Routines", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/RoutineOut"}, "title": "Response", "type": "array"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["Auth"], "security": [{"NinjaJWTAuth": []}]}, "post": {"operationId": "src_apps_accounts_api_add_profile_routine", "summary": "Add Profile Routine", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RoutineOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["Auth"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/RoutineIn"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/auth/profile/routines/{routine_id}": {"put": {"operationId": "src_apps_accounts_api_set_profile_routine", "summary": "Set Profile Routine", "parameters": [{"in": "path", "name": "routine_id", "schema": {"format": "uuid", "title": "Routine Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RoutineOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["Auth"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/RoutinePatch"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}, "delete": {"operationId": "src_apps_accounts_api_archive_profile_routine", "summary": "Archive Profile Routine", "parameters": [{"in": "path", "name": "routine_id", "schema": {"format": "uuid", "title": "Routine Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RoutineOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["Auth"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/auth/profile/routines/{routine_id}/pause": {"post": {"operationId": "src_apps_accounts_api_pause_profile_routine", "summary": "Pause Profile Routine", "parameters": [{"in": "path", "name": "routine_id", "schema": {"format": "uuid", "title": "Routine Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RoutineOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["Auth"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/auth/profile/routines/{routine_id}/resume": {"post": {"operationId": "src_apps_accounts_api_resume_profile_routine", "summary": "Resume Profile Routine", "parameters": [{"in": "path", "name": "routine_id", "schema": {"format": "uuid", "title": "Routine Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RoutineOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["Auth"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/auth/profile/org": {"put": {"operationId": "src_apps_accounts_api_update_org_profile", "summary": "Update Org Profile", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrganizationInfoSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Update organization info for owner/admin users.", "tags": ["Auth"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrgProfileUpdateSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/auth/account-setup": {"post": {"operationId": "src_apps_accounts_api_account_setup", "summary": "Account Setup", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Light profile setup during onboarding: first/last name + company name.\nSaves user name fields and optionally updates org name.", "tags": ["Auth"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/AccountSetupIn"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/auth/users": {"get": {"operationId": "src_apps_accounts_api_list_users", "summary": "List Users", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/OrgUserOut"}, "title": "Response", "type": "array"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "List paid team users in the requester's organization.", "tags": ["Auth"], "security": [{"NinjaJWTAuth": []}]}, "post": {"operationId": "src_apps_accounts_api_create_user", "summary": "Create User", "parameters": [], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrgUserOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Create a new user in the requester's organization.", "tags": ["Auth"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateUserIn"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/auth/users/portal": {"get": {"operationId": "src_apps_accounts_api_list_portal_users", "summary": "List Portal Users", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/OrgUserOut"}, "title": "Response", "type": "array"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "List borrower portal accounts in the requester's organization.", "tags": ["Auth"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/auth/departments": {"get": {"operationId": "src_apps_accounts_api_list_departments", "summary": "List Departments", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/DepartmentOut"}, "title": "Response", "type": "array"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["Auth"], "security": [{"NinjaJWTAuth": []}]}, "post": {"operationId": "src_apps_accounts_api_create_department", "summary": "Create Department", "parameters": [], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DepartmentOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["Auth"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateDepartmentIn"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/auth/departments/{dept_id}": {"put": {"operationId": "src_apps_accounts_api_update_department", "summary": "Update Department", "parameters": [{"in": "path", "name": "dept_id", "schema": {"title": "Dept Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DepartmentOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["Auth"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateDepartmentIn"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}, "delete": {"operationId": "src_apps_accounts_api_delete_department", "summary": "Delete Department", "parameters": [{"in": "path", "name": "dept_id", "schema": {"title": "Dept Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["Auth"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/auth/users/{user_id}": {"put": {"operationId": "src_apps_accounts_api_update_user", "summary": "Update User", "parameters": [{"in": "path", "name": "user_id", "schema": {"title": "User Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrgUserOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Update a user in the requester's organization.", "tags": ["Auth"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateUserIn"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}, "delete": {"operationId": "src_apps_accounts_api_deactivate_user", "summary": "Deactivate User", "parameters": [{"in": "path", "name": "user_id", "schema": {"title": "User Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Deactivate (soft-delete) a user in the requester's organization.", "tags": ["Auth"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/auth/onboarding/status": {"get": {"operationId": "src_apps_accounts_api_get_onboarding", "summary": "Get Onboarding", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OnboardingStatusOut"}}}}}, "description": "Get current onboarding step for the user's org.", "tags": ["Auth"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/auth/onboarding/advance": {"post": {"operationId": "src_apps_accounts_api_advance_onboarding", "summary": "Advance Onboarding", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OnboardingStatusOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Mark a step complete and advance to the next.", "tags": ["Auth"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdvanceStepIn"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/auth/compliance": {"get": {"operationId": "src_apps_accounts_api_get_compliance", "summary": "Get Compliance", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ComplianceOut"}}}}}, "description": "Get compliance consent timestamps for the org.", "tags": ["Auth"], "security": [{"NinjaJWTAuth": []}]}, "post": {"operationId": "src_apps_accounts_api_accept_compliance", "summary": "Accept Compliance", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ComplianceOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Accept compliance consents.", "tags": ["Auth"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ComplianceIn"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/auth/password-reset/request": {"post": {"operationId": "src_apps_accounts_api_pw_reset_request", "summary": "Pw Reset Request", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MessageResponse"}}}}}, "description": "Send a password reset email. Always returns 200 for security.", "tags": ["Auth"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/PwResetRequestIn"}}}, "required": true}}}, "/api/v1/auth/password-reset/validate": {"post": {"operationId": "src_apps_accounts_api_pw_reset_validate", "summary": "Pw Reset Validate", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Check if a reset token is valid.", "tags": ["Auth"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/PwResetValidateIn"}}}, "required": true}}}, "/api/v1/auth/password-reset/confirm": {"post": {"operationId": "src_apps_accounts_api_pw_reset_confirm", "summary": "Pw Reset Confirm", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MessageResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Set a new password using a valid reset token.", "tags": ["Auth"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/PwResetConfirmIn"}}}, "required": true}}}, "/api/v1/auth/invite/send": {"post": {"operationId": "src_apps_accounts_api_invite_send", "summary": "Invite Send", "parameters": [], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrgUserOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Send an invite to a new user.", "tags": ["Auth"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/InviteSendIn"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/auth/invite/verify": {"post": {"operationId": "src_apps_accounts_api_invite_verify", "summary": "Invite Verify", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InviteVerifyOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Verify an invite token (no auth required).", "tags": ["Auth"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/InviteTokenIn"}}}, "required": true}}}, "/api/v1/auth/invite/accept": {"post": {"operationId": "src_apps_accounts_api_invite_accept", "summary": "Invite Accept", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Accept an invite and set password. Sets auth cookies.", "tags": ["Auth"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/InviteAcceptIn"}}}, "required": true}}}, "/api/v1/auth/invite/resend": {"post": {"operationId": "src_apps_accounts_api_invite_resend", "summary": "Invite Resend", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MessageResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Resend an invite to an inactive user.", "tags": ["Auth"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/InviteResendIn"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/auth/org/settings": {"patch": {"operationId": "src_apps_accounts_api_patch_org_settings", "summary": "Patch Org Settings", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Merge-patch org.settings JSONField. Org admins and owners only.", "tags": ["Auth"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrgSettingsPatchSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/fields": {"get": {"operationId": "src_apps_crm_api_list_custom_fields", "summary": "List Custom Fields", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/OrganizationCustomFieldSchema"}, "title": "Response", "type": "array"}}}}}, "description": "List all registered custom fields (virtual columns) for the organization.", "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/lists": {"get": {"operationId": "src_apps_crm_api_list_contact_lists", "summary": "List Contact Lists", "parameters": [{"in": "query", "name": "include_counts", "schema": {"default": true, "title": "Include Counts", "type": "boolean"}, "required": false}, {"in": "query", "name": "browse_scope", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Browse Scope"}, "required": false}, {"in": "query", "name": "browse_user_id", "schema": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Browse User Id"}, "required": false}, {"in": "query", "name": "browse_department_id", "schema": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Browse Department Id"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/CRMListSchema"}, "title": "Response", "type": "array"}}}}}, "description": "List all contact lists (groups) with member counts.", "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}, "post": {"operationId": "src_apps_crm_api_create_contact_list", "summary": "Create Contact List", "parameters": [], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CRMListSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Create a new contact list.", "tags": ["CRM"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CRMListCreateSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/lists/page": {"get": {"operationId": "src_apps_crm_api_list_contact_list_page", "summary": "List Contact List Page", "parameters": [{"in": "query", "name": "page", "schema": {"default": 1, "title": "Page", "type": "integer"}, "required": false}, {"in": "query", "name": "limit", "schema": {"default": 25, "title": "Limit", "type": "integer"}, "required": false}, {"in": "query", "name": "include_counts", "schema": {"default": true, "title": "Include Counts", "type": "boolean"}, "required": false}, {"in": "query", "name": "search", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Search"}, "required": false}, {"in": "query", "name": "sort", "schema": {"default": "name_asc", "title": "Sort", "type": "string"}, "required": false}, {"in": "query", "name": "list_type", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "List Type"}, "required": false}, {"in": "query", "name": "browse_scope", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Browse Scope"}, "required": false}, {"in": "query", "name": "browse_user_id", "schema": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Browse User Id"}, "required": false}, {"in": "query", "name": "browse_department_id", "schema": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Browse Department Id"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CRMListPageSchema"}}}}}, "description": "List contact lists as a page for manager views.", "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/lists/assignees": {"get": {"operationId": "src_apps_crm_api_list_assignees", "summary": "List Assignees", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/UserSimpleSchema"}, "title": "Response", "type": "array"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/assignees": {"get": {"operationId": "src_apps_crm_api_list_contact_assignees", "summary": "List Contact Assignees", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/UserSimpleSchema"}, "title": "Response", "type": "array"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/lists/counts": {"post": {"operationId": "src_apps_crm_api_get_contact_list_counts", "summary": "Get Contact List Counts", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["CRM"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CRMListCountIn"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/lists/{list_id}": {"get": {"operationId": "src_apps_crm_api_get_contact_list", "summary": "Get Contact List", "parameters": [{"in": "path", "name": "list_id", "schema": {"format": "uuid", "title": "List Id", "type": "string"}, "required": true}, {"in": "query", "name": "include_counts", "schema": {"default": true, "title": "Include Counts", "type": "boolean"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CRMListSchema"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}, "put": {"operationId": "src_apps_crm_api_update_contact_list", "summary": "Update Contact List", "parameters": [{"in": "path", "name": "list_id", "schema": {"format": "uuid", "title": "List Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CRMListSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Update an existing contact list in place.", "tags": ["CRM"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CRMListUpdateSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}, "delete": {"operationId": "src_apps_crm_api_delete_contact_list", "summary": "Delete Contact List", "parameters": [{"in": "path", "name": "list_id", "schema": {"format": "uuid", "title": "List Id", "type": "string"}, "required": true}, {"in": "query", "name": "delete_contacts", "schema": {"default": false, "title": "Delete Contacts", "type": "boolean"}, "required": false}], "responses": {"202": {"description": "Accepted", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "204": {"description": "No Content"}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Delete a contact list.\nOptionally delete all contacts within that list.", "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/lists/static/from-filter": {"post": {"operationId": "src_apps_crm_api_create_static_list", "summary": "Create Static List", "parameters": [], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CRMListSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["CRM"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CRMStaticListCreateSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/lists/{list_id}/static-copy": {"post": {"operationId": "src_apps_crm_api_copy_static_list", "summary": "Copy Static List", "parameters": [{"in": "path", "name": "list_id", "schema": {"format": "uuid", "title": "List Id", "type": "string"}, "required": true}], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CRMListSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["CRM"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CRMStaticListCopySchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/lists/{list_id}/clone": {"post": {"operationId": "src_apps_crm_api_clone_contact_list", "summary": "Clone Contact List", "parameters": [{"in": "path", "name": "list_id", "schema": {"format": "uuid", "title": "List Id", "type": "string"}, "required": true}], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CRMListSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/lead-sources": {"get": {"operationId": "src_apps_crm_api_list_lead_sources", "summary": "List Lead Sources", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"type": "string"}, "title": "Response", "type": "array"}}}}}, "description": "Return distinct lead_source provider values for the org (for combobox suggestions).\nUses DB-level DISTINCT on the JSON key to avoid a full table scan in Python.", "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/imports": {"get": {"operationId": "src_apps_crm_api_list_import_jobs", "summary": "List Import Jobs", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/ImportJobSchema"}, "title": "Response", "type": "array"}}}}}, "description": "List recent import jobs.", "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/doc-imports/preview": {"post": {"operationId": "src_apps_crm_api_preview_doc_import", "summary": "Preview Doc Import", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocImportPreviewSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Preview a ZIP before starting the doc import.\nReturns folder counts and sample unmatched external_ids.", "tags": ["CRM"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/StartDocImportSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/doc-imports/start": {"post": {"operationId": "src_apps_crm_api_start_doc_import", "summary": "Start Doc Import", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocImportJobSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Start the bulk document import job for a ZIP document.", "tags": ["CRM"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/StartDocImportSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/doc-imports": {"get": {"operationId": "src_apps_crm_api_list_doc_imports", "summary": "List Doc Imports", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/DocImportJobSchema"}, "title": "Response", "type": "array"}}}}}, "description": "List recent DocImportJob records for the current org.", "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/doc-imports/{job_id}": {"delete": {"operationId": "src_apps_crm_api_del_doc_import", "summary": "Del Doc Import", "parameters": [{"in": "path", "name": "job_id", "schema": {"title": "Job Id", "type": "integer"}, "required": true}], "responses": {"204": {"description": "No Content"}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Delete a DocImportJob history record. Does not affect imported documents.", "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/doc-imports/{job_id}/error-file": {"get": {"operationId": "src_apps_crm_api_get_doc_error_file", "summary": "Get Doc Error File", "parameters": [{"in": "path", "name": "job_id", "schema": {"title": "Job Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Returns a signed URL for the error CSV on demand.", "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/imports/{job_id}/retry": {"post": {"operationId": "src_apps_crm_api_retry_csv_import", "summary": "Retry Csv Import", "parameters": [{"in": "path", "name": "job_id", "schema": {"title": "Job Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Retry a FAILED CSV import. Resumes from last checkpoint.", "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/doc-imports/{job_id}/retry": {"post": {"operationId": "src_apps_crm_api_retry_doc_import", "summary": "Retry Doc Import", "parameters": [{"in": "path", "name": "job_id", "schema": {"title": "Job Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Retry a FAILED ZIP document import.", "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/contacts": {"get": {"operationId": "src_apps_crm_api_list_contacts", "summary": "List Contacts", "parameters": [{"in": "query", "name": "list_id", "schema": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "List Id"}, "required": false}, {"in": "query", "name": "search", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Search"}, "required": false}, {"in": "query", "name": "filters", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Filters"}, "required": false}, {"in": "query", "name": "browse_scope", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Browse Scope"}, "required": false}, {"in": "query", "name": "browse_user_id", "schema": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Browse User Id"}, "required": false}, {"in": "query", "name": "browse_department_id", "schema": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Browse Department Id"}, "required": false}, {"in": "query", "name": "page", "schema": {"default": 1, "minimum": 1, "title": "Page", "type": "integer"}, "required": false}, {"in": "query", "name": "page_size", "schema": {"anyOf": [{"minimum": 1, "type": "integer"}, {"type": "null"}], "title": "Page Size"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PagedContactListSchema"}}}}}, "description": "List all contacts for the authenticated user's organization.\nFilters provided as a JSON string.", "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}, "post": {"operationId": "src_apps_crm_api_create_contact", "summary": "Create Contact", "parameters": [], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ContactSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ContactDupSchema"}}}}}, "description": "Create a new contact.", "tags": ["CRM"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ContactCreateSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/contacts/bulk_update": {"post": {"operationId": "src_apps_crm_api_bulk_update_contacts", "summary": "Bulk Update Contacts", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "202": {"description": "Accepted", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Bulk update contacts.\nIf >1000 contacts selected, offloads to a background task.", "tags": ["CRM"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/BulkUpdateSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/contacts/bulk_delete": {"post": {"operationId": "src_apps_crm_api_bulk_delete_contacts", "summary": "Bulk Delete Contacts", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "202": {"description": "Accepted", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Bulk delete contacts.\nIf >1000 contacts selected, offloads to a background task.", "tags": ["CRM"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/BulkDeleteSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/contacts/{contact_id}": {"get": {"operationId": "src_apps_crm_api_get_contact", "summary": "Get Contact", "parameters": [{"in": "path", "name": "contact_id", "schema": {"format": "uuid", "title": "Contact Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ContactSchema"}}}}}, "description": "Retrieve a specific contact.", "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}, "put": {"operationId": "src_apps_crm_api_update_contact", "summary": "Update Contact", "parameters": [{"in": "path", "name": "contact_id", "schema": {"format": "uuid", "title": "Contact Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ContactSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Update an existing contact.", "tags": ["CRM"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ContactUpdateSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}, "delete": {"operationId": "src_apps_crm_api_delete_contact", "summary": "Delete Contact", "parameters": [{"in": "path", "name": "contact_id", "schema": {"format": "uuid", "title": "Contact Id", "type": "string"}, "required": true}], "responses": {"204": {"description": "No Content"}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Delete a contact.", "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/contacts/{contact_id}/history": {"get": {"operationId": "src_apps_crm_api_get_contact_history", "summary": "Get Contact History", "parameters": [{"in": "path", "name": "contact_id", "schema": {"format": "uuid", "title": "Contact Id", "type": "string"}, "required": true}, {"in": "query", "name": "page", "schema": {"default": 1, "title": "Page", "type": "integer"}, "required": false}, {"in": "query", "name": "limit", "schema": {"default": 10, "title": "Limit", "type": "integer"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ContactHistoryPageSchema"}}}}}, "description": "Get audit trail for a contact.", "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/contacts/{contact_id}/interactions": {"get": {"operationId": "src_apps_crm_api_list_contact_interactions", "summary": "List Contact Interactions", "parameters": [{"in": "path", "name": "contact_id", "schema": {"format": "uuid", "title": "Contact Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/InteractionSchema"}, "title": "Response", "type": "array"}}}}}, "description": "Get all interactions (Calls, SMS, Notes) for a contact.", "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/contacts/{contact_id}/notes": {"post": {"operationId": "src_apps_crm_api_create_note", "summary": "Create Note", "parameters": [{"in": "path", "name": "contact_id", "schema": {"format": "uuid", "title": "Contact Id", "type": "string"}, "required": true}], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InteractionSchema"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Create an internal note on a contact.", "tags": ["CRM"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/NoteCreateSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/contacts/{contact_id}/events": {"get": {"operationId": "src_apps_crm_api_list_contact_events", "summary": "List Contact Events", "parameters": [{"in": "path", "name": "contact_id", "schema": {"format": "uuid", "title": "Contact Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/CalendarEventSchema"}, "title": "Response", "type": "array"}}}}}, "description": "Get upcoming and past calendar events (Meetings, Blocks) for a contact.\nPASSIVE EVENTS ONLY.", "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/events/{event_id}": {"put": {"operationId": "src_apps_crm_api_update_event", "summary": "Update Event", "parameters": [{"in": "path", "name": "event_id", "schema": {"format": "uuid", "title": "Event Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CalendarEventSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["CRM"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CalendarEventUpdateSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}, "delete": {"operationId": "src_apps_crm_api_delete_event", "summary": "Delete Event", "parameters": [{"in": "path", "name": "event_id", "schema": {"format": "uuid", "title": "Event Id", "type": "string"}, "required": true}], "responses": {"204": {"description": "No Content"}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/contacts/{contact_id}/tasks": {"get": {"operationId": "src_apps_crm_api_list_contact_tasks", "summary": "List Contact Tasks", "parameters": [{"in": "path", "name": "contact_id", "schema": {"format": "uuid", "title": "Contact Id", "type": "string"}, "required": true}, {"in": "query", "name": "with_comm", "schema": {"default": true, "title": "With Comm", "type": "boolean"}, "required": false}, {"in": "query", "name": "start_date", "schema": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "Start Date"}, "required": false}, {"in": "query", "name": "end_date", "schema": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "End Date"}, "required": false}, {"in": "query", "name": "page", "schema": {"default": 1, "title": "Page", "type": "integer"}, "required": false}, {"in": "query", "name": "limit", "schema": {"default": 9, "title": "Limit", "type": "integer"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CalendarTaskPageSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Get tasks for a contact.\nA start and end date returns that calendar window without communication outcomes.", "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}, "post": {"operationId": "src_apps_crm_api_create_contact_task", "summary": "Create Contact Task", "parameters": [{"in": "path", "name": "contact_id", "schema": {"format": "uuid", "title": "Contact Id", "type": "string"}, "required": true}], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CalendarTaskSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Create a new task for a contact.", "tags": ["CRM"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CalendarTaskCreateSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/tasks/recent": {"get": {"operationId": "src_apps_crm_api_list_recent_tasks", "summary": "List Recent Tasks", "parameters": [{"in": "query", "name": "limit", "schema": {"default": 25, "title": "Limit", "type": "integer"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/CampaignCalendarTaskSchema"}, "title": "Response", "type": "array"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Recent non-campaign Lucy task activity for the org, newest activity first.", "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/lucy-todos": {"get": {"operationId": "src_apps_crm_api_list_lucy_todos", "summary": "List Lucy Todos", "parameters": [{"in": "query", "name": "include_completed", "schema": {"default": false, "title": "Include Completed", "type": "boolean"}, "required": false}, {"in": "query", "name": "limit", "schema": {"default": 50, "title": "Limit", "type": "integer"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/LucyTodoTaskSchema"}, "title": "Response", "type": "array"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Scheduled Lucy internal TODO work for the org.", "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/activity/today": {"get": {"operationId": "src_apps_crm_api_get_today", "summary": "Get Today", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TodayActivitySchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Today's reminders and meetings for the current tenant user.", "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/tasks/{task_id}": {"put": {"operationId": "src_apps_crm_api_update_task", "summary": "Update Task", "parameters": [{"in": "path", "name": "task_id", "schema": {"format": "uuid", "title": "Task Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CalendarTaskSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["CRM"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CalendarTaskUpdateSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}, "delete": {"operationId": "src_apps_crm_api_delete_task", "summary": "Delete Task", "parameters": [{"in": "path", "name": "task_id", "schema": {"format": "uuid", "title": "Task Id", "type": "string"}, "required": true}], "responses": {"204": {"description": "No Content"}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/contacts/{contact_id}/portal/revoke": {"post": {"operationId": "src_apps_crm_api_revoke_contact_portal", "summary": "Revoke Contact Portal", "parameters": [{"in": "path", "name": "contact_id", "schema": {"format": "uuid", "title": "Contact Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PortalRevokeOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Revoke borrower/partner portal login for a CRM contact.", "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/contacts/{contact_id}/relationships": {"get": {"operationId": "src_apps_crm_api_list_relationships", "summary": "List Relationships", "parameters": [{"in": "path", "name": "contact_id", "schema": {"format": "uuid", "title": "Contact Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/RelationshipListSchema"}, "title": "Response", "type": "array"}}}}}, "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}, "post": {"operationId": "src_apps_crm_api_create_relationship", "summary": "Create Relationship", "parameters": [{"in": "path", "name": "contact_id", "schema": {"format": "uuid", "title": "Contact Id", "type": "string"}, "required": true}], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RelationshipListSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["CRM"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/RelationshipCreateSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/relationships/{rel_id}": {"delete": {"operationId": "src_apps_crm_api_delete_relationship", "summary": "Delete Relationship", "parameters": [{"in": "path", "name": "rel_id", "schema": {"format": "uuid", "title": "Rel Id", "type": "string"}, "required": true}], "responses": {"204": {"description": "No Content"}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/campaigns": {"get": {"operationId": "src_apps_crm_api_list_campaigns", "summary": "List Campaigns", "parameters": [{"in": "query", "name": "browse_scope", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Browse Scope"}, "required": false}, {"in": "query", "name": "browse_user_id", "schema": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Browse User Id"}, "required": false}, {"in": "query", "name": "browse_department_id", "schema": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Browse Department Id"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/CampaignSchema"}, "title": "Response", "type": "array"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}, "post": {"operationId": "src_apps_crm_api_create_campaign", "summary": "Create Campaign", "parameters": [], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CampaignSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["CRM"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CampaignCreateSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/campaigns/page": {"get": {"operationId": "src_apps_crm_api_list_campaign_page", "summary": "List Campaign Page", "parameters": [{"in": "query", "name": "page", "schema": {"default": 1, "title": "Page", "type": "integer"}, "required": false}, {"in": "query", "name": "limit", "schema": {"default": 25, "title": "Limit", "type": "integer"}, "required": false}, {"in": "query", "name": "exclude_status", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Exclude Status"}, "required": false}, {"in": "query", "name": "search", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Search"}, "required": false}, {"in": "query", "name": "sort", "schema": {"default": "newest", "title": "Sort", "type": "string"}, "required": false}, {"in": "query", "name": "browse_scope", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Browse Scope"}, "required": false}, {"in": "query", "name": "browse_user_id", "schema": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Browse User Id"}, "required": false}, {"in": "query", "name": "browse_department_id", "schema": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Browse Department Id"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CampaignPageSchema"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/campaigns/event-types": {"get": {"operationId": "src_apps_crm_api_list_event_types", "summary": "List Event Types", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {}, "title": "Response", "type": "array"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Available event types for EVENT-triggered campaigns.", "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/campaigns/aggregate-stats": {"get": {"operationId": "src_apps_crm_api_aggregate_campaign_stats", "summary": "Aggregate Campaign Stats", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Dashboard KPI: total/completed/active/failed campaign jobs.", "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/dashboard/overview": {"get": {"operationId": "src_apps_crm_api_get_dash", "summary": "Get Dash", "parameters": [{"in": "query", "name": "range_key", "schema": {"default": "week", "title": "Range Key", "type": "string"}, "required": false}, {"in": "query", "name": "start_date", "schema": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "Start Date"}, "required": false}, {"in": "query", "name": "end_date", "schema": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "End Date"}, "required": false}, {"in": "query", "name": "inbound_page", "schema": {"default": 1, "title": "Inbound Page", "type": "integer"}, "required": false}, {"in": "query", "name": "fresh", "schema": {"default": false, "title": "Fresh", "type": "boolean"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DashboardOverviewSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/campaigns/test-blast": {"post": {"operationId": "src_apps_crm_api_test_blast_campaign", "summary": "Test Blast Campaign", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["CRM"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CampaignBlastTestSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/campaigns/preview-cadence-fit": {"post": {"operationId": "src_apps_crm_api_preview_campaign_cadence_fit", "summary": "Preview Campaign Cadence Fit", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CampaignCadenceFitResultSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["CRM"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CampaignCadenceFitPreviewSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/campaigns/{campaign_id}": {"get": {"operationId": "src_apps_crm_api_get_campaign", "summary": "Get Campaign", "parameters": [{"in": "path", "name": "campaign_id", "schema": {"format": "uuid", "title": "Campaign Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CampaignSchema"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}, "put": {"operationId": "src_apps_crm_api_update_campaign", "summary": "Update Campaign", "parameters": [{"in": "path", "name": "campaign_id", "schema": {"format": "uuid", "title": "Campaign Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CampaignSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["CRM"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CampaignUpdateSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}, "delete": {"operationId": "src_apps_crm_api_delete_campaign", "summary": "Delete Campaign", "parameters": [{"in": "path", "name": "campaign_id", "schema": {"format": "uuid", "title": "Campaign Id", "type": "string"}, "required": true}], "responses": {"204": {"description": "No Content"}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/campaigns/{campaign_id}/clone": {"post": {"operationId": "src_apps_crm_api_clone_campaign", "summary": "Clone Campaign", "parameters": [{"in": "path", "name": "campaign_id", "schema": {"format": "uuid", "title": "Campaign Id", "type": "string"}, "required": true}], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CampaignSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/campaigns/{campaign_id}/launch": {"post": {"operationId": "src_apps_crm_api_launch_campaign", "summary": "Launch Campaign", "parameters": [{"in": "path", "name": "campaign_id", "schema": {"format": "uuid", "title": "Campaign Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CampaignSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/campaigns/{campaign_id}/pause": {"post": {"operationId": "src_apps_crm_api_pause_campaign", "summary": "Pause Campaign", "parameters": [{"in": "path", "name": "campaign_id", "schema": {"format": "uuid", "title": "Campaign Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CampaignSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/campaigns/{campaign_id}/resume": {"post": {"operationId": "src_apps_crm_api_resume_campaign", "summary": "Resume Campaign", "parameters": [{"in": "path", "name": "campaign_id", "schema": {"format": "uuid", "title": "Campaign Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CampaignSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/campaigns/{campaign_id}/complete": {"post": {"operationId": "src_apps_crm_api_complete_campaign", "summary": "Complete Campaign", "parameters": [{"in": "path", "name": "campaign_id", "schema": {"format": "uuid", "title": "Campaign Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CampaignSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/campaigns/{campaign_id}/stats": {"get": {"operationId": "src_apps_crm_api_get_campaign_stats", "summary": "Get Campaign Stats", "parameters": [{"in": "path", "name": "campaign_id", "schema": {"format": "uuid", "title": "Campaign Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CampaignStatsSchema"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/campaigns/{campaign_id}/validate-contacts": {"get": {"operationId": "src_apps_crm_api_validate_campaign_contacts", "summary": "Validate Campaign Contacts", "parameters": [{"in": "path", "name": "campaign_id", "schema": {"format": "uuid", "title": "Campaign Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CampaignValidateSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/campaigns/{campaign_id}/run-validation": {"post": {"operationId": "src_apps_crm_api_run_campaign_validation", "summary": "Run Campaign Validation", "parameters": [{"in": "path", "name": "campaign_id", "schema": {"format": "uuid", "title": "Campaign Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CampaignValidateSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/campaigns/{campaign_id}/deep-clean": {"get": {"operationId": "src_apps_crm_api_get_campaign_deep_clean_quote", "summary": "Quote email deep clean (requires completed Validate Blast)", "parameters": [{"in": "path", "name": "campaign_id", "schema": {"format": "uuid", "title": "Campaign Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CampaignDeepCleanQuoteSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}, "post": {"operationId": "src_apps_crm_api_start_campaign_deep_clean", "summary": "Start email deep clean (paid; after Validate Blast)", "parameters": [{"in": "path", "name": "campaign_id", "schema": {"format": "uuid", "title": "Campaign Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/campaigns/{campaign_id}/jobs": {"get": {"operationId": "src_apps_crm_api_list_campaign_jobs", "summary": "List Campaign Jobs", "parameters": [{"in": "path", "name": "campaign_id", "schema": {"format": "uuid", "title": "Campaign Id", "type": "string"}, "required": true}, {"in": "query", "name": "status", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Status"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/CampaignJobSchema"}, "title": "Response", "type": "array"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/campaigns/{campaign_id}/tasks": {"get": {"operationId": "src_apps_crm_api_list_campaign_tasks", "summary": "List Campaign Tasks", "parameters": [{"in": "path", "name": "campaign_id", "schema": {"format": "uuid", "title": "Campaign Id", "type": "string"}, "required": true}, {"in": "query", "name": "status", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Status"}, "required": false}, {"in": "query", "name": "search", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Search"}, "required": false}, {"in": "query", "name": "metric", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Metric"}, "required": false}, {"in": "query", "name": "page", "schema": {"default": 1, "title": "Page", "type": "integer"}, "required": false}, {"in": "query", "name": "limit", "schema": {"default": 50, "title": "Limit", "type": "integer"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CampaignTaskPageSchema"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "CalendarTasks linked to this campaign via GFK.", "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/campaigns/{campaign_id}/enroll": {"post": {"operationId": "src_apps_crm_api_enroll_contact_in_campaign", "summary": "Enroll Contact In Campaign", "parameters": [{"in": "path", "name": "campaign_id", "schema": {"format": "uuid", "title": "Campaign Id", "type": "string"}, "required": true}], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["CRM"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CampaignEnrollSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/crm/campaigns/{campaign_id}/contacts/{contact_id}": {"delete": {"operationId": "src_apps_crm_api_remove_contact_from_campaign", "summary": "Remove Contact From Campaign", "parameters": [{"in": "path", "name": "campaign_id", "schema": {"format": "uuid", "title": "Campaign Id", "type": "string"}, "required": true}, {"in": "path", "name": "contact_id", "schema": {"format": "uuid", "title": "Contact Id", "type": "string"}, "required": true}], "responses": {"204": {"description": "No Content"}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["CRM"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/automations": {"get": {"operationId": "src_apps_shared_api_automations_get_automations", "summary": "Get Automations", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["Automations"], "security": [{"NinjaJWTAuth": []}]}, "put": {"operationId": "src_apps_shared_api_automations_put_automations", "summary": "Put Automations", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["Automations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/AutomationsIn"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/automations/fields": {"get": {"operationId": "src_apps_shared_api_automations_get_auto_fields", "summary": "Get Auto Fields", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["Automations"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/documents/kb": {"get": {"operationId": "src_apps_documents_api_list_knowledge_bases", "summary": "List Knowledge Bases", "parameters": [{"in": "query", "name": "page", "schema": {"default": 1, "minimum": 1, "title": "Page", "type": "integer"}, "required": false}, {"in": "query", "name": "page_size", "schema": {"anyOf": [{"minimum": 1, "type": "integer"}, {"type": "null"}], "title": "Page Size"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PagedKnowledgeBaseSchema"}}}}}, "description": "List KBs accessible to the user (Company, Personal, Global).", "tags": ["Documents"], "security": [{"NinjaJWTAuth": []}]}, "post": {"operationId": "src_apps_documents_api_create_knowledge_base", "summary": "Create Knowledge Base", "parameters": [], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/KnowledgeBaseSchema"}}}}}, "description": "Create a new Knowledge Base.", "tags": ["Documents"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/KnowledgeBaseCreateSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/documents/kb/current": {"get": {"operationId": "src_apps_documents_api_get_current_knowledge_bases", "summary": "Get Current Knowledge Bases", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Get the current organization's company knowledge base.", "tags": ["Documents"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/documents/kb/global": {"get": {"operationId": "src_apps_documents_api_get_global_knowledge_bases", "summary": "Get Global Knowledge Bases", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/KnowledgeBaseSchema"}, "title": "Response", "type": "array"}}}}}, "tags": ["Documents"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/documents/": {"get": {"operationId": "src_apps_documents_api_list_documents", "summary": "List Documents", "parameters": [{"in": "query", "name": "owner_id", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Owner Id"}, "required": false}, {"in": "query", "name": "owner_type", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Owner Type"}, "required": false}, {"in": "query", "name": "search", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Search"}, "required": false}, {"in": "query", "name": "page", "schema": {"default": 1, "minimum": 1, "title": "Page", "type": "integer"}, "required": false}, {"in": "query", "name": "page_size", "schema": {"anyOf": [{"minimum": 1, "type": "integer"}, {"type": "null"}], "title": "Page Size"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PagedDocumentSchema"}}}}}, "description": "List documents for the user's organization.\nOptionally filter by owner (e.g., Contact, Loan).", "tags": ["Documents"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/documents/local_chunk/{upload_id}/": {"put": {"operationId": "src_apps_documents_api_local_chunk_receiver", "summary": "Local Chunk Receiver", "parameters": [{"in": "path", "name": "upload_id", "schema": {"title": "Upload Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "308": {"description": "Permanent Redirect", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Local dev chunk receiver \u2014 mimics GCS resumable upload responses.\nFrontend PUTs chunks here instead of GCS when USE_LOCAL_STORAGE=true.\nReturns 308 for intermediate chunks, 200 for the final chunk.", "tags": ["Documents"]}}, "/api/v1/documents/initiate_upload/": {"post": {"operationId": "src_apps_documents_api_initiate_upload", "summary": "Initiate Upload", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InitiateUploadResponseSchema"}}}}}, "description": "Creates a GCS resumable upload session.\nReturns session_uri for the frontend to PUT chunks directly to GCS.", "tags": ["Documents"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/InitiateUploadSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/documents/complete_upload/": {"post": {"operationId": "src_apps_documents_api_complete_upload", "summary": "Complete Upload", "parameters": [], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocumentSchema"}}}}}, "description": "Called after frontend finishes uploading to GCS.\nCreates the Document record and enqueues scan + processing.", "tags": ["Documents"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CompleteUploadSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/documents/initiate_multipart/": {"post": {"operationId": "src_apps_documents_api_initiate_multipart", "summary": "Initiate Multipart", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InitiateMultipartResponseSchema"}}}}}, "description": "Creates N parallel GCS resumable sessions for composite upload.\nFrontend uploads parts in parallel, then calls compose_upload.", "tags": ["Documents"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/InitiateMultipartSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/documents/compose_upload/": {"post": {"operationId": "src_apps_documents_api_compose_upload", "summary": "Compose Upload", "parameters": [], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ComposeUploadResponseSchema"}}}}}, "description": "Composes N parallel-uploaded parts into a single GCS object.\nCreates Document record and enqueues processing.", "tags": ["Documents"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ComposeUploadSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/documents/{doc_id}/analyze_import/": {"post": {"operationId": "src_apps_documents_api_analyze_import_endpoint", "summary": "Analyze Import Endpoint", "parameters": [{"in": "path", "name": "doc_id", "schema": {"format": "uuid", "title": "Doc Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ImportJobSchema"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Triggers analysis of the uploaded CSV to detect headers and predict mapping.", "tags": ["Documents"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/documents/{doc_id}/start_import/": {"post": {"operationId": "src_apps_documents_api_start_import", "summary": "Start Import", "parameters": [{"in": "path", "name": "doc_id", "schema": {"format": "uuid", "title": "Doc Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Trigger the actual import process with confirmed mapping.", "tags": ["Documents"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ImportStartSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/documents/{doc_id}/preview": {"get": {"operationId": "src_apps_documents_api_preview_document", "summary": "Preview Document", "parameters": [{"in": "path", "name": "doc_id", "schema": {"format": "uuid", "title": "Doc Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK"}}, "description": "JPEG preview for HEIC/HEIF/TIFF. The stored file is unchanged.", "tags": ["Documents"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/documents/{doc_id}/": {"delete": {"operationId": "src_apps_documents_api_delete_document", "summary": "Delete Document", "parameters": [{"in": "path", "name": "doc_id", "schema": {"format": "uuid", "title": "Doc Id", "type": "string"}, "required": true}], "responses": {"204": {"description": "No Content"}, "404": {"description": "Not Found"}}, "description": "Delete a document (and associated ImportJob).", "tags": ["Documents"], "security": [{"NinjaJWTAuth": []}]}, "patch": {"operationId": "src_apps_documents_api_patch_document", "summary": "Patch Document", "parameters": [{"in": "path", "name": "doc_id", "schema": {"format": "uuid", "title": "Doc Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocumentSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Rename and/or categorize a contact or loan document.", "tags": ["Documents"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocumentPatchIn"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/documents/catalog": {"get": {"operationId": "src_apps_documents_api_get_doc_catalog", "summary": "Get Doc Catalog", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocumentCatalogSchema"}}}}}, "description": "Org document categories and checklist templates.", "tags": ["Documents"], "security": [{"NinjaJWTAuth": []}]}, "put": {"operationId": "src_apps_documents_api_put_doc_catalog", "summary": "Put Doc Catalog", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocumentCatalogSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Replace org document catalog. Owner/admin only.", "tags": ["Documents"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocumentCatalogPutSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/documents/loans/{loan_id}/checklist": {"get": {"operationId": "src_apps_documents_api_get_loan_checklist", "summary": "Get Loan Checklist", "parameters": [{"in": "path", "name": "loan_id", "schema": {"format": "uuid", "title": "Loan Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocumentChecklistStateSchema"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Per-loan document checklist merged with org template. Portal: Draft-linked loans only.", "tags": ["Documents"], "security": [{"NinjaJWTAuth": []}]}, "put": {"operationId": "src_apps_documents_api_apply_loan_checklist", "summary": "Apply Loan Checklist", "parameters": [{"in": "path", "name": "loan_id", "schema": {"format": "uuid", "title": "Loan Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocumentChecklistStateSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Apply a checklist template to a loan (replaces any existing instance).", "tags": ["Documents"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocumentChecklistApplySchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}, "patch": {"operationId": "src_apps_documents_api_patch_loan_checklist", "summary": "Patch Loan Checklist", "parameters": [{"in": "path", "name": "loan_id", "schema": {"format": "uuid", "title": "Loan Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocumentChecklistStateSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Update checklist item status or linked document on a loan.", "tags": ["Documents"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocumentChecklistPatchSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}, "delete": {"operationId": "src_apps_documents_api_clear_loan_checklist", "summary": "Clear Loan Checklist", "parameters": [{"in": "path", "name": "loan_id", "schema": {"format": "uuid", "title": "Loan Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocumentChecklistStateSchema"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Remove the document checklist instance from a loan. Tenant only.", "tags": ["Documents"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/documents/loans/{loan_id}/document-requests": {"get": {"operationId": "src_apps_documents_api_get_loan_document_requests", "summary": "Get Loan Document Requests", "parameters": [{"in": "path", "name": "loan_id", "schema": {"format": "uuid", "title": "Loan Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocumentRequestStateSchema"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Ad hoc document requests for a loan. Portal: linked loans, no filenames.", "tags": ["Documents"], "security": [{"NinjaJWTAuth": []}]}, "patch": {"operationId": "src_apps_documents_api_patch_loan_document_requests", "summary": "Patch Loan Document Requests", "parameters": [{"in": "path", "name": "loan_id", "schema": {"format": "uuid", "title": "Loan Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocumentRequestStateSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Create or update ad hoc document requests. Tenant only.", "tags": ["Documents"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/DocumentRequestPatchSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/documents/move-to-loan": {"post": {"operationId": "src_apps_documents_api_move_docs_to_loan", "summary": "Move Docs To Loan", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MoveDocsToLoanOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Move contact-owned documents onto a loan the caller is linked to.", "tags": ["Documents"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/MoveDocsToLoanIn"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/by-contact/{contact_id}": {"get": {"operationId": "src_apps_mortgage_api_list_applications_by_contact", "summary": "List Applications By Contact", "parameters": [{"in": "path", "name": "contact_id", "schema": {"title": "Contact Id", "type": "string"}, "required": true}, {"in": "query", "name": "borrower_only", "schema": {"default": false, "title": "Borrower Only", "type": "boolean"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/LoanLiteSchema"}, "title": "Response", "type": "array"}}}}}, "description": "List mortgage applications for a specific CRM Contact.", "tags": ["Mortgage"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/borrowers/{borrower_id}/sync-contact": {"post": {"operationId": "src_apps_mortgage_api_sync_borrower_to_contact", "summary": "Sync Borrower To Contact", "parameters": [{"in": "path", "name": "borrower_id", "schema": {"title": "Borrower Id", "type": "string"}, "required": true}], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Create/Link a CRM Contact from a Mortgage Borrower.", "tags": ["Mortgage"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/borrowers/{borrower_id}/link-contact": {"patch": {"operationId": "src_apps_mortgage_api_link_borrower_contact", "summary": "Link Borrower Contact", "parameters": [{"in": "path", "name": "borrower_id", "schema": {"title": "Borrower Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Link an existing CRM contact to a borrower (co-borrower CRM linking).", "tags": ["Mortgage"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/LinkContactSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/{app_id}/contacts": {"post": {"operationId": "src_apps_mortgage_api_add_linked_contact", "summary": "Add Linked Contact", "parameters": [{"in": "path", "name": "app_id", "schema": {"title": "App Id", "type": "string"}, "required": true}], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LinkedContactSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Add a third-party contact to a loan (realtor, title, escrow, etc.).", "tags": ["Mortgage"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/AddLinkedContactSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/{app_id}/contacts/{contact_id}": {"delete": {"operationId": "src_apps_mortgage_api_remove_linked_contact", "summary": "Remove Linked Contact", "parameters": [{"in": "path", "name": "app_id", "schema": {"title": "App Id", "type": "string"}, "required": true}, {"in": "path", "name": "contact_id", "schema": {"title": "Contact Id", "type": "string"}, "required": true}], "responses": {"204": {"description": "No Content"}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Remove a third-party contact link from a loan.", "tags": ["Mortgage"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/{app_id}/team-users": {"get": {"operationId": "src_apps_mortgage_api_list_team_users", "summary": "List Team Users", "parameters": [{"in": "path", "name": "app_id", "schema": {"title": "App Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/LoanTeamUserSchema"}, "title": "Response", "type": "array"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "List active org users that can be added to a loan team.", "tags": ["Mortgage"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/{app_id}/team-members": {"post": {"operationId": "src_apps_mortgage_api_add_team_user", "summary": "Add Team User", "parameters": [{"in": "path", "name": "app_id", "schema": {"title": "App Id", "type": "string"}, "required": true}], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoanTeamMemberSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Add an internal org user to a loan team.", "tags": ["Mortgage"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/AddLoanTeamUserSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/{app_id}/team-members/{user_id}": {"delete": {"operationId": "src_apps_mortgage_api_remove_team_user", "summary": "Remove Team User", "parameters": [{"in": "path", "name": "app_id", "schema": {"title": "App Id", "type": "string"}, "required": true}, {"in": "path", "name": "user_id", "schema": {"title": "User Id", "type": "string"}, "required": true}], "responses": {"204": {"description": "No Content"}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Remove an internal org user from a loan team.", "tags": ["Mortgage"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications": {"get": {"operationId": "src_apps_mortgage_api_list_applications", "summary": "List Applications", "parameters": [{"in": "query", "name": "search", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Search"}, "required": false}, {"in": "query", "name": "status", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Status"}, "required": false}, {"in": "query", "name": "checkpoint_current", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Checkpoint Current"}, "required": false}, {"in": "query", "name": "loan_purpose", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Loan Purpose"}, "required": false}, {"in": "query", "name": "mortgage_type", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Mortgage Type"}, "required": false}, {"in": "query", "name": "page", "schema": {"default": 1, "minimum": 1, "title": "Page", "type": "integer"}, "required": false}, {"in": "query", "name": "page_size", "schema": {"anyOf": [{"minimum": 1, "type": "integer"}, {"type": "null"}], "title": "Page Size"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PagedLoanLiteSchema"}}}}}, "description": "List mortgage applications (Pipeline View).\nstatus and checkpoint_current accept comma-separated lists for multi-filter.", "tags": ["Mortgage"], "security": [{"NinjaJWTAuth": []}]}, "post": {"operationId": "src_apps_mortgage_api_create_application", "summary": "Create Application", "parameters": [], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoanLiteSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Create a new mortgage application.", "tags": ["Mortgage"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoanCreateSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/check-duplicate": {"post": {"operationId": "src_apps_mortgage_api_check_duplicate", "summary": "Check Duplicate", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DuplicateCheckResultSchema"}}}}}, "description": "Check for duplicate loans before creating/updating a single application.\nReturns matches based on property address and borrower identifiers.", "tags": ["Mortgage"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/DuplicateCheckSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/check-duplicates-bulk": {"post": {"operationId": "src_apps_mortgage_api_check_duplicates_bulk", "summary": "Check Duplicates Bulk", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BulkDuplicateCheckResultSchema"}}}}}, "description": "Check for duplicate loans in a batch (for bulk imports).\nReturns matches for each loan and intra-batch duplicates.", "tags": ["Mortgage"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/BulkDuplicateCheckSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/bulk_delete": {"post": {"operationId": "src_apps_mortgage_api_bulk_delete_applications", "summary": "Bulk Delete Applications", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "202": {"description": "Accepted", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Bulk delete mortgage applications by IDs or pipeline filters (status mode).\nDraft loans require owner or org admin. Selections over 1000 are queued on bulk workers.", "tags": ["Mortgage"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/BulkDeleteLoansSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/{application_id}/clone": {"post": {"operationId": "src_apps_mortgage_api_clone_application", "summary": "Clone Application", "parameters": [{"in": "path", "name": "application_id", "schema": {"title": "Application Id", "type": "string"}, "required": true}], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoanLiteSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Clone a loan 1003 into a new Draft. Documents copy in the background.", "tags": ["Mortgage"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/{application_id}": {"put": {"operationId": "src_apps_mortgage_api_update_application", "summary": "Update Application", "parameters": [{"in": "path", "name": "application_id", "schema": {"title": "Application Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoanDetailSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Update an existing mortgage application.\nUses diff & patch strategy for audit trail support.", "tags": ["Mortgage"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoanCreateSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}, "get": {"operationId": "src_apps_mortgage_api_get_application", "summary": "Get Application", "parameters": [{"in": "path", "name": "application_id", "schema": {"title": "Application Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoanDetailSchema"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Get full details of a mortgage application.", "tags": ["Mortgage"], "security": [{"NinjaJWTAuth": []}]}, "delete": {"operationId": "src_apps_mortgage_api_delete_application", "summary": "Delete Application", "parameters": [{"in": "path", "name": "application_id", "schema": {"title": "Application Id", "type": "string"}, "required": true}], "responses": {"204": {"description": "No Content"}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Delete a mortgage application.", "tags": ["Mortgage"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/import/mismo": {"post": {"operationId": "src_apps_mortgage_api_import_mismo", "summary": "Import Mismo", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Import MISMO 3.4 XML file and return parsed application data.\nReturns structured data for preview before submission.", "tags": ["Mortgage"], "requestBody": {"content": {"multipart/form-data": {"schema": {"properties": {"file": {"format": "binary", "title": "File", "type": "string"}}, "required": ["file"], "title": "FileParams", "type": "object"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/{application_id}/limit-check": {"get": {"operationId": "src_apps_mortgage_api_get_loan_limit_check", "summary": "Get Loan Limit Check", "parameters": [{"in": "path", "name": "application_id", "schema": {"title": "Application Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoanLimitCheckSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "County loan limit check for the marked subject REO on a saved loan file.", "tags": ["Mortgage"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/limit-check/evaluate": {"post": {"operationId": "src_apps_mortgage_api_eval_loan_limit_check", "summary": "Eval Loan Limit Check", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoanLimitCheckSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Evaluate county loan limits from form fields (no saved loan required).", "tags": ["Mortgage"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoanLimitEvaluateIn"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/{application_id}/export/mismo": {"get": {"operationId": "src_apps_mortgage_api_export_mismo_xml", "summary": "Export Mismo Xml", "parameters": [{"in": "path", "name": "application_id", "schema": {"title": "Application Id", "type": "string"}, "required": true}, {"in": "query", "name": "target", "schema": {"default": "DU", "title": "Target", "type": "string"}, "required": false}], "responses": {"200": {"description": "OK"}}, "description": "Export application to MISMO 3.4 XML.\ntarget: 'DU' (Fannie Mae) or 'LPA' (Freddie Mac)", "tags": ["Mortgage"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/{application_id}/export/pdf": {"get": {"operationId": "src_apps_mortgage_api_export_pdf_1003", "summary": "Export Pdf 1003", "parameters": [{"in": "path", "name": "application_id", "schema": {"title": "Application Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK"}}, "description": "Export application to Fannie Mae Form 1003 PDF.", "tags": ["Mortgage"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/{loan_id}/export/documents/eligibility": {"get": {"operationId": "src_apps_mortgage_api_get_loan_documents_export_eligibility", "summary": "Get Loan Documents Export Eligibility", "parameters": [{"in": "path", "name": "loan_id", "schema": {"format": "uuid", "title": "Loan Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoanDocExportEligibilityOut"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Check whether a loan's documents fit within ZIP export limits.", "tags": ["Mortgage"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/{loan_id}/export/documents": {"post": {"operationId": "src_apps_mortgage_api_start_loan_documents_export", "summary": "Start Loan Documents Export", "parameters": [{"in": "path", "name": "loan_id", "schema": {"format": "uuid", "title": "Loan Id", "type": "string"}, "required": true}], "responses": {"202": {"description": "Accepted", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoanDocExportStartOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Queue a ZIP export of all documents on this loan, or a selected subset.", "tags": ["Mortgage"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoanDocExportStartIn"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/{loan_id}/export/documents/{job_id}": {"get": {"operationId": "src_apps_mortgage_api_get_loan_documents_export_status", "summary": "Get Loan Documents Export Status", "parameters": [{"in": "path", "name": "loan_id", "schema": {"format": "uuid", "title": "Loan Id", "type": "string"}, "required": true}, {"in": "path", "name": "job_id", "schema": {"title": "Job Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoanDocExportStatusOut"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Poll loan document ZIP export job status.", "tags": ["Mortgage"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/{loan_id}/export/documents/{job_id}/download": {"get": {"operationId": "src_apps_mortgage_api_download_loan_documents_export", "summary": "Download Loan Documents Export", "parameters": [{"in": "path", "name": "loan_id", "schema": {"format": "uuid", "title": "Loan Id", "type": "string"}, "required": true}, {"in": "path", "name": "job_id", "schema": {"title": "Job Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK"}}, "description": "Download a completed loan document ZIP export.\n\nLocal dev streams the file from disk. Production returns a short-lived signed\nGCS URL so the browser downloads directly without buffering through the API.", "tags": ["Mortgage"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/{loan_id}/handoff/eligibility": {"get": {"operationId": "src_apps_mortgage_api_get_loan_handoff_eligibility", "summary": "Get Loan Handoff Eligibility", "parameters": [{"in": "path", "name": "loan_id", "schema": {"format": "uuid", "title": "Loan Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoanHandoffEligibilityOut"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Check LOS handoff eligibility: webhook configured, borrowers present, not local dev.", "tags": ["Mortgage"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/{loan_id}/handoff": {"post": {"operationId": "src_apps_mortgage_api_start_loan_handoff", "summary": "Start Loan Handoff", "parameters": [{"in": "path", "name": "loan_id", "schema": {"format": "uuid", "title": "Loan Id", "type": "string"}, "required": true}], "responses": {"202": {"description": "Accepted", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoanHandoffStartOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Queue async LOS handoff \u2014 POST flat loan_fields JSON to the selected Zapier webhook.", "tags": ["Mortgage"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoanHandoffStartIn"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/{loan_id}/handoff/{handoff_id}": {"get": {"operationId": "src_apps_mortgage_api_get_loan_handoff_status", "summary": "Get Loan Handoff Status", "parameters": [{"in": "path", "name": "loan_id", "schema": {"format": "uuid", "title": "Loan Id", "type": "string"}, "required": true}, {"in": "path", "name": "handoff_id", "schema": {"title": "Handoff Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoanHandoffStatusOut"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Poll LOS handoff job status after Send to LOS.", "tags": ["Mortgage"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/loan-processing": {"get": {"operationId": "src_apps_mortgage_api_get_loan_processing", "summary": "Get Loan Processing", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoanProcessingConfigSchema"}}}}}, "description": "Org catalog for checkpoints, expirations, tasks, and pipeline card fields.", "tags": ["Mortgage"], "security": [{"NinjaJWTAuth": []}]}, "put": {"operationId": "src_apps_mortgage_api_put_loan_processing", "summary": "Put Loan Processing", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoanProcessingConfigSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Replace org loan processing catalog. Owner/admin only.", "tags": ["Mortgage"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoanProcessingPutSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/loan-checkpoints": {"get": {"operationId": "src_apps_mortgage_api_get_loan_checkpoints", "summary": "Get Loan Checkpoints", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoanCheckpointListSchema"}}}}}, "description": "Backward-compatible org processing config.", "tags": ["Mortgage"], "security": [{"NinjaJWTAuth": []}]}, "put": {"operationId": "src_apps_mortgage_api_put_loan_checkpoints", "summary": "Put Loan Checkpoints", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoanCheckpointListSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Backward-compatible save for org processing catalog.", "tags": ["Mortgage"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoanCheckpointPutSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/{loan_id}/processing": {"get": {"operationId": "src_apps_mortgage_api_get_application_processing", "summary": "Get Application Processing", "parameters": [{"in": "path", "name": "loan_id", "schema": {"format": "uuid", "title": "Loan Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoanProcessingStateSchema"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Per-loan processing state merged with org catalog.", "tags": ["Mortgage"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/{loan_id}/checkpoints": {"get": {"operationId": "src_apps_mortgage_api_get_application_checkpoints", "summary": "Get Application Checkpoints", "parameters": [{"in": "path", "name": "loan_id", "schema": {"format": "uuid", "title": "Loan Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoanCheckpointStateSchema"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Backward-compatible per-loan checkpoint slice.", "tags": ["Mortgage"], "security": [{"NinjaJWTAuth": []}]}, "patch": {"operationId": "src_apps_mortgage_api_patch_application_checkpoints", "summary": "Patch Application Checkpoints", "parameters": [{"in": "path", "name": "loan_id", "schema": {"format": "uuid", "title": "Loan Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoanProcessingStateSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Move loan to a checkpoint or edit a checkpoint timestamp.", "tags": ["Mortgage"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoanCheckpointPatchSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/{loan_id}/expirations": {"patch": {"operationId": "src_apps_mortgage_api_patch_application_expiration", "summary": "Patch Application Expiration", "parameters": [{"in": "path", "name": "loan_id", "schema": {"format": "uuid", "title": "Loan Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoanProcessingStateSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Set or clear an expiration date on a loan.", "tags": ["Mortgage"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoanExpirationPatchSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/{loan_id}/loan-tasks": {"patch": {"operationId": "src_apps_mortgage_api_patch_application_task", "summary": "Patch Application Task", "parameters": [{"in": "path", "name": "loan_id", "schema": {"format": "uuid", "title": "Loan Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoanProcessingStateSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Check or uncheck a loan task.", "tags": ["Mortgage"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoanTaskPatchSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/{loan_id}/status": {"patch": {"operationId": "src_apps_mortgage_api_patch_application_status", "summary": "Patch Application Status", "parameters": [{"in": "path", "name": "loan_id", "schema": {"format": "uuid", "title": "Loan Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoanStatusPatchResponseSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Update loan application status (pipeline board drag).", "tags": ["Mortgage"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoanStatusPatchSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/{loan_id}/portal/submit": {"post": {"operationId": "src_apps_mortgage_api_submit_portal_application", "summary": "Submit Portal Application", "parameters": [{"in": "path", "name": "loan_id", "schema": {"format": "uuid", "title": "Loan Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Borrower portal: submit completed Draft application and notify the LO.", "tags": ["Mortgage"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/pipeline/views": {"get": {"operationId": "src_apps_mortgage_api_list_pipeline_views", "summary": "List Pipeline Views", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/PipelineViewSchema"}, "title": "Response", "type": "array"}}}}}, "description": "List saved pipeline views (org-shared + personal).", "tags": ["Mortgage"], "security": [{"NinjaJWTAuth": []}]}, "post": {"operationId": "src_apps_mortgage_api_create_pipeline_view", "summary": "Create Pipeline View", "parameters": [], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PipelineViewSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["Mortgage"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/PipelineViewCreateSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/pipeline/views/{view_id}": {"get": {"operationId": "src_apps_mortgage_api_get_pipeline_view", "summary": "Get Pipeline View", "parameters": [{"in": "path", "name": "view_id", "schema": {"format": "uuid", "title": "View Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PipelineViewSchema"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["Mortgage"], "security": [{"NinjaJWTAuth": []}]}, "patch": {"operationId": "src_apps_mortgage_api_update_pipeline_view", "summary": "Update Pipeline View", "parameters": [{"in": "path", "name": "view_id", "schema": {"format": "uuid", "title": "View Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PipelineViewSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["Mortgage"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/PipelineViewUpdateSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}, "delete": {"operationId": "src_apps_mortgage_api_delete_pipeline_view", "summary": "Delete Pipeline View", "parameters": [{"in": "path", "name": "view_id", "schema": {"format": "uuid", "title": "View Id", "type": "string"}, "required": true}], "responses": {"204": {"description": "No Content"}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["Mortgage"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/custom-fields": {"get": {"operationId": "src_apps_mortgage_api_list_custom_fields", "summary": "List Custom Fields", "parameters": [{"in": "query", "name": "source", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Source"}, "required": false}, {"in": "query", "name": "visible_only", "schema": {"default": true, "title": "Visible Only", "type": "boolean"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/LoanCustomFieldSchema"}, "title": "Response", "type": "array"}}}}}, "description": "List all registered custom fields for search/filtering.\n\nUse this to discover available keys in additional_data JSON fields.\nSimilar to CRM's OrganizationCustomField for system_data lookups.", "tags": ["Mortgage"], "security": [{"NinjaJWTAuth": []}]}, "post": {"operationId": "src_apps_mortgage_api_create_custom_field", "summary": "Create Custom Field", "parameters": [], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoanCustomFieldSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Register a new custom field key.\n\nUsed when users add manual custom fields not from MISMO imports.", "tags": ["Mortgage"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoanCustomFieldCreateSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/{application_id}/additional-data": {"get": {"operationId": "src_apps_mortgage_api_get_application_additional_data", "summary": "Get Application Additional Data", "parameters": [{"in": "path", "name": "application_id", "schema": {"title": "Application Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoanAdditionalDataSchema"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Get the additional_data JSON for a loan application.\n\nContains unmapped MISMO fields and custom data.", "tags": ["Mortgage"], "security": [{"NinjaJWTAuth": []}]}, "patch": {"operationId": "src_apps_mortgage_api_update_application_additional_data", "summary": "Update Application Additional Data", "parameters": [{"in": "path", "name": "application_id", "schema": {"title": "Application Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoanAdditionalDataSchema"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Update the additional_data JSON for a loan application.\n\nMerges provided data with existing additional_data.\nAuto-registers new keys to the custom field registry.", "tags": ["Mortgage"], "requestBody": {"content": {"application/json": {"schema": {"additionalProperties": true, "title": "Payload", "type": "object"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/{application_id}/additional-data/page": {"get": {"operationId": "src_apps_mortgage_api_get_application_additional_data_page", "summary": "Get Application Additional Data Page", "parameters": [{"in": "path", "name": "application_id", "schema": {"title": "Application Id", "type": "string"}, "required": true}, {"in": "query", "name": "page", "schema": {"default": 1, "title": "Page", "type": "integer"}, "required": false}, {"in": "query", "name": "limit", "schema": {"default": 25, "title": "Limit", "type": "integer"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoanAdditionalDataPageSchema"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Get a paginated flat view of additional_data for a loan application.\n\nUsed by the qualification screen to avoid loading the full JSON blob at once.", "tags": ["Mortgage"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/import/bulk/zip": {"post": {"operationId": "src_apps_mortgage_api_import_bulk_zip", "summary": "Import Bulk Zip", "parameters": [], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Start bulk import from an uploaded ZIP file.\nReturns job ID for progress tracking.", "tags": ["Mortgage"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/BulkZipImportSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/import/bulk/files": {"post": {"operationId": "src_apps_mortgage_api_import_bulk_files", "summary": "Import Bulk Files", "parameters": [], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Start bulk import from multiple XML documents.", "tags": ["Mortgage"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/BulkFilesImportSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/import/jobs/{job_id}": {"get": {"operationId": "src_apps_mortgage_api_get_import_job", "summary": "Get Import Job", "parameters": [{"in": "path", "name": "job_id", "schema": {"format": "uuid", "title": "Job Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Get status of a bulk import job.", "tags": ["Mortgage"], "security": [{"NinjaJWTAuth": []}]}, "delete": {"operationId": "src_apps_mortgage_api_del_import_job", "summary": "Del Import Job", "parameters": [{"in": "path", "name": "job_id", "schema": {"format": "uuid", "title": "Job Id", "type": "string"}, "required": true}], "responses": {"204": {"description": "No Content"}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Delete an import job record. Imported loans are NOT deleted.", "tags": ["Mortgage"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/import/jobs": {"get": {"operationId": "src_apps_mortgage_api_list_import_jobs", "summary": "List Import Jobs", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"additionalProperties": true, "type": "object"}, "title": "Response", "type": "array"}}}}}, "description": "List user's bulk import jobs.", "tags": ["Mortgage"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/import/jobs/{job_id}/retry": {"post": {"operationId": "src_apps_mortgage_api_retry_loan_import", "summary": "Retry Loan Import", "parameters": [{"in": "path", "name": "job_id", "schema": {"format": "uuid", "title": "Job Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Retry a FAILED loan import. Resumes from last checkpoint.", "tags": ["Mortgage"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/{loan_id}/audit": {"get": {"operationId": "src_apps_mortgage_api_get_audit_log", "summary": "Get Audit Log", "parameters": [{"in": "path", "name": "loan_id", "schema": {"format": "uuid", "title": "Loan Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"additionalProperties": true, "type": "object"}, "title": "Response", "type": "array"}}}}}, "description": "Returns the simple_history audit trail for a LoanApplication.\nEach entry shows what changed, when, and by whom.", "tags": ["Mortgage"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/{app_id}/proposals": {"get": {"operationId": "src_apps_mortgage_api_list_proposals", "summary": "List Proposals", "parameters": [{"in": "path", "name": "app_id", "schema": {"title": "App Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/WorksheetLiteSchema"}, "title": "Response", "type": "array"}}}}}, "description": "List all proposal worksheets for a loan.", "tags": ["Mortgage"], "security": [{"NinjaJWTAuth": []}]}, "post": {"operationId": "src_apps_mortgage_api_create_proposal", "summary": "Create Proposal", "parameters": [{"in": "path", "name": "app_id", "schema": {"title": "App Id", "type": "string"}, "required": true}], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Create a new proposal worksheet.", "tags": ["Mortgage"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/WorksheetCreateSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/proposals/{worksheet_id}": {"patch": {"operationId": "src_apps_mortgage_api_update_proposal", "summary": "Update Proposal", "parameters": [{"in": "path", "name": "worksheet_id", "schema": {"title": "Worksheet Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Update worksheet name, scenarios, or selected_scenarios.", "tags": ["Mortgage"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/WorksheetUpdateSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}, "delete": {"operationId": "src_apps_mortgage_api_delete_proposal", "summary": "Delete Proposal", "parameters": [{"in": "path", "name": "worksheet_id", "schema": {"title": "Worksheet Id", "type": "string"}, "required": true}], "responses": {"204": {"description": "No Content"}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Delete a proposal worksheet.", "tags": ["Mortgage"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/{app_id}/proposals/current": {"get": {"operationId": "src_apps_mortgage_api_get_current_loan", "summary": "Get Current Loan", "parameters": [{"in": "path", "name": "app_id", "schema": {"title": "App Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Fetch current loan snapshot for the proposal comparison column.", "tags": ["Mortgage"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/{app_id}/proposals/compare": {"post": {"operationId": "src_apps_mortgage_api_compare_scenarios", "summary": "Compare Scenarios", "parameters": [{"in": "path", "name": "app_id", "schema": {"title": "App Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Compute comparison: current loan vs scenarios.\n\nSend either a worksheet_id to use saved scenarios,\nor an ad-hoc list of scenarios.", "tags": ["Mortgage"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ComparisonRequestSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/{app_id}/proposals/email": {"post": {"operationId": "src_apps_mortgage_api_email_proposal_to_borrower", "summary": "Email Proposal To Borrower", "parameters": [{"in": "path", "name": "app_id", "schema": {"title": "App Id", "type": "string"}, "required": true}], "responses": {"202": {"description": "Accepted", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Queue loan comparison worksheet PDF \u2014 save to loan documents and email the borrower.", "tags": ["Mortgage"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ComparisonRequestSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/{app_id}/proposals/save": {"post": {"operationId": "src_apps_mortgage_api_save_proposal_to_documents", "summary": "Save Proposal To Documents", "parameters": [{"in": "path", "name": "app_id", "schema": {"title": "App Id", "type": "string"}, "required": true}], "responses": {"410": {"description": "Gone", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Deprecated \u2014 use /proposals/email.", "tags": ["Mortgage"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ComparisonRequestSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/{app_id}/proposals/pdf": {"post": {"operationId": "src_apps_mortgage_api_gen_proposal_report", "summary": "Gen Proposal Report", "parameters": [{"in": "path", "name": "app_id", "schema": {"title": "App Id", "type": "string"}, "required": true}], "responses": {"410": {"description": "Gone", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Deprecated \u2014 use /proposals/email or /proposals/preview.", "tags": ["Mortgage"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ComparisonRequestSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/{app_id}/proposals/preview": {"post": {"operationId": "src_apps_mortgage_api_preview_proposal_report", "summary": "Preview Proposal Report", "parameters": [{"in": "path", "name": "app_id", "schema": {"title": "App Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"format": "binary", "title": "Response", "type": "string"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Sync PDF preview for template iteration (WeasyPrint). Local/dev friendly.", "tags": ["Mortgage"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ComparisonRequestSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/{app_id}/fees": {"get": {"operationId": "src_apps_mortgage_api_get_loan_fees", "summary": "Get Loan Fees", "parameters": [{"in": "path", "name": "app_id", "schema": {"format": "uuid", "title": "App Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/FeeWorksheetSchema"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Itemized fee worksheet (CD page 2). Not a Loan Estimate.", "tags": ["Mortgage"], "security": [{"NinjaJWTAuth": []}]}, "post": {"operationId": "src_apps_mortgage_api_add_loan_fee", "summary": "Add Loan Fee", "parameters": [{"in": "path", "name": "app_id", "schema": {"format": "uuid", "title": "App Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/FeeWorksheetSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Add a fee line. Returns the full worksheet.", "tags": ["Mortgage"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/FeeCreateSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/fees/{line_id}": {"patch": {"operationId": "src_apps_mortgage_api_set_loan_fee", "summary": "Set Loan Fee", "parameters": [{"in": "path", "name": "line_id", "schema": {"format": "uuid", "title": "Line Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/FeeWorksheetSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Update a fee line. kind is required.", "tags": ["Mortgage"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/FeeUpdateSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}, "delete": {"operationId": "src_apps_mortgage_api_del_loan_fee", "summary": "Del Loan Fee", "parameters": [{"in": "path", "name": "line_id", "schema": {"format": "uuid", "title": "Line Id", "type": "string"}, "required": true}, {"in": "query", "name": "kind", "schema": {"title": "Kind", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/FeeWorksheetSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Delete a fee line. kind is required.", "tags": ["Mortgage"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/{app_id}/convo-log": {"get": {"operationId": "src_apps_mortgage_api_list_convo_log", "summary": "List Convo Log", "parameters": [{"in": "path", "name": "app_id", "schema": {"title": "App Id", "type": "string"}, "required": true}, {"in": "query", "name": "category", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Category"}, "required": false}, {"in": "query", "name": "search", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Search"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/ConvoLogSchema"}, "title": "Response", "type": "array"}}}}}, "description": "List conversation log entries for a loan, newest first.", "tags": ["Mortgage"], "security": [{"NinjaJWTAuth": []}]}, "post": {"operationId": "src_apps_mortgage_api_add_convo_log", "summary": "Add Convo Log", "parameters": [{"in": "path", "name": "app_id", "schema": {"title": "App Id", "type": "string"}, "required": true}], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ConvoLogSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Add a conversation log entry.", "tags": ["Mortgage"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ConvoLogCreateSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/{app_id}/qualification": {"get": {"operationId": "src_apps_mortgage_api_get_qualification", "summary": "Get Qualification", "parameters": [{"in": "path", "name": "app_id", "schema": {"title": "App Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/QualificationResponse"}}}}}, "description": "Get all qualification tab data for a loan.", "tags": ["Mortgage"], "security": [{"NinjaJWTAuth": []}]}, "patch": {"operationId": "src_apps_mortgage_api_patch_qualification", "summary": "Patch Qualification", "parameters": [{"in": "path", "name": "app_id", "schema": {"title": "App Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Update qualification tab fields across models.", "tags": ["Mortgage"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/QualificationPatch"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/{app_id}/qualification/pre-approval/preview": {"get": {"operationId": "src_apps_mortgage_api_preview_pre_approval_letter", "summary": "Preview Pre Approval Letter", "parameters": [{"in": "path", "name": "app_id", "schema": {"title": "App Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"format": "binary", "title": "Response", "type": "string"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Sync PDF preview of purchase pre-approval letter (WeasyPrint).", "tags": ["Mortgage"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/{app_id}/qualification/pre-approval/email": {"post": {"operationId": "src_apps_mortgage_api_email_pre_approval_letter", "summary": "Email Pre Approval Letter", "parameters": [{"in": "path", "name": "app_id", "schema": {"title": "App Id", "type": "string"}, "required": true}], "responses": {"202": {"description": "Accepted", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Queue pre-approval letter PDF \u2014 save to loan documents and email the borrower.", "tags": ["Mortgage"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/import/csv/analyze": {"post": {"operationId": "src_apps_mortgage_api_analyze_loan_csv_import", "summary": "Analyze Loan Csv Import", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoanCsvAnalyzeResponseSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Analyze CSV for loan fallback bulk create \u2014 headers, auto-map, field catalog.", "tags": ["Mortgage"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoanCsvAnalyzeSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/import/csv/start": {"post": {"operationId": "src_apps_mortgage_api_start_loan_csv_import", "summary": "Start Loan Csv Import", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Start loan CSV fallback bulk create after column mapping.", "tags": ["Mortgage"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoanCsvStartSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/import/csv/jobs": {"get": {"operationId": "src_apps_mortgage_api_list_loan_csv_import_jobs", "summary": "List Loan Csv Import Jobs", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/LoanCsvJobSchema"}, "title": "Response", "type": "array"}}}}}, "description": "Recent loan CSV import jobs for the current organization.", "tags": ["Mortgage"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/import/csv/jobs/{job_id}": {"get": {"operationId": "src_apps_mortgage_api_get_loan_csv_import_job", "summary": "Get Loan Csv Import Job", "parameters": [{"in": "path", "name": "job_id", "schema": {"title": "Job Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoanCsvJobSchema"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Get a single loan CSV import job.", "tags": ["Mortgage"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/import/csv/jobs/{job_id}/retry": {"post": {"operationId": "src_apps_mortgage_api_retry_loan_csv_import", "summary": "Retry Loan Csv Import", "parameters": [{"in": "path", "name": "job_id", "schema": {"title": "Job Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Retry a FAILED loan CSV import from last checkpoint.", "tags": ["Mortgage"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/update/analyze": {"post": {"operationId": "src_apps_mortgage_api_analyze_loan_csv", "summary": "Analyze Loan Csv", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Analyze a CSV for loan update \u2014 returns headers, distinct values, predicted mapping.", "tags": ["Mortgage"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoanUpdateAnalyzeSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/mortgage/applications/update/apply": {"post": {"operationId": "src_apps_mortgage_api_apply_loan_csv", "summary": "Apply Loan Csv", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Apply CSV updates to loans \u2014 maps values and bulk-updates matched loans.", "tags": ["Mortgage"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoanUpdateApplySchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/integrations/phone/numbers": {"get": {"operationId": "src_apps_integrations_api_list_numbers", "summary": "List Numbers", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/PhoneNumberOut"}, "title": "Response", "type": "array"}}}}}, "description": "List org's phone numbers (TFN + local presence).", "tags": ["Integrations"], "security": [{"NinjaJWTAuth": []}]}, "post": {"operationId": "src_apps_integrations_api_buy_number", "summary": "Buy Number", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PhoneNumberOut"}}}}}, "description": "Purchase a local presence number (non-TFN). Use buy-and-verify for TFN.", "tags": ["Integrations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/BuyNumberIn"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/integrations/phone/search/toll-free": {"get": {"operationId": "src_apps_integrations_api_search_tfn", "summary": "Search Tfn", "parameters": [{"in": "query", "name": "country", "schema": {"default": "US", "title": "Country", "type": "string"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/AvailableNumberOut"}, "title": "Response", "type": "array"}}}}}, "description": "Search available toll-free numbers.", "tags": ["Integrations"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/integrations/phone/search/local": {"get": {"operationId": "src_apps_integrations_api_search_local", "summary": "Search Local", "parameters": [{"in": "query", "name": "area_code", "schema": {"title": "Area Code", "type": "string"}, "required": true}, {"in": "query", "name": "country", "schema": {"default": "US", "title": "Country", "type": "string"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/AvailableNumberOut"}, "title": "Response", "type": "array"}}}}}, "description": "Search local numbers by area code.", "tags": ["Integrations"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/integrations/phone/settings": {"get": {"operationId": "src_apps_integrations_api_get_phone_settings", "summary": "Get Phone Settings", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PhoneSettingsOut"}}}}}, "description": "Return the PhoneTab hosting gate. Unset until the org explicitly chooses.", "tags": ["Integrations"], "security": [{"NinjaJWTAuth": []}]}, "patch": {"operationId": "src_apps_integrations_api_patch_phone_settings", "summary": "Patch Phone Settings", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PhoneSettingsOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Persist settings.sponsored_telephony. Locked after a MAIN_TFN exists.", "tags": ["Integrations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/PhoneSettingsPatch"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/integrations/email/domains": {"get": {"operationId": "src_apps_integrations_api_list_domains", "summary": "List Domains", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/SendingDomainOut"}, "title": "Response", "type": "array"}}}}}, "description": "List org's sending domains.", "tags": ["Integrations"], "security": [{"NinjaJWTAuth": []}]}, "post": {"operationId": "src_apps_integrations_api_provision_domain", "summary": "Provision Domain", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Register a domain with SES and get DKIM CNAME records.", "tags": ["Integrations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/DomainProvisionIn"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/integrations/email/domains/verify": {"post": {"operationId": "src_apps_integrations_api_verify_domain", "summary": "Verify Domain", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Check/refresh DKIM verification status for a domain.", "tags": ["Integrations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/DomainProvisionIn"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/integrations/phone/tfn-profile": {"get": {"operationId": "src_apps_integrations_api_get_tfn_profile", "summary": "Get Tfn Profile", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TFNProfileOut"}}}}}, "description": "Return the org's current TFN verification profile.", "tags": ["Integrations"], "security": [{"NinjaJWTAuth": []}]}, "post": {"operationId": "src_apps_integrations_api_save_tfn_profile", "summary": "Save Tfn Profile", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TFNProfileOut"}}}}}, "description": "Save business registration fields + messaging use-case profile.", "tags": ["Integrations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/TFNProfileIn"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/integrations/phone/compliance/business-profile/submit": {"post": {"operationId": "src_apps_integrations_api_submit_business_profile", "summary": "Submit Business Profile", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TFNProfileOut"}}}}}, "description": "Submit the tenant Trust Hub Business Profile for review.", "tags": ["Integrations"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/integrations/phone/compliance/shaken/submit": {"post": {"operationId": "src_apps_integrations_api_submit_shaken", "summary": "Submit Shaken", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TFNProfileOut"}}}}}, "description": "Submit SHAKEN/STIR once the Business Profile is approved.", "tags": ["Integrations"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/integrations/phone/buy-and-verify": {"post": {"operationId": "src_apps_integrations_api_buy_and_verify", "summary": "Buy And Verify", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PhoneNumberOut"}}}}}, "description": "Buy a toll-free number and immediately submit TFN verification.", "tags": ["Integrations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/BuyAndVerifyIn"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/integrations/phone/{phone_id}/verify-status": {"get": {"operationId": "src_apps_integrations_api_check_verify_status", "summary": "Check Verify Status", "parameters": [{"in": "path", "name": "phone_id", "schema": {"title": "Phone Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/VerifyStatusOut"}}}}}, "description": "Check current TFN verification status from Twilio.", "tags": ["Integrations"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/integrations/phone/{phone_id}/submit-verify": {"post": {"operationId": "src_apps_integrations_api_submit_verify", "summary": "Submit Verify", "parameters": [{"in": "path", "name": "phone_id", "schema": {"title": "Phone Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PhoneNumberOut"}}}}}, "description": "Submit TFN verification for an unverified number.", "tags": ["Integrations"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/integrations/phone/{phone_id}/resubmit": {"post": {"operationId": "src_apps_integrations_api_resubmit_verify", "summary": "Resubmit Verify", "parameters": [{"in": "path", "name": "phone_id", "schema": {"title": "Phone Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PhoneNumberOut"}}}}}, "description": "Resubmit a rejected TFN verification with corrected data.", "tags": ["Integrations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ResubmitIn"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/integrations/phone/{phone_id}/cancel-verify": {"delete": {"operationId": "src_apps_integrations_api_cancel_verify", "summary": "Cancel Verify", "parameters": [{"in": "path", "name": "phone_id", "schema": {"title": "Phone Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PhoneNumberOut"}}}}}, "description": "Cancel a pending or rejected TFN verification and reset to unverified.", "tags": ["Integrations"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/integrations/phone/optin-upload": {"post": {"operationId": "src_apps_integrations_api_upload_optin", "summary": "Upload Optin", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Upload an opt-in screenshot for TFN verification. Returns public URL.", "tags": ["Integrations"], "requestBody": {"content": {"multipart/form-data": {"schema": {"properties": {"file": {"format": "binary", "title": "File", "type": "string"}}, "required": ["file"], "title": "FileParams", "type": "object"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/integrations/email/alias": {"get": {"operationId": "src_apps_integrations_api_get_alias", "summary": "Get Alias", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"anyOf": [{"$ref": "#/components/schemas/EmailAliasOut"}, {"type": "null"}]}}}}}, "description": "Get the org's email alias (one per org).", "tags": ["Integrations"], "security": [{"NinjaJWTAuth": []}]}, "post": {"operationId": "src_apps_integrations_api_upsert_alias", "summary": "Upsert Alias", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EmailAliasOut"}}}}}, "description": "Create or update the org's email alias (one per org).", "tags": ["Integrations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/EmailAliasIn"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/integrations/webhook-endpoints": {"get": {"operationId": "src_apps_integrations_api_list_webhook_endpoints", "summary": "List Webhook Endpoints", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/WebhookEndpointOut"}, "title": "Response", "type": "array"}}}}}, "description": "List outbound webhook endpoints for this organization.", "tags": ["Integrations"], "security": [{"NinjaJWTAuth": []}]}, "post": {"operationId": "src_apps_integrations_api_create_webhook_endpoint", "summary": "Create Webhook Endpoint", "parameters": [], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WebhookEndpointCreateOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Create a Zapier Catch Hook endpoint. Returns security token once.", "tags": ["Integrations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/WebhookEndpointCreateIn"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/integrations/webhook-endpoints/{endpoint_id}": {"patch": {"operationId": "src_apps_integrations_api_update_webhook_endpoint", "summary": "Update Webhook Endpoint", "parameters": [{"in": "path", "name": "endpoint_id", "schema": {"format": "uuid", "title": "Endpoint Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WebhookEndpointOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Update a webhook endpoint.", "tags": ["Integrations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/WebhookEndpointUpdateIn"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}, "delete": {"operationId": "src_apps_integrations_api_delete_webhook_endpoint", "summary": "Delete Webhook Endpoint", "parameters": [{"in": "path", "name": "endpoint_id", "schema": {"format": "uuid", "title": "Endpoint Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Deactivate a webhook endpoint.", "tags": ["Integrations"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/integrations/api-keys": {"get": {"operationId": "src_apps_integrations_api_list_api_keys", "summary": "List Api Keys", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/ApiKeyOut"}, "title": "Response", "type": "array"}}}}}, "description": "List org's API keys.", "tags": ["Integrations"], "security": [{"NinjaJWTAuth": []}]}, "post": {"operationId": "src_apps_integrations_api_create_api_key", "summary": "Create Api Key", "parameters": [], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiKeyCreateOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Generate a new API key. The raw key is returned ONCE.", "tags": ["Integrations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiKeyCreateIn"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/integrations/api-keys/{key_id}": {"delete": {"operationId": "src_apps_integrations_api_revoke_api_key", "summary": "Revoke Api Key", "parameters": [{"in": "path", "name": "key_id", "schema": {"title": "Key Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Revoke (deactivate) an API key.", "tags": ["Integrations"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/integrations/lead-intake/v1": {"post": {"operationId": "src_apps_integrations_api_take_lead", "summary": "Take Lead", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LeadIntakeOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Accept a provider-posted lead with a bearer API key.", "tags": ["Integrations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/LeadIntakeIn"}}}, "required": true}}}, "/api/v1/integrations/los-sync-keys": {"get": {"operationId": "src_apps_integrations_api_list_los_sync_keys", "summary": "List Los Sync Keys", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/LosSyncKeyOut"}, "title": "Response", "type": "array"}}}}}, "description": "List org LOS sync inbound API keys.", "tags": ["Integrations"], "security": [{"NinjaJWTAuth": []}]}, "post": {"operationId": "src_apps_integrations_api_create_los_sync_key", "summary": "Create Los Sync Key", "parameters": [], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LosSyncKeyCreateOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Generate a LOS sync inbound key. Raw key returned once.", "tags": ["Integrations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/LosSyncKeyCreateIn"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/integrations/los-sync-keys/{key_id}": {"delete": {"operationId": "src_apps_integrations_api_revoke_los_sync_key", "summary": "Revoke Los Sync Key", "parameters": [{"in": "path", "name": "key_id", "schema": {"title": "Key Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Revoke a LOS sync inbound API key.", "tags": ["Integrations"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/integrations/los-sync/v1": {"post": {"operationId": "src_apps_integrations_api_take_los_sync", "summary": "Take Los Sync", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LosSyncOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Accept inbound LOS JSON (Zapier \u2192 Lucy). Match loan by crmReferenceId.", "tags": ["Integrations"], "requestBody": {"content": {"application/json": {"schema": {"additionalProperties": true, "default": {}, "title": "Payload", "type": "object"}}}, "required": false}}}, "/api/v1/webhooks/twilio/voice/transfer": {"post": {"operationId": "src_apps_integrations_webhooks_twilio_voice_transfer", "summary": "Twilio Voice Transfer", "parameters": [], "responses": {"200": {"description": "OK"}}, "description": "Handle screened transfer callbacks from Twilio.\nValidates the tenant subaccount before emitting a room-data event back into Lucy.", "tags": ["Webhooks"]}}, "/api/v1/webhooks/twilio/sms": {"post": {"operationId": "src_apps_integrations_webhooks_twilio_sms", "summary": "Twilio Sms", "parameters": [], "responses": {"200": {"description": "OK"}}, "description": "Handle inbound SMS from Twilio.\nTwilio sends form-encoded data, not JSON.\n\nFlow:\n1. Parse TO number \u2192 look up PhoneNumber \u2192 get org\n2. Cross-check AccountSid matches org's subaccount SID\n3. Verify X-Twilio-Signature using org's auth token\n4. Parse FROM number \u2192 look up Contact in that org\n5. Check for STOP \u2192 set sms_opt_out on contact\n6. Dispatch to Lucy for AI processing + response", "tags": ["Webhooks"]}}, "/api/v1/webhooks/twilio/sms/status": {"post": {"operationId": "src_apps_integrations_webhooks_twilio_sms_status", "summary": "Twilio Sms Status", "parameters": [], "responses": {"200": {"description": "OK"}}, "description": "Handle outbound SMS status callbacks from Twilio.", "tags": ["Webhooks"]}}, "/api/v1/webhooks/twilio/compliance": {"post": {"operationId": "src_apps_integrations_webhooks_twilio_compliance", "summary": "Twilio Compliance", "parameters": [], "responses": {"200": {"description": "OK"}}, "description": "Handle Twilio Trust Hub / SHAKEN status callbacks.", "tags": ["Webhooks"]}}, "/api/v1/webhooks/ses/events": {"post": {"operationId": "src_apps_integrations_webhooks_ses_events", "summary": "Ses Events", "parameters": [], "responses": {"200": {"description": "OK"}}, "description": "Handle SES event notifications delivered via SNS.\nCovers 3 message types:\n  1. SubscriptionConfirmation \u2014 one-time handshake with SNS\n2. Notification (Bounce/Complaint/Reject) \u2014 deliverability tracking\n  3. Notification (Inbound Email) \u2014 reply routing to Lucy\n\nSNS sends JSON with Content-Type: text/plain.", "tags": ["Webhooks"]}}, "/api/v1/webhooks/email/unsubscribe": {"get": {"operationId": "src_apps_integrations_webhooks_email_unsubscribe", "summary": "Email Unsubscribe", "parameters": [], "responses": {"200": {"description": "OK"}}, "tags": ["Webhooks"]}, "post": {"operationId": "src_apps_integrations_webhooks_email_unsubscribe_post", "summary": "Email Unsubscribe Post", "parameters": [], "responses": {"200": {"description": "OK"}}, "tags": ["Webhooks"]}}, "/api/v1/webhooks/email/blast-asset": {"get": {"operationId": "src_apps_integrations_webhooks_email_blast_asset", "summary": "Email Blast Asset", "parameters": [], "responses": {"200": {"description": "OK"}}, "tags": ["Webhooks"]}}, "/api/v1/billing/plans": {"get": {"operationId": "src_apps_billing_api_list_plans", "summary": "List Plans", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/PlanOut"}, "title": "Response", "type": "array"}}}}}, "description": "List all active public plans.", "tags": ["Billing"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/billing/select-plan": {"post": {"operationId": "src_apps_billing_api_select_plan", "summary": "Select Plan", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Save plan selection during onboarding (before payment is set up).", "tags": ["Billing"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/SelectPlanIn"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/billing/subscription": {"get": {"operationId": "src_apps_billing_api_get_subscription", "summary": "Get Subscription", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SubscriptionOut"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Get the current org's subscription.", "tags": ["Billing"], "security": [{"NinjaJWTAuth": []}]}, "post": {"operationId": "src_apps_billing_api_create_subscription", "summary": "Create Subscription", "parameters": [], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SubscriptionOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Create a subscription (plan selection during onboarding).", "tags": ["Billing"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/SelectPlanIn"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/billing/subscription/preview": {"post": {"operationId": "src_apps_billing_api_preview_subscription", "summary": "Preview Subscription", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PlanPreviewOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Preview the server-calculated subscription charge before activation.", "tags": ["Billing"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/SelectPlanIn"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/billing/subscription/plan": {"put": {"operationId": "src_apps_billing_api_change_plan", "summary": "Change Plan", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SubscriptionOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Upgrade or downgrade the plan (Copilot \u2194 LOA).", "tags": ["Billing"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/SelectPlanIn"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/billing/subscription/seats/preview": {"post": {"operationId": "src_apps_billing_api_preview_seats", "summary": "Preview Seats", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SeatPreviewOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Preview prorated charge before changing Enterprise seat mix.", "tags": ["Billing"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateSeatsIn"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/billing/subscription/seats": {"put": {"operationId": "src_apps_billing_api_update_seats", "summary": "Update Seats", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SubscriptionOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Update seat count.", "tags": ["Billing"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateSeatsIn"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/billing/subscription/cancel": {"post": {"operationId": "src_apps_billing_api_cancel_subscription", "summary": "Cancel Subscription", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SubscriptionOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Cancel subscription at end of current period.", "tags": ["Billing"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/billing/subscription/reactivate": {"post": {"operationId": "src_apps_billing_api_reactivate_subscription", "summary": "Reactivate Subscription", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SubscriptionOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Undo a pending cancellation.", "tags": ["Billing"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/billing/subscription/restart": {"post": {"operationId": "src_apps_billing_api_restart_subscription", "summary": "Restart Subscription", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SubscriptionOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Restart a lapsed subscription on the current plan.", "tags": ["Billing"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/billing/wallet": {"get": {"operationId": "src_apps_billing_api_get_wallet", "summary": "Get Wallet", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WalletOut"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Get the org's wallet balance and settings.", "tags": ["Billing"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/billing/wallet/settings": {"put": {"operationId": "src_apps_billing_api_update_wallet_settings", "summary": "Update Wallet Settings", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WalletOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Update auto-refill configuration.", "tags": ["Billing"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/WalletSettingsIn"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/billing/wallet/refill": {"post": {"operationId": "src_apps_billing_api_refill_wallet", "summary": "Refill Wallet", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WalletOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Charge the stored card and refill the org wallet now.", "tags": ["Billing"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/billing/wallet/transactions": {"get": {"operationId": "src_apps_billing_api_list_wallet_txns", "summary": "List Wallet Txns", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/WalletTxnOut"}, "title": "Response", "type": "array"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "List recent wallet transactions.", "tags": ["Billing"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/billing/payment-history": {"get": {"operationId": "src_apps_billing_api_list_pay_hist", "summary": "List Pay Hist", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/PaymentHistOut"}, "title": "Response", "type": "array"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "List recent card charges for subscriptions and wallet refills.", "tags": ["Billing"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/billing/wallet/transactions/{txn_id}/pdf": {"get": {"operationId": "src_apps_billing_api_get_wallet_pdf", "summary": "Get Wallet Pdf", "parameters": [{"in": "path", "name": "txn_id", "schema": {"format": "uuid", "title": "Txn Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"format": "binary", "title": "Response", "type": "string"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Download a wallet charge receipt PDF.", "tags": ["Billing"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/billing/usage": {"get": {"operationId": "src_apps_billing_api_get_usage", "summary": "Get Usage", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UsageOut"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Get current period usage summary.", "tags": ["Billing"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/billing/daily-limits": {"get": {"operationId": "src_apps_billing_api_get_day_lim", "summary": "Get Day Lim", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DayLimOut"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Get today's outbound automation usage versus daily limits.", "tags": ["Billing"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/billing/usage-report": {"get": {"operationId": "src_apps_billing_api_get_usage_rep", "summary": "Get Usage Rep", "parameters": [{"in": "query", "name": "range_key", "schema": {"default": "month", "title": "Range Key", "type": "string"}, "required": false}, {"in": "query", "name": "start_date", "schema": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "Start Date"}, "required": false}, {"in": "query", "name": "end_date", "schema": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "End Date"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UsageRepOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Get range-based billing usage report data.", "tags": ["Billing"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/billing/payment-method": {"post": {"operationId": "src_apps_billing_api_add_payment_method", "summary": "Add Payment Method", "parameters": [], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PaymentMethodOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Add a payment method using Accept.js opaque data.\nFrontend tokenizes card via Accept.js, sends nonce here.", "tags": ["Billing"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/AddPaymentIn"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}, "get": {"operationId": "src_apps_billing_api_get_payment_method", "summary": "Get Payment Method", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PaymentMethodOut"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Get the current stored payment method details.", "tags": ["Billing"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/billing/billing-address": {"put": {"operationId": "src_apps_billing_api_update_billing_address", "summary": "Update Billing Address", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BillingAddressOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Save billing address and sync billTo to Authorize.net when a card is on file.", "tags": ["Billing"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/BillingAddressIn"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/billing/invoices": {"get": {"operationId": "src_apps_billing_api_list_invoices", "summary": "List Invoices", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/InvoiceOut"}, "title": "Response", "type": "array"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "List invoices for the current org.", "tags": ["Billing"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/billing/invoices/{invoice_id}/pdf": {"get": {"operationId": "src_apps_billing_api_get_invoice_pdf", "summary": "Get Invoice Pdf", "parameters": [{"in": "path", "name": "invoice_id", "schema": {"format": "uuid", "title": "Invoice Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"format": "binary", "title": "Response", "type": "string"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Download an invoice PDF for the current org.", "tags": ["Billing"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/errors/report/": {"post": {"operationId": "src_apps_shared_api_report_error", "summary": "Report Error", "parameters": [], "responses": {"202": {"description": "Accepted", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "429": {"description": "Too Many Requests", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "description": "Accept a frontend error report and fire an email alert.", "tags": ["Errors"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/FrontendErrorIn"}}}, "required": true}}}, "/api/v1/search/fields": {"get": {"operationId": "src_apps_shared_api_list_fields", "summary": "List Fields", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/FieldGroupSchema"}, "title": "Response", "type": "array"}}}}}, "description": "Return the full field catalog grouped by source.\nUsed by the Segment Builder UI to render field pickers.", "tags": ["Search"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/search/evaluate": {"post": {"operationId": "src_apps_shared_api_evaluate_filters", "summary": "Evaluate Filters", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EvalResponseSchema"}}}}}, "description": "Evaluate a grouped filter spec and return matching contacts.\n\nCompatibility:\n- New clients send `filter` as a recursive group.\n- Older clients can still send `conditions` + `logic`.", "tags": ["Search"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/EvalRequestSchema"}}}, "required": true}, "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/system/status": {"get": {"operationId": "src_apps_shared_api_get_system_status", "summary": "Get System Status", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MaintenanceStatusSchema"}}}}}, "tags": ["System"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/geo/zip-lookup": {"get": {"operationId": "src_apps_shared_api_zip_lookup", "summary": "Zip Lookup", "parameters": [{"in": "query", "name": "zip_code", "schema": {"title": "Zip Code", "type": "string"}, "required": true}, {"in": "query", "name": "state", "schema": {"default": "", "title": "State", "type": "string"}, "required": false}, {"in": "query", "name": "city", "schema": {"default": "", "title": "City", "type": "string"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ZipLookupResponseSchema"}}}}}, "tags": ["Geo"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/templates": {"get": {"operationId": "src_apps_shared_api_list_prompt_templates", "summary": "List Prompt Templates", "parameters": [{"in": "query", "name": "category", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Category"}, "required": false}, {"in": "query", "name": "campaign_type", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Campaign Type"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PromptTemplateListSchema"}}}}}, "tags": ["Templates"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/templates/{template_id}": {"get": {"operationId": "src_apps_shared_api_get_prompt_template", "summary": "Get Prompt Template", "parameters": [{"in": "path", "name": "template_id", "schema": {"title": "Template Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PromptTemplateDetailSchema"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}}, "tags": ["Templates"], "security": [{"NinjaJWTAuth": []}]}}, "/api/v1/token/pair": {"post": {"operationId": "token_obtain_pair", "summary": "Obtain Token", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TokenObtainPairOutputSchema"}}}}}, "tags": ["token"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/TokenObtainPairInputSchema"}}}, "required": true}}}, "/api/v1/token/refresh": {"post": {"operationId": "token_refresh", "summary": "Refresh Token", "parameters": [], "responses": {"200": {"description": "OK"}}, "tags": ["token"]}}}, "components": {"schemas": {"PingOut": {"properties": {"message": {"title": "Message", "type": "string"}}, "required": ["message"], "title": "PingOut", "type": "object"}, "ErrOut": {"properties": {"detail": {"title": "Detail", "type": "string"}}, "required": ["detail"], "title": "ErrOut", "type": "object"}, "BrowserResultIn": {"properties": {"thread_id": {"title": "Thread Id", "type": "string"}, "request_id": {"title": "Request Id", "type": "string"}, "snapshot": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Snapshot"}, "shot": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Shot"}, "tab": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Tab"}, "confirm": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Confirm"}, "download": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Download"}, "tabs": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Tabs"}, "node": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Node"}, "upload": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Upload"}}, "required": ["thread_id", "request_id"], "title": "BrowserResultIn", "type": "object"}, "TokenOut": {"properties": {"token": {"title": "Token", "type": "string"}, "url": {"title": "Url", "type": "string"}, "room": {"title": "Room", "type": "string"}, "thread_id": {"title": "Thread Id", "type": "string"}}, "required": ["token", "url", "room", "thread_id"], "title": "TokenOut", "type": "object"}, "ActiveTurnOut": {"properties": {"turn_id": {"title": "Turn Id", "type": "string"}, "user_text": {"title": "User Text", "type": "string"}, "status": {"title": "Status", "type": "string"}, "started_at": {"title": "Started At", "type": "number"}}, "required": ["turn_id", "user_text", "status", "started_at"], "title": "ActiveTurnOut", "type": "object"}, "HistoryItem": {"properties": {"id": {"title": "Id", "type": "string"}, "sender": {"title": "Sender", "type": "string"}, "text": {"title": "Text", "type": "string"}, "ts": {"title": "Ts", "type": "number"}}, "required": ["id", "sender", "text", "ts"], "title": "HistoryItem", "type": "object"}, "HistoryOut": {"properties": {"history": {"items": {"$ref": "#/components/schemas/HistoryItem"}, "title": "History", "type": "array"}, "has_more": {"default": false, "title": "Has More", "type": "boolean"}, "next_before_ts": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Next Before Ts"}, "active_turn": {"anyOf": [{"$ref": "#/components/schemas/ActiveTurnOut"}, {"type": "null"}]}}, "required": ["history"], "title": "HistoryOut", "type": "object"}, "ThreadViewItem": {"properties": {"kind": {"title": "Kind", "type": "string"}, "text": {"title": "Text", "type": "string"}, "ts": {"title": "Ts", "type": "number"}, "sender": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Sender"}, "direction": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Direction"}, "subject": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Subject"}, "from_email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "From Email"}, "to_email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "To Email"}}, "required": ["kind", "text", "ts"], "title": "ThreadViewItem", "type": "object"}, "ThreadViewOut": {"properties": {"channel": {"title": "Channel", "type": "string"}, "items": {"items": {"$ref": "#/components/schemas/ThreadViewItem"}, "title": "Items", "type": "array"}}, "required": ["channel", "items"], "title": "ThreadViewOut", "type": "object"}, "ThreadItem": {"properties": {"thread_id": {"format": "uuid", "title": "Thread Id", "type": "string"}, "title": {"title": "Title", "type": "string"}, "channel": {"title": "Channel", "type": "string"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "last_message_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Last Message At"}, "is_active": {"title": "Is Active", "type": "boolean"}}, "required": ["thread_id", "title", "channel", "created_at", "is_active"], "title": "ThreadItem", "type": "object"}, "ThreadListOut": {"properties": {"threads": {"items": {"$ref": "#/components/schemas/ThreadItem"}, "title": "Threads", "type": "array"}, "page": {"default": 1, "title": "Page", "type": "integer"}, "limit": {"default": 20, "title": "Limit", "type": "integer"}, "has_more": {"default": false, "title": "Has More", "type": "boolean"}}, "required": ["threads"], "title": "ThreadListOut", "type": "object"}, "ConvItem": {"properties": {"thread_id": {"format": "uuid", "title": "Thread Id", "type": "string"}, "contact_id": {"format": "uuid", "title": "Contact Id", "type": "string"}, "contact_name": {"title": "Contact Name", "type": "string"}, "channel": {"title": "Channel", "type": "string"}, "title": {"title": "Title", "type": "string"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "last_message_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Last Message At"}, "is_active": {"title": "Is Active", "type": "boolean"}, "flow_state": {"title": "Flow State", "type": "string"}}, "required": ["thread_id", "contact_id", "contact_name", "channel", "title", "created_at", "is_active", "flow_state"], "title": "ConvItem", "type": "object"}, "ConvPageOut": {"properties": {"items": {"items": {"$ref": "#/components/schemas/ConvItem"}, "title": "Items", "type": "array"}, "page": {"default": 1, "title": "Page", "type": "integer"}, "limit": {"default": 50, "title": "Limit", "type": "integer"}, "has_more": {"default": false, "title": "Has More", "type": "boolean"}}, "required": ["items"], "title": "ConvPageOut", "type": "object"}, "LucyConfigOut": {"properties": {"bot_name": {"title": "Bot Name", "type": "string"}, "welcome_message": {"title": "Welcome Message", "type": "string"}, "voice_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Voice Id"}, "company_prompt": {"default": "", "title": "Company Prompt", "type": "string"}, "borrower_prompt": {"default": "", "title": "Borrower Prompt", "type": "string"}, "partner_prompt": {"default": "", "title": "Partner Prompt", "type": "string"}, "phone_number": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Phone Number"}, "phone_status": {"default": "inactive", "title": "Phone Status", "type": "string"}, "email_address": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Email Address"}, "email_status": {"default": "inactive", "title": "Email Status", "type": "string"}, "widget_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Widget Id"}, "widget_enabled": {"default": false, "title": "Widget Enabled", "type": "boolean"}, "widget_btn_color": {"default": "#6366f1", "title": "Widget Btn Color", "type": "string"}, "widget_accent": {"default": "#4f46e5", "title": "Widget Accent", "type": "string"}, "widget_avatar": {"default": "", "title": "Widget Avatar", "type": "string"}, "widget_position": {"default": "br", "title": "Widget Position", "type": "string"}, "widget_welcome": {"default": "", "title": "Widget Welcome", "type": "string"}, "embed_code": {"default": "", "title": "Embed Code", "type": "string"}}, "required": ["bot_name", "welcome_message"], "title": "LucyConfigOut", "type": "object"}, "LucyConfigUpdate": {"properties": {"bot_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Bot Name"}, "welcome_message": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Welcome Message"}, "voice_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Voice Id"}, "company_prompt": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Company Prompt"}, "borrower_prompt": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Borrower Prompt"}, "partner_prompt": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Partner Prompt"}, "widget_enabled": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Widget Enabled"}, "widget_btn_color": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Widget Btn Color"}, "widget_accent": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Widget Accent"}, "widget_avatar": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Widget Avatar"}, "widget_position": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Widget Position"}, "widget_welcome": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Widget Welcome"}}, "title": "LucyConfigUpdate", "type": "object"}, "UserPromptOut": {"properties": {"text": {"title": "Text", "type": "string"}}, "required": ["text"], "title": "UserPromptOut", "type": "object"}, "UserPromptUpdate": {"properties": {"text": {"title": "Text", "type": "string"}}, "required": ["text"], "title": "UserPromptUpdate", "type": "object"}, "WidgetConfigOut": {"properties": {"bot_name": {"title": "Bot Name", "type": "string"}, "btn_color": {"title": "Btn Color", "type": "string"}, "accent": {"title": "Accent", "type": "string"}, "avatar": {"title": "Avatar", "type": "string"}, "position": {"title": "Position", "type": "string"}, "welcome": {"title": "Welcome", "type": "string"}}, "required": ["bot_name", "btn_color", "accent", "avatar", "position", "welcome"], "title": "WidgetConfigOut", "type": "object"}, "WidgetTokenOut": {"properties": {"token": {"title": "Token", "type": "string"}, "url": {"title": "Url", "type": "string"}, "room": {"title": "Room", "type": "string"}, "thread_id": {"title": "Thread Id", "type": "string"}, "config": {"$ref": "#/components/schemas/WidgetConfigOut"}, "active_turn": {"anyOf": [{"$ref": "#/components/schemas/ActiveTurnOut"}, {"type": "null"}]}}, "required": ["token", "url", "room", "thread_id", "config"], "title": "WidgetTokenOut", "type": "object"}, "WidgetOptInOut": {"properties": {"status": {"title": "Status", "type": "string"}, "opt_in_lead": {"title": "Opt In Lead", "type": "boolean"}}, "required": ["status", "opt_in_lead"], "title": "WidgetOptInOut", "type": "object"}, "WidgetOptInIn": {"properties": {"widget_id": {"title": "Widget Id", "type": "string"}, "thread_id": {"title": "Thread Id", "type": "string"}, "accepted": {"title": "Accepted", "type": "boolean"}}, "required": ["widget_id", "thread_id", "accepted"], "title": "WidgetOptInIn", "type": "object"}, "MessageResponse": {"properties": {"message": {"title": "Message", "type": "string"}, "email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Email"}}, "required": ["message"], "title": "MessageResponse", "type": "object"}, "SignupRequest": {"properties": {"email": {"format": "email", "title": "Email", "type": "string"}, "password": {"title": "Password", "type": "string"}, "first_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "First Name"}, "last_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Last Name"}, "org_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Org Name"}, "agreed_to_terms": {"default": false, "title": "Agreed To Terms", "type": "boolean"}}, "required": ["email", "password"], "title": "SignupRequest", "type": "object"}, "VerifyEmailRequest": {"properties": {"token": {"title": "Token", "type": "string"}}, "required": ["token"], "title": "VerifyEmailRequest", "type": "object"}, "GoogleSSOIn": {"properties": {"id_token": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Id Token"}, "access_token": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Access Token"}}, "title": "GoogleSSOIn", "type": "object"}, "GoogleCompleteIn": {"properties": {"google_info": {"$ref": "#/components/schemas/GoogleUserInfo"}, "company_name": {"title": "Company Name", "type": "string"}}, "required": ["google_info", "company_name"], "title": "GoogleCompleteIn", "type": "object"}, "GoogleUserInfo": {"properties": {"email": {"title": "Email", "type": "string"}, "first_name": {"default": "", "title": "First Name", "type": "string"}, "last_name": {"default": "", "title": "Last Name", "type": "string"}, "name": {"default": "", "title": "Name", "type": "string"}}, "required": ["email"], "title": "GoogleUserInfo", "type": "object"}, "OrganizationSchema": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "name": {"title": "Name", "type": "string"}, "slug": {"title": "Slug", "type": "string"}, "org_type": {"title": "Org Type", "type": "string"}, "onboarding_status": {"title": "Onboarding Status", "type": "string"}, "settings": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Settings"}, "tfn_verification_status": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Tfn Verification Status"}, "logo": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Logo"}, "primary_color": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Primary Color"}, "plan_slug": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Plan Slug"}, "wallet_balance": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Wallet Balance"}}, "required": ["id", "name", "slug", "org_type", "onboarding_status"], "title": "OrganizationSchema", "type": "object"}, "UserSchema": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "email": {"format": "email", "title": "Email", "type": "string"}, "first_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "First Name"}, "last_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Last Name"}, "role": {"title": "Role", "type": "string"}, "tier": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Tier"}, "organization": {"anyOf": [{"$ref": "#/components/schemas/OrganizationSchema"}, {"type": "null"}]}, "is_active": {"title": "Is Active", "type": "boolean"}, "is_owner": {"title": "Is Owner", "type": "boolean"}, "is_org_admin": {"title": "Is Org Admin", "type": "boolean"}, "is_manager": {"title": "Is Manager", "type": "boolean"}, "primary_department_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Primary Department Id"}, "default_crm_scope": {"default": "SELF", "title": "Default Crm Scope", "type": "string"}, "contact_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Contact Id"}, "features": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Features"}}, "required": ["id", "email", "role", "is_active", "is_owner", "is_org_admin", "is_manager"], "title": "UserSchema", "type": "object"}, "OrganizationInfoSchema": {"description": "Organization info shown on the settings page.", "properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "name": {"title": "Name", "type": "string"}, "slug": {"title": "Slug", "type": "string"}, "legal_business_name": {"title": "Legal Business Name", "type": "string"}, "tenant_license_number": {"title": "Tenant License Number", "type": "string"}, "company_license_number": {"title": "Company License Number", "type": "string"}, "state_licenses": {"additionalProperties": true, "title": "State Licenses", "type": "object"}, "street_address": {"title": "Street Address", "type": "string"}, "city": {"title": "City", "type": "string"}, "state": {"title": "State", "type": "string"}, "zip_code": {"title": "Zip Code", "type": "string"}, "website": {"title": "Website", "type": "string"}, "email": {"title": "Email", "type": "string"}, "phone": {"title": "Phone", "type": "string"}, "business_type": {"title": "Business Type", "type": "string"}, "business_reg_number": {"title": "Business Reg Number", "type": "string"}, "business_reg_authority": {"title": "Business Reg Authority", "type": "string"}, "business_dba": {"title": "Business Dba", "type": "string"}, "settings": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Settings"}}, "required": ["id", "name", "slug", "legal_business_name", "tenant_license_number", "company_license_number", "state_licenses", "street_address", "city", "state", "zip_code", "website", "email", "phone", "business_type", "business_reg_number", "business_reg_authority", "business_dba"], "title": "OrganizationInfoSchema", "type": "object"}, "ProfileOutSchema": {"description": "User profile data output", "properties": {"first_name": {"title": "First Name", "type": "string"}, "last_name": {"title": "Last Name", "type": "string"}, "email": {"format": "email", "title": "Email", "type": "string"}, "phone": {"title": "Phone", "type": "string"}, "timezone": {"default": "", "title": "Timezone", "type": "string"}, "calendar": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Calendar"}, "lucy_contact": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Lucy Contact"}, "routines": {"anyOf": [{"items": {}, "type": "array"}, {"type": "null"}], "title": "Routines"}, "title": {"title": "Title", "type": "string"}, "name_phonetic": {"title": "Name Phonetic", "type": "string"}, "license_number": {"title": "License Number", "type": "string"}, "state_licenses": {"additionalProperties": true, "title": "State Licenses", "type": "object"}, "organization": {"anyOf": [{"$ref": "#/components/schemas/OrganizationInfoSchema"}, {"type": "null"}]}}, "required": ["first_name", "last_name", "email", "phone", "title", "name_phonetic", "license_number", "state_licenses"], "title": "ProfileOutSchema", "type": "object"}, "ProfileUpdateSchema": {"description": "User profile update input", "properties": {"first_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "First Name"}, "last_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Last Name"}, "phone": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Phone"}, "timezone": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Timezone"}, "calendar": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Calendar"}, "title": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Title"}, "name_phonetic": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Phonetic"}, "license_number": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "License Number"}, "state_licenses": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "State Licenses"}}, "title": "ProfileUpdateSchema", "type": "object"}, "RoutineOut": {"properties": {"id": {"title": "Id", "type": "string"}, "name": {"title": "Name", "type": "string"}, "instructions": {"title": "Instructions", "type": "string"}, "status": {"title": "Status", "type": "string"}, "time": {"title": "Time", "type": "string"}, "days": {"items": {"type": "integer"}, "title": "Days", "type": "array"}, "last_spawned_on": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Last Spawned On"}, "last_run_status": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Last Run Status"}, "last_run_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Last Run At"}, "last_run_summary": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Last Run Summary"}, "created_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created At"}, "updated_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Updated At"}}, "required": ["id", "name", "instructions", "status", "time", "days"], "title": "RoutineOut", "type": "object"}, "RoutineIn": {"properties": {"name": {"title": "Name", "type": "string"}, "instructions": {"title": "Instructions", "type": "string"}, "time": {"title": "Time", "type": "string"}, "days": {"items": {"type": "integer"}, "title": "Days", "type": "array"}, "status": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Status"}}, "required": ["name", "instructions", "time", "days"], "title": "RoutineIn", "type": "object"}, "RoutinePatch": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name"}, "instructions": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Instructions"}, "time": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Time"}, "days": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Days"}, "status": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Status"}}, "title": "RoutinePatch", "type": "object"}, "OrgProfileUpdateSchema": {"description": "Organization fields editable by owner/admin users.", "properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name"}, "legal_business_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Legal Business Name"}, "tenant_license_number": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Tenant License Number"}, "company_license_number": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Company License Number"}, "state_licenses": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "State Licenses"}, "street_address": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Street Address"}, "city": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "City"}, "state": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "State"}, "zip_code": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Zip Code"}, "website": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Website"}, "email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Email"}, "phone": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Phone"}, "business_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Business Type"}, "business_reg_number": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Business Reg Number"}, "business_reg_authority": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Business Reg Authority"}, "business_dba": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Business Dba"}}, "title": "OrgProfileUpdateSchema", "type": "object"}, "AccountSetupIn": {"description": "Light profile during onboarding: name + company name", "properties": {"first_name": {"title": "First Name", "type": "string"}, "last_name": {"title": "Last Name", "type": "string"}, "company_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Company Name"}}, "required": ["first_name", "last_name"], "title": "AccountSetupIn", "type": "object"}, "OrgUserOut": {"description": "User data as seen by org admins", "properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "email": {"format": "email", "title": "Email", "type": "string"}, "first_name": {"title": "First Name", "type": "string"}, "last_name": {"title": "Last Name", "type": "string"}, "phone": {"title": "Phone", "type": "string"}, "title": {"title": "Title", "type": "string"}, "role": {"title": "Role", "type": "string"}, "tier": {"title": "Tier", "type": "string"}, "is_owner": {"title": "Is Owner", "type": "boolean"}, "is_org_admin": {"title": "Is Org Admin", "type": "boolean"}, "is_manager": {"title": "Is Manager", "type": "boolean"}, "primary_department_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Primary Department Id"}, "primary_department_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Primary Department Name"}, "default_crm_scope": {"default": "SELF", "title": "Default Crm Scope", "type": "string"}, "is_active": {"title": "Is Active", "type": "boolean"}, "date_joined": {"format": "date-time", "title": "Date Joined", "type": "string"}, "last_login": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Last Login"}, "contact_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Contact Id"}}, "required": ["id", "email", "first_name", "last_name", "phone", "title", "role", "tier", "is_owner", "is_org_admin", "is_manager", "is_active", "date_joined"], "title": "OrgUserOut", "type": "object"}, "CreateUserIn": {"description": "Input for creating a new org user", "properties": {"email": {"format": "email", "title": "Email", "type": "string"}, "first_name": {"title": "First Name", "type": "string"}, "last_name": {"title": "Last Name", "type": "string"}, "password": {"title": "Password", "type": "string"}, "phone": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "", "title": "Phone"}, "title": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "", "title": "Title"}, "tier": {"default": "free", "title": "Tier", "type": "string"}, "is_org_admin": {"default": false, "title": "Is Org Admin", "type": "boolean"}, "is_manager": {"default": false, "title": "Is Manager", "type": "boolean"}, "primary_department_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Primary Department Id"}, "default_crm_scope": {"default": "SELF", "title": "Default Crm Scope", "type": "string"}}, "required": ["email", "first_name", "last_name", "password"], "title": "CreateUserIn", "type": "object"}, "DepartmentOut": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "name": {"title": "Name", "type": "string"}, "parent_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Parent Id"}}, "required": ["id", "name"], "title": "DepartmentOut", "type": "object"}, "CreateDepartmentIn": {"properties": {"name": {"title": "Name", "type": "string"}, "parent_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Parent Id"}}, "required": ["name"], "title": "CreateDepartmentIn", "type": "object"}, "UpdateDepartmentIn": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name"}, "parent_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Parent Id"}}, "title": "UpdateDepartmentIn", "type": "object"}, "UpdateUserIn": {"description": "Input for updating an existing org user", "properties": {"first_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "First Name"}, "last_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Last Name"}, "phone": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Phone"}, "title": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Title"}, "tier": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Tier"}, "is_org_admin": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Org Admin"}, "is_manager": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Manager"}, "is_active": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Active"}, "primary_department_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Primary Department Id"}, "default_crm_scope": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Default Crm Scope"}}, "title": "UpdateUserIn", "type": "object"}, "OnboardingStatusOut": {"description": "Current onboarding progress", "properties": {"current_step": {"title": "Current Step", "type": "string"}, "is_completed": {"title": "Is Completed", "type": "boolean"}, "plan_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Plan Type"}}, "required": ["current_step", "is_completed"], "title": "OnboardingStatusOut", "type": "object"}, "AdvanceStepIn": {"description": "Advance onboarding to next step", "properties": {"completed_step": {"title": "Completed Step", "type": "string"}}, "required": ["completed_step"], "title": "AdvanceStepIn", "type": "object"}, "ComplianceOut": {"description": "Compliance consent timestamps.", "properties": {"indemnification_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Indemnification At"}, "tcpa_consent_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Tcpa Consent At"}, "esign_consent_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Esign Consent At"}, "recording_ack_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Recording Ack At"}, "agreement_version": {"title": "Agreement Version", "type": "string"}, "terms_url": {"title": "Terms Url", "type": "string"}, "privacy_url": {"title": "Privacy Url", "type": "string"}}, "required": ["agreement_version", "terms_url", "privacy_url"], "title": "ComplianceOut", "type": "object"}, "ComplianceIn": {"description": "Accept one or more compliance consents.", "properties": {"indemnification": {"default": false, "title": "Indemnification", "type": "boolean"}, "tcpa_consent": {"default": false, "title": "Tcpa Consent", "type": "boolean"}, "esign_consent": {"default": false, "title": "Esign Consent", "type": "boolean"}, "recording_ack": {"default": false, "title": "Recording Ack", "type": "boolean"}, "indemnification_terms_reviewed": {"default": false, "title": "Indemnification Terms Reviewed", "type": "boolean"}, "indemnification_privacy_reviewed": {"default": false, "title": "Indemnification Privacy Reviewed", "type": "boolean"}}, "title": "ComplianceIn", "type": "object"}, "PwResetRequestIn": {"properties": {"email": {"format": "email", "title": "Email", "type": "string"}}, "required": ["email"], "title": "PwResetRequestIn", "type": "object"}, "PwResetValidateIn": {"properties": {"email": {"format": "email", "title": "Email", "type": "string"}, "token": {"title": "Token", "type": "string"}}, "required": ["email", "token"], "title": "PwResetValidateIn", "type": "object"}, "PwResetConfirmIn": {"properties": {"email": {"format": "email", "title": "Email", "type": "string"}, "token": {"title": "Token", "type": "string"}, "new_password": {"title": "New Password", "type": "string"}}, "required": ["email", "token", "new_password"], "title": "PwResetConfirmIn", "type": "object"}, "InviteSendIn": {"properties": {"email": {"format": "email", "title": "Email", "type": "string"}, "first_name": {"title": "First Name", "type": "string"}, "last_name": {"title": "Last Name", "type": "string"}, "role": {"title": "Role", "type": "string"}, "contact_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Contact Id"}}, "required": ["email", "first_name", "last_name", "role"], "title": "InviteSendIn", "type": "object"}, "InviteVerifyOut": {"properties": {"email": {"title": "Email", "type": "string"}, "first_name": {"title": "First Name", "type": "string"}, "last_name": {"title": "Last Name", "type": "string"}, "role": {"title": "Role", "type": "string"}, "org_name": {"title": "Org Name", "type": "string"}}, "required": ["email", "first_name", "last_name", "role", "org_name"], "title": "InviteVerifyOut", "type": "object"}, "InviteTokenIn": {"properties": {"token": {"title": "Token", "type": "string"}}, "required": ["token"], "title": "InviteTokenIn", "type": "object"}, "InviteAcceptIn": {"properties": {"token": {"title": "Token", "type": "string"}, "password": {"title": "Password", "type": "string"}}, "required": ["token", "password"], "title": "InviteAcceptIn", "type": "object"}, "InviteResendIn": {"properties": {"user_id": {"format": "uuid", "title": "User Id", "type": "string"}}, "required": ["user_id"], "title": "InviteResendIn", "type": "object"}, "OrgSettingsPatchSchema": {"description": "Organization settings editable from the profile page.", "properties": {"auto_campaigns": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Auto Campaigns"}, "eval_threshold": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Eval Threshold"}, "sponsored_telephony": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Sponsored Telephony"}}, "title": "OrgSettingsPatchSchema", "type": "object"}, "OrganizationCustomFieldSchema": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "key_name": {"title": "Key Name", "type": "string"}, "display_label": {"title": "Display Label", "type": "string"}, "field_type": {"title": "Field Type", "type": "string"}, "is_visible": {"title": "Is Visible", "type": "boolean"}}, "required": ["id", "key_name", "display_label", "field_type", "is_visible"], "title": "OrganizationCustomFieldSchema", "type": "object"}, "CRMListSchema": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "name": {"title": "Name", "type": "string"}, "description": {"default": "", "title": "Description", "type": "string"}, "list_type": {"title": "List Type", "type": "string"}, "filters": {"additionalProperties": true, "default": {}, "title": "Filters", "type": "object"}, "owner_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Owner Id"}, "owner_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Owner Name"}, "department_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Department Id"}, "department_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Department Name"}, "visibility_scope": {"default": "ORG", "title": "Visibility Scope", "type": "string"}, "contact_count": {"default": 0, "title": "Contact Count", "type": "integer"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}}, "required": ["id", "name", "list_type", "created_at"], "title": "CRMListSchema", "type": "object"}, "CRMListCreateSchema": {"properties": {"name": {"title": "Name", "type": "string"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "", "title": "Description"}, "list_type": {"default": "STATIC", "title": "List Type", "type": "string"}, "filters": {"additionalProperties": true, "default": {}, "title": "Filters", "type": "object"}, "owner_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Owner Id"}, "department_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Department Id"}, "visibility_scope": {"default": "ORG", "title": "Visibility Scope", "type": "string"}}, "required": ["name"], "title": "CRMListCreateSchema", "type": "object"}, "CRMListPageSchema": {"properties": {"items": {"items": {"$ref": "#/components/schemas/CRMListSchema"}, "title": "Items", "type": "array"}, "count": {"default": 0, "title": "Count", "type": "integer"}, "page": {"default": 1, "title": "Page", "type": "integer"}, "limit": {"default": 25, "title": "Limit", "type": "integer"}}, "title": "CRMListPageSchema", "type": "object"}, "UserSimpleSchema": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "first_name": {"title": "First Name", "type": "string"}, "last_name": {"title": "Last Name", "type": "string"}, "email": {"title": "Email", "type": "string"}}, "required": ["id", "first_name", "last_name", "email"], "title": "UserSimpleSchema", "type": "object"}, "CRMListCountIn": {"properties": {"ids": {"items": {"format": "uuid", "type": "string"}, "title": "Ids", "type": "array"}, "browse_scope": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Browse Scope"}, "browse_user_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Browse User Id"}, "browse_department_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Browse Department Id"}, "include_all": {"default": false, "title": "Include All", "type": "boolean"}, "fresh": {"default": false, "title": "Fresh", "type": "boolean"}}, "title": "CRMListCountIn", "type": "object"}, "CRMListUpdateSchema": {"properties": {"name": {"title": "Name", "type": "string"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "", "title": "Description"}, "filters": {"additionalProperties": true, "default": {}, "title": "Filters", "type": "object"}, "owner_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Owner Id"}, "department_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Department Id"}, "visibility_scope": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Visibility Scope"}}, "required": ["name"], "title": "CRMListUpdateSchema", "type": "object"}, "CRMStaticListCreateSchema": {"properties": {"name": {"title": "Name", "type": "string"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "", "title": "Description"}, "filters": {"additionalProperties": true, "default": {}, "title": "Filters", "type": "object"}, "owner_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Owner Id"}, "department_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Department Id"}, "visibility_scope": {"default": "ORG", "title": "Visibility Scope", "type": "string"}}, "required": ["name"], "title": "CRMStaticListCreateSchema", "type": "object"}, "CRMStaticListCopySchema": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "owner_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Owner Id"}, "department_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Department Id"}, "visibility_scope": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Visibility Scope"}}, "title": "CRMStaticListCopySchema", "type": "object"}, "ImportJobSchema": {"properties": {"id": {"title": "Id", "type": "integer"}, "document_id": {"format": "uuid", "title": "Document Id", "type": "string"}, "status": {"title": "Status", "type": "string"}, "column_mapping": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"type": "null"}], "title": "Column Mapping"}, "total_rows": {"default": 0, "title": "Total Rows", "type": "integer"}, "imported_rows": {"default": 0, "title": "Imported Rows", "type": "integer"}, "updated_rows": {"default": 0, "title": "Updated Rows", "type": "integer"}, "failed_rows": {"default": 0, "title": "Failed Rows", "type": "integer"}, "errors": {"default": [], "items": {}, "title": "Errors", "type": "array"}}, "required": ["id", "document_id", "status"], "title": "ImportJobSchema", "type": "object"}, "DocImportPreviewSchema": {"properties": {"total_folders": {"title": "Total Folders", "type": "integer"}, "loan_matched_count": {"title": "Loan Matched Count", "type": "integer"}, "contact_matched_count": {"title": "Contact Matched Count", "type": "integer"}, "unmatched_count": {"title": "Unmatched Count", "type": "integer"}, "sample_unmatched": {"items": {"type": "string"}, "title": "Sample Unmatched", "type": "array"}}, "required": ["total_folders", "loan_matched_count", "contact_matched_count", "unmatched_count", "sample_unmatched"], "title": "DocImportPreviewSchema", "type": "object"}, "StartDocImportSchema": {"properties": {"document_id": {"format": "uuid", "title": "Document Id", "type": "string"}}, "required": ["document_id"], "title": "StartDocImportSchema", "type": "object"}, "DocImportJobSchema": {"properties": {"id": {"title": "Id", "type": "integer"}, "status": {"title": "Status", "type": "string"}, "total_folders": {"title": "Total Folders", "type": "integer"}, "matched_count": {"title": "Matched Count", "type": "integer"}, "unmatched_count": {"title": "Unmatched Count", "type": "integer"}, "imported_files": {"title": "Imported Files", "type": "integer"}, "skipped_files": {"title": "Skipped Files", "type": "integer"}, "has_error_file": {"default": false, "title": "Has Error File", "type": "boolean"}, "error_message": {"default": "", "title": "Error Message", "type": "string"}, "zip_filename": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Zip Filename"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}}, "required": ["id", "status", "total_folders", "matched_count", "unmatched_count", "imported_files", "skipped_files", "created_at"], "title": "DocImportJobSchema", "type": "object"}, "Input": {"properties": {"page": {"default": 1, "minimum": 1, "title": "Page", "type": "integer"}, "page_size": {"anyOf": [{"minimum": 1, "type": "integer"}, {"type": "null"}], "title": "Page Size"}}, "title": "Input", "type": "object"}, "ContactListSchema": {"description": "Lightweight schema for list views.\nExcludes heavy fields like system_data and linked_items.", "properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "first_name": {"default": "", "title": "First Name", "type": "string"}, "last_name": {"default": "", "title": "Last Name", "type": "string"}, "email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Email"}, "cell_phone": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Cell Phone"}, "status": {"title": "Status", "type": "string"}, "contact_type": {"title": "Contact Type", "type": "string"}, "assigned_to": {"anyOf": [{"$ref": "#/components/schemas/UserSimpleSchema"}, {"type": "null"}]}, "city": {"default": "", "title": "City", "type": "string"}, "state_code": {"default": "", "title": "State Code", "type": "string"}, "updated_at": {"format": "date-time", "title": "Updated At", "type": "string"}, "system_data": {"additionalProperties": true, "default": {}, "title": "System Data", "type": "object"}, "full_name": {"default": "", "title": "Full Name", "type": "string"}}, "required": ["id", "status", "contact_type", "updated_at"], "title": "ContactListSchema", "type": "object"}, "PagedContactListSchema": {"properties": {"items": {"items": {"$ref": "#/components/schemas/ContactListSchema"}, "title": "Items", "type": "array"}, "count": {"title": "Count", "type": "integer"}}, "required": ["items", "count"], "title": "PagedContactListSchema", "type": "object"}, "AvailabilityWindowSchema": {"properties": {"day_of_week": {"title": "Day Of Week", "type": "integer"}, "start_time": {"title": "Start Time", "type": "string"}, "end_time": {"title": "End Time", "type": "string"}}, "required": ["day_of_week", "start_time", "end_time"], "title": "AvailabilityWindowSchema", "type": "object"}, "ContactParticipantSchema": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "user": {"$ref": "#/components/schemas/UserSimpleSchema"}, "role": {"title": "Role", "type": "string"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}}, "required": ["id", "user", "role", "created_at"], "title": "ContactParticipantSchema", "type": "object"}, "ContactSchema": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "first_name": {"default": "", "title": "First Name", "type": "string"}, "middle_name": {"default": "", "title": "Middle Name", "type": "string"}, "last_name": {"default": "", "title": "Last Name", "type": "string"}, "suffix": {"default": "", "title": "Suffix", "type": "string"}, "salutation": {"default": "", "title": "Salutation", "type": "string"}, "preferred_name": {"default": "", "title": "Preferred Name", "type": "string"}, "name_phonetic": {"default": "", "title": "Name Phonetic", "type": "string"}, "preferred_language": {"default": "", "title": "Preferred Language", "type": "string"}, "email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Email"}, "cell_phone": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Cell Phone"}, "home_phone": {"default": "", "title": "Home Phone", "type": "string"}, "work_phone": {"default": "", "title": "Work Phone", "type": "string"}, "secondary_phone": {"default": "", "title": "Secondary Phone", "type": "string"}, "alternate_phone": {"default": "", "title": "Alternate Phone", "type": "string"}, "secondary_email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Secondary Email"}, "alternate_email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Alternate Email"}, "timezone": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Timezone"}, "availability_windows": {"items": {"$ref": "#/components/schemas/AvailabilityWindowSchema"}, "title": "Availability Windows", "type": "array"}, "status": {"title": "Status", "type": "string"}, "contact_type": {"title": "Contact Type", "type": "string"}, "assigned_to": {"anyOf": [{"$ref": "#/components/schemas/UserSimpleSchema"}, {"type": "null"}]}, "department_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Department Id"}, "department_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Department Name"}, "participants": {"items": {"$ref": "#/components/schemas/ContactParticipantSchema"}, "title": "Participants", "type": "array"}, "street_address": {"default": "", "title": "Street Address", "type": "string"}, "unit_number": {"default": "", "title": "Unit Number", "type": "string"}, "city": {"default": "", "title": "City", "type": "string"}, "state_code": {"default": "", "title": "State Code", "type": "string"}, "zip_code": {"default": "", "title": "Zip Code", "type": "string"}, "county": {"default": "", "title": "County", "type": "string"}, "country_code": {"default": "US", "title": "Country Code", "type": "string"}, "mailing_street": {"default": "", "title": "Mailing Street", "type": "string"}, "mailing_unit": {"default": "", "title": "Mailing Unit", "type": "string"}, "mailing_city": {"default": "", "title": "Mailing City", "type": "string"}, "mailing_state": {"default": "", "title": "Mailing State", "type": "string"}, "mailing_zip": {"default": "", "title": "Mailing Zip", "type": "string"}, "mailing_country": {"default": "", "title": "Mailing Country", "type": "string"}, "spouse_first_name": {"default": "", "title": "Spouse First Name", "type": "string"}, "spouse_last_name": {"default": "", "title": "Spouse Last Name", "type": "string"}, "spouse_email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Spouse Email"}, "spouse_phone": {"default": "", "title": "Spouse Phone", "type": "string"}, "company": {"additionalProperties": true, "title": "Company", "type": "object"}, "opt_in_lead": {"default": false, "title": "Opt In Lead", "type": "boolean"}, "ai_opt_out": {"default": false, "title": "Ai Opt Out", "type": "boolean"}, "sms_opt_out": {"default": false, "title": "Sms Opt Out", "type": "boolean"}, "sms_invalid": {"default": false, "title": "Sms Invalid", "type": "boolean"}, "email_opt_out": {"default": false, "title": "Email Opt Out", "type": "boolean"}, "is_phone_invalid": {"default": false, "title": "Is Phone Invalid", "type": "boolean"}, "is_email_invalid": {"default": false, "title": "Is Email Invalid", "type": "boolean"}, "do_not_contact": {"default": false, "title": "Do Not Contact", "type": "boolean"}, "channel_blocks": {"additionalProperties": {"additionalProperties": {"additionalProperties": {"type": "boolean"}, "type": "object"}, "type": "object"}, "title": "Channel Blocks", "type": "object"}, "field_compliance": {"additionalProperties": {"additionalProperties": {"type": "boolean"}, "type": "object"}, "title": "Field Compliance", "type": "object"}, "social_profiles": {"additionalProperties": true, "title": "Social Profiles", "type": "object"}, "tags": {"items": {"type": "string"}, "title": "Tags", "type": "array"}, "metadata": {"additionalProperties": true, "title": "Metadata", "type": "object"}, "notes": {"default": "", "title": "Notes", "type": "string"}, "external_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "External Id"}, "external_source": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "External Source"}, "import_job": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Import Job"}, "lead_source": {"additionalProperties": true, "title": "Lead Source", "type": "object"}, "system_data": {"additionalProperties": true, "title": "System Data", "type": "object"}, "total_call_attempts": {"default": 0, "title": "Total Call Attempts", "type": "integer"}, "total_sms_attempts": {"default": 0, "title": "Total Sms Attempts", "type": "integer"}, "total_email_attempts": {"default": 0, "title": "Total Email Attempts", "type": "integer"}, "linked_items": {"items": {"$ref": "#/components/schemas/EntityLinkSchema"}, "title": "Linked Items", "type": "array"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "updated_at": {"format": "date-time", "title": "Updated At", "type": "string"}, "full_name": {"default": "", "title": "Full Name", "type": "string"}, "list_ids": {"items": {"format": "uuid", "type": "string"}, "title": "List Ids", "type": "array"}, "active_campaigns": {"items": {"additionalProperties": true, "type": "object"}, "title": "Active Campaigns", "type": "array"}, "portal_status": {"anyOf": [{"$ref": "#/components/schemas/PortalStatusSchema"}, {"type": "null"}]}}, "required": ["id", "status", "contact_type", "created_at", "updated_at"], "title": "ContactSchema", "type": "object"}, "EntityLinkSchema": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "link_type": {"title": "Link Type", "type": "string"}, "target_object_id": {"format": "uuid", "title": "Target Object Id", "type": "string"}, "target_type": {"title": "Target Type", "type": "string"}, "target_display_name": {"title": "Target Display Name", "type": "string"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}}, "required": ["id", "link_type", "target_object_id", "target_type", "target_display_name", "created_at"], "title": "EntityLinkSchema", "type": "object"}, "PortalStatusSchema": {"properties": {"has_account": {"title": "Has Account", "type": "boolean"}, "is_active": {"title": "Is Active", "type": "boolean"}, "last_login": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Last Login"}, "portal_user_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Portal User Id"}, "state": {"title": "State", "type": "string"}}, "required": ["has_account", "is_active", "state"], "title": "PortalStatusSchema", "type": "object"}, "ContactDupSchema": {"properties": {"detail": {"title": "Detail", "type": "string"}, "code": {"default": "duplicate_found", "title": "Code", "type": "string"}, "contact_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Contact Id"}, "first_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "First Name"}, "last_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Last Name"}}, "required": ["detail"], "title": "ContactDupSchema", "type": "object"}, "AddressInputSchema": {"properties": {"street_address": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "", "title": "Street Address"}, "unit_number": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "", "title": "Unit Number"}, "city": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "", "title": "City"}, "state_code": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "", "title": "State Code"}, "zip_code": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "", "title": "Zip Code"}, "county": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "", "title": "County"}, "country_code": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "", "title": "Country Code"}, "mailing_street": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "", "title": "Mailing Street"}, "mailing_unit": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "", "title": "Mailing Unit"}, "mailing_city": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "", "title": "Mailing City"}, "mailing_state": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "", "title": "Mailing State"}, "mailing_zip": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "", "title": "Mailing Zip"}, "mailing_country": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "", "title": "Mailing Country"}}, "title": "AddressInputSchema", "type": "object"}, "CompanySchema": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "", "title": "Name"}, "role_title": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "", "title": "Role Title"}, "license_number": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "", "title": "License Number"}, "street_address": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "", "title": "Street Address"}, "unit_number": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "", "title": "Unit Number"}, "city": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "", "title": "City"}, "state_code": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "", "title": "State Code"}, "zip_code": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "", "title": "Zip Code"}}, "title": "CompanySchema", "type": "object"}, "ContactCreateSchema": {"properties": {"first_name": {"title": "First Name", "type": "string"}, "last_name": {"title": "Last Name", "type": "string"}, "middle_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Middle Name"}, "suffix": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Suffix"}, "salutation": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Salutation"}, "preferred_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Preferred Name"}, "name_phonetic": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Phonetic"}, "preferred_language": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Preferred Language"}, "email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Email"}, "cell_phone": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Cell Phone"}, "home_phone": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Home Phone"}, "work_phone": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Work Phone"}, "alternate_phone": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Alternate Phone"}, "status": {"default": "NEW", "title": "Status", "type": "string"}, "contact_type": {"default": "LEAD", "title": "Contact Type", "type": "string"}, "address": {"anyOf": [{"$ref": "#/components/schemas/AddressInputSchema"}, {"type": "null"}]}, "street_address": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Street Address"}, "unit_number": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Unit Number"}, "city": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "City"}, "state_code": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "State Code"}, "zip_code": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Zip Code"}, "mailing_street": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Mailing Street"}, "mailing_unit": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Mailing Unit"}, "mailing_city": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Mailing City"}, "mailing_state": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Mailing State"}, "mailing_zip": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Mailing Zip"}, "mailing_country": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Mailing Country"}, "spouse_first_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Spouse First Name"}, "spouse_last_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Spouse Last Name"}, "spouse_email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Spouse Email"}, "spouse_phone": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Spouse Phone"}, "assigned_to_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Assigned To Id"}, "department_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Department Id"}, "lead_source": {"additionalProperties": true, "default": {}, "title": "Lead Source", "type": "object"}, "list_ids": {"anyOf": [{"items": {"format": "uuid", "type": "string"}, "type": "array"}, {"type": "null"}], "title": "List Ids"}, "company": {"anyOf": [{"$ref": "#/components/schemas/CompanySchema"}, {"type": "null"}]}}, "required": ["first_name", "last_name"], "title": "ContactCreateSchema", "type": "object"}, "BulkUpdateSchema": {"properties": {"ids": {"anyOf": [{"items": {"format": "uuid", "type": "string"}, "type": "array"}, {"type": "null"}], "title": "Ids"}, "filter_list_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Filter List Id"}, "filter_search": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Filter Search"}, "filter_params": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Filter Params"}, "scope": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Scope"}, "browse_scope": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Browse Scope"}, "browse_user_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Browse User Id"}, "browse_department_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Browse Department Id"}, "updates": {"additionalProperties": true, "title": "Updates", "type": "object"}}, "required": ["updates"], "title": "BulkUpdateSchema", "type": "object"}, "BulkDeleteSchema": {"properties": {"ids": {"anyOf": [{"items": {"format": "uuid", "type": "string"}, "type": "array"}, {"type": "null"}], "title": "Ids"}, "filter_list_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Filter List Id"}, "filter_search": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Filter Search"}, "filter_params": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Filter Params"}, "scope": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Scope"}, "browse_scope": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Browse Scope"}, "browse_user_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Browse User Id"}, "browse_department_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Browse Department Id"}}, "title": "BulkDeleteSchema", "type": "object"}, "AvailabilityWindowInputSchema": {"properties": {"day_of_week": {"title": "Day Of Week", "type": "integer"}, "start_time": {"title": "Start Time", "type": "string"}, "end_time": {"title": "End Time", "type": "string"}}, "required": ["day_of_week", "start_time", "end_time"], "title": "AvailabilityWindowInputSchema", "type": "object"}, "ContactParticipantIn": {"properties": {"user_id": {"format": "uuid", "title": "User Id", "type": "string"}, "role": {"default": "VIEWER", "title": "Role", "type": "string"}}, "required": ["user_id"], "title": "ContactParticipantIn", "type": "object"}, "ContactUpdateSchema": {"properties": {"first_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "First Name"}, "middle_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Middle Name"}, "last_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Last Name"}, "suffix": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Suffix"}, "salutation": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Salutation"}, "preferred_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Preferred Name"}, "name_phonetic": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Phonetic"}, "preferred_language": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Preferred Language"}, "email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Email"}, "cell_phone": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Cell Phone"}, "home_phone": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Home Phone"}, "work_phone": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Work Phone"}, "secondary_email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Secondary Email"}, "secondary_phone": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Secondary Phone"}, "alternate_email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Alternate Email"}, "alternate_phone": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Alternate Phone"}, "status": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Status"}, "contact_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Contact Type"}, "address": {"anyOf": [{"$ref": "#/components/schemas/AddressInputSchema"}, {"type": "null"}]}, "street_address": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Street Address"}, "unit_number": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Unit Number"}, "city": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "City"}, "state_code": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "State Code"}, "zip_code": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Zip Code"}, "mailing_street": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Mailing Street"}, "mailing_unit": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Mailing Unit"}, "mailing_city": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Mailing City"}, "mailing_state": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Mailing State"}, "mailing_zip": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Mailing Zip"}, "mailing_country": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Mailing Country"}, "assigned_to_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Assigned To Id"}, "department_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Department Id"}, "participants": {"anyOf": [{"items": {"$ref": "#/components/schemas/ContactParticipantIn"}, "type": "array"}, {"type": "null"}], "title": "Participants"}, "spouse_first_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Spouse First Name"}, "spouse_last_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Spouse Last Name"}, "spouse_email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Spouse Email"}, "spouse_phone": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Spouse Phone"}, "opt_in_lead": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Opt In Lead"}, "ai_opt_out": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Ai Opt Out"}, "sms_opt_out": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Sms Opt Out"}, "sms_invalid": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Sms Invalid"}, "email_opt_out": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Email Opt Out"}, "is_phone_invalid": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Phone Invalid"}, "is_email_invalid": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Email Invalid"}, "do_not_contact": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Do Not Contact"}, "channel_blocks": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Channel Blocks"}, "social_profiles": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Social Profiles"}, "tags": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Tags"}, "metadata": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Metadata"}, "notes": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Notes"}, "lead_source": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Lead Source"}, "list_ids": {"anyOf": [{"items": {"format": "uuid", "type": "string"}, "type": "array"}, {"type": "null"}], "title": "List Ids"}, "timezone": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Timezone"}, "availability_windows": {"anyOf": [{"items": {"$ref": "#/components/schemas/AvailabilityWindowInputSchema"}, "type": "array"}, {"type": "null"}], "title": "Availability Windows"}, "company": {"anyOf": [{"$ref": "#/components/schemas/CompanySchema"}, {"type": "null"}]}}, "title": "ContactUpdateSchema", "type": "object"}, "ContactHistoryPageSchema": {"properties": {"items": {"items": {"$ref": "#/components/schemas/HistorySchema"}, "title": "Items", "type": "array"}, "count": {"title": "Count", "type": "integer"}, "page": {"title": "Page", "type": "integer"}, "limit": {"title": "Limit", "type": "integer"}}, "required": ["count", "page", "limit"], "title": "ContactHistoryPageSchema", "type": "object"}, "HistoryChangeSchema": {"properties": {"field": {"title": "Field", "type": "string"}}, "required": ["field"], "title": "HistoryChangeSchema", "type": "object"}, "HistorySchema": {"properties": {"id": {"title": "Id", "type": "integer"}, "history_date": {"format": "date-time", "title": "History Date", "type": "string"}, "history_type": {"title": "History Type", "type": "string"}, "history_user_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "History User Id"}, "user_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "User Name"}, "changes": {"items": {"$ref": "#/components/schemas/HistoryChangeSchema"}, "title": "Changes", "type": "array"}}, "required": ["id", "history_date", "history_type"], "title": "HistorySchema", "type": "object"}, "InteractionSchema": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "interaction_type": {"title": "Interaction Type", "type": "string"}, "direction": {"title": "Direction", "type": "string"}, "content": {"title": "Content", "type": "string"}, "summary": {"default": "", "title": "Summary", "type": "string"}, "sentiment_score": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Sentiment Score"}, "metadata": {"additionalProperties": true, "default": {}, "title": "Metadata", "type": "object"}, "conversation_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Conversation Id"}, "conversation_thread_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Conversation Thread Id"}, "conversation_channel": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Conversation Channel"}, "conversation_title": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Conversation Title"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}}, "required": ["id", "interaction_type", "direction", "content", "created_at"], "title": "InteractionSchema", "type": "object"}, "NoteCreateSchema": {"properties": {"content": {"title": "Content", "type": "string"}}, "required": ["content"], "title": "NoteCreateSchema", "type": "object"}, "CalendarEventSchema": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "event_type": {"title": "Event Type", "type": "string"}, "title": {"title": "Title", "type": "string"}, "start_time": {"format": "date-time", "title": "Start Time", "type": "string"}, "end_time": {"format": "date-time", "title": "End Time", "type": "string"}, "status": {"title": "Status", "type": "string"}, "description": {"default": "", "title": "Description", "type": "string"}}, "required": ["id", "event_type", "title", "start_time", "end_time", "status"], "title": "CalendarEventSchema", "type": "object"}, "CalendarEventUpdateSchema": {"properties": {"title": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Title"}, "event_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Event Type"}, "start_time": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Start Time"}, "end_time": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "End Time"}, "status": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Status"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}}, "title": "CalendarEventUpdateSchema", "type": "object"}, "CalendarTaskPageSchema": {"properties": {"items": {"items": {"$ref": "#/components/schemas/CalendarTaskSchema"}, "title": "Items", "type": "array"}, "page": {"title": "Page", "type": "integer"}, "limit": {"title": "Limit", "type": "integer"}, "count": {"title": "Count", "type": "integer"}}, "required": ["items", "page", "limit", "count"], "title": "CalendarTaskPageSchema", "type": "object"}, "CalendarTaskSchema": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "action_type": {"title": "Action Type", "type": "string"}, "title": {"title": "Title", "type": "string"}, "description": {"default": "", "title": "Description", "type": "string"}, "status": {"title": "Status", "type": "string"}, "priority": {"title": "Priority", "type": "string"}, "due_date": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "Due Date"}, "scheduled_time": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Scheduled Time"}, "assignee_mode": {"title": "Assignee Mode", "type": "string"}, "outcome": {"default": "", "title": "Outcome", "type": "string"}, "comm_outcome": {"anyOf": [{"$ref": "#/components/schemas/TaskCommOutcomeSchema"}, {"type": "null"}]}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}}, "required": ["id", "action_type", "title", "status", "priority", "assignee_mode", "created_at"], "title": "CalendarTaskSchema", "type": "object"}, "TaskCommOutcomeSchema": {"properties": {"sent": {"default": false, "title": "Sent", "type": "boolean"}, "delivered": {"default": false, "title": "Delivered", "type": "boolean"}, "opened": {"default": false, "title": "Opened", "type": "boolean"}, "clicked": {"default": false, "title": "Clicked", "type": "boolean"}, "replied": {"default": false, "title": "Replied", "type": "boolean"}, "unsubscribed": {"default": false, "title": "Unsubscribed", "type": "boolean"}, "opt_out": {"default": false, "title": "Opt Out", "type": "boolean"}, "connected": {"default": false, "title": "Connected", "type": "boolean"}, "under_60_seconds": {"default": false, "title": "Under 60 Seconds", "type": "boolean"}, "over_60_seconds": {"default": false, "title": "Over 60 Seconds", "type": "boolean"}, "voicemail_left": {"default": false, "title": "Voicemail Left", "type": "boolean"}, "voicemail_skipped": {"default": false, "title": "Voicemail Skipped", "type": "boolean"}, "transfer_attempted": {"default": false, "title": "Transfer Attempted", "type": "boolean"}, "transfer_connected": {"default": false, "title": "Transfer Connected", "type": "boolean"}, "transfer_failed": {"default": false, "title": "Transfer Failed", "type": "boolean"}, "duration_seconds": {"default": 0, "title": "Duration Seconds", "type": "integer"}, "provider_status": {"default": "", "title": "Provider Status", "type": "string"}, "badges": {"items": {"type": "string"}, "title": "Badges", "type": "array"}}, "title": "TaskCommOutcomeSchema", "type": "object"}, "CalendarTaskCreateSchema": {"properties": {"title": {"title": "Title", "type": "string"}, "description": {"default": "", "title": "Description", "type": "string"}, "action_type": {"default": "TASK", "title": "Action Type", "type": "string"}, "assignee_mode": {"default": "HUMAN", "title": "Assignee Mode", "type": "string"}, "scheduled_time": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Scheduled Time"}, "due_date": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "Due Date"}, "priority": {"default": "NORMAL", "title": "Priority", "type": "string"}}, "required": ["title"], "title": "CalendarTaskCreateSchema", "type": "object"}, "CampaignCalendarTaskSchema": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "action_type": {"title": "Action Type", "type": "string"}, "title": {"title": "Title", "type": "string"}, "status": {"title": "Status", "type": "string"}, "scheduled_time": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Scheduled Time"}, "outcome": {"default": "", "title": "Outcome", "type": "string"}, "contact_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Contact Id"}, "contact_name": {"default": "", "title": "Contact Name", "type": "string"}, "comm_outcome": {"anyOf": [{"$ref": "#/components/schemas/TaskCommOutcomeSchema"}, {"type": "null"}]}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "updated_at": {"format": "date-time", "title": "Updated At", "type": "string"}}, "required": ["id", "action_type", "title", "status", "created_at", "updated_at"], "title": "CampaignCalendarTaskSchema", "type": "object"}, "LucyTodoTaskSchema": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "title": {"title": "Title", "type": "string"}, "description": {"default": "", "title": "Description", "type": "string"}, "status": {"title": "Status", "type": "string"}, "scheduled_time": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Scheduled Time"}, "due_date": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "Due Date"}, "outcome": {"default": "", "title": "Outcome", "type": "string"}, "related_contact_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Related Contact Id"}, "related_contact_name": {"default": "", "title": "Related Contact Name", "type": "string"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "updated_at": {"format": "date-time", "title": "Updated At", "type": "string"}}, "required": ["id", "title", "status", "created_at", "updated_at"], "title": "LucyTodoTaskSchema", "type": "object"}, "DashTaskItemSchema": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "action_type": {"title": "Action Type", "type": "string"}, "title": {"title": "Title", "type": "string"}, "description": {"default": "", "title": "Description", "type": "string"}, "status": {"title": "Status", "type": "string"}, "priority": {"title": "Priority", "type": "string"}, "due_date": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "Due Date"}, "scheduled_time": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Scheduled Time"}, "assignee_mode": {"title": "Assignee Mode", "type": "string"}, "outcome": {"default": "", "title": "Outcome", "type": "string"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "contact_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Contact Id"}, "contact_name": {"default": "", "title": "Contact Name", "type": "string"}, "assigned_to_name": {"default": "", "title": "Assigned To Name", "type": "string"}}, "required": ["id", "action_type", "title", "status", "priority", "assignee_mode", "created_at"], "title": "DashTaskItemSchema", "type": "object"}, "TodayActivitySchema": {"properties": {"date": {"format": "date", "title": "Date", "type": "string"}, "timezone": {"title": "Timezone", "type": "string"}, "reminders": {"items": {"$ref": "#/components/schemas/DashTaskItemSchema"}, "title": "Reminders", "type": "array"}, "events": {"items": {"$ref": "#/components/schemas/TodayEventSchema"}, "title": "Events", "type": "array"}}, "required": ["date", "timezone", "reminders", "events"], "title": "TodayActivitySchema", "type": "object"}, "TodayEventSchema": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "event_type": {"title": "Event Type", "type": "string"}, "title": {"title": "Title", "type": "string"}, "start_time": {"format": "date-time", "title": "Start Time", "type": "string"}, "end_time": {"format": "date-time", "title": "End Time", "type": "string"}, "status": {"title": "Status", "type": "string"}, "description": {"default": "", "title": "Description", "type": "string"}, "contact_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Contact Id"}, "contact_name": {"default": "", "title": "Contact Name", "type": "string"}}, "required": ["id", "event_type", "title", "start_time", "end_time", "status"], "title": "TodayEventSchema", "type": "object"}, "CalendarTaskUpdateSchema": {"properties": {"title": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Title"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "action_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Action Type"}, "assignee_mode": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Assignee Mode"}, "scheduled_time": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Scheduled Time"}, "due_date": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "Due Date"}, "status": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Status"}}, "title": "CalendarTaskUpdateSchema", "type": "object"}, "PortalRevokeOut": {"properties": {"detail": {"title": "Detail", "type": "string"}, "portal_status": {"$ref": "#/components/schemas/PortalStatusSchema"}}, "required": ["detail", "portal_status"], "title": "PortalRevokeOut", "type": "object"}, "RelationshipListSchema": {"description": "Lightweight for listing", "properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "to_contact_id": {"format": "uuid", "title": "To Contact Id", "type": "string"}, "to_contact_name": {"title": "To Contact Name", "type": "string"}, "to_contact_email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "To Contact Email"}, "relationship_type": {"title": "Relationship Type", "type": "string"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}}, "required": ["id", "to_contact_id", "to_contact_name", "to_contact_email", "relationship_type", "created_at"], "title": "RelationshipListSchema", "type": "object"}, "RelationshipCreateSchema": {"properties": {"to_contact_id": {"format": "uuid", "title": "To Contact Id", "type": "string"}, "relationship_type": {"title": "Relationship Type", "type": "string"}}, "required": ["to_contact_id", "relationship_type"], "title": "RelationshipCreateSchema", "type": "object"}, "CampaignSchema": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "name": {"title": "Name", "type": "string"}, "description": {"default": "", "title": "Description", "type": "string"}, "instructions": {"default": "", "title": "Instructions", "type": "string"}, "frequency_rules": {"default": [], "items": {"additionalProperties": true, "type": "object"}, "title": "Frequency Rules", "type": "array"}, "allowed_tools": {"default": [], "items": {"type": "string"}, "title": "Allowed Tools", "type": "array"}, "status": {"title": "Status", "type": "string"}, "trigger_type": {"default": "BATCH", "title": "Trigger Type", "type": "string"}, "trigger_event": {"default": "", "title": "Trigger Event", "type": "string"}, "trigger_condition": {"default": [], "items": {"additionalProperties": true, "type": "object"}, "title": "Trigger Condition", "type": "array"}, "cooldown_days": {"default": 0, "title": "Cooldown Days", "type": "integer"}, "duration_days": {"default": 14, "title": "Duration Days", "type": "integer"}, "fault_threshold": {"default": 5, "title": "Fault Threshold", "type": "integer"}, "consecutive_failures": {"default": 0, "title": "Consecutive Failures", "type": "integer"}, "scheduled_start_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Scheduled Start At"}, "completed_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Completed At"}, "last_evaluated_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Last Evaluated At"}, "target_list_ids": {"items": {"format": "uuid", "type": "string"}, "title": "Target List Ids", "type": "array"}, "owner_user_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Owner User Id"}, "department_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Department Id"}, "visibility_scope": {"default": "ORG", "title": "Visibility Scope", "type": "string"}, "transition_rules": {"additionalProperties": {"format": "uuid", "type": "string"}, "title": "Transition Rules", "type": "object"}, "config_overrides": {"additionalProperties": true, "title": "Config Overrides", "type": "object"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "updated_at": {"format": "date-time", "title": "Updated At", "type": "string"}}, "required": ["id", "name", "status", "created_at", "updated_at"], "title": "CampaignSchema", "type": "object"}, "CampaignCreateSchema": {"properties": {"name": {"title": "Name", "type": "string"}, "description": {"default": "", "title": "Description", "type": "string"}, "instructions": {"default": "", "title": "Instructions", "type": "string"}, "frequency_rules": {"default": [], "items": {"additionalProperties": true, "type": "object"}, "title": "Frequency Rules", "type": "array"}, "allowed_tools": {"default": [], "items": {"type": "string"}, "title": "Allowed Tools", "type": "array"}, "duration_days": {"default": 14, "title": "Duration Days", "type": "integer"}, "target_list_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Target List Id"}, "target_list_ids": {"items": {"format": "uuid", "type": "string"}, "title": "Target List Ids", "type": "array"}, "owner_user_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Owner User Id"}, "department_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Department Id"}, "visibility_scope": {"default": "ORG", "title": "Visibility Scope", "type": "string"}, "scheduled_start_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Scheduled Start At"}, "trigger_type": {"default": "BATCH", "title": "Trigger Type", "type": "string"}, "trigger_event": {"default": "", "title": "Trigger Event", "type": "string"}, "trigger_condition": {"default": [], "items": {"additionalProperties": true, "type": "object"}, "title": "Trigger Condition", "type": "array"}, "cooldown_days": {"default": 0, "title": "Cooldown Days", "type": "integer"}, "transition_rules": {"additionalProperties": {"format": "uuid", "type": "string"}, "title": "Transition Rules", "type": "object"}, "config_overrides": {"additionalProperties": true, "title": "Config Overrides", "type": "object"}}, "required": ["name"], "title": "CampaignCreateSchema", "type": "object"}, "CampaignPageSchema": {"properties": {"items": {"items": {"$ref": "#/components/schemas/CampaignSchema"}, "title": "Items", "type": "array"}, "count": {"default": 0, "title": "Count", "type": "integer"}, "page": {"default": 1, "title": "Page", "type": "integer"}, "limit": {"default": 25, "title": "Limit", "type": "integer"}}, "title": "CampaignPageSchema", "type": "object"}, "DashInboundItemSchema": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "interaction_type": {"title": "Interaction Type", "type": "string"}, "direction": {"title": "Direction", "type": "string"}, "content": {"title": "Content", "type": "string"}, "summary": {"default": "", "title": "Summary", "type": "string"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "local_day": {"format": "date", "title": "Local Day", "type": "string"}, "inbound_count": {"title": "Inbound Count", "type": "integer"}, "contact_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Contact Id"}, "contact_name": {"default": "", "title": "Contact Name", "type": "string"}, "conversation_thread_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Conversation Thread Id"}}, "required": ["id", "interaction_type", "direction", "content", "created_at", "local_day", "inbound_count"], "title": "DashInboundItemSchema", "type": "object"}, "DashInboundSchema": {"properties": {"calls": {"title": "Calls", "type": "integer"}, "sms": {"title": "Sms", "type": "integer"}, "email": {"title": "Email", "type": "integer"}, "total": {"title": "Total", "type": "integer"}, "page": {"title": "Page", "type": "integer"}, "page_size": {"title": "Page Size", "type": "integer"}, "total_groups": {"title": "Total Groups", "type": "integer"}, "total_pages": {"title": "Total Pages", "type": "integer"}, "has_prev": {"title": "Has Prev", "type": "boolean"}, "has_next": {"title": "Has Next", "type": "boolean"}, "items": {"items": {"$ref": "#/components/schemas/DashInboundItemSchema"}, "title": "Items", "type": "array"}}, "required": ["calls", "sms", "email", "total", "page", "page_size", "total_groups", "total_pages", "has_prev", "has_next", "items"], "title": "DashInboundSchema", "type": "object"}, "DashOutboundSchema": {"properties": {"calls": {"title": "Calls", "type": "integer"}, "sms": {"title": "Sms", "type": "integer"}, "email": {"title": "Email", "type": "integer"}, "total": {"title": "Total", "type": "integer"}}, "required": ["calls", "sms", "email", "total"], "title": "DashOutboundSchema", "type": "object"}, "DashWindowSchema": {"properties": {"range_key": {"title": "Range Key", "type": "string"}, "start_date": {"format": "date", "title": "Start Date", "type": "string"}, "end_date": {"format": "date", "title": "End Date", "type": "string"}, "timezone": {"title": "Timezone", "type": "string"}}, "required": ["range_key", "start_date", "end_date", "timezone"], "title": "DashWindowSchema", "type": "object"}, "DashboardOverviewSchema": {"properties": {"window": {"$ref": "#/components/schemas/DashWindowSchema"}, "inbound": {"$ref": "#/components/schemas/DashInboundSchema"}, "outbound": {"$ref": "#/components/schemas/DashOutboundSchema"}}, "required": ["window", "inbound", "outbound"], "title": "DashboardOverviewSchema", "type": "object"}, "CampaignBlastTestSchema": {"properties": {"channel": {"default": "EMAIL", "title": "Channel", "type": "string"}, "subject": {"default": "", "title": "Subject", "type": "string"}, "body": {"title": "Body", "type": "string"}, "body_mode": {"default": "TEXT", "title": "Body Mode", "type": "string"}, "hero_doc_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hero Doc Id"}, "campaign_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Campaign Id"}, "to_phone": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "To Phone"}}, "required": ["body"], "title": "CampaignBlastTestSchema", "type": "object"}, "CampaignCadenceFitResultSchema": {"properties": {"cadence_fit_error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Cadence Fit Error"}, "audience": {"default": 0, "title": "Audience", "type": "integer"}, "stagger_days": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Stagger Days"}, "min_duration_days": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Min Duration Days"}}, "title": "CampaignCadenceFitResultSchema", "type": "object"}, "CampaignCadenceFitPreviewSchema": {"properties": {"duration_days": {"title": "Duration Days", "type": "integer"}, "frequency_rules": {"items": {"additionalProperties": true, "type": "object"}, "title": "Frequency Rules", "type": "array"}, "trigger_type": {"default": "BATCH", "title": "Trigger Type", "type": "string"}, "target_list_ids": {"items": {"format": "uuid", "type": "string"}, "title": "Target List Ids", "type": "array"}, "config_overrides": {"additionalProperties": true, "title": "Config Overrides", "type": "object"}}, "required": ["duration_days"], "title": "CampaignCadenceFitPreviewSchema", "type": "object"}, "CampaignUpdateSchema": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "instructions": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Instructions"}, "frequency_rules": {"anyOf": [{"items": {"additionalProperties": true, "type": "object"}, "type": "array"}, {"type": "null"}], "title": "Frequency Rules"}, "allowed_tools": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Allowed Tools"}, "duration_days": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Duration Days"}, "target_list_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Target List Id"}, "target_list_ids": {"anyOf": [{"items": {"format": "uuid", "type": "string"}, "type": "array"}, {"type": "null"}], "title": "Target List Ids"}, "owner_user_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Owner User Id"}, "department_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Department Id"}, "visibility_scope": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Visibility Scope"}, "scheduled_start_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Scheduled Start At"}, "trigger_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Trigger Type"}, "trigger_event": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Trigger Event"}, "trigger_condition": {"anyOf": [{"items": {"additionalProperties": true, "type": "object"}, "type": "array"}, {"type": "null"}], "title": "Trigger Condition"}, "cooldown_days": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Cooldown Days"}, "transition_rules": {"anyOf": [{"additionalProperties": {"format": "uuid", "type": "string"}, "type": "object"}, {"type": "null"}], "title": "Transition Rules"}, "config_overrides": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Config Overrides"}}, "title": "CampaignUpdateSchema", "type": "object"}, "CampaignChanSchema": {"properties": {"scheduled": {"default": 0, "title": "Scheduled", "type": "integer"}, "queued": {"default": 0, "title": "Queued", "type": "integer"}, "sent": {"default": 0, "title": "Sent", "type": "integer"}, "deferred": {"default": 0, "title": "Deferred", "type": "integer"}, "failed": {"default": 0, "title": "Failed", "type": "integer"}, "delivered": {"default": 0, "title": "Delivered", "type": "integer"}, "opened": {"default": 0, "title": "Opened", "type": "integer"}, "clicked": {"default": 0, "title": "Clicked", "type": "integer"}, "replied": {"default": 0, "title": "Replied", "type": "integer"}, "unsubscribed": {"default": 0, "title": "Unsubscribed", "type": "integer"}, "opt_out": {"default": 0, "title": "Opt Out", "type": "integer"}, "connected": {"default": 0, "title": "Connected", "type": "integer"}, "under_60_seconds": {"default": 0, "title": "Under 60 Seconds", "type": "integer"}, "over_60_seconds": {"default": 0, "title": "Over 60 Seconds", "type": "integer"}, "billable_minutes": {"default": 0, "title": "Billable Minutes", "type": "integer"}, "transfer_attempted": {"default": 0, "title": "Transfer Attempted", "type": "integer"}, "transfer_connected": {"default": 0, "title": "Transfer Connected", "type": "integer"}, "transfer_failed": {"default": 0, "title": "Transfer Failed", "type": "integer"}}, "title": "CampaignChanSchema", "type": "object"}, "CampaignStatsSchema": {"properties": {"enrolled": {"default": 0, "title": "Enrolled", "type": "integer"}, "EMAIL": {"allOf": [{"$ref": "#/components/schemas/CampaignChanSchema"}]}, "SMS": {"allOf": [{"$ref": "#/components/schemas/CampaignChanSchema"}]}, "CALL": {"allOf": [{"$ref": "#/components/schemas/CampaignChanSchema"}]}}, "title": "CampaignStatsSchema", "type": "object"}, "CampaignValidateSchema": {"properties": {"total": {"title": "Total", "type": "integer"}, "channels": {"items": {"type": "string"}, "title": "Channels", "type": "array"}, "by_channel": {"additionalProperties": true, "title": "By Channel", "type": "object"}, "note": {"default": "", "title": "Note", "type": "string"}, "cadence_fit_error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Cadence Fit Error"}, "actions": {"additionalProperties": {"type": "integer"}, "title": "Actions", "type": "object"}, "validated_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Validated At"}, "email_check_status": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Email Check Status"}, "email_check": {"additionalProperties": true, "title": "Email Check", "type": "object"}, "sms_check_status": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Sms Check Status"}, "sms_check": {"additionalProperties": true, "title": "Sms Check", "type": "object"}, "email_capacity": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Email Capacity"}, "email_deep_clean": {"additionalProperties": true, "title": "Email Deep Clean", "type": "object"}}, "required": ["total", "channels", "by_channel"], "title": "CampaignValidateSchema", "type": "object"}, "CampaignDeepCleanQuoteSchema": {"properties": {"unique_emails": {"title": "Unique Emails", "type": "integer"}, "list_count": {"default": 0, "title": "List Count", "type": "integer"}, "target_object_id": {"default": "", "title": "Target Object Id", "type": "string"}, "audience_sig": {"default": "", "title": "Audience Sig", "type": "string"}, "rate_per_email": {"default": "0", "title": "Rate Per Email", "type": "string"}, "rate_per_1k": {"default": "0", "title": "Rate Per 1K", "type": "string"}, "quoted_max": {"default": "0.00", "title": "Quoted Max", "type": "string"}, "wallet_balance": {"default": "0.00", "title": "Wallet Balance", "type": "string"}, "wallet_ok": {"default": false, "title": "Wallet Ok", "type": "boolean"}, "mv_credits": {"default": 0, "title": "Mv Credits", "type": "integer"}, "mv_ok": {"default": false, "title": "Mv Ok", "type": "boolean"}, "mv_error": {"default": "", "title": "Mv Error", "type": "string"}, "validation_ready": {"default": false, "title": "Validation Ready", "type": "boolean"}, "validation_error": {"default": "", "title": "Validation Error", "type": "string"}, "can_start": {"default": false, "title": "Can Start", "type": "boolean"}, "deep_clean_done": {"default": false, "title": "Deep Clean Done", "type": "boolean"}, "deep_clean": {"additionalProperties": true, "title": "Deep Clean", "type": "object"}}, "required": ["unique_emails"], "title": "CampaignDeepCleanQuoteSchema", "type": "object"}, "CampaignJobSchema": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "contact_id": {"format": "uuid", "title": "Contact Id", "type": "string"}, "contact_name": {"default": "", "title": "Contact Name", "type": "string"}, "status": {"title": "Status", "type": "string"}, "current_step": {"default": "", "title": "Current Step", "type": "string"}, "quality_score": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Quality Score"}, "result_summary": {"default": "", "title": "Result Summary", "type": "string"}, "error_message": {"default": "", "title": "Error Message", "type": "string"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "updated_at": {"format": "date-time", "title": "Updated At", "type": "string"}}, "required": ["id", "contact_id", "status", "created_at", "updated_at"], "title": "CampaignJobSchema", "type": "object"}, "CampaignTaskPageSchema": {"properties": {"items": {"items": {"$ref": "#/components/schemas/CampaignCalendarTaskSchema"}, "title": "Items", "type": "array"}, "count": {"default": 0, "title": "Count", "type": "integer"}, "page": {"default": 1, "title": "Page", "type": "integer"}, "limit": {"default": 50, "title": "Limit", "type": "integer"}}, "title": "CampaignTaskPageSchema", "type": "object"}, "CampaignEnrollSchema": {"properties": {"contact_id": {"format": "uuid", "title": "Contact Id", "type": "string"}}, "required": ["contact_id"], "title": "CampaignEnrollSchema", "type": "object"}, "AutomationsIn": {"properties": {"automations": {"items": {"additionalProperties": true, "type": "object"}, "title": "Automations", "type": "array"}}, "required": ["automations"], "title": "AutomationsIn", "type": "object"}, "KnowledgeBaseSchema": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "name": {"title": "Name", "type": "string"}, "description": {"default": "", "title": "Description", "type": "string"}, "kb_type": {"title": "Kb Type", "type": "string"}, "agent_identifier": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Agent Identifier"}, "is_active": {"title": "Is Active", "type": "boolean"}}, "required": ["id", "name", "kb_type", "is_active"], "title": "KnowledgeBaseSchema", "type": "object"}, "PagedKnowledgeBaseSchema": {"properties": {"items": {"items": {"$ref": "#/components/schemas/KnowledgeBaseSchema"}, "title": "Items", "type": "array"}, "count": {"title": "Count", "type": "integer"}}, "required": ["items", "count"], "title": "PagedKnowledgeBaseSchema", "type": "object"}, "KnowledgeBaseCreateSchema": {"properties": {"name": {"title": "Name", "type": "string"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "", "title": "Description"}, "kb_type": {"default": "COMPANY", "title": "Kb Type", "type": "string"}, "agent_identifier": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Agent Identifier"}}, "required": ["name"], "title": "KnowledgeBaseCreateSchema", "type": "object"}, "DocumentSchema": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "filename": {"title": "Filename", "type": "string"}, "file_field": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "File Field"}, "file_size": {"title": "File Size", "type": "integer"}, "file_size_display": {"default": "", "title": "File Size Display", "type": "string"}, "file_type": {"title": "File Type", "type": "string"}, "processing_status": {"default": "PENDING", "title": "Processing Status", "type": "string"}, "processing_type": {"title": "Processing Type", "type": "string"}, "category": {"default": "UNCATEGORIZED", "title": "Category", "type": "string"}, "uploaded_at": {"format": "date-time", "title": "Uploaded At", "type": "string"}, "folder_path": {"default": "", "title": "Folder Path", "type": "string"}, "metadata": {"additionalProperties": true, "default": {}, "title": "Metadata", "type": "object"}, "party_ids": {"default": [], "items": {"type": "string"}, "title": "Party Ids", "type": "array"}, "page_count": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Page Count"}, "import_job_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Import Job Id"}, "import_job_status": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Import Job Status"}, "predicted_mapping": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"type": "null"}], "title": "Predicted Mapping"}, "import_error_file": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Import Error File"}}, "required": ["id", "filename", "file_size", "file_type", "processing_type", "uploaded_at"], "title": "DocumentSchema", "type": "object"}, "PagedDocumentSchema": {"properties": {"items": {"items": {"$ref": "#/components/schemas/DocumentSchema"}, "title": "Items", "type": "array"}, "count": {"title": "Count", "type": "integer"}}, "required": ["items", "count"], "title": "PagedDocumentSchema", "type": "object"}, "InitiateUploadResponseSchema": {"properties": {"upload_id": {"title": "Upload Id", "type": "string"}, "session_uri": {"title": "Session Uri", "type": "string"}, "gcs_path": {"title": "Gcs Path", "type": "string"}}, "required": ["upload_id", "session_uri", "gcs_path"], "title": "InitiateUploadResponseSchema", "type": "object"}, "InitiateUploadSchema": {"properties": {"filename": {"title": "Filename", "type": "string"}, "file_size": {"title": "File Size", "type": "integer"}, "content_type": {"title": "Content Type", "type": "string"}, "metadata": {"additionalProperties": true, "default": {}, "title": "Metadata", "type": "object"}}, "required": ["filename", "file_size", "content_type"], "title": "InitiateUploadSchema", "type": "object"}, "CompleteUploadSchema": {"properties": {"upload_id": {"title": "Upload Id", "type": "string"}}, "required": ["upload_id"], "title": "CompleteUploadSchema", "type": "object"}, "InitiateMultipartResponseSchema": {"properties": {"upload_id": {"title": "Upload Id", "type": "string"}, "parts": {"items": {}, "title": "Parts", "type": "array"}, "gcs_path": {"title": "Gcs Path", "type": "string"}}, "required": ["upload_id", "parts", "gcs_path"], "title": "InitiateMultipartResponseSchema", "type": "object"}, "InitiateMultipartSchema": {"properties": {"filename": {"title": "Filename", "type": "string"}, "file_size": {"title": "File Size", "type": "integer"}, "content_type": {"title": "Content Type", "type": "string"}, "num_parts": {"default": 4, "title": "Num Parts", "type": "integer"}, "metadata": {"additionalProperties": true, "default": {}, "title": "Metadata", "type": "object"}}, "required": ["filename", "file_size", "content_type"], "title": "InitiateMultipartSchema", "type": "object"}, "ComposeUploadResponseSchema": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "processing_status": {"title": "Processing Status", "type": "string"}}, "required": ["id", "processing_status"], "title": "ComposeUploadResponseSchema", "type": "object"}, "ComposeUploadSchema": {"properties": {"upload_id": {"title": "Upload Id", "type": "string"}}, "required": ["upload_id"], "title": "ComposeUploadSchema", "type": "object"}, "ImportStartSchema": {"properties": {"mapping": {"additionalProperties": {"type": "string"}, "title": "Mapping", "type": "object"}, "default_status": {"anyOf": [{"enum": ["NEW", "HOT", "WORKING", "CONVERTED", "LONG_TERM", "ARCHIVED", "DNC"], "type": "string"}, {"type": "null"}], "title": "Default Status"}, "default_type": {"anyOf": [{"enum": ["LEAD", "PROSPECT", "CLIENT", "PAST_CLIENT", "PARTNER", "VENDOR"], "type": "string"}, {"type": "null"}], "title": "Default Type"}, "thread_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Thread Id"}, "contact_list_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Contact List Id"}, "new_list_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "New List Name"}, "campaign_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Campaign Id"}}, "required": ["mapping"], "title": "ImportStartSchema", "type": "object"}, "DocumentPatchIn": {"properties": {"filename": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Filename"}, "category": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Category"}, "party_ids": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Party Ids"}}, "title": "DocumentPatchIn", "type": "object"}, "DocumentCatalogSchema": {"properties": {"categories": {"items": {"$ref": "#/components/schemas/DocumentCategorySchema"}, "title": "Categories", "type": "array"}, "checklist_templates": {"items": {"$ref": "#/components/schemas/DocumentChecklistTemplateSchema"}, "title": "Checklist Templates", "type": "array"}}, "required": ["categories", "checklist_templates"], "title": "DocumentCatalogSchema", "type": "object"}, "DocumentCategorySchema": {"properties": {"key": {"title": "Key", "type": "string"}, "label": {"title": "Label", "type": "string"}, "order": {"title": "Order", "type": "integer"}, "party_scope": {"default": "loan", "title": "Party Scope", "type": "string"}}, "required": ["key", "label", "order"], "title": "DocumentCategorySchema", "type": "object"}, "DocumentChecklistTemplateItemSchema": {"properties": {"key": {"default": "", "title": "Key", "type": "string"}, "category_key": {"title": "Category Key", "type": "string"}, "label": {"title": "Label", "type": "string"}, "description": {"default": "", "title": "Description", "type": "string"}, "required": {"default": true, "title": "Required", "type": "boolean"}, "order": {"title": "Order", "type": "integer"}}, "required": ["category_key", "label", "order"], "title": "DocumentChecklistTemplateItemSchema", "type": "object"}, "DocumentChecklistTemplateSchema": {"properties": {"key": {"title": "Key", "type": "string"}, "label": {"title": "Label", "type": "string"}, "order": {"title": "Order", "type": "integer"}, "items": {"items": {"$ref": "#/components/schemas/DocumentChecklistTemplateItemSchema"}, "title": "Items", "type": "array"}}, "required": ["key", "label", "order", "items"], "title": "DocumentChecklistTemplateSchema", "type": "object"}, "DocumentCatalogPutSchema": {"properties": {"categories": {"default": [], "items": {"$ref": "#/components/schemas/DocumentCategorySchema"}, "title": "Categories", "type": "array"}, "checklist_templates": {"default": [], "items": {"$ref": "#/components/schemas/DocumentChecklistTemplateSchema"}, "title": "Checklist Templates", "type": "array"}}, "title": "DocumentCatalogPutSchema", "type": "object"}, "DocumentChecklistItemSchema": {"properties": {"key": {"title": "Key", "type": "string"}, "category_key": {"title": "Category Key", "type": "string"}, "label": {"title": "Label", "type": "string"}, "description": {"default": "", "title": "Description", "type": "string"}, "required": {"default": true, "title": "Required", "type": "boolean"}, "status": {"title": "Status", "type": "string"}, "document_ids": {"default": [], "items": {"type": "string"}, "title": "Document Ids", "type": "array"}, "linked_documents": {"default": [], "items": {"additionalProperties": true, "type": "object"}, "title": "Linked Documents", "type": "array"}, "at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "At"}, "by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "By"}, "by_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "By Name"}, "adhoc": {"default": false, "title": "Adhoc", "type": "boolean"}}, "required": ["key", "category_key", "label", "status"], "title": "DocumentChecklistItemSchema", "type": "object"}, "DocumentChecklistProgressSchema": {"properties": {"received": {"title": "Received", "type": "integer"}, "total": {"title": "Total", "type": "integer"}, "required_pending": {"title": "Required Pending", "type": "integer"}}, "required": ["received", "total", "required_pending"], "title": "DocumentChecklistProgressSchema", "type": "object"}, "DocumentChecklistStateSchema": {"properties": {"loan_id": {"title": "Loan Id", "type": "string"}, "template_key": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Template Key"}, "template_label": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Template Label"}, "applied_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Applied At"}, "applied_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Applied By"}, "applied_by_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Applied By Name"}, "progress": {"$ref": "#/components/schemas/DocumentChecklistProgressSchema"}, "items": {"items": {"$ref": "#/components/schemas/DocumentChecklistItemSchema"}, "title": "Items", "type": "array"}, "available_templates": {"items": {"$ref": "#/components/schemas/DocumentChecklistTemplateRefSchema"}, "title": "Available Templates", "type": "array"}, "available_categories": {"default": [], "items": {"$ref": "#/components/schemas/DocumentChecklistTemplateRefSchema"}, "title": "Available Categories", "type": "array"}}, "required": ["loan_id", "progress", "items", "available_templates"], "title": "DocumentChecklistStateSchema", "type": "object"}, "DocumentChecklistTemplateRefSchema": {"properties": {"key": {"title": "Key", "type": "string"}, "label": {"title": "Label", "type": "string"}}, "required": ["key", "label"], "title": "DocumentChecklistTemplateRefSchema", "type": "object"}, "DocumentChecklistApplySchema": {"properties": {"template_key": {"title": "Template Key", "type": "string"}}, "required": ["template_key"], "title": "DocumentChecklistApplySchema", "type": "object"}, "DocumentChecklistItemPatchSchema": {"properties": {"key": {"title": "Key", "type": "string"}, "status": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Status"}, "delete": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Delete"}, "document_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Document Id"}, "add_document_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Add Document Id"}, "remove_document_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Remove Document Id"}}, "required": ["key"], "title": "DocumentChecklistItemPatchSchema", "type": "object"}, "DocumentChecklistPatchSchema": {"properties": {"items": {"items": {"$ref": "#/components/schemas/DocumentChecklistItemPatchSchema"}, "title": "Items", "type": "array"}}, "required": ["items"], "title": "DocumentChecklistPatchSchema", "type": "object"}, "DocumentRequestCategoryRefSchema": {"properties": {"key": {"title": "Key", "type": "string"}, "label": {"title": "Label", "type": "string"}}, "required": ["key", "label"], "title": "DocumentRequestCategoryRefSchema", "type": "object"}, "DocumentRequestItemSchema": {"properties": {"key": {"title": "Key", "type": "string"}, "category_key": {"title": "Category Key", "type": "string"}, "label": {"title": "Label", "type": "string"}, "status": {"title": "Status", "type": "string"}, "note": {"default": "", "title": "Note", "type": "string"}, "requested_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Requested At"}, "received_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Received At"}, "updated_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Updated At"}, "rejected_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Rejected At"}, "cleared_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Cleared At"}, "requested_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Requested By"}, "requested_by_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Requested By Name"}, "document_ids": {"default": [], "items": {"type": "string"}, "title": "Document Ids", "type": "array"}, "linked_documents": {"default": [], "items": {"$ref": "#/components/schemas/DocumentRequestLinkedDocSchema"}, "title": "Linked Documents", "type": "array"}}, "required": ["key", "category_key", "label", "status"], "title": "DocumentRequestItemSchema", "type": "object"}, "DocumentRequestLinkedDocSchema": {"properties": {"id": {"title": "Id", "type": "string"}, "filename": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Filename"}, "file_field": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "File Field"}, "party_ids": {"default": [], "items": {"type": "string"}, "title": "Party Ids", "type": "array"}}, "required": ["id"], "title": "DocumentRequestLinkedDocSchema", "type": "object"}, "DocumentRequestStateSchema": {"properties": {"loan_id": {"title": "Loan Id", "type": "string"}, "open_count": {"title": "Open Count", "type": "integer"}, "items": {"items": {"$ref": "#/components/schemas/DocumentRequestItemSchema"}, "title": "Items", "type": "array"}, "available_categories": {"items": {"$ref": "#/components/schemas/DocumentRequestCategoryRefSchema"}, "title": "Available Categories", "type": "array"}}, "required": ["loan_id", "open_count", "items", "available_categories"], "title": "DocumentRequestStateSchema", "type": "object"}, "DocumentRequestItemPatchSchema": {"properties": {"key": {"title": "Key", "type": "string"}, "status": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Status"}, "delete": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Delete"}, "note": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Note"}, "document_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Document Id"}, "add_document_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Add Document Id"}, "remove_document_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Remove Document Id"}}, "required": ["key"], "title": "DocumentRequestItemPatchSchema", "type": "object"}, "DocumentRequestPatchSchema": {"properties": {"items": {"items": {"$ref": "#/components/schemas/DocumentRequestItemPatchSchema"}, "title": "Items", "type": "array"}}, "required": ["items"], "title": "DocumentRequestPatchSchema", "type": "object"}, "MoveDocsToLoanOut": {"properties": {"moved": {"title": "Moved", "type": "integer"}, "documents": {"default": [], "items": {"additionalProperties": true, "type": "object"}, "title": "Documents", "type": "array"}, "skipped": {"default": [], "items": {"additionalProperties": true, "type": "object"}, "title": "Skipped", "type": "array"}}, "required": ["moved"], "title": "MoveDocsToLoanOut", "type": "object"}, "MoveDocsToLoanIn": {"properties": {"doc_ids": {"items": {"format": "uuid", "type": "string"}, "title": "Doc Ids", "type": "array"}, "loan_id": {"format": "uuid", "title": "Loan Id", "type": "string"}}, "required": ["doc_ids", "loan_id"], "title": "MoveDocsToLoanIn", "type": "object"}, "LoanLiteSchema": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "status": {"title": "Status", "type": "string"}, "loan_amount": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Loan Amount"}, "interest_rate": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Interest Rate"}, "property_address": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Property Address"}, "borrower_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Borrower Name"}, "lender_loan_number": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Lender Loan Number"}, "loan_purpose": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Loan Purpose"}, "mortgage_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Mortgage Type"}, "checkpoint_current": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Checkpoint Current"}, "checkpoint_stages": {"additionalProperties": true, "default": {}, "title": "Checkpoint Stages", "type": "object"}, "loan_expirations": {"additionalProperties": true, "default": {}, "title": "Loan Expirations", "type": "object"}, "loan_tasks": {"additionalProperties": true, "default": {}, "title": "Loan Tasks", "type": "object"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "updated_at": {"format": "date-time", "title": "Updated At", "type": "string"}, "portal_role": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Portal Role"}, "can_edit_form": {"default": false, "title": "Can Edit Form", "type": "boolean"}}, "required": ["id", "status", "created_at", "updated_at"], "title": "LoanLiteSchema", "type": "object"}, "LinkContactSchema": {"description": "Body for linking an existing CRM contact to a borrower.", "properties": {"contact_id": {"format": "uuid", "title": "Contact Id", "type": "string"}}, "required": ["contact_id"], "title": "LinkContactSchema", "type": "object"}, "LinkedContactSchema": {"description": "Snapshot of a CRM contact linked to a loan as a third party.", "properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "contact_id": {"format": "uuid", "title": "Contact Id", "type": "string"}, "first_name": {"title": "First Name", "type": "string"}, "last_name": {"title": "Last Name", "type": "string"}, "email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Email"}, "cell_phone": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Cell Phone"}, "contact_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Contact Type"}, "role": {"title": "Role", "type": "string"}, "role_display": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Role Display"}}, "required": ["id", "contact_id", "first_name", "last_name", "role"], "title": "LinkedContactSchema", "type": "object"}, "AddLinkedContactSchema": {"properties": {"contact_id": {"format": "uuid", "title": "Contact Id", "type": "string"}, "role": {"default": "OTHER", "title": "Role", "type": "string"}}, "required": ["contact_id"], "title": "AddLinkedContactSchema", "type": "object"}, "LoanTeamUserSchema": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "first_name": {"title": "First Name", "type": "string"}, "last_name": {"title": "Last Name", "type": "string"}, "email": {"title": "Email", "type": "string"}, "title": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Title"}}, "required": ["id", "first_name", "last_name", "email"], "title": "LoanTeamUserSchema", "type": "object"}, "LoanTeamMemberSchema": {"properties": {"user_id": {"format": "uuid", "title": "User Id", "type": "string"}, "first_name": {"title": "First Name", "type": "string"}, "last_name": {"title": "Last Name", "type": "string"}, "email": {"title": "Email", "type": "string"}, "title": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Title"}, "role": {"title": "Role", "type": "string"}, "is_primary": {"title": "Is Primary", "type": "boolean"}}, "required": ["user_id", "first_name", "last_name", "email", "role", "is_primary"], "title": "LoanTeamMemberSchema", "type": "object"}, "AddLoanTeamUserSchema": {"properties": {"user_id": {"format": "uuid", "title": "User Id", "type": "string"}}, "required": ["user_id"], "title": "AddLoanTeamUserSchema", "type": "object"}, "PagedLoanLiteSchema": {"properties": {"items": {"items": {"$ref": "#/components/schemas/LoanLiteSchema"}, "title": "Items", "type": "array"}, "count": {"title": "Count", "type": "integer"}}, "required": ["items", "count"], "title": "PagedLoanLiteSchema", "type": "object"}, "AddressSchema": {"properties": {"street": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Street"}, "unit": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Unit"}, "city": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "City"}, "state": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "State"}, "zip": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Zip"}, "country": {"default": "US", "title": "Country", "type": "string"}}, "title": "AddressSchema", "type": "object"}, "AssetSchema": {"properties": {"id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Id"}, "asset_type": {"title": "Asset Type", "type": "string"}, "financial_institution": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Financial Institution"}, "account_number": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Account Number"}, "value": {"anyOf": [{"type": "number"}, {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Value"}, "is_deposited": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Deposited"}, "funds_source": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Funds Source"}, "asset_type_other_description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Asset Type Other Description"}, "owner_index": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Owner Index"}}, "required": ["asset_type"], "title": "AssetSchema", "type": "object"}, "BorrowerSchema": {"properties": {"id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Id"}, "first_name": {"title": "First Name", "type": "string"}, "middle_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Middle Name"}, "last_name": {"title": "Last Name", "type": "string"}, "suffix": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Suffix"}, "email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Email"}, "cell_phone": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Cell Phone"}, "crm_contact_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Crm Contact Id"}, "home_phone": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Home Phone"}, "work_phone": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Work Phone"}, "work_phone_ext": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Work Phone Ext"}, "is_primary": {"default": false, "title": "Is Primary", "type": "boolean"}, "ssn": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Ssn"}, "birth_date": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "Birth Date"}, "citizenship": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Citizenship"}, "marital_status": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Marital Status"}, "dependent_count": {"anyOf": [{"type": "integer"}, {"type": "null"}], "default": 0, "title": "Dependent Count"}, "dependent_ages": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Dependent Ages"}, "alternate_names": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Alternate Names"}, "has_military_service": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Has Military Service"}, "military_status": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Military Status"}, "is_surviving_spouse_of_veteran": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Surviving Spouse Of Veteran"}, "military_service_expiration_date": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "Military Service Expiration Date"}, "ethnicity": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Ethnicity"}, "ethnicity_origins": {"default": [], "items": {"type": "string"}, "title": "Ethnicity Origins", "type": "array"}, "gender": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Gender"}, "race": {"default": [], "items": {"type": "string"}, "title": "Race", "type": "array"}, "race_designations": {"default": [], "items": {"type": "string"}, "title": "Race Designations", "type": "array"}, "credit_score_transunion": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Credit Score Transunion"}, "credit_score_equifax": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Credit Score Equifax"}, "credit_score_experian": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Credit Score Experian"}, "qualifying_score": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Qualifying Score"}, "declarations": {"anyOf": [{"$ref": "#/components/schemas/DeclarationsSchema"}, {"type": "null"}]}, "residences": {"default": [], "items": {"$ref": "#/components/schemas/ResidenceSchema"}, "title": "Residences", "type": "array"}, "employment": {"default": [], "items": {"$ref": "#/components/schemas/EmploymentSchema"}, "title": "Employment", "type": "array"}, "other_income": {"default": [], "items": {"$ref": "#/components/schemas/OtherIncomeSchema"}, "title": "Other Income", "type": "array"}}, "required": ["first_name", "last_name"], "title": "BorrowerSchema", "type": "object"}, "DeclarationsSchema": {"properties": {"will_occupy_as_primary": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Will Occupy As Primary"}, "owned_property_last_three_years": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Owned Property Last Three Years"}, "prior_property_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Prior Property Type"}, "prior_property_title": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Prior Property Title"}, "has_relationship_with_seller": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Has Relationship With Seller"}, "has_undisclosed_borrowed_funds": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Has Undisclosed Borrowed Funds"}, "undisclosed_borrowed_amount": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Undisclosed Borrowed Amount"}, "applying_for_other_mortgage": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Applying For Other Mortgage"}, "applying_for_new_credit": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Applying For New Credit"}, "has_priority_lien": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Has Priority Lien"}, "is_cosigner_on_undisclosed_debt": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Cosigner On Undisclosed Debt"}, "has_outstanding_judgments": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Has Outstanding Judgments"}, "is_delinquent_on_federal_debt": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Delinquent On Federal Debt"}, "is_party_to_lawsuit": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Party To Lawsuit"}, "had_deed_in_lieu": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Had Deed In Lieu"}, "had_short_sale": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Had Short Sale"}, "had_foreclosure": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Had Foreclosure"}, "declared_bankruptcy": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Declared Bankruptcy"}, "bankruptcy_chapter": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "string"}, {"type": "null"}], "title": "Bankruptcy Chapter"}, "bankruptcy_filing_date": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "Bankruptcy Filing Date"}, "bankruptcy_discharge_date": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "Bankruptcy Discharge Date"}, "demographics": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Demographics"}}, "title": "DeclarationsSchema", "type": "object"}, "EmploymentSchema": {"properties": {"id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Id"}, "employer_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Employer Name"}, "employer_phone": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Employer Phone"}, "address": {"anyOf": [{"$ref": "#/components/schemas/AddressSchema"}, {"type": "null"}]}, "position_title": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Position Title"}, "start_date": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "Start Date"}, "end_date": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "End Date"}, "years_in_profession": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Years In Profession"}, "is_current": {"default": false, "title": "Is Current", "type": "boolean"}, "is_self_employed": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Self Employed"}, "is_special_relationship": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Special Relationship"}, "ownership_interest": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Ownership Interest"}, "base_income": {"anyOf": [{"type": "number"}, {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Base Income"}, "overtime_income": {"anyOf": [{"type": "number"}, {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Overtime Income"}, "bonus_income": {"anyOf": [{"type": "number"}, {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Bonus Income"}, "commission_income": {"anyOf": [{"type": "number"}, {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Commission Income"}, "military_entitlements": {"anyOf": [{"type": "number"}, {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Military Entitlements"}, "other_income": {"anyOf": [{"type": "number"}, {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Other Income"}}, "title": "EmploymentSchema", "type": "object"}, "ExpenseCreateSchema": {"properties": {"id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Id"}, "expense_type": {"title": "Expense Type", "type": "string"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "monthly_payment": {"anyOf": [{"type": "number"}, {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}], "title": "Monthly Payment"}, "months_left_to_pay": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Months Left To Pay"}, "owner_index": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Owner Index"}}, "required": ["expense_type", "monthly_payment"], "title": "ExpenseCreateSchema", "type": "object"}, "HousingExpenseSchema": {"description": "Current or proposed housing expense line item for subject property.", "properties": {"expense_type": {"title": "Expense Type", "type": "string"}, "monthly_amount": {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Monthly Amount", "type": "string"}, "is_proposed": {"title": "Is Proposed", "type": "boolean"}}, "required": ["expense_type", "monthly_amount", "is_proposed"], "title": "HousingExpenseSchema", "type": "object"}, "LiabilityCreateSchema": {"properties": {"id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Id"}, "liability_type": {"title": "Liability Type", "type": "string"}, "liability_type_other_description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Liability Type Other Description"}, "company_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Company Name"}, "account_number": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Account Number"}, "unpaid_balance": {"anyOf": [{"type": "number"}, {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Unpaid Balance"}, "monthly_payment": {"anyOf": [{"type": "number"}, {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Monthly Payment"}, "will_be_paid_off": {"default": false, "title": "Will Be Paid Off", "type": "boolean"}, "months_left_to_pay": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Months Left To Pay"}, "is_resubordinated": {"default": false, "title": "Is Resubordinated", "type": "boolean"}, "is_excluded": {"default": false, "title": "Is Excluded", "type": "boolean"}, "heloc_credit_limit": {"anyOf": [{"type": "number"}, {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Heloc Credit Limit"}, "owner_index": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Owner Index"}, "reo_index": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Reo Index"}}, "required": ["liability_type"], "title": "LiabilityCreateSchema", "type": "object"}, "LoanCreateSchema": {"properties": {"status": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "Application", "title": "Status"}, "borrowers": {"items": {"$ref": "#/components/schemas/BorrowerSchema"}, "title": "Borrowers", "type": "array"}, "assets": {"default": [], "items": {"$ref": "#/components/schemas/AssetSchema"}, "title": "Assets", "type": "array"}, "other_income": {"default": [], "items": {"$ref": "#/components/schemas/OtherIncomeSchema"}, "title": "Other Income", "type": "array"}, "liabilities": {"default": [], "items": {"$ref": "#/components/schemas/LiabilityCreateSchema"}, "title": "Liabilities", "type": "array"}, "expenses": {"default": [], "items": {"$ref": "#/components/schemas/ExpenseCreateSchema"}, "title": "Expenses", "type": "array"}, "declarations": {"anyOf": [{"$ref": "#/components/schemas/DeclarationsSchema"}, {"type": "null"}]}, "real_estate_owned": {"default": [], "items": {"$ref": "#/components/schemas/REOSchema"}, "title": "Real Estate Owned", "type": "array"}, "other_new_mortgage_loans": {"default": [], "items": {"$ref": "#/components/schemas/RelatedLoanSchema"}, "title": "Other New Mortgage Loans", "type": "array"}, "loan_purpose": {"title": "Loan Purpose", "type": "string"}, "loan_amount": {"anyOf": [{"type": "number"}, {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}], "title": "Loan Amount"}, "purchase_price": {"anyOf": [{"type": "number"}, {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Purchase Price"}, "interest_rate": {"anyOf": [{"type": "number"}, {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Interest Rate"}, "loan_term": {"title": "Loan Term", "type": "integer"}, "amortization_type": {"title": "Amortization Type", "type": "string"}, "mortgage_type": {"title": "Mortgage Type", "type": "string"}, "street_address": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Street Address"}, "unit_number": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Unit Number"}, "city": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "City"}, "state_code": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "State Code"}, "zip_code": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Zip Code"}, "county": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "County"}, "property_value": {"anyOf": [{"type": "number"}, {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Property Value"}, "occupancy_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Occupancy Type"}, "number_of_units": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Number Of Units"}, "is_mixed_use": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Mixed Use"}, "is_manufactured": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Manufactured"}, "attachment_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Attachment Type"}, "expected_rental_income": {"anyOf": [{"type": "number"}, {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Expected Rental Income"}, "year_built": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Year Built"}, "property_acquired_date": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "Property Acquired Date"}, "property_original_cost": {"anyOf": [{"type": "number"}, {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Property Original Cost"}, "existing_liens_amount": {"anyOf": [{"type": "number"}, {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Existing Liens Amount"}, "present_value_of_lot": {"anyOf": [{"type": "number"}, {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Present Value Of Lot"}, "refinance_cash_out_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Refinance Cash Out Type"}, "refinance_primary_purpose": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Refinance Primary Purpose"}, "cash_out_amount": {"anyOf": [{"type": "number"}, {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Cash Out Amount"}, "construction_improvement_costs": {"anyOf": [{"type": "number"}, {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Construction Improvement Costs"}, "mi_funding_fee_total": {"anyOf": [{"type": "number"}, {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Mi Funding Fee Total"}, "mi_funding_fee_financed": {"anyOf": [{"type": "number"}, {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Mi Funding Fee Financed"}, "is_interest_only": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Interest Only"}, "housing_expenses": {"default": [], "items": {"$ref": "#/components/schemas/HousingExpenseSchema"}, "title": "Housing Expenses", "type": "array"}, "is_disabled_veteran": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Disabled Veteran"}, "disability_percentage": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Disability Percentage"}, "additional_data": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Additional Data"}, "lender_loan_number": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Lender Loan Number"}, "universal_loan_identifier": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Universal Loan Identifier"}, "agency_case_number": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Agency Case Number"}, "application_received_date": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "Application Received Date"}}, "required": ["borrowers", "loan_purpose", "loan_amount", "loan_term", "amortization_type", "mortgage_type"], "title": "LoanCreateSchema", "type": "object"}, "OtherIncomeSchema": {"description": "Schema for creating/inputting other income - no resolvers", "properties": {"id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Id"}, "income_type": {"title": "Income Type", "type": "string"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "monthly_amount": {"anyOf": [{"type": "number"}, {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}], "title": "Monthly Amount"}, "owner_index": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Owner Index"}}, "required": ["income_type", "monthly_amount"], "title": "OtherIncomeSchema", "type": "object"}, "REOLienSchema": {"properties": {"sequence_number": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Sequence Number"}, "creditor_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Creditor Name"}, "account_number": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Account Number"}, "monthly_payment": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Monthly Payment"}, "unpaid_balance": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Unpaid Balance"}, "to_be_paid_off": {"default": false, "title": "To Be Paid Off", "type": "boolean"}, "type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Type"}, "credit_limit": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Credit Limit"}}, "title": "REOLienSchema", "type": "object"}, "REOSchema": {"properties": {"id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Id"}, "sequence_number": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Sequence Number"}, "street_address": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Street Address"}, "unit_number": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Unit Number"}, "city": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "City"}, "state_code": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "State Code"}, "zip_code": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Zip Code"}, "county": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "County"}, "country": {"default": "US", "title": "Country", "type": "string"}, "property_value": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Property Value"}, "status": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Status"}, "intended_occupancy": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Intended Occupancy"}, "is_subject_property": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Subject Property"}, "number_of_units": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Number Of Units"}, "year_built": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Year Built"}, "is_mixed_use": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Mixed Use"}, "is_manufactured": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Manufactured"}, "attachment_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Attachment Type"}, "is_fha_secondary_residence": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Fha Secondary Residence"}, "monthly_insurance": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Monthly Insurance"}, "monthly_taxes": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Monthly Taxes"}, "monthly_mortgage_insurance": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Monthly Mortgage Insurance"}, "monthly_association_dues": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Monthly Association Dues"}, "monthly_other_dues": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Monthly Other Dues"}, "gross_rental_income": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Gross Rental Income"}, "net_monthly_rental_income": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Net Monthly Rental Income"}, "liens": {"default": [], "items": {"$ref": "#/components/schemas/REOLienSchema"}, "title": "Liens", "type": "array"}, "owner_index": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Owner Index"}, "owner_ids": {"anyOf": [{"items": {"format": "uuid", "type": "string"}, "type": "array"}, {"type": "null"}], "title": "Owner Ids"}}, "title": "REOSchema", "type": "object"}, "RelatedLoanSchema": {"properties": {"id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Id"}, "creditor_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Creditor Name"}, "lien_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Lien Type"}, "monthly_payment": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Monthly Payment"}, "loan_amount": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Loan Amount"}, "credit_limit": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Credit Limit"}}, "title": "RelatedLoanSchema", "type": "object"}, "ResidenceSchema": {"properties": {"id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Id"}, "street": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Street"}, "unit": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Unit"}, "city": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "City"}, "state": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "State"}, "zip": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Zip"}, "country": {"default": "US", "title": "Country", "type": "string"}, "is_current": {"default": false, "title": "Is Current", "type": "boolean"}, "is_mailing": {"default": false, "title": "Is Mailing", "type": "boolean"}, "housing_status": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Housing Status"}, "monthly_rent": {"anyOf": [{"type": "number"}, {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Monthly Rent"}, "years_at_address": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Years At Address"}}, "title": "ResidenceSchema", "type": "object"}, "DuplicateCheckResultSchema": {"description": "Schema for duplicate check result.", "properties": {"has_duplicates": {"title": "Has Duplicates", "type": "boolean"}, "matches": {"items": {"$ref": "#/components/schemas/DuplicateLoanMatchSchema"}, "title": "Matches", "type": "array"}}, "required": ["has_duplicates", "matches"], "title": "DuplicateCheckResultSchema", "type": "object"}, "DuplicateLoanMatchSchema": {"description": "Schema for a duplicate loan match result.", "properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "property_address": {"title": "Property Address", "type": "string"}, "borrower_name": {"title": "Borrower Name", "type": "string"}, "loan_amount": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Loan Amount"}, "status": {"title": "Status", "type": "string"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "match_score": {"title": "Match Score", "type": "integer"}, "match_reasons": {"items": {"type": "string"}, "title": "Match Reasons", "type": "array"}}, "required": ["id", "property_address", "borrower_name", "status", "created_at", "match_score", "match_reasons"], "title": "DuplicateLoanMatchSchema", "type": "object"}, "DuplicateCheckSchema": {"description": "Schema for checking a single loan for duplicates.", "properties": {"street_address": {"title": "Street Address", "type": "string"}, "zip_code": {"title": "Zip Code", "type": "string"}, "borrower_ssn": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Borrower Ssn"}, "borrower_email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Borrower Email"}, "borrower_phone": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Borrower Phone"}}, "required": ["street_address", "zip_code"], "title": "DuplicateCheckSchema", "type": "object"}, "BulkDuplicateCheckResultSchema": {"description": "Schema for bulk duplicate check results.", "properties": {"results": {"additionalProperties": {"$ref": "#/components/schemas/DuplicateCheckResultSchema"}, "title": "Results", "type": "object"}, "intra_batch_duplicates": {"items": {"maxItems": 2, "minItems": 2, "prefixItems": [{"type": "integer"}, {"type": "integer"}], "type": "array"}, "title": "Intra Batch Duplicates", "type": "array"}}, "required": ["results", "intra_batch_duplicates"], "title": "BulkDuplicateCheckResultSchema", "type": "object"}, "BulkDuplicateCheckSchema": {"description": "Schema for checking multiple loans for duplicates in batch.", "properties": {"loans": {"items": {"$ref": "#/components/schemas/DuplicateCheckSchema"}, "title": "Loans", "type": "array"}}, "required": ["loans"], "title": "BulkDuplicateCheckSchema", "type": "object"}, "BulkDeleteLoansSchema": {"properties": {"ids": {"anyOf": [{"items": {"format": "uuid", "type": "string"}, "type": "array"}, {"type": "null"}], "title": "Ids"}, "scope": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Scope"}, "filter_search": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Filter Search"}, "filter_status": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Filter Status"}}, "title": "BulkDeleteLoansSchema", "type": "object"}, "AssetDetailSchema": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "asset_type": {"title": "Asset Type", "type": "string"}, "financial_institution": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Financial Institution"}, "account_number": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Account Number"}, "value": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Value"}, "is_deposited": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Deposited"}, "funds_source": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Funds Source"}, "asset_type_other_description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Asset Type Other Description"}, "owner_index": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Owner Index"}, "sequence_number": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Sequence Number"}, "owner_ids": {"default": [], "items": {"format": "uuid", "type": "string"}, "title": "Owner Ids", "type": "array"}}, "required": ["id", "asset_type"], "title": "AssetDetailSchema", "type": "object"}, "BorrowerCRMContactSchema": {"description": "Minimal CRM contact snapshot for a borrower's linked contact.", "properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "first_name": {"title": "First Name", "type": "string"}, "last_name": {"title": "Last Name", "type": "string"}, "contact_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Contact Type"}, "status": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Status"}}, "required": ["id", "first_name", "last_name"], "title": "BorrowerCRMContactSchema", "type": "object"}, "BorrowerDetailSchema": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "first_name": {"title": "First Name", "type": "string"}, "middle_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Middle Name"}, "last_name": {"title": "Last Name", "type": "string"}, "suffix": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Suffix"}, "email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Email"}, "cell_phone": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Cell Phone"}, "crm_contact_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Crm Contact Id"}, "home_phone": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Home Phone"}, "work_phone": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Work Phone"}, "work_phone_ext": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Work Phone Ext"}, "is_primary": {"default": false, "title": "Is Primary", "type": "boolean"}, "ssn": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Ssn"}, "birth_date": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "Birth Date"}, "citizenship": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Citizenship"}, "marital_status": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Marital Status"}, "dependent_count": {"anyOf": [{"type": "integer"}, {"type": "null"}], "default": 0, "title": "Dependent Count"}, "dependent_ages": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Dependent Ages"}, "alternate_names": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Alternate Names"}, "has_military_service": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Has Military Service"}, "military_status": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Military Status"}, "is_surviving_spouse_of_veteran": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Surviving Spouse Of Veteran"}, "military_service_expiration_date": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "Military Service Expiration Date"}, "ethnicity": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Ethnicity"}, "ethnicity_origins": {"default": [], "items": {"type": "string"}, "title": "Ethnicity Origins", "type": "array"}, "gender": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Gender"}, "race": {"default": [], "items": {"type": "string"}, "title": "Race", "type": "array"}, "race_designations": {"default": [], "items": {"type": "string"}, "title": "Race Designations", "type": "array"}, "credit_score_transunion": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Credit Score Transunion"}, "credit_score_equifax": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Credit Score Equifax"}, "credit_score_experian": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Credit Score Experian"}, "qualifying_score": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Qualifying Score"}, "declarations": {"anyOf": [{"$ref": "#/components/schemas/DeclarationsSchema"}, {"type": "null"}]}, "residences": {"default": [], "items": {"$ref": "#/components/schemas/ResidenceDetailSchema"}, "title": "Residences", "type": "array"}, "employment": {"default": [], "items": {"$ref": "#/components/schemas/EmploymentDetailSchema"}, "title": "Employment", "type": "array"}, "other_income": {"default": [], "items": {"$ref": "#/components/schemas/OtherIncomeDetailSchema"}, "title": "Other Income", "type": "array"}, "declaration": {"anyOf": [{"$ref": "#/components/schemas/DeclarationsDetailSchema"}, {"type": "null"}]}, "crm_contact": {"anyOf": [{"$ref": "#/components/schemas/BorrowerCRMContactSchema"}, {"type": "null"}]}}, "required": ["id", "first_name", "last_name"], "title": "BorrowerDetailSchema", "type": "object"}, "DeclarationsDetailSchema": {"properties": {"will_occupy_as_primary": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Will Occupy As Primary"}, "owned_property_last_three_years": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Owned Property Last Three Years"}, "prior_property_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Prior Property Type"}, "prior_property_title": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Prior Property Title"}, "has_relationship_with_seller": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Has Relationship With Seller"}, "has_undisclosed_borrowed_funds": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Has Undisclosed Borrowed Funds"}, "undisclosed_borrowed_amount": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Undisclosed Borrowed Amount"}, "applying_for_other_mortgage": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Applying For Other Mortgage"}, "applying_for_new_credit": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Applying For New Credit"}, "has_priority_lien": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Has Priority Lien"}, "is_cosigner_on_undisclosed_debt": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Cosigner On Undisclosed Debt"}, "has_outstanding_judgments": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Has Outstanding Judgments"}, "is_delinquent_on_federal_debt": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Delinquent On Federal Debt"}, "is_party_to_lawsuit": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Party To Lawsuit"}, "had_deed_in_lieu": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Had Deed In Lieu"}, "had_short_sale": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Had Short Sale"}, "had_foreclosure": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Had Foreclosure"}, "declared_bankruptcy": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Declared Bankruptcy"}, "bankruptcy_chapter": {"items": {"type": "string"}, "title": "Bankruptcy Chapter", "type": "array"}, "bankruptcy_filing_date": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "Bankruptcy Filing Date"}, "bankruptcy_discharge_date": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "Bankruptcy Discharge Date"}, "demographics": {"anyOf": [{"$ref": "#/components/schemas/DemographicsSchema"}, {"type": "null"}]}}, "title": "DeclarationsDetailSchema", "type": "object"}, "DemographicsSchema": {"description": "HMDA Demographic Information nested in declarations on frontend", "properties": {"hispanicOrLatino": {"default": false, "title": "Hispanicorlatino", "type": "boolean"}, "mexican": {"default": false, "title": "Mexican", "type": "boolean"}, "puertoRican": {"default": false, "title": "Puertorican", "type": "boolean"}, "cuban": {"default": false, "title": "Cuban", "type": "boolean"}, "otherHispanicOrLatino": {"default": false, "title": "Otherhispanicorlatino", "type": "boolean"}, "otherHispanicOrLatinoDesc": {"default": "", "title": "Otherhispanicorlatinodesc", "type": "string"}, "notHispanicOrLatino": {"default": false, "title": "Nothispanicorlatino", "type": "boolean"}, "ethnicityInfoNotProvided": {"default": false, "title": "Ethnicityinfonotprovided", "type": "boolean"}, "female": {"default": false, "title": "Female", "type": "boolean"}, "male": {"default": false, "title": "Male", "type": "boolean"}, "sexInfoNotProvided": {"default": false, "title": "Sexinfonotprovided", "type": "boolean"}, "americanIndianOrAlaskaNative": {"default": false, "title": "Americanindianoralaskanative", "type": "boolean"}, "americanIndianTribe": {"default": "", "title": "Americanindiantribe", "type": "string"}, "asian": {"default": false, "title": "Asian", "type": "boolean"}, "asianIndian": {"default": false, "title": "Asianindian", "type": "boolean"}, "chinese": {"default": false, "title": "Chinese", "type": "boolean"}, "filipino": {"default": false, "title": "Filipino", "type": "boolean"}, "japanese": {"default": false, "title": "Japanese", "type": "boolean"}, "korean": {"default": false, "title": "Korean", "type": "boolean"}, "vietnamese": {"default": false, "title": "Vietnamese", "type": "boolean"}, "otherAsian": {"default": false, "title": "Otherasian", "type": "boolean"}, "otherAsianDesc": {"default": "", "title": "Otherasiandesc", "type": "string"}, "blackOrAfricanAmerican": {"default": false, "title": "Blackorafricanamerican", "type": "boolean"}, "nativeHawaiianOrPacificIslander": {"default": false, "title": "Nativehawaiianorpacificislander", "type": "boolean"}, "nativeHawaiian": {"default": false, "title": "Nativehawaiian", "type": "boolean"}, "guamanianOrChamorro": {"default": false, "title": "Guamanianorchamorro", "type": "boolean"}, "samoan": {"default": false, "title": "Samoan", "type": "boolean"}, "otherPacificIslander": {"default": false, "title": "Otherpacificislander", "type": "boolean"}, "otherPacificIslanderDesc": {"default": "", "title": "Otherpacificislanderdesc", "type": "string"}, "white": {"default": false, "title": "White", "type": "boolean"}, "raceInfoNotProvided": {"default": false, "title": "Raceinfonotprovided", "type": "boolean"}}, "title": "DemographicsSchema", "type": "object"}, "EmploymentDetailSchema": {"properties": {"id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Id"}, "employer_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Employer Name"}, "employer_phone": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Employer Phone"}, "address": {"anyOf": [{"$ref": "#/components/schemas/AddressSchema"}, {"type": "null"}]}, "position_title": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Position Title"}, "start_date": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "Start Date"}, "end_date": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "End Date"}, "years_in_profession": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Years In Profession"}, "is_current": {"default": false, "title": "Is Current", "type": "boolean"}, "is_self_employed": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Self Employed"}, "is_special_relationship": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Special Relationship"}, "ownership_interest": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Ownership Interest"}, "base_income": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Base Income"}, "overtime_income": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Overtime Income"}, "bonus_income": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Bonus Income"}, "commission_income": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Commission Income"}, "military_entitlements": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Military Entitlements"}, "other_income": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Other Income"}, "sequence_number": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Sequence Number"}, "employer_street": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Employer Street"}, "employer_unit": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Employer Unit"}, "employer_city": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Employer City"}, "employer_state": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Employer State"}, "employer_zip": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Employer Zip"}, "time_in_line_of_work_months": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Time In Line Of Work Months"}}, "title": "EmploymentDetailSchema", "type": "object"}, "ExpenseSchema": {"properties": {"id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Id"}, "expense_type": {"title": "Expense Type", "type": "string"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "monthly_payment": {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Monthly Payment", "type": "string"}, "months_left_to_pay": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Months Left To Pay"}, "owner_index": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Owner Index"}, "sequence_number": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Sequence Number"}}, "required": ["expense_type", "monthly_payment"], "title": "ExpenseSchema", "type": "object"}, "LiabilityDetailSchema": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "sequence_number": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Sequence Number"}, "liability_type": {"title": "Liability Type", "type": "string"}, "liability_type_other_description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Liability Type Other Description"}, "company_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Company Name"}, "account_number": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Account Number"}, "unpaid_balance": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Unpaid Balance"}, "monthly_payment": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Monthly Payment"}, "will_be_paid_off": {"default": false, "title": "Will Be Paid Off", "type": "boolean"}, "months_left_to_pay": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Months Left To Pay"}, "is_resubordinated": {"default": false, "title": "Is Resubordinated", "type": "boolean"}, "is_excluded": {"default": false, "title": "Is Excluded", "type": "boolean"}, "heloc_credit_limit": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Heloc Credit Limit"}, "holder_ids": {"default": [], "items": {"format": "uuid", "type": "string"}, "title": "Holder Ids", "type": "array"}, "reo_property_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Reo Property Id"}}, "required": ["id", "liability_type"], "title": "LiabilityDetailSchema", "type": "object"}, "LoanDetailSchema": {"properties": {"status": {"title": "Status", "type": "string"}, "borrowers": {"items": {"$ref": "#/components/schemas/BorrowerDetailSchema"}, "title": "Borrowers", "type": "array"}, "assets": {"default": [], "items": {"$ref": "#/components/schemas/AssetDetailSchema"}, "title": "Assets", "type": "array"}, "other_income": {"default": [], "items": {"$ref": "#/components/schemas/OtherIncomeDetailSchema"}, "title": "Other Income", "type": "array"}, "liabilities": {"default": [], "items": {"$ref": "#/components/schemas/LiabilityDetailSchema"}, "title": "Liabilities", "type": "array"}, "expenses": {"default": [], "items": {"$ref": "#/components/schemas/ExpenseSchema"}, "title": "Expenses", "type": "array"}, "declarations": {"anyOf": [{"$ref": "#/components/schemas/DeclarationsDetailSchema"}, {"type": "null"}]}, "real_estate_owned": {"default": [], "items": {"$ref": "#/components/schemas/REOSchema"}, "title": "Real Estate Owned", "type": "array"}, "other_new_mortgage_loans": {"default": [], "items": {"$ref": "#/components/schemas/RelatedLoanSchema"}, "title": "Other New Mortgage Loans", "type": "array"}, "loan_purpose": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Loan Purpose"}, "loan_amount": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Loan Amount"}, "purchase_price": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Purchase Price"}, "interest_rate": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Interest Rate"}, "loan_term": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Loan Term"}, "amortization_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Amortization Type"}, "mortgage_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Mortgage Type"}, "street_address": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Street Address"}, "unit_number": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Unit Number"}, "city": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "City"}, "state_code": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "State Code"}, "zip_code": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Zip Code"}, "county": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "County"}, "property_value": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Property Value"}, "occupancy_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Occupancy Type"}, "number_of_units": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Number Of Units"}, "is_mixed_use": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Mixed Use"}, "is_manufactured": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Manufactured"}, "attachment_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Attachment Type"}, "expected_rental_income": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Expected Rental Income"}, "year_built": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Year Built"}, "property_acquired_date": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "Property Acquired Date"}, "property_original_cost": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Property Original Cost"}, "existing_liens_amount": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Existing Liens Amount"}, "present_value_of_lot": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Present Value Of Lot"}, "refinance_cash_out_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Refinance Cash Out Type"}, "refinance_primary_purpose": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Refinance Primary Purpose"}, "cash_out_amount": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Cash Out Amount"}, "construction_improvement_costs": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Construction Improvement Costs"}, "mi_funding_fee_total": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Mi Funding Fee Total"}, "mi_funding_fee_financed": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Mi Funding Fee Financed"}, "is_interest_only": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Interest Only"}, "housing_expenses": {"default": [], "items": {"$ref": "#/components/schemas/HousingExpenseSchema"}, "title": "Housing Expenses", "type": "array"}, "is_disabled_veteran": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Disabled Veteran"}, "disability_percentage": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Disability Percentage"}, "additional_data": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Additional Data"}, "lender_loan_number": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Lender Loan Number"}, "universal_loan_identifier": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Universal Loan Identifier"}, "agency_case_number": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Agency Case Number"}, "application_received_date": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "Application Received Date"}, "id": {"format": "uuid", "title": "Id", "type": "string"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "updated_at": {"format": "date-time", "title": "Updated At", "type": "string"}, "portal_role": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Portal Role"}, "can_edit_form": {"default": false, "title": "Can Edit Form", "type": "boolean"}, "down_payment": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Down Payment"}, "team_members": {"default": [], "items": {"$ref": "#/components/schemas/LoanTeamMemberSchema"}, "title": "Team Members", "type": "array"}, "linked_contacts": {"default": [], "items": {"$ref": "#/components/schemas/LinkedContactSchema"}, "title": "Linked Contacts", "type": "array"}}, "required": ["status", "borrowers", "id", "created_at", "updated_at"], "title": "LoanDetailSchema", "type": "object"}, "OtherIncomeDetailSchema": {"description": "Schema for reading other income from database - with resolvers", "properties": {"id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Id"}, "income_type": {"title": "Income Type", "type": "string"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "monthly_amount": {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Monthly Amount", "type": "string"}, "owner_index": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Owner Index"}, "sequence_number": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Sequence Number"}}, "required": ["income_type", "monthly_amount"], "title": "OtherIncomeDetailSchema", "type": "object"}, "ResidenceDetailSchema": {"properties": {"id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Id"}, "street": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Street"}, "unit": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Unit"}, "city": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "City"}, "state": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "State"}, "zip": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Zip"}, "country": {"default": "US", "title": "Country", "type": "string"}, "is_current": {"default": false, "title": "Is Current", "type": "boolean"}, "is_mailing": {"default": false, "title": "Is Mailing", "type": "boolean"}, "housing_status": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Housing Status"}, "monthly_rent": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Monthly Rent"}, "years_at_address": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Years At Address"}, "residency_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Residency Type"}}, "title": "ResidenceDetailSchema", "type": "object"}, "LoanLimitCheckSchema": {"properties": {"applicable": {"default": true, "title": "Applicable", "type": "boolean"}, "reason": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Reason"}, "loan_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Loan Id"}, "program": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Program"}, "units": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Units"}, "loan_amount": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Loan Amount"}, "limit_amount": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Limit Amount"}, "headroom": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Headroom"}, "exceeds_limit": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Exceeds Limit"}, "high_cost": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "High Cost"}, "limit_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Limit Type"}, "county_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "County Name"}, "state_abbr": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "State Abbr"}, "fips_key": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Fips Key"}, "location_source": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Location Source"}, "year": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Year"}}, "title": "LoanLimitCheckSchema", "type": "object"}, "LoanLimitEvaluateIn": {"properties": {"mortgage_type": {"title": "Mortgage Type", "type": "string"}, "loan_amount": {"title": "Loan Amount", "type": "number"}, "units": {"default": 1, "title": "Units", "type": "integer"}, "zip_code": {"title": "Zip Code", "type": "string"}, "state_code": {"title": "State Code", "type": "string"}, "city": {"default": "", "title": "City", "type": "string"}, "county": {"default": "", "title": "County", "type": "string"}, "is_reverse": {"default": false, "title": "Is Reverse", "type": "boolean"}}, "required": ["mortgage_type", "loan_amount", "zip_code", "state_code"], "title": "LoanLimitEvaluateIn", "type": "object"}, "LoanDocExportEligibilityOut": {"properties": {"eligible": {"title": "Eligible", "type": "boolean"}, "doc_count": {"default": 0, "title": "Doc Count", "type": "integer"}, "total_bytes": {"default": 0, "title": "Total Bytes", "type": "integer"}, "max_bytes": {"default": 0, "title": "Max Bytes", "type": "integer"}, "message": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Message"}}, "required": ["eligible"], "title": "LoanDocExportEligibilityOut", "type": "object"}, "LoanDocExportStartOut": {"properties": {"job_id": {"title": "Job Id", "type": "string"}, "status": {"title": "Status", "type": "string"}}, "required": ["job_id", "status"], "title": "LoanDocExportStartOut", "type": "object"}, "LoanDocExportStartIn": {"properties": {"doc_ids": {"anyOf": [{"items": {"format": "uuid", "type": "string"}, "type": "array"}, {"type": "null"}], "title": "Doc Ids"}}, "title": "LoanDocExportStartIn", "type": "object"}, "LoanDocExportStatusOut": {"properties": {"job_id": {"title": "Job Id", "type": "string"}, "status": {"title": "Status", "type": "string"}, "doc_count": {"default": 0, "title": "Doc Count", "type": "integer"}, "error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error"}, "filename": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Filename"}, "download_ready": {"default": false, "title": "Download Ready", "type": "boolean"}}, "required": ["job_id", "status"], "title": "LoanDocExportStatusOut", "type": "object"}, "LoanHandoffEligibilityOut": {"description": "LOS handoff pre-check: webhook, borrowers, environment.", "properties": {"eligible": {"title": "Eligible", "type": "boolean"}, "doc_count": {"default": 0, "title": "Doc Count", "type": "integer"}, "total_bytes": {"default": 0, "title": "Total Bytes", "type": "integer"}, "max_bytes": {"default": 0, "title": "Max Bytes", "type": "integer"}, "message": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Message"}, "endpoints": {"default": [], "items": {"$ref": "#/components/schemas/LoanHandoffEndpointLite"}, "title": "Endpoints", "type": "array"}}, "required": ["eligible"], "title": "LoanHandoffEligibilityOut", "type": "object"}, "LoanHandoffEndpointLite": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "name": {"title": "Name", "type": "string"}}, "required": ["id", "name"], "title": "LoanHandoffEndpointLite", "type": "object"}, "LoanHandoffStartOut": {"description": "Queued handoff job \u2014 poll status with handoff_id.", "properties": {"handoff_id": {"title": "Handoff Id", "type": "string"}, "status": {"title": "Status", "type": "string"}}, "required": ["handoff_id", "status"], "title": "LoanHandoffStartOut", "type": "object"}, "LoanHandoffStartIn": {"properties": {"endpoint_id": {"format": "uuid", "title": "Endpoint Id", "type": "string"}}, "required": ["endpoint_id"], "title": "LoanHandoffStartIn", "type": "object"}, "LoanHandoffStatusOut": {"description": "Handoff job poll result.", "properties": {"handoff_id": {"title": "Handoff Id", "type": "string"}, "status": {"title": "Status", "type": "string"}, "endpoint_name": {"default": "", "title": "Endpoint Name", "type": "string"}, "doc_count": {"default": 0, "title": "Doc Count", "type": "integer"}, "error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error"}, "delivery_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Delivery Id"}, "status_code": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Status Code"}, "succeeded": {"default": false, "title": "Succeeded", "type": "boolean"}}, "required": ["handoff_id", "status"], "title": "LoanHandoffStatusOut", "type": "object"}, "LoanCatalogItemSchema": {"description": "Org-defined processing catalog entry (checkpoint, expiration, or task).", "properties": {"key": {"title": "Key", "type": "string"}, "label": {"title": "Label", "type": "string"}, "order": {"title": "Order", "type": "integer"}}, "required": ["key", "label", "order"], "title": "LoanCatalogItemSchema", "type": "object"}, "LoanProcessingConfigSchema": {"properties": {"checkpoints": {"default": [], "items": {"$ref": "#/components/schemas/LoanCatalogItemSchema"}, "title": "Checkpoints", "type": "array"}, "expirations": {"default": [], "items": {"$ref": "#/components/schemas/LoanCatalogItemSchema"}, "title": "Expirations", "type": "array"}, "tasks": {"default": [], "items": {"$ref": "#/components/schemas/LoanCatalogItemSchema"}, "title": "Tasks", "type": "array"}, "pipeline_card_keys": {"default": [], "items": {"$ref": "#/components/schemas/PipelineCardRefSchema"}, "title": "Pipeline Card Keys", "type": "array"}}, "title": "LoanProcessingConfigSchema", "type": "object"}, "PipelineCardRefSchema": {"properties": {"kind": {"title": "Kind", "type": "string"}, "key": {"title": "Key", "type": "string"}}, "required": ["kind", "key"], "title": "PipelineCardRefSchema", "type": "object"}, "LoanProcessingPutSchema": {"properties": {"checkpoints": {"items": {"$ref": "#/components/schemas/LoanCatalogItemSchema"}, "title": "Checkpoints", "type": "array"}, "expirations": {"default": [], "items": {"$ref": "#/components/schemas/LoanCatalogItemSchema"}, "title": "Expirations", "type": "array"}, "tasks": {"default": [], "items": {"$ref": "#/components/schemas/LoanCatalogItemSchema"}, "title": "Tasks", "type": "array"}, "pipeline_card_keys": {"anyOf": [{"items": {"$ref": "#/components/schemas/PipelineCardRefSchema"}, "type": "array"}, {"type": "null"}], "title": "Pipeline Card Keys"}}, "required": ["checkpoints"], "title": "LoanProcessingPutSchema", "type": "object"}, "LoanCheckpointListSchema": {"description": "Backward-compatible org processing config response.", "properties": {"checkpoints": {"default": [], "items": {"$ref": "#/components/schemas/LoanCatalogItemSchema"}, "title": "Checkpoints", "type": "array"}, "expirations": {"default": [], "items": {"$ref": "#/components/schemas/LoanCatalogItemSchema"}, "title": "Expirations", "type": "array"}, "tasks": {"default": [], "items": {"$ref": "#/components/schemas/LoanCatalogItemSchema"}, "title": "Tasks", "type": "array"}, "pipeline_card_keys": {"default": [], "items": {"$ref": "#/components/schemas/PipelineCardRefSchema"}, "title": "Pipeline Card Keys", "type": "array"}}, "title": "LoanCheckpointListSchema", "type": "object"}, "LoanCheckpointPutSchema": {"properties": {"checkpoints": {"anyOf": [{"items": {"$ref": "#/components/schemas/LoanCatalogItemSchema"}, "type": "array"}, {"type": "null"}], "title": "Checkpoints"}, "items": {"anyOf": [{"items": {"$ref": "#/components/schemas/LoanCatalogItemSchema"}, "type": "array"}, {"type": "null"}], "title": "Items"}, "expirations": {"default": [], "items": {"$ref": "#/components/schemas/LoanCatalogItemSchema"}, "title": "Expirations", "type": "array"}, "tasks": {"default": [], "items": {"$ref": "#/components/schemas/LoanCatalogItemSchema"}, "title": "Tasks", "type": "array"}, "pipeline_card_keys": {"anyOf": [{"items": {"$ref": "#/components/schemas/PipelineCardRefSchema"}, "type": "array"}, {"type": "null"}], "title": "Pipeline Card Keys"}}, "title": "LoanCheckpointPutSchema", "type": "object"}, "LoanCheckpointGroupSchema": {"properties": {"catalog": {"default": [], "items": {"$ref": "#/components/schemas/LoanCatalogItemSchema"}, "title": "Catalog", "type": "array"}, "stages": {"additionalProperties": {"$ref": "#/components/schemas/LoanCheckpointStageSchema"}, "default": {}, "title": "Stages", "type": "object"}}, "title": "LoanCheckpointGroupSchema", "type": "object"}, "LoanCheckpointStageSchema": {"properties": {"at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "At"}, "by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "By"}, "by_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "By Name"}}, "title": "LoanCheckpointStageSchema", "type": "object"}, "LoanExpirationGroupSchema": {"properties": {"catalog": {"default": [], "items": {"$ref": "#/components/schemas/LoanCatalogItemSchema"}, "title": "Catalog", "type": "array"}, "items": {"additionalProperties": {"$ref": "#/components/schemas/LoanExpirationItemSchema"}, "default": {}, "title": "Items", "type": "object"}}, "title": "LoanExpirationGroupSchema", "type": "object"}, "LoanExpirationItemSchema": {"properties": {"expires": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Expires"}, "at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "At"}, "by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "By"}, "by_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "By Name"}}, "title": "LoanExpirationItemSchema", "type": "object"}, "LoanProcessingStateSchema": {"properties": {"loan_id": {"format": "uuid", "title": "Loan Id", "type": "string"}, "current": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Current"}, "checkpoints": {"$ref": "#/components/schemas/LoanCheckpointGroupSchema"}, "expirations": {"$ref": "#/components/schemas/LoanExpirationGroupSchema"}, "tasks": {"$ref": "#/components/schemas/LoanTaskGroupSchema"}}, "required": ["loan_id", "checkpoints", "expirations", "tasks"], "title": "LoanProcessingStateSchema", "type": "object"}, "LoanTaskGroupSchema": {"properties": {"catalog": {"default": [], "items": {"$ref": "#/components/schemas/LoanCatalogItemSchema"}, "title": "Catalog", "type": "array"}, "items": {"additionalProperties": {"$ref": "#/components/schemas/LoanTaskItemSchema"}, "default": {}, "title": "Items", "type": "object"}}, "title": "LoanTaskGroupSchema", "type": "object"}, "LoanTaskItemSchema": {"properties": {"done": {"default": false, "title": "Done", "type": "boolean"}, "at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "At"}, "by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "By"}, "by_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "By Name"}}, "title": "LoanTaskItemSchema", "type": "object"}, "LoanCheckpointStateSchema": {"description": "Backward-compatible per-loan checkpoint slice.", "properties": {"loan_id": {"format": "uuid", "title": "Loan Id", "type": "string"}, "current": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Current"}, "catalog": {"default": [], "items": {"$ref": "#/components/schemas/LoanCatalogItemSchema"}, "title": "Catalog", "type": "array"}, "stages": {"additionalProperties": {"$ref": "#/components/schemas/LoanCheckpointStageSchema"}, "default": {}, "title": "Stages", "type": "object"}}, "required": ["loan_id"], "title": "LoanCheckpointStateSchema", "type": "object"}, "LoanCheckpointPatchSchema": {"properties": {"current": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Current"}, "key": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Key"}, "at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "At"}, "clear": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Clear"}}, "title": "LoanCheckpointPatchSchema", "type": "object"}, "LoanExpirationPatchSchema": {"properties": {"key": {"title": "Key", "type": "string"}, "expires": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Expires"}}, "required": ["key"], "title": "LoanExpirationPatchSchema", "type": "object"}, "LoanTaskPatchSchema": {"properties": {"key": {"title": "Key", "type": "string"}, "done": {"title": "Done", "type": "boolean"}}, "required": ["key", "done"], "title": "LoanTaskPatchSchema", "type": "object"}, "LoanStatusPatchResponseSchema": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "status": {"title": "Status", "type": "string"}}, "required": ["id", "status"], "title": "LoanStatusPatchResponseSchema", "type": "object"}, "LoanStatusPatchSchema": {"properties": {"status": {"title": "Status", "type": "string"}}, "required": ["status"], "title": "LoanStatusPatchSchema", "type": "object"}, "PipelineViewSchema": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "name": {"title": "Name", "type": "string"}, "description": {"default": "", "title": "Description", "type": "string"}, "owner_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Owner Id"}, "is_shared": {"default": false, "title": "Is Shared", "type": "boolean"}, "is_mine": {"default": false, "title": "Is Mine", "type": "boolean"}, "is_default": {"default": false, "title": "Is Default", "type": "boolean"}, "filters": {"additionalProperties": true, "default": {}, "title": "Filters", "type": "object"}, "ui_config": {"additionalProperties": true, "default": {}, "title": "Ui Config", "type": "object"}}, "required": ["id", "name"], "title": "PipelineViewSchema", "type": "object"}, "PipelineViewCreateSchema": {"properties": {"name": {"title": "Name", "type": "string"}, "description": {"default": "", "title": "Description", "type": "string"}, "shared": {"default": false, "title": "Shared", "type": "boolean"}, "is_default": {"default": false, "title": "Is Default", "type": "boolean"}, "filters": {"additionalProperties": true, "default": {}, "title": "Filters", "type": "object"}, "ui_config": {"additionalProperties": true, "default": {}, "title": "Ui Config", "type": "object"}}, "required": ["name"], "title": "PipelineViewCreateSchema", "type": "object"}, "PipelineViewUpdateSchema": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "shared": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Shared"}, "is_default": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Default"}, "filters": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Filters"}, "ui_config": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Ui Config"}}, "title": "PipelineViewUpdateSchema", "type": "object"}, "LoanCustomFieldSchema": {"description": "Schema for loan custom field registry entries.", "properties": {"id": {"title": "Id", "type": "integer"}, "key_name": {"title": "Key Name", "type": "string"}, "display_label": {"title": "Display Label", "type": "string"}, "field_type": {"title": "Field Type", "type": "string"}, "source": {"title": "Source", "type": "string"}, "xpath": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Xpath"}, "is_visible": {"default": true, "title": "Is Visible", "type": "boolean"}}, "required": ["id", "key_name", "display_label", "field_type", "source"], "title": "LoanCustomFieldSchema", "type": "object"}, "LoanCustomFieldCreateSchema": {"description": "Schema for creating/updating custom field entries.", "properties": {"key_name": {"title": "Key Name", "type": "string"}, "display_label": {"title": "Display Label", "type": "string"}, "field_type": {"default": "TEXT", "title": "Field Type", "type": "string"}, "source": {"default": "MANUAL", "title": "Source", "type": "string"}, "xpath": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Xpath"}, "is_visible": {"default": true, "title": "Is Visible", "type": "boolean"}}, "required": ["key_name", "display_label"], "title": "LoanCustomFieldCreateSchema", "type": "object"}, "LoanAdditionalDataSchema": {"description": "Schema for a loan's additional_data JSON field.", "properties": {"loan_id": {"format": "uuid", "title": "Loan Id", "type": "string"}, "additional_data": {"additionalProperties": true, "title": "Additional Data", "type": "object"}}, "required": ["loan_id", "additional_data"], "title": "LoanAdditionalDataSchema", "type": "object"}, "LoanAdditionalDataItemSchema": {"properties": {"path": {"title": "Path", "type": "string"}, "value": {"default": "", "title": "Value", "type": "string"}}, "required": ["path"], "title": "LoanAdditionalDataItemSchema", "type": "object"}, "LoanAdditionalDataPageSchema": {"properties": {"items": {"default": [], "items": {"$ref": "#/components/schemas/LoanAdditionalDataItemSchema"}, "title": "Items", "type": "array"}, "count": {"default": 0, "title": "Count", "type": "integer"}, "page": {"default": 1, "title": "Page", "type": "integer"}, "limit": {"default": 25, "title": "Limit", "type": "integer"}}, "title": "LoanAdditionalDataPageSchema", "type": "object"}, "BulkZipImportSchema": {"description": "Schema for starting a bulk import from a ZIP file.", "properties": {"document_id": {"format": "uuid", "title": "Document Id", "type": "string"}}, "required": ["document_id"], "title": "BulkZipImportSchema", "type": "object"}, "BulkFilesImportSchema": {"description": "Schema for starting a bulk import from multiple XML files.", "properties": {"document_ids": {"items": {"format": "uuid", "type": "string"}, "title": "Document Ids", "type": "array"}}, "required": ["document_ids"], "title": "BulkFilesImportSchema", "type": "object"}, "WorksheetLiteSchema": {"description": "List view for proposal worksheets.", "properties": {"id": {"title": "Id", "type": "string"}, "name": {"title": "Name", "type": "string"}, "scenarios": {"anyOf": [{"items": {}, "type": "array"}, {"type": "null"}], "title": "Scenarios"}, "current_overrides": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Current Overrides"}, "scenario_count": {"title": "Scenario Count", "type": "integer"}, "updated_at": {"title": "Updated At", "type": "string"}, "created_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By"}}, "required": ["id", "name", "scenario_count", "updated_at"], "title": "WorksheetLiteSchema", "type": "object"}, "WorksheetCreateSchema": {"description": "Create a new proposal worksheet.", "properties": {"name": {"title": "Name", "type": "string"}}, "required": ["name"], "title": "WorksheetCreateSchema", "type": "object"}, "ScenarioInputSchema": {"description": "Input fields for a single loan scenario.", "properties": {"label": {"default": "", "title": "Label", "type": "string"}, "loan_type": {"default": "", "title": "Loan Type", "type": "string"}, "rate": {"default": 0.0, "title": "Rate", "type": "number"}, "term_months": {"default": 360, "title": "Term Months", "type": "integer"}, "loan_amount": {"default": 0.0, "title": "Loan Amount", "type": "number"}, "mi_monthly": {"default": 0.0, "title": "Mi Monthly", "type": "number"}, "mi_upfront": {"default": 0.0, "title": "Mi Upfront", "type": "number"}, "mi_financed": {"default": 0.0, "title": "Mi Financed", "type": "number"}, "is_io": {"default": false, "title": "Is Io", "type": "boolean"}, "io_months": {"default": 0, "title": "Io Months", "type": "integer"}, "closing_costs_est": {"default": 0.0, "title": "Closing Costs Est", "type": "number"}, "prepaids_est": {"default": 0.0, "title": "Prepaids Est", "type": "number"}, "discount_points": {"default": 0.0, "title": "Discount Points", "type": "number"}, "seller_credits": {"default": 0.0, "title": "Seller Credits", "type": "number"}, "other_credits": {"default": 0.0, "title": "Other Credits", "type": "number"}, "subordinate_financing": {"default": 0.0, "title": "Subordinate Financing", "type": "number"}, "use_debts_paid_off": {"default": false, "title": "Use Debts Paid Off", "type": "boolean"}, "debts_paid_off": {"default": 0.0, "title": "Debts Paid Off", "type": "number"}, "debts_paid_off_payment": {"default": 0.0, "title": "Debts Paid Off Payment", "type": "number"}, "taxes_monthly": {"default": 0.0, "title": "Taxes Monthly", "type": "number"}, "insurance_monthly": {"default": 0.0, "title": "Insurance Monthly", "type": "number"}, "hoa_monthly": {"default": 0.0, "title": "Hoa Monthly", "type": "number"}, "other_monthly": {"default": 0.0, "title": "Other Monthly", "type": "number"}, "notes": {"default": "", "title": "Notes", "type": "string"}, "extra_monthly": {"default": 0.0, "title": "Extra Monthly", "type": "number"}}, "title": "ScenarioInputSchema", "type": "object"}, "WorksheetUpdateSchema": {"description": "Update a proposal worksheet.", "properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name"}, "scenarios": {"anyOf": [{"items": {"$ref": "#/components/schemas/ScenarioInputSchema"}, "type": "array"}, {"type": "null"}], "title": "Scenarios"}, "selected_scenarios": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Selected Scenarios"}, "current_overrides": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Current Overrides"}}, "title": "WorksheetUpdateSchema", "type": "object"}, "ComparisonRequestSchema": {"description": "Request to compute comparison \u2014 can use saved worksheet or ad-hoc scenarios.", "properties": {"worksheet_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Worksheet Id"}, "scenarios": {"anyOf": [{"items": {"$ref": "#/components/schemas/ScenarioInputSchema"}, "type": "array"}, {"type": "null"}], "title": "Scenarios"}, "current_overrides": {"anyOf": [{"$ref": "#/components/schemas/CurrentOverridesSchema"}, {"type": "null"}]}}, "title": "ComparisonRequestSchema", "type": "object"}, "CurrentOverridesSchema": {"description": "Optional overrides for current loan fields that aren't in the DB yet.", "properties": {"loan_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Loan Type"}, "rate": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Rate"}, "lender": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Lender"}, "loan_amount": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Loan Amount"}, "pi": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Pi"}, "taxes_monthly": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Taxes Monthly"}, "insurance_monthly": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Insurance Monthly"}, "mi_monthly": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Mi Monthly"}, "hoa_monthly": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Hoa Monthly"}, "other_monthly": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Other Monthly"}, "is_io": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Io"}, "use_debts_paid_off": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Use Debts Paid Off"}, "debts_paid_off": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Debts Paid Off"}, "debts_paid_off_payment": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Debts Paid Off Payment"}}, "title": "CurrentOverridesSchema", "type": "object"}, "FeeLineSchema": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "kind": {"enum": ["closing_cost", "prepaid", "escrow", "mi_funding"], "title": "Kind", "type": "string"}, "section": {"title": "Section", "type": "string"}, "item_type": {"title": "Item Type", "type": "string"}, "display_label_text": {"default": "", "title": "Display Label Text", "type": "string"}, "other_description": {"default": "", "title": "Other Description", "type": "string"}, "amount": {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Amount", "type": "string"}, "paid_by": {"default": "Buyer", "title": "Paid By", "type": "string"}, "payment_timing": {"default": "AtClosing", "title": "Payment Timing", "type": "string"}, "paid_outside_closing": {"default": false, "title": "Paid Outside Closing", "type": "boolean"}, "fee_paid_to_type": {"default": "", "title": "Fee Paid To Type", "type": "string"}, "paid_to_name": {"default": "", "title": "Paid To Name", "type": "string"}, "fee_percent": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Fee Percent"}, "financed_amount": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Financed Amount"}, "months_paid_count": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Months Paid Count"}, "per_diem_amount": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Per Diem Amount"}, "paid_from_date": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "Paid From Date"}, "paid_through_date": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "Paid Through Date"}, "aggregate_adjustment_amount": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Aggregate Adjustment Amount"}, "reg_z_points_and_fees": {"default": false, "title": "Reg Z Points And Fees", "type": "boolean"}, "hud_line_number": {"default": "", "title": "Hud Line Number", "type": "string"}}, "required": ["id", "kind", "section", "item_type", "amount"], "title": "FeeLineSchema", "type": "object"}, "FeeSectionSchema": {"properties": {"key": {"title": "Key", "type": "string"}, "letter": {"title": "Letter", "type": "string"}, "label": {"title": "Label", "type": "string"}, "total": {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Total", "type": "string"}, "lines": {"items": {"$ref": "#/components/schemas/FeeLineSchema"}, "title": "Lines", "type": "array"}}, "required": ["key", "letter", "label", "total", "lines"], "title": "FeeSectionSchema", "type": "object"}, "FeeTotalsSchema": {"properties": {"loan_costs": {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Loan Costs", "type": "string"}, "other_costs": {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Other Costs", "type": "string"}, "closing_costs": {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Closing Costs", "type": "string"}}, "required": ["loan_costs", "other_costs", "closing_costs"], "title": "FeeTotalsSchema", "type": "object"}, "FeeWorksheetSchema": {"properties": {"sections": {"items": {"$ref": "#/components/schemas/FeeSectionSchema"}, "title": "Sections", "type": "array"}, "totals": {"$ref": "#/components/schemas/FeeTotalsSchema"}, "base_loan_amount": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Base Loan Amount"}, "note_amount": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Note Amount"}}, "required": ["sections", "totals"], "title": "FeeWorksheetSchema", "type": "object"}, "FeeCreateSchema": {"properties": {"kind": {"enum": ["closing_cost", "prepaid", "escrow", "mi_funding"], "title": "Kind", "type": "string"}, "item_type": {"title": "Item Type", "type": "string"}, "section": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Section"}, "display_label_text": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Display Label Text"}, "other_description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Other Description"}, "amount": {"anyOf": [{"type": "number"}, {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Amount"}, "paid_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Paid By"}, "payment_timing": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Payment Timing"}, "paid_outside_closing": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Paid Outside Closing"}, "fee_paid_to_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Fee Paid To Type"}, "paid_to_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Paid To Name"}, "fee_percent": {"anyOf": [{"type": "number"}, {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Fee Percent"}, "financed_amount": {"anyOf": [{"type": "number"}, {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Financed Amount"}, "months_paid_count": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Months Paid Count"}, "per_diem_amount": {"anyOf": [{"type": "number"}, {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Per Diem Amount"}, "paid_from_date": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "Paid From Date"}, "paid_through_date": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "Paid Through Date"}, "aggregate_adjustment_amount": {"anyOf": [{"type": "number"}, {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Aggregate Adjustment Amount"}, "reg_z_points_and_fees": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Reg Z Points And Fees"}, "hud_line_number": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hud Line Number"}}, "required": ["kind", "item_type"], "title": "FeeCreateSchema", "type": "object"}, "FeeUpdateSchema": {"properties": {"kind": {"enum": ["closing_cost", "prepaid", "escrow", "mi_funding"], "title": "Kind", "type": "string"}, "item_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Item Type"}, "section": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Section"}, "display_label_text": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Display Label Text"}, "other_description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Other Description"}, "amount": {"anyOf": [{"type": "number"}, {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Amount"}, "paid_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Paid By"}, "payment_timing": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Payment Timing"}, "paid_outside_closing": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Paid Outside Closing"}, "fee_paid_to_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Fee Paid To Type"}, "paid_to_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Paid To Name"}, "fee_percent": {"anyOf": [{"type": "number"}, {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Fee Percent"}, "financed_amount": {"anyOf": [{"type": "number"}, {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Financed Amount"}, "months_paid_count": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Months Paid Count"}, "per_diem_amount": {"anyOf": [{"type": "number"}, {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Per Diem Amount"}, "paid_from_date": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "Paid From Date"}, "paid_through_date": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "Paid Through Date"}, "aggregate_adjustment_amount": {"anyOf": [{"type": "number"}, {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Aggregate Adjustment Amount"}, "reg_z_points_and_fees": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Reg Z Points And Fees"}, "hud_line_number": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hud Line Number"}}, "required": ["kind"], "title": "FeeUpdateSchema", "type": "object"}, "ConvoLogSchema": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "content": {"title": "Content", "type": "string"}, "category": {"title": "Category", "type": "string"}, "created_by_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By Name"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}}, "required": ["id", "content", "category", "created_at"], "title": "ConvoLogSchema", "type": "object"}, "ConvoLogCreateSchema": {"properties": {"content": {"title": "Content", "type": "string"}, "category": {"default": "GENERAL", "title": "Category", "type": "string"}}, "required": ["content"], "title": "ConvoLogCreateSchema", "type": "object"}, "ArmSchema": {"properties": {"amortization_type": {"default": "", "title": "Amortization Type", "type": "string"}, "arm_initial_fixed_months": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Arm Initial Fixed Months"}, "arm_adjustment_frequency_months": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Arm Adjustment Frequency Months"}, "arm_first_rate_cap": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Arm First Rate Cap"}, "arm_periodic_rate_cap": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Arm Periodic Rate Cap"}, "arm_lifetime_ceiling": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Arm Lifetime Ceiling"}, "arm_margin": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Arm Margin"}, "arm_index_type": {"default": "", "title": "Arm Index Type", "type": "string"}}, "title": "ArmSchema", "type": "object"}, "CreditScoreSchema": {"properties": {"borrower_id": {"title": "Borrower Id", "type": "string"}, "borrower_name": {"title": "Borrower Name", "type": "string"}, "is_primary": {"title": "Is Primary", "type": "boolean"}, "credit_score_transunion": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Credit Score Transunion"}, "credit_score_equifax": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Credit Score Equifax"}, "credit_score_experian": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Credit Score Experian"}, "qualifying_score": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Qualifying Score"}}, "required": ["borrower_id", "borrower_name", "is_primary"], "title": "CreditScoreSchema", "type": "object"}, "CurrentLoanSchema": {"properties": {"current_lender": {"default": "", "title": "Current Lender", "type": "string"}, "current_interest_rate": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Current Interest Rate"}, "current_loan_type": {"default": "", "title": "Current Loan Type", "type": "string"}, "loan_origination_date": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "Loan Origination Date"}, "last_refinance_date": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "Last Refinance Date"}, "has_been_modified": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Has Been Modified"}, "in_forbearance": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "In Forbearance"}, "current_loan_is_interest_only": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Current Loan Is Interest Only"}}, "title": "CurrentLoanSchema", "type": "object"}, "GovernmentSchema": {"properties": {"is_disabled_veteran": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Disabled Veteran"}, "disability_percentage": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Disability Percentage"}, "mi_funding_fee_total": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Mi Funding Fee Total"}, "mi_funding_fee_financed": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Mi Funding Fee Financed"}, "fha_lender_id": {"default": "", "title": "Fha Lender Id", "type": "string"}, "fha_sponsor_id": {"default": "", "title": "Fha Sponsor Id", "type": "string"}, "sponsored_originator_ein": {"default": "", "title": "Sponsored Originator Ein", "type": "string"}}, "title": "GovernmentSchema", "type": "object"}, "LoanIdentifiersSchema": {"properties": {"lender_loan_number": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Lender Loan Number"}, "universal_loan_identifier": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Universal Loan Identifier"}, "agency_case_number": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Agency Case Number"}}, "title": "LoanIdentifiersSchema", "type": "object"}, "NonQmSchema": {"properties": {"qualifying_rate": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Qualifying Rate"}, "is_interest_only": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Is Interest Only"}, "interest_only_months": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Interest Only Months"}, "prepayment_penalty_months": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Prepayment Penalty Months"}, "required_reserves_months": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Required Reserves Months"}, "income_qualification_method": {"default": "", "title": "Income Qualification Method", "type": "string"}}, "title": "NonQmSchema", "type": "object"}, "QualHousingExpenseSchema": {"properties": {"expense_type": {"title": "Expense Type", "type": "string"}, "monthly_amount": {"default": 0, "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Monthly Amount", "type": "string"}}, "required": ["expense_type"], "title": "QualHousingExpenseSchema", "type": "object"}, "QualMetricsSchema": {"properties": {"base_ltv": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Base Ltv"}, "base_cltv": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Base Cltv"}, "base_hcltv": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Base Hcltv"}, "total_ltv": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Total Ltv"}, "total_cltv": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Total Cltv"}, "total_hcltv": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Total Hcltv"}, "dti_front": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Dti Front"}, "dti_back": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Dti Back"}, "monthly_pi": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Monthly Pi"}, "monthly_pitia": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Monthly Pitia"}, "io_payment": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Io Payment"}, "updated_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Updated At"}}, "title": "QualMetricsSchema", "type": "object"}, "QualificationResponse": {"properties": {"metrics": {"anyOf": [{"$ref": "#/components/schemas/QualMetricsSchema"}, {"type": "null"}]}, "housing_expenses": {"default": [], "items": {"$ref": "#/components/schemas/QualHousingExpenseSchema"}, "title": "Housing Expenses", "type": "array"}, "application_received_date": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "Application Received Date"}, "current_loan": {"$ref": "#/components/schemas/CurrentLoanSchema"}, "credit_scores": {"items": {"$ref": "#/components/schemas/CreditScoreSchema"}, "title": "Credit Scores", "type": "array"}, "government": {"$ref": "#/components/schemas/GovernmentSchema"}, "arm": {"$ref": "#/components/schemas/ArmSchema"}, "non_qm": {"$ref": "#/components/schemas/NonQmSchema"}, "reverse_mortgage": {"$ref": "#/components/schemas/ReverseMortgageSchema"}, "loan_identifiers": {"allOf": [{"$ref": "#/components/schemas/LoanIdentifiersSchema"}], "default": {"lender_loan_number": null, "universal_loan_identifier": null, "agency_case_number": null}}}, "required": ["current_loan", "credit_scores", "government", "arm", "non_qm", "reverse_mortgage"], "title": "QualificationResponse", "type": "object"}, "ReverseMortgageSchema": {"properties": {"is_reverse_mortgage": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Is Reverse Mortgage"}, "max_claim_amount": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Max Claim Amount"}, "initial_principal_limit": {"anyOf": [{"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Initial Principal Limit"}, "reverse_payment_plan": {"default": "", "title": "Reverse Payment Plan", "type": "string"}}, "title": "ReverseMortgageSchema", "type": "object"}, "ArmPatch": {"properties": {"amortization_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Amortization Type"}, "arm_initial_fixed_months": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Arm Initial Fixed Months"}, "arm_adjustment_frequency_months": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Arm Adjustment Frequency Months"}, "arm_first_rate_cap": {"anyOf": [{"type": "number"}, {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Arm First Rate Cap"}, "arm_periodic_rate_cap": {"anyOf": [{"type": "number"}, {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Arm Periodic Rate Cap"}, "arm_lifetime_ceiling": {"anyOf": [{"type": "number"}, {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Arm Lifetime Ceiling"}, "arm_margin": {"anyOf": [{"type": "number"}, {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Arm Margin"}, "arm_index_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Arm Index Type"}}, "title": "ArmPatch", "type": "object"}, "CreditScorePatch": {"properties": {"borrower_id": {"title": "Borrower Id", "type": "string"}, "credit_score_transunion": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Credit Score Transunion"}, "credit_score_equifax": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Credit Score Equifax"}, "credit_score_experian": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Credit Score Experian"}, "qualifying_score": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Qualifying Score"}}, "required": ["borrower_id"], "title": "CreditScorePatch", "type": "object"}, "CurrentLoanPatch": {"properties": {"current_lender": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Current Lender"}, "current_interest_rate": {"anyOf": [{"type": "number"}, {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Current Interest Rate"}, "current_loan_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Current Loan Type"}, "loan_origination_date": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "Loan Origination Date"}, "last_refinance_date": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "Last Refinance Date"}, "has_been_modified": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Has Been Modified"}, "in_forbearance": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "In Forbearance"}, "current_loan_is_interest_only": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Current Loan Is Interest Only"}}, "title": "CurrentLoanPatch", "type": "object"}, "GovernmentPatch": {"properties": {"is_disabled_veteran": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Disabled Veteran"}, "disability_percentage": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Disability Percentage"}, "mi_funding_fee_total": {"anyOf": [{"type": "number"}, {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Mi Funding Fee Total"}, "mi_funding_fee_financed": {"anyOf": [{"type": "number"}, {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Mi Funding Fee Financed"}, "fha_lender_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Fha Lender Id"}, "fha_sponsor_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Fha Sponsor Id"}, "sponsored_originator_ein": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Sponsored Originator Ein"}}, "title": "GovernmentPatch", "type": "object"}, "NonQmPatch": {"properties": {"qualifying_rate": {"anyOf": [{"type": "number"}, {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Qualifying Rate"}, "is_interest_only": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Interest Only"}, "interest_only_months": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Interest Only Months"}, "prepayment_penalty_months": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Prepayment Penalty Months"}, "required_reserves_months": {"anyOf": [{"type": "number"}, {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Required Reserves Months"}, "income_qualification_method": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Income Qualification Method"}}, "title": "NonQmPatch", "type": "object"}, "QualHousingExpensePatch": {"properties": {"expense_type": {"title": "Expense Type", "type": "string"}, "monthly_amount": {"anyOf": [{"type": "number"}, {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}], "default": 0, "title": "Monthly Amount"}}, "required": ["expense_type"], "title": "QualHousingExpensePatch", "type": "object"}, "QualificationPatch": {"properties": {"housing_expenses": {"anyOf": [{"items": {"$ref": "#/components/schemas/QualHousingExpensePatch"}, "type": "array"}, {"type": "null"}], "title": "Housing Expenses"}, "current_loan": {"anyOf": [{"$ref": "#/components/schemas/CurrentLoanPatch"}, {"type": "null"}]}, "credit_scores": {"anyOf": [{"items": {"$ref": "#/components/schemas/CreditScorePatch"}, "type": "array"}, {"type": "null"}], "title": "Credit Scores"}, "government": {"anyOf": [{"$ref": "#/components/schemas/GovernmentPatch"}, {"type": "null"}]}, "arm": {"anyOf": [{"$ref": "#/components/schemas/ArmPatch"}, {"type": "null"}]}, "non_qm": {"anyOf": [{"$ref": "#/components/schemas/NonQmPatch"}, {"type": "null"}]}, "reverse_mortgage": {"anyOf": [{"$ref": "#/components/schemas/ReverseMortgagePatch"}, {"type": "null"}]}}, "title": "QualificationPatch", "type": "object"}, "ReverseMortgagePatch": {"properties": {"is_reverse_mortgage": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Reverse Mortgage"}, "max_claim_amount": {"anyOf": [{"type": "number"}, {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Max Claim Amount"}, "initial_principal_limit": {"anyOf": [{"type": "number"}, {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Initial Principal Limit"}, "reverse_payment_plan": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Reverse Payment Plan"}}, "title": "ReverseMortgagePatch", "type": "object"}, "LoanCsvAnalyzeResponseSchema": {"properties": {"job_id": {"title": "Job Id", "type": "integer"}, "document_id": {"format": "uuid", "title": "Document Id", "type": "string"}, "filename": {"title": "Filename", "type": "string"}, "total_rows": {"title": "Total Rows", "type": "integer"}, "header_row_index": {"title": "Header Row Index", "type": "integer"}, "headers": {"items": {"type": "string"}, "title": "Headers", "type": "array"}, "predicted_mapping": {"additionalProperties": {"type": "string"}, "title": "Predicted Mapping", "type": "object"}, "field_catalog": {"items": {"$ref": "#/components/schemas/LoanCsvFieldGroupSchema"}, "title": "Field Catalog", "type": "array"}, "enum_fields": {"additionalProperties": {"items": {"$ref": "#/components/schemas/LoanCsvEnumOptionSchema"}, "type": "array"}, "title": "Enum Fields", "type": "object"}, "distinct_values": {"additionalProperties": {"items": {"type": "string"}, "type": "array"}, "title": "Distinct Values", "type": "object"}, "enum_columns": {"additionalProperties": {"type": "string"}, "title": "Enum Columns", "type": "object"}, "default_status": {"title": "Default Status", "type": "string"}, "additional_data_target": {"title": "Additional Data Target", "type": "string"}}, "required": ["job_id", "document_id", "filename", "total_rows", "header_row_index", "headers", "predicted_mapping", "field_catalog", "enum_fields", "distinct_values", "enum_columns", "default_status", "additional_data_target"], "title": "LoanCsvAnalyzeResponseSchema", "type": "object"}, "LoanCsvEnumOptionSchema": {"properties": {"value": {"title": "Value", "type": "string"}, "label": {"title": "Label", "type": "string"}}, "required": ["value", "label"], "title": "LoanCsvEnumOptionSchema", "type": "object"}, "LoanCsvFieldGroupSchema": {"properties": {"id": {"title": "Id", "type": "string"}, "label": {"title": "Label", "type": "string"}, "fields": {"items": {"$ref": "#/components/schemas/LoanCsvFieldSchema"}, "title": "Fields", "type": "array"}}, "required": ["id", "label", "fields"], "title": "LoanCsvFieldGroupSchema", "type": "object"}, "LoanCsvFieldSchema": {"properties": {"key": {"title": "Key", "type": "string"}, "label": {"title": "Label", "type": "string"}}, "required": ["key", "label"], "title": "LoanCsvFieldSchema", "type": "object"}, "LoanCsvAnalyzeSchema": {"properties": {"document_id": {"format": "uuid", "title": "Document Id", "type": "string"}}, "required": ["document_id"], "title": "LoanCsvAnalyzeSchema", "type": "object"}, "LoanCsvStartSchema": {"properties": {"document_id": {"format": "uuid", "title": "Document Id", "type": "string"}, "column_mapping": {"additionalProperties": {"type": "string"}, "title": "Column Mapping", "type": "object"}, "value_mapping": {"anyOf": [{"additionalProperties": {"additionalProperties": {"type": "string"}, "type": "object"}, "type": "object"}, {"type": "null"}], "title": "Value Mapping"}, "default_status": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Default Status"}}, "required": ["document_id", "column_mapping"], "title": "LoanCsvStartSchema", "type": "object"}, "LoanCsvJobSchema": {"properties": {"id": {"title": "Id", "type": "integer"}, "document_id": {"format": "uuid", "title": "Document Id", "type": "string"}, "filename": {"title": "Filename", "type": "string"}, "status": {"title": "Status", "type": "string"}, "total_rows": {"default": 0, "title": "Total Rows", "type": "integer"}, "created_count": {"default": 0, "title": "Created Count", "type": "integer"}, "duplicate_count": {"default": 0, "title": "Duplicate Count", "type": "integer"}, "failed_count": {"default": 0, "title": "Failed Count", "type": "integer"}, "last_checkpoint_index": {"default": 0, "title": "Last Checkpoint Index", "type": "integer"}, "created_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created At"}, "updated_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Updated At"}, "error_file": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error File"}}, "required": ["id", "document_id", "filename", "status"], "title": "LoanCsvJobSchema", "type": "object"}, "LoanUpdateAnalyzeSchema": {"properties": {"document_id": {"format": "uuid", "title": "Document Id", "type": "string"}}, "required": ["document_id"], "title": "LoanUpdateAnalyzeSchema", "type": "object"}, "LoanUpdateApplySchema": {"properties": {"document_id": {"format": "uuid", "title": "Document Id", "type": "string"}, "column_mapping": {"additionalProperties": {"type": "string"}, "title": "Column Mapping", "type": "object"}, "value_mapping": {"additionalProperties": {"additionalProperties": {"type": "string"}, "type": "object"}, "title": "Value Mapping", "type": "object"}}, "required": ["document_id", "column_mapping", "value_mapping"], "title": "LoanUpdateApplySchema", "type": "object"}, "PhoneNumberOut": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "phone_number": {"title": "Phone Number", "type": "string"}, "number_type": {"title": "Number Type", "type": "string"}, "area_code": {"title": "Area Code", "type": "string"}, "source": {"title": "Source", "type": "string"}, "is_active": {"title": "Is Active", "type": "boolean"}, "monthly_price": {"title": "Monthly Price", "type": "number"}, "capabilities": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Capabilities"}, "verification_status": {"default": "UNVERIFIED", "title": "Verification Status", "type": "string"}, "verification_rejection_reason": {"default": "", "title": "Verification Rejection Reason", "type": "string"}}, "required": ["id", "phone_number", "number_type", "area_code", "source", "is_active", "monthly_price"], "title": "PhoneNumberOut", "type": "object"}, "BuyNumberIn": {"properties": {"phone_number": {"title": "Phone Number", "type": "string"}, "number_type": {"title": "Number Type", "type": "string"}}, "required": ["phone_number", "number_type"], "title": "BuyNumberIn", "type": "object"}, "AvailableNumberOut": {"properties": {"phone_number": {"title": "Phone Number", "type": "string"}, "friendly_name": {"title": "Friendly Name", "type": "string"}, "locality": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Locality"}, "region": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Region"}, "capabilities": {"additionalProperties": true, "default": {}, "title": "Capabilities", "type": "object"}}, "required": ["phone_number", "friendly_name"], "title": "AvailableNumberOut", "type": "object"}, "PhoneSettingsOut": {"description": "Phone-tab gate. sponsored_telephony is null until the org explicitly chooses.", "properties": {"sponsored_telephony": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Sponsored Telephony"}}, "title": "PhoneSettingsOut", "type": "object"}, "PhoneSettingsPatch": {"properties": {"sponsored_telephony": {"title": "Sponsored Telephony", "type": "boolean"}}, "required": ["sponsored_telephony"], "title": "PhoneSettingsPatch", "type": "object"}, "SendingDomainOut": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "domain": {"title": "Domain", "type": "string"}, "is_verified": {"title": "Is Verified", "type": "boolean"}, "identity_status": {"title": "Identity Status", "type": "string"}, "dkim_tokens": {"default": [], "items": {}, "title": "Dkim Tokens", "type": "array"}, "tracking_domain": {"default": "", "title": "Tracking Domain", "type": "string"}, "config_set_name": {"default": "", "title": "Config Set Name", "type": "string"}, "is_active": {"title": "Is Active", "type": "boolean"}, "health_score": {"title": "Health Score", "type": "integer"}, "emails_sent_today": {"title": "Emails Sent Today", "type": "integer"}}, "required": ["id", "domain", "is_verified", "identity_status", "is_active", "health_score", "emails_sent_today"], "title": "SendingDomainOut", "type": "object"}, "DomainProvisionIn": {"properties": {"domain": {"title": "Domain", "type": "string"}, "sender_label": {"default": "", "title": "Sender Label", "type": "string"}}, "required": ["domain"], "title": "DomainProvisionIn", "type": "object"}, "TFNProfileOut": {"description": "Current TFN profile for the org.", "properties": {"legal_business_name": {"default": "", "title": "Legal Business Name", "type": "string"}, "website": {"default": "", "title": "Website", "type": "string"}, "street_address": {"default": "", "title": "Street Address", "type": "string"}, "city": {"default": "", "title": "City", "type": "string"}, "state": {"default": "", "title": "State", "type": "string"}, "zip_code": {"default": "", "title": "Zip Code", "type": "string"}, "business_phone": {"default": "", "title": "Business Phone", "type": "string"}, "business_type": {"default": "", "title": "Business Type", "type": "string"}, "business_reg_number": {"default": "", "title": "Business Reg Number", "type": "string"}, "business_reg_authority": {"default": "", "title": "Business Reg Authority", "type": "string"}, "business_dba": {"default": "", "title": "Business Dba", "type": "string"}, "business_identity": {"default": "direct_customer", "title": "Business Identity", "type": "string"}, "business_industry": {"default": "", "title": "Business Industry", "type": "string"}, "business_regions_of_operation": {"default": "", "title": "Business Regions Of Operation", "type": "string"}, "rep_job_position": {"default": "", "title": "Rep Job Position", "type": "string"}, "tfn_profile": {"additionalProperties": true, "default": {}, "title": "Tfn Profile", "type": "object"}, "compliance_profile": {"additionalProperties": true, "default": {}, "title": "Compliance Profile", "type": "object"}, "shaken_profile": {"additionalProperties": true, "default": {}, "title": "Shaken Profile", "type": "object"}}, "title": "TFNProfileOut", "type": "object"}, "TFNProfileIn": {"description": "Business fields + messaging use-case profile for TFN verification.", "properties": {"legal_business_name": {"title": "Legal Business Name", "type": "string"}, "website": {"default": "", "title": "Website", "type": "string"}, "street_address": {"default": "", "title": "Street Address", "type": "string"}, "city": {"default": "", "title": "City", "type": "string"}, "state": {"default": "", "title": "State", "type": "string"}, "zip_code": {"default": "", "title": "Zip Code", "type": "string"}, "business_phone": {"default": "", "title": "Business Phone", "type": "string"}, "business_type": {"title": "Business Type", "type": "string"}, "business_reg_number": {"default": "", "title": "Business Reg Number", "type": "string"}, "business_reg_authority": {"default": "", "title": "Business Reg Authority", "type": "string"}, "business_dba": {"default": "", "title": "Business Dba", "type": "string"}, "business_identity": {"default": "direct_customer", "title": "Business Identity", "type": "string"}, "business_industry": {"default": "", "title": "Business Industry", "type": "string"}, "business_regions_of_operation": {"default": "", "title": "Business Regions Of Operation", "type": "string"}, "rep_job_position": {"default": "", "title": "Rep Job Position", "type": "string"}, "use_case_categories": {"items": {"type": "string"}, "title": "Use Case Categories", "type": "array"}, "use_case_summary": {"title": "Use Case Summary", "type": "string"}, "production_message_sample": {"title": "Production Message Sample", "type": "string"}, "opt_in_image_urls": {"items": {"type": "string"}, "title": "Opt In Image Urls", "type": "array"}, "opt_in_type": {"title": "Opt In Type", "type": "string"}, "message_volume": {"title": "Message Volume", "type": "string"}, "opt_in_confirmation_message": {"default": "", "title": "Opt In Confirmation Message", "type": "string"}, "help_message_sample": {"default": "", "title": "Help Message Sample", "type": "string"}, "opt_in_keywords": {"default": ["START"], "items": {"type": "string"}, "title": "Opt In Keywords", "type": "array"}, "privacy_policy_url": {"default": "", "title": "Privacy Policy Url", "type": "string"}, "terms_and_conditions_url": {"default": "", "title": "Terms And Conditions Url", "type": "string"}, "age_gated_content": {"default": false, "title": "Age Gated Content", "type": "boolean"}, "additional_information": {"default": "", "title": "Additional Information", "type": "string"}}, "required": ["legal_business_name", "business_type", "use_case_categories", "use_case_summary", "production_message_sample", "opt_in_image_urls", "opt_in_type", "message_volume"], "title": "TFNProfileIn", "type": "object"}, "BuyAndVerifyIn": {"properties": {"phone_number": {"title": "Phone Number", "type": "string"}, "number_type": {"default": "MAIN_TFN", "title": "Number Type", "type": "string"}}, "required": ["phone_number"], "title": "BuyAndVerifyIn", "type": "object"}, "VerifyStatusOut": {"properties": {"status": {"title": "Status", "type": "string"}, "rejection_reason": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Rejection Reason"}, "edit_allowed": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Edit Allowed"}, "edit_expiration": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Edit Expiration"}, "customer_profile_sid": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Customer Profile Sid"}}, "required": ["status"], "title": "VerifyStatusOut", "type": "object"}, "ResubmitIn": {"properties": {"edit_reason": {"title": "Edit Reason", "type": "string"}}, "required": ["edit_reason"], "title": "ResubmitIn", "type": "object"}, "EmailAliasOut": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "alias_prefix": {"title": "Alias Prefix", "type": "string"}, "full_email": {"title": "Full Email", "type": "string"}, "domain": {"default": "", "title": "Domain", "type": "string"}, "display_name": {"title": "Display Name", "type": "string"}, "is_active": {"title": "Is Active", "type": "boolean"}, "inbound_address": {"default": "", "title": "Inbound Address", "type": "string"}}, "required": ["id", "alias_prefix", "full_email", "display_name", "is_active"], "title": "EmailAliasOut", "type": "object"}, "EmailAliasIn": {"properties": {"alias_prefix": {"title": "Alias Prefix", "type": "string"}, "display_name": {"default": "", "title": "Display Name", "type": "string"}, "domain": {"default": "", "title": "Domain", "type": "string"}}, "required": ["alias_prefix"], "title": "EmailAliasIn", "type": "object"}, "WebhookEndpointOut": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "name": {"title": "Name", "type": "string"}, "url": {"title": "Url", "type": "string"}, "events": {"default": [], "items": {}, "title": "Events", "type": "array"}, "is_active": {"default": true, "title": "Is Active", "type": "boolean"}, "last_triggered_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Last Triggered At"}, "last_status_code": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Last Status Code"}, "consecutive_failures": {"default": 0, "title": "Consecutive Failures", "type": "integer"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}}, "required": ["id", "name", "url", "created_at"], "title": "WebhookEndpointOut", "type": "object"}, "WebhookEndpointCreateOut": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "name": {"title": "Name", "type": "string"}, "url": {"title": "Url", "type": "string"}, "events": {"default": [], "items": {}, "title": "Events", "type": "array"}, "is_active": {"default": true, "title": "Is Active", "type": "boolean"}, "last_triggered_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Last Triggered At"}, "last_status_code": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Last Status Code"}, "consecutive_failures": {"default": 0, "title": "Consecutive Failures", "type": "integer"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "raw_secret": {"title": "Raw Secret", "type": "string"}}, "required": ["id", "name", "url", "created_at", "raw_secret"], "title": "WebhookEndpointCreateOut", "type": "object"}, "WebhookEndpointCreateIn": {"properties": {"name": {"title": "Name", "type": "string"}, "url": {"title": "Url", "type": "string"}}, "required": ["name", "url"], "title": "WebhookEndpointCreateIn", "type": "object"}, "WebhookEndpointUpdateIn": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name"}, "url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Url"}, "is_active": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Active"}}, "title": "WebhookEndpointUpdateIn", "type": "object"}, "ApiKeyOut": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "name": {"title": "Name", "type": "string"}, "prefix": {"title": "Prefix", "type": "string"}, "scopes": {"default": [], "items": {}, "title": "Scopes", "type": "array"}, "list_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "List Id"}, "list_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "List Name"}, "rate_limit_rpm": {"default": 60, "title": "Rate Limit Rpm", "type": "integer"}, "rate_limit_daily": {"default": 10000, "title": "Rate Limit Daily", "type": "integer"}, "is_active": {"default": true, "title": "Is Active", "type": "boolean"}, "expires_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Expires At"}, "last_used_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Last Used At"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}}, "required": ["id", "name", "prefix", "created_at"], "title": "ApiKeyOut", "type": "object"}, "ApiKeyCreateOut": {"description": "Returned only on creation \u2014 includes the raw key.", "properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "name": {"title": "Name", "type": "string"}, "prefix": {"title": "Prefix", "type": "string"}, "raw_key": {"title": "Raw Key", "type": "string"}, "scopes": {"default": [], "items": {}, "title": "Scopes", "type": "array"}, "list_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "List Id"}, "list_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "List Name"}, "rate_limit_rpm": {"default": 60, "title": "Rate Limit Rpm", "type": "integer"}, "rate_limit_daily": {"default": 10000, "title": "Rate Limit Daily", "type": "integer"}, "is_active": {"default": true, "title": "Is Active", "type": "boolean"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}}, "required": ["id", "name", "prefix", "raw_key", "created_at"], "title": "ApiKeyCreateOut", "type": "object"}, "ApiKeyCreateIn": {"properties": {"name": {"title": "Name", "type": "string"}}, "required": ["name"], "title": "ApiKeyCreateIn", "type": "object"}, "LeadIntakeOut": {"properties": {"status": {"title": "Status", "type": "string"}, "message": {"title": "Message", "type": "string"}, "provider": {"title": "Provider", "type": "string"}, "contact_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Contact Id"}, "list_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "List Id"}, "list_name": {"default": "", "title": "List Name", "type": "string"}}, "required": ["status", "message", "provider"], "title": "LeadIntakeOut", "type": "object"}, "LeadIntakeIn": {"properties": {"first_name": {"title": "First Name", "type": "string"}, "last_name": {"title": "Last Name", "type": "string"}, "email": {"default": "", "title": "Email", "type": "string"}, "cell_phone": {"default": "", "title": "Cell Phone", "type": "string"}, "street_address": {"default": "", "title": "Street Address", "type": "string"}, "city": {"default": "", "title": "City", "type": "string"}, "state_code": {"default": "", "title": "State Code", "type": "string"}, "zip_code": {"default": "", "title": "Zip Code", "type": "string"}, "external_lead_id": {"default": "", "title": "External Lead Id", "type": "string"}, "system_data": {"additionalProperties": true, "default": {}, "title": "System Data", "type": "object"}}, "required": ["first_name", "last_name"], "title": "LeadIntakeIn", "type": "object"}, "LosSyncKeyOut": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "name": {"title": "Name", "type": "string"}, "prefix": {"title": "Prefix", "type": "string"}, "scopes": {"default": [], "items": {}, "title": "Scopes", "type": "array"}, "rate_limit_rpm": {"default": 60, "title": "Rate Limit Rpm", "type": "integer"}, "rate_limit_daily": {"default": 10000, "title": "Rate Limit Daily", "type": "integer"}, "is_active": {"default": true, "title": "Is Active", "type": "boolean"}, "expires_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Expires At"}, "last_used_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Last Used At"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}}, "required": ["id", "name", "prefix", "created_at"], "title": "LosSyncKeyOut", "type": "object"}, "LosSyncKeyCreateOut": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "name": {"title": "Name", "type": "string"}, "prefix": {"title": "Prefix", "type": "string"}, "scopes": {"default": [], "items": {}, "title": "Scopes", "type": "array"}, "rate_limit_rpm": {"default": 60, "title": "Rate Limit Rpm", "type": "integer"}, "rate_limit_daily": {"default": 10000, "title": "Rate Limit Daily", "type": "integer"}, "is_active": {"default": true, "title": "Is Active", "type": "boolean"}, "expires_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Expires At"}, "last_used_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Last Used At"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "raw_key": {"title": "Raw Key", "type": "string"}}, "required": ["id", "name", "prefix", "created_at", "raw_key"], "title": "LosSyncKeyCreateOut", "type": "object"}, "LosSyncKeyCreateIn": {"properties": {"name": {"title": "Name", "type": "string"}}, "required": ["name"], "title": "LosSyncKeyCreateIn", "type": "object"}, "LosSyncOut": {"properties": {"status": {"title": "Status", "type": "string"}, "message": {"title": "Message", "type": "string"}, "provider": {"title": "Provider", "type": "string"}, "loan_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Loan Id"}}, "required": ["status", "message", "provider"], "title": "LosSyncOut", "type": "object"}, "PlanOut": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "name": {"title": "Name", "type": "string"}, "slug": {"title": "Slug", "type": "string"}, "description": {"title": "Description", "type": "string"}, "price_monthly": {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Price Monthly", "type": "string"}, "features": {"additionalProperties": true, "title": "Features", "type": "object"}, "overage_rates": {"additionalProperties": true, "title": "Overage Rates", "type": "object"}, "is_public": {"title": "Is Public", "type": "boolean"}}, "required": ["id", "name", "slug", "description", "price_monthly", "features", "overage_rates", "is_public"], "title": "PlanOut", "type": "object"}, "SelectPlanIn": {"properties": {"plan_slug": {"title": "Plan Slug", "type": "string"}, "seat_count": {"default": 0, "title": "Seat Count", "type": "integer"}, "copilot_seats": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Copilot Seats"}, "loa_starter_seats": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Loa Starter Seats"}, "loa_seats": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Loa Seats"}, "prepay_term_months": {"default": 1, "title": "Prepay Term Months", "type": "integer"}, "include_implementation_fee": {"default": false, "title": "Include Implementation Fee", "type": "boolean"}}, "required": ["plan_slug"], "title": "SelectPlanIn", "type": "object"}, "SubscriptionOut": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "plan": {"$ref": "#/components/schemas/PlanOut"}, "status": {"title": "Status", "type": "string"}, "seat_count": {"title": "Seat Count", "type": "integer"}, "seat_mix": {"additionalProperties": true, "title": "Seat Mix", "type": "object"}, "monthly_total": {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Monthly Total", "type": "string"}, "prepay_active": {"default": false, "title": "Prepay Active", "type": "boolean"}, "prepay_term_months": {"default": 1, "title": "Prepay Term Months", "type": "integer"}, "prepay_discount_pct": {"default": "0.00", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Prepay Discount Pct", "type": "string"}, "prepay_term_end": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "Prepay Term End"}, "current_period_start": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Current Period Start"}, "current_period_end": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Current Period End"}, "cancel_at_period_end": {"title": "Cancel At Period End", "type": "boolean"}}, "required": ["id", "plan", "status", "seat_count", "seat_mix", "monthly_total", "cancel_at_period_end"], "title": "SubscriptionOut", "type": "object"}, "PlanPreviewOut": {"properties": {"plan_slug": {"title": "Plan Slug", "type": "string"}, "seat_count": {"title": "Seat Count", "type": "integer"}, "seat_mix": {"additionalProperties": true, "title": "Seat Mix", "type": "object"}, "monthly_total": {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Monthly Total", "type": "string"}, "current_monthly_total": {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Current Monthly Total", "type": "string"}, "prorated_new_total": {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Prorated New Total", "type": "string"}, "prorated_credit": {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Prorated Credit", "type": "string"}, "subscription_subtotal": {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Subscription Subtotal", "type": "string"}, "prepay_discount_amount": {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Prepay Discount Amount", "type": "string"}, "subscription_due": {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Subscription Due", "type": "string"}, "implementation_fee": {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Implementation Fee", "type": "string"}, "implementation_due": {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Implementation Due", "type": "string"}, "implementation_fee_required": {"title": "Implementation Fee Required", "type": "boolean"}, "prepay_term_months": {"title": "Prepay Term Months", "type": "integer"}, "prepay_discount_pct": {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Prepay Discount Pct", "type": "string"}, "due_now": {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Due Now", "type": "string"}, "days_remaining": {"title": "Days Remaining", "type": "integer"}, "days_in_month": {"title": "Days In Month", "type": "integer"}, "next_renewal_date": {"format": "date", "title": "Next Renewal Date", "type": "string"}}, "required": ["plan_slug", "seat_count", "seat_mix", "monthly_total", "current_monthly_total", "prorated_new_total", "prorated_credit", "subscription_subtotal", "prepay_discount_amount", "subscription_due", "implementation_fee", "implementation_due", "implementation_fee_required", "prepay_term_months", "prepay_discount_pct", "due_now", "days_remaining", "days_in_month", "next_renewal_date"], "title": "PlanPreviewOut", "type": "object"}, "SeatMixOut": {"properties": {"copilot": {"title": "Copilot", "type": "integer"}, "loa_starter": {"title": "Loa Starter", "type": "integer"}, "loa": {"title": "Loa", "type": "integer"}}, "required": ["copilot", "loa_starter", "loa"], "title": "SeatMixOut", "type": "object"}, "SeatPreviewOut": {"properties": {"current_seat_mix": {"$ref": "#/components/schemas/SeatMixOut"}, "seat_mix": {"$ref": "#/components/schemas/SeatMixOut"}, "current_monthly_total": {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Current Monthly Total", "type": "string"}, "monthly_total": {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Monthly Total", "type": "string"}, "due_now": {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Due Now", "type": "string"}, "days_remaining": {"title": "Days Remaining", "type": "integer"}, "days_in_month": {"title": "Days In Month", "type": "integer"}, "next_renewal_date": {"format": "date", "title": "Next Renewal Date", "type": "string"}}, "required": ["current_seat_mix", "seat_mix", "current_monthly_total", "monthly_total", "due_now", "days_remaining", "days_in_month", "next_renewal_date"], "title": "SeatPreviewOut", "type": "object"}, "UpdateSeatsIn": {"properties": {"seat_count": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Seat Count"}, "copilot_seats": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Copilot Seats"}, "loa_starter_seats": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Loa Starter Seats"}, "loa_seats": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Loa Seats"}}, "title": "UpdateSeatsIn", "type": "object"}, "WalletOut": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "balance": {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Balance", "type": "string"}, "refill_amount": {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Refill Amount", "type": "string"}, "refill_threshold": {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Refill Threshold", "type": "string"}, "auto_refill_enabled": {"title": "Auto Refill Enabled", "type": "boolean"}}, "required": ["id", "balance", "refill_amount", "refill_threshold", "auto_refill_enabled"], "title": "WalletOut", "type": "object"}, "WalletSettingsIn": {"properties": {"refill_amount": {"anyOf": [{"type": "number"}, {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Refill Amount"}, "refill_threshold": {"anyOf": [{"type": "number"}, {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "type": "string"}, {"type": "null"}], "title": "Refill Threshold"}, "auto_refill_enabled": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Auto Refill Enabled"}}, "title": "WalletSettingsIn", "type": "object"}, "WalletTxnOut": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "txn_type": {"title": "Txn Type", "type": "string"}, "amount": {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Amount", "type": "string"}, "balance_after": {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Balance After", "type": "string"}, "description": {"title": "Description", "type": "string"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}}, "required": ["id", "txn_type", "amount", "balance_after", "description", "created_at"], "title": "WalletTxnOut", "type": "object"}, "PaymentHistOut": {"properties": {"id": {"title": "Id", "type": "string"}, "source_id": {"format": "uuid", "title": "Source Id", "type": "string"}, "kind": {"title": "Kind", "type": "string"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "label": {"title": "Label", "type": "string"}, "amount": {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Amount", "type": "string"}, "status": {"title": "Status", "type": "string"}}, "required": ["id", "source_id", "kind", "created_at", "label", "amount", "status"], "title": "PaymentHistOut", "type": "object"}, "UsageOut": {"properties": {"period_start": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Period Start"}, "period_end": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Period End"}, "tokens": {"additionalProperties": true, "title": "Tokens", "type": "object"}, "phone_minutes": {"additionalProperties": true, "title": "Phone Minutes", "type": "object"}, "sms": {"additionalProperties": true, "title": "Sms", "type": "object"}, "blast_sms": {"additionalProperties": true, "title": "Blast Sms", "type": "object"}, "email": {"additionalProperties": true, "title": "Email", "type": "object"}, "storage": {"additionalProperties": true, "title": "Storage", "type": "object"}, "per_user": {"items": {"$ref": "#/components/schemas/UsageUserOut"}, "title": "Per User", "type": "array"}}, "required": ["tokens", "phone_minutes", "sms", "blast_sms", "email", "storage", "per_user"], "title": "UsageOut", "type": "object"}, "UsageUserOut": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "name": {"title": "Name", "type": "string"}, "email": {"title": "Email", "type": "string"}, "tokens_input": {"title": "Tokens Input", "type": "integer"}, "tokens_output": {"title": "Tokens Output", "type": "integer"}, "tokens_total": {"title": "Tokens Total", "type": "integer"}, "phone_minutes": {"title": "Phone Minutes", "type": "integer"}, "sms": {"title": "Sms", "type": "integer"}, "blast_sms": {"title": "Blast Sms", "type": "integer"}, "email_count": {"title": "Email Count", "type": "integer"}}, "required": ["id", "name", "email", "tokens_input", "tokens_output", "tokens_total", "phone_minutes", "sms", "blast_sms", "email_count"], "title": "UsageUserOut", "type": "object"}, "DayLimItemOut": {"properties": {"used": {"title": "Used", "type": "integer"}, "limit": {"title": "Limit", "type": "integer"}, "remaining": {"title": "Remaining", "type": "integer"}}, "required": ["used", "limit", "remaining"], "title": "DayLimItemOut", "type": "object"}, "DayLimOut": {"properties": {"usage_date": {"format": "date", "title": "Usage Date", "type": "string"}, "calls": {"$ref": "#/components/schemas/DayLimItemOut"}, "sms": {"$ref": "#/components/schemas/DayLimItemOut"}, "email": {"$ref": "#/components/schemas/DayLimItemOut"}}, "required": ["usage_date", "calls", "sms", "email"], "title": "DayLimOut", "type": "object"}, "UsagePointOut": {"properties": {"bucket_date": {"format": "date", "title": "Bucket Date", "type": "string"}, "tokens_input": {"title": "Tokens Input", "type": "integer"}, "tokens_output": {"title": "Tokens Output", "type": "integer"}, "tokens_total": {"title": "Tokens Total", "type": "integer"}, "phone_minutes": {"title": "Phone Minutes", "type": "integer"}, "sms": {"title": "Sms", "type": "integer"}, "email": {"title": "Email", "type": "integer"}}, "required": ["bucket_date", "tokens_input", "tokens_output", "tokens_total", "phone_minutes", "sms", "email"], "title": "UsagePointOut", "type": "object"}, "UsageRepOut": {"properties": {"window": {"$ref": "#/components/schemas/UsageWinOut"}, "totals": {"$ref": "#/components/schemas/UsageSumOut"}, "series": {"items": {"$ref": "#/components/schemas/UsagePointOut"}, "title": "Series", "type": "array"}}, "required": ["window", "totals", "series"], "title": "UsageRepOut", "type": "object"}, "UsageSumOut": {"properties": {"tokens_input": {"title": "Tokens Input", "type": "integer"}, "tokens_output": {"title": "Tokens Output", "type": "integer"}, "tokens_total": {"title": "Tokens Total", "type": "integer"}, "phone_minutes": {"title": "Phone Minutes", "type": "integer"}, "sms": {"title": "Sms", "type": "integer"}, "email": {"title": "Email", "type": "integer"}}, "required": ["tokens_input", "tokens_output", "tokens_total", "phone_minutes", "sms", "email"], "title": "UsageSumOut", "type": "object"}, "UsageWinOut": {"properties": {"range_key": {"title": "Range Key", "type": "string"}, "start_date": {"format": "date", "title": "Start Date", "type": "string"}, "end_date": {"format": "date", "title": "End Date", "type": "string"}, "timezone": {"title": "Timezone", "type": "string"}}, "required": ["range_key", "start_date", "end_date", "timezone"], "title": "UsageWinOut", "type": "object"}, "PaymentMethodOut": {"properties": {"payment_profile_id": {"title": "Payment Profile Id", "type": "string"}, "last_four": {"title": "Last Four", "type": "string"}, "card_type": {"title": "Card Type", "type": "string"}}, "required": ["payment_profile_id", "last_four", "card_type"], "title": "PaymentMethodOut", "type": "object"}, "AddPaymentIn": {"properties": {"data_descriptor": {"title": "Data Descriptor", "type": "string"}, "data_value": {"title": "Data Value", "type": "string"}, "billing_address": {"additionalProperties": true, "title": "Billing Address", "type": "object"}}, "required": ["data_descriptor", "data_value", "billing_address"], "title": "AddPaymentIn", "type": "object"}, "BillingAddressOut": {"properties": {"street": {"title": "Street", "type": "string"}, "city": {"title": "City", "type": "string"}, "state": {"title": "State", "type": "string"}, "zip": {"title": "Zip", "type": "string"}}, "required": ["street", "city", "state", "zip"], "title": "BillingAddressOut", "type": "object"}, "BillingAddressIn": {"properties": {"street": {"title": "Street", "type": "string"}, "city": {"title": "City", "type": "string"}, "state": {"title": "State", "type": "string"}, "zip": {"title": "Zip", "type": "string"}}, "required": ["street", "city", "state", "zip"], "title": "BillingAddressIn", "type": "object"}, "InvoiceOut": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "provider_invoice_id": {"title": "Provider Invoice Id", "type": "string"}, "amount_due": {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Amount Due", "type": "string"}, "amount_paid": {"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Amount Paid", "type": "string"}, "status": {"title": "Status", "type": "string"}, "line_items": {"additionalProperties": true, "title": "Line Items", "type": "object"}, "period_start": {"format": "date-time", "title": "Period Start", "type": "string"}, "period_end": {"format": "date-time", "title": "Period End", "type": "string"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}}, "required": ["id", "provider_invoice_id", "amount_due", "amount_paid", "status", "line_items", "period_start", "period_end", "created_at"], "title": "InvoiceOut", "type": "object"}, "FrontendErrorIn": {"properties": {"error": {"title": "Error", "type": "string"}, "component_stack": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Component Stack"}, "url": {"default": "", "title": "Url", "type": "string"}, "user_agent": {"default": "", "title": "User Agent", "type": "string"}}, "required": ["error"], "title": "FrontendErrorIn", "type": "object"}, "FieldDefSchema": {"properties": {"key": {"title": "Key", "type": "string"}, "label": {"title": "Label", "type": "string"}, "type": {"title": "Type", "type": "string"}, "options": {"default": [], "items": {"type": "string"}, "title": "Options", "type": "array"}, "ops": {"default": [], "items": {"type": "string"}, "title": "Ops", "type": "array"}}, "required": ["key", "label", "type"], "title": "FieldDefSchema", "type": "object"}, "FieldGroupSchema": {"properties": {"key": {"title": "Key", "type": "string"}, "label": {"title": "Label", "type": "string"}, "fields": {"items": {"$ref": "#/components/schemas/FieldDefSchema"}, "title": "Fields", "type": "array"}}, "required": ["key", "label", "fields"], "title": "FieldGroupSchema", "type": "object"}, "ContactHitSchema": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "first_name": {"default": "", "title": "First Name", "type": "string"}, "last_name": {"default": "", "title": "Last Name", "type": "string"}, "email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Email"}, "cell_phone": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Cell Phone"}, "status": {"default": "", "title": "Status", "type": "string"}, "contact_type": {"default": "", "title": "Contact Type", "type": "string"}, "city": {"default": "", "title": "City", "type": "string"}, "state_code": {"default": "", "title": "State Code", "type": "string"}}, "required": ["id"], "title": "ContactHitSchema", "type": "object"}, "EvalResponseSchema": {"properties": {"count": {"title": "Count", "type": "integer"}, "page": {"title": "Page", "type": "integer"}, "pages": {"title": "Pages", "type": "integer"}, "contacts": {"items": {"$ref": "#/components/schemas/ContactHitSchema"}, "title": "Contacts", "type": "array"}}, "required": ["count", "page", "pages", "contacts"], "title": "EvalResponseSchema", "type": "object"}, "ConditionSchema": {"properties": {"source": {"title": "Source", "type": "string"}, "field": {"title": "Field", "type": "string"}, "op": {"default": "eq", "title": "Op", "type": "string"}, "value": {"title": "Value"}}, "required": ["source", "field"], "title": "ConditionSchema", "type": "object"}, "EvalRequestSchema": {"properties": {"filter": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Filter"}, "conditions": {"default": [], "items": {"$ref": "#/components/schemas/ConditionSchema"}, "title": "Conditions", "type": "array"}, "logic": {"default": "AND", "title": "Logic", "type": "string"}, "page": {"default": 1, "title": "Page", "type": "integer"}, "page_size": {"default": 50, "title": "Page Size", "type": "integer"}}, "title": "EvalRequestSchema", "type": "object"}, "MaintenanceStatusSchema": {"properties": {"active": {"title": "Active", "type": "boolean"}, "message": {"default": "", "title": "Message", "type": "string"}, "started_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Started At"}}, "required": ["active"], "title": "MaintenanceStatusSchema", "type": "object"}, "ZipLookupMatchSchema": {"properties": {"zip": {"title": "Zip", "type": "string"}, "state": {"title": "State", "type": "string"}, "city": {"title": "City", "type": "string"}, "county_code": {"title": "County Code", "type": "string"}, "county_name": {"title": "County Name", "type": "string"}, "fips_key": {"title": "Fips Key", "type": "string"}, "rural": {"default": "", "title": "Rural", "type": "string"}}, "required": ["zip", "state", "city", "county_code", "county_name", "fips_key"], "title": "ZipLookupMatchSchema", "type": "object"}, "ZipLookupResponseSchema": {"properties": {"zip": {"title": "Zip", "type": "string"}, "matches": {"items": {"$ref": "#/components/schemas/ZipLookupMatchSchema"}, "title": "Matches", "type": "array"}, "match_count": {"title": "Match Count", "type": "integer"}}, "required": ["zip", "matches", "match_count"], "title": "ZipLookupResponseSchema", "type": "object"}, "PromptTemplateListItemSchema": {"properties": {"id": {"title": "Id", "type": "string"}, "name": {"title": "Name", "type": "string"}, "category": {"title": "Category", "type": "string"}, "description": {"default": "", "title": "Description", "type": "string"}, "campaign_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Campaign Type"}, "audience": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Audience"}, "subject": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Subject"}, "body_mode": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Body Mode"}}, "required": ["id", "name", "category"], "title": "PromptTemplateListItemSchema", "type": "object"}, "PromptTemplateListSchema": {"properties": {"items": {"items": {"$ref": "#/components/schemas/PromptTemplateListItemSchema"}, "title": "Items", "type": "array"}}, "required": ["items"], "title": "PromptTemplateListSchema", "type": "object"}, "PromptTemplateDetailSchema": {"properties": {"id": {"title": "Id", "type": "string"}, "name": {"title": "Name", "type": "string"}, "category": {"title": "Category", "type": "string"}, "description": {"default": "", "title": "Description", "type": "string"}, "campaign_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Campaign Type"}, "audience": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Audience"}, "subject": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Subject"}, "body_mode": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Body Mode"}, "body": {"title": "Body", "type": "string"}}, "required": ["id", "name", "category", "body"], "title": "PromptTemplateDetailSchema", "type": "object"}, "TokenObtainPairOutputSchema": {"properties": {"username": {"description": "Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.", "maxLength": 150, "title": "Username", "type": "string"}, "refresh": {"title": "Refresh", "type": "string"}, "access": {"title": "Access", "type": "string"}}, "required": ["username", "refresh", "access"], "title": "TokenObtainPairOutputSchema", "type": "object"}, "TokenObtainPairInputSchema": {"properties": {"password": {"format": "password", "title": "Password", "type": "string", "writeOnly": true}, "username": {"description": "Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.", "maxLength": 150, "title": "Username", "type": "string"}}, "required": ["password", "username"], "title": "TokenObtainPairInputSchema", "type": "object"}}, "securitySchemes": {"NinjaJWTAuth": {"type": "http", "scheme": "bearer"}}}, "servers": []}