{"openapi":"3.1.0","info":{"title":"Crucible Backend API","description":"API for Crucible application, supporting field technicians with AI-powered tools.","version":"0.1.0"},"paths":{"/users/me":{"get":{"tags":["users"],"summary":"Read Users Me","description":"Get current authenticated user's details from Supabase.\nClaims are extracted from the verified Clerk JWT.\n\nNote: User must already exist.","operationId":"read_users_me_users_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"404":{"description":"Not found"}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["users"],"summary":"Update Users Me","description":"Update current authenticated user's details in Supabase.\nClaims are extracted from the verified Clerk JWT.","operationId":"update_users_me_users_me_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/users":{"get":{"tags":["users"],"summary":"List Users","description":"Get a paginated list of all users. Manager access required.\n\nOptionally filter by one or more trades using a comma-separated string:\n`?trades=hvac,plumbing` returns users whose trades array contains at least one of those values.","operationId":"list_users_users_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"trades","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated trade filter (e.g. hvac,plumbing)","title":"Trades"},"description":"Comma-separated trade filter (e.g. hvac,plumbing)"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Number of users per page (max 100)","default":20,"title":"Page Size"},"description":"Number of users per page (max 100)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserListResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/streaming-token":{"post":{"tags":["Transcription"],"summary":"Get AssemblyAI temporary token for streaming","description":"Mint a short-lived AssemblyAI token so the client can stream audio directly.","operationId":"get_streaming_token_tools_streaming_token_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/tools/transcribe_v3":{"post":{"tags":["Transcription"],"summary":"Transcribe audio with new recording system (Celery-based)","description":"Called by mobile app after S3 upload completes to trigger transcription.\n\nExpected flow:\n1. Mobile calls /recordings/upload-started → creates recording with status='uploading'\n2. Mobile uploads audio to S3\n3. Mobile calls this endpoint → updates to status='transcribing' and queues Celery task","operationId":"transcribe_audio_with_recording_v3_tools_transcribe_v3_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranscribeRequest","description":"Transcription request with recording metadata"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/tools/transcriptions/{task_id}":{"get":{"tags":["Transcription"],"summary":"Get transcriptions for a task","description":"Retrieves all transcriptions associated with a specific task using the new recording system.\n\n- **task_id**: The ID of the task to retrieve transcriptions for.\n- **employee_id**: Optional employee ID to fetch transcriptions for (managers can view employee tasks)\n\nReturns:\n- A list of transcription titles and their corresponding contents.\n- The site summary for the task (if available)","operationId":"get_task_transcriptions_tools_transcriptions__task_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}},{"name":"employee_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Employee Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Task Transcriptions Tools Transcriptions  Task Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/line-items/{task_id}":{"get":{"tags":["Transcription"],"summary":"Get line items for a task","description":"Retrieves the line items for a specific task and user.\n\n- **task_id**: The ID of the task to retrieve the line items for.\n\nReturns:\n- The line items content and metadata with status\n\nCaching strategy:\n- Cache line items response with 60 second TTL\n- Cache is invalidated when line items are generated/updated (via Celery tasks)","operationId":"get_line_items_tools_line_items__task_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/line-items/{task_id}/generate":{"post":{"tags":["Transcription"],"summary":"Generate line items for a task","description":"Manually trigger line item generation for a specific task.\n\n- **task_id**: The ID of the task to generate line items for.\n- **regenerate**: If true, regenerate all line items from all transcripts\n\nReturns:\n- The generated line items content and metadata","operationId":"generate_line_items_tools_line_items__task_id__generate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}},{"name":"regenerate","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Regenerate"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/recordings/{recording_id}/associate-task":{"post":{"tags":["Transcription"],"summary":"Associate a recording with a task","description":"Associate an existing recording with a task (for manual task association).","operationId":"associate_recording_with_task_tools_recordings__recording_id__associate_task_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"recording_id","in":"path","required":true,"schema":{"type":"string","title":"Recording Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_associate_recording_with_task_tools_recordings__recording_id__associate_task_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tasks/":{"get":{"tags":["tasks"],"summary":"List Tasks For Current User","description":"Retrieve a list of tasks created by the authenticated user.\n\nUses Redis caching (3 min TTL) to reduce load on external APIs.","operationId":"list_tasks_for_current_user_tasks__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","description":"The page number to retrieve.","default":1,"title":"Page"},"description":"The page number to retrieve."},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","description":"The number of tasks to retrieve per page.","default":20,"title":"Page Size"},"description":"The number of tasks to retrieve per page."},{"name":"timestamp","in":"query","required":false,"schema":{"type":"integer","description":"Optional timestamp (in seconds) to filter tasks by datetime.","title":"Timestamp"},"description":"Optional timestamp (in seconds) to filter tasks by datetime."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PagedTaskList"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tasks/details/{task_id}":{"get":{"tags":["tasks"],"summary":"Get Task Info","description":"Retrieve detailed information for a specific task, ensuring it belongs to the user.\nReturns only fields used by mobile app (title, description, customer, location, start_date, type).","operationId":"get_task_info_tasks_details__task_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskDetailResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ai/chat":{"post":{"tags":["AI Chat"],"summary":"Handle Ai Chat","description":"Handles AI chat requests and streams responses using Server-Sent Events (SSE).","operationId":"handle_ai_chat_ai_chat_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_handle_ai_chat_ai_chat_post"}}}},"responses":{"200":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/ai/transcribe":{"post":{"tags":["AI Chat"],"summary":"Handle Transcription","description":"Transcribes an audio file using OpenAI's Whisper model.","operationId":"handle_transcription_ai_transcribe_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_handle_transcription_ai_transcribe_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ai/chat/sessions":{"get":{"tags":["AI Chat"],"summary":"Get User Sessions","description":"Retrieves all chat sessions for the authenticated user.\nReturns a list of session UUIDs with their first message content as the title.","operationId":"get_user_sessions_ai_chat_sessions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/ai/chat/latest-session":{"get":{"tags":["AI Chat"],"summary":"Get Latest Session","description":"Retrieves the UUID of the user's most recent chat session.\nIf no previous sessions exist, returns null for session_uuid.","operationId":"get_latest_session_ai_chat_latest_session_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"object","title":"Response Get Latest Session Ai Chat Latest Session Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/ai/chat/history/uuid/{session_uuid}":{"get":{"tags":["AI Chat"],"summary":"Get Chat History By Uuid","description":"Retrieves the chat history for a given session_uuid, \nensuring the requesting user is authorized to view it.","operationId":"get_chat_history_by_uuid_ai_chat_history_uuid__session_uuid__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_uuid","in":"path","required":true,"schema":{"type":"string","title":"Session Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ChatMessageRead"},"title":"Response Get Chat History By Uuid Ai Chat History Uuid  Session Uuid  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ai/signed-chat-image-url":{"post":{"tags":["AI Chat"],"summary":"Get Signed Chat Image Url","description":"Generates a signed URL for a given chat image storage path.","operationId":"get_signed_chat_image_url_ai_signed_chat_image_url_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignedURLRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignedURLResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ai/chat/start-over":{"post":{"tags":["AI Chat"],"summary":"Start Over","description":"Creates a new session UUID.\nReturns the new session UUID without creating any database entries.\nDatabase entries will be created when the first message is sent with this UUID.","operationId":"start_over_ai_chat_start_over_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/ai/chat/history":{"delete":{"tags":["AI Chat"],"summary":"Clear User Chat History","description":"Clears all chat history (messages and associated images) for a specific session.\nThis endpoint is kept for backward compatibility.","operationId":"clear_user_chat_history_ai_chat_history_delete","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_clear_user_chat_history_ai_chat_history_delete"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/tools/fillreport":{"post":{"tags":["Report Filling"],"summary":"Fill Report Endpoint","description":"Endpoint to fill a report based on a transcript ID and a template ID.\nThe template ID must correspond to an active template in the database.\nThe transcript ID must correspond to an existing transcript owned by the user.\nThe filled PDF will be stored in Supabase and a signed URL will be returned.","operationId":"fill_report_endpoint_tools_fillreport_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FillReportRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FillReportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/clerk-webhook/handler":{"post":{"tags":["clerk-webhook"],"summary":"Handle Clerk Webhook","operationId":"handle_clerk_webhook_clerk_webhook_handler_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}}}},"/tools/scantag":{"post":{"tags":["Tag Scanning"],"summary":"Scan Tag Endpoint","description":"Accepts an image of a tag, processes it using an LLM,\nand returns structured information.","operationId":"scan_tag_endpoint_tools_scantag_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_scan_tag_endpoint_tools_scantag_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagScanResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/hvac/brands":{"get":{"tags":["hvac_search"],"summary":"List All Brands","description":"Retrieve a list of all HVAC brands.","operationId":"list_all_brands_hvac_brands_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Brand"},"type":"array","title":"Response List All Brands Hvac Brands Get"}}}},"404":{"description":"Not found"}},"security":[{"HTTPBearer":[]}]}},"/hvac/brands/{brand_id}":{"get":{"tags":["hvac_search"],"summary":"Get Brand Details","description":"Retrieve detailed information for a specific brand, including its series.","operationId":"get_brand_details_hvac_brands__brand_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"brand_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Brand Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Brand"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/hvac/series/{series_id}":{"get":{"tags":["hvac_search"],"summary":"Get Series Details","description":"Retrieve detailed information for a specific series, including its models.","operationId":"get_series_details_hvac_series__series_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"series_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Series Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Series"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/hvac/models/{model_id}":{"get":{"tags":["hvac_search"],"summary":"Get Model Details","description":"Retrieve detailed information for a specific HVAC model, including its manuals.","operationId":"get_model_details_hvac_models__model_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Model"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/hvac/search":{"get":{"tags":["hvac_search"],"summary":"Search Items","description":"Search for HVAC brands, series, and models based on a query string.","operationId":"search_items_hvac_search_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"query","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Search term for brands, series, or models","title":"Query"},"description":"Search term for brands, series, or models"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HvacSearchResults"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/subscription/stripe-webhook":{"post":{"tags":["stripe"],"summary":"Stripe Webhook","description":"Handle Stripe webhook events.","operationId":"stripe_webhook_subscription_stripe_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/versions/{platform}":{"get":{"tags":["versions"],"summary":"Get Version","description":"Get the version information for a specific platform.\n\nArgs:\n    platform: The platform type (ios/android) to get version for.\n\nReturns:\n    Version information if found, None otherwise.","operationId":"get_version_versions__platform__get","parameters":[{"name":"platform","in":"path","required":true,"schema":{"type":"string","title":"Platform"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Version"},{"type":"null"}],"title":"Response Get Version Versions  Platform  Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/report-abuse/":{"post":{"tags":["report_abuse"],"summary":"Create Report Abuse","operationId":"create_report_abuse_report_abuse__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportAbuseCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportAbuse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/report-feedback/like/{message_id}":{"post":{"tags":["report_feedback"],"summary":"Create Report Like","operationId":"create_report_like_report_feedback_like__message_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","title":"Message Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportLike"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/report-feedback/dislike/{message_id}":{"post":{"tags":["report_feedback"],"summary":"Create Report Dislike","operationId":"create_report_dislike_report_feedback_dislike__message_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","title":"Message Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportDislike"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/report-feedback/status/{message_id}":{"get":{"tags":["report_feedback"],"summary":"Get Feedback Status","operationId":"get_feedback_status_report_feedback_status__message_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","title":"Message Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Feedback Status Report Feedback Status  Message Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/s3/presigned-upload-url":{"post":{"tags":["s3"],"summary":"Generate Presigned Upload Url Endpoint","description":"Generate a presigned S3 upload URL for the given bucket and object key.","operationId":"generate_presigned_upload_url_endpoint_s3_presigned_upload_url_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PresignedUploadUrlRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PresignedUploadUrlResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/s3/multipart/initiate":{"post":{"tags":["s3"],"summary":"Initiate Multipart Upload Endpoint","description":"Initiate a multipart upload and return the upload_id.","operationId":"initiate_multipart_upload_endpoint_s3_multipart_initiate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitiateMultipartUploadRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitiateMultipartUploadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/s3/multipart/presigned-url":{"post":{"tags":["s3"],"summary":"Generate Presigned Part Url Endpoint","description":"Generate a presigned URL for uploading a specific part of a multipart upload.","operationId":"generate_presigned_part_url_endpoint_s3_multipart_presigned_url_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PresignedPartUrlRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PresignedPartUrlResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/s3/multipart/complete":{"post":{"tags":["s3"],"summary":"Complete Multipart Upload Endpoint","description":"Complete the multipart upload by combining all uploaded parts.","operationId":"complete_multipart_upload_endpoint_s3_multipart_complete_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteMultipartUploadRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteMultipartUploadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/s3/multipart/list-parts":{"post":{"tags":["s3"],"summary":"List Uploaded Parts Endpoint","description":"List all uploaded parts for a given multipart upload.","operationId":"list_uploaded_parts_endpoint_s3_multipart_list_parts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListUploadedPartsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListUploadedPartsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/housecall-pro-webhook/handler":{"post":{"tags":["housecall-pro-webhook"],"summary":"Handle Housecall Pro Webhook","description":"Handle Housecall Pro webhooks for job status changes.\n\nProcesses webhook events for:\n- Job on my way\n- Job started \n- Job completed\n\nEach event is stored in the database for tracking and analysis.","operationId":"handle_housecall_pro_webhook_housecall_pro_webhook_handler_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}}}},"/recordings/upload-started":{"post":{"tags":["recordings"],"summary":"Recording Upload Started","description":"Called by mobile app BEFORE starting S3 upload.\n\nCreates a recording row with status='uploading' to enable real-time tracking.\n\nIDEMPOTENT: Uses UPSERT to handle retries gracefully. If the recording already exists,\nit updates the existing record instead of failing.\n\nBACKWARD COMPATIBILITY:\n- Old mobile apps won't call this endpoint\n- They'll go straight to /tools/transcribe_v3 which handles creation\n- This is optional for new apps to get real-time upload status\n\nREALTIME TRIGGER:\n- INSERT/UPDATE on recordings table triggers Supabase Realtime notification\n- Mobile can show \"Uploading...\" status immediately","operationId":"recording_upload_started_recordings_upload_started_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadStartedRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/recordings":{"get":{"tags":["recordings"],"summary":"Get Recordings","description":"Get recordings for the current user, optionally filtered by organization.","operationId":"get_recordings_recordings_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Organization ID filter","title":"Organization Id"},"description":"Organization ID filter"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number (starts from 1)","default":1,"title":"Page"},"description":"Page number (starts from 1)"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Number of recordings per page","default":50,"title":"Page Size"},"description":"Number of recordings per page"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordingList"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recordings/tasks/{task_id}":{"get":{"tags":["recordings"],"summary":"Get Recordings By Task Id","description":"Get recordings and their transcriptions by task_id.\nThis endpoint is useful for finding all recordings associated with a specific task.\n\nCaching strategy:\n- Cache recordings by task_id with 30 second TTL\n- Cache is invalidated when recording status changes (via Celery tasks)","operationId":"get_recordings_by_task_id_recordings_tasks__task_id__get","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RecordingWithTranscription"},"title":"Response Get Recordings By Task Id Recordings Tasks  Task Id  Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recordings/{recording_id}":{"get":{"tags":["recordings"],"summary":"Get Recording By Id","description":"Get a specific recording by its ID.","operationId":"get_recording_by_id_recordings__recording_id__get","parameters":[{"name":"recording_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Recording Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Recording"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recordings/{recording_id}/retry":{"post":{"tags":["recordings"],"summary":"Retry Recording Transcription","description":"Retry a failed recording transcription.\n\nThis endpoint allows users to manually retry transcription for recordings that failed\nafter all automatic Celery retry attempts were exhausted. The recording and S3 file\nmust still exist.\n\nValid states for retry: 'failed', 'empty_audio'\n\nReturns:\n    202 Accepted with recording_id and new celery_task_id","operationId":"retry_recording_transcription_recordings__recording_id__retry_post","parameters":[{"name":"recording_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Recording Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/site-summaries/{task_id}":{"get":{"tags":["site-summaries"],"summary":"Get Site Summary","description":"Retrieve the site summary for a specific task.\n\nThe status reflects whether the summary is up-to-date:\n- SUCCESS: Summary exists and includes all available transcripts\n- PENDING: No summary yet OR new transcripts need to be processed\n- PROCESSING: Summary is currently being generated/updated\n- ERROR: An error occurred\n\nReturns:\n- status: Current status of the summary\n- site_summary: The summary text (even if outdated, with status=PENDING)\n- message: Additional information about the status\n- has_new_transcripts: Whether there are unprocessed transcripts\n\nCaching strategy:\n- Cache site summary response with 60 second TTL\n- Cache is invalidated when summary is generated/updated (via Celery tasks)","operationId":"get_site_summary_site_summaries__task_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteSummaryResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/site-summaries/{task_id}/generate":{"post":{"tags":["site-summaries"],"summary":"Generate Site Summary","description":"Generate or update a site summary for a specific task.\n\nThis endpoint triggers summary generation/update. It will:\n1. Check if transcripts exist for the task\n2. Generate a new summary or update existing one\n3. Return the summary with current status\n\nArgs:\n    task_id: The task ID to generate summary for\n    regenerate: If True, regenerate from all transcripts. If False, use incremental update.\n\nReturns:\n    The generated or updated site summary with status","operationId":"generate_site_summary_site_summaries__task_id__generate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}},{"name":"regenerate","in":"query","required":false,"schema":{"type":"boolean","description":"Force regeneration of the summary from all transcripts","default":false,"title":"Regenerate"},"description":"Force regeneration of the summary from all transcripts"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteSummaryResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/checklists/slack-enabled":{"get":{"tags":["checklists"],"summary":"Get Slack Integration Status","description":"Check if Slack integration is enabled for the user's organization.\n\nThis endpoint checks if the organization has Slack integration enabled,\nwhich determines whether the Slack Checklist feature should be visible.\n\nReturns:\n    - enabled: Boolean indicating if Slack integration is enabled","operationId":"get_slack_integration_status_checklists_slack_enabled_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackIntegrationStatusResponse"}}}},"404":{"description":"Not found"}},"security":[{"HTTPBearer":[]}]}},"/checklists/{task_id}":{"get":{"tags":["checklists"],"summary":"Get Checklist","description":"Retrieve the checklist for a specific task.\n\nThe status reflects whether the checklist is up-to-date:\n- SUCCESS: Checklist exists and includes all available transcripts\n- PENDING: No checklist yet OR new transcripts need to be processed\n- PROCESSING: Checklist is currently being generated/updated\n- ERROR: An error occurred\n\nReturns:\n- status: Current status of the checklist\n- checklist_content: The checklist text (even if outdated, with status=PENDING)\n- message: Additional information about the status\n- has_new_transcripts: Whether there are unprocessed transcripts\n\nCaching strategy:\n- Cache checklist response with 60 second TTL\n- Cache is invalidated when checklist is generated/updated (via Celery tasks)","operationId":"get_checklist_checklists__task_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChecklistResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["checklists"],"summary":"Update Checklist","description":"Manually update checklist content.\n\nThis endpoint allows users to edit the checklist content directly.\nNote: Manual edits will be overwritten when new transcripts are processed\nand auto-regeneration occurs.\n\nArgs:\n    task_id: The task ID\n    request: Request body containing new checklist content\n\nReturns:\n    The updated checklist with current status","operationId":"update_checklist_checklists__task_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateChecklistRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChecklistResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/checklists/{task_id}/generate":{"post":{"tags":["checklists"],"summary":"Generate Checklist","description":"Generate or update a checklist for a specific task.\n\nThis endpoint triggers checklist generation/update. It will:\n1. Check if transcripts exist for the task\n2. Generate a new checklist or update existing one\n3. Return the checklist with current status\n\nArgs:\n    task_id: The task ID to generate checklist for\n    regenerate: If True, regenerate from all transcripts. If False, use incremental update.\n\nReturns:\n    The generated or updated checklist with status","operationId":"generate_checklist_checklists__task_id__generate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}},{"name":"regenerate","in":"query","required":false,"schema":{"type":"boolean","description":"Force regeneration of the checklist from all transcripts","default":false,"title":"Regenerate"},"description":"Force regeneration of the checklist from all transcripts"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChecklistResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/job-briefs/{task_id}":{"get":{"tags":["job-briefs"],"summary":"Get Job Brief","description":"Retrieve a job brief for a specific task.\n\nArgs:\n    task_id: The task ID from mobile app (supports multiple formats):\n            - ServiceTitan: \"jobId-appointmentId\" \n            - HousecallPro: \"jobId__apt_appointmentId\" or \"jobId__time_timeId\"\n            - Simple: \"jobId\"\n    organization_id: Organization ID (from auth context)\n    clerk_user_id: User ID (from auth context)\n    \nReturns:\n    Job brief data or 404 if not found","operationId":"get_job_brief_job_briefs__task_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/push-notifications/register-token":{"post":{"tags":["Push Notifications"],"summary":"Register or update push notification token","description":"Register or update a push notification token for the current user.\n\n- **device_id**: Unique device identifier (can be generated by app)\n- **push_token**: Expo push notification token\n- **platform**: Device platform (ios or android)\n- **app_version**: Optional app version\n- **device_info**: Optional additional device metadata","operationId":"register_push_token_push_notifications_register_token_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushTokenCreate","description":"Push token registration data"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/push-notifications/send":{"post":{"tags":["Push Notifications"],"summary":"Send push notification (Admin only)","description":"Send push notification to specified users.\n\nThis endpoint is typically used by the system internally.\nIn a production environment, you might want to add additional\nauthorization checks to ensure only admin users or system processes\ncan send notifications.","operationId":"send_push_notification_push_notifications_send_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushNotificationRequest","description":"Push notification request"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushNotificationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/push-notifications/test":{"post":{"tags":["Push Notifications"],"summary":"Send test notification to current user","description":"Send a test notification to the current user's devices.\nUseful for testing push notification setup.","operationId":"send_test_notification_push_notifications_test_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushNotificationResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/manager/employees":{"get":{"tags":["manager"],"summary":"Get Organization Employees","description":"Get paginated list of all employees in the organization.\nReturns id, email, first_name, last_name, and phone_number for each employee.","operationId":"get_organization_employees_manager_employees_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Number of employees per page (max 100)","default":10,"title":"Page Size"},"description":"Number of employees per page (max 100)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeListResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["manager"],"summary":"Add Employee","description":"Add a new employee by creating them in Clerk and sending an organization invitation.\nTakes technician data from ServiceTitan and creates a Clerk user.","operationId":"add_employee_manager_employees_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddEmployeeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddEmployeeResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/manager/employees/{employee_id}":{"delete":{"tags":["manager"],"summary":"Remove Employee","description":"Soft delete an employee by setting is_active to false.\nOnly allows deleting employees within the manager's organization.","operationId":"remove_employee_manager_employees__employee_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Employee Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeRemovalResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["manager"],"summary":"Update Employee","description":"Update employee profile information and business units.","operationId":"update_employee_manager_employees__employee_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Employee Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEmployeeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEmployeeResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/manager/technicians":{"get":{"tags":["manager"],"summary":"Get Organization Technicians","description":"List the org's ERP people (ServiceTitan technicians or Housecall Pro employees)\nwho are not yet onboarded. Returns id, email, phone_number, login_name for each.","operationId":"get_organization_technicians_manager_technicians_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TechnicianListResponse"}}}},"404":{"description":"Not found"}},"security":[{"HTTPBearer":[]}]}},"/manager/admin-candidates":{"get":{"tags":["manager"],"summary":"Get Organization Admin Candidates","description":"List available ERP employees for dashboard-admin onboarding.","operationId":"get_organization_admin_candidates_manager_admin_candidates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminCandidateListResponse"}}}},"404":{"description":"Not found"}},"security":[{"HTTPBearer":[]}]}},"/manager/employees/{employee_id}/send-sms":{"post":{"tags":["manager"],"summary":"Send Employee Welcome Sms","description":"Send a one-off SMS to one technician from their assigned Twilio number.\n\nUsed by the NosoAI user to send a welcome/onboarding message so the\ntechnician receives it from their work number and can click the login link.","operationId":"send_employee_welcome_sms_manager_employees__employee_id__send_sms_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Employee Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_send_employee_welcome_sms_manager_employees__employee_id__send_sms_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/manager/employees/bulk-send-sms":{"post":{"tags":["manager"],"summary":"Initiate Bulk Welcome Sms","description":"Queue welcome SMS sends for many technicians on Celery.\n\nReturns immediately with operation_id. Sends run concurrently in the worker;\neach recipient's outcome is recorded independently, so one failure never\nstops the rest. Poll GET /manager/employees/bulk-send-sms/{operation_id}.","operationId":"initiate_bulk_welcome_sms_manager_employees_bulk_send_sms_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkWelcomeSmsRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkOperationInitiateResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/manager/employees/bulk-send-sms/{operation_id}":{"get":{"tags":["manager"],"summary":"Get Bulk Welcome Sms Status","description":"Get progress and per-recipient results of a queued welcome SMS batch.\n\nfailed items carry {id, name, error} so the dashboard can name who missed out.","operationId":"get_bulk_welcome_sms_status_manager_employees_bulk_send_sms__operation_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"operation_id","in":"path","required":true,"schema":{"type":"string","title":"Operation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkOperationStatusResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/manager/employees/bulk-remove":{"post":{"tags":["manager"],"summary":"Initiate Bulk Remove","description":"Initiate bulk employee removal operation.\nReturns immediately with operation_id for status polling.\nEach employee removal is atomic (Clerk + DB or rollback).\n\nThe operation runs in the background and updates progress in the database.\nUse GET /manager/employees/bulk-remove/{operation_id} to check status.","operationId":"initiate_bulk_remove_manager_employees_bulk_remove_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkRemoveRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkOperationInitiateResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/manager/employees/bulk-remove/{operation_id}":{"get":{"tags":["manager"],"summary":"Get Bulk Remove Status","description":"Get status of bulk employee removal operation.\nFrontend polls this endpoint to track progress.\n\nReturns:\n    - processing: Operation in progress (check processed_count/total_count for progress)\n    - completed: All employees processed (check succeeded/failed for results)\n    - failed: Operation failed catastrophically","operationId":"get_bulk_remove_status_manager_employees_bulk_remove__operation_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"operation_id","in":"path","required":true,"schema":{"type":"string","title":"Operation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkOperationStatusResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/manager/employees/bulk-add":{"post":{"tags":["manager"],"summary":"Initiate Bulk Add","description":"Initiate bulk employee addition operation.\nReturns immediately with operation_id for status polling.\nEach employee addition is atomic (Clerk + DB or rollback).\n\nThe operation runs in the background and updates progress in the database.\nUse GET /manager/employees/bulk-add/{operation_id} to check status.","operationId":"initiate_bulk_add_manager_employees_bulk_add_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkAddRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkOperationInitiateResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/manager/employees/bulk-add/{operation_id}":{"get":{"tags":["manager"],"summary":"Get Bulk Add Status","description":"Get status of bulk employee addition operation.\nFrontend polls this endpoint to track progress.\n\nReturns:\n    - processing: Operation in progress (check processed_count/total_count for progress)\n    - completed: All employees processed (check succeeded/failed for results)\n    - failed: Operation failed catastrophically","operationId":"get_bulk_add_status_manager_employees_bulk_add__operation_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"operation_id","in":"path","required":true,"schema":{"type":"string","title":"Operation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkOperationStatusResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/manager/organization":{"get":{"tags":["manager"],"summary":"Get Organization Info","description":"Org logo from the integration. Display name and partner brand come from\nClerk, trades from the config endpoint, so none of them are returned here.","operationId":"get_organization_info_manager_organization_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}},"security":[{"HTTPBearer":[]}]}},"/manager/conversations/{conversation_id}/mark-followup-lost":{"post":{"tags":["manager"],"summary":"Mark Manager Followup As Lost","description":"Mark a follow-up as lost (manager only).\n\nSets followup_v2 status to 'lost' with the provided dismissal reason and archives the conversation.\n\nThis endpoint is accessible by managers only (org:admin role).\n\nValid dismissal_reason values:\n- \"too_expensive\"\n- \"chose_competitor\"\n- \"scope_disagreement\"\n- \"equipment_preference\"\n- \"approval_issue\"\n- \"other\"\n- \"other: <custom text>\" (custom reason after \"other: \")\n\nArgs:\n    conversation_id: UUID of the conversation to find the followup\n    dismissal_reason: Reason for marking as lost\n    organization_id: Organization ID from auth token\n\nReturns:\n    Success response with followup_id and dismissal_reason\n\nRaises:\n    400: If dismissal_reason is invalid\n    404: If followup not found in organization\n    500: If database operation fails","operationId":"mark_manager_followup_as_lost_manager_conversations__conversation_id__mark_followup_lost_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkFollowupLostRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/manager/conversations/{conversation_id}/reschedule":{"post":{"tags":["manager"],"summary":"Reschedule Manager Followup","description":"Reschedule a follow-up (manager only).\n\nUpdates the followup with a new scheduled_until date and resets attempt tracking.\nLogs reschedule activity in customer_activity_log.\n\nThis endpoint is accessible by managers only (org:admin role).\n\nArgs:\n    conversation_id: UUID of the conversation to find the followup\n    scheduled_date: Date in YYYY-MM-DD format (must be future date in org timezone)\n    organization_id: Organization ID from auth token\n\nReturns:\n    Success response with followup_id and scheduled_until\n\nRaises:\n    400: If scheduled_date is invalid or not a future date\n    404: If followup not found for conversation\n    500: If database operation fails","operationId":"reschedule_manager_followup_manager_conversations__conversation_id__reschedule_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_reschedule_manager_followup_manager_conversations__conversation_id__reschedule_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sales/monthly":{"get":{"tags":["sales"],"summary":"Get Monthly Sales","description":"Get total monthly sales for the authenticated technician.\n\nReturns the sum of all estimate subtotals sold by the technician for the specified month,\nplus the potential sales from all active followups (only for current month).\n\nArgs:\n    month: Optional month in YYYY-MM format. If not provided, defaults to current month.\n\nReturns:\n    {\n        \"total_sales\": 12500.50,\n        \"estimate_count\": 15,\n        \"followup_sales\": 3200.00,\n        \"followup_sales_count\": 8,\n        \"potential_followup_sales\": 5000.00  // Only included for current month\n    }","operationId":"get_monthly_sales_sales_monthly_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"month","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Month in YYYY-MM format (e.g., '2025-10'). Defaults to current month.","title":"Month"},"description":"Month in YYYY-MM format (e.g., '2025-10'). Defaults to current month."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Monthly Sales Sales Monthly Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sales/opportunities":{"get":{"tags":["sales"],"summary":"Get Open Sales Opportunities","description":"Return active sales opportunities for the authenticated user.\n\nAn opportunity is an active followup tied to the user with at least one open estimate\non the linked customer job.","operationId":"get_open_sales_opportunities_sales_opportunities_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by customer, address, business unit, or job type.","title":"Search"},"description":"Search by customer, address, business unit, or job type."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Open Sales Opportunities Sales Opportunities Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sales/celebrations/pending":{"get":{"tags":["sales"],"summary":"Get Pending Celebrations","description":"Get won leads that haven't been celebrated yet for the authenticated technician.\n\nUsed to trigger celebration animations in the mobile app.\n\nReturns:\n    {\n        \"won_leads\": [\n            {\n                \"id\": \"uuid\",\n                \"customer_name\": \"John Doe\",\n                \"won_amount\": 5000.00,\n                \"moved_from_followups_at\": \"2025-10-08T12:00:00Z\"\n            }\n        ],\n        \"count\": 2\n    }","operationId":"get_pending_celebrations_sales_celebrations_pending_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Pending Celebrations Sales Celebrations Pending Get"}}}},"404":{"description":"Not found"}},"security":[{"HTTPBearer":[]}]}},"/sales/celebrations/acknowledge":{"post":{"tags":["sales"],"summary":"Acknowledge Celebrations","description":"Mark won leads as celebrated (celebration_shown = true).\n\nThis should be called after the mobile app has shown the celebration animation\nto ensure it's not shown again.\n\nArgs:\n    won_lead_ids: List of won lead IDs that have been celebrated\n\nReturns:\n    {\n        \"success\": true,\n        \"updated_count\": 2\n    }","operationId":"acknowledge_celebrations_sales_celebrations_acknowledge_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_acknowledge_celebrations_sales_celebrations_acknowledge_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Acknowledge Celebrations Sales Celebrations Acknowledge Post"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/twilio-webhook/sms":{"post":{"tags":["twilio-webhook"],"summary":"Handle Inbound Sms","description":"Handle inbound SMS/MMS messages from Twilio.\n\nValidates the signature and the field shapes, then stores the payload and\nqueues it. Everything else — org resolution, spam, media, the agent — runs in\nthe inbound worker against the stored row.\n\nFailures are NOT swallowed: if the payload cannot be stored, Twilio gets a 500\nrather than an empty TwiML that pretends the message was handled.","operationId":"handle_inbound_sms_twilio_webhook_sms_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_handle_inbound_sms_twilio_webhook_sms_post"}}},"required":true},"responses":{"200":{"description":"Successful Response"},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/twilio-webhook/message-status":{"post":{"tags":["twilio-webhook"],"summary":"Handle Message Status Callback","description":"Handle outbound Twilio message delivery status callbacks.","operationId":"handle_message_status_callback_twilio_webhook_message_status_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_handle_message_status_callback_twilio_webhook_message_status_post"}}},"required":true},"responses":{"200":{"description":"Successful Response"},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/voice/access-token":{"post":{"tags":["voice"],"summary":"Generate Access Token","description":"Generate Twilio Voice SDK access token for authenticated user.\n\nThe token allows the mobile app to:\n- Make outbound calls via Voice SDK\n- Receive incoming calls (if configured)\n\nToken contains:\n- Identity: clerk_user_id (unique identifier for this user)\n- VoiceGrant: Permissions for voice calling\n\nUses org-specific Twilio credentials if configured, falls back to global credentials.","operationId":"generate_access_token_voice_access_token_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessTokenRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessTokenResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/voice/initiate-bridge-call":{"post":{"tags":["voice"],"summary":"Initiate Bridge Call","description":"Initiate a bridge call for web dashboard.\n\nFlow:\n1. Call manager's phone number\n2. When manager answers, bridge to customer\n3. Both talk on real phones\n\nThis is ONLY used by the web dashboard. Mobile apps continue to use Voice SDK.","operationId":"initiate_bridge_call_voice_initiate_bridge_call_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BridgeCallRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BridgeCallResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/voice/twiml/outbound":{"post":{"tags":["voice"],"summary":"Twiml Outbound Call","description":"TwiML webhook for outbound calls from Voice SDK.\n\nWhen a user initiates a call from the mobile app using voice.connect(),\nTwilio calls this webhook to get instructions on how to route the call.\n\nQuery/Form params sent by Twilio:\n- To: Destination phone number (from connect params)\n- From: Caller's identity (clerk_user_id)\n- CallSid: Unique call identifier\n- Additional custom params from connect()","operationId":"twiml_outbound_call_voice_twiml_outbound_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}}}},"/voice/twiml/bridge-outbound":{"post":{"tags":["voice"],"summary":"Twiml Bridge Outbound","description":"TwiML webhook for bridge calls from web dashboard.\n\nCalled when manager answers their phone.\nAsks manager to press 1 to confirm before dialing customer.\nThis prevents voicemail from triggering customer calls.\n\nThis is ONLY used by the web dashboard. Mobile apps use /twiml/outbound.","operationId":"twiml_bridge_outbound_voice_twiml_bridge_outbound_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}}}},"/voice/twiml/bridge-connect":{"post":{"tags":["voice"],"summary":"Twiml Bridge Connect","description":"TwiML webhook called after manager presses a key.\n\nOnly connects to customer if manager pressed 1.\nOtherwise hangs up the call.","operationId":"twiml_bridge_connect_voice_twiml_bridge_connect_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}}}},"/voice/status-callback":{"post":{"tags":["voice"],"summary":"Call Status Callback","description":"Status callback webhook for call status updates.\n\nTwilio calls this webhook when call status changes (in-progress, completed, etc.).\nWe use this to update the calls table with final call duration and status.\n\nTo enable this, configure your TwiML App or phone number with:\nStatus Callback URL: https://your-domain.com/api/voice/status-callback\nStatus Callback Method: POST\nStatus Callback Events: completed (or all events if you want more granular updates)","operationId":"call_status_callback_voice_status_callback_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}}}},"/voice/recording-callback":{"post":{"tags":["voice"],"summary":"Recording Status Callback","description":"Recording status callback webhook from Twilio.\n\nTwilio calls this webhook when a call recording is ready.\nWe download the recording from Twilio and upload it to S3.\n\nParameters sent by Twilio:\n- RecordingSid: Unique recording identifier\n- RecordingUrl: URL to download the recording\n- RecordingStatus: completed, absent, etc.\n- RecordingDuration: Duration in seconds\n- CallSid: Associated call SID\n- RecordingChannels: Number of channels (1 or 2)","operationId":"recording_status_callback_voice_recording_callback_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}}}},"/voice/twiml/incoming":{"post":{"tags":["voice"],"summary":"Twiml Incoming Call","description":"Entry point for an inbound call; may answer and screen before forwarding.","operationId":"twiml_incoming_call_voice_twiml_incoming_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}}}},"/voice/twiml/incoming/screen":{"post":{"tags":["voice"],"summary":"Twiml Incoming Screen","description":"<Gather> action for a screened cold inbound call: judge the speech, then route.\n\nTwilio re-posts From/To/CallSid here, so the admitted path re-enters the normal\nincoming handler and every routing decision is made from verified form data\nrather than from anything carried on this URL.","operationId":"twiml_incoming_screen_voice_twiml_incoming_screen_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}}}},"/conversations/category-counts":{"get":{"tags":["conversations"],"summary":"Get Category Counts","description":"Get counts for all 4 conversation categories with manager trade scoping.","operationId":"get_category_counts_conversations_category_counts_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by technician user_id","title":"User Id"},"description":"Filter by technician user_id"},{"name":"trade","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by technician trade (e.g. hvac, plumbing, electrical)","title":"Trade"},"description":"Filter by technician trade (e.g. hvac, plumbing, electrical)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryCountsResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conversations/technicians":{"get":{"tags":["conversations"],"summary":"Get Conversation Technicians","description":"Get list of technicians who have conversations (for filter dropdown).","operationId":"get_conversation_technicians_conversations_technicians_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TechnicianFilterResponse"}}}},"404":{"description":"Not found"}},"security":[{"HTTPBearer":[]}]}},"/conversations/available-trades":{"get":{"tags":["conversations"],"summary":"Get Available Trades","description":"Get distinct trades that have conversations, with which categories they appear in.","operationId":"get_available_trades_conversations_available_trades_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailableTradesResponse"}}}},"404":{"description":"Not found"}},"security":[{"HTTPBearer":[]}]}},"/conversations/by-category/{category}":{"get":{"tags":["conversations"],"summary":"Get Conversations By Category","description":"Get paginated conversations for a specific category.","operationId":"get_conversations_by_category_conversations_by_category__category__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"category","in":"path","required":true,"schema":{"enum":["all","require-action","approval-required","ongoing","won","lost","review","job_booked","membership_sold","membership_renewed"],"type":"string","title":"Category"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"sort","in":"query","required":false,"schema":{"enum":["recent","oldest","unread"],"type":"string","default":"recent","title":"Sort"}},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by technician user_id","title":"User Id"},"description":"Filter by technician user_id"},{"name":"trade","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by technician trade (e.g. hvac, plumbing, electrical)","title":"Trade"},"description":"Filter by technician trade (e.g. hvac, plumbing, electrical)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedConversationsResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conversations/list":{"get":{"tags":["conversations"],"summary":"List Conversations","description":"Get list of organization conversations.\n\nFor org:admin users (managers/web dashboard): Returns ALL organization conversations\nFor non-admin users (technicians/mobile app): Returns only their own conversations\n\nReturns conversations sorted by most recent activity first.\nExcludes archived conversations by default.","operationId":"list_conversations_conversations_list_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Archived"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ConversationResponse"},"title":"Response List Conversations Conversations List Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conversations/{conversation_id}/messages":{"get":{"tags":["conversations"],"summary":"Get Conversation Messages","description":"Get message history for a conversation.\n\nReturns messages sorted chronologically (oldest first for chat UI).\nMarks unread inbound messages as read.","operationId":"get_conversation_messages_conversations__conversation_id__messages_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MessageResponse"},"title":"Response Get Conversation Messages Conversations  Conversation Id  Messages Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conversations/{conversation_id}/detail":{"get":{"tags":["conversations"],"summary":"Get Conversation Detail","description":"Get a single conversation by ID with full enrichment.","operationId":"get_conversation_detail_conversations__conversation_id__detail_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conversations/{conversation_id}/timeline":{"get":{"tags":["conversations"],"summary":"Get Conversation Timeline","description":"Get chronological timeline of messages and calls for a conversation.\n\nReturns mixed timeline of SMS messages and voice calls sorted by created_at,\nplus optional conversation summary if it exists.\nMarks unread inbound messages as read.","operationId":"get_conversation_timeline_conversations__conversation_id__timeline_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"before","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Before"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimelineResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conversations/agent-activity/batch":{"get":{"tags":["conversations"],"summary":"Get Agent Activity Batch","description":"Return agent activity timelines for up to 50 conversations in one request.\n\nAccess is checked per conversation with the same rules as the single-conversation\nendpoint; conversations that fail the check are omitted from the result instead\nof failing the whole batch.","operationId":"get_agent_activity_batch_conversations_agent_activity_batch_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_ids","in":"query","required":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Conversation IDs to fetch activity for","title":"Conversation Ids"},"description":"Conversation IDs to fetch activity for"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentActivityBatchResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conversations/{conversation_id}/agent-activity":{"get":{"tags":["conversations"],"summary":"Get Agent Activity","description":"Return agent activity timeline events for a conversation.","operationId":"get_agent_activity_conversations__conversation_id__agent_activity_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentActivityResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conversations/{conversation_id}/agent-activity/{event_id}/screenshot-url":{"get":{"tags":["conversations"],"summary":"Get Agent Activity Screenshot Url","description":"Return a short-lived presigned URL for an agent activity event's screenshot.\n\nThe screenshot lives in a private S3 bucket because it can contain\ncustomer PII (names, addresses, dollar amounts). This endpoint enforces\nthe same conversation-level access control as the activity feed itself\nand signs a 1-hour URL the browser can render directly.","operationId":"get_agent_activity_screenshot_url_conversations__conversation_id__agent_activity__event_id__screenshot_url_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}},{"name":"event_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conversations/{conversation_id}/upload-url":{"post":{"tags":["conversations"],"summary":"Get Sms Attachment Upload Url","description":"Get presigned S3 upload URL for SMS attachment.\n\nThis endpoint:\n1. Verifies conversation access\n2. Generates S3 key for the attachment\n3. Returns presigned upload URL + public URL for display\n\nFlow:\n1. Frontend calls this to get upload URL\n2. Frontend uploads file directly to S3 using the presigned URL\n3. Frontend sends SMS with the public_url in media_urls array","operationId":"get_sms_attachment_upload_url_conversations__conversation_id__upload_url_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSAttachmentUploadRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSAttachmentUploadResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conversations/{conversation_id}/send":{"post":{"tags":["conversations"],"summary":"Send Message","description":"Send a message in a conversation.\n\nThis endpoint:\n1. Validates request\n2. Sends SMS/MMS via Twilio\n3. Saves message to database\n4. Triggers side effects (intent tracking, activity logging, summary generation)\n\nEither body or media_urls (or both) must be provided.","operationId":"send_message_conversations__conversation_id__send_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conversations/{conversation_id}/phones":{"post":{"tags":["conversations"],"summary":"Add Phone To Conversation","description":"Register a new phone number on a conversation so it can be messaged.\n\nAdds the number to the conversation's known phones (customer_phones), which\nboth lets outbound sends target it and routes future inbound replies from it\nback into this conversation. The number is added to this conversation only —\nit is not written to the ServiceTitan customer profile.\n\nAfter this succeeds, send to the new number via POST /{id}/send with\ntarget_phone set to the returned phone.","operationId":"add_phone_to_conversation_conversations__conversation_id__phones_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddPhoneRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddPhoneResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conversations/customers/{customer_id}/sms-block-status":{"get":{"tags":["conversations"],"summary":"Get Customer Sms Block Status","description":"Get effective SMS block state for a customer.","operationId":"get_customer_sms_block_status_conversations_customers__customer_id__sms_block_status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerSMSBlockStatusResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conversations/customers/{customer_id}/sms-block":{"post":{"tags":["conversations"],"summary":"Manually Block Customer Sms","description":"Manually block SMS automation/sending for a customer.","operationId":"manually_block_customer_sms_conversations_customers__customer_id__sms_block_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerSMSBlockUpdateResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conversations/customers/{customer_id}/sms-unblock":{"post":{"tags":["conversations"],"summary":"Manually Unblock Customer Sms","description":"Manually unblock SMS automation/sending for a customer.","operationId":"manually_unblock_customer_sms_conversations_customers__customer_id__sms_unblock_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerSMSBlockUpdateResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conversations/{conversation_id}/generate-summary":{"post":{"tags":["conversations"],"summary":"Generate Conversation Summary","description":"Generate AI summary of a conversation using GPT-4o-mini.\n\nThis endpoint:\n1. Fetches all timeline items (messages + calls with transcripts)\n2. Generates summary using GPT-4o-mini (3-5 bullet points)\n3. Saves summary to database with generation timestamp\n4. Returns the generated summary\n\nSummary focuses on:\n- Actionable items\n- Key questions asked\n- Important events","operationId":"generate_conversation_summary_conversations__conversation_id__generate_summary_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models__conversation__ConversationSummaryResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conversations/{conversation_id}/suggest-message":{"post":{"tags":["conversations"],"summary":"Suggest Message","description":"Generate AI-suggested message for technician to send to customer.\n\nThis endpoint:\n1. Fetches conversation details including followup data (job/estimates)\n2. Fetches conversation history (messages)\n3. Uses FollowUpMessageGenerator to create a contextual message suggestion\n4. Returns the suggested message text for technician to review and edit\n\nThe AI considers:\n- Job/estimate details (what work was done)\n- Conversation history (what's been discussed)\n- Conversation state (initial outreach vs reply)","operationId":"suggest_message_conversations__conversation_id__suggest_message_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuggestMessageResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conversations/{conversation_id}/rephrase-message":{"post":{"tags":["conversations"],"summary":"Rephrase Message","description":"Rephrase technician's drafted message using AI to improve professionalism and clarity.\n\nThis endpoint:\n1. Fetches conversation history for context\n2. Takes technician's drafted message text\n3. Rephrases it professionally while maintaining intent (role message.rephrase)\n4. Returns the improved message for technician to review and edit\n\nThe AI considers:\n- Conversation history (what's been discussed)\n- Message tone (professional, friendly, clear)\n- Customer service best practices","operationId":"rephrase_message_conversations__conversation_id__rephrase_message_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RephraseMessageRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RephraseMessageResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conversations/{conversation_id}/toggle-status":{"post":{"tags":["conversations"],"summary":"Toggle Conversation Status","description":"Toggle conversation status between 'require_action' and 'ongoing'.\n\nThis endpoint allows Noso AI admin to manually move conversations between:\n- Require Action tab (status = 'require_action')\n- Ongoing tab (status = 'ongoing')\n\nToggle logic:\n- If status is 'require_action' → Set to 'ongoing' (move to Ongoing)\n- Otherwise → Set to 'require_action' (move to Require Action)","operationId":"toggle_conversation_status_conversations__conversation_id__toggle_status_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conversations/{conversation_id}/agent-settings":{"get":{"tags":["conversations"],"summary":"Get Conversation Agent Settings","description":"Get the SMS agent toggle state for a specific conversation.\n\nReturns enabled=True by default if no settings row exists yet\n(absence of a row means the agent has never been toggled = on).","operationId":"get_conversation_agent_settings_conversations__conversation_id__agent_settings_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationAgentSettingsResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conversations/{conversation_id}/agent-toggle":{"patch":{"tags":["conversations"],"summary":"Update Conversation Agent Toggle","description":"Toggle the SMS agent on or off for a specific conversation.\n\nWhen disabled, the agent will still run in shadow mode (logs to\nsms_agent_shadow_logs) but will not send SMS or execute tools.\n\nThe updated state is broadcast via Supabase Realtime, allowing\nboth dashboard and mobile clients to sync in real-time.","operationId":"update_conversation_agent_toggle_conversations__conversation_id__agent_toggle_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateConversationAgentToggleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationAgentSettingsResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conversations/{conversation_id}/notes/upload-url":{"post":{"tags":["conversations"],"summary":"Get Note Image Upload Url","description":"Get presigned S3 upload URL for a note image.","operationId":"get_note_image_upload_url_conversations__conversation_id__notes_upload_url_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSAttachmentUploadRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conversations/{conversation_id}/notes":{"get":{"tags":["conversations"],"summary":"Get Conversation Notes","description":"Get notes for a conversation, ordered by most recent first.","operationId":"get_conversation_notes_conversations__conversation_id__notes_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ConversationNoteResponse"},"title":"Response Get Conversation Notes Conversations  Conversation Id  Notes Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["conversations"],"summary":"Create Conversation Note","description":"Create a note on a conversation.","operationId":"create_conversation_note_conversations__conversation_id__notes_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateNoteRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationNoteResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conversations/{conversation_id}/notes/{note_id}":{"put":{"tags":["conversations"],"summary":"Update Conversation Note","description":"Update a note. Only the original author can edit.","operationId":"update_conversation_note_conversations__conversation_id__notes__note_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}},{"name":"note_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Note Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNoteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationNoteResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["conversations"],"summary":"Delete Conversation Note","description":"Delete a note. Only the original author can delete.","operationId":"delete_conversation_note_conversations__conversation_id__notes__note_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}},{"name":"note_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Note Id"}}],"responses":{"204":{"description":"Successful Response"},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conversations/{conversation_id}/notify-technician":{"post":{"tags":["conversations"],"summary":"Notify Technician","description":"Send a push notification to the technician assigned to a conversation. Rate-limited to once per 60 minutes.","operationId":"notify_technician_conversations__conversation_id__notify_technician_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conversations/{conversation_id}/redirect-path":{"get":{"tags":["conversations"],"summary":"Get Conversation Redirect Path","description":"Return the correct dashboard path for a conversation based on its current status.\nUsed by email links (/go/:conversationId) to deep-link to the right page.","operationId":"get_conversation_redirect_path_conversations__conversation_id__redirect_path_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing-reports/{company_name}/{billing_period}":{"get":{"tags":["billing"],"summary":"Download Billing Report","description":"Download billing attribution report via short URL.\n\nThis endpoint generates a presigned S3 URL and redirects to it.\n\nArgs:\n    company_name: Company identifier (e.g., \"innoven\")\n    billing_period: Billing period (e.g., \"2025-11\")\n\nReturns:\n    Redirect to presigned S3 URL for PDF download\n\nExample:\n    GET /billing-reports/innoven/2025-11\n    → Redirects to S3 presigned URL\n    → Browser downloads PDF","operationId":"download_billing_report_billing_reports__company_name___billing_period__get","parameters":[{"name":"company_name","in":"path","required":true,"schema":{"type":"string","title":"Company Name"}},{"name":"billing_period","in":"path","required":true,"schema":{"type":"string","title":"Billing Period"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing-reports/{company_name}/{billing_period}/info":{"get":{"tags":["billing"],"summary":"Get Billing Report Info","description":"Get metadata about a billing report without downloading it.\n\nArgs:\n    company_name: Company identifier\n    billing_period: Billing period\n\nReturns:\n    Report metadata (file size, last modified, etc.)","operationId":"get_billing_report_info_billing_reports__company_name___billing_period__info_get","parameters":[{"name":"company_name","in":"path","required":true,"schema":{"type":"string","title":"Company Name"}},{"name":"billing_period","in":"path","required":true,"schema":{"type":"string","title":"Billing Period"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/followups/capabilities":{"get":{"tags":["followups"],"summary":"Get Followup Capabilities","operationId":"get_followup_capabilities_followups_capabilities_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FollowupLostCapabilities"}}}},"404":{"description":"Not found"}},"security":[{"HTTPBearer":[]}]}},"/followups/{conversation_id}/mark-lost":{"post":{"tags":["followups"],"summary":"Mark Followup As Lost","description":"Mark a follow-up as dismissed (technician only).\n\nMoves followup directly to lost_leads with:\n- lost_reason = dismissal_reason\n\nAccess Control:\n- Technicians only (sales_tech role)\n- Managers (org:admin) will receive a 403 Forbidden error","operationId":"mark_followup_as_lost_followups__conversation_id__mark_lost_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkFollowupLostRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/followups/{conversation_id}/schedule":{"post":{"tags":["followups"],"summary":"Schedule Followup","description":"Schedule a followup to be hidden until a specific date (technicians only).\n\nThe followup will be hidden from the list until the scheduled_date arrives.\nWhen scheduled, attempt_count is reset to 0 and last_attempt_date is cleared.\nThis gives the customer a fresh start and allows the technician to retry from scratch.\n\nAccess Control:\n- Technicians only (sales_tech role)\n- Managers (org:admin) will receive a 403 Forbidden error\n\nArgs:\n    conversation_id: UUID of the conversation\n    scheduled_date: Date when followup should reappear (YYYY-MM-DD format, must be future date)\n\nReturns:\n    Success response with scheduled date","operationId":"schedule_followup_followups__conversation_id__schedule_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_schedule_followup_followups__conversation_id__schedule_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/configurations/recordings/{organization_id}":{"get":{"tags":["configurations"],"summary":"Get Recording Config","description":"Get recording configuration for an organization.\n\nReturns the full RecordingConfig.","operationId":"get_recording_config_configurations_recordings__organization_id__get","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordingConfig"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["configurations"],"summary":"Update Recording Config","description":"Update recording configuration for an organization.\n\nExpects the full RecordingConfig from the frontend.\n\nResponds with the updated RecordingConfig.","operationId":"update_recording_config_configurations_recordings__organization_id__put","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordingConfig"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordingConfig"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/configurations/{organization_id}":{"get":{"tags":["configurations"],"summary":"Get Integration Config","description":"Get full integration configuration for an organization.\n\nReturns the complete IntegrationConfig with all config sections.","operationId":"get_integration_config_configurations__organization_id__get","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationConfigResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["configurations"],"summary":"Update Integration Config","description":"Update full integration configuration for an organization.\n\nExpects the complete IntegrationConfig from the frontend.","operationId":"update_integration_config_configurations__organization_id__put","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationConfig"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationConfigResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/configurations/agents/{organization_id}":{"get":{"tags":["configurations"],"summary":"Get Agent Config","description":"Get agent configuration for an organization.\n\nReturns the full AgentConfig.","operationId":"get_agent_config_configurations_agents__organization_id__get","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentConfig"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["configurations"],"summary":"Update Agent Config","description":"Update agent configuration for an organization.\n\nExpects the full AgentConfig from the frontend.","operationId":"update_agent_config_configurations_agents__organization_id__put","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentConfig"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentConfig"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/configurations/notifications/{organization_id}":{"get":{"tags":["configurations"],"summary":"Get Notification Config","description":"Get notification configuration for an organization.\n\nReturns the full NotificationConfig.","operationId":"get_notification_config_configurations_notifications__organization_id__get","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationConfig"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["configurations"],"summary":"Update Notification Config","description":"Update notification configuration for an organization.\n\nExpects the full NotificationConfig from the frontend.","operationId":"update_notification_config_configurations_notifications__organization_id__put","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationConfig"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationConfig"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/configurations/mobile-app/{organization_id}":{"get":{"tags":["configurations"],"summary":"Get Mobile App Config","description":"Get mobile app configuration for an organization.\n\nReturns the full MobileAppConfig.","operationId":"get_mobile_app_config_configurations_mobile_app__organization_id__get","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobileAppConfig"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["configurations"],"summary":"Update Mobile App Config","description":"Update mobile app configuration for an organization.\n\nExpects the full MobileAppConfig from the frontend.","operationId":"update_mobile_app_config_configurations_mobile_app__organization_id__put","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobileAppConfig"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobileAppConfig"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/slack/interactions":{"post":{"tags":["slack"],"summary":"Slack Interactions","description":"Handle Slack interactive component callbacks.\n\nSlack sends interactions as form-encoded data with a 'payload' field\ncontaining JSON. We must respond within 3 seconds.\n\nFlow:\n1. Parse the payload\n2. Immediately return 200 OK (ACK to Slack)\n3. Queue Celery task for background processing\n\nSupported interaction types:\n- block_actions: User clicks button (e.g., \"Edit Summary\")\n- view_submission: User submits modal (e.g., edited summary)","operationId":"slack_interactions_slack_interactions_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}}}},"/email-notifications/send":{"post":{"tags":["Email Notifications"],"summary":"Send email for conversation","description":"Sends a richly formatted email notification for a conversation with optional transcript range.","operationId":"send_email_for_conversation_email_notifications_send_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendEmailRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendEmailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/email-notifications/thread-status":{"get":{"tags":["Email Notifications"],"summary":"Check whether a conversation has an existing email thread","description":"Returns whether this conversation already has a prior outbound email with a captured SES Message-ID. The dashboard uses this to decide whether to surface the 'continue in same thread?' toggle in the send-email modal.","operationId":"get_thread_status_email_notifications_thread_status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/email-notifications/test":{"post":{"tags":["Email Notifications"],"summary":"Send test email","description":"Sends a test email with sample data to verify email service configuration","operationId":"send_test_email_email_notifications_test_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestEmailRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendEmailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/email-notifications/health":{"get":{"tags":["Email Notifications"],"summary":"Check email service health","description":"Verifies that email service is properly configured","operationId":"check_email_service_health_email_notifications_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Check Email Service Health Email Notifications Health Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/analytics/noops-summary":{"get":{"tags":["analytics"],"summary":"Noops Summary","description":"No-Ops Impact tiles: 30-day automation counts, turnaround, success, hours saved.","operationId":"noops_summary_analytics_noops_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}},"security":[{"HTTPBearer":[]}]}},"/analytics/generated-revenue":{"get":{"tags":["analytics"],"summary":"Get Revenue Analytics","description":"Revenue KPI from won_leads_v2 plus accepted missed_attributions.\n\nBar chart shows months with revenue > 0 in the same window, capped at MAX_CHART_MONTHS.","operationId":"get_revenue_analytics_analytics_generated_revenue_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Start date (YYYY-MM-DD)","title":"Start Date"},"description":"Start date (YYYY-MM-DD)"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"End date (YYYY-MM-DD)","title":"End Date"},"description":"End date (YYYY-MM-DD)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/analytics/potential-revenue":{"get":{"tags":["analytics"],"summary":"Get Potential Revenue","description":"Potential revenue from active followup_v2 records with active conversations (auto_send users only).","operationId":"get_potential_revenue_analytics_potential_revenue_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}},"security":[{"HTTPBearer":[]}]}},"/analytics/response-rate":{"get":{"tags":["analytics"],"summary":"Get Response Rate","description":"Response rate: replied conversations / reached conversations, from the messages table.\n\nScoped to followed followups (attempt_count > 0). Reached = a delivered (or\nuntracked pre-Apr-2026) outbound, or an inbound reply; replied = outbound and inbound.","operationId":"get_response_rate_analytics_response_rate_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Start date (YYYY-MM-DD)","title":"Start Date"},"description":"Start date (YYYY-MM-DD)"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"End date (YYYY-MM-DD)","title":"End Date"},"description":"End date (YYYY-MM-DD)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/analytics/hours-saved":{"get":{"tags":["analytics"],"summary":"Get Hours Saved","description":"Hours saved by AI automation (message count * 0.47, rounded).","operationId":"get_hours_saved_analytics_hours_saved_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Start date (YYYY-MM-DD)","title":"Start Date"},"description":"Start date (YYYY-MM-DD)"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"End date (YYYY-MM-DD)","title":"End Date"},"description":"End date (YYYY-MM-DD)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/analytics/technician-performance":{"get":{"tags":["analytics"],"summary":"Get Technician Performance","description":"Per-technician breakdown with historical dashboard stats for all sales techs.","operationId":"get_technician_performance_analytics_technician_performance_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Start date (YYYY-MM-DD)","title":"Start Date"},"description":"Start date (YYYY-MM-DD)"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"End date (YYYY-MM-DD)","title":"End Date"},"description":"End date (YYYY-MM-DD)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/analytics/technician/{user_id}/won-deals":{"get":{"tags":["analytics"],"summary":"Get Technician Won Deals","description":"Won deals for a specific technician within the given date range.","operationId":"get_technician_won_deals_analytics_technician__user_id__won_deals_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Start date (YYYY-MM-DD)","title":"Start Date"},"description":"Start date (YYYY-MM-DD)"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"End date (YYYY-MM-DD)","title":"End Date"},"description":"End date (YYYY-MM-DD)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/analytics/conversion-rate":{"get":{"tags":["analytics"],"summary":"Get Conversion Rate","description":"Conversion rate: closed followup deals / reached leads, with monthly breakdown.\n\nContacted = reached conversations (a delivered outbound or an inbound reply).\nThe won numerator uses the same closed-followup count as generated revenue\nso the Follow-up Impact and AI Performance totals stay aligned.","operationId":"get_conversion_rate_analytics_conversion_rate_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Start date (YYYY-MM-DD)","title":"Start Date"},"description":"Start date (YYYY-MM-DD)"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"End date (YYYY-MM-DD)","title":"End Date"},"description":"End date (YYYY-MM-DD)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/analytics/automation-rate":{"get":{"tags":["analytics"],"summary":"Get Automation Rate","description":"Automation rate: AI outbound messages / all outbound messages from the messages table.\n\nScoped to followed followup_v2 conversations (attempt_count > 0).\nAI messages identified by user_id = NOSO_AI_USER_ID.\nNo date filter on messages — counts all messages for those conversations.","operationId":"get_automation_rate_analytics_automation_rate_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Start date (YYYY-MM-DD)","title":"Start Date"},"description":"Start date (YYYY-MM-DD)"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"End date (YYYY-MM-DD)","title":"End Date"},"description":"End date (YYYY-MM-DD)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/analytics/followup-outcomes":{"get":{"tags":["analytics"],"summary":"Get Followup Outcomes","description":"Followup outcome counts by category with monthly breakdown.\n\nAggregates from followup_outcomes within the given date range. The\n`good_review_generated` card also includes review-request rows attributed\nto the review pipeline within the same window.\n\nUses keyset pagination to avoid PostgREST row-cap truncation.","operationId":"get_followup_outcomes_analytics_followup_outcomes_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Start date (YYYY-MM-DD)","title":"Start Date"},"description":"Start date (YYYY-MM-DD)"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"End date (YYYY-MM-DD)","title":"End Date"},"description":"End date (YYYY-MM-DD)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/email-integrations/auth-url":{"get":{"tags":["email-integrations"],"summary":"Get Auth Url","description":"Generate OAuth authorization URL for Gmail or Outlook integration.","operationId":"get_auth_url_email_integrations_auth_url_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider_name","in":"query","required":false,"schema":{"type":"string","pattern":"^(gmail|outlook)$","default":"gmail","title":"Provider Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/email-integrations/callback":{"get":{"tags":["email-integrations"],"summary":"Gmail Oauth Callback","description":"Handle Google OAuth callback.","operationId":"gmail_oauth_callback_email_integrations_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"type":"string","title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"type":"string","title":"State"}},{"name":"error","in":"query","required":false,"schema":{"type":"string","title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/email-integrations/microsoft/callback":{"get":{"tags":["email-integrations"],"summary":"Microsoft Oauth Callback","description":"Handle Microsoft OAuth callback.","operationId":"microsoft_oauth_callback_email_integrations_microsoft_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"type":"string","title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"type":"string","title":"State"}},{"name":"error","in":"query","required":false,"schema":{"type":"string","title":"Error"}},{"name":"error_description","in":"query","required":false,"schema":{"type":"string","title":"Error Description"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/email-integrations/status":{"get":{"tags":["email-integrations"],"summary":"Get Status","description":"Get email integration status for the organization.","operationId":"get_status_email_integrations_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/email-integrations/{integration_id}/disconnect":{"post":{"tags":["email-integrations"],"summary":"Disconnect","description":"Disconnect an email integration.","operationId":"disconnect_email_integrations__integration_id__disconnect_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","title":"Integration Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/email-integrations/{integration_id}/sync":{"post":{"tags":["email-integrations"],"summary":"Sync Emails","description":"Trigger an on-demand email sync (same logic as the background cron).","operationId":"sync_emails_email_integrations__integration_id__sync_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","title":"Integration Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/email-integrations/{integration_id}/fetch-emails":{"post":{"tags":["email-integrations"],"summary":"Fetch Emails","description":"On-demand fetch of a Gmail account's messages by label and/or search query.","operationId":"fetch_emails_email_integrations__integration_id__fetch_emails_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","title":"Integration Id"}},{"name":"label","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Gmail label name, e.g. 'NoSo - PO'","title":"Label"},"description":"Gmail label name, e.g. 'NoSo - PO'"},{"name":"query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Raw Gmail search, e.g. 'from:x subject:code newer_than:1h'","title":"Query"},"description":"Raw Gmail search, e.g. 'from:x subject:code newer_than:1h'"},{"name":"max_results","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Max Results"}},{"name":"max_pages","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":5,"title":"Max Pages"}},{"name":"persist","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Persist"}},{"name":"return_messages","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Return Messages"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/email-integrations/{integration_id}/market-leads/connect":{"post":{"tags":["email-integrations"],"summary":"Connect Market Lead Inbox","operationId":"connect_market_lead_inbox_email_integrations__integration_id__market_leads_connect_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","title":"Integration Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/email-integrations/{integration_id}/market-leads/disconnect":{"post":{"tags":["email-integrations"],"summary":"Disconnect Market Lead Inbox","operationId":"disconnect_market_lead_inbox_email_integrations__integration_id__market_leads_disconnect_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","title":"Integration Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/email-integrations/webhooks/gmail-pubsub":{"post":{"tags":["email-integrations"],"summary":"Gmail Pubsub Webhook","operationId":"gmail_pubsub_webhook_email_integrations_webhooks_gmail_pubsub_post","parameters":[{"name":"token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/email-integrations/webhooks/outlook":{"post":{"tags":["email-integrations"],"summary":"Outlook Webhook","description":"Microsoft Graph change notifications for Aspire Outlook-native rep mailboxes.\nEchoes the validationToken on subscription setup; otherwise verifies clientState\nand backgrounds a sync + orchestrator run for each affected mailbox (returns 202 fast).","operationId":"outlook_webhook_email_integrations_webhooks_outlook_post","parameters":[{"name":"validationToken","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Validationtoken"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/email-integrations/{integration_id}/send":{"post":{"tags":["email-integrations"],"summary":"Send Email","description":"Send an email via the org's connected email provider.\n\nSupports HTML/plain bodies, Cc/Bcc, Reply-To, S3-referenced attachments,\nand replying onto a synced message's thread (reply_to_email_id).","operationId":"send_email_email_integrations__integration_id__send_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","title":"Integration Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendEmailInput"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/email-integrations/{integration_id}/test-send":{"post":{"tags":["email-integrations"],"summary":"Send Test Email","description":"Send a test email to info@noso.so to verify send works.","operationId":"send_test_email_email_integrations__integration_id__test_send_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","title":"Integration Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/email-integrations/{integration_id}/emails":{"get":{"tags":["email-integrations"],"summary":"List Emails","description":"List stored emails for a connected email integration.","operationId":"list_emails_email_integrations__integration_id__emails_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","title":"Integration Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/email-integrations/{integration_id}/test-read":{"post":{"tags":["email-integrations"],"summary":"Test Read Emails","description":"Live-fetch the 5 most recent emails to verify the read scope is working.\n\nCalls the provider API directly (no DB write, no cache). Surfaced in the UI\nso users can see exactly what the gmail.readonly scope is reading on their\nbehalf — used by Crucible's resolver agent to detect customer replies.","operationId":"test_read_emails_email_integrations__integration_id__test_read_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","title":"Integration Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/resend/inbound":{"post":{"tags":["resend"],"summary":"Resend Inbound Webhook","description":"Receive inbound emails forwarded by Resend.\n\nResend sends a POST with the full email payload when a reply\nis received on the configured inbound domain. The payload is\nverified via Svix signature before processing.\n\nPayload shape:\n{\n  \"type\": \"email.received\",\n  \"created_at\": \"...\",\n  \"data\": {\n    \"email_id\": \"...\",\n    \"from\": \"Name <email>\",\n    \"to\": [\"...\"],\n    \"cc\": [],\n    \"bcc\": [],\n    \"subject\": \"...\",\n    \"message_id\": \"<...>\",\n    \"attachments\": [...]\n  }\n}","operationId":"resend_inbound_webhook_resend_inbound_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Resend Inbound Webhook Resend Inbound Post"}}}}}}},"/organization-knowledge/{org_id}":{"get":{"summary":"Get Org Knowledge","description":"Get the knowledge record for an organization.\n\nReturns 404 if no knowledge record has been created for this org yet.","operationId":"get_org_knowledge_organization_knowledge__org_id__get","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationKnowledge"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organization-knowledge/{org_id}/authority-matrix":{"put":{"summary":"Update Authority Matrix","description":"Replace the org's promise whitelist (see AuthorityMatrix).\n\nHolds the onboarding-questionnaire answers: labor warranty, make-it-right, price hold,\nprice match, priority scheduling, the discount prohibition, and rebates. An empty matrix\nmeans the agent makes zero binding promises.","operationId":"update_authority_matrix_organization_knowledge__org_id__authority_matrix_put","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAuthorityMatrixRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationKnowledge"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer-profiles/search":{"get":{"tags":["customer-profiles"],"summary":"Search Customers By Name","description":"Search customer profiles by name (case-insensitive partial match).","operationId":"search_customers_by_name_customer_profiles_search_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"name","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Customer name to search for","title":"Name"},"description":"Customer name to search for"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomerSearchResult"},"title":"Response Search Customers By Name Customer Profiles Search Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer-profiles/overview":{"get":{"tags":["customer-profiles"],"summary":"Get Customer Overview","description":"Return customer-base overview aggregates for the Customers landing page.","operationId":"get_customer_overview_customer_profiles_overview_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerOverviewResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/customer-profiles/conversations":{"get":{"tags":["customer-profiles"],"summary":"Get Customer Conversations","description":"Return conversations linked to a customer by ServiceTitan id or known phones.","operationId":"get_customer_conversations_customer_profiles_conversations_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"st_customer_id","in":"query","required":true,"schema":{"type":"integer","description":"ServiceTitan customer ID","title":"St Customer Id"},"description":"ServiceTitan customer ID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomerConversationSummary"},"title":"Response Get Customer Conversations Customer Profiles Conversations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer-profiles/sync":{"post":{"tags":["customer-profiles"],"summary":"Sync Customer Profile","description":"Trigger an on-demand sync for a customer profile from ServiceTitan.","operationId":"sync_customer_profile_customer_profiles_sync_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"st_customer_id","in":"query","required":true,"schema":{"type":"integer","description":"ServiceTitan customer ID","title":"St Customer Id"},"description":"ServiceTitan customer ID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer-profiles/full":{"get":{"tags":["customer-profiles"],"summary":"Get Full Customer Profile","description":"Return a consolidated customer profile with analytics and job history.","operationId":"get_full_customer_profile_customer_profiles_full_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"st_customer_id","in":"query","required":true,"schema":{"type":"integer","description":"ServiceTitan customer ID","title":"St Customer Id"},"description":"ServiceTitan customer ID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FullProfileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/draw-slips/process":{"post":{"tags":["draw-slips"],"summary":"Trigger Draw Slip Processing","description":"Queue a draw slip OCR pipeline task for a Google Drive folder.\n\nAccess controlled via UI (isNOSOAIUser). Validates the drive link,\nenqueues a Celery task, and returns immediately with the task ID.","operationId":"trigger_draw_slip_processing_draw_slips_process_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessDrawSlipsRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessDrawSlipsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/draw-slips/logs":{"get":{"tags":["draw-slips"],"summary":"List Processing Logs","description":"List OCR processing log entries for the organization.\n\nReturns logs ordered by most recent first, with pagination.","operationId":"list_processing_logs_draw_slips_logs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Max logs to return","default":50,"title":"Limit"},"description":"Max logs to return"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of logs to skip","default":0,"title":"Offset"},"description":"Number of logs to skip"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OcrProcessingLogList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/campaigns":{"get":{"tags":["campaigns"],"summary":"List Campaigns","description":"List all campaigns for the organization with aggregate stats.","operationId":"list_campaigns_campaigns_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignsListResponse"}}}},"404":{"description":"Not found"}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["campaigns"],"summary":"Create Campaign","description":"Create AND launch a campaign (NOSO AI only) — there is no draft state.","operationId":"create_campaign_campaigns_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCampaignRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCampaignResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/campaigns/suggestions":{"get":{"tags":["campaigns"],"summary":"List Campaign Suggestions","description":"Campaigns Noso recommends running next, newest scoring first.","operationId":"list_campaign_suggestions_campaigns_suggestions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CampaignSuggestion"},"type":"array","title":"Response List Campaign Suggestions Campaigns Suggestions Get"}}}},"404":{"description":"Not found"}},"security":[{"HTTPBearer":[]}]}},"/campaigns/suggestions/{suggestion_id}/approve":{"post":{"tags":["campaigns"],"summary":"Approve Campaign Suggestion","description":"Approve a suggestion: this LAUNCHES the campaign and queues its first sends.","operationId":"approve_campaign_suggestion_campaigns_suggestions__suggestion_id__approve_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"suggestion_id","in":"path","required":true,"schema":{"type":"string","title":"Suggestion Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveCampaignSuggestionResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/campaigns/audience-builds/intake":{"post":{"tags":["campaigns"],"summary":"Audience Build Intake","description":"Pre-build intake: safety verdict + campaign-objective triage (NOSO AI only).\nAn unclear objective hard-blocks the build until the operator answers.","operationId":"audience_build_intake_campaigns_audience_builds_intake_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudienceIntakeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudienceIntakeResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/campaigns/audience-builds":{"post":{"tags":["campaigns"],"summary":"Start Audience Build","description":"Queue a natural-language audience build; audience_build_worker claims it.","operationId":"start_audience_build_campaigns_audience_builds_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartAudienceBuildRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartAudienceBuildResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/campaigns/audience-builds/latest-active":{"get":{"tags":["campaigns"],"summary":"Get Latest Active Audience Build","description":"The org's newest queued/running build, so a reopened modal can resume it.","operationId":"get_latest_active_audience_build_campaigns_audience_builds_latest_active_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CampaignAudienceBuild"},{"type":"null"}],"title":"Response Get Latest Active Audience Build Campaigns Audience Builds Latest Active Get"}}}},"404":{"description":"Not found"}},"security":[{"HTTPBearer":[]}]}},"/campaigns/audience-builds/{build_id}/cancel":{"post":{"tags":["campaigns"],"summary":"Cancel Audience Build","description":"Cancel a queued/running build; running builds stop at the next agent turn.","operationId":"cancel_audience_build_campaigns_audience_builds__build_id__cancel_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"build_id","in":"path","required":true,"schema":{"type":"string","title":"Build Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignAudienceBuild"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/campaigns/audience-builds/{build_id}":{"get":{"tags":["campaigns"],"summary":"Get Audience Build","description":"Fetch audience build progress and suggestions.","operationId":"get_audience_build_campaigns_audience_builds__build_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"build_id","in":"path","required":true,"schema":{"type":"string","title":"Build Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignAudienceBuild"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/campaigns/audience-builds/{build_id}/suggestions/{suggestion_id}":{"patch":{"tags":["campaigns"],"summary":"Update Audience Suggestion","description":"Include or exclude a suggested audience customer.","operationId":"update_audience_suggestion_campaigns_audience_builds__build_id__suggestions__suggestion_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"build_id","in":"path","required":true,"schema":{"type":"string","title":"Build Id"}},{"name":"suggestion_id","in":"path","required":true,"schema":{"type":"string","title":"Suggestion Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAudienceSuggestionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignAudienceBuild"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/campaigns/audience-builds/{build_id}/suggestions":{"patch":{"tags":["campaigns"],"summary":"Bulk Update Audience Suggestions","description":"Include or exclude multiple suggested audience customers.","operationId":"bulk_update_audience_suggestions_campaigns_audience_builds__build_id__suggestions_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"build_id","in":"path","required":true,"schema":{"type":"string","title":"Build Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpdateAudienceSuggestionsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignAudienceBuild"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/campaigns/office-escalations":{"get":{"tags":["campaigns"],"summary":"List Campaign Office Escalations","description":"List campaign conversations that require action.","operationId":"list_campaign_office_escalations_campaigns_office_escalations_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status_filter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"default":"open","title":"Status Filter"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CampaignOfficeEscalation"},"title":"Response List Campaign Office Escalations Campaigns Office Escalations Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/campaigns/office-escalations/count":{"get":{"tags":["campaigns"],"summary":"Get Campaign Escalation Count","description":"Open-escalation count for badges — the list endpoint was being fetched in\nfull just to read its length.","operationId":"get_campaign_escalation_count_campaigns_office_escalations_count_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"integer"},"type":"object","title":"Response Get Campaign Escalation Count Campaigns Office Escalations Count Get"}}}},"404":{"description":"Not found"}},"security":[{"HTTPBearer":[]}]}},"/campaigns/plays":{"get":{"tags":["campaigns"],"summary":"Get Campaign Plays","description":"Automated play states + the latest wave for each (campaigns_redesign.md §4).","operationId":"get_campaign_plays_campaigns_plays_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CampaignPlayStatus"},"type":"array","title":"Response Get Campaign Plays Campaigns Plays Get"}}}},"404":{"description":"Not found"}},"security":[{"HTTPBearer":[]}]}},"/campaigns/plays/{play_key}/state":{"post":{"tags":["campaigns"],"summary":"Set Campaign Play State","description":"Pause, resume or disable an automated campaign for this org.\n\nPausing stops the planner evaluating it AND the dispatcher holds every queued\naction for the play (re-checked fresh per action). Stopping disables the play\nand closes its in-flight wave campaigns, so nothing keeps sending afterwards.","operationId":"set_campaign_play_state_campaigns_plays__play_key__state_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"play_key","in":"path","required":true,"schema":{"type":"string","title":"Play Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPlayStateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/campaigns/conversations":{"get":{"tags":["campaigns"],"summary":"Get Campaign Bucket Conversations","description":"Cross-campaign conversations for a shared bucket (D8) — replaces the\nfrontend's per-campaign dashboard fan-out.","operationId":"get_campaign_bucket_conversations_campaigns_conversations_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bucket","in":"query","required":false,"schema":{"type":"string","default":"ongoing","title":"Bucket"}},{"name":"campaign_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CampaignBucketConversation"},"title":"Response Get Campaign Bucket Conversations Campaigns Conversations Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/campaigns/conversations/{conversation_id}/won":{"post":{"tags":["campaigns"],"summary":"Move Campaign Conversation To Won","description":"Manually move a campaign conversation to Won; with an ST job id, verify\nthe job and send the office booking email.","operationId":"move_campaign_conversation_to_won_campaigns_conversations__conversation_id__won_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoveCampaignConversationWonRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoveCampaignConversationWonResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/campaigns/conversations/{conversation_id}/lost":{"post":{"tags":["campaigns"],"summary":"Move Campaign Conversation To Lost","description":"Manually move a campaign conversation to Lost with a dismissal reason.","operationId":"move_campaign_conversation_to_lost_campaigns_conversations__conversation_id__lost_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoveCampaignConversationLostRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoveCampaignConversationLostResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/campaigns/{campaign_id}/automation-rate":{"get":{"tags":["campaigns"],"summary":"Get Campaign Automation Rate","description":"Share of this campaign's outbound messages the AI sent, first messages included.","operationId":"get_campaign_automation_rate_campaigns__campaign_id__automation_rate_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignAutomationRate"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/campaigns/bucket-counts":{"get":{"tags":["campaigns"],"summary":"Get Campaign Bucket Counts","description":"Exact campaign counts that fold into the shared bucket figures (D8).","operationId":"get_campaign_bucket_counts_campaigns_bucket_counts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignBucketCounts"}}}},"404":{"description":"Not found"}},"security":[{"HTTPBearer":[]}]}},"/campaigns/events":{"get":{"tags":["campaigns"],"summary":"Get Campaign Events","description":"Campaign Engine log — feeds the terminal and conversation timelines (§4.7).","operationId":"get_campaign_events_campaigns_events_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":60,"title":"Limit"}},{"name":"campaign_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign Id"}},{"name":"conversation_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CampaignEngineEvent"},"title":"Response Get Campaign Events Campaigns Events Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/campaigns/office-escalations/{escalation_id}":{"patch":{"tags":["campaigns"],"summary":"Resolve Campaign Office Escalation","description":"Update an office escalation status.","operationId":"resolve_campaign_office_escalation_campaigns_office_escalations__escalation_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"escalation_id","in":"path","required":true,"schema":{"type":"string","title":"Escalation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveOfficeEscalationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveOfficeEscalationResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/campaigns/{campaign_id}/customers":{"get":{"tags":["campaigns"],"summary":"Get Campaign Customers","description":"Get unique customers for a campaign, grouped by customer.","operationId":"get_campaign_customers_campaigns__campaign_id__customers_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignCustomersResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/campaigns/{campaign_id}/template":{"patch":{"tags":["campaigns"],"summary":"Update Campaign Template","description":"Update the first message template for a campaign.","operationId":"update_campaign_template_campaigns__campaign_id__template_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCampaignTemplateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCampaignTemplateResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/campaigns/{campaign_id}/generate-first-messages":{"post":{"tags":["campaigns"],"summary":"Generate First Messages","description":"Pre-generate safe personalized first-blast messages for preview/send.","operationId":"generate_first_messages_campaigns__campaign_id__generate_first_messages_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateFirstMessagesRequest","default":{"limit":50,"only_pending":true}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateFirstMessagesResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/campaigns/{campaign_id}/applied-filters":{"patch":{"tags":["campaigns"],"summary":"Update Applied Filters","description":"Persist applied filter labels in campaign config.","operationId":"update_applied_filters_campaigns__campaign_id__applied_filters_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAppliedFiltersRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/campaigns/{campaign_id}/reapply-filters":{"post":{"tags":["campaigns"],"summary":"Reapply Filters","description":"Restore all excluded, re-apply given filters, save to config.","operationId":"reapply_filters_campaigns__campaign_id__reapply_filters_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAppliedFiltersRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/campaigns/{campaign_id}/exclude-by-months":{"post":{"tags":["campaigns"],"summary":"Exclude By Months","description":"Exclude campaign items whose event month is not in the given keep_months list.","operationId":"exclude_by_months_campaigns__campaign_id__exclude_by_months_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExcludeByMonthsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExcludeByMonthsResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/campaigns/{campaign_id}/restore-all":{"post":{"tags":["campaigns"],"summary":"Restore All Excluded","description":"Restore all excluded items back to pending.","operationId":"restore_all_excluded_campaigns__campaign_id__restore_all_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestoreAllResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/campaigns/{campaign_id}/customers/{st_customer_id}":{"delete":{"tags":["campaigns"],"summary":"Remove Campaign Customer","description":"Remove all items for a customer from a campaign.","operationId":"remove_campaign_customer_campaigns__campaign_id__customers__st_customer_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}},{"name":"st_customer_id","in":"path","required":true,"schema":{"type":"string","title":"St Customer Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveCustomerResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/campaigns/{campaign_id}/start":{"post":{"tags":["campaigns"],"summary":"Start Campaign","description":"Start a campaign: generate first messages and request Slack approval before sending.","operationId":"start_campaign_campaigns__campaign_id__start_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartCampaignRequest","default":{}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartCampaignResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/campaigns/{campaign_id}/release-batch":{"post":{"tags":["campaigns"],"summary":"Release Batch","description":"Generate the next batch of messages and request Slack approval before sending.","operationId":"release_batch_campaigns__campaign_id__release_batch_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReleaseBatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReleaseBatchResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/campaigns/{campaign_id}/pause":{"post":{"tags":["campaigns"],"summary":"Pause Campaign","description":"Pause an active campaign — cancels pending follow-up schedules.","operationId":"pause_campaign_campaigns__campaign_id__pause_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PauseCampaignResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/campaigns/{campaign_id}/resume":{"post":{"tags":["campaigns"],"summary":"Resume Campaign","description":"Resume a paused campaign — schedules the next follow-up round.","operationId":"resume_campaign_campaigns__campaign_id__resume_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResumeCampaignRequest","default":{}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResumeCampaignResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/campaigns/{campaign_id}":{"delete":{"tags":["campaigns"],"summary":"Discard Campaign","description":"Throw away a draft and its audience. Drafts only — see the service docstring.","operationId":"discard_campaign_campaigns__campaign_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscardCampaignResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/campaigns/{campaign_id}/stop":{"post":{"tags":["campaigns"],"summary":"Stop Campaign","description":"Permanently close a campaign — stops all batches and deletes schedules. Irreversible.","operationId":"stop_campaign_campaigns__campaign_id__stop_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StopCampaignResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/campaigns/{campaign_id}/complete":{"post":{"tags":["campaigns"],"summary":"Complete Campaign","description":"Manually mark an active or paused campaign as completed.","operationId":"complete_campaign_campaigns__campaign_id__complete_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StopCampaignResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/campaigns/{campaign_id}/batches/{batch_number}/stop":{"post":{"tags":["campaigns"],"summary":"Stop Batch","description":"Permanently close a single batch — no more follow-up messages. Irreversible.","operationId":"stop_batch_campaigns__campaign_id__batches__batch_number__stop_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}},{"name":"batch_number","in":"path","required":true,"schema":{"type":"integer","title":"Batch Number"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StopBatchResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/campaigns/{campaign_id}/dashboard":{"get":{"tags":["campaigns"],"summary":"Get Campaign Dashboard","description":"Get active campaign dashboard: rounds + customer statuses.","operationId":"get_campaign_dashboard_campaigns__campaign_id__dashboard_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignDashboardResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/campaigns/{campaign_id}/pending-customers":{"get":{"tags":["campaigns"],"summary":"Get Pending Customers","description":"Get pending customers for manual batch selection.","operationId":"get_pending_customers_campaigns__campaign_id__pending_customers_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PendingCustomersResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/campaigns/{campaign_id}/customers/{customer_id}/messages":{"get":{"tags":["campaigns"],"summary":"Get Customer Messages","description":"Get conversation messages for a campaign customer.","operationId":"get_customer_messages_campaigns__campaign_id__customers__customer_id__messages_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}},{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignConversationResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/campaigns/{campaign_id}/customers/{customer_id}/reply":{"post":{"tags":["campaigns"],"summary":"Send Customer Reply","description":"Send a reply to a campaign customer from the dashboard.","operationId":"send_customer_reply_campaigns__campaign_id__customers__customer_id__reply_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}},{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendReplyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignMessage"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/campaigns/{campaign_id}/customers/{customer_id}/bookable-items":{"get":{"tags":["campaigns"],"summary":"Get Bookable Items","description":"Get bookable items for a campaign customer, grouped by membership.","operationId":"get_bookable_items_campaigns__campaign_id__customers__customer_id__bookable_items_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}},{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookableItemsResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/campaigns/{campaign_id}/customers/{customer_id}/book":{"post":{"tags":["campaigns"],"summary":"Book Campaign Job","description":"Book a ServiceTitan job from the campaign dashboard.","operationId":"book_campaign_job_campaigns__campaign_id__customers__customer_id__book_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}},{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignBookJobRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignBookJobResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/campaigns/{campaign_id}/customers/{customer_id}/cancel-booking":{"post":{"tags":["campaigns"],"summary":"Cancel Campaign Booking","description":"Cancel a booked ServiceTitan job from the campaign dashboard.","operationId":"cancel_campaign_booking_campaigns__campaign_id__customers__customer_id__cancel_booking_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}},{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignCancelBookingRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignCancelBookingResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/campaigns/{campaign_id}/job-cancel-reasons":{"get":{"tags":["campaigns"],"summary":"Get Job Cancel Reasons","description":"Get job cancel reasons from ServiceTitan for dropdown selection.","operationId":"get_job_cancel_reasons_campaigns__campaign_id__job_cancel_reasons_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/JobCancelReason"},"title":"Response Get Job Cancel Reasons Campaigns  Campaign Id  Job Cancel Reasons Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/campaigns/{campaign_id}/customers/{customer_id}/update-status":{"patch":{"tags":["campaigns"],"summary":"Update Customer Status","description":"Manually update a campaign customer's status (for triage).","operationId":"update_customer_status_campaigns__campaign_id__customers__customer_id__update_status_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}},{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCustomerStatusRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCustomerStatusResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/campaigns/{campaign_id}/customers/{customer_id}/action-required":{"post":{"tags":["campaigns"],"summary":"Mark Customer Action Required","description":"Manually move a campaign customer conversation into action required.","operationId":"mark_customer_action_required_campaigns__campaign_id__customers__customer_id__action_required_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}},{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualOfficeEscalationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveOfficeEscalationResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/campaigns/{campaign_id}/customers/{customer_id}/send-email":{"post":{"tags":["campaigns"],"summary":"Send Campaign Email","description":"Send an email notification about a campaign customer to back office.","operationId":"send_campaign_email_campaigns__campaign_id__customers__customer_id__send_email_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}},{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignSendEmailRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignSendEmailResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/campaigns/shadow-events/pending":{"get":{"tags":["campaigns"],"summary":"Get Pending Shadow Events","description":"Return pending campaign responder shadow events for review.","operationId":"get_pending_shadow_events_campaigns_shadow_events_pending_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Pending Shadow Events Campaigns Shadow Events Pending Get"}}}},"404":{"description":"Not found"}},"security":[{"HTTPBearer":[]}]}},"/campaigns/shadow-events/{event_id}/accept":{"post":{"tags":["campaigns"],"summary":"Accept Shadow Event","description":"Accept a pending shadow event — execute the tool action (send, book, etc.).","operationId":"accept_shadow_event_campaigns_shadow_events__event_id__accept_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_accept_shadow_event_campaigns_shadow_events__event_id__accept_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Accept Shadow Event Campaigns Shadow Events  Event Id  Accept Post"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/campaigns/shadow-events/{event_id}/decline":{"post":{"tags":["campaigns"],"summary":"Decline Shadow Event","description":"Decline a pending shadow event.","operationId":"decline_shadow_event_campaigns_shadow_events__event_id__decline_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Decline Shadow Event Campaigns Shadow Events  Event Id  Decline Post"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/campaigns/options/business-units":{"get":{"tags":["campaigns"],"summary":"Get Business Unit Options","description":"Get all active business units for dropdown.","operationId":"get_business_unit_options_campaigns_options_business_units_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DropdownOptionsResponse"}}}},"404":{"description":"Not found"}},"security":[{"HTTPBearer":[]}]}},"/campaigns/options/job-types":{"get":{"tags":["campaigns"],"summary":"Get Job Type Options","description":"Get all active job types for dropdown.","operationId":"get_job_type_options_campaigns_options_job_types_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DropdownOptionsResponse"}}}},"404":{"description":"Not found"}},"security":[{"HTTPBearer":[]}]}},"/campaigns/options/tags":{"get":{"tags":["campaigns"],"summary":"Get Tag Options","description":"Get all active ST tag types for dropdown.","operationId":"get_tag_options_campaigns_options_tags_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DropdownOptionsResponse"}}}},"404":{"description":"Not found"}},"security":[{"HTTPBearer":[]}]}},"/campaigns/options/campaigns":{"get":{"tags":["campaigns"],"summary":"Get St Campaign Options","description":"Get all active ST campaigns for dropdown.","operationId":"get_st_campaign_options_campaigns_options_campaigns_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DropdownOptionsResponse"}}}},"404":{"description":"Not found"}},"security":[{"HTTPBearer":[]}]}},"/market-leads/service-titan-job-alerts/twilio":{"post":{"tags":["market-lead-webhooks"],"summary":"Handle Service Titan Job Alert Sms","operationId":"handle_service_titan_job_alert_sms_market_leads_service_titan_job_alerts_twilio_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_handle_service_titan_job_alert_sms_market_leads_service_titan_job_alerts_twilio_post"}}},"required":true},"responses":{"200":{"description":"Successful Response"},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market-leads":{"get":{"tags":["market-leads"],"summary":"Get Market Leads Dashboard","operationId":"get_market_leads_dashboard_market_leads_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"source_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Key"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketLeadsDashboardResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market-leads/sender-config":{"get":{"tags":["market-leads"],"summary":"Get Market Lead Sender Config","operationId":"get_market_lead_sender_config_market_leads_sender_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketLeadSenderConfig"}}}},"404":{"description":"Not found"}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["market-leads"],"summary":"Update Market Lead Sender Config","operationId":"update_market_lead_sender_config_market_leads_sender_config_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketLeadSenderConfigUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketLeadSenderConfig"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/market-leads/manual-sms/access":{"get":{"tags":["market-leads"],"summary":"Check Market Lead Manual Sms Access","operationId":"check_market_lead_manual_sms_access_market_leads_manual_sms_access_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketLeadManualSmsAccessResponse"}}}},"404":{"description":"Not found"}},"security":[{"HTTPBearer":[]}]}},"/market-leads/manual-sms":{"post":{"tags":["market-leads"],"summary":"Create Market Lead Manual Sms","operationId":"create_market_lead_manual_sms_market_leads_manual_sms_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketLeadManualSmsCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketLeadSummary"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/market-leads/manual-email":{"post":{"tags":["market-leads"],"summary":"Create Market Lead Manual Email","operationId":"create_market_lead_manual_email_market_leads_manual_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketLeadManualEmailCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketLeadSummary"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/market-leads/{lead_id}":{"get":{"tags":["market-leads"],"summary":"Get Market Lead Detail","operationId":"get_market_lead_detail_market_leads__lead_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string","title":"Lead Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketLeadDetailResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["market-leads"],"summary":"Update Market Lead","operationId":"update_market_lead_market_leads__lead_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string","title":"Lead Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketLeadUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketLeadSummary"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market-leads/{lead_id}/sms-replies":{"post":{"tags":["market-leads"],"summary":"Send Market Lead Sms Reply","operationId":"send_market_lead_sms_reply_market_leads__lead_id__sms_replies_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string","title":"Lead Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketLeadSendReplyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market-leads/{lead_id}/email-replies":{"post":{"tags":["market-leads"],"summary":"Send Market Lead Email Reply","operationId":"send_market_lead_email_reply_market_leads__lead_id__email_replies_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string","title":"Lead Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketLeadEmailReplyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market-leads/{lead_id}/evaluate-qualification":{"post":{"tags":["market-leads"],"summary":"Evaluate Market Lead Qualification","operationId":"evaluate_market_lead_qualification_market_leads__lead_id__evaluate_qualification_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string","title":"Lead Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketLeadSummary"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market-leads/{lead_id}/book-service-titan-job":{"post":{"tags":["market-leads"],"summary":"Book Market Lead Service Titan Job","operationId":"book_market_lead_service_titan_job_market_leads__lead_id__book_service_titan_job_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string","title":"Lead Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketLeadBookJobResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market-leads/{lead_id}/retry-backoffice-notification":{"post":{"tags":["market-leads"],"summary":"Retry Market Lead Backoffice Notification","operationId":"retry_market_lead_backoffice_notification_market_leads__lead_id__retry_backoffice_notification_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string","title":"Lead Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketLeadSummary"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/demo/status":{"get":{"tags":["demo"],"summary":"Demo Status","description":"Check if the current user is a sales admin and return linked technician info.","operationId":"demo_status_demo_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/demo/dashboard-data":{"get":{"tags":["demo"],"summary":"Demo Dashboard Data","description":"Return mock dashboard analytics data for sales admin users.","operationId":"demo_dashboard_data_demo_dashboard_data_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/demo/swap-phone":{"post":{"tags":["demo"],"summary":"Swap Phone","description":"Replace a conversation's customer_phone with the sales rep's real phone number.\n\nThis allows the sales rep to receive SMS on their personal phone during a demo.\nOnly the sales admin's linked technician's conversations can be swapped.","operationId":"swap_phone_demo_swap_phone_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_swap_phone_demo_swap_phone_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/demo/reset-conversation":{"post":{"tags":["demo"],"summary":"Reset Conversation","description":"Reset a single conversation back to its seeded state.","operationId":"reset_conversation_demo_reset_conversation_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_reset_conversation_demo_reset_conversation_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/demo/reset":{"post":{"tags":["demo"],"summary":"Reset Demo","description":"Reset ALL demo conversations for the current sales admin's linked technician.","operationId":"reset_demo_demo_reset_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/contracts":{"get":{"tags":["contracts"],"summary":"List Contracts","operationId":"list_contracts_contracts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractListResponse"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["contracts"],"summary":"Create Contract","operationId":"create_contract_contracts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/contracts/{contract_id}":{"put":{"tags":["contracts"],"summary":"Update Contract","operationId":"update_contract_contracts__contract_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","title":"Contract Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["contracts"],"summary":"Delete Contract","operationId":"delete_contract_contracts__contract_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","title":"Contract Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contracts/{contract_id}/list-state":{"post":{"tags":["contracts"],"summary":"Set Contract List State","operationId":"set_contract_list_state_contracts__contract_id__list_state_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","title":"Contract Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetListStateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contracts/{contract_id}/send":{"post":{"tags":["contracts"],"summary":"Send Contract","operationId":"send_contract_contracts__contract_id__send_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","title":"Contract Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contracts/{contract_id}/activate-link":{"post":{"tags":["contracts"],"summary":"Activate Link","operationId":"activate_link_contracts__contract_id__activate_link_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","title":"Contract Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contracts/{contract_id}/deactivate-link":{"post":{"tags":["contracts"],"summary":"Deactivate Link","operationId":"deactivate_link_contracts__contract_id__deactivate_link_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","title":"Contract Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contracts/{contract_id}/extend-link":{"post":{"tags":["contracts"],"summary":"Extend Link","operationId":"extend_link_contracts__contract_id__extend_link_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","title":"Contract Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtendLinkRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contracts/{contract_id}/reminder-config":{"put":{"tags":["contracts"],"summary":"Update Reminder Config","operationId":"update_reminder_config_contracts__contract_id__reminder_config_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","title":"Contract Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReminderConfigUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contracts/{contract_id}/reminder/pause":{"post":{"tags":["contracts"],"summary":"Pause Reminder","operationId":"pause_reminder_contracts__contract_id__reminder_pause_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","title":"Contract Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contracts/{contract_id}/reminder/unpause":{"post":{"tags":["contracts"],"summary":"Unpause Reminder","operationId":"unpause_reminder_contracts__contract_id__reminder_unpause_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","title":"Contract Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contracts/templates/reminder-email":{"get":{"tags":["contracts"],"summary":"Get Reminder Email Template","operationId":"get_reminder_email_template_contracts_templates_reminder_email_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/contracts/{contract_id}/reminder-email":{"put":{"tags":["contracts"],"summary":"Update Reminder Email","operationId":"update_reminder_email_contracts__contract_id__reminder_email_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","title":"Contract Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReminderEmailUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["contracts"],"summary":"Clear Reminder Email","operationId":"clear_reminder_email_contracts__contract_id__reminder_email_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","title":"Contract Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contracts/public/{token}":{"get":{"tags":["contracts"],"summary":"Get Public Contract","operationId":"get_public_contract_contracts_public__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractPublicResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contracts/public/{token}/sign":{"post":{"tags":["contracts"],"summary":"Sign Contract","operationId":"sign_contract_contracts_public__token__sign_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractSignRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractPublicResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contracts/public/{token}/create-checkout":{"post":{"tags":["contracts"],"summary":"Create Checkout Session","operationId":"create_checkout_session_contracts_public__token__create_checkout_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contracts/public/{token}/send-checkout-email":{"post":{"tags":["contracts"],"summary":"Send Checkout Email","operationId":"send_checkout_email_contracts_public__token__send_checkout_email_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendCheckoutEmailRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contracts/public/{token}/pdf":{"get":{"tags":["contracts"],"summary":"Download Contract Pdf","operationId":"download_contract_pdf_contracts_public__token__pdf_get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contracts/public/{token}/submit-onboarding-details":{"post":{"tags":["contracts"],"summary":"Submit Onboarding Details","operationId":"submit_onboarding_details_contracts_public__token__submit_onboarding_details_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientOnboardingDetailsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/clients":{"get":{"tags":["clients"],"summary":"List Clients","operationId":"list_clients_clients_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["clients"],"summary":"Create Client","operationId":"create_client_clients_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/clients/templates/lifecycle-email":{"get":{"tags":["clients"],"summary":"Get Lifecycle Email Template","operationId":"get_lifecycle_email_template_clients_templates_lifecycle_email_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kind","in":"query","required":true,"schema":{"enum":["kickoff","golive"],"type":"string","title":"Kind"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/clients/{client_id}":{"get":{"tags":["clients"],"summary":"Get Client","operationId":"get_client_clients__client_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["clients"],"summary":"Update Client","operationId":"update_client_clients__client_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/clients/{client_id}/pipeline":{"get":{"tags":["clients"],"summary":"Get Client Pipeline","operationId":"get_client_pipeline_clients__client_id__pipeline_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientPipelineResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/clients/{client_id}/card-capture-link":{"post":{"tags":["clients"],"summary":"Create Card Capture Link","operationId":"create_card_capture_link_clients__client_id__card_capture_link_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Create Card Capture Link Clients  Client Id  Card Capture Link Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/clients/{client_id}/set-stage":{"post":{"tags":["clients"],"summary":"Set Client Stage","operationId":"set_client_stage_clients__client_id__set_stage_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientSetStageRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/clients/{client_id}/organizations":{"post":{"tags":["clients"],"summary":"Link Client Organization","operationId":"link_client_organization_clients__client_id__organizations_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientOrgLinkRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/clients/{client_id}/organizations/{org_id}":{"delete":{"tags":["clients"],"summary":"Unlink Client Organization","operationId":"unlink_client_organization_clients__client_id__organizations__org_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/clients/{client_id}/notes":{"post":{"tags":["clients"],"summary":"Add Client Note","operationId":"add_client_note_clients__client_id__notes_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientNoteCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/clients/{client_id}/notes/{note_id}":{"patch":{"tags":["clients"],"summary":"Pin Client Note","operationId":"pin_client_note_clients__client_id__notes__note_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}},{"name":"note_id","in":"path","required":true,"schema":{"type":"string","title":"Note Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientNotePinRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/clients/{client_id}/lifecycle-email":{"put":{"tags":["clients"],"summary":"Update Client Lifecycle Email","operationId":"update_client_lifecycle_email_clients__client_id__lifecycle_email_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LifecycleEmailUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["clients"],"summary":"Clear Client Lifecycle Email","operationId":"clear_client_lifecycle_email_clients__client_id__lifecycle_email_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}},{"name":"kind","in":"query","required":true,"schema":{"enum":["kickoff","golive"],"type":"string","title":"Kind"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/clients/{client_id}/lifecycle-email/send":{"post":{"tags":["clients"],"summary":"Send Client Lifecycle Email Now","operationId":"send_client_lifecycle_email_now_clients__client_id__lifecycle_email_send_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}},{"name":"kind","in":"query","required":true,"schema":{"enum":["kickoff","golive"],"type":"string","title":"Kind"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/clients/{client_id}/lifecycle-email/attachment":{"post":{"tags":["clients"],"summary":"Upload Client Lifecycle Email Attachment","operationId":"upload_client_lifecycle_email_attachment_clients__client_id__lifecycle_email_attachment_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_client_lifecycle_email_attachment_clients__client_id__lifecycle_email_attachment_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["clients"],"summary":"Delete Client Lifecycle Email Attachment","operationId":"delete_client_lifecycle_email_attachment_clients__client_id__lifecycle_email_attachment_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}},{"name":"kind","in":"query","required":true,"schema":{"enum":["kickoff","golive"],"type":"string","title":"Kind"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/clients/{client_id}/next-charge":{"get":{"tags":["clients"],"summary":"Get Next Charge","operationId":"get_next_charge_clients__client_id__next_charge_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NextChargeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/clients/{client_id}/charge":{"post":{"tags":["clients"],"summary":"Charge Client","operationId":"charge_client_clients__client_id__charge_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdHocChargeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/clients/{client_id}/schedule-subscription":{"post":{"tags":["clients"],"summary":"Schedule Subscription","operationId":"schedule_subscription_clients__client_id__schedule_subscription_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleSubscriptionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/clients/{client_id}/change-subscription":{"post":{"tags":["clients"],"summary":"Change Subscription","operationId":"change_subscription_clients__client_id__change_subscription_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleSubscriptionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin-metrics/overview":{"get":{"tags":["admin-metrics"],"summary":"Get Overview","operationId":"get_overview_admin_metrics_overview_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"months","in":"query","required":false,"schema":{"type":"integer","maximum":24,"minimum":1,"default":6,"title":"Months"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminMetricsOverview"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cost-tracking/twilio":{"get":{"tags":["cost-tracking"],"summary":"Twilio Monthly","operationId":"twilio_monthly_cost_tracking_twilio_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"months","in":"query","required":false,"schema":{"type":"integer","maximum":24,"minimum":1,"default":12,"title":"Months"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","additionalProperties":true}},"title":"Response Twilio Monthly Cost Tracking Twilio Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cost-tracking/openai":{"get":{"tags":["cost-tracking"],"summary":"Openai Monthly","operationId":"openai_monthly_cost_tracking_openai_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"months","in":"query","required":false,"schema":{"type":"integer","maximum":24,"minimum":1,"default":12,"title":"Months"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","additionalProperties":true}},"title":"Response Openai Monthly Cost Tracking Openai Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cost-tracking/aws":{"get":{"tags":["cost-tracking"],"summary":"Aws Monthly","operationId":"aws_monthly_cost_tracking_aws_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"months","in":"query","required":false,"schema":{"type":"integer","maximum":24,"minimum":1,"default":12,"title":"Months"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","additionalProperties":true}},"title":"Response Aws Monthly Cost Tracking Aws Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cost-tracking/supabase":{"get":{"tags":["cost-tracking"],"summary":"Supabase Monthly","operationId":"supabase_monthly_cost_tracking_supabase_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"months","in":"query","required":false,"schema":{"type":"integer","maximum":24,"minimum":1,"default":12,"title":"Months"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","additionalProperties":true}},"title":"Response Supabase Monthly Cost Tracking Supabase Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cost-tracking/per-org":{"get":{"tags":["cost-tracking"],"summary":"Per Org Breakdown","operationId":"per_org_breakdown_cost_tracking_per_org_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"months","in":"query","required":false,"schema":{"type":"integer","maximum":24,"minimum":1,"default":12,"title":"Months"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Per Org Breakdown Cost Tracking Per Org Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cost-tracking/operator-runs":{"get":{"tags":["cost-tracking"],"summary":"Operator Runs Cost","description":"Per-org cost of NOSO Operator browser-agent runs (LLM + estimated Browserbase).","operationId":"operator_runs_cost_cost_tracking_operator_runs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"months","in":"query","required":false,"schema":{"type":"integer","maximum":24,"minimum":1,"default":12,"title":"Months"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Operator Runs Cost Cost Tracking Operator Runs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal-metrics/response-rate":{"get":{"tags":["internal-metrics"],"summary":"Response Rate By Org","description":"Per-org response rate, bucketed by granularity over the date range.","operationId":"response_rate_by_org_internal_metrics_response_rate_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Start date (YYYY-MM-DD)","title":"Start Date"},"description":"Start date (YYYY-MM-DD)"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"End date (YYYY-MM-DD), inclusive","title":"End Date"},"description":"End date (YYYY-MM-DD), inclusive"},{"name":"granularity","in":"query","required":false,"schema":{"type":"string","description":"day | week | month","default":"week","title":"Granularity"},"description":"day | week | month"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Response Rate By Org Internal Metrics Response Rate Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal-metrics/ai-disable-rate":{"get":{"tags":["internal-metrics"],"summary":"Ai Disable Rate By Tech","description":"Per-technician AI disable rate across active customer orgs.","operationId":"ai_disable_rate_by_tech_internal_metrics_ai_disable_rate_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"min_disable_rate","in":"query","required":false,"schema":{"type":"number","maximum":100,"minimum":0,"description":"Only techs strictly above this rate (%)","default":10,"title":"Min Disable Rate"},"description":"Only techs strictly above this rate (%)"},{"name":"min_sample","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Minimum ongoing conversations per tech","default":3,"title":"Min Sample"},"description":"Minimum ongoing conversations per tech"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Ai Disable Rate By Tech Internal Metrics Ai Disable Rate Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal-metrics/reply-sentiment":{"get":{"tags":["internal-metrics"],"summary":"Reply Sentiment By Org","description":"Per-org first-reply sentiment + follow-up problem rate over the range.","operationId":"reply_sentiment_by_org_internal_metrics_reply_sentiment_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Start date (YYYY-MM-DD)","title":"Start Date"},"description":"Start date (YYYY-MM-DD)"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"End date (YYYY-MM-DD), inclusive","title":"End Date"},"description":"End date (YYYY-MM-DD), inclusive"},{"name":"granularity","in":"query","required":false,"schema":{"type":"string","description":"day | week | month","default":"week","title":"Granularity"},"description":"day | week | month"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Reply Sentiment By Org Internal Metrics Reply Sentiment Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal-metrics/st-customer-users":{"get":{"tags":["internal-metrics"],"summary":"St Customer Users","description":"ServiceTitan prod customers and their users, classified for the internal directory.","operationId":"st_customer_users_internal_metrics_st_customer_users_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response St Customer Users Internal Metrics St Customer Users Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/internal/st-etl/connections/{connection_id}/checkpoints/{entity}":{"get":{"tags":["st-etl"],"summary":"Get Checkpoint","operationId":"get_checkpoint_internal_st_etl_connections__connection_id__checkpoints__entity__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity","in":"path","required":true,"schema":{"type":"string","title":"Entity"}},{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/STETLCheckpointResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/st-etl/connections/{connection_id}/calls/checkpoint":{"get":{"tags":["st-etl"],"summary":"Get Call Feed Checkpoint","operationId":"get_call_feed_checkpoint_internal_st_etl_connections__connection_id__calls_checkpoint_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/STCallFeedCheckpointResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/st-etl/connections/{connection_id}/pages/calls":{"post":{"tags":["st-etl"],"summary":"Commit Call Feed Page","operationId":"commit_call_feed_page_internal_st_etl_connections__connection_id__pages_calls_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/STCallFeedIngestRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/STCallFeedIngestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/st-etl/connections/{connection_id}/calls":{"post":{"tags":["st-etl"],"summary":"Commit Call Feed Page","operationId":"commit_call_feed_page_internal_st_etl_connections__connection_id__calls_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/STCallFeedIngestRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/STCallFeedIngestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/st-etl/connections/{connection_id}/pages/{entity}":{"post":{"tags":["st-etl"],"summary":"Commit Page","operationId":"commit_page_internal_st_etl_connections__connection_id__pages__entity__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity","in":"path","required":true,"schema":{"type":"string","title":"Entity"}},{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/STETLPageIngestRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/STETLPageIngestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/st-etl/connections/{connection_id}/calls/recordings":{"get":{"tags":["st-etl"],"summary":"Get Call Recording Queue","operationId":"get_call_recording_queue_internal_st_etl_connections__connection_id__calls_recordings_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/STCallRecordingQueueResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/st-etl/connections/{connection_id}/calls/recordings/{st_call_id}":{"post":{"tags":["st-etl"],"summary":"Commit Call Recording","description":"Body is the raw audio; an empty body records that ST had no recording.","operationId":"commit_call_recording_internal_st_etl_connections__connection_id__calls_recordings__st_call_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"st_call_id","in":"path","required":true,"schema":{"type":"integer","title":"St Call Id"}},{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/STCallRecordingIngestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/st-etl/connections/{connection_id}/settings":{"post":{"tags":["st-etl"],"summary":"Commit Settings Snapshot","operationId":"commit_settings_snapshot_internal_st_etl_connections__connection_id__settings_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/STETLSettingsSnapshotRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/STETLSettingsSnapshotResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/usage/me":{"get":{"tags":["usage"],"summary":"My Usage Monthly","operationId":"my_usage_monthly_usage_me_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"months","in":"query","required":false,"schema":{"type":"integer","maximum":24,"minimum":1,"default":12,"title":"Months"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response My Usage Monthly Usage Me Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/usage/me/by-workflow":{"get":{"tags":["usage"],"summary":"My Usage By Workflow","description":"Monthly compute value broken down by business workflow (NOSO Operator runs).","operationId":"my_usage_by_workflow_usage_me_by_workflow_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"months","in":"query","required":false,"schema":{"type":"integer","maximum":24,"minimum":1,"default":12,"title":"Months"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response My Usage By Workflow Usage Me By Workflow Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contacts":{"get":{"tags":["contacts"],"summary":"List Contacts","operationId":"list_contacts_contacts_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactListResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contacts/recent-servicetitan-jobs":{"get":{"tags":["contacts"],"summary":"List Recent Servicetitan Job Contacts","operationId":"list_recent_servicetitan_job_contacts_contacts_recent_servicetitan_jobs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactListResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contacts/{contact_id}":{"get":{"tags":["contacts"],"summary":"Get Contact Detail","operationId":"get_contact_detail_contacts__contact_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"string","title":"Contact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactDetailResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contacts/{contact_id}/resolve-thread":{"post":{"tags":["contacts"],"summary":"Resolve Contact Thread","operationId":"resolve_contact_thread_contacts__contact_id__resolve_thread_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"string","title":"Contact Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveContactThreadRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveContactThreadResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/playwright/send-job-email":{"post":{"tags":["playwright"],"summary":"Send Job Email","description":"Dispatch an estimate/invoice email send to Pilot and return its request_id.\n\nDoes not wait for the send; poll GET /playwright/job-action-status/{request_id}.","operationId":"send_job_email_playwright_send_job_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendJobEmailRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobActionDispatchResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/playwright/scrape-job-events":{"post":{"tags":["playwright"],"summary":"Scrape Job Events","description":"Dispatch a job-events fetch to Pilot and return its request_id (poll for the result).","operationId":"scrape_job_events_playwright_scrape_job_events_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScrapeJobEventsRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobActionDispatchResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/playwright/job-action-status/{request_id}":{"get":{"tags":["playwright"],"summary":"Get Job Action Status","description":"Poll the status of a dispatched job action; returns the typed result on completion.","operationId":"get_job_action_status_playwright_job_action_status__request_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobActionStatusResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/field-view/public/won/{short_code}/timeline":{"get":{"tags":["field-view"],"summary":"Get Public Won Timeline","description":"Public read-only field-view timeline for won ServiceTitan handoff links.","operationId":"get_public_won_timeline_field_view_public_won__short_code__timeline_get","parameters":[{"name":"short_code","in":"path","required":true,"schema":{"type":"string","title":"Short Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldViewTimelineResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/field-view/conversations/{conversation_id}":{"get":{"tags":["field-view"],"summary":"Get Conversation Summary","description":"Returns minimal conversation context for the field view SPA.\nScoped to the authenticated technician — only returns conversations they own.","operationId":"get_conversation_summary_field_view_conversations__conversation_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/routers__field_view__ConversationSummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/field-view/conversations/{conversation_id}/timeline":{"get":{"tags":["field-view"],"summary":"Get Field View Timeline","description":"Returns the full conversation timeline for a technician.\n\nMixed timeline of messages, calls, timeline events, and notes — sorted by\ncreated_at. Scoped to the authenticated technician. Marks unread inbound\nmessages as read.","operationId":"get_field_view_timeline_field_view_conversations__conversation_id__timeline_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldViewTimelineResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/field-view/conversations/{conversation_id}/send":{"post":{"tags":["field-view"],"summary":"Field View Send Message","description":"Send a text message in the conversation.\nScoped to the authenticated technician.","operationId":"field_view_send_message_field_view_conversations__conversation_id__send_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldViewSendRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldViewTimelineItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/field-view/conversations/{conversation_id}/upload-url":{"post":{"tags":["field-view"],"summary":"Field View Upload Url","description":"Get a presigned S3 upload URL for an SMS image attachment.","operationId":"field_view_upload_url_field_view_conversations__conversation_id__upload_url_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldViewUploadUrlRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldViewUploadUrlResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/field-view/conversations/{conversation_id}/rephrase-message":{"post":{"tags":["field-view"],"summary":"Field View Rephrase Message","description":"Polish a drafted message using AI. Identical logic to the dashboard rephrase endpoint.","operationId":"field_view_rephrase_message_field_view_conversations__conversation_id__rephrase_message_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldViewRephraseRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldViewRephraseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/field-view/conversations/{conversation_id}/suggest-message":{"post":{"tags":["field-view"],"summary":"Field View Suggest Message","description":"Suggest a reply for the technician based on conversation context.","operationId":"field_view_suggest_message_field_view_conversations__conversation_id__suggest_message_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldViewSuggestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/field-view/conversations/{conversation_id}/initiate-call":{"post":{"tags":["field-view"],"summary":"Field View Initiate Call","description":"Initiate a bridge call for the field view technician.\n\nSame flow as the dashboard bridge call, adapted for the technician:\n1. Call the technician's personal phone (users.phone_number)\n2. When technician answers and presses 1, bridge to the customer\n3. Technician's twilio_phone_number is used as caller ID","operationId":"field_view_initiate_call_field_view_conversations__conversation_id__initiate_call_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldViewCallRequest","default":{}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldViewCallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/field-view/conversations/{conversation_id}/resolve":{"post":{"tags":["field-view"],"summary":"Resolve Conversation","description":"Move a require_action conversation to ongoing (tech-scoped).\n\nNo-op if the conversation is already ongoing — returns success without\nwriting timeline/activity rows (avoids spurious \"Resolved\" events).","operationId":"resolve_conversation_field_view_conversations__conversation_id__resolve_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldViewResolveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/field-view/conversations/{conversation_id}/lost-capabilities":{"get":{"tags":["field-view"],"summary":"Get Field View Lost Capabilities","operationId":"get_field_view_lost_capabilities_field_view_conversations__conversation_id__lost_capabilities_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FollowupLostCapabilities"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/field-view/conversations/{conversation_id}/mark-lost":{"post":{"tags":["field-view"],"summary":"Mark Conversation Lost","description":"Mark the followup for this conversation as lost (tech-scoped).\n\nMirrors /followups/{id}/mark-lost: updates followup_v2, archives the\nconversation, disables the agent, logs timeline + activity events.","operationId":"mark_conversation_lost_field_view_conversations__conversation_id__mark_lost_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkFollowupLostRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldViewMarkLostResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/playground/scenarios":{"get":{"tags":["playground"],"summary":"List Scenarios","operationId":"list_scenarios_playground_scenarios_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaygroundScenariosResponse"}}}}}}},"/playground/sessions":{"post":{"tags":["playground"],"summary":"Create Session","description":"Seed the scenario, then generate and send the opener out of band.","operationId":"create_session_playground_sessions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaygroundSessionCreateRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaygroundSessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/playground/sessions/{session_id}":{"get":{"tags":["playground"],"summary":"Get Transcript","description":"Live transcript so the page can mirror the thread while the visitor texts.","operationId":"get_transcript_playground_sessions__session_id__get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaygroundTranscriptResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/plaud/access-token":{"get":{"tags":["plaud"],"summary":"Get Plaud Access Token","operationId":"get_plaud_access_token_plaud_access_token_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}},"security":[{"HTTPBearer":[]}]}},"/plaud/device-events":{"post":{"tags":["plaud"],"summary":"Record Plaud Device Event","description":"Persist Plaud device binding events reported by the mobile SDK.\n\nThis table is diagnostic state owned by Noso. The source of truth for the\nactual hardware lock is still Plaud's SDK/cloud; we only mark a recorder as\nunpaired after the native SDK has returned a successful depair callback.","operationId":"record_plaud_device_event_plaud_device_events_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaudDeviceEventRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/plaud/device-bindings":{"get":{"tags":["plaud"],"summary":"List Plaud Device Bindings","description":"List Plaud binding diagnostics visible to the caller's active org.","operationId":"list_plaud_device_bindings_plaud_device_bindings_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"serial_number","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}],"title":"Serial Number"}},{"name":"current_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Current Only"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/plaud/device-availability":{"get":{"tags":["plaud"],"summary":"Get Plaud Device Availability","description":"Whether a PIN is actively bound by someone else, checked across ALL orgs.\n\nCross-org bindings return only the boolean; owner details stay org-private.","operationId":"get_plaud_device_availability_plaud_device_availability_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"serial_number","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"Serial Number"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/landscaping-proposals/templates":{"get":{"tags":["landscaping-proposals"],"summary":"List Landscaping Proposal Templates","operationId":"list_landscaping_proposal_templates_landscaping_proposals_templates_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"proposal_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}],"title":"Proposal Type"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","pattern":"^(draft|active|archived)$","default":"active","title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalTemplateList"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/landscaping-proposals/templates/active":{"get":{"tags":["landscaping-proposals"],"summary":"Get Active Landscaping Proposal Template Bundle","operationId":"get_active_landscaping_proposal_template_bundle_landscaping_proposals_templates_active_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"proposal_type","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":64,"default":"enhancement","title":"Proposal Type"}},{"name":"version","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"title":"Version"}},{"name":"include_sources","in":"query","required":false,"schema":{"type":"boolean","description":"When true, include org_prompt and template_html text for developer inspection.","default":false,"title":"Include Sources"},"description":"When true, include org_prompt and template_html text for developer inspection."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalTemplateBundle"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/landscaping-proposals/events":{"get":{"tags":["landscaping-proposals"],"summary":"List Landscaping Proposal Events","operationId":"list_landscaping_proposal_events_landscaping_proposals_events_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"enum":["draft","capturing","processing","ready","failed","archived"],"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalEventList"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["landscaping-proposals"],"summary":"Create Landscaping Proposal Event","operationId":"create_landscaping_proposal_event_landscaping_proposals_events_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalEventCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalEvent"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/landscaping-proposals/visits":{"get":{"tags":["landscaping-proposals"],"summary":"List Landscaping Proposal Visits","operationId":"list_landscaping_proposal_visits_landscaping_proposals_visits_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Q"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"enum":["draft","capturing","processing","ready","failed","archived"],"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalVisitList"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/landscaping-proposals/events/{event_id}":{"get":{"tags":["landscaping-proposals"],"summary":"Get Landscaping Proposal Event","operationId":"get_landscaping_proposal_event_landscaping_proposals_events__event_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalEvent"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["landscaping-proposals"],"summary":"Update Landscaping Proposal Event","operationId":"update_landscaping_proposal_event_landscaping_proposals_events__event_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalEventUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalEvent"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/landscaping-proposals/events/{event_id}/photos/upload-url":{"post":{"tags":["landscaping-proposals"],"summary":"Create Landscaping Proposal Photo Upload Url","operationId":"create_landscaping_proposal_photo_upload_url_landscaping_proposals_events__event_id__photos_upload_url_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalPhotoUploadUrlRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalPhotoUploadUrlResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/landscaping-proposals/events/{event_id}/photos/preview-urls":{"get":{"tags":["landscaping-proposals"],"summary":"Get Landscaping Proposal Photo Preview Urls","operationId":"get_landscaping_proposal_photo_preview_urls_landscaping_proposals_events__event_id__photos_preview_urls_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/landscaping-proposals/events/{event_id}/photos":{"post":{"tags":["landscaping-proposals"],"summary":"Create Landscaping Proposal Photo","operationId":"create_landscaping_proposal_photo_landscaping_proposals_events__event_id__photos_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalPhotoCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalPhoto"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/landscaping-proposals/photos/{photo_id}":{"patch":{"tags":["landscaping-proposals"],"summary":"Update Landscaping Proposal Photo","operationId":"update_landscaping_proposal_photo_landscaping_proposals_photos__photo_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"photo_id","in":"path","required":true,"schema":{"type":"string","title":"Photo Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalPhotoUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalPhoto"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["landscaping-proposals"],"summary":"Archive Landscaping Proposal Photo","operationId":"archive_landscaping_proposal_photo_landscaping_proposals_photos__photo_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"photo_id","in":"path","required":true,"schema":{"type":"string","title":"Photo Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalPhoto"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/landscaping-proposals/events/{event_id}/audio-assets":{"post":{"tags":["landscaping-proposals"],"summary":"Create Landscaping Proposal Audio Asset","operationId":"create_landscaping_proposal_audio_asset_landscaping_proposals_events__event_id__audio_assets_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalAudioAssetCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalAudioAsset"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/landscaping-proposals/events/{event_id}/audio-assets/upload-url":{"post":{"tags":["landscaping-proposals"],"summary":"Create Landscaping Proposal Audio Upload Url","operationId":"create_landscaping_proposal_audio_upload_url_landscaping_proposals_events__event_id__audio_assets_upload_url_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalAudioUploadUrlRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalAudioUploadUrlResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/landscaping-proposals/audio-assets/{audio_asset_id}":{"patch":{"tags":["landscaping-proposals"],"summary":"Update Landscaping Proposal Audio Asset","operationId":"update_landscaping_proposal_audio_asset_landscaping_proposals_audio_assets__audio_asset_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"audio_asset_id","in":"path","required":true,"schema":{"type":"string","title":"Audio Asset Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalAudioAssetUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalAudioAsset"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["landscaping-proposals"],"summary":"Archive Landscaping Proposal Audio Asset","operationId":"archive_landscaping_proposal_audio_asset_landscaping_proposals_audio_assets__audio_asset_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"audio_asset_id","in":"path","required":true,"schema":{"type":"string","title":"Audio Asset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalAudioAsset"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/landscaping-proposals/audio-assets/{audio_asset_id}/download-url":{"get":{"tags":["landscaping-proposals"],"summary":"Get Landscaping Proposal Audio Download Url","operationId":"get_landscaping_proposal_audio_download_url_landscaping_proposals_audio_assets__audio_asset_id__download_url_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"audio_asset_id","in":"path","required":true,"schema":{"type":"string","title":"Audio Asset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/landscaping-proposals/events/{event_id}/assets":{"get":{"tags":["landscaping-proposals"],"summary":"Get Landscaping Proposal Assets","operationId":"get_landscaping_proposal_assets_landscaping_proposals_events__event_id__assets_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalAssetsResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/landscaping-proposals/events/{event_id}/preprocessing":{"get":{"tags":["landscaping-proposals"],"summary":"Get Landscaping Proposal Preprocessing Status","operationId":"get_landscaping_proposal_preprocessing_status_landscaping_proposals_events__event_id__preprocessing_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalPreprocessingStatus"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/landscaping-proposals/events/{event_id}/preprocessing/ensure":{"post":{"tags":["landscaping-proposals"],"summary":"Ensure Landscaping Proposal Preprocessing","operationId":"ensure_landscaping_proposal_preprocessing_landscaping_proposals_events__event_id__preprocessing_ensure_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}},{"name":"retry_failed","in":"query","required":false,"schema":{"type":"boolean","description":"When true, reset terminal failed asset jobs for an explicit user retry.","default":true,"title":"Retry Failed"},"description":"When true, reset terminal failed asset jobs for an explicit user retry."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalPreprocessingStatus"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/landscaping-proposals/events/{event_id}/match-preview":{"post":{"tags":["landscaping-proposals"],"summary":"Generate Landscaping Proposal Match Preview","operationId":"generate_landscaping_proposal_match_preview_landscaping_proposals_events__event_id__match_preview_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalGenerationRun"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/landscaping-proposals/events/{event_id}/match-preview/latest":{"get":{"tags":["landscaping-proposals"],"summary":"Get Latest Landscaping Proposal Match Preview","operationId":"get_latest_landscaping_proposal_match_preview_landscaping_proposals_events__event_id__match_preview_latest_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/LandscapingProposalGenerationRun"},{"type":"null"}],"title":"Response Get Latest Landscaping Proposal Match Preview Landscaping Proposals Events  Event Id  Match Preview Latest Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/landscaping-proposals/events/{event_id}/semantic-match":{"post":{"tags":["landscaping-proposals"],"summary":"Generate Landscaping Proposal Semantic Match","operationId":"generate_landscaping_proposal_semantic_match_landscaping_proposals_events__event_id__semantic_match_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalGenerationRun"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/landscaping-proposals/events/{event_id}/semantic-match/latest":{"get":{"tags":["landscaping-proposals"],"summary":"Get Latest Landscaping Proposal Semantic Match","operationId":"get_latest_landscaping_proposal_semantic_match_landscaping_proposals_events__event_id__semantic_match_latest_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/LandscapingProposalGenerationRun"},{"type":"null"}],"title":"Response Get Latest Landscaping Proposal Semantic Match Landscaping Proposals Events  Event Id  Semantic Match Latest Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/landscaping-proposals/events/{event_id}/drafts/generate":{"post":{"tags":["landscaping-proposals"],"summary":"Generate Landscaping Proposal Draft","operationId":"generate_landscaping_proposal_draft_landscaping_proposals_events__event_id__drafts_generate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/LandscapingProposalDraftGenerateRequest"},{"type":"null"}],"title":"Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalDraft"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/landscaping-proposals/events/{event_id}/drafts/{draft_id}/regenerate":{"post":{"tags":["landscaping-proposals"],"summary":"Regenerate Landscaping Proposal Draft","operationId":"regenerate_landscaping_proposal_draft_landscaping_proposals_events__event_id__drafts__draft_id__regenerate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}},{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","title":"Draft Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/LandscapingProposalDraftGenerateRequest"},{"type":"null"}],"title":"Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalDraft"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/landscaping-proposals/events/{event_id}/drafts/{draft_id}/versions":{"post":{"tags":["landscaping-proposals"],"summary":"Create Landscaping Proposal Draft Version","operationId":"create_landscaping_proposal_draft_version_landscaping_proposals_events__event_id__drafts__draft_id__versions_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}},{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","title":"Draft Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalDraftVersionCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalDraft"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/landscaping-proposals/events/{event_id}/drafts/{draft_id}/rename":{"post":{"tags":["landscaping-proposals"],"summary":"Rename Landscaping Proposal Draft Family","operationId":"rename_landscaping_proposal_draft_family_landscaping_proposals_events__event_id__drafts__draft_id__rename_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}},{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","title":"Draft Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalDraftRenameRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalDraft"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/landscaping-proposals/events/{event_id}/drafts/{draft_id}/sends":{"post":{"tags":["landscaping-proposals"],"summary":"Record Landscaping Proposal Document Send","operationId":"record_landscaping_proposal_document_send_landscaping_proposals_events__event_id__drafts__draft_id__sends_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}},{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","title":"Draft Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalDocumentSendCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalDocumentSend"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/landscaping-proposals/events/{event_id}/send-prefill":{"get":{"tags":["landscaping-proposals"],"summary":"Get Landscaping Proposal Send Prefill","operationId":"get_landscaping_proposal_send_prefill_landscaping_proposals_events__event_id__send_prefill_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/landscaping-proposals/events/{event_id}/drafts/{draft_id}/send-email":{"post":{"tags":["landscaping-proposals"],"summary":"Send Landscaping Proposal Document Email","operationId":"send_landscaping_proposal_document_email_landscaping_proposals_events__event_id__drafts__draft_id__send_email_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}},{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","title":"Draft Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalSendEmailRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalDocumentSend"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/landscaping-proposals/events/{event_id}/drafts/{draft_id}":{"delete":{"tags":["landscaping-proposals"],"summary":"Archive Landscaping Proposal Draft","operationId":"archive_landscaping_proposal_draft_landscaping_proposals_events__event_id__drafts__draft_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}},{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","title":"Draft Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalDraft"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["landscaping-proposals"],"summary":"Update Landscaping Proposal Draft","operationId":"update_landscaping_proposal_draft_landscaping_proposals_events__event_id__drafts__draft_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}},{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","title":"Draft Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalDraftUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalDraft"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/landscaping-proposals/events/{event_id}/documents":{"get":{"tags":["landscaping-proposals"],"summary":"List Landscaping Proposal Documents","operationId":"list_landscaping_proposal_documents_landscaping_proposals_events__event_id__documents_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/landscaping-proposals/events/{event_id}/drafts/latest":{"get":{"tags":["landscaping-proposals"],"summary":"Get Latest Landscaping Proposal Draft","operationId":"get_latest_landscaping_proposal_draft_landscaping_proposals_events__event_id__drafts_latest_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/LandscapingProposalDraft"},{"type":"null"}],"title":"Response Get Latest Landscaping Proposal Draft Landscaping Proposals Events  Event Id  Drafts Latest Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/landscaping-proposals/events/{event_id}/drafts/{draft_id}/sections/{section_id}":{"patch":{"tags":["landscaping-proposals"],"summary":"Update Landscaping Proposal Draft Section","operationId":"update_landscaping_proposal_draft_section_landscaping_proposals_events__event_id__drafts__draft_id__sections__section_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}},{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","title":"Draft Id"}},{"name":"section_id","in":"path","required":true,"schema":{"type":"string","title":"Section Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalDraftSectionUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalDraft"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["landscaping-proposals"],"summary":"Delete Landscaping Proposal Draft Section","operationId":"delete_landscaping_proposal_draft_section_landscaping_proposals_events__event_id__drafts__draft_id__sections__section_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}},{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","title":"Draft Id"}},{"name":"section_id","in":"path","required":true,"schema":{"type":"string","title":"Section Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalDraft"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/landscaping-proposals/events/{event_id}/drafts/{draft_id}/sections":{"post":{"tags":["landscaping-proposals"],"summary":"Create Landscaping Proposal Draft Section","operationId":"create_landscaping_proposal_draft_section_landscaping_proposals_events__event_id__drafts__draft_id__sections_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}},{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","title":"Draft Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/LandscapingProposalDraftSectionUpdate"},{"type":"null"}],"title":"Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalDraft"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/landscaping-proposals/events/{event_id}/drafts/{draft_id}/sections/reorder":{"post":{"tags":["landscaping-proposals"],"summary":"Reorder Landscaping Proposal Draft Sections","operationId":"reorder_landscaping_proposal_draft_sections_landscaping_proposals_events__event_id__drafts__draft_id__sections_reorder_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}},{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","title":"Draft Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalDraftSectionReorder"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalDraft"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/landscaping-proposals/events/{event_id}/drafts/{draft_id}/sections/{section_id}/photos":{"post":{"tags":["landscaping-proposals"],"summary":"Add Landscaping Proposal Draft Section Photo","operationId":"add_landscaping_proposal_draft_section_photo_landscaping_proposals_events__event_id__drafts__draft_id__sections__section_id__photos_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}},{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","title":"Draft Id"}},{"name":"section_id","in":"path","required":true,"schema":{"type":"string","title":"Section Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalDraftPhotoRefCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalDraft"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/landscaping-proposals/events/{event_id}/drafts/{draft_id}/sections/{section_id}/photos/{photo_id}":{"delete":{"tags":["landscaping-proposals"],"summary":"Delete Landscaping Proposal Draft Section Photo","operationId":"delete_landscaping_proposal_draft_section_photo_landscaping_proposals_events__event_id__drafts__draft_id__sections__section_id__photos__photo_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}},{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","title":"Draft Id"}},{"name":"section_id","in":"path","required":true,"schema":{"type":"string","title":"Section Id"}},{"name":"photo_id","in":"path","required":true,"schema":{"type":"string","title":"Photo Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalDraft"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/landscaping-proposals/events/{event_id}/drafts/{draft_id}/sections/{section_id}/photos/{photo_id}/annotation":{"patch":{"tags":["landscaping-proposals"],"summary":"Update Landscaping Proposal Draft Section Photo Annotation","operationId":"update_landscaping_proposal_draft_section_photo_annotation_landscaping_proposals_events__event_id__drafts__draft_id__sections__section_id__photos__photo_id__annotation_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}},{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","title":"Draft Id"}},{"name":"section_id","in":"path","required":true,"schema":{"type":"string","title":"Section Id"}},{"name":"photo_id","in":"path","required":true,"schema":{"type":"string","title":"Photo Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalDraftPhotoAnnotationUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalDraft"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/landscaping-proposals/events/{event_id}/drafts/{draft_id}/positive-observations/{observation_id}/photos":{"post":{"tags":["landscaping-proposals"],"summary":"Add Landscaping Proposal Draft Positive Observation Photo","operationId":"add_landscaping_proposal_draft_positive_observation_photo_landscaping_proposals_events__event_id__drafts__draft_id__positive_observations__observation_id__photos_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}},{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","title":"Draft Id"}},{"name":"observation_id","in":"path","required":true,"schema":{"type":"string","title":"Observation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalDraftPhotoRefCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalDraft"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/landscaping-proposals/events/{event_id}/drafts/{draft_id}/positive-observations/{observation_id}/photos/{photo_id}":{"delete":{"tags":["landscaping-proposals"],"summary":"Delete Landscaping Proposal Draft Positive Observation Photo","operationId":"delete_landscaping_proposal_draft_positive_observation_photo_landscaping_proposals_events__event_id__drafts__draft_id__positive_observations__observation_id__photos__photo_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}},{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","title":"Draft Id"}},{"name":"observation_id","in":"path","required":true,"schema":{"type":"string","title":"Observation Id"}},{"name":"photo_id","in":"path","required":true,"schema":{"type":"string","title":"Photo Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalDraft"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/landscaping-proposals/events/{event_id}/drafts/{draft_id}/positive-observations/{observation_id}/photos/{photo_id}/annotation":{"patch":{"tags":["landscaping-proposals"],"summary":"Update Landscaping Proposal Draft Positive Observation Photo Annotation","operationId":"update_landscaping_proposal_draft_positive_observation_photo_annotation_landscaping_proposals_events__event_id__drafts__draft_id__positive_observations__observation_id__photos__photo_id__annotation_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}},{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","title":"Draft Id"}},{"name":"observation_id","in":"path","required":true,"schema":{"type":"string","title":"Observation Id"}},{"name":"photo_id","in":"path","required":true,"schema":{"type":"string","title":"Photo Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalDraftPhotoAnnotationUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalDraft"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/landscaping-proposals/events/{event_id}/drafts/{draft_id}/render-data":{"get":{"tags":["landscaping-proposals"],"summary":"Get Landscaping Proposal Draft Render Data","operationId":"get_landscaping_proposal_draft_render_data_landscaping_proposals_events__event_id__drafts__draft_id__render_data_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}},{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","title":"Draft Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/landscaping-proposals/events/{event_id}/drafts/{draft_id}/preview-html":{"get":{"tags":["landscaping-proposals"],"summary":"Preview Landscaping Proposal Draft Html","operationId":"preview_landscaping_proposal_draft_html_landscaping_proposals_events__event_id__drafts__draft_id__preview_html_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}},{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","title":"Draft Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/landscaping-proposals/events/{event_id}/drafts/{draft_id}/outputs/pdf":{"post":{"tags":["landscaping-proposals"],"summary":"Generate Landscaping Proposal Pdf Output","operationId":"generate_landscaping_proposal_pdf_output_landscaping_proposals_events__event_id__drafts__draft_id__outputs_pdf_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}},{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","title":"Draft Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalOutput"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/landscaping-proposals/events/{event_id}/outputs/latest":{"get":{"tags":["landscaping-proposals"],"summary":"Get Latest Landscaping Proposal Output","operationId":"get_latest_landscaping_proposal_output_landscaping_proposals_events__event_id__outputs_latest_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/LandscapingProposalOutput"},{"type":"null"}],"title":"Response Get Latest Landscaping Proposal Output Landscaping Proposals Events  Event Id  Outputs Latest Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/landscaping-proposals/events/{event_id}/outputs/{output_id}/download-url":{"get":{"tags":["landscaping-proposals"],"summary":"Get Landscaping Proposal Output Download Url","operationId":"get_landscaping_proposal_output_download_url_landscaping_proposals_events__event_id__outputs__output_id__download_url_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}},{"name":"output_id","in":"path","required":true,"schema":{"type":"string","title":"Output Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/landscaping-proposals/events/{event_id}/aspire-opportunities":{"get":{"tags":["landscaping-proposals"],"summary":"List Landscaping Event Aspire Opportunities","operationId":"list_landscaping_event_aspire_opportunities_landscaping_proposals_events__event_id__aspire_opportunities_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["landscaping-proposals"],"summary":"Create Landscaping Event Aspire Opportunity","operationId":"create_landscaping_event_aspire_opportunity_landscaping_proposals_events__event_id__aspire_opportunities_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingCreateOpportunityRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingProposalEvent"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/landscaping-proposals/events/{event_id}/outputs/{output_id}/aspire-attachment":{"post":{"tags":["landscaping-proposals"],"summary":"Upload Landscaping Proposal Output To Aspire","description":"Upload a rendered PDF to the Aspire property's attachments (append-only in Aspire).","operationId":"upload_landscaping_proposal_output_to_aspire_landscaping_proposals_events__event_id__outputs__output_id__aspire_attachment_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}},{"name":"output_id","in":"path","required":true,"schema":{"type":"string","title":"Output Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandscapingAspireAttachmentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evals/datasets":{"get":{"tags":["evals"],"summary":"List Eval Datasets","description":"List eval datasets, optionally filtered by agent_type.","operationId":"list_eval_datasets_evals_datasets_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response List Eval Datasets Evals Datasets Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["evals"],"summary":"Create Eval Dataset","description":"Create a new eval dataset.","operationId":"create_eval_dataset_evals_datasets_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDatasetRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Eval Dataset Evals Datasets Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evals/datasets/{dataset_id}/cases":{"get":{"tags":["evals"],"summary":"List Dataset Cases","description":"List eval cases in a dataset.","operationId":"list_dataset_cases_evals_datasets__dataset_id__cases_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string","title":"Dataset Id"}},{"name":"ready_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Ready Only"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response List Dataset Cases Evals Datasets  Dataset Id  Cases Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evals/tool-names":{"get":{"tags":["evals"],"summary":"Get Tool Names","description":"Return all SMS agent tool names for labeling dropdowns.","operationId":"get_tool_names_evals_tool_names_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"type":"string"},"type":"array","title":"Response Get Tool Names Evals Tool Names Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/evals/tool-schemas":{"get":{"tags":["evals"],"summary":"Get Tool Schemas","description":"Return full tool definitions with parameter schemas.\n\nKeyed by tool name. Each value contains the function parameters\nschema (properties, required, enums) for building dynamic forms.","operationId":"get_tool_schemas_evals_tool_schemas_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Tool Schemas Evals Tool Schemas Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/evals/agent-types":{"get":{"tags":["evals"],"summary":"Get Agent Types","description":"Return all registered agent types for UI dropdowns.","operationId":"get_agent_types_evals_agent_types_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"type":"string"},"type":"array","title":"Response Get Agent Types Evals Agent Types Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/evals/cases/{case_id}":{"get":{"tags":["evals"],"summary":"Get Eval Case","description":"Get a single eval case with all JSONB fields.","operationId":"get_eval_case_evals_cases__case_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Eval Case Evals Cases  Case Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["evals"],"summary":"Delete Eval Case","description":"Delete an eval case.","operationId":"delete_eval_case_evals_cases__case_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Delete Eval Case Evals Cases  Case Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evals/cases/{case_id}/save":{"put":{"tags":["evals"],"summary":"Batch Save Case","description":"Save all labeling changes for an eval case in one request.\n\nMerges all column updates into a single DB write, then runs oracle\nappend and metadata refresh in parallel where possible.","operationId":"batch_save_case_evals_cases__case_id__save_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","title":"Case Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchSaveCaseRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Batch Save Case Evals Cases  Case Id  Save Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evals/cases/{case_id}/status":{"patch":{"tags":["evals"],"summary":"Update Case Status","description":"Set status on an eval case.","operationId":"update_case_status_evals_cases__case_id__status_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","title":"Case Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateStatusRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Update Case Status Evals Cases  Case Id  Status Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evals/cases/from-message":{"post":{"tags":["evals"],"summary":"Save Case From Message","description":"Create an eval case from an outbound conversation message.","operationId":"save_case_from_message_evals_cases_from_message_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveAsEvalCaseRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Save Case From Message Evals Cases From Message Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/evals/frameworks":{"get":{"tags":["evals"],"summary":"List Eval Frameworks","description":"List all eval frameworks.","operationId":"list_eval_frameworks_evals_frameworks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Response List Eval Frameworks Evals Frameworks Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["evals"],"summary":"Create Eval Framework","description":"Create or update an eval framework.","operationId":"create_eval_framework_evals_frameworks_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFrameworkRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Eval Framework Evals Frameworks Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/evals/frameworks/{name}":{"get":{"tags":["evals"],"summary":"Get Eval Framework","description":"Get a single eval framework by name.","operationId":"get_eval_framework_evals_frameworks__name__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Eval Framework Evals Frameworks  Name  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evals/runs":{"get":{"tags":["evals"],"summary":"List Eval Runs","description":"List recent eval runs for an agent type.","operationId":"list_eval_runs_evals_runs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_type","in":"query","required":true,"schema":{"type":"string","title":"Agent Type"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"framework","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Framework"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response List Eval Runs Evals Runs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["evals"],"summary":"Trigger Eval Run","description":"Trigger an eval run. Executes in background, returns immediately.","operationId":"trigger_eval_run_evals_runs_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerRunRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Trigger Eval Run Evals Runs Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evals/runs/{run_id}":{"get":{"tags":["evals"],"summary":"Get Eval Run","description":"Get a single eval run with full summary and per-case results.","operationId":"get_eval_run_evals_runs__run_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Eval Run Evals Runs  Run Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/warranty-runs/post-install":{"get":{"tags":["operator-runs"],"summary":"Get Post Install Warranty Runs","description":"List the post_install_warranty browser-agent runs for the caller's org.\n\nOnly surfaces production runs (business_workflow_version like \"prod%\") that\nPilot finished (status \"completed\") — in-flight, failed, or aborted runs are\nexcluded so the table shows finished registrations rather than the full\nbacklog. Orgs with the warranty-registration workflow disabled get an empty\nlist rather than another org's data.\n\nRuns that registered nothing AND whose ledger row a human already resolved are\ndropped — the job is closed, so a blank row would be noise. Every other\nzero-registration run keeps its row and carries no_registration_reason.","operationId":"get_post_install_warranty_runs_warranty_runs_post_install_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}},"security":[{"HTTPBearer":[]}]}},"/warranty-runs/post-install/exceptions":{"get":{"tags":["operator-runs"],"summary":"Get Post Install Warranty Exceptions","description":"Flagged/exception warranty cases for the caller's org, newest first.\n\nJobs the operator could not take through registration without a human —\neach with a one-line reason (see services/install_jobs_warranty/exceptions).\nThe Thursday digest renders the same list, so dashboard and email agree.","operationId":"get_post_install_warranty_exceptions_warranty_runs_post_install_exceptions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}},"security":[{"HTTPBearer":[]}]}},"/warranty-runs/post-install/exceptions/resolve":{"post":{"tags":["operator-runs"],"summary":"Resolve Post Install Warranty Exception","description":"Mark one flagged case as handled (retry scheduled / resolved without retry).\n\nRecords the resolution on the job's existing pilot_workflow_requests ledger\nrow (found by its deterministic request_id), so there is no separate table:\n  - resolved_no_retry / already_registered -> finalized (status 'resolved');\n    the daily pipeline skips it and the case is hidden permanently.\n  - schedule_retry / error_fixed -> reopened to status 'ready', so the next\n    enqueue run dispatches the stored Pilot request for another attempt.\nThe org-scoped request_id means one org can never resolve another org's case.","operationId":"resolve_post_install_warranty_exception_warranty_runs_post_install_exceptions_resolve_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveExceptionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/warranty-runs/post-install/push":{"post":{"tags":["operator-runs"],"summary":"Push Post Install Warranty Run","description":"Manually enqueue one post_install_warranty job to Pilot (NOSO operator only).\n\nThe dashboard \"Push Run\" action: a deliberate operator override that pushes a\nsingle job (bypassing the daily cron's readiness and auto-enqueue gates), then\npolls /post-install/push/{request_id} for the outcome. Manual dashboard pushes\nalways add Pilot's retry_terminal flag so an already-finished job re-runs\ninstead of being accepted by the API and then deduped by Pilot. The request\nbody's ``force`` field is kept for older clients and audit visibility. Returns\nthe deterministic request_id and an initial 'running' state.\nRestricted to the internal NOSO AI user (require_noso_ai_user) on top of the org\nbeing a manager org with the warranty-registration workflow enabled.","operationId":"push_post_install_warranty_run_warranty_runs_post_install_push_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushWarrantyRunRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/warranty-runs/post-install/push/{request_id}":{"get":{"tags":["operator-runs"],"summary":"Get Post Install Warranty Push Status","description":"Poll the status of a manual warranty push (NOSO operator only).\n\nReturns {request_id, job_id, state, message}; state is 'running' while Pilot\nworks, then completed / needs_review / failed once the run finishes. Each call\ndoes at most one short results-queue drain, so the dashboard polls it on an\ninterval the same way the estimate-email action does. The org-scoped request_id\nmeans one org can never read another org's run.","operationId":"get_post_install_warranty_push_status_warranty_runs_post_install_push__request_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/warranty-runs/post-install/{run_id}/recordings":{"get":{"tags":["operator-runs"],"summary":"Get Post Install Warranty Run Recordings","description":"Presigned MP4 URLs for one warranty run's archived Browserbase tabs.","operationId":"get_post_install_warranty_run_recordings_warranty_runs_post_install__run_id__recordings_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rebate-runs":{"get":{"tags":["operator-runs"],"summary":"Get Rebate Runs","description":"List the org's filed rebates, one row per CST submission.\n\nA row is a group of Friedrich serials filed at a customer location under one\nCST (the serial ledger is the truth). Its PO column is multi-valued: the\nfiling PO plus any later PO whose serials were already covered by that CST.\nA single PO can therefore appear in several rows (multi-location fan-out).\nSerials redeemed outside our filing show as a \"no CST\" row. Surfaces\nproduction runs only (business_workflow_version prod%), like warranty/permits.\nOrgs with the workflow disabled get an empty list rather than another org's.","operationId":"get_rebate_runs_rebate_runs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}},"security":[{"HTTPBearer":[]}]}},"/rebate-runs/exceptions":{"get":{"tags":["operator-runs"],"summary":"Get Rebate Exceptions","description":"Flagged/pending rebate exception claims for the caller's org, newest first.\n\nClaims the operator could not file cleanly (needs review) plus in-flight\nclaims (pending) — see services/install_jobs_rebates/exceptions.","operationId":"get_rebate_exceptions_rebate_runs_exceptions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}},"security":[{"HTTPBearer":[]}]}},"/rebate-runs/exceptions/resolve":{"post":{"tags":["operator-runs"],"summary":"Resolve Rebate Exception","description":"Mark one flagged rebate claim as reviewed, with an optional note.\n\nRebates have no producer-side ledger row per case, so the resolution lands in\noperator_case_resolutions keyed by (org, workflow, case_key). The exceptions\nreader suppresses a resolved case while its latest occurrence predates the\nresolution; a NEWER run's failure resurfaces. Re-running a PO stays a manual\ndashboard push — there is no retry action for rebates.","operationId":"resolve_rebate_exception_rebate_runs_exceptions_resolve_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveRebateExceptionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/rebate-runs/push":{"post":{"tags":["operator-runs"],"summary":"Push Rebate Run Endpoint","description":"Manually dispatch one spiff_rebate PO to Pilot production (NOSO operator only).\n\nThe dashboard \"Push Run\" action: pushes a single PO to Pilot's workflow queue,\nthen polls /rebate-runs/push/{request_id} for the outcome. Defaults to a dry\nrun. Restricted to the internal NOSO AI user on top of the org being a manager\norg with the rebate workflow enabled.","operationId":"push_rebate_run_endpoint_rebate_runs_push_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushRebateRunRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/rebate-runs/push/{request_id}":{"get":{"tags":["operator-runs"],"summary":"Get Rebate Push Status","description":"Poll the status of a manual rebate push (NOSO operator only).\n\nReturns {request_id, po_number, state, message}; state is 'running' while\nPilot works, then completed / needs_review / failed once the run finishes.","operationId":"get_rebate_push_status_rebate_runs_push__request_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/permit-runs":{"get":{"tags":["operator-runs"],"summary":"Get Permit Runs","description":"List the org's permit_registration runs — ONE row per permit (latest run).\n\nOnly production runs surface (business_workflow_version like \"prod%\"),\nmatching the warranty tab. A permit's stable identity is its sheet\ncoordinate (trade tab + sheet_row_ref — the request_id's key); retries and\nre-runs each write an agent_runs row, so rows are deduped to the latest run\nper permit. Orgs with the permit workflow disabled get an empty list.","operationId":"get_permit_runs_permit_runs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}},"security":[{"HTTPBearer":[]}]}},"/permit-runs/{run_id}/packet":{"get":{"tags":["operator-runs"],"summary":"Get Permit Run Packet","description":"Presigned packet artifacts for one run (previews, flattened, editable).\n\nURLs are minted per request and never stored; a dashboard edit's artifacts\ntransparently replace the originals (latest flattened wins everywhere).","operationId":"get_permit_run_packet_permit_runs__run_id__packet_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/permit-runs/{run_id}/packet/file":{"get":{"tags":["operator-runs"],"summary":"Get Permit Packet File","description":"Stream one packet PDF through the API (latest edited version wins).\n\nThe dashboard's pdf.js viewer fetches bytes with the normal auth headers;\nstreaming via the API rides the existing CORS setup instead of requiring a\nCORS policy on the S3 bucket. The editable copy is served with Pilot's\nReadOnly widget flags cleared so the dashboard's Form fields mode can type.","operationId":"get_permit_packet_file_permit_runs__run_id__packet_file_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}},{"name":"kind","in":"query","required":false,"schema":{"enum":["flattened","editable"],"type":"string","default":"flattened","title":"Kind"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/permit-runs/{run_id}/packet/edit":{"post":{"tags":["operator-runs"],"summary":"Save Permit Packet Edit","description":"Save an edited packet master posted by the dashboard's pdf.js editor.\n\n``annotations`` (optional JSON list) carries dashboard-drawn marks —\nwhiteout boxes (true redactions: underlying text is removed) and inserted\ntext — applied server-side before the re-flatten. The bytes are stored as a\nNEW S3 object next to the original (audit trail — nothing is ever\noverwritten), re-flattened + re-rasterized, and the run is marked edited.\nReturns fresh presigned links (latest versions).","operationId":"save_permit_packet_edit_permit_runs__run_id__packet_edit_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_save_permit_packet_edit_permit_runs__run_id__packet_edit_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/permit-runs/push":{"post":{"tags":["operator-runs"],"summary":"Push Permit Run Endpoint","description":"Manually dispatch a permit run to Pilot (managers).\n\nTwo shapes: the per-row \"Run permit\" re-sends an existing run's request\n(optionally with manager-edited notes); the top-of-tab \"Run Permit\" starts\nan ad-hoc run for a bare ServiceTitan job id. Both carry Pilot's\nretry_terminal flag and are polled via /permit-runs/push/{request_id}.\nManager-gated (unlike warranty/rebate pushes): running a permit is part of\nops' fix-and-retry loop, per product decision.","operationId":"push_permit_run_endpoint_permit_runs_push_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushPermitRunRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/permit-runs/push/{request_id}":{"get":{"tags":["operator-runs"],"summary":"Get Permit Push Status","description":"Poll the status of a manual permit push (managers).","operationId":"get_permit_push_status_permit_runs_push__request_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/permit-runs/{run_id}/recordings":{"get":{"tags":["operator-runs"],"summary":"Get Permit Run Recordings","description":"Presigned MP4 URLs for one permit run's archived Browserbase tabs.","operationId":"get_permit_run_recordings_permit_runs__run_id__recordings_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/purchase-order-runs":{"get":{"tags":["operator-runs"],"summary":"Get Purchase Order Runs","description":"List the org's receive_purchase_order runs — one row per PO (claim).\n\nOrgs with the purchase-order workflow disabled get an empty list. Only\nproduction runs surface (business_workflow_version like \"prod%\"), matching\nthe live dashboard contract for other production operator workflows.","operationId":"get_purchase_order_runs_purchase_order_runs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}},"security":[{"HTTPBearer":[]}]}},"/purchase-order-runs/exceptions":{"get":{"tags":["operator-runs"],"summary":"Get Purchase Order Exceptions","description":"Flagged/exception receive-PO claims for the caller's org, newest first.","operationId":"get_purchase_order_exceptions_purchase_order_runs_exceptions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}},"security":[{"HTTPBearer":[]}]}},"/purchase-order-runs/exceptions/resolve":{"post":{"tags":["operator-runs"],"summary":"Resolve Purchase Order Exception","description":"Mark one flagged receive-PO claim resolved, with an optional manager note.","operationId":"resolve_purchase_order_exception_purchase_order_runs_exceptions_resolve_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolvePurchaseOrderExceptionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/purchase-order-runs/exceptions/retry":{"post":{"tags":["operator-runs"],"summary":"Retry Purchase Order Exception","description":"Queue a fresh single-invoice receive-PO retry for one flagged claim.","operationId":"retry_purchase_order_exception_purchase_order_runs_exceptions_retry_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetryPurchaseOrderExceptionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/purchase-order-runs/retry/{request_id}":{"get":{"tags":["operator-runs"],"summary":"Get Purchase Order Retry Status","description":"Poll the status of a manual purchase-order retry.","operationId":"get_purchase_order_retry_status_purchase_order_runs_retry__request_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/purchase-order-runs/{run_id}/recordings":{"get":{"tags":["operator-runs"],"summary":"Get Purchase Order Run Recordings","description":"Presigned MP4 URLs for one purchase-order run's archived Browserbase tabs.","operationId":"get_purchase_order_run_recordings_purchase_order_runs__run_id__recordings_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/purchase-order-runs/{run_id}/invoices":{"get":{"tags":["operator-runs"],"summary":"Get Purchase Order Run Invoices","description":"Presigned vendor-invoice PDF URLs for one purchase-order run (one per claim).","operationId":"get_purchase_order_run_invoices_purchase_order_runs__run_id__invoices_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rebate-runs/{run_id}/recordings":{"get":{"tags":["operator-runs"],"summary":"Get Rebate Run Recordings","description":"Presigned MP4 URLs for one rebate run's archived Browserbase tabs.","operationId":"get_rebate_run_recordings_rebate_runs__run_id__recordings_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/bid-runs":{"get":{"tags":["operator-runs"],"summary":"Get Bid Runs","description":"List the org's takeoff-to-Aspire bid runs, one row per Aspire opportunity.\n\nA row is the winning run for one opportunity (a successful fill outranks a\nlater failed re-test): the takeoff sheet's matched kits entered on the\nestimate plus the plant lines flagged for manual entry. Surfaces production\nruns only (business_workflow_version prod%), like warranty/permits. Orgs with\nthe workflow disabled get an empty list rather than another org's.","operationId":"get_bid_runs_bid_runs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}},"security":[{"HTTPBearer":[]}]}},"/bid-runs/exceptions":{"get":{"tags":["operator-runs"],"summary":"Get Bid Exceptions","description":"Flagged/pending bid exception cases for the caller's org, newest first.\n\nRuns the operator could not finish cleanly (needs review), manual-entry\nwork for unmatched plant lines, and in-flight runs (pending) — see\nservices/takeoff_bids/exceptions.","operationId":"get_bid_exceptions_bid_runs_exceptions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}},"security":[{"HTTPBearer":[]}]}},"/bid-runs/exceptions/resolve":{"post":{"tags":["operator-runs"],"summary":"Resolve Bid Exception","description":"Mark one flagged bid case as reviewed, with an optional note.\n\nBids have no producer-side ledger row per case, so the resolution lands in\noperator_case_resolutions keyed by (org, workflow, case_key). The exceptions\nreader suppresses a resolved case while its latest occurrence predates the\nresolution; a NEWER run's failure resurfaces.","operationId":"resolve_bid_exception_bid_runs_exceptions_resolve_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveBidExceptionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/bid-runs/exceptions/retry":{"post":{"tags":["operator-runs"],"summary":"Retry Bid Exception","description":"Re-run one flagged bid case with the operator's resolve note (see push_bid_retry).","operationId":"retry_bid_exception_bid_runs_exceptions_retry_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetryBidExceptionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/bid-runs/observations":{"post":{"tags":["operator-runs"],"summary":"Add Bid Observation","description":"Append one operator observation note to the bid workflow's memory.\n\nNotes are workflow-scoped (per org + takeoff_to_aspire_opportunities), not\nper-opportunity; source_run_id records which run it was left from. Pilot\ndistills active notes into the standing memory injected into future runs.","operationId":"add_bid_observation_bid_runs_observations_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddBidObservationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/bid-runs/{run_id}/recordings":{"get":{"tags":["operator-runs"],"summary":"Get Bid Run Recordings","description":"Presigned MP4 URLs for one bid run's archived Browserbase tabs.","operationId":"get_bid_run_recordings_bid_runs__run_id__recordings_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/bid-runs/catalog/upload-url":{"post":{"tags":["operator-runs"],"summary":"Create Bid Catalog Upload Url","description":"Presigned S3 PUT URL for uploading a new Aspire catalog export (org managers).","operationId":"create_bid_catalog_upload_url_bid_runs_catalog_upload_url_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogUploadUrlRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/bid-runs/catalog/ingest":{"post":{"tags":["operator-runs"],"summary":"Ingest Bid Catalog","description":"Dispatch an aspire_catalog_ingest run for an uploaded export (org managers).\n\nPilot snapshots the current catalog to S3 BEFORE writing, so a mistaken\nreplace is revertible from the history list. Poll /catalog/ingest/{request_id}.","operationId":"ingest_bid_catalog_bid_runs_catalog_ingest_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogIngestRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/bid-runs/catalog/ingest/{request_id}":{"get":{"tags":["operator-runs"],"summary":"Get Bid Catalog Ingest Status","description":"Poll a catalog ingest (org managers): running | completed | needs_review | failed.","operationId":"get_bid_catalog_ingest_status_bid_runs_catalog_ingest__request_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/bid-runs/catalog/history":{"get":{"tags":["operator-runs"],"summary":"Get Bid Catalog History","description":"Previous catalog snapshots (pre-write backups) with presigned downloads.","operationId":"get_bid_catalog_history_bid_runs_catalog_history_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}},"security":[{"HTTPBearer":[]}]}},"/checkin-decks/window":{"get":{"tags":["checkin-decks"],"summary":"Get Pilot Window","operationId":"get_pilot_window_checkin_decks_window_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Date"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/checkin-decks":{"get":{"tags":["checkin-decks"],"summary":"List Checkin Decks","operationId":"list_checkin_decks_checkin_decks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["checkin-decks"],"summary":"Generate Checkin Deck","operationId":"generate_checkin_deck_checkin_decks_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckinDeckGenerateRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/checkin-decks/{deck_id}":{"get":{"tags":["checkin-decks"],"summary":"Get Checkin Deck","operationId":"get_checkin_deck_checkin_decks__deck_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"deck_id","in":"path","required":true,"schema":{"type":"string","title":"Deck Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/checkin-decks/{deck_id}/preview":{"get":{"tags":["checkin-decks"],"summary":"Preview Checkin Deck","operationId":"preview_checkin_deck_checkin_decks__deck_id__preview_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"deck_id","in":"path","required":true,"schema":{"type":"string","title":"Deck Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/checkin-decks/{deck_id}/pdf":{"get":{"tags":["checkin-decks"],"summary":"Download Checkin Deck Pdf","operationId":"download_checkin_deck_pdf_checkin_decks__deck_id__pdf_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"deck_id","in":"path","required":true,"schema":{"type":"string","title":"Deck Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/chatops/slack/events":{"post":{"tags":["chatops"],"summary":"Slack Events","operationId":"slack_events_chatops_slack_events_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Slack Events Chatops Slack Events Post"}}}}}}},"/chatops/slack/interactions":{"post":{"tags":["chatops"],"summary":"Slack Interactions","operationId":"slack_interactions_chatops_slack_interactions_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Slack Interactions Chatops Slack Interactions Post"}}}}}}},"/chatops/slack/install_url":{"get":{"tags":["chatops"],"summary":"Slack Install Url","operationId":"slack_install_url_chatops_slack_install_url_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/chatops/slack/oauth_callback":{"get":{"tags":["chatops"],"summary":"Slack Oauth Callback","description":"Slack redirects here after admin clicks Allow.\n\nNo Clerk auth — this is a public endpoint. Trust is established by:\n  (a) HMAC-signed `state` proving the install was initiated by a\n      known NOSO org via our dashboard,\n  (b) Slack's `code` being one-shot and tied to our redirect_uri.","operationId":"slack_oauth_callback_chatops_slack_oauth_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/chatops/slack/status":{"get":{"tags":["chatops"],"summary":"Slack Install Status","operationId":"slack_install_status_chatops_slack_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/chatops/slack/channels":{"get":{"tags":["chatops"],"summary":"Slack Channels","operationId":"slack_channels_chatops_slack_channels_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/chatops/slack/proactive_channel":{"post":{"tags":["chatops"],"summary":"Slack Set Proactive Channel","operationId":"slack_set_proactive_channel_chatops_slack_proactive_channel_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/assistant/chat/events":{"post":{"tags":["noso_assistant"],"summary":"Chat Events","operationId":"chat_events_assistant_chat_events_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Chat Events Assistant Chat Events Post"}}}}}}},"/assistant/slack/events":{"post":{"tags":["noso_assistant"],"summary":"Slack Events","operationId":"slack_events_assistant_slack_events_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Slack Events Assistant Slack Events Post"}}}}}}},"/assistant/slack/interactions":{"post":{"tags":["noso_assistant"],"summary":"Slack Interactions","operationId":"slack_interactions_assistant_slack_interactions_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Slack Interactions Assistant Slack Interactions Post"}}}}}}},"/aspire/access":{"get":{"tags":["aspire"],"summary":"Get Aspire Access","description":"Does this org run on Aspire? Gates aspire-only UI (e.g. the mobile Sales\ntab for sales_tech users) without exposing anything else.","operationId":"get_aspire_access_aspire_access_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/aspire/properties/search":{"get":{"tags":["aspire"],"summary":"Search Aspire Properties","description":"Live property picker for the proposal capture flow: name/address search\nagainst Aspire so a rep selects a real property instead of typing it. Defaults\nto the rep's own properties, auto-widening to the org if none match.","operationId":"search_aspire_properties_aspire_properties_search_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2,"description":"Name or address tokens","title":"Q"},"description":"Name or address tokens"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":20,"title":"Limit"}},{"name":"scope","in":"query","required":false,"schema":{"type":"string","pattern":"^(mine|all)$","default":"mine","title":"Scope"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"next_cursor from a prior page","title":"Cursor"},"description":"next_cursor from a prior page"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dmr/sync":{"post":{"tags":["dmr"],"summary":"Sync Dmr","operationId":"sync_dmr_dmr_sync_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DmrSyncRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/dmr/report":{"get":{"tags":["dmr"],"summary":"Get Dmr Report","operationId":"get_dmr_report_dmr_report_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"report_date","in":"query","required":true,"schema":{"type":"string","format":"date","title":"Report Date"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dmr/daily":{"get":{"tags":["dmr"],"summary":"Get Dmr Daily","operationId":"get_dmr_daily_dmr_daily_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entry_date","in":"query","required":true,"schema":{"type":"string","format":"date","title":"Entry Date"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["dmr"],"summary":"Save Dmr Daily","operationId":"save_dmr_daily_dmr_daily_put","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DmrDailySaveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dmr/goals":{"get":{"tags":["dmr"],"summary":"Get Dmr Goals","operationId":"get_dmr_goals_dmr_goals_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"year","in":"query","required":true,"schema":{"type":"integer","title":"Year"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["dmr"],"summary":"Save Dmr Goals","operationId":"save_dmr_goals_dmr_goals_put","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DmrGoalsSaveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dmr/goals/suggestions":{"get":{"tags":["dmr"],"summary":"Get Dmr Goal Suggestions","operationId":"get_dmr_goal_suggestions_dmr_goals_suggestions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"year","in":"query","required":true,"schema":{"type":"integer","title":"Year"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dmr/rules":{"get":{"tags":["dmr"],"summary":"Get Dmr Rules","operationId":"get_dmr_rules_dmr_rules_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["dmr"],"summary":"Update Dmr Rules","operationId":"update_dmr_rules_dmr_rules_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DmrRulesUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/dmr/changes/latest":{"get":{"tags":["dmr"],"summary":"Get Dmr Latest Change","operationId":"get_dmr_latest_change_dmr_changes_latest_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/dmr/changes/undo":{"post":{"tags":["dmr"],"summary":"Undo Dmr Last Change","operationId":"undo_dmr_last_change_dmr_changes_undo_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/":{"get":{"summary":"Read Root","operationId":"read_root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/heartbeat":{"get":{"tags":["health"],"summary":"Heartbeat","description":"Health check endpoint that can be used by Kubernetes liveness and readiness probes.\nReturns a simple response to indicate the service is running.","operationId":"heartbeat_heartbeat_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AccessTokenRequest":{"properties":{"ttl":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ttl","description":"Token time-to-live in seconds (max 86400)","default":3600}},"type":"object","title":"AccessTokenRequest","description":"Request model for generating access token."},"AccessTokenResponse":{"properties":{"token":{"type":"string","title":"Token"},"identity":{"type":"string","title":"Identity"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["token","identity","expires_at"],"title":"AccessTokenResponse","description":"Response model for access token."},"AdHocChargeRequest":{"properties":{"amount_cents":{"type":"integer","exclusiveMinimum":0.0,"title":"Amount Cents"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"idempotency_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency Key"}},"type":"object","required":["amount_cents"],"title":"AdHocChargeRequest"},"AddBidObservationRequest":{"properties":{"note":{"type":"string","title":"Note"},"source_run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Run Id"}},"type":"object","required":["note"],"title":"AddBidObservationRequest","description":"Body for leaving one agent observation note on the bid workflow."},"AddEmployeeRequest":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"phone_number":{"type":"string","title":"Phone Number"},"login_name":{"type":"string","title":"Login Name"},"person_type":{"type":"string","enum":["technician","admin"],"title":"Person Type","default":"technician"},"trades":{"items":{"type":"string"},"type":"array","title":"Trades"}},"type":"object","required":["id","email","phone_number","login_name"],"title":"AddEmployeeRequest"},"AddEmployeeResponse":{"properties":{"message":{"type":"string","title":"Message"},"clerk_user_id":{"type":"string","title":"Clerk User Id"},"employee_id":{"type":"string","title":"Employee Id"},"twilio_phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Twilio Phone Number"}},"type":"object","required":["message","clerk_user_id","employee_id"],"title":"AddEmployeeResponse"},"AddPhoneRequest":{"properties":{"phone":{"type":"string","title":"Phone","description":"New phone number in any common US format"}},"type":"object","required":["phone"],"title":"AddPhoneRequest","description":"Request to register a new phone number on a conversation."},"AddPhoneResponse":{"properties":{"added":{"type":"boolean","title":"Added","description":"False if the number was already known (idempotent)"},"phone":{"type":"string","title":"Phone","description":"Normalized 10-digit number that was added"},"available_phones":{"items":{"$ref":"#/components/schemas/AvailablePhoneResponse"},"type":"array","title":"Available Phones","description":"Refreshed available-phones list for the conversation"}},"type":"object","required":["added","phone"],"title":"AddPhoneResponse","description":"Result of registering a phone number on a conversation."},"AdminCandidateListResponse":{"properties":{"candidates":{"items":{"$ref":"#/components/schemas/TechnicianResponse"},"type":"array","title":"Candidates"}},"type":"object","required":["candidates"],"title":"AdminCandidateListResponse"},"AdminMetricsClientRow":{"properties":{"client_id":{"type":"string","title":"Client Id"},"company_name":{"type":"string","title":"Company Name"},"stage":{"type":"string","title":"Stage"},"account_kind":{"type":"string","title":"Account Kind"},"monthly_cents":{"type":"integer","title":"Monthly Cents"},"mrr_by_month":{"additionalProperties":{"type":"integer"},"type":"object","title":"Mrr By Month"},"contract_anchor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contract Anchor"},"real_start_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Real Start Date"},"expected_golive_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expected Golive Date"},"organizations":{"items":{"$ref":"#/components/schemas/AdminMetricsOrg"},"type":"array","title":"Organizations"},"closed_by_month":{"additionalProperties":{"type":"integer"},"type":"object","title":"Closed By Month"},"closed_all_time_cents":{"type":"integer","title":"Closed All Time Cents"},"first_contract_monthly_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"First Contract Monthly Cents"},"converted_from_pilot":{"type":"boolean","title":"Converted From Pilot","default":false}},"type":"object","required":["client_id","company_name","stage","account_kind","monthly_cents","mrr_by_month","organizations","closed_by_month","closed_all_time_cents"],"title":"AdminMetricsClientRow"},"AdminMetricsOrg":{"properties":{"organization_id":{"type":"string","title":"Organization Id"},"organization_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Name"},"crm":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Crm"}},"type":"object","required":["organization_id"],"title":"AdminMetricsOrg"},"AdminMetricsOverview":{"properties":{"months":{"items":{"type":"string"},"type":"array","title":"Months"},"series":{"items":{"$ref":"#/components/schemas/AdminMetricsSeriesPoint"},"type":"array","title":"Series"},"clients":{"items":{"$ref":"#/components/schemas/AdminMetricsClientRow"},"type":"array","title":"Clients"},"closed_all_time_cents":{"type":"integer","title":"Closed All Time Cents"},"closed_since_month":{"type":"string","title":"Closed Since Month"},"paying_min_cents":{"type":"integer","title":"Paying Min Cents"},"failed_org_ids":{"items":{"type":"string"},"type":"array","title":"Failed Org Ids"},"limitations":{"items":{"type":"string"},"type":"array","title":"Limitations"}},"type":"object","required":["months","series","clients","closed_all_time_cents","closed_since_month","paying_min_cents","failed_org_ids","limitations"],"title":"AdminMetricsOverview"},"AdminMetricsSeriesPoint":{"properties":{"month":{"type":"string","title":"Month"},"mrr_cents":{"type":"integer","title":"Mrr Cents"},"arr_cents":{"type":"integer","title":"Arr Cents"},"paying_accounts":{"type":"integer","title":"Paying Accounts"},"pilot_accounts":{"type":"integer","title":"Pilot Accounts"},"new_paying":{"type":"integer","title":"New Paying"},"churned_paying":{"type":"integer","title":"Churned Paying"},"arpa_cents":{"type":"integer","title":"Arpa Cents"},"closed_revenue_cents":{"type":"integer","title":"Closed Revenue Cents"},"closed_customers":{"type":"integer","title":"Closed Customers"},"contracted_mrr_cents":{"type":"integer","title":"Contracted Mrr Cents"},"contracted_arr_cents":{"type":"integer","title":"Contracted Arr Cents"},"contracted_accounts":{"type":"integer","title":"Contracted Accounts"},"new_contracted":{"type":"integer","title":"New Contracted"},"pilot_list_arr_cents":{"type":"integer","title":"Pilot List Arr Cents"},"tiers":{"items":{"$ref":"#/components/schemas/AdminMetricsTier"},"type":"array","title":"Tiers"}},"type":"object","required":["month","mrr_cents","arr_cents","paying_accounts","pilot_accounts","new_paying","churned_paying","arpa_cents","closed_revenue_cents","closed_customers","contracted_mrr_cents","contracted_arr_cents","contracted_accounts","new_contracted","pilot_list_arr_cents","tiers"],"title":"AdminMetricsSeriesPoint"},"AdminMetricsTier":{"properties":{"label":{"type":"string","title":"Label"},"mrr_cents":{"type":"integer","title":"Mrr Cents"},"accounts":{"type":"integer","title":"Accounts"}},"type":"object","required":["label","mrr_cents","accounts"],"title":"AdminMetricsTier"},"AgentActivityBatchResponse":{"properties":{"activities":{"additionalProperties":{"$ref":"#/components/schemas/AgentActivityResponse"},"type":"object","title":"Activities"}},"type":"object","title":"AgentActivityBatchResponse","description":"Agent activity timelines for a batch of conversations, keyed by conversation ID."},"AgentActivityEventResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"event_type":{"type":"string","title":"Event Type"},"actor_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor Name"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"screenshot_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Screenshot Url"},"screenshot_url_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Screenshot Url Expires At"}},"type":"object","required":["id","event_type","created_at"],"title":"AgentActivityEventResponse","description":"Single agent activity timeline event."},"AgentActivityResponse":{"properties":{"events":{"items":{"$ref":"#/components/schemas/AgentActivityEventResponse"},"type":"array","title":"Events"},"total_count":{"type":"integer","title":"Total Count"},"has_more":{"type":"boolean","title":"Has More","default":false}},"type":"object","required":["events","total_count"],"title":"AgentActivityResponse","description":"Response model for agent activity timeline."},"AgentConfig":{"properties":{"sms_agent_enabled":{"type":"boolean","title":"Sms Agent Enabled","default":false},"require_action_resolver_enabled":{"type":"boolean","title":"Require Action Resolver Enabled","default":false},"offers_memberships":{"type":"boolean","title":"Offers Memberships","description":"Whether the org runs a membership/service-plan program. When False, membership context (has_active_membership, membership_analysis) is withheld from every SMS-agent LLM stage and the answerability gate. Shared with the re-engagement pipeline's membership suppression. Also the backstop that strips membership classifications from open-estimate intents when False — such orgs create no real membership estimates, so anything membership-classified is a ServiceTitan warranty/service-agreement rider misread as membership.","default":true},"new_membership_pitch_enabled":{"type":"boolean","title":"New Membership Pitch Enabled","description":"Whether to inject the synthetic NEW-membership opportunity intent into current-objective candidates for eligible non-member customers. ORed with membership_renewal_pitch_enabled it also gates membership sell-signal generation. Injection only — real membership estimates flow as normal products regardless (offers_memberships owns the classification backstop). Replaces the hardcoded MEMBERSHIP_OPPORTUNITY_ORG_IDS / MEMBERSHIP_SELLING_ORG_IDS allowlists.","default":false},"membership_renewal_pitch_enabled":{"type":"boolean","title":"Membership Renewal Pitch Enabled","description":"Whether to inject the synthetic membership-RENEWAL opportunity intent for members whose plan is expiring soon. ORed with new_membership_pitch_enabled for sell-signal generation.","default":false},"reengagement_send_hour_local":{"type":"integer","maximum":23.0,"minimum":0.0,"title":"Reengagement Send Hour Local","description":"Local-hour send time (0-23) for outbound reengagement messages.","default":10},"sales_reachout_delay":{"type":"integer","minimum":0.0,"title":"Sales Reachout Delay","description":"Days a sales-classified job is deferred after completion before its first re-engagement touch. 0 (default) disables the deferment.","default":0},"tech_answer_agent_enabled":{"type":"boolean","title":"Tech Answer Agent Enabled","default":false},"weekend_auto_reply_enabled":{"type":"boolean","title":"Weekend Auto Reply Enabled","default":false},"message_grouping_window_seconds":{"type":"integer","maximum":300.0,"minimum":0.0,"title":"Message Grouping Window Seconds","description":"Time window (in seconds) to group consecutive customer messages. If customer sends multiple messages within this window, they will be processed together as a single conversation turn. Set to 0 to disable grouping. Max 300 seconds (5 minutes).","default":60},"auto_disable_on_human_reply":{"type":"boolean","title":"Auto Disable On Human Reply","description":"When enabled, the per-conversation agent toggle is automatically disabled whenever a real (non-AI) user sends a message in that conversation.","default":false},"campaign_responder_enabled":{"type":"boolean","title":"Campaign Responder Enabled","description":"When True, campaign LLM auto-responds to inbound SMS immediately. When False (shadow mode), responses are logged to campaign_responder_shadow_events but NOT sent.","default":false},"campaign_booking_enabled":{"type":"boolean","title":"Campaign Booking Enabled","description":"When True, the campaign brain may create real ServiceTitan jobs via book_appointment for any campaign, using campaigns.config.booking_defaults (business_unit_id + job_type_id) and a verified two-hour arrival window. When False (default), a customer who agrees to schedule is escalated to the office instead.","default":false},"campaign_booking_business_unit_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Campaign Booking Business Unit Id","description":"Org-wide ServiceTitan business unit for campaign bookings. Used when a campaign has no booking_defaults.business_unit_id, so manual campaigns can book without per-campaign setup."},"campaign_booking_job_type_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Campaign Booking Job Type Id","description":"Org-wide ServiceTitan job type for campaign bookings. Falls back the same way as campaign_booking_business_unit_id."},"campaign_booking_st_campaign_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Campaign Booking St Campaign Id","description":"Org-wide ServiceTitan campaign that booked jobs attribute to. ServiceTitan makes campaignId mandatory on job creation, so without this (or a per-campaign override) a ready-to-book customer is escalated instead."},"campaign_booking_team_ids":{"items":{"type":"integer"},"type":"array","title":"Campaign Booking Team Ids","description":"ServiceTitan dispatch team ids whose technicians count as campaign booking capacity. When set, availability is reconstructed from the real board (appointments + assignments + non-job time off for these teams' techs over business hours) instead of the capacity API, which only reflects ST's capacity-planning module and reads as permanently full for tenants that do not maintain it."},"playwright_enabled":{"type":"boolean","title":"Playwright Enabled","description":"When True, escalate_to_backoffice(resend_estimate|resend_invoice) auto-sends the document. Stage 2/3 are skipped and the SMS agent dispatches a send_job_email WorkflowRequest to Pilot over SQS (the ServiceTitan browser automation now runs in Pilot, not inline). The Pilot results worker sends the customer confirmation SMS on completion, or flips the conversation to require_action + agent disabled on failure (or if Pilot never answers within the deadline). resend_other does NOT auto-send and runs the normal CSR-escalation path. (Flag name retained for config compatibility; the mechanism is now Pilot, not inline Playwright.)","default":false},"estimate_accept_link_enabled":{"type":"boolean","title":"Estimate Accept Link Enabled","description":"When True (default), conversion_assist(accept_full_estimate) uses the self-service path — the SMS points the customer to the accept link in the estimate email. When False, the org does NOT include a self-service accept link in estimate emails; the customer's SMS YES is treated as the commitment and the path flips to office_handoff (office confirms + starts scheduling, email notification fires, conversation goes to require_action). voice_card stays accept_full_estimate; Stage 3 renders a no-link sub-card.","default":true},"dismiss_estimates_on_lost_enabled":{"type":"boolean","title":"Dismiss Estimates On Lost Enabled","description":"When True, manual lost transitions may dismiss open ServiceTitan estimates and the SMS agent does so for chose_competitor or work_completed.","default":false},"escalation_dual_notify_enabled":{"type":"boolean","title":"Escalation Dual Notify Enabled","description":"When True, every escalation notifies BOTH the office (email, normal subtype routing) and the conversation's assigned technician (push). Excludes escalate_to_technician tech_work_question/tech_said_question, which stay technician-only.","default":false},"followup_agent_v3_enabled":{"type":"boolean","title":"Followup Agent V3 Enabled","description":"When True the org is switched to the followup agent v3: inbound SMS routes to the v3 queue (event_type inbound_sms_v3) instead of the v2 SMS agent, and the nightly reengagement v2 pipeline skips this org entirely (v3's own planner owns its proactive cadence). Cutover runbook: cancel the org's pending reengagement_v2 rows when flipping this on. Rollback is flipping it back — v2 resumes on its next nightly run.","default":false},"followup_agent_v3_shadow":{"type":"boolean","title":"Followup Agent V3 Shadow","description":"When True, v2 keeps running unchanged and every inbound SMS event is ALSO mirrored to the v3 queue with shadow=true. v3 runs its full pipeline (state, brain, lint, action queue, dispatcher) but suppresses all external side effects — intended messages land in followup_agent_v3_decision_logs for the M2 parity diff. Ignored when followup_agent_v3_enabled is True.","default":false},"strict_compliance_mode":{"type":"boolean","title":"Strict Compliance Mode","description":"v3 only. When True the compliance gate appends the carrier-approved opt-out line to the first proactive message of a cold thread. Default False: the visible 'Reply STOP' instruction is the loudest bot tell and v3 threads are one-to-one conversational messages; opt-outs in ANY wording are honored at the gate layer regardless of this flag.","default":false},"estimate_rework_sla":{"type":"string","enum":["same_day","within_48h","unsupported"],"title":"Estimate Rework Sla","description":"v3 only. How fast this org's office can turn around a revised estimate (repair-only / good-better-best resize). Drives the agent's wording (same_day → 'this afternoon', within_48h → 'in the next day or two') and gates the rework play entirely when unsupported. Rework requests escalate with the dedicated estimate_rework subtype.","default":"within_48h"},"aspire_followup_enabled":{"type":"boolean","title":"Aspire Followup Enabled","description":"Master switch for the Aspire email-followup pipeline.","default":false},"aspire_outlook_native":{"type":"boolean","title":"Aspire Outlook Native","description":"Outlook-native: the orchestrator drives first-touch cards + reply drafts + tags inside the rep's own Outlook mailbox.","default":false},"aspire_outlook_review_scheduler_enabled":{"type":"boolean","title":"Aspire Outlook Review Scheduler Enabled","description":"Allow due Ongoing Aspire conversations to create Outlook review drafts.","default":false},"aspire_divisions":{"items":{"type":"string"},"type":"array","title":"Aspire Divisions","description":"Aspire DivisionNames ingested as followups."},"aspire_backfill_days":{"type":"integer","minimum":0.0,"title":"Aspire Backfill Days","description":"Go-live backfill window for currently-Delivered opps.","default":14},"aspire_first_contact_hour_local":{"type":"integer","maximum":23.0,"minimum":0.0,"title":"Aspire First Contact Hour Local","description":"Target local send hour for outbound touches.","default":10},"aspire_send_window_local":{"items":{"type":"integer"},"type":"array","title":"Aspire Send Window Local","description":"[earliest, latest] local hour; slots outside roll forward."},"aspire_reengage_stale_days":{"type":"integer","minimum":1.0,"title":"Aspire Reengage Stale Days","description":"Default review gap when an Ongoing thread goes quiet this long.","default":7},"aspire_first_touch_delay_days":{"type":"integer","minimum":0.0,"title":"Aspire First Touch Delay Days","description":"First review falls this many days after the proposal email's SentDate (or the delivered date when it was never sent).","default":3},"aspire_self_email_addresses":{"items":{"type":"string"},"type":"array","title":"Aspire Self Email Addresses","description":"Extra send-as addresses that count as the org's own senders (mailbox aliases not present in email_integrations)."},"aspire_self_email_domains":{"items":{"type":"string"},"type":"array","title":"Aspire Self Email Domains","description":"Company domains whose senders count as the org's own side (e.g. send-as alias domains); never customer mail."}},"type":"object","title":"AgentConfig"},"AppendOracleRequest":{"properties":{"content":{"additionalProperties":true,"type":"object","title":"Content"},"authored_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authored By"}},"type":"object","required":["content"],"title":"AppendOracleRequest"},"AppliedFilters":{"properties":{"tags":{"items":{"type":"string"},"type":"array","title":"Tags","default":[]},"memberships":{"items":{"type":"string"},"type":"array","title":"Memberships","default":[]},"seasons":{"items":{"type":"string"},"type":"array","title":"Seasons","default":[]}},"type":"object","title":"AppliedFilters"},"ApproveCampaignSuggestionResponse":{"properties":{"campaign_id":{"type":"string","title":"Campaign Id"},"campaign_name":{"type":"string","title":"Campaign Name"},"total_customers":{"type":"integer","title":"Total Customers"},"queued_count":{"type":"integer","title":"Queued Count"}},"type":"object","required":["campaign_id","campaign_name","total_customers","queued_count"],"title":"ApproveCampaignSuggestionResponse"},"AttachmentInput":{"properties":{"bucket":{"type":"string","title":"Bucket"},"key":{"type":"string","title":"Key"},"filename":{"type":"string","title":"Filename"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"},"inline":{"type":"boolean","title":"Inline","default":false},"content_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Id"}},"type":"object","required":["bucket","key","filename"],"title":"AttachmentInput","description":"An S3-referenced attachment to send. Only the reference travels through\nthe API; the service streams the bytes from S3."},"AudienceIntakeRequest":{"properties":{"description":{"type":"string","maxLength":1200,"minLength":10,"title":"Description"}},"type":"object","required":["description"],"title":"AudienceIntakeRequest"},"AudienceIntakeResponse":{"properties":{"allowed":{"type":"boolean","title":"Allowed"},"rejection_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rejection Message"},"objective":{"type":"string","title":"Objective","default":""},"objective_clear":{"type":"boolean","title":"Objective Clear","default":false},"clarifying_question":{"type":"string","title":"Clarifying Question","default":""},"suggested_goal_met_label":{"type":"string","title":"Suggested Goal Met Label","default":""}},"type":"object","required":["allowed"],"title":"AudienceIntakeResponse"},"AudienceSuggestion":{"properties":{"id":{"type":"string","title":"Id"},"st_customer_id":{"type":"string","title":"St Customer Id"},"customer_name":{"type":"string","title":"Customer Name"},"phones":{"items":{"type":"string"},"type":"array","title":"Phones","default":[]},"emails":{"items":{"type":"string"},"type":"array","title":"Emails","default":[]},"location_addresses":{"items":{"type":"string"},"type":"array","title":"Location Addresses","default":[]},"customer_tags":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Customer Tags","default":[]},"location_tags":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Location Tags","default":[]},"membership_type_names":{"items":{"type":"string"},"type":"array","title":"Membership Type Names","default":[]},"service_names":{"items":{"type":"string"},"type":"array","title":"Service Names","default":[]},"explanation":{"type":"string","title":"Explanation","default":""},"reasons":{"items":{"type":"string"},"type":"array","title":"Reasons","default":[]},"confidence":{"type":"number","title":"Confidence","default":0},"included":{"type":"boolean","title":"Included","default":true},"rank":{"type":"integer","title":"Rank","default":0},"recent_campaign_contacts":{"items":{"$ref":"#/components/schemas/RecentCampaignContact"},"type":"array","title":"Recent Campaign Contacts","default":[]},"active_followup_overlap":{"type":"boolean","title":"Active Followup Overlap","default":false},"active_followup_count":{"type":"integer","title":"Active Followup Count","default":0},"active_followup_statuses":{"items":{"type":"string"},"type":"array","title":"Active Followup Statuses","default":[]}},"type":"object","required":["id","st_customer_id","customer_name"],"title":"AudienceSuggestion"},"AuthorityMatrix":{"properties":{"labor_warranty":{"$ref":"#/components/schemas/LaborWarrantyAuthority"},"make_it_right":{"$ref":"#/components/schemas/MakeItRightAuthority"},"price_hold":{"$ref":"#/components/schemas/PriceHoldAuthority"},"price_match_guarantee":{"$ref":"#/components/schemas/PriceMatchGuaranteeAuthority"},"priority_scheduling":{"$ref":"#/components/schemas/PrioritySchedulingAuthority"},"financing":{"$ref":"#/components/schemas/FinancingAuthority"},"discount_authority":{"$ref":"#/components/schemas/DiscountAuthority"},"rebates":{"items":{"$ref":"#/components/schemas/RebateAuthority"},"type":"array","title":"Rebates"}},"type":"object","title":"AuthorityMatrix","description":"Org-level promise whitelist (onboarding questionnaire answers).\n\nThe one home for a claim the agent may BIND the company to, so every entry is a\nclosed-vocabulary flag a linter can check — prose belongs in a markdown pack, and\nplan figures in organization_membership_plans. Empty/default = ZERO binding promises.\nConsumed by the followup agent v3 output lint and generator, and by the SMS agent\n(price_match_guarantee gates its objection-handling play)."},"AvailablePhoneResponse":{"properties":{"phone":{"type":"string","title":"Phone","description":"Phone number (10 digits, normalized)"},"label":{"type":"string","title":"Label","description":"Display label: 'Primary' or 'Alternate'"},"is_primary":{"type":"boolean","title":"Is Primary","description":"Whether this is the primary phone number"}},"type":"object","required":["phone","label","is_primary"],"title":"AvailablePhoneResponse","description":"Response model for available phone numbers in a conversation."},"AvailableTradeItem":{"properties":{"trade":{"type":"string","title":"Trade"},"categories":{"items":{"type":"string"},"type":"array","title":"Categories"}},"type":"object","required":["trade","categories"],"title":"AvailableTradeItem","description":"A trade option for the filter dropdown."},"AvailableTradesResponse":{"properties":{"trades":{"items":{"$ref":"#/components/schemas/AvailableTradeItem"},"type":"array","title":"Trades"}},"type":"object","required":["trades"],"title":"AvailableTradesResponse","description":"Response model for available trades filter list."},"BatchSaveCaseRequest":{"properties":{"labels":{"anyOf":[{"$ref":"#/components/schemas/UpdateLabelsRequest"},{"type":"null"}]},"status":{"anyOf":[{"type":"string","enum":["draft","ready","needs_review","archived"]},{"type":"null"}],"title":"Status"},"expected_outputs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Expected Outputs"},"eval_dataset_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Eval Dataset Id"},"oracle":{"anyOf":[{"$ref":"#/components/schemas/AppendOracleRequest"},{"type":"null"}]}},"type":"object","title":"BatchSaveCaseRequest","description":"Single request to save all labeling changes for an eval case."},"BidConfig":{"properties":{"enabled":{"type":"boolean","title":"Enabled","description":"Enables the bid operator workflow: the Bids tab on the Operator page (runs, recordings, and exceptions endpoints) for takeoff_to_aspire_opportunities runs (Takeoff Monkey sheet -> Aspire estimate fill).","default":false},"prod_only":{"type":"boolean","title":"Prod Only","description":"When True, the Bids tab shows only production runs (business_workflow_version like 'prod%'), hiding dev/local/test runs. Default False so pilot/dev runs surface during launch.","default":false},"auto_enqueue":{"type":"boolean","title":"Auto Enqueue","description":"Per-org gate for Pilot's takeoff email-intake poller. When False (default), forwards to operator@noso.so are ignored for this org. Flip to True to let forwarded takeoff sheets dispatch runs. Operational toggle, not a workflow-enablement flag.","default":false},"intake_sender_domains":{"items":{"type":"string"},"type":"array","title":"Intake Sender Domains","description":"Sender domains whose forwards to operator@noso.so route to this org (e.g. ['obersons.com', 'vlgllc.com']). Empty disables intake routing."}},"type":"object","title":"BidConfig","description":"Per-org configuration for the takeoff-to-Aspire bid-automation workflow."},"Body_accept_shadow_event_campaigns_shadow_events__event_id__accept_post":{"properties":{"edited_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Edited Message"}},"type":"object","title":"Body_accept_shadow_event_campaigns_shadow_events__event_id__accept_post"},"Body_acknowledge_celebrations_sales_celebrations_acknowledge_post":{"properties":{"won_lead_ids":{"items":{"type":"string"},"type":"array","title":"Won Lead Ids","description":"List of won lead IDs to mark as celebrated"}},"type":"object","required":["won_lead_ids"],"title":"Body_acknowledge_celebrations_sales_celebrations_acknowledge_post"},"Body_associate_recording_with_task_tools_recordings__recording_id__associate_task_post":{"properties":{"task_id":{"type":"string","minLength":1,"title":"Task Id"}},"type":"object","required":["task_id"],"title":"Body_associate_recording_with_task_tools_recordings__recording_id__associate_task_post"},"Body_clear_user_chat_history_ai_chat_history_delete":{"properties":{"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"session_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Uuid"}},"type":"object","title":"Body_clear_user_chat_history_ai_chat_history_delete"},"Body_handle_ai_chat_ai_chat_post":{"properties":{"query":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Query"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"session_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Uuid"},"image_files":{"anyOf":[{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array"},{"type":"null"}],"title":"Image Files"}},"type":"object","title":"Body_handle_ai_chat_ai_chat_post"},"Body_handle_inbound_sms_twilio_webhook_sms_post":{"properties":{"MessageSid":{"type":"string","title":"Messagesid"},"From":{"type":"string","title":"From"},"To":{"type":"string","title":"To"},"Body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body","default":""},"NumMedia":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nummedia","default":"0"}},"type":"object","required":["MessageSid","From","To"],"title":"Body_handle_inbound_sms_twilio_webhook_sms_post"},"Body_handle_message_status_callback_twilio_webhook_message_status_post":{"properties":{"MessageSid":{"type":"string","title":"Messagesid"},"MessageStatus":{"type":"string","title":"Messagestatus"},"To":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To"},"From":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From"},"ErrorCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Errorcode"},"ErrorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Errormessage"},"AccountSid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountsid"}},"type":"object","required":["MessageSid","MessageStatus"],"title":"Body_handle_message_status_callback_twilio_webhook_message_status_post"},"Body_handle_service_titan_job_alert_sms_market_leads_service_titan_job_alerts_twilio_post":{"properties":{"MessageSid":{"type":"string","title":"Messagesid"},"From":{"type":"string","title":"From"},"To":{"type":"string","title":"To"},"Body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body","default":""},"AccountSid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountsid"}},"type":"object","required":["MessageSid","From","To"],"title":"Body_handle_service_titan_job_alert_sms_market_leads_service_titan_job_alerts_twilio_post"},"Body_handle_transcription_ai_transcribe_post":{"properties":{"audio_file":{"type":"string","contentMediaType":"application/octet-stream","title":"Audio File","description":"Audio file to transcribe (e.g., mp3, wav, m4a)."}},"type":"object","required":["audio_file"],"title":"Body_handle_transcription_ai_transcribe_post"},"Body_reschedule_manager_followup_manager_conversations__conversation_id__reschedule_post":{"properties":{"scheduled_date":{"type":"string","title":"Scheduled Date","description":"Date to schedule followup until (YYYY-MM-DD format, must be future date)"}},"type":"object","required":["scheduled_date"],"title":"Body_reschedule_manager_followup_manager_conversations__conversation_id__reschedule_post"},"Body_reset_conversation_demo_reset_conversation_post":{"properties":{"conversation_id":{"type":"string","title":"Conversation Id"}},"type":"object","required":["conversation_id"],"title":"Body_reset_conversation_demo_reset_conversation_post"},"Body_save_permit_packet_edit_permit_runs__run_id__packet_edit_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"annotations":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Annotations"}},"type":"object","required":["file"],"title":"Body_save_permit_packet_edit_permit_runs__run_id__packet_edit_post"},"Body_scan_tag_endpoint_tools_scantag_post":{"properties":{"image":{"type":"string","contentMediaType":"application/octet-stream","title":"Image"}},"type":"object","required":["image"],"title":"Body_scan_tag_endpoint_tools_scantag_post"},"Body_schedule_followup_followups__conversation_id__schedule_post":{"properties":{"scheduled_date":{"type":"string","title":"Scheduled Date","description":"Date to schedule followup until (YYYY-MM-DD format, must be future date)"}},"type":"object","required":["scheduled_date"],"title":"Body_schedule_followup_followups__conversation_id__schedule_post"},"Body_send_employee_welcome_sms_manager_employees__employee_id__send_sms_post":{"properties":{"body":{"type":"string","title":"Body"}},"type":"object","required":["body"],"title":"Body_send_employee_welcome_sms_manager_employees__employee_id__send_sms_post"},"Body_swap_phone_demo_swap_phone_post":{"properties":{"conversation_id":{"type":"string","title":"Conversation Id"},"real_phone":{"type":"string","title":"Real Phone"}},"type":"object","required":["conversation_id","real_phone"],"title":"Body_swap_phone_demo_swap_phone_post"},"Body_upload_client_lifecycle_email_attachment_clients__client_id__lifecycle_email_attachment_post":{"properties":{"kind":{"type":"string","enum":["kickoff","golive"],"title":"Kind"},"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["kind","file"],"title":"Body_upload_client_lifecycle_email_attachment_clients__client_id__lifecycle_email_attachment_post"},"BookableEvent":{"properties":{"item_id":{"type":"string","title":"Item Id"},"st_event_id":{"type":"string","title":"St Event Id"},"event_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Name"},"event_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Date"},"recurring_service_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recurring Service Name"},"status":{"type":"string","title":"Status"},"booked_job_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Booked Job Id"}},"type":"object","required":["item_id","st_event_id","status"],"title":"BookableEvent"},"BookableItemsResponse":{"properties":{"customer_id":{"type":"string","title":"Customer Id"},"memberships":{"items":{"$ref":"#/components/schemas/BookableMembership"},"type":"array","title":"Memberships"}},"type":"object","required":["customer_id","memberships"],"title":"BookableItemsResponse"},"BookableMembership":{"properties":{"st_membership_id":{"type":"string","title":"St Membership Id"},"membership_type_name":{"type":"string","title":"Membership Type Name"},"st_location_id":{"type":"string","title":"St Location Id"},"location_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location Address"},"st_customer_id":{"type":"string","title":"St Customer Id"},"events":{"items":{"$ref":"#/components/schemas/BookableEvent"},"type":"array","title":"Events"}},"type":"object","required":["st_membership_id","membership_type_name","st_location_id","st_customer_id","events"],"title":"BookableMembership"},"Brand":{"properties":{"name_id":{"type":"string","title":"Name Id","example":"carrier"},"name":{"type":"string","title":"Name","example":"Carrier"},"bucket":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bucket","example":"noso-training-data"},"logo_bucket_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Bucket Path","example":"havc/brands/carrier/logo.png"},"series_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Series Count","example":10},"id":{"type":"string","format":"uuid","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"series":{"items":{"$ref":"#/components/schemas/Series"},"type":"array","title":"Series"},"logo_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Logo Url","description":"Full URL to the logo, constructed by backend"}},"type":"object","required":["name_id","name","id","created_at"],"title":"Brand"},"BridgeCallRequest":{"properties":{"conversation_id":{"type":"string","title":"Conversation Id","description":"Conversation ID (required)"},"target_phone":{"type":"string","title":"Target Phone","description":"Customer phone number to call"}},"type":"object","required":["conversation_id","target_phone"],"title":"BridgeCallRequest","description":"Request model for initiating bridge call."},"BridgeCallResponse":{"properties":{"call_sid":{"type":"string","title":"Call Sid"},"status":{"type":"string","title":"Status"},"manager_phone":{"type":"string","title":"Manager Phone"},"customer_phone":{"type":"string","title":"Customer Phone"}},"type":"object","required":["call_sid","status","manager_phone","customer_phone"],"title":"BridgeCallResponse","description":"Response model for bridge call initiation."},"BulkAddRequest":{"properties":{"technicians":{"items":{"$ref":"#/components/schemas/AddEmployeeRequest"},"type":"array","title":"Technicians"}},"type":"object","required":["technicians"],"title":"BulkAddRequest"},"BulkOperationInitiateResponse":{"properties":{"operation_id":{"type":"string","title":"Operation Id"},"operation_type":{"type":"string","title":"Operation Type"},"message":{"type":"string","title":"Message"},"status":{"type":"string","title":"Status"},"total_count":{"type":"integer","title":"Total Count"},"poll_url":{"type":"string","title":"Poll Url"}},"type":"object","required":["operation_id","operation_type","message","status","total_count","poll_url"],"title":"BulkOperationInitiateResponse"},"BulkOperationStatusResponse":{"properties":{"operation_id":{"type":"string","title":"Operation Id"},"operation_type":{"type":"string","title":"Operation Type"},"status":{"type":"string","title":"Status"},"total_count":{"type":"integer","title":"Total Count"},"processed_count":{"type":"integer","title":"Processed Count"},"succeeded_count":{"type":"integer","title":"Succeeded Count"},"failed_count":{"type":"integer","title":"Failed Count"},"succeeded":{"items":{},"type":"array","title":"Succeeded"},"failed":{"items":{},"type":"array","title":"Failed"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"created_at":{"type":"string","title":"Created At"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"}},"type":"object","required":["operation_id","operation_type","status","total_count","processed_count","succeeded_count","failed_count","succeeded","failed","created_at"],"title":"BulkOperationStatusResponse"},"BulkRemoveRequest":{"properties":{"employee_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Employee Ids"}},"type":"object","required":["employee_ids"],"title":"BulkRemoveRequest"},"BulkUpdateAudienceSuggestionsRequest":{"properties":{"suggestion_ids":{"items":{"type":"string"},"type":"array","title":"Suggestion Ids"},"included":{"type":"boolean","title":"Included"}},"type":"object","required":["suggestion_ids","included"],"title":"BulkUpdateAudienceSuggestionsRequest"},"BulkWelcomeSmsRequest":{"properties":{"employee_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Employee Ids"},"body":{"type":"string","minLength":1,"title":"Body"}},"type":"object","required":["employee_ids","body"],"title":"BulkWelcomeSmsRequest","description":"body supports {{first_name}} and {{phone}} placeholders, rendered per recipient."},"BusinessHoursConfig":{"properties":{"after_hours_redirect_enabled":{"type":"boolean","title":"After Hours Redirect Enabled","description":"When True, inbound calls to tech Twilio numbers outside business hours are redirected to the office line.","default":false},"redirect_phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect Phone Number","description":"E.164 office line that after-hours inbound calls are forwarded to."},"weekday":{"anyOf":[{"$ref":"#/components/schemas/DayHoursConfig"},{"type":"null"}],"description":"Mon-Fri business hours window. None means closed all day."},"weekend":{"anyOf":[{"$ref":"#/components/schemas/DayHoursConfig"},{"type":"null"}],"description":"Sat-Sun business hours window. None means closed all day."}},"type":"object","title":"BusinessHoursConfig","description":"Per-org business hours and after-hours inbound-call redirect settings."},"CallRoutingUserConfig":{"properties":{"office_forward_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Office Forward Number","description":"Inbound calls to this user's Twilio number ring here instead of their personal phone. Call routing ONLY: SMS forwarding, pushes, escalations and missed-call handling all stay normal, which is what separates this from office_route_enabled. Wins over office_route_enabled, campaign and after-hours redirects. Unparseable falls back to the personal number. None = ring the technician."}},"type":"object","title":"CallRoutingUserConfig","description":"Per-user inbound call routing overrides."},"CampaignAudienceBuild":{"properties":{"id":{"type":"string","title":"Id"},"status":{"type":"string","title":"Status"},"progress":{"type":"integer","title":"Progress","default":0},"step":{"type":"string","title":"Step","default":""},"activity":{"items":{"type":"string"},"type":"array","title":"Activity","default":[]},"description":{"type":"string","title":"Description"},"interpreted_plan":{"additionalProperties":true,"type":"object","title":"Interpreted Plan","default":{}},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"candidate_count":{"type":"integer","title":"Candidate Count","default":0},"suggested_count":{"type":"integer","title":"Suggested Count","default":0},"selected_count":{"type":"integer","title":"Selected Count","default":0},"audience_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Audience Limit"},"suggestions":{"items":{"$ref":"#/components/schemas/AudienceSuggestion"},"type":"array","title":"Suggestions","default":[]},"created_at":{"type":"string","title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","status","description","created_at"],"title":"CampaignAudienceBuild"},"CampaignAutomationRate":{"properties":{"ai_outbound":{"type":"integer","title":"Ai Outbound","default":0},"human_outbound":{"type":"integer","title":"Human Outbound","default":0},"total_outbound":{"type":"integer","title":"Total Outbound","default":0},"automation_rate":{"type":"number","title":"Automation Rate","default":0.0}},"type":"object","title":"CampaignAutomationRate","description":"AI-sent vs human-sent outbound on one campaign's conversations."},"CampaignBookJobRequest":{"properties":{"item_id":{"type":"string","title":"Item Id"},"business_unit_id":{"type":"integer","title":"Business Unit Id"},"job_type_id":{"type":"integer","title":"Job Type Id"},"st_campaign_id":{"type":"integer","title":"St Campaign Id"},"appointment_start":{"type":"string","title":"Appointment Start"},"appointment_end":{"type":"string","title":"Appointment End"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"tag_type_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Tag Type Ids"}},"type":"object","required":["item_id","business_unit_id","job_type_id","st_campaign_id","appointment_start","appointment_end"],"title":"CampaignBookJobRequest"},"CampaignBookJobResponse":{"properties":{"job_id":{"type":"integer","title":"Job Id"},"item_id":{"type":"string","title":"Item Id"},"customer_status":{"type":"string","title":"Customer Status"},"message":{"type":"string","title":"Message"}},"type":"object","required":["job_id","item_id","customer_status","message"],"title":"CampaignBookJobResponse"},"CampaignBucketConversation":{"properties":{"id":{"type":"string","title":"Id"},"campaign_id":{"type":"string","title":"Campaign Id"},"campaign_name":{"type":"string","title":"Campaign Name","default":"Campaign"},"customer_name":{"type":"string","title":"Customer Name","default":""},"phone":{"type":"string","title":"Phone","default":""},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id"},"last_message_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Message At"},"message_count":{"type":"integer","title":"Message Count","default":0},"st_customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"St Customer Id"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"status":{"type":"string","title":"Status","default":""},"goal_met_label":{"type":"string","title":"Goal Met Label","default":"Goal Met"},"last_message_body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Message Body"},"last_message_direction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Message Direction"},"unread_count":{"type":"integer","title":"Unread Count","default":0}},"type":"object","required":["id","campaign_id"],"title":"CampaignBucketConversation","description":"A campaign conversation as it appears in the shared buckets (D8)."},"CampaignBucketCounts":{"properties":{"require_action":{"type":"integer","title":"Require Action","default":0},"ongoing":{"type":"integer","title":"Ongoing","default":0},"won":{"type":"integer","title":"Won","default":0},"lost":{"type":"integer","title":"Lost","default":0}},"type":"object","title":"CampaignBucketCounts"},"CampaignCancelBookingRequest":{"properties":{"item_id":{"type":"string","title":"Item Id"},"reason_id":{"type":"integer","title":"Reason Id"},"memo":{"type":"string","title":"Memo","default":""}},"type":"object","required":["item_id","reason_id"],"title":"CampaignCancelBookingRequest"},"CampaignCancelBookingResponse":{"properties":{"item_id":{"type":"string","title":"Item Id"},"customer_status":{"type":"string","title":"Customer Status"},"message":{"type":"string","title":"Message"}},"type":"object","required":["item_id","customer_status","message"],"title":"CampaignCancelBookingResponse"},"CampaignConversationResponse":{"properties":{"customer_id":{"type":"string","title":"Customer Id"},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id"},"messages":{"items":{"$ref":"#/components/schemas/CampaignMessage"},"type":"array","title":"Messages"}},"type":"object","required":["customer_id","messages"],"title":"CampaignConversationResponse"},"CampaignCustomer":{"properties":{"st_customer_id":{"type":"string","title":"St Customer Id"},"customer_name":{"type":"string","title":"Customer Name"},"phones":{"items":{"type":"string"},"type":"array","title":"Phones"},"emails":{"items":{"type":"string"},"type":"array","title":"Emails"},"location_addresses":{"items":{"type":"string"},"type":"array","title":"Location Addresses"},"tags":{"items":{"$ref":"#/components/schemas/CampaignTag"},"type":"array","title":"Tags"},"membership_type_names":{"items":{"type":"string"},"type":"array","title":"Membership Type Names"},"event_count":{"type":"integer","title":"Event Count"}},"type":"object","required":["st_customer_id","customer_name","phones","emails","location_addresses","tags","membership_type_names","event_count"],"title":"CampaignCustomer"},"CampaignCustomersResponse":{"properties":{"campaign_id":{"type":"string","title":"Campaign Id"},"campaign_name":{"type":"string","title":"Campaign Name"},"customers":{"items":{"$ref":"#/components/schemas/CampaignCustomer"},"type":"array","title":"Customers"},"total_customers":{"type":"integer","title":"Total Customers"}},"type":"object","required":["campaign_id","campaign_name","customers","total_customers"],"title":"CampaignCustomersResponse"},"CampaignDashboardResponse":{"properties":{"campaign_id":{"type":"string","title":"Campaign Id"},"campaign_topic":{"type":"string","title":"Campaign Topic","default":"custom"},"goal_met_label":{"type":"string","title":"Goal Met Label","default":"Goal Met"},"goal_met_outcome":{"type":"string","title":"Goal Met Outcome","default":"goal_met"},"reasoning":{"anyOf":[{"$ref":"#/components/schemas/CampaignReasoning"},{"type":"null"}]},"kind":{"type":"string","title":"Kind","default":"custom"},"play_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Play Key"},"total_customers":{"type":"integer","title":"Total Customers"},"pending_count":{"type":"integer","title":"Pending Count"},"batches":{"items":{"$ref":"#/components/schemas/DashboardBatch"},"type":"array","title":"Batches"},"customers":{"items":{"$ref":"#/components/schemas/DashboardCustomer"},"type":"array","title":"Customers"},"activity_trend":{"items":{"$ref":"#/components/schemas/DashboardActivityTrendPoint"},"type":"array","title":"Activity Trend","default":[]},"is_simulation":{"type":"boolean","title":"Is Simulation","default":false},"max_rounds":{"type":"integer","title":"Max Rounds","default":3},"campaign_name":{"type":"string","title":"Campaign Name","default":""},"campaign_status":{"type":"string","title":"Campaign Status","default":""},"owner_name":{"type":"string","title":"Owner Name","default":""},"created_at":{"type":"string","title":"Created At","default":""}},"type":"object","required":["campaign_id","total_customers","pending_count","batches","customers"],"title":"CampaignDashboardResponse"},"CampaignEngineEvent":{"properties":{"id":{"type":"string","title":"Id"},"campaign_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign Id"},"campaign_customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign Customer Id"},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id"},"source":{"type":"string","title":"Source"},"event_type":{"type":"string","title":"Event Type"},"summary":{"type":"string","title":"Summary"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","source","event_type","summary","created_at"],"title":"CampaignEngineEvent","description":"One Campaign Engine log line. summary renders verbatim (§4.7)."},"CampaignMessage":{"properties":{"id":{"type":"string","title":"Id"},"type":{"type":"string","title":"Type","default":"message"},"direction":{"type":"string","title":"Direction","default":"system"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"},"created_at":{"type":"string","title":"Created At"},"sender_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Name"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"send_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Send Source"},"ai_reasoning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Reasoning"},"call_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call Status"},"call_duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Call Duration Seconds"},"recording_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recording Url"},"transcription_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transcription Text"},"transcription_formatted_content":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Transcription Formatted Content"},"st_job_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"St Job Id"},"job_type_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Type Name"},"job_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Status"},"booking_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Booking Source"},"event_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Type"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["id","created_at"],"title":"CampaignMessage"},"CampaignOfficeEscalation":{"properties":{"id":{"type":"string","title":"Id"},"campaign_id":{"type":"string","title":"Campaign Id"},"campaign_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign Name"},"campaign_goal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign Goal"},"campaign_topic":{"type":"string","title":"Campaign Topic","default":"custom"},"goal_met_label":{"type":"string","title":"Goal Met Label","default":"Goal Met"},"goal_met_outcome":{"type":"string","title":"Goal Met Outcome","default":"goal_met"},"agent_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Instructions"},"audience_request":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audience Request"},"campaign_customer_id":{"type":"string","title":"Campaign Customer Id"},"customer_name":{"type":"string","title":"Customer Name","default":""},"customer_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Phone"},"st_customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"St Customer Id"},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id"},"batch_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Batch Number"},"priority_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Priority Score"},"message_count":{"type":"integer","title":"Message Count","default":0},"last_message_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Message At"},"customer_tags":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Customer Tags","default":[]},"first_message_body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Message Body"},"first_message_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Message Status"},"first_message_facts":{"additionalProperties":true,"type":"object","title":"First Message Facts","default":{}},"customer_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Notes"},"customer_profile":{"additionalProperties":true,"type":"object","title":"Customer Profile","default":{}},"customer_analytics":{"additionalProperties":true,"type":"object","title":"Customer Analytics","default":{}},"recent_jobs":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Recent Jobs","default":[]},"escalation_type":{"type":"string","title":"Escalation Type"},"summary":{"type":"string","title":"Summary","default":""},"reason":{"type":"string","title":"Reason","default":""},"latest_customer_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latest Customer Message"},"suggested_action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suggested Action"},"source":{"type":"string","title":"Source","default":"campaign_responder"},"status":{"type":"string","title":"Status"},"notification_status":{"type":"string","title":"Notification Status","default":"pending"},"notified_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notified At"},"notification_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notification Error"},"created_at":{"type":"string","title":"Created At"},"resolved_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolved At"},"resolution_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolution Note"}},"type":"object","required":["id","campaign_id","campaign_customer_id","escalation_type","status","created_at"],"title":"CampaignOfficeEscalation"},"CampaignPlaySeasonSummary":{"properties":{"launched":{"type":"integer","title":"Launched","default":0},"sent":{"type":"integer","title":"Sent","default":0},"goal_met":{"type":"integer","title":"Goal Met","default":0}},"type":"object","title":"CampaignPlaySeasonSummary"},"CampaignPlayStatus":{"properties":{"play_key":{"type":"string","title":"Play Key"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description","default":""},"trigger_line":{"type":"string","title":"Trigger Line","default":""},"audience_rule":{"type":"string","title":"Audience Rule","default":""},"goal":{"type":"string","title":"Goal","default":""},"state":{"type":"string","title":"State","default":"running"},"next_evaluation_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Evaluation At"},"launched":{"anyOf":[{"$ref":"#/components/schemas/LaunchedCampaignRef"},{"type":"null"}]},"season_summary":{"anyOf":[{"$ref":"#/components/schemas/CampaignPlaySeasonSummary"},{"type":"null"}]}},"type":"object","required":["play_key","name"],"title":"CampaignPlayStatus","description":"One automated play's state for the campaigns dashboard (§4 API table)."},"CampaignReasoning":{"properties":{"launch":{"anyOf":[{"$ref":"#/components/schemas/CampaignReasoningNote"},{"type":"null"}]},"audience":{"anyOf":[{"$ref":"#/components/schemas/CampaignReasoningNote"},{"type":"null"}]}},"type":"object","title":"CampaignReasoning","description":"The two prose artifacts stored at launch (D6) — why now, and who."},"CampaignReasoningNote":{"properties":{"headline":{"type":"string","title":"Headline","default":""},"narrative":{"type":"string","title":"Narrative","default":""}},"type":"object","title":"CampaignReasoningNote"},"CampaignSendEmailRequest":{"properties":{"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"},"context_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context Note"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"message_body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message Body"},"recipient_emails":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Recipient Emails"}},"type":"object","title":"CampaignSendEmailRequest"},"CampaignSendEmailResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message Id"},"recipients":{"items":{"type":"string"},"type":"array","title":"Recipients"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success","recipients"],"title":"CampaignSendEmailResponse"},"CampaignSuggestion":{"properties":{"id":{"type":"string","title":"Id"},"suggestion_key":{"type":"string","title":"Suggestion Key"},"name":{"type":"string","title":"Name"},"blurb":{"type":"string","title":"Blurb","default":""},"category":{"type":"string","title":"Category","default":"evergreen"},"timing_line":{"type":"string","title":"Timing Line","default":""},"send_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Send By"},"why":{"type":"string","title":"Why","default":""},"audience_rule":{"type":"string","title":"Audience Rule","default":""},"criteria":{"items":{"type":"string"},"type":"array","title":"Criteria","default":[]},"message_preview":{"type":"string","title":"Message Preview","default":""},"delivery_note":{"type":"string","title":"Delivery Note","default":""},"projected_audience":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Projected Audience"},"projected_booked":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Projected Booked"},"projected_booked_note":{"type":"string","title":"Projected Booked Note","default":""},"projected_revenue":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Projected Revenue"},"projected_revenue_note":{"type":"string","title":"Projected Revenue Note","default":""},"audience_build_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audience Build Id"},"status":{"type":"string","title":"Status","default":"pending"},"launched_campaign_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Launched Campaign Id"},"rank":{"type":"integer","title":"Rank","default":0},"audience_count":{"type":"integer","title":"Audience Count","default":0}},"type":"object","required":["id","suggestion_key","name"],"title":"CampaignSuggestion","description":"A recommended-but-unlaunched campaign: the pitch, and what it would launch."},"CampaignSummary":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"status":{"type":"string","title":"Status"},"campaign_topic":{"type":"string","title":"Campaign Topic","default":"custom"},"goal_met_label":{"type":"string","title":"Goal Met Label","default":"Goal Met"},"goal_met_outcome":{"type":"string","title":"Goal Met Outcome","default":"goal_met"},"first_message_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Message Template"},"applied_filters":{"$ref":"#/components/schemas/AppliedFilters","default":{"tags":[],"memberships":[],"seasons":[]}},"unique_customers":{"type":"integer","title":"Unique Customers"},"unique_locations":{"type":"integer","title":"Unique Locations"},"total_events":{"type":"integer","title":"Total Events"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"owner_name":{"type":"string","title":"Owner Name","default":""},"total_sent":{"type":"integer","title":"Total Sent","default":0},"total_replied":{"type":"integer","title":"Total Replied","default":0},"total_goal_met":{"type":"integer","title":"Total Goal Met","default":0},"total_refused":{"type":"integer","title":"Total Refused","default":0},"total_no_response":{"type":"integer","title":"Total No Response","default":0},"action_required_count":{"type":"integer","title":"Action Required Count","default":0},"pending_count":{"type":"integer","title":"Pending Count","default":0},"batch_count":{"type":"integer","title":"Batch Count","default":0},"max_rounds":{"type":"integer","title":"Max Rounds","default":3},"progress":{"type":"integer","title":"Progress","default":0}},"type":"object","required":["id","name","status","unique_customers","unique_locations","total_events","created_at"],"title":"CampaignSummary"},"CampaignTag":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"CampaignTag"},"CampaignsListResponse":{"properties":{"campaigns":{"items":{"$ref":"#/components/schemas/CampaignSummary"},"type":"array","title":"Campaigns"}},"type":"object","required":["campaigns"],"title":"CampaignsListResponse"},"CatalogIngestRequest":{"properties":{"catalog_xlsx_s3_key":{"type":"string","title":"Catalog Xlsx S3 Key"},"branch_prefix":{"type":"string","title":"Branch Prefix","default":"O-"},"replace":{"type":"boolean","title":"Replace","default":false},"dry_run":{"type":"boolean","title":"Dry Run","default":false}},"type":"object","required":["catalog_xlsx_s3_key"],"title":"CatalogIngestRequest","description":"Body for dispatching an aspire_catalog_ingest run from the uploaded export."},"CatalogUploadUrlRequest":{"properties":{"filename":{"type":"string","title":"Filename"}},"type":"object","required":["filename"],"title":"CatalogUploadUrlRequest","description":"Body for minting a presigned upload URL for an Aspire catalog export."},"CategoryCountsResponse":{"properties":{"require_action":{"type":"integer","title":"Require Action"},"ongoing":{"type":"integer","title":"Ongoing"},"won":{"type":"integer","title":"Won","default":0}},"type":"object","required":["require_action","ongoing"],"title":"CategoryCountsResponse","description":"Response model for conversation category counts."},"ChatMessageRead":{"properties":{"session_id":{"type":"string","title":"Session Id","description":"Legacy identifier for the chat session (string format)."},"session_uuid":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Session Uuid","description":"New UUID identifier for the chat session."},"role":{"$ref":"#/components/schemas/ChatRole","description":"Role of the message sender."},"content":{"type":"string","title":"Content","description":"Content of the message. For user messages with images, this might be an empty string if no text query is provided."},"image_storage_paths":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Image Storage Paths","description":"List of Supabase Storage paths for images associated with the message."},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"Optional Clerk ID of the user associated with the message."},"tool_calls":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Tool Calls","description":"List of tool calls made by the assistant (id, type, function name, arguments)."},"tool_call_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Call Id","description":"ID of the tool call this message is a result for (links to assistant's tool_calls.id)."},"function_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Function Name","description":"Name of the function that was called (for role='tool'). Matches OpenAI 'name' field for tool role."},"id":{"type":"string","format":"uuid","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["session_id","role","content","id","created_at"],"title":"ChatMessageRead"},"ChatRole":{"type":"string","enum":["user","assistant","tool"],"title":"ChatRole"},"CheckinDeckGenerateRequest":{"properties":{"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Id"},"template":{"type":"string","const":"pilot_conversion","title":"Template","default":"pilot_conversion"},"end_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Date"},"feedback":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Feedback"},"parent_deck_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Deck Id"}},"type":"object","title":"CheckinDeckGenerateRequest"},"ChecklistResponse":{"properties":{"status":{"$ref":"#/components/schemas/ChecklistStatus"},"checklist_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checklist Content"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"has_new_transcripts":{"type":"boolean","title":"Has New Transcripts","default":false}},"type":"object","required":["status"],"title":"ChecklistResponse"},"ChecklistStatus":{"type":"string","enum":["pending","processing","success","error","empty_audio"],"title":"ChecklistStatus"},"CheckoutSessionResponse":{"properties":{"checkout_url":{"type":"string","title":"Checkout Url"},"session_id":{"type":"string","title":"Session Id"}},"type":"object","required":["checkout_url","session_id"],"title":"CheckoutSessionResponse"},"ClientCreate":{"properties":{"company_name":{"type":"string","minLength":1,"title":"Company Name"},"primary_contact_name":{"type":"string","minLength":1,"title":"Primary Contact Name"},"primary_contact_email":{"type":"string","format":"email","title":"Primary Contact Email"},"cc_emails":{"items":{"type":"string","format":"email"},"type":"array","title":"Cc Emails"},"crm":{"type":"string","pattern":"^(service_titan|housecall_pro)$","title":"Crm","default":"service_titan"},"ein":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ein"},"expected_golive_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expected Golive Date"}},"type":"object","required":["company_name","primary_contact_name","primary_contact_email"],"title":"ClientCreate"},"ClientLinkedOrganization":{"properties":{"organization_id":{"type":"string","title":"Organization Id"},"organization_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Name"},"crm":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Crm"}},"type":"object","required":["organization_id"],"title":"ClientLinkedOrganization"},"ClientListResponse":{"properties":{"clients":{"items":{"$ref":"#/components/schemas/ClientResponse"},"type":"array","title":"Clients"},"total_count":{"type":"integer","title":"Total Count"}},"type":"object","required":["clients","total_count"],"title":"ClientListResponse"},"ClientNoteCreate":{"properties":{"content":{"type":"string","maxLength":4000,"minLength":1,"title":"Content"},"author_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author Name"}},"type":"object","required":["content"],"title":"ClientNoteCreate"},"ClientNoteEntry":{"properties":{"id":{"type":"string","title":"Id"},"kind":{"type":"string","title":"Kind","default":"note"},"content":{"type":"string","title":"Content"},"author_name":{"type":"string","title":"Author Name","default":""},"pinned":{"type":"boolean","title":"Pinned","default":false},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","content"],"title":"ClientNoteEntry"},"ClientNotePinRequest":{"properties":{"pinned":{"type":"boolean","title":"Pinned"}},"type":"object","required":["pinned"],"title":"ClientNotePinRequest"},"ClientOnboardingDetailsRequest":{"properties":{"ein":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ein"},"st_tenant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"St Tenant Id"}},"type":"object","title":"ClientOnboardingDetailsRequest","description":"Signing-page details; either field may be sent alone so a valid one still saves."},"ClientOrgLinkRequest":{"properties":{"organization_id":{"type":"string","minLength":1,"title":"Organization Id"}},"type":"object","required":["organization_id"],"title":"ClientOrgLinkRequest"},"ClientPipelineResponse":{"properties":{"client_id":{"type":"string","format":"uuid","title":"Client Id"},"primary_contract_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Primary Contract Id"},"steps":{"items":{"$ref":"#/components/schemas/PipelineStep"},"type":"array","title":"Steps"}},"type":"object","required":["client_id","steps"],"title":"ClientPipelineResponse"},"ClientResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"company_name":{"type":"string","title":"Company Name"},"primary_contact_name":{"type":"string","title":"Primary Contact Name","default":""},"primary_contact_email":{"type":"string","title":"Primary Contact Email","default":""},"cc_emails":{"items":{"type":"string"},"type":"array","title":"Cc Emails"},"crm":{"type":"string","title":"Crm","default":"service_titan"},"ein":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ein"},"st_tenant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"St Tenant Id"},"stage":{"type":"string","title":"Stage","default":"negotiation"},"real_start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Real Start Date"},"pilot_end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Pilot End Date"},"expected_golive_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expected Golive Date"},"stripe_customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Customer Id"},"current_stripe_subscription_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Stripe Subscription Id"},"subscription_terms":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription Terms"},"price_override_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Price Override Cents"},"lifecycle_emails":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Lifecycle Emails"},"notes_log":{"items":{"$ref":"#/components/schemas/ClientNoteEntry"},"type":"array","title":"Notes Log"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"linked_organizations":{"items":{"$ref":"#/components/schemas/ClientLinkedOrganization"},"type":"array","title":"Linked Organizations"},"stage_display":{"type":"string","title":"Stage Display","default":""},"pilot_days_remaining":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pilot Days Remaining"},"card_on_file":{"type":"boolean","title":"Card On File","default":false},"status_line":{"type":"string","title":"Status Line","default":""},"attention":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Attention"},"price_cents":{"type":"integer","title":"Price Cents","default":0},"price_display":{"type":"string","title":"Price Display","default":"$0"},"price_period":{"type":"string","title":"Price Period","default":"once"},"price_overridden":{"type":"boolean","title":"Price Overridden","default":false}},"type":"object","required":["id","company_name","created_at"],"title":"ClientResponse"},"ClientSetStageRequest":{"properties":{"stage":{"type":"string","pattern":"^(negotiation|pilot|partnership|churned)$","title":"Stage"}},"type":"object","required":["stage"],"title":"ClientSetStageRequest"},"ClientUpdate":{"properties":{"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"primary_contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Contact Name"},"primary_contact_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Primary Contact Email"},"cc_emails":{"anyOf":[{"items":{"type":"string","format":"email"},"type":"array"},{"type":"null"}],"title":"Cc Emails"},"crm":{"anyOf":[{"type":"string","pattern":"^(service_titan|housecall_pro)$"},{"type":"null"}],"title":"Crm"},"ein":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ein"},"st_tenant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"St Tenant Id"},"price_override_cents":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Price Override Cents"},"expected_golive_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expected Golive Date"}},"type":"object","title":"ClientUpdate"},"CompleteMultipartUploadRequest":{"properties":{"bucket":{"type":"string","title":"Bucket"},"object_key":{"type":"string","title":"Object Key"},"upload_id":{"type":"string","title":"Upload Id"},"parts":{"items":{},"type":"array","title":"Parts"}},"type":"object","required":["bucket","object_key","upload_id","parts"],"title":"CompleteMultipartUploadRequest"},"CompleteMultipartUploadResponse":{"properties":{"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"etag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Etag"}},"type":"object","title":"CompleteMultipartUploadResponse"},"ContactCurrentJobResponse":{"properties":{"st_job_id":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"St Job Id"},"job_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Status"},"priority":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Priority"},"business_unit_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Unit Name"},"job_type_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Type Name"},"job_tags":{"items":{"type":"string"},"type":"array","title":"Job Tags"},"job_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Date"},"job_date_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Date Label"},"appointment_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Appointment Status"},"appointment_start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Appointment Start"},"appointment_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Appointment End"},"arrival_window_start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Arrival Window Start"},"arrival_window_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Arrival Window End"},"estimate_count":{"type":"integer","title":"Estimate Count","default":0},"open_estimate_count":{"type":"integer","title":"Open Estimate Count","default":0},"open_estimate_total":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Open Estimate Total"},"sold_estimate_count":{"type":"integer","title":"Sold Estimate Count","default":0},"llm_job_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Llm Job Summary"},"sold_estimate_total":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sold Estimate Total"}},"type":"object","title":"ContactCurrentJobResponse"},"ContactDetailResponse":{"properties":{"contact_id":{"type":"string","title":"Contact Id"},"source_type":{"type":"string","title":"Source Type"},"source_id":{"type":"string","title":"Source Id"},"customer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Name"},"primary_phone":{"type":"string","title":"Primary Phone"},"alternate_phones":{"items":{"$ref":"#/components/schemas/ContactPhoneResponse"},"type":"array","title":"Alternate Phones"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"latest_activity_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Latest Activity At"},"latest_preview":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latest Preview"},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id"},"followup_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Followup Id"},"requires_action":{"type":"boolean","title":"Requires Action","default":false},"is_archived":{"type":"boolean","title":"Is Archived","default":false},"pending_sync":{"type":"boolean","title":"Pending Sync","default":false},"appointment_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Appointment Date"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"invoice_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice Summary"},"estimates_data":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Estimates Data"},"attachment_urls":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Attachment Urls"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"customer_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Type"},"membership_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Membership Status"},"membership_plan_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Membership Plan Name"},"total_jobs_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Jobs Count"},"last_service_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Service Date"},"current_equipment_analysis":{"items":{"$ref":"#/components/schemas/ContactEquipmentAnalysisResponse"},"type":"array","title":"Current Equipment Analysis"},"customer_note_insights":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Note Insights"},"decision_style_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision Style Summary"},"primary_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Email"},"phone_groups":{"items":{"$ref":"#/components/schemas/ContactPhoneGroupResponse"},"type":"array","title":"Phone Groups"},"locations":{"items":{"$ref":"#/components/schemas/ContactLocationResponse"},"type":"array","title":"Locations"},"current_job":{"anyOf":[{"$ref":"#/components/schemas/ContactCurrentJobResponse"},{"type":"null"}]}},"type":"object","required":["contact_id","source_type","source_id","primary_phone"],"title":"ContactDetailResponse"},"ContactEquipmentAnalysisResponse":{"properties":{"location_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Location Id"},"location_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location Name"},"location_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location Address"},"equipment_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Equipment Id"},"equipment_name":{"type":"string","title":"Equipment Name"},"installation_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Installation Date"},"installed_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Installed By"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["equipment_name"],"title":"ContactEquipmentAnalysisResponse"},"ContactListItemResponse":{"properties":{"contact_id":{"type":"string","title":"Contact Id"},"source_type":{"type":"string","title":"Source Type"},"source_id":{"type":"string","title":"Source Id"},"customer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Name"},"primary_phone":{"type":"string","title":"Primary Phone"},"alternate_phones":{"items":{"$ref":"#/components/schemas/ContactPhoneResponse"},"type":"array","title":"Alternate Phones"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"latest_activity_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Latest Activity At"},"latest_preview":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latest Preview"},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id"},"followup_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Followup Id"},"requires_action":{"type":"boolean","title":"Requires Action","default":false},"is_archived":{"type":"boolean","title":"Is Archived","default":false},"pending_sync":{"type":"boolean","title":"Pending Sync","default":false},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"open_estimate_total":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Open Estimate Total"},"open_estimate_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Open Estimate Count"}},"type":"object","required":["contact_id","source_type","source_id","primary_phone"],"title":"ContactListItemResponse"},"ContactListResponse":{"properties":{"contacts":{"items":{"$ref":"#/components/schemas/ContactListItemResponse"},"type":"array","title":"Contacts"},"total_count":{"type":"integer","title":"Total Count"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["contacts","total_count","limit","offset"],"title":"ContactListResponse"},"ContactLocationResponse":{"properties":{"location_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Location Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"is_relevant":{"type":"boolean","title":"Is Relevant","default":false},"is_current_job":{"type":"boolean","title":"Is Current Job","default":false}},"type":"object","title":"ContactLocationResponse"},"ContactPhoneGroupResponse":{"properties":{"label":{"type":"string","title":"Label"},"is_relevant":{"type":"boolean","title":"Is Relevant","default":false},"phones":{"items":{"$ref":"#/components/schemas/ContactPhoneResponse"},"type":"array","title":"Phones"}},"type":"object","required":["label"],"title":"ContactPhoneGroupResponse"},"ContactPhoneResponse":{"properties":{"phone":{"type":"string","title":"Phone"},"label":{"type":"string","title":"Label"},"is_primary":{"type":"boolean","title":"Is Primary"}},"type":"object","required":["phone","label","is_primary"],"title":"ContactPhoneResponse"},"ContractCreate":{"properties":{"client_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Client Id"},"company_name":{"type":"string","minLength":1,"title":"Company Name"},"representative_name":{"type":"string","minLength":1,"title":"Representative Name"},"representative_email":{"type":"string","format":"email","title":"Representative Email"},"cc_emails":{"items":{"type":"string","format":"email"},"type":"array","title":"Cc Emails"},"representative_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Representative Title"},"start_date":{"type":"string","format":"date","title":"Start Date"},"monthly_fee_cents":{"type":"integer","minimum":0.0,"title":"Monthly Fee Cents","default":49900},"implementation_fee_cents":{"type":"integer","minimum":0.0,"title":"Implementation Fee Cents","default":0},"payment_type":{"type":"string","pattern":"^(monthly|annual|pilot)$","title":"Payment Type","default":"monthly"},"discount_percent":{"type":"integer","maximum":100.0,"minimum":0.0,"title":"Discount Percent","default":0},"annual_billed_monthly":{"type":"boolean","title":"Annual Billed Monthly","default":false},"trial_duration_months":{"type":"integer","minimum":0.0,"title":"Trial Duration Months","default":2},"contract_duration_months":{"type":"integer","exclusiveMinimum":0.0,"title":"Contract Duration Months","default":12},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"custom_sections":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Custom Sections"}},"type":"object","required":["company_name","representative_name","representative_email","start_date"],"title":"ContractCreate"},"ContractListResponse":{"properties":{"contracts":{"items":{"$ref":"#/components/schemas/ContractResponse"},"type":"array","title":"Contracts"},"total_count":{"type":"integer","title":"Total Count"}},"type":"object","required":["contracts","total_count"],"title":"ContractListResponse"},"ContractPublicResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"type":"string","title":"Status"},"company_name":{"type":"string","title":"Company Name"},"representative_name":{"type":"string","title":"Representative Name"},"representative_email":{"type":"string","title":"Representative Email"},"representative_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Representative Title"},"start_date":{"type":"string","format":"date","title":"Start Date"},"monthly_fee_cents":{"type":"integer","title":"Monthly Fee Cents"},"implementation_fee_cents":{"type":"integer","title":"Implementation Fee Cents","default":0},"payment_type":{"type":"string","title":"Payment Type","default":"monthly"},"discount_percent":{"type":"integer","title":"Discount Percent","default":0},"annual_billed_monthly":{"type":"boolean","title":"Annual Billed Monthly","default":false},"trial_duration_months":{"type":"integer","title":"Trial Duration Months"},"contract_duration_months":{"type":"integer","title":"Contract Duration Months"},"custom_sections":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Custom Sections"},"signed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Signed At"},"signed_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signed By Name"},"signer_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signer Title"},"signature_adopted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Signature Adopted At"},"monthly_fee_display":{"type":"string","title":"Monthly Fee Display","default":""},"total_contract_value_display":{"type":"string","title":"Total Contract Value Display","default":""},"original_total_display":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Original Total Display"},"billing_display":{"type":"string","title":"Billing Display","default":""},"implementation_fee_display":{"type":"string","title":"Implementation Fee Display","default":""},"is_free_pilot":{"type":"boolean","title":"Is Free Pilot","default":false},"requires_st_tenant_id":{"type":"boolean","title":"Requires St Tenant Id","default":false},"st_tenant_id_on_file":{"type":"boolean","title":"St Tenant Id On File","default":false},"ein_on_file":{"type":"boolean","title":"Ein On File","default":false}},"type":"object","required":["id","status","company_name","representative_name","representative_email","start_date","monthly_fee_cents","trial_duration_months","contract_duration_months"],"title":"ContractPublicResponse","description":"Public view of contract - excludes internal fields like notes and created_by."},"ContractResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","title":"Organization Id"},"client_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Client Id"},"status":{"type":"string","title":"Status"},"company_name":{"type":"string","title":"Company Name"},"representative_name":{"type":"string","title":"Representative Name"},"representative_email":{"type":"string","title":"Representative Email"},"cc_emails":{"items":{"type":"string"},"type":"array","title":"Cc Emails"},"representative_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Representative Title"},"start_date":{"type":"string","format":"date","title":"Start Date"},"monthly_fee_cents":{"type":"integer","title":"Monthly Fee Cents"},"implementation_fee_cents":{"type":"integer","title":"Implementation Fee Cents","default":0},"payment_type":{"type":"string","title":"Payment Type","default":"monthly"},"discount_percent":{"type":"integer","title":"Discount Percent","default":0},"annual_billed_monthly":{"type":"boolean","title":"Annual Billed Monthly","default":false},"trial_duration_months":{"type":"integer","title":"Trial Duration Months"},"contract_duration_months":{"type":"integer","title":"Contract Duration Months"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"custom_sections":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Custom Sections"},"signing_token":{"type":"string","format":"uuid","title":"Signing Token"},"signed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Signed At"},"signed_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signed By Name"},"paid_by_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paid By Email"},"stripe_customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Customer Id"},"stripe_subscription_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Subscription Id"},"link_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Link Expires At"},"link_active":{"type":"boolean","title":"Link Active","default":true},"created_by_clerk_id":{"type":"string","title":"Created By Clerk Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archived At"},"done_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Done At"},"reminder_paused":{"type":"boolean","title":"Reminder Paused","default":false},"reminder_first_send_offset_days":{"type":"integer","title":"Reminder First Send Offset Days","default":7},"reminder_day_of_week":{"type":"integer","title":"Reminder Day Of Week","default":1},"reminder_hour_local":{"type":"integer","title":"Reminder Hour Local","default":9},"reminder_timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reminder Timezone"},"reminder_last_sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reminder Last Sent At"},"reminder_email_overrides":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Reminder Email Overrides"},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sent At"},"viewed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Viewed At"},"paid_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Paid At"},"signer_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signer Title"},"signer_ip_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signer Ip Address"},"signer_user_agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signer User Agent"},"esign_consent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Esign Consent At"},"esign_consent_text_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Esign Consent Text Version"},"authority_confirmed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Authority Confirmed At"},"recurring_billing_consent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Recurring Billing Consent At"},"signature_adopted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Signature Adopted At"},"terms_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Terms Version"},"privacy_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Privacy Version"},"signed_document_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signed Document Version"},"signed_pdf_storage_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signed Pdf Storage Key"},"signed_pdf_sha256":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signed Pdf Sha256"},"monthly_fee_display":{"type":"string","title":"Monthly Fee Display","default":""},"total_contract_value_display":{"type":"string","title":"Total Contract Value Display","default":""},"original_total_display":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Original Total Display"},"billing_display":{"type":"string","title":"Billing Display","default":""},"implementation_fee_display":{"type":"string","title":"Implementation Fee Display","default":""},"is_free_pilot":{"type":"boolean","title":"Is Free Pilot","default":false}},"type":"object","required":["id","organization_id","status","company_name","representative_name","representative_email","start_date","monthly_fee_cents","trial_duration_months","contract_duration_months","signing_token","created_by_clerk_id","created_at"],"title":"ContractResponse"},"ContractSignRequest":{"properties":{"signed_by_name":{"type":"string","maxLength":120,"minLength":1,"title":"Signed By Name"},"signer_title":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Signer Title"},"esign_consent":{"type":"boolean","const":true,"title":"Esign Consent"},"authority_confirmed":{"type":"boolean","const":true,"title":"Authority Confirmed"},"signature_adopted":{"type":"boolean","const":true,"title":"Signature Adopted"},"recurring_billing_consent":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Recurring Billing Consent"},"esign_consent_text_version":{"type":"string","minLength":1,"title":"Esign Consent Text Version"},"terms_version":{"type":"string","minLength":1,"title":"Terms Version"},"privacy_version":{"type":"string","minLength":1,"title":"Privacy Version"}},"type":"object","required":["signed_by_name","esign_consent","authority_confirmed","signature_adopted","esign_consent_text_version","terms_version","privacy_version"],"title":"ContractSignRequest"},"ContractUpdate":{"properties":{"client_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Client Id"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"representative_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Representative Name"},"representative_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Representative Email"},"cc_emails":{"anyOf":[{"items":{"type":"string","format":"email"},"type":"array"},{"type":"null"}],"title":"Cc Emails"},"representative_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Representative Title"},"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date"},"monthly_fee_cents":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Monthly Fee Cents"},"implementation_fee_cents":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Implementation Fee Cents"},"payment_type":{"anyOf":[{"type":"string","pattern":"^(monthly|annual|pilot)$"},{"type":"null"}],"title":"Payment Type"},"discount_percent":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Discount Percent"},"annual_billed_monthly":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Annual Billed Monthly"},"trial_duration_months":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Trial Duration Months"},"contract_duration_months":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Contract Duration Months"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"custom_sections":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Custom Sections"}},"type":"object","title":"ContractUpdate"},"ConversationAgentSettingsResponse":{"properties":{"conversation_id":{"type":"string","format":"uuid","title":"Conversation Id"},"enabled":{"type":"boolean","title":"Enabled"},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","required":["conversation_id","enabled"],"title":"ConversationAgentSettingsResponse","description":"Response model for per-conversation SMS agent toggle state."},"ConversationNoteResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"conversation_id":{"type":"string","format":"uuid","title":"Conversation Id"},"organization_id":{"type":"string","title":"Organization Id"},"author_id":{"type":"string","title":"Author Id"},"author_name":{"type":"string","title":"Author Name"},"body":{"type":"string","title":"Body"},"image_s3_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image S3 Key"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","conversation_id","organization_id","author_id","author_name","body","created_at","updated_at"],"title":"ConversationNoteResponse","description":"Response model for a conversation note."},"ConversationResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"contact_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Id"},"customer_phone":{"type":"string","title":"Customer Phone"},"customer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Name"},"customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Id"},"followup_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Followup Id"},"conversation_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Status"},"last_message_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Message At"},"last_message_body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Message Body"},"last_message_direction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Message Direction"},"unread_count":{"type":"integer","title":"Unread Count"},"is_archived":{"type":"boolean","title":"Is Archived"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"summary_generated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Summary Generated At"},"call_to_action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call To Action"},"agent_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Context"},"priority":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Priority"},"intent_updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Intent Updated At"},"technician_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Technician Name"},"technician_first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Technician First Name"},"technician_last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Technician Last Name"},"job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Id"},"followup_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Followup Status"},"followup_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Followup Kind"},"min_estimate_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Estimate Value"},"max_estimate_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Estimate Value"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"won_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Won Amount"},"lost_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lost Reason"},"trade":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trade"},"job_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Type"},"customer_profile":{"anyOf":[{"$ref":"#/components/schemas/CustomerProfileSidebar"},{"type":"null"}]},"estimates_data":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Estimates Data"},"sold_estimate":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Sold Estimate"},"intent_priority":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intent Priority"},"triggered_by_tool":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Triggered By Tool"},"source_system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source System"},"hcp_customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hcp Customer Id"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"aspire_engaged":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Aspire Engaged"},"aspire_attempt_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Aspire Attempt Count"},"aspire_next_touch_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aspire Next Touch At"},"aspire_next_review_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aspire Next Review At"},"aspire_last_reviewed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aspire Last Reviewed At"},"aspire_review_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aspire Review Reason"},"aspire_review_decision":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aspire Review Decision"},"aspire_details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Aspire Details"}},"type":"object","required":["id","customer_phone","unread_count","is_archived","created_at"],"title":"ConversationResponse","description":"Response model for a conversation."},"CreateCampaignRequest":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"},"campaign_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign User Id"},"audience_build_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audience Build Id"},"months":{"items":{"type":"integer"},"type":"array","title":"Months","default":[]},"tag_ids":{"items":{"type":"string"},"type":"array","title":"Tag Ids","default":[]},"tag_names":{"items":{"type":"string"},"type":"array","title":"Tag Names","default":[]},"service_name_contains":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Service Name Contains"},"goal":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Goal"},"agent_instructions":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Agent Instructions"},"max_rounds":{"type":"integer","maximum":6.0,"minimum":1.0,"title":"Max Rounds","default":1},"round_interval_days":{"type":"integer","maximum":30.0,"minimum":1.0,"title":"Round Interval Days","default":1},"audience_limit":{"anyOf":[{"type":"integer","maximum":5000.0,"minimum":1.0},{"type":"null"}],"title":"Audience Limit","default":500},"business_unit_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Unit Id"},"redirect_phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect Phone Number"},"first_message_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Message Template"},"customer_ids":{"items":{"type":"string"},"type":"array","maxItems":5000,"title":"Customer Ids"}},"type":"object","required":["name"],"title":"CreateCampaignRequest"},"CreateCampaignResponse":{"properties":{"campaign":{"$ref":"#/components/schemas/CampaignSummary"},"total_customers":{"type":"integer","title":"Total Customers"},"total_events":{"type":"integer","title":"Total Events"}},"type":"object","required":["campaign","total_customers","total_events"],"title":"CreateCampaignResponse"},"CreateDatasetRequest":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"agent_type":{"type":"string","title":"Agent Type"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"metadata":{"$ref":"#/components/schemas/DatasetMetadata"}},"type":"object","required":["name","agent_type"],"title":"CreateDatasetRequest"},"CreateFrameworkRequest":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"metric_registry":{"additionalProperties":{"$ref":"#/components/schemas/MetricConfigRequest"},"type":"object","title":"Metric Registry"},"judge_prompt_ids":{"items":{"type":"string"},"type":"array","title":"Judge Prompt Ids"},"metadata":{"$ref":"#/components/schemas/FrameworkMetadata"}},"type":"object","required":["name"],"title":"CreateFrameworkRequest"},"CreateNoteRequest":{"properties":{"body":{"type":"string","maxLength":2000,"title":"Body","default":""},"image_s3_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image S3 Key"}},"type":"object","title":"CreateNoteRequest","description":"Request model for creating a conversation note."},"CustomerConversationMessagePreview":{"properties":{"id":{"type":"string","title":"Id"},"direction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direction"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"sender_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Name"}},"type":"object","required":["id"],"title":"CustomerConversationMessagePreview"},"CustomerConversationSummary":{"properties":{"id":{"type":"string","title":"Id"},"customer_phone":{"type":"string","title":"Customer Phone"},"customer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Name"},"conversation_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Status"},"technician_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Technician Name"},"last_message_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Message At"},"last_message_body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Message Body"},"unread_count":{"type":"integer","title":"Unread Count","default":0},"is_archived":{"type":"boolean","title":"Is Archived","default":false},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"message_count":{"type":"integer","title":"Message Count","default":0},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"messages":{"items":{"$ref":"#/components/schemas/CustomerConversationMessagePreview"},"type":"array","title":"Messages"}},"type":"object","required":["id","customer_phone"],"title":"CustomerConversationSummary"},"CustomerOverviewCityCluster":{"properties":{"city":{"type":"string","title":"City"},"state":{"type":"string","title":"State"},"customer_count":{"type":"integer","title":"Customer Count","default":0},"active_members":{"type":"integer","title":"Active Members","default":0},"at_risk_count":{"type":"integer","title":"At Risk Count","default":0},"total_revenue":{"type":"number","title":"Total Revenue","default":0.0}},"type":"object","required":["city","state"],"title":"CustomerOverviewCityCluster"},"CustomerOverviewCountItem":{"properties":{"label":{"type":"string","title":"Label"},"count":{"type":"integer","title":"Count","default":0}},"type":"object","required":["label"],"title":"CustomerOverviewCountItem"},"CustomerOverviewCustomerRow":{"properties":{"st_customer_id":{"type":"integer","title":"St Customer Id"},"customer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Name"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"total_revenue":{"type":"number","title":"Total Revenue","default":0.0},"total_jobs_count":{"type":"integer","title":"Total Jobs Count","default":0},"has_active_membership":{"type":"boolean","title":"Has Active Membership","default":false},"risk_level":{"type":"string","title":"Risk Level","default":"unknown"},"days_since_last_service":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days Since Last Service"},"last_job_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Job Date"}},"type":"object","required":["st_customer_id"],"title":"CustomerOverviewCustomerRow"},"CustomerOverviewKpis":{"properties":{"total_customers":{"type":"integer","title":"Total Customers","default":0},"active_members":{"type":"integer","title":"Active Members","default":0},"mapped_customers":{"type":"integer","title":"Mapped Customers","default":0},"at_risk_customers":{"type":"integer","title":"At Risk Customers","default":0},"due_for_reengagement":{"type":"integer","title":"Due For Reengagement","default":0},"recently_serviced_30d":{"type":"integer","title":"Recently Serviced 30D","default":0},"total_revenue":{"type":"number","title":"Total Revenue","default":0.0},"avg_revenue_per_customer":{"type":"number","title":"Avg Revenue Per Customer","default":0.0}},"type":"object","title":"CustomerOverviewKpis"},"CustomerOverviewMapPoint":{"properties":{"st_customer_id":{"type":"integer","title":"St Customer Id"},"customer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Name"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"latitude":{"type":"number","title":"Latitude"},"longitude":{"type":"number","title":"Longitude"},"total_revenue":{"type":"number","title":"Total Revenue","default":0.0},"total_jobs_count":{"type":"integer","title":"Total Jobs Count","default":0},"has_active_membership":{"type":"boolean","title":"Has Active Membership","default":false},"risk_level":{"type":"string","title":"Risk Level","default":"unknown"},"days_since_last_service":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days Since Last Service"}},"type":"object","required":["st_customer_id","latitude","longitude"],"title":"CustomerOverviewMapPoint"},"CustomerOverviewResponse":{"properties":{"kpis":{"$ref":"#/components/schemas/CustomerOverviewKpis"},"map_points":{"items":{"$ref":"#/components/schemas/CustomerOverviewMapPoint"},"type":"array","title":"Map Points"},"city_clusters":{"items":{"$ref":"#/components/schemas/CustomerOverviewCityCluster"},"type":"array","title":"City Clusters"},"membership_types":{"items":{"$ref":"#/components/schemas/CustomerOverviewCountItem"},"type":"array","title":"Membership Types"},"risk_buckets":{"items":{"$ref":"#/components/schemas/CustomerOverviewCountItem"},"type":"array","title":"Risk Buckets"},"service_recency_buckets":{"items":{"$ref":"#/components/schemas/CustomerOverviewCountItem"},"type":"array","title":"Service Recency Buckets"},"top_customers":{"items":{"$ref":"#/components/schemas/CustomerOverviewCustomerRow"},"type":"array","title":"Top Customers"},"watchlist":{"items":{"$ref":"#/components/schemas/CustomerOverviewWatchRow"},"type":"array","title":"Watchlist"}},"type":"object","title":"CustomerOverviewResponse"},"CustomerOverviewWatchRow":{"properties":{"st_customer_id":{"type":"integer","title":"St Customer Id"},"customer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Name"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"total_revenue":{"type":"number","title":"Total Revenue","default":0.0},"total_jobs_count":{"type":"integer","title":"Total Jobs Count","default":0},"has_active_membership":{"type":"boolean","title":"Has Active Membership","default":false},"risk_level":{"type":"string","title":"Risk Level","default":"unknown"},"days_since_last_service":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days Since Last Service"},"last_job_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Job Date"},"services_last_12_months":{"type":"integer","title":"Services Last 12 Months","default":0},"primary_reason":{"type":"string","title":"Primary Reason","default":""}},"type":"object","required":["st_customer_id"],"title":"CustomerOverviewWatchRow"},"CustomerProfileSidebar":{"properties":{"has_active_membership":{"type":"boolean","title":"Has Active Membership","default":false},"membership_type_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Membership Type Name"},"memberships":{"items":{"$ref":"#/components/schemas/MembershipSidebar"},"type":"array","title":"Memberships","default":[]},"total_jobs_count":{"type":"integer","title":"Total Jobs Count","default":0},"total_revenue":{"type":"number","title":"Total Revenue","default":0},"avg_job_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Job Value"},"last_job_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Job Date"},"customer_created_on":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Created On"},"st_customer_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"St Customer Id"},"days_since_last_service":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days Since Last Service"},"services_last_12_months":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Services Last 12 Months"},"same_day_close_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Same Day Close Rate"},"outreach_guidance":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outreach Guidance"},"equipment":{"anyOf":[{"items":{"$ref":"#/components/schemas/EquipmentSidebar"},"type":"array"},{"type":"null"}],"title":"Equipment"},"last_synced_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Synced At"}},"type":"object","title":"CustomerProfileSidebar","description":"Customer profile data for the CaseSidebar display."},"CustomerSMSBlockStatusResponse":{"properties":{"customer_id":{"type":"string","title":"Customer Id"},"followup_sms_allowed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Followup Sms Allowed"},"followup_sms_block_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Followup Sms Block Reason"}},"type":"object","required":["customer_id"],"title":"CustomerSMSBlockStatusResponse","description":"Response model for customer-level SMS block state."},"CustomerSMSBlockUpdateResponse":{"properties":{"customer_id":{"type":"string","title":"Customer Id"},"followup_sms_allowed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Followup Sms Allowed"},"followup_sms_block_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Followup Sms Block Reason"},"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"}},"type":"object","required":["customer_id","success","message"],"title":"CustomerSMSBlockUpdateResponse","description":"Response model for manual SMS block state mutations."},"CustomerSearchResult":{"properties":{"st_customer_id":{"type":"integer","title":"St Customer Id"},"customer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Name"}},"type":"object","required":["st_customer_id"],"title":"CustomerSearchResult"},"DashboardActivityTrendPoint":{"properties":{"date":{"type":"string","title":"Date"},"sent":{"type":"integer","title":"Sent","default":0},"replies":{"type":"integer","title":"Replies","default":0},"goal_met":{"type":"integer","title":"Goal Met","default":0},"action_required":{"type":"integer","title":"Action Required","default":0}},"type":"object","required":["date"],"title":"DashboardActivityTrendPoint"},"DashboardBatch":{"properties":{"batch_number":{"type":"integer","title":"Batch Number"},"customer_count":{"type":"integer","title":"Customer Count"},"released_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Released At"},"rounds":{"items":{"$ref":"#/components/schemas/DashboardRound"},"type":"array","title":"Rounds"},"highest_round_sent":{"type":"integer","title":"Highest Round Sent","default":0},"status":{"type":"string","title":"Status","default":"in_progress"},"current_round":{"type":"integer","title":"Current Round","default":0},"max_rounds":{"type":"integer","title":"Max Rounds","default":3}},"type":"object","required":["batch_number","customer_count","rounds"],"title":"DashboardBatch"},"DashboardCustomer":{"properties":{"id":{"type":"string","title":"Id"},"customer_name":{"type":"string","title":"Customer Name"},"phone":{"type":"string","title":"Phone"},"status":{"type":"string","title":"Status"},"current_round":{"type":"integer","title":"Current Round","default":1},"batch_number":{"type":"integer","title":"Batch Number","default":1},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id"},"last_message_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Message At"},"message_count":{"type":"integer","title":"Message Count","default":0},"st_customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"St Customer Id"},"needs_office":{"type":"boolean","title":"Needs Office","default":false},"office_escalation_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Office Escalation Status"},"office_escalation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Office Escalation Id"},"office_escalation_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Office Escalation Summary"},"office_escalation_suggested_action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Office Escalation Suggested Action"},"first_message_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Message Status"},"goal_met_outcome":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Goal Met Outcome"}},"type":"object","required":["id","customer_name","phone","status"],"title":"DashboardCustomer"},"DashboardRound":{"properties":{"round":{"type":"integer","title":"Round"},"status":{"type":"string","title":"Status"},"sent_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sent At"},"contacted":{"type":"integer","title":"Contacted","default":0},"goal_met":{"type":"integer","title":"Goal Met","default":0},"refused":{"type":"integer","title":"Refused","default":0},"in_conversation":{"type":"integer","title":"In Conversation","default":0},"no_response":{"type":"integer","title":"No Response","default":0}},"type":"object","required":["round","status"],"title":"DashboardRound"},"DatasetMetadata":{"properties":{"total_cases":{"type":"integer","title":"Total Cases","default":0},"ready_cases":{"type":"integer","title":"Ready Cases","default":0},"last_seeded_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Seeded At"},"coverage_summary":{"additionalProperties":{"type":"integer"},"type":"object","title":"Coverage Summary"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"DatasetMetadata","description":"Metadata for an eval dataset.\n\nStored in eval_datasets.metadata JSONB column. Tracks aggregate\nstats and any extra context about the dataset."},"DayHoursConfig":{"properties":{"open":{"type":"string","title":"Open","description":"Opening time as HH:MM in 24h org-local time."},"close":{"type":"string","title":"Close","description":"Closing time as HH:MM in 24h org-local time."}},"type":"object","required":["open","close"],"title":"DayHoursConfig","description":"Open/close window in org-local time."},"DiscardCampaignResponse":{"properties":{"campaign_id":{"type":"string","title":"Campaign Id"},"discarded":{"type":"boolean","title":"Discarded"},"customers_removed":{"type":"integer","title":"Customers Removed"}},"type":"object","required":["campaign_id","discarded","customers_removed"],"title":"DiscardCampaignResponse"},"DiscountAuthority":{"properties":{"allowed":{"type":"boolean","title":"Allowed","default":false}},"type":"object","title":"DiscountAuthority"},"DmrConfig":{"properties":{"opportunity_min_estimate":{"type":"number","title":"Opportunity Min Estimate","description":"Estimate subtotal at or above which a completed service/maintenance job counts as an opportunity","default":2500.0},"trip_fee_cap":{"type":"number","title":"Trip Fee Cap","description":"Invoice total at or below which a paid service call counts as trip/diagnostic-fee only","default":250.0},"marketed_campaign_ids":{"items":{"type":"integer"},"type":"array","title":"Marketed Campaign Ids","description":"ST campaign ids whose jobs count as Marketed (for orgs that track marketed by campaign, not job type)"},"marketed_job_type_ids":{"items":{"type":"integer"},"type":"array","title":"Marketed Job Type Ids","description":"Extra ST job type ids that count as Marketed beyond name matching"}},"type":"object","title":"DmrConfig","description":"Tunable thresholds used by the DMR auto-computed daily metrics."},"DmrDailySaveRequest":{"properties":{"entry_date":{"type":"string","format":"date","title":"Entry Date"},"values":{"additionalProperties":{"anyOf":[{"type":"number"},{"type":"null"}]},"type":"object","title":"Values"}},"type":"object","required":["entry_date","values"],"title":"DmrDailySaveRequest"},"DmrGoalsSaveRequest":{"properties":{"year":{"type":"integer","title":"Year"},"months":{"additionalProperties":{"additionalProperties":{"anyOf":[{"type":"number"},{"type":"null"}]},"type":"object"},"type":"object","title":"Months","description":"Month number (1-12) -> metric_key -> goal value (null clears)"}},"type":"object","required":["year","months"],"title":"DmrGoalsSaveRequest"},"DmrRulesUpdateRequest":{"properties":{"opportunity_min_estimate":{"type":"number","minimum":0.0,"title":"Opportunity Min Estimate"},"trip_fee_cap":{"type":"number","minimum":0.0,"title":"Trip Fee Cap"}},"type":"object","required":["opportunity_min_estimate","trip_fee_cap"],"title":"DmrRulesUpdateRequest"},"DmrSyncRequest":{"properties":{"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date","description":"Defaults to 60 days ago"},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date","description":"Defaults to today"}},"type":"object","title":"DmrSyncRequest"},"DropdownOption":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"DropdownOption"},"DropdownOptionsResponse":{"properties":{"options":{"items":{"$ref":"#/components/schemas/DropdownOption"},"type":"array","title":"Options"}},"type":"object","required":["options"],"title":"DropdownOptionsResponse"},"EmailAddressInput":{"properties":{"address":{"type":"string","title":"Address"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["address"],"title":"EmailAddressInput"},"EmailNotificationConfig":{"properties":{"email_notifications_enabled":{"type":"boolean","title":"Email Notifications Enabled","default":true},"global_email_recipients":{"items":{"type":"string"},"type":"array","title":"Global Email Recipients","description":"List of org-wide recipients included on all notification emails.","default":[]},"trade_email_recipients":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object","title":"Trade Email Recipients","description":"Trade-specific email recipients. Keys: 'hvac', 'plumbing', 'electrical'. Values: list of email addresses."},"missed_call_email_notifications_enabled":{"type":"boolean","title":"Missed Call Email Notifications Enabled","description":"Send email to back office on missed inbound calls (no-answer, busy, voicemail). Voicemail emails include transcript.","default":false},"weekly_report_recipients":{"items":{"type":"string"},"type":"array","title":"Weekly Report Recipients","description":"Email addresses that receive the weekly followup analytics report. Empty list disables the report."},"weekly_report_noops_only":{"type":"boolean","title":"Weekly Report Noops Only","description":"Send the Monday report with the No-Ops blocks only. For orgs that run operator workflows but no followups: the won/pipeline/engagement sections are skipped and the auto-send-user requirement does not apply.","default":false},"weekly_report_send_hour_local":{"type":"integer","maximum":23.0,"minimum":0.0,"title":"Weekly Report Send Hour Local","description":"Hour in the org's local timezone to send the weekly report (0-23). Default 13 = 1 PM.","default":13},"email_grouping_window_seconds":{"type":"integer","maximum":900.0,"minimum":0.0,"title":"Email Grouping Window Seconds","description":"Time window (seconds) to batch email notifications for the same conversation. If multiple tool escalations happen within this window, they are grouped into one email. Set to 0 to send immediately. Max 900 seconds (15 minutes).","default":300},"csr_email_recipients":{"items":{"type":"string"},"type":"array","title":"Csr Email Recipients","description":"List of CSR (customer service rep) email recipients to be notified."},"contract_responsible_recipients":{"items":{"type":"string"},"type":"array","title":"Contract Responsible Recipients","description":"Email addresses notified when a customer signs a contract. These recipients are responsible for configuring the payment-reminder schedule in the dashboard. Empty list disables sign notifications."},"market_leads_contact_email":{"items":{"type":"string"},"type":"array","title":"Market Leads Contact Email","description":"Email addresses notified when a market lead ServiceTitan job is created."},"operator_digest_recipients":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}],"title":"Operator Digest Recipients","description":"Operator needs-review digest recipients keyed by workflow. Legacy flat lists remain valid until stored configs are migrated; they apply to every workflow and retain their list shape when serialized."},"operator_digest_send_hour_local":{"type":"integer","maximum":23.0,"minimum":0.0,"title":"Operator Digest Send Hour Local","description":"Hour in the org's local timezone to send the Wednesday operator digest (0-23). Default 8 AM.","default":8}},"type":"object","title":"EmailNotificationConfig"},"EmployeeListResponse":{"properties":{"employees":{"items":{"$ref":"#/components/schemas/EmployeeResponse"},"type":"array","title":"Employees"},"total_count":{"type":"integer","title":"Total Count"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["employees","total_count","page","page_size"],"title":"EmployeeListResponse"},"EmployeeRemovalResponse":{"properties":{"message":{"type":"string","title":"Message"},"employee_id":{"type":"string","title":"Employee Id"},"twilio_phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Twilio Phone Number"}},"type":"object","required":["message","employee_id"],"title":"EmployeeRemovalResponse"},"EmployeeResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"phone_number":{"type":"string","title":"Phone Number"},"twilio_phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Twilio Phone Number"},"role":{"anyOf":[{"type":"string","enum":["sales_tech","install"]},{"type":"null"}],"title":"Role"},"organization_role":{"anyOf":[{"type":"string","enum":["org:admin","org:member"]},{"type":"null"}],"title":"Organization Role"},"trades":{"items":{"type":"string"},"type":"array","title":"Trades"}},"type":"object","required":["id","email","first_name","last_name","phone_number"],"title":"EmployeeResponse"},"EquipmentSidebar":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"equipment_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Equipment Type"},"installed_on":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Installed On"},"manufacturer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Manufacturer"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"manufacturer_warranty_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Manufacturer Warranty End"}},"type":"object","title":"EquipmentSidebar","description":"Equipment info for the CaseSidebar."},"EstimateDismissalFailure":{"properties":{"estimate_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Estimate Id"},"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"EstimateDismissalFailure"},"EstimateDismissalResult":{"properties":{"requested":{"type":"boolean","title":"Requested"},"enabled":{"type":"boolean","title":"Enabled"},"status":{"type":"string","enum":["not_requested","disabled","not_service_titan","no_open_estimates","success","partial_failure","failed"],"title":"Status"},"dismissed_estimate_ids":{"items":{"type":"integer"},"type":"array","title":"Dismissed Estimate Ids"},"failures":{"items":{"$ref":"#/components/schemas/EstimateDismissalFailure"},"type":"array","title":"Failures"}},"type":"object","required":["requested","enabled","status"],"title":"EstimateDismissalResult"},"ExcludeByMonthsRequest":{"properties":{"keep_months":{"items":{"type":"integer"},"type":"array","title":"Keep Months"}},"type":"object","required":["keep_months"],"title":"ExcludeByMonthsRequest"},"ExcludeByMonthsResponse":{"properties":{"excluded_count":{"type":"integer","title":"Excluded Count"}},"type":"object","required":["excluded_count"],"title":"ExcludeByMonthsResponse"},"ExtendLinkRequest":{"properties":{"hours":{"type":"integer","maximum":720.0,"exclusiveMinimum":0.0,"title":"Hours","default":1}},"type":"object","title":"ExtendLinkRequest"},"FieldViewAvailablePhone":{"properties":{"phone":{"type":"string","title":"Phone"},"label":{"type":"string","title":"Label"},"is_primary":{"type":"boolean","title":"Is Primary"}},"type":"object","required":["phone","label","is_primary"],"title":"FieldViewAvailablePhone","description":"Available phone number for a conversation (parity with dashboard/mobile)."},"FieldViewCallRequest":{"properties":{"target_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Phone"}},"type":"object","title":"FieldViewCallRequest"},"FieldViewCallResponse":{"properties":{"call_sid":{"type":"string","title":"Call Sid"},"status":{"type":"string","title":"Status"}},"type":"object","required":["call_sid","status"],"title":"FieldViewCallResponse"},"FieldViewMarkLostResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"followup_id":{"type":"string","title":"Followup Id"},"dismissal_reason":{"type":"string","title":"Dismissal Reason"},"estimate_dismissal":{"$ref":"#/components/schemas/EstimateDismissalResult"}},"type":"object","required":["success","message","followup_id","dismissal_reason","estimate_dismissal"],"title":"FieldViewMarkLostResponse"},"FieldViewMediaItem":{"properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"},"size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size"}},"type":"object","title":"FieldViewMediaItem"},"FieldViewRephraseRequest":{"properties":{"message_text":{"type":"string","title":"Message Text"}},"type":"object","required":["message_text"],"title":"FieldViewRephraseRequest"},"FieldViewRephraseResponse":{"properties":{"rephrased_message":{"type":"string","title":"Rephrased Message"}},"type":"object","required":["rephrased_message"],"title":"FieldViewRephraseResponse"},"FieldViewResolveResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"conversation_id":{"type":"string","title":"Conversation Id"},"new_status":{"type":"string","title":"New Status"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","conversation_id","new_status","message"],"title":"FieldViewResolveResponse"},"FieldViewSendRequest":{"properties":{"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"},"media_urls":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Media Urls"},"target_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Phone"}},"type":"object","title":"FieldViewSendRequest"},"FieldViewSuggestResponse":{"properties":{"suggested_message":{"type":"string","title":"Suggested Message"}},"type":"object","required":["suggested_message"],"title":"FieldViewSuggestResponse"},"FieldViewTimelineItem":{"properties":{"type":{"type":"string","title":"Type"},"id":{"type":"string","title":"Id"},"direction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direction"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"},"media_urls":{"anyOf":[{"items":{"$ref":"#/components/schemas/FieldViewMediaItem"},"type":"array"},{"type":"null"}],"title":"Media Urls"},"created_at":{"type":"string","title":"Created At"},"sender_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Name"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"from_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Number"},"call_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call Status"},"call_duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Call Duration Seconds"},"event_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Type"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["type","id","created_at"],"title":"FieldViewTimelineItem"},"FieldViewTimelineResponse":{"properties":{"conversation_id":{"type":"string","title":"Conversation Id"},"customer_name":{"type":"string","title":"Customer Name"},"customer_phone":{"type":"string","title":"Customer Phone"},"available_phones":{"items":{"$ref":"#/components/schemas/FieldViewAvailablePhone"},"type":"array","title":"Available Phones","default":[]},"conversation_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Status"},"items":{"items":{"$ref":"#/components/schemas/FieldViewTimelineItem"},"type":"array","title":"Items"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"call_to_action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call To Action"},"intent_priority":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intent Priority"},"technician_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Technician Name"},"estimate_low":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Estimate Low"},"estimate_high":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Estimate High"},"job_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Type"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"read_only":{"type":"boolean","title":"Read Only","default":false}},"type":"object","required":["conversation_id","customer_name","customer_phone","items"],"title":"FieldViewTimelineResponse"},"FieldViewUploadUrlRequest":{"properties":{"filename":{"type":"string","title":"Filename"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"}},"type":"object","required":["filename"],"title":"FieldViewUploadUrlRequest"},"FieldViewUploadUrlResponse":{"properties":{"upload_url":{"type":"string","title":"Upload Url"},"s3_key":{"type":"string","title":"S3 Key"},"public_url":{"type":"string","title":"Public Url"}},"type":"object","required":["upload_url","s3_key","public_url"],"title":"FieldViewUploadUrlResponse"},"FillReportRequest":{"properties":{"transcript_id":{"type":"string","format":"uuid","title":"Transcript Id"},"template_id":{"type":"string","format":"uuid","title":"Template Id"},"task_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Id"}},"type":"object","required":["transcript_id","template_id"],"title":"FillReportRequest"},"FillReportResponse":{"properties":{"report_id":{"type":"string","format":"uuid","title":"Report Id"},"filled_pdf_url":{"type":"string","title":"Filled Pdf Url"},"json_output":{"additionalProperties":true,"type":"object","title":"Json Output"}},"type":"object","required":["report_id","filled_pdf_url","json_output"],"title":"FillReportResponse"},"FinancingAuthority":{"properties":{"allow_payment_figures":{"type":"boolean","title":"Allow Payment Figures","default":false}},"type":"object","title":"FinancingAuthority"},"FollowUpStrategyConfig":{"properties":{"estimates_data_style":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Estimates Data Style","description":""},"excluded_tags":{"items":{"type":"string"},"type":"array","title":"Excluded Tags","description":"List of tag names to exclude from followup generation. Case-insensitive match against job tags."},"required_tags":{"items":{"type":"string"},"type":"array","title":"Required Tags","description":"Inclusion allowlist: when non-empty, only jobs carrying at least one of these tag names enter followup generation. Case-insensitive match against JOB-level tags only — customer/location tags never qualify a job. Empty list = no gate (default)."},"excluded_business_units":{"items":{"type":"string"},"type":"array","title":"Excluded Business Units","description":"List of ServiceTitan business unit names to exclude from followup generation. Case-insensitive, whitespace-trimmed match against the job's business unit (ST pads some names with stray spaces). Empty list = no gate (default)."},"lookback_days":{"type":"integer","maximum":7.0,"minimum":1.0,"title":"Lookback Days","description":"ServiceTitan only. Delay for jobs governed by required_tags. ThermAll scopes this delay to Service; its ungated business units keep normal daily timing.","default":1},"verbal_pricing":{"type":"boolean","title":"Verbal Pricing","description":"If True, this org discusses pricing verbally rather than sending formal estimates. Messages will use 'options we discussed' instead of 'estimates'.","default":false},"conversation_logs_write_to_ST":{"type":"boolean","title":"Conversation Logs Write To St","description":"If True, NOSO AI follow-up activity logs are written to the ServiceTitan job notes.","default":false},"won_job_conversation_pin_enabled":{"type":"boolean","title":"Won Job Conversation Pin Enabled","description":"If True, ServiceTitan jobs created from sold followup estimates get a pinned read-only NOSO conversation handoff link.","default":false},"invoice_synthesis_enabled":{"type":"boolean","title":"Invoice Synthesis Enabled","description":"Org master switch for invoice-driven estimate synthesis. When True, the followup pipeline infers recommendations from invoice write-ups and creates synthetic draft estimates in ServiceTitan — but only for technicians whose users.invoice_synthesis_enabled is also True. Temporary measure for orgs whose techs recommend work in invoices but rarely formalize it into estimates.","default":false},"invoice_synthesis_placeholder_sku_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Invoice Synthesis Placeholder Sku Id","description":"ServiceTitan pricebook SKU id of the catch-all 'NOSO Recommended Work' item used as the line SKU for every synthetic estimate (the line carries our own description and unit_price). Required when invoice_synthesis_enabled is True."},"hcp_catchall_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hcp Catchall User Id","description":"HousecallPro only. users.id (UUID) of the org's catch-all followup owner. When set, HCP Stage-1 ingestion runs two passes: real sales_techs (this user excluded) ingest normally under their own id; every OTHER qualifying open estimate is ingested regardless of whether its assigned pro maps to a user in our system, with the hcp_followup row and conversation assigned to this user. None = normal per-sales_tech ingestion (unmatched estimates are dropped)."},"persona":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Persona","description":"Name outreach is signed with when the followup is owned by the catch-all user (hcp_catchall_user_id). Those followups are worked by back-office staff on behalf of the technician who attended, so the message is sent as this persona and refers to the technician in the third person. None = sign as the assigned user."},"hcp_job_followups_enabled":{"type":"boolean","title":"Hcp Job Followups Enabled","description":"HousecallPro only. When True, Stage-1 ingestion also sweeps jobs completed yesterday and creates kind=job followup rows for them. False disables the completed-jobs pass entirely (estimate ingestion is unaffected) for orgs that don't want post-job followups.","default":true},"hcp_lookback_days":{"type":"integer","maximum":365.0,"minimum":1.0,"title":"Hcp Lookback Days","description":"HousecallPro only. Size in days of the rolling created_at window Stage-1 ingestion sweeps for open estimates. Wide by default because an estimate is only ingestible once delivered, which often happens days or weeks after it is created — the window is re-swept every run to catch those. Raise it for orgs that deliver slowly, lower it to cut API calls for high-volume orgs. Does not affect the completed-jobs pass, which always looks at yesterday only. The CLI's --lookback-days overrides this when passed.","default":30}},"type":"object","title":"FollowUpStrategyConfig","description":"Followup configuration for an organization.\n\nStored in integrations.config.FOLLOWUP_STRATEGY_CONFIG. Holds the\nper-organization followup behaviour settings consumed by the pipeline."},"FollowupLostCapabilities":{"properties":{"dismiss_estimates_on_lost_enabled":{"type":"boolean","title":"Dismiss Estimates On Lost Enabled","default":false}},"type":"object","title":"FollowupLostCapabilities"},"FormattedContentItem":{"properties":{"type":{"type":"string","title":"Type","description":"Content type: 'speaker' or 'text'"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label","description":"Speaker label if present"},"content":{"type":"string","title":"Content","description":"Text content"},"is_empty_line":{"type":"boolean","title":"Is Empty Line","description":"Whether this represents a blank line","default":false}},"type":"object","required":["type","content"],"title":"FormattedContentItem"},"FrameworkMetadata":{"properties":{"last_run_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Run At"},"last_run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Run Id"},"total_runs":{"type":"integer","title":"Total Runs","default":0},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"FrameworkMetadata","description":"Metadata for an eval framework.\n\nStored in eval_frameworks.metadata JSONB column."},"FullProfileBehavior":{"properties":{"decision_style_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision Style Summary"},"service_pattern_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Pattern Summary"},"customer_note_insights":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Note Insights"},"agent_observations_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Observations Summary"},"business_unit_segments":{"items":{"$ref":"#/components/schemas/FullProfileBuyingSegment"},"type":"array","title":"Business Unit Segments"},"cross_segment_insights":{"type":"string","title":"Cross Segment Insights","default":""}},"type":"object","title":"FullProfileBehavior"},"FullProfileBuyingSegment":{"properties":{"segment_label":{"type":"string","title":"Segment Label"},"job_count":{"type":"integer","title":"Job Count","default":0},"quoted_job_count":{"type":"integer","title":"Quoted Job Count","default":0},"jobs_moved_forward_count":{"type":"integer","title":"Jobs Moved Forward Count","default":0},"avg_ticket":{"type":"number","title":"Avg Ticket","default":0.0},"confidence":{"type":"number","title":"Confidence","default":0.0},"data_sufficiency":{"type":"string","title":"Data Sufficiency","default":"none"},"summary":{"type":"string","title":"Summary","default":""},"outreach_guidance":{"type":"string","title":"Outreach Guidance","default":""}},"type":"object","required":["segment_label"],"title":"FullProfileBuyingSegment"},"FullProfileContact":{"properties":{"contact_value":{"type":"string","title":"Contact Value"},"contact_type":{"type":"string","title":"Contact Type"},"contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Name"},"role":{"type":"string","title":"Role","default":"unknown"},"decision_maker_score":{"type":"number","title":"Decision Maker Score","default":0.0},"preferred_channel":{"type":"string","title":"Preferred Channel","default":"sms"}},"type":"object","required":["contact_value","contact_type"],"title":"FullProfileContact"},"FullProfileEquipment":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"equipment_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Equipment Type"},"installed_on":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Installed On"},"serial_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Serial Number"},"manufacturer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Manufacturer"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"memo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memo"},"manufacturer_warranty_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Manufacturer Warranty End"},"lineage":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Lineage"}},"type":"object","required":["id"],"title":"FullProfileEquipment"},"FullProfileJob":{"properties":{"st_job_id":{"type":"integer","title":"St Job Id"},"job_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Status"},"job_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Type"},"business_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Unit"},"completed_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed Date"},"llm_job_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Llm Job Summary"},"sold_estimate_total":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sold Estimate Total"},"unsold_estimates":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Unsold Estimates"},"technician_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Technician Name"}},"type":"object","required":["st_job_id"],"title":"FullProfileJob"},"FullProfileLocation":{"properties":{"location_id":{"type":"integer","title":"Location Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"classification":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Classification"},"classification_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Classification Reason"},"equipment":{"items":{"$ref":"#/components/schemas/FullProfileEquipment"},"type":"array","title":"Equipment"},"notes":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Notes"}},"type":"object","required":["location_id"],"title":"FullProfileLocation"},"FullProfileMembership":{"properties":{"membership_type_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Membership Type Name"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"from_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Date"},"to_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Date"},"billing_frequency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Frequency"}},"type":"object","title":"FullProfileMembership"},"FullProfileNote":{"properties":{"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"is_pinned":{"type":"boolean","title":"Is Pinned","default":false},"created_on":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created On"}},"type":"object","title":"FullProfileNote"},"FullProfileResponse":{"properties":{"st_customer_id":{"type":"integer","title":"St Customer Id"},"customer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Name"},"customer_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Type"},"customer_address":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Customer Address"},"customer_created_on":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Created On"},"customer_tags":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Customer Tags"},"has_active_membership":{"type":"boolean","title":"Has Active Membership","default":false},"memberships":{"items":{"$ref":"#/components/schemas/FullProfileMembership"},"type":"array","title":"Memberships"},"contacts":{"items":{"$ref":"#/components/schemas/FullProfileContact"},"type":"array","title":"Contacts"},"kpis":{"additionalProperties":true,"type":"object","title":"Kpis"},"locations":{"items":{"$ref":"#/components/schemas/FullProfileLocation"},"type":"array","title":"Locations"},"behavior":{"$ref":"#/components/schemas/FullProfileBehavior"},"recent_jobs":{"items":{"$ref":"#/components/schemas/FullProfileJob"},"type":"array","title":"Recent Jobs"},"customer_notes":{"items":{"$ref":"#/components/schemas/FullProfileNote"},"type":"array","title":"Customer Notes"},"last_synced_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Synced At"}},"type":"object","required":["st_customer_id"],"title":"FullProfileResponse"},"GenerateFirstMessagesRequest":{"properties":{"limit":{"type":"integer","maximum":500.0,"minimum":1.0,"title":"Limit","default":50},"only_pending":{"type":"boolean","title":"Only Pending","default":true}},"type":"object","title":"GenerateFirstMessagesRequest"},"GenerateFirstMessagesResponse":{"properties":{"campaign_id":{"type":"string","title":"Campaign Id"},"generated":{"type":"integer","title":"Generated"},"skipped":{"type":"integer","title":"Skipped"},"failed":{"type":"integer","title":"Failed"}},"type":"object","required":["campaign_id","generated","skipped","failed"],"title":"GenerateFirstMessagesResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HvacSearchResults":{"properties":{"brands":{"items":{"$ref":"#/components/schemas/Brand"},"type":"array","title":"Brands"},"series":{"items":{"$ref":"#/components/schemas/Series"},"type":"array","title":"Series"},"models":{"items":{"$ref":"#/components/schemas/Model"},"type":"array","title":"Models"}},"type":"object","title":"HvacSearchResults"},"InitiateMultipartUploadRequest":{"properties":{"bucket":{"type":"string","title":"Bucket"},"object_key":{"type":"string","title":"Object Key"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"}},"type":"object","required":["bucket","object_key"],"title":"InitiateMultipartUploadRequest"},"InitiateMultipartUploadResponse":{"properties":{"upload_id":{"type":"string","title":"Upload Id"}},"type":"object","required":["upload_id"],"title":"InitiateMultipartUploadResponse"},"IntegrationConfig":{"properties":{"timezone":{"type":"string","title":"Timezone","description":"Timezone of the organization","default":"America/Los_Angeles"},"dmr_config":{"$ref":"#/components/schemas/DmrConfig","description":"DMR (Daily Management Report) thresholds for Praxis orgs"},"org_trades":{"items":{"type":"string"},"type":"array","title":"Org Trades","description":"Authoritative list of trades this organization operates in. Empty means trades are not configured."},"partner_brand":{"anyOf":[{"type":"string","const":"praxis"},{"type":"null"}],"title":"Partner Brand","description":"Partner portfolio brand shown in the manager dashboard. None keeps standard NOSO branding."},"holiday_suppression_enabled":{"type":"boolean","title":"Holiday Suppression Enabled","description":"When True, automated customer messages are deferred on configured US/Canada holidays.","default":true},"holiday_country":{"anyOf":[{"type":"string","enum":["US","CA"]},{"type":"null"}],"title":"Holiday Country","description":"Holiday calendar country. If unset, inferred from the organization timezone and defaults to US."},"holiday_region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Holiday Region","description":"Optional region/province code for holiday rules, e.g. QC for Quebec."},"followup_config":{"$ref":"#/components/schemas/FollowUpStrategyConfig","description":"Followup strategy configuration"},"recording_config":{"$ref":"#/components/schemas/RecordingConfig","description":"Recording processing configuration"},"agent_config":{"$ref":"#/components/schemas/AgentConfig","description":"Agent configuration (SMS agent, etc.)"},"notification_config":{"$ref":"#/components/schemas/NotificationConfig","description":"Notification configuration (email, etc.)"},"dashboard_variant":{"type":"string","enum":["analytics","noops"],"title":"Dashboard Variant","description":"Which dashboard renders at /dashboard for non-aspire orgs. Aspire orgs are derived separately.","default":"analytics"},"MARKET_LEADS_ENABLED":{"type":"boolean","title":"Market Leads Enabled","description":"When True, enables the market lead dashboard, workflows, and background sync for this organization.","default":false},"MARKET_LEADS_BALLPARK_PRICING_ENABLED":{"type":"boolean","title":"Market Leads Ballpark Pricing Enabled","description":"When True, market lead prompts may discuss broad ballpark pricing after the homeowner asks.","default":false},"MARKET_LEADS_SMS_SENDER_USER_ID":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Market Leads Sms Sender User Id","description":"Org-wide users.id used as the SMS sender for market lead conversations."},"MARKET_LEADS_EMAIL_SENDER_ADDRESS":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Market Leads Email Sender Address","description":"Email address of a market-lead-connected inbox used to send (and capture replies for) market lead emails."},"MARKET_LEADS_ST_BUSINESS_UNIT_NAME":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Market Leads St Business Unit Name","description":"Exact ServiceTitan business unit name for market lead jobs. Required before booking can run."},"MARKET_LEADS_ST_JOB_TYPE_NAME":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Market Leads St Job Type Name","description":"Exact ServiceTitan job type name for market lead jobs. Required before booking can run."},"MARKET_LEADS_ST_JOB_ALERT_TO_NUMBER":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Market Leads St Job Alert To Number","description":"E.164 phone number that receives ServiceTitan booked-job alert SMS messages for market lead intake."},"CAMPAIGNS_ENABLED":{"type":"boolean","title":"Campaigns Enabled","description":"When True, enables the campaigns dashboard and the campaign API for this organization. Sole source of truth for campaign visibility; send-side guards are independent of it.","default":false},"CAMPAIGNS_SMS_SENDER_USER_ID":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaigns Sms Sender User Id","description":"Org-wide users.id whose Twilio number sends campaign texts. Used when a campaign does not name its own sender."},"CAMPAIGNS_SENDER_DISPLAY_NAME":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaigns Sender Display Name","description":"First name the AI introduces itself with on campaign texts. Copied onto each new campaign as customer_facing_sender_name; without it the sender user's first name is used."},"mobile_app_config":{"$ref":"#/components/schemas/MobileAppConfig","description":"Mobile app configuration"},"review_config":{"$ref":"#/components/schemas/ReviewConfig","description":"Review-request pipeline configuration"},"operator_config":{"$ref":"#/components/schemas/OperatorConfig","description":"NOSO Operator workflow toggles (per-workflow enablement)"},"business_hours_config":{"$ref":"#/components/schemas/BusinessHoursConfig","description":"Business hours and after-hours call redirect configuration"},"custom_data":{"type":"boolean","title":"Custom Data","description":"When True, enables org-specific custom processing at various pipeline stages. Off by default; toggle on per-integration as needed.","default":false},"st_call_sync_enabled":{"type":"boolean","title":"St Call Sync Enabled","description":"When True, the ServiceTitan telecom call ingestion CLI syncs this organization's office calls into st_calls.","default":false},"st_data_source":{"type":"string","enum":["direct","make_primary","reports_primary"],"title":"St Data Source","description":"Where ServiceTitan reads come from: the direct API, or a staged source (Make lanes / ST scheduled reports; any direct ST client construction raises). What each staged source supports lives in services/st_etl/capabilities.py. Turning an org off is integrations.status, not this field.","default":"direct"},"st_reports_shadow":{"type":"boolean","title":"St Reports Shadow","description":"When True, ST report drops are ingested into st_report_records for this org even though another lane still serves it. Read-only parity mode: never changes st_data_source, never refreshes org settings, never kicks the nightly sync.","default":false},"st_require_feed_freshness":{"type":"boolean","title":"St Require Feed Freshness","description":"When True, the followup pipeline fails closed unless all Make-staged ST feeds cover the processing window.","default":false}},"type":"object","title":"IntegrationConfig","description":"Strongly-typed configuration for an integration.\n\nThis model is stored in integrations.config column."},"IntegrationConfigResponse":{"properties":{"timezone":{"type":"string","title":"Timezone","description":"Timezone of the organization","default":"America/Los_Angeles"},"dmr_config":{"$ref":"#/components/schemas/DmrConfig","description":"DMR (Daily Management Report) thresholds for Praxis orgs"},"org_trades":{"items":{"type":"string"},"type":"array","title":"Org Trades","description":"Authoritative list of trades this organization operates in. Empty means trades are not configured."},"partner_brand":{"anyOf":[{"type":"string","const":"praxis"},{"type":"null"}],"title":"Partner Brand","description":"Partner portfolio brand shown in the manager dashboard. None keeps standard NOSO branding."},"holiday_suppression_enabled":{"type":"boolean","title":"Holiday Suppression Enabled","description":"When True, automated customer messages are deferred on configured US/Canada holidays.","default":true},"holiday_country":{"anyOf":[{"type":"string","enum":["US","CA"]},{"type":"null"}],"title":"Holiday Country","description":"Holiday calendar country. If unset, inferred from the organization timezone and defaults to US."},"holiday_region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Holiday Region","description":"Optional region/province code for holiday rules, e.g. QC for Quebec."},"followup_config":{"$ref":"#/components/schemas/FollowUpStrategyConfig","description":"Followup strategy configuration"},"recording_config":{"$ref":"#/components/schemas/RecordingConfig","description":"Recording processing configuration"},"agent_config":{"$ref":"#/components/schemas/AgentConfig","description":"Agent configuration (SMS agent, etc.)"},"notification_config":{"$ref":"#/components/schemas/NotificationConfig","description":"Notification configuration (email, etc.)"},"dashboard_variant":{"type":"string","enum":["analytics","noops"],"title":"Dashboard Variant","description":"Which dashboard renders at /dashboard for non-aspire orgs. Aspire orgs are derived separately.","default":"analytics"},"MARKET_LEADS_ENABLED":{"type":"boolean","title":"Market Leads Enabled","description":"When True, enables the market lead dashboard, workflows, and background sync for this organization.","default":false},"MARKET_LEADS_BALLPARK_PRICING_ENABLED":{"type":"boolean","title":"Market Leads Ballpark Pricing Enabled","description":"When True, market lead prompts may discuss broad ballpark pricing after the homeowner asks.","default":false},"MARKET_LEADS_SMS_SENDER_USER_ID":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Market Leads Sms Sender User Id","description":"Org-wide users.id used as the SMS sender for market lead conversations."},"MARKET_LEADS_EMAIL_SENDER_ADDRESS":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Market Leads Email Sender Address","description":"Email address of a market-lead-connected inbox used to send (and capture replies for) market lead emails."},"MARKET_LEADS_ST_BUSINESS_UNIT_NAME":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Market Leads St Business Unit Name","description":"Exact ServiceTitan business unit name for market lead jobs. Required before booking can run."},"MARKET_LEADS_ST_JOB_TYPE_NAME":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Market Leads St Job Type Name","description":"Exact ServiceTitan job type name for market lead jobs. Required before booking can run."},"MARKET_LEADS_ST_JOB_ALERT_TO_NUMBER":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Market Leads St Job Alert To Number","description":"E.164 phone number that receives ServiceTitan booked-job alert SMS messages for market lead intake."},"CAMPAIGNS_ENABLED":{"type":"boolean","title":"Campaigns Enabled","description":"When True, enables the campaigns dashboard and the campaign API for this organization. Sole source of truth for campaign visibility; send-side guards are independent of it.","default":false},"CAMPAIGNS_SMS_SENDER_USER_ID":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaigns Sms Sender User Id","description":"Org-wide users.id whose Twilio number sends campaign texts. Used when a campaign does not name its own sender."},"CAMPAIGNS_SENDER_DISPLAY_NAME":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaigns Sender Display Name","description":"First name the AI introduces itself with on campaign texts. Copied onto each new campaign as customer_facing_sender_name; without it the sender user's first name is used."},"mobile_app_config":{"$ref":"#/components/schemas/MobileAppConfig","description":"Mobile app configuration"},"review_config":{"$ref":"#/components/schemas/ReviewConfig","description":"Review-request pipeline configuration"},"operator_config":{"$ref":"#/components/schemas/OperatorConfig","description":"NOSO Operator workflow toggles (per-workflow enablement)"},"business_hours_config":{"$ref":"#/components/schemas/BusinessHoursConfig","description":"Business hours and after-hours call redirect configuration"},"custom_data":{"type":"boolean","title":"Custom Data","description":"When True, enables org-specific custom processing at various pipeline stages. Off by default; toggle on per-integration as needed.","default":false},"st_call_sync_enabled":{"type":"boolean","title":"St Call Sync Enabled","description":"When True, the ServiceTitan telecom call ingestion CLI syncs this organization's office calls into st_calls.","default":false},"st_data_source":{"type":"string","enum":["direct","make_primary","reports_primary"],"title":"St Data Source","description":"Where ServiceTitan reads come from: the direct API, or a staged source (Make lanes / ST scheduled reports; any direct ST client construction raises). What each staged source supports lives in services/st_etl/capabilities.py. Turning an org off is integrations.status, not this field.","default":"direct"},"st_reports_shadow":{"type":"boolean","title":"St Reports Shadow","description":"When True, ST report drops are ingested into st_report_records for this org even though another lane still serves it. Read-only parity mode: never changes st_data_source, never refreshes org settings, never kicks the nightly sync.","default":false},"st_require_feed_freshness":{"type":"boolean","title":"St Require Feed Freshness","description":"When True, the followup pipeline fails closed unless all Make-staged ST feeds cover the processing window.","default":false},"operator_workflow_flags":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Operator Workflow Flags","description":"Derived from operator_config.workflow_flags(); response-only."}},"type":"object","title":"IntegrationConfigResponse","description":"Config API response: IntegrationConfig plus response-only derived fields.\n\nNever persisted — the save path validates input as plain IntegrationConfig,\nso derived fields round-tripped by the dashboard are dropped before storage."},"JobActionDispatchResponse":{"properties":{"request_id":{"type":"string","title":"Request Id"},"status":{"type":"string","const":"queued","title":"Status"},"action":{"type":"string","enum":["send_email","scrape_events"],"title":"Action"}},"type":"object","required":["request_id","status","action"],"title":"JobActionDispatchResponse"},"JobActionStatusResponse":{"properties":{"request_id":{"type":"string","title":"Request Id"},"action":{"type":"string","enum":["send_email","scrape_events","unknown"],"title":"Action"},"status":{"type":"string","enum":["pending","completed","failed"],"title":"Status"},"result":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Result"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["request_id","action","status"],"title":"JobActionStatusResponse"},"JobCancelReason":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"JobCancelReason"},"LaborWarrantyAuthority":{"properties":{"offered":{"type":"boolean","title":"Offered","default":false}},"type":"object","title":"LaborWarrantyAuthority"},"LandscapingAspireAttachmentRequest":{"properties":{"force":{"type":"boolean","title":"Force","default":false}},"type":"object","title":"LandscapingAspireAttachmentRequest"},"LandscapingCreateOpportunityRequest":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"}},"type":"object","required":["name"],"title":"LandscapingCreateOpportunityRequest"},"LandscapingPhotoAnnotation":{"properties":{"v":{"type":"integer","const":1,"title":"V"},"ref":{"$ref":"#/components/schemas/LandscapingPhotoAnnotationRef"},"items":{"items":{"oneOf":[{"$ref":"#/components/schemas/LandscapingPhotoAnnotationPen"},{"$ref":"#/components/schemas/LandscapingPhotoAnnotationLine"},{"$ref":"#/components/schemas/LandscapingPhotoAnnotationRect"},{"$ref":"#/components/schemas/LandscapingPhotoAnnotationEllipse"},{"$ref":"#/components/schemas/LandscapingPhotoAnnotationText"}],"discriminator":{"propertyName":"kind","mapping":{"arrow":"#/components/schemas/LandscapingPhotoAnnotationLine","ellipse":"#/components/schemas/LandscapingPhotoAnnotationEllipse","line":"#/components/schemas/LandscapingPhotoAnnotationLine","pen":"#/components/schemas/LandscapingPhotoAnnotationPen","rect":"#/components/schemas/LandscapingPhotoAnnotationRect","text":"#/components/schemas/LandscapingPhotoAnnotationText"}}},"type":"array","maxItems":400,"minItems":1,"title":"Items"}},"type":"object","required":["v","ref","items"],"title":"LandscapingPhotoAnnotation"},"LandscapingPhotoAnnotationEllipse":{"properties":{"id":{"type":"string","maxLength":64,"minLength":1,"title":"Id"},"color":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$","title":"Color"},"kind":{"type":"string","const":"ellipse","title":"Kind"},"sw":{"type":"number","maximum":0.2,"exclusiveMinimum":0.0,"title":"Sw"},"cx":{"type":"number","maximum":3.0,"minimum":-2.0,"title":"Cx"},"cy":{"type":"number","maximum":3.0,"minimum":-2.0,"title":"Cy"},"rx":{"type":"number","maximum":3.0,"minimum":0.0,"title":"Rx"},"ry":{"type":"number","maximum":3.0,"minimum":0.0,"title":"Ry"}},"type":"object","required":["id","color","kind","sw","cx","cy","rx","ry"],"title":"LandscapingPhotoAnnotationEllipse"},"LandscapingPhotoAnnotationLine":{"properties":{"id":{"type":"string","maxLength":64,"minLength":1,"title":"Id"},"color":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$","title":"Color"},"kind":{"type":"string","enum":["line","arrow"],"title":"Kind"},"sw":{"type":"number","maximum":0.2,"exclusiveMinimum":0.0,"title":"Sw"},"x1":{"type":"number","maximum":3.0,"minimum":-2.0,"title":"X1"},"y1":{"type":"number","maximum":3.0,"minimum":-2.0,"title":"Y1"},"x2":{"type":"number","maximum":3.0,"minimum":-2.0,"title":"X2"},"y2":{"type":"number","maximum":3.0,"minimum":-2.0,"title":"Y2"}},"type":"object","required":["id","color","kind","sw","x1","y1","x2","y2"],"title":"LandscapingPhotoAnnotationLine"},"LandscapingPhotoAnnotationPen":{"properties":{"id":{"type":"string","maxLength":64,"minLength":1,"title":"Id"},"color":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$","title":"Color"},"kind":{"type":"string","const":"pen","title":"Kind"},"sw":{"type":"number","maximum":0.2,"exclusiveMinimum":0.0,"title":"Sw"},"pts":{"items":{"type":"number"},"type":"array","maxItems":4000,"minItems":2,"title":"Pts"}},"type":"object","required":["id","color","kind","sw","pts"],"title":"LandscapingPhotoAnnotationPen"},"LandscapingPhotoAnnotationRect":{"properties":{"id":{"type":"string","maxLength":64,"minLength":1,"title":"Id"},"color":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$","title":"Color"},"kind":{"type":"string","const":"rect","title":"Kind"},"sw":{"type":"number","maximum":0.2,"exclusiveMinimum":0.0,"title":"Sw"},"x":{"type":"number","maximum":3.0,"minimum":-2.0,"title":"X"},"y":{"type":"number","maximum":3.0,"minimum":-2.0,"title":"Y"},"w":{"type":"number","maximum":3.0,"minimum":0.0,"title":"W"},"h":{"type":"number","maximum":3.0,"minimum":0.0,"title":"H"}},"type":"object","required":["id","color","kind","sw","x","y","w","h"],"title":"LandscapingPhotoAnnotationRect"},"LandscapingPhotoAnnotationRef":{"properties":{"w":{"type":"integer","maximum":100000.0,"exclusiveMinimum":0.0,"title":"W"},"h":{"type":"integer","maximum":100000.0,"exclusiveMinimum":0.0,"title":"H"}},"type":"object","required":["w","h"],"title":"LandscapingPhotoAnnotationRef"},"LandscapingPhotoAnnotationText":{"properties":{"id":{"type":"string","maxLength":64,"minLength":1,"title":"Id"},"color":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$","title":"Color"},"kind":{"type":"string","const":"text","title":"Kind"},"fs":{"type":"number","maximum":0.5,"exclusiveMinimum":0.0,"title":"Fs"},"x":{"type":"number","maximum":3.0,"minimum":-2.0,"title":"X"},"y":{"type":"number","maximum":3.0,"minimum":-2.0,"title":"Y"},"text":{"type":"string","maxLength":300,"minLength":1,"title":"Text"}},"type":"object","required":["id","color","kind","fs","x","y","text"],"title":"LandscapingPhotoAnnotationText"},"LandscapingProposalAssetsResponse":{"properties":{"photos":{"items":{"$ref":"#/components/schemas/LandscapingProposalPhoto"},"type":"array","title":"Photos"},"audio_assets":{"items":{"$ref":"#/components/schemas/LandscapingProposalAudioAsset"},"type":"array","title":"Audio Assets"}},"type":"object","required":["photos","audio_assets"],"title":"LandscapingProposalAssetsResponse"},"LandscapingProposalAudioAsset":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"event_id":{"type":"string","format":"uuid","title":"Event Id"},"organization_id":{"type":"string","title":"Organization Id"},"source":{"type":"string","const":"plaud","title":"Source"},"plaud_serial_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plaud Serial Number"},"plaud_session_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Plaud Session Id"},"device_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Name"},"recording_started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Recording Started At"},"recording_ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Recording Ended At"},"audio_duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Audio Duration Ms"},"s3_bucket":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"S3 Bucket"},"s3_object_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"S3 Object Key"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"},"file_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"File Size"},"status":{"type":"string","enum":["pending_upload","uploaded","transcribing","transcribed","failed"],"title":"Status"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"excluded":{"type":"boolean","title":"Excluded","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","event_id","organization_id","source","status","created_at","updated_at"],"title":"LandscapingProposalAudioAsset"},"LandscapingProposalAudioAssetCreate":{"properties":{"source":{"type":"string","const":"plaud","title":"Source","default":"plaud"},"plaud_serial_number":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Plaud Serial Number"},"plaud_session_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Plaud Session Id"},"device_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Device Name"},"recording_started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Recording Started At"},"recording_ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Recording Ended At"},"audio_duration_ms":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Audio Duration Ms"},"s3_bucket":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"S3 Bucket"},"s3_object_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"S3 Object Key"},"content_type":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Content Type"},"file_size":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"File Size"},"status":{"type":"string","enum":["pending_upload","uploaded","transcribing","transcribed","failed"],"title":"Status","default":"pending_upload"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","title":"LandscapingProposalAudioAssetCreate"},"LandscapingProposalAudioAssetUpdate":{"properties":{"plaud_serial_number":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Plaud Serial Number"},"plaud_session_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Plaud Session Id"},"device_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Device Name"},"recording_started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Recording Started At"},"recording_ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Recording Ended At"},"audio_duration_ms":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Audio Duration Ms"},"s3_bucket":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"S3 Bucket"},"s3_object_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"S3 Object Key"},"content_type":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Content Type"},"file_size":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"File Size"},"status":{"anyOf":[{"type":"string","enum":["pending_upload","uploaded","transcribing","transcribed","failed"]},{"type":"null"}],"title":"Status"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"excluded":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Excluded"}},"type":"object","title":"LandscapingProposalAudioAssetUpdate"},"LandscapingProposalAudioUploadUrlRequest":{"properties":{"file_name":{"type":"string","maxLength":256,"minLength":1,"title":"File Name"},"content_type":{"type":"string","maxLength":128,"minLength":1,"title":"Content Type","default":"audio/mpeg"}},"type":"object","required":["file_name"],"title":"LandscapingProposalAudioUploadUrlRequest"},"LandscapingProposalAudioUploadUrlResponse":{"properties":{"upload_url":{"type":"string","title":"Upload Url"},"s3_bucket":{"type":"string","title":"S3 Bucket"},"s3_object_key":{"type":"string","title":"S3 Object Key"}},"type":"object","required":["upload_url","s3_bucket","s3_object_key"],"title":"LandscapingProposalAudioUploadUrlResponse"},"LandscapingProposalDocumentSend":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","title":"Organization Id"},"event_id":{"type":"string","format":"uuid","title":"Event Id"},"draft_id":{"type":"string","format":"uuid","title":"Draft Id"},"output_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Output Id"},"channel":{"type":"string","title":"Channel"},"recipients":{"items":{"type":"string"},"type":"array","title":"Recipients"},"sent_by":{"type":"string","title":"Sent By"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","organization_id","event_id","draft_id","channel","sent_by","created_at"],"title":"LandscapingProposalDocumentSend"},"LandscapingProposalDocumentSendCreate":{"properties":{"channel":{"type":"string","enum":["email","share","copy"],"title":"Channel","default":"email"},"recipients":{"items":{"type":"string"},"type":"array","maxItems":16,"title":"Recipients"},"output_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Output Id"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","title":"LandscapingProposalDocumentSendCreate"},"LandscapingProposalDraft":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"event_id":{"type":"string","format":"uuid","title":"Event Id"},"organization_id":{"type":"string","title":"Organization Id"},"template_registry_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Template Registry Id"},"template_id":{"type":"string","title":"Template Id"},"proposal_type":{"type":"string","title":"Proposal Type"},"status":{"type":"string","enum":["draft","ready","failed","archived"],"title":"Status"},"source_generation_run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Generation Run Id"},"draft_generation_run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Draft Generation Run Id"},"draft_json":{"additionalProperties":true,"type":"object","title":"Draft Json"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"version_number":{"type":"integer","title":"Version Number","default":1},"parent_draft_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Draft Id"},"root_draft_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Root Draft Id"},"section_selection":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Section Selection"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","event_id","organization_id","template_id","proposal_type","status","created_at","updated_at"],"title":"LandscapingProposalDraft"},"LandscapingProposalDraftGenerateRequest":{"properties":{"template_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Template Id"},"proposal_type":{"type":"string","maxLength":64,"minLength":1,"title":"Proposal Type","default":"enhancement"},"template_version":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Template Version"},"semantic_match_run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Semantic Match Run Id"},"display_name":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Display Name"}},"type":"object","title":"LandscapingProposalDraftGenerateRequest"},"LandscapingProposalDraftPhotoAnnotationUpdate":{"properties":{"annotation":{"anyOf":[{"$ref":"#/components/schemas/LandscapingPhotoAnnotation"},{"type":"null"}]}},"type":"object","title":"LandscapingProposalDraftPhotoAnnotationUpdate"},"LandscapingProposalDraftPhotoRefCreate":{"properties":{"photo_id":{"type":"string","format":"uuid","title":"Photo Id"},"label":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Label","default":"Current"},"caption":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Caption"},"source":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Source","default":"app_camera"},"position":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Position"}},"type":"object","required":["photo_id"],"title":"LandscapingProposalDraftPhotoRefCreate"},"LandscapingProposalDraftRenameRequest":{"properties":{"display_name":{"type":"string","maxLength":80,"minLength":1,"title":"Display Name"}},"type":"object","required":["display_name"],"title":"LandscapingProposalDraftRenameRequest"},"LandscapingProposalDraftSectionReorder":{"properties":{"section_ids":{"items":{"type":"string"},"type":"array","maxItems":64,"minItems":1,"title":"Section Ids"}},"type":"object","required":["section_ids"],"title":"LandscapingProposalDraftSectionReorder"},"LandscapingProposalDraftSectionUpdate":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":180},{"type":"null"}],"title":"Title"},"recommendation_level":{"anyOf":[{"type":"string","enum":["priority","recommended","optional"]},{"type":"null"}],"title":"Recommendation Level"},"location":{"anyOf":[{"type":"string","maxLength":180},{"type":"null"}],"title":"Location"},"description":{"anyOf":[{"type":"string","maxLength":1400},{"type":"null"}],"title":"Description"},"problem":{"anyOf":[{"type":"string","maxLength":1200},{"type":"null"}],"title":"Problem"},"impact":{"anyOf":[{"type":"string","maxLength":1200},{"type":"null"}],"title":"Impact"},"recommendation":{"anyOf":[{"type":"string","maxLength":1400},{"type":"null"}],"title":"Recommendation"},"scope_bullets":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scope Bullets"},"value_points":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Value Points"},"photo_refs":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Photo Refs"},"pricing":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Pricing"},"evidence":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Evidence"},"confidence":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Confidence"}},"type":"object","title":"LandscapingProposalDraftSectionUpdate"},"LandscapingProposalDraftUpdate":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":180},{"type":"null"}],"title":"Title"},"executive_summary":{"anyOf":[{"type":"string","maxLength":1600},{"type":"null"}],"title":"Executive Summary"},"positive_observations":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Positive Observations"},"notes":{"anyOf":[{"type":"string","maxLength":1600},{"type":"null"}],"title":"Notes"},"investment_options":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Investment Options"},"sections":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Sections"},"draft_json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Draft Json"},"status":{"anyOf":[{"type":"string","enum":["draft","ready","failed","archived"]},{"type":"null"}],"title":"Status"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","title":"LandscapingProposalDraftUpdate"},"LandscapingProposalDraftVersionCreateRequest":{"properties":{"kept_section_ids":{"items":{"type":"string"},"type":"array","maxItems":64,"minItems":1,"title":"Kept Section Ids"}},"type":"object","required":["kept_section_ids"],"title":"LandscapingProposalDraftVersionCreateRequest"},"LandscapingProposalEvent":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","title":"Organization Id"},"clerk_user_id":{"type":"string","title":"Clerk User Id"},"title":{"type":"string","title":"Title"},"customer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Name"},"property_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property Name"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"status":{"type":"string","enum":["draft","capturing","processing","ready","failed","archived"],"title":"Status"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At"},"crm_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Crm Source"},"crm_job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Crm Job Id"},"crm_customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Crm Customer Id"},"crm_property_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Crm Property Id"},"crm_opportunity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Crm Opportunity Id"},"crm_opportunity_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Crm Opportunity Name"},"anchor_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Anchor Time"},"gist":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gist"},"cover_photo_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Cover Photo Id"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","organization_id","clerk_user_id","title","status","created_at","updated_at"],"title":"LandscapingProposalEvent"},"LandscapingProposalEventCreate":{"properties":{"title":{"type":"string","maxLength":256,"minLength":1,"title":"Title"},"customer_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Customer Name"},"property_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Property Name"},"address":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}],"title":"Address"},"crm_source":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Crm Source"},"crm_job_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Crm Job Id"},"crm_customer_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Crm Customer Id"},"crm_property_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Crm Property Id"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["title"],"title":"LandscapingProposalEventCreate"},"LandscapingProposalEventList":{"properties":{"events":{"items":{"$ref":"#/components/schemas/LandscapingProposalEvent"},"type":"array","title":"Events"}},"type":"object","required":["events"],"title":"LandscapingProposalEventList"},"LandscapingProposalEventUpdate":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":256,"minLength":1},{"type":"null"}],"title":"Title"},"customer_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Customer Name"},"property_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Property Name"},"address":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}],"title":"Address"},"status":{"anyOf":[{"type":"string","enum":["draft","capturing","processing","ready","failed","archived"]},{"type":"null"}],"title":"Status"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At"},"crm_source":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Crm Source"},"crm_job_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Crm Job Id"},"crm_customer_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Crm Customer Id"},"crm_property_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Crm Property Id"},"crm_opportunity_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Crm Opportunity Id"},"crm_opportunity_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Crm Opportunity Name"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","title":"LandscapingProposalEventUpdate"},"LandscapingProposalGenerationRun":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"event_id":{"type":"string","format":"uuid","title":"Event Id"},"organization_id":{"type":"string","title":"Organization Id"},"status":{"type":"string","enum":["pending","running","success","failed"],"title":"Status"},"prompt_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt Version"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"input_snapshot":{"additionalProperties":true,"type":"object","title":"Input Snapshot"},"output_json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Output Json"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","event_id","organization_id","status","created_at","updated_at"],"title":"LandscapingProposalGenerationRun"},"LandscapingProposalOutput":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"event_id":{"type":"string","format":"uuid","title":"Event Id"},"organization_id":{"type":"string","title":"Organization Id"},"draft_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Draft Id"},"template_registry_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Template Registry Id"},"template_id":{"type":"string","title":"Template Id"},"proposal_type":{"type":"string","title":"Proposal Type"},"status":{"type":"string","enum":["success","failed","archived"],"title":"Status"},"s3_bucket":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"S3 Bucket"},"s3_object_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"S3 Object Key"},"content_type":{"type":"string","title":"Content Type"},"file_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"File Size"},"render_data":{"additionalProperties":true,"type":"object","title":"Render Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","event_id","organization_id","template_id","proposal_type","status","content_type","created_at","updated_at"],"title":"LandscapingProposalOutput"},"LandscapingProposalPhoto":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"event_id":{"type":"string","format":"uuid","title":"Event Id"},"organization_id":{"type":"string","title":"Organization Id"},"capture_source":{"type":"string","enum":["app_camera","photo_library","manual_override"],"title":"Capture Source"},"original_photo_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Original Photo Id"},"captured_at":{"type":"string","format":"date-time","title":"Captured At"},"s3_bucket":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"S3 Bucket"},"s3_object_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"S3 Object Key"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"},"file_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"File Size"},"width":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Width"},"height":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Height"},"status":{"type":"string","enum":["pending_upload","uploaded","captioning","captioned","failed"],"title":"Status"},"caption":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caption"},"vision_labels":{"items":{},"type":"array","title":"Vision Labels"},"annotation":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Annotation"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"excluded":{"type":"boolean","title":"Excluded","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","event_id","organization_id","capture_source","captured_at","status","created_at","updated_at"],"title":"LandscapingProposalPhoto"},"LandscapingProposalPhotoCreate":{"properties":{"captured_at":{"type":"string","format":"date-time","title":"Captured At"},"capture_source":{"type":"string","enum":["app_camera","photo_library","manual_override"],"title":"Capture Source","default":"app_camera"},"original_photo_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Original Photo Id"},"s3_bucket":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"S3 Bucket"},"s3_object_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"S3 Object Key"},"content_type":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Content Type","default":"image/jpeg"},"file_size":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"File Size"},"width":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Width"},"height":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Height"},"status":{"type":"string","enum":["pending_upload","uploaded","captioning","captioned","failed"],"title":"Status","default":"pending_upload"},"caption":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caption"},"vision_labels":{"items":{},"type":"array","title":"Vision Labels"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["captured_at"],"title":"LandscapingProposalPhotoCreate"},"LandscapingProposalPhotoUpdate":{"properties":{"capture_source":{"anyOf":[{"type":"string","enum":["app_camera","photo_library","manual_override"]},{"type":"null"}],"title":"Capture Source"},"original_photo_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Original Photo Id"},"captured_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Captured At"},"s3_bucket":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"S3 Bucket"},"s3_object_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"S3 Object Key"},"content_type":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Content Type"},"file_size":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"File Size"},"width":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Width"},"height":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Height"},"status":{"anyOf":[{"type":"string","enum":["pending_upload","uploaded","captioning","captioned","failed"]},{"type":"null"}],"title":"Status"},"caption":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caption"},"vision_labels":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Vision Labels"},"annotation":{"anyOf":[{"$ref":"#/components/schemas/LandscapingPhotoAnnotation"},{"type":"null"}]},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"excluded":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Excluded"}},"type":"object","title":"LandscapingProposalPhotoUpdate"},"LandscapingProposalPhotoUploadUrlRequest":{"properties":{"file_name":{"type":"string","maxLength":256,"minLength":1,"title":"File Name"},"content_type":{"type":"string","maxLength":128,"minLength":1,"title":"Content Type","default":"image/jpeg"}},"type":"object","required":["file_name"],"title":"LandscapingProposalPhotoUploadUrlRequest"},"LandscapingProposalPhotoUploadUrlResponse":{"properties":{"upload_url":{"type":"string","title":"Upload Url"},"s3_bucket":{"type":"string","title":"S3 Bucket"},"s3_object_key":{"type":"string","title":"S3 Object Key"}},"type":"object","required":["upload_url","s3_bucket","s3_object_key"],"title":"LandscapingProposalPhotoUploadUrlResponse"},"LandscapingProposalPreprocessingCounts":{"properties":{"total":{"type":"integer","title":"Total","default":0},"pending_upload":{"type":"integer","title":"Pending Upload","default":0},"queued":{"type":"integer","title":"Queued","default":0},"processing":{"type":"integer","title":"Processing","default":0},"completed":{"type":"integer","title":"Completed","default":0},"failed":{"type":"integer","title":"Failed","default":0}},"type":"object","title":"LandscapingProposalPreprocessingCounts"},"LandscapingProposalPreprocessingStatus":{"properties":{"event_id":{"type":"string","format":"uuid","title":"Event Id"},"status":{"type":"string","enum":["waiting_for_upload","processing","ready","failed"],"title":"Status"},"ready":{"type":"boolean","title":"Ready"},"progress_percent":{"type":"integer","title":"Progress Percent","default":0},"current_stage":{"type":"string","enum":["waiting_for_upload","analyzing_assets","ready","needs_attention"],"title":"Current Stage"},"message":{"type":"string","title":"Message"},"photos":{"$ref":"#/components/schemas/LandscapingProposalPreprocessingCounts"},"audio":{"$ref":"#/components/schemas/LandscapingProposalPreprocessingCounts"},"failed_assets":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Failed Assets"}},"type":"object","required":["event_id","status","ready","current_stage","message","photos","audio"],"title":"LandscapingProposalPreprocessingStatus"},"LandscapingProposalSendEmailRequest":{"properties":{"recipients":{"items":{"type":"string"},"type":"array","maxItems":16,"minItems":1,"title":"Recipients"},"subject":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Subject"},"body_text":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Body Text"},"output_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Output Id"}},"type":"object","required":["recipients"],"title":"LandscapingProposalSendEmailRequest"},"LandscapingProposalTemplate":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","title":"Organization Id"},"template_id":{"type":"string","title":"Template Id"},"display_name":{"type":"string","title":"Display Name"},"proposal_type":{"type":"string","title":"Proposal Type"},"version":{"type":"integer","title":"Version"},"status":{"type":"string","enum":["draft","active","archived"],"title":"Status"},"s3_bucket":{"type":"string","title":"S3 Bucket"},"s3_prefix":{"type":"string","title":"S3 Prefix"},"manifest_s3_object_key":{"type":"string","title":"Manifest S3 Object Key"},"renderer_kind":{"type":"string","title":"Renderer Kind"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","organization_id","template_id","display_name","proposal_type","version","status","s3_bucket","s3_prefix","manifest_s3_object_key","renderer_kind","created_at","updated_at"],"title":"LandscapingProposalTemplate"},"LandscapingProposalTemplateBundle":{"properties":{"template":{"$ref":"#/components/schemas/LandscapingProposalTemplate"},"manifest":{"additionalProperties":true,"type":"object","title":"Manifest"},"source_keys":{"additionalProperties":{"type":"string"},"type":"object","title":"Source Keys"},"draft_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Draft Schema"},"render_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Render Schema"},"org_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Prompt"},"template_html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Html"}},"type":"object","required":["template","manifest"],"title":"LandscapingProposalTemplateBundle"},"LandscapingProposalTemplateList":{"properties":{"templates":{"items":{"$ref":"#/components/schemas/LandscapingProposalTemplate"},"type":"array","title":"Templates"}},"type":"object","required":["templates"],"title":"LandscapingProposalTemplateList"},"LandscapingProposalVisitDocument":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"kind":{"type":"string","enum":["proposal_draft","proposal_pdf"],"title":"Kind"},"status":{"type":"string","title":"Status"},"template_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Id"},"proposal_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposal Type"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","kind","status","created_at"],"title":"LandscapingProposalVisitDocument"},"LandscapingProposalVisitList":{"properties":{"visits":{"items":{"$ref":"#/components/schemas/LandscapingProposalVisitListItem"},"type":"array","title":"Visits"}},"type":"object","required":["visits"],"title":"LandscapingProposalVisitList"},"LandscapingProposalVisitListItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","title":"Organization Id"},"clerk_user_id":{"type":"string","title":"Clerk User Id"},"title":{"type":"string","title":"Title"},"customer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Name"},"property_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property Name"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"status":{"type":"string","enum":["draft","capturing","processing","ready","failed","archived"],"title":"Status"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At"},"crm_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Crm Source"},"crm_job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Crm Job Id"},"crm_customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Crm Customer Id"},"crm_property_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Crm Property Id"},"crm_opportunity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Crm Opportunity Id"},"crm_opportunity_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Crm Opportunity Name"},"anchor_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Anchor Time"},"gist":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gist"},"cover_photo_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Cover Photo Id"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"recording_count":{"type":"integer","title":"Recording Count","default":0},"photo_count":{"type":"integer","title":"Photo Count","default":0},"cover_photo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cover Photo Url"},"documents":{"items":{"$ref":"#/components/schemas/LandscapingProposalVisitDocument"},"type":"array","title":"Documents"},"recap_sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Recap Sent At"},"description_copied_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Description Copied At"}},"type":"object","required":["id","organization_id","clerk_user_id","title","status","created_at","updated_at"],"title":"LandscapingProposalVisitListItem"},"LaunchedCampaignRef":{"properties":{"campaign_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign Id"},"campaign_name":{"type":"string","title":"Campaign Name","default":""},"launched_at":{"type":"string","title":"Launched At","default":""},"audience_count":{"type":"integer","title":"Audience Count","default":0},"control_count":{"type":"integer","title":"Control Count","default":0},"sent_count":{"type":"integer","title":"Sent Count","default":0},"replied_count":{"type":"integer","title":"Replied Count","default":0},"goal_met_count":{"type":"integer","title":"Goal Met Count","default":0},"goal_noun":{"type":"string","title":"Goal Noun","default":"goals met"},"reasoning":{"anyOf":[{"$ref":"#/components/schemas/CampaignReasoning"},{"type":"null"}]}},"type":"object","title":"LaunchedCampaignRef"},"LifecycleEmailUpdate":{"properties":{"kind":{"type":"string","pattern":"^(kickoff|golive)$","title":"Kind"},"send_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Send At"},"auto_send":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Send"},"subject":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Subject"},"body":{"anyOf":[{"type":"string","maxLength":5000,"minLength":1},{"type":"null"}],"title":"Body"},"cc_emails":{"anyOf":[{"items":{"type":"string","format":"email"},"type":"array"},{"type":"null"}],"title":"Cc Emails"},"save_as_template":{"type":"boolean","title":"Save As Template","default":false}},"type":"object","required":["kind"],"title":"LifecycleEmailUpdate"},"ListUploadedPartsRequest":{"properties":{"bucket":{"type":"string","title":"Bucket"},"object_key":{"type":"string","title":"Object Key"},"upload_id":{"type":"string","title":"Upload Id"}},"type":"object","required":["bucket","object_key","upload_id"],"title":"ListUploadedPartsRequest"},"ListUploadedPartsResponse":{"properties":{"parts":{"items":{},"type":"array","title":"Parts"}},"type":"object","required":["parts"],"title":"ListUploadedPartsResponse"},"MakeItRightAuthority":{"properties":{"offered":{"type":"boolean","title":"Offered","default":false}},"type":"object","title":"MakeItRightAuthority"},"Manual":{"properties":{"name_id":{"type":"string","title":"Name Id","example":"installation_guide_rev_a"},"model_id":{"type":"string","format":"uuid","title":"Model Id"},"bucket":{"type":"string","title":"Bucket","example":"noso-training-data"},"bucket_path":{"type":"string","title":"Bucket Path","example":"havc/brands/carrier/series/123/models/XYZ/manuals/install_guide.pdf"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type","example":"installation_manual"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","example":"Installation guide for model XYZ"},"preview_image_bucket_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preview Image Bucket Path","example":"havc/brands/carrier/manuals/preview.png"},"total_pages":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Pages","example":120},"id":{"type":"string","format":"uuid","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"file_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"File Url","description":"Full URL to the manual file, constructed by backend"},"preview_image_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Preview Image Url","description":"Full URL to the preview image, constructed by backend"}},"type":"object","required":["name_id","model_id","bucket","bucket_path","id","created_at"],"title":"Manual"},"ManualOfficeEscalationRequest":{"properties":{"summary":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Summary"},"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Reason"}},"type":"object","title":"ManualOfficeEscalationRequest"},"MarkFollowupLostRequest":{"properties":{"dismissal_reason":{"type":"string","title":"Dismissal Reason"},"dismiss_estimates":{"type":"boolean","title":"Dismiss Estimates","default":false}},"type":"object","required":["dismissal_reason"],"title":"MarkFollowupLostRequest"},"MarketLeadAgentActivityItem":{"properties":{"id":{"type":"string","title":"Id"},"event_type":{"type":"string","title":"Event Type"},"actor_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor Name"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","event_type"],"title":"MarketLeadAgentActivityItem"},"MarketLeadBookJobResponse":{"properties":{"lead":{"$ref":"#/components/schemas/MarketLeadSummary"},"job_id":{"anyOf":[{"type":"integer"},{"type":"string"}],"title":"Job Id"},"notification_status":{"type":"string","title":"Notification Status"}},"type":"object","required":["lead","job_id","notification_status"],"title":"MarketLeadBookJobResponse"},"MarketLeadChecklistItem":{"properties":{"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"},"tier":{"type":"string","enum":["required","enrichment"],"title":"Tier"},"verdict":{"type":"string","enum":["good","bad","pending"],"title":"Verdict","default":"pending"},"filled":{"type":"boolean","title":"Filled"},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value"}},"type":"object","required":["key","label","tier","filled"],"title":"MarketLeadChecklistItem"},"MarketLeadComfortAdvisorPerformance":{"properties":{"comfort_advisor_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comfort Advisor Id"},"comfort_advisor_name":{"type":"string","title":"Comfort Advisor Name"},"won":{"type":"integer","title":"Won"},"total_contacted":{"type":"integer","title":"Total Contacted","default":0},"revenue":{"type":"number","title":"Revenue"},"conversion_rate":{"type":"number","title":"Conversion Rate"},"reply_rate":{"type":"number","title":"Reply Rate"},"median_speed_to_lead_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Median Speed To Lead Seconds"},"active_pipeline":{"type":"integer","title":"Active Pipeline","default":0},"jobs":{"items":{"$ref":"#/components/schemas/MarketLeadWonJob"},"type":"array","title":"Jobs"}},"type":"object","required":["comfort_advisor_name","won","revenue","conversion_rate","reply_rate"],"title":"MarketLeadComfortAdvisorPerformance"},"MarketLeadDetail":{"properties":{"id":{"type":"string","title":"Id"},"source_key":{"type":"string","title":"Source Key"},"source_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Display Name"},"customer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Name"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"primary_contact_method":{"type":"string","title":"Primary Contact Method"},"preferred_contact_method":{"type":"string","title":"Preferred Contact Method"},"status":{"type":"string","title":"Status"},"qualification_status":{"type":"string","title":"Qualification Status"},"service_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Category"},"project_details":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Details"},"ai_paused":{"type":"boolean","title":"Ai Paused","default":false},"needs_office":{"type":"boolean","title":"Needs Office","default":false},"st_job_id":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"St Job Id"},"st_booking_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"St Booking Status"},"st_booking_started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"St Booking Started At"},"st_booking_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"St Booking Error"},"backoffice_notification_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Backoffice Notification Status"},"first_contacted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Contacted At"},"last_message_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Message At"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"address":{"additionalProperties":true,"type":"object","title":"Address"},"consent_metadata":{"additionalProperties":true,"type":"object","title":"Consent Metadata"},"raw_payload":{"additionalProperties":true,"type":"object","title":"Raw Payload"},"qualification_facts":{"additionalProperties":true,"type":"object","title":"Qualification Facts"},"missing_facts":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Missing Facts"},"disqualifiers":{"additionalProperties":true,"type":"object","title":"Disqualifiers"},"disqualification_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Disqualification Reason"},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id"},"st_customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"St Customer Id"},"st_location_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"St Location Id"},"st_campaign_id":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"St Campaign Id"},"st_campaign_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"St Campaign Name"},"st_job_created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"St Job Created At"},"st_job_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"St Job Summary"},"st_job_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"St Job Url"},"booked_appointment_start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Booked Appointment Start"},"booked_appointment_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Booked Appointment End"},"backoffice_notification_sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Backoffice Notification Sent At"},"backoffice_notification_recipients":{"items":{"type":"string"},"type":"array","title":"Backoffice Notification Recipients"},"backoffice_notification_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Backoffice Notification Error"}},"type":"object","required":["id","source_key","primary_contact_method","preferred_contact_method","status","qualification_status"],"title":"MarketLeadDetail"},"MarketLeadDetailResponse":{"properties":{"lead":{"$ref":"#/components/schemas/MarketLeadDetail"},"timeline":{"items":{"$ref":"#/components/schemas/MarketLeadTimelineItem"},"type":"array","title":"Timeline"},"sender_config":{"$ref":"#/components/schemas/MarketLeadSenderConfig"},"qualification_checklist":{"items":{"$ref":"#/components/schemas/MarketLeadChecklistItem"},"type":"array","title":"Qualification Checklist"},"agent_activity":{"items":{"$ref":"#/components/schemas/MarketLeadAgentActivityItem"},"type":"array","title":"Agent Activity"},"lsa_context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Lsa Context"}},"type":"object","required":["lead","timeline","sender_config"],"title":"MarketLeadDetailResponse"},"MarketLeadEmailReplyRequest":{"properties":{"body":{"type":"string","maxLength":12000,"minLength":1,"title":"Body"},"subject":{"anyOf":[{"type":"string","maxLength":250},{"type":"null"}],"title":"Subject"}},"type":"object","required":["body"],"title":"MarketLeadEmailReplyRequest"},"MarketLeadKpis":{"properties":{"total":{"type":"integer","title":"Total"},"contacted":{"type":"integer","title":"Contacted"},"replied":{"type":"integer","title":"Replied"},"qualified":{"type":"integer","title":"Qualified"},"jobs_created":{"type":"integer","title":"Jobs Created"},"won":{"type":"integer","title":"Won"},"response_rate":{"type":"number","title":"Response Rate"},"qualified_rate":{"type":"number","title":"Qualified Rate"},"avg_speed_to_lead_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Speed To Lead Seconds"},"median_speed_to_lead_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Median Speed To Lead Seconds"},"conversion_rate":{"type":"number","title":"Conversion Rate","default":0},"active_pipeline":{"type":"integer","title":"Active Pipeline","default":0},"total_revenue":{"type":"number","title":"Total Revenue","default":0},"avg_deal_size":{"type":"number","title":"Avg Deal Size","default":0},"revenue_by_month":{"items":{"$ref":"#/components/schemas/MarketLeadRevenueByMonth"},"type":"array","title":"Revenue By Month"}},"type":"object","required":["total","contacted","replied","qualified","jobs_created","won","response_rate","qualified_rate"],"title":"MarketLeadKpis"},"MarketLeadManualEmailCreateRequest":{"properties":{"customer_name":{"anyOf":[{"type":"string","maxLength":250},{"type":"null"}],"title":"Customer Name"},"recipient_email":{"type":"string","maxLength":320,"minLength":3,"title":"Recipient Email"},"subject":{"type":"string","maxLength":250,"minLength":1,"title":"Subject"},"body":{"type":"string","maxLength":12000,"minLength":1,"title":"Body"},"lsa_lead_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Lsa Lead Id"}},"type":"object","required":["recipient_email","subject","body"],"title":"MarketLeadManualEmailCreateRequest"},"MarketLeadManualSmsAccessResponse":{"properties":{"can_create":{"type":"boolean","title":"Can Create"}},"type":"object","required":["can_create"],"title":"MarketLeadManualSmsAccessResponse"},"MarketLeadManualSmsCreateRequest":{"properties":{"customer_name":{"anyOf":[{"type":"string","maxLength":250},{"type":"null"}],"title":"Customer Name"},"recipient_phone":{"type":"string","maxLength":32,"minLength":7,"title":"Recipient Phone"},"initial_message":{"type":"string","maxLength":4000,"minLength":1,"title":"Initial Message"},"lsa_lead_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Lsa Lead Id"}},"type":"object","required":["recipient_phone","initial_message"],"title":"MarketLeadManualSmsCreateRequest"},"MarketLeadRevenueByMonth":{"properties":{"month":{"type":"string","title":"Month"},"count":{"type":"integer","title":"Count"},"revenue":{"type":"number","title":"Revenue"},"is_current_month":{"type":"boolean","title":"Is Current Month"}},"type":"object","required":["month","count","revenue","is_current_month"],"title":"MarketLeadRevenueByMonth"},"MarketLeadSendReplyRequest":{"properties":{"body":{"type":"string","maxLength":4000,"minLength":1,"title":"Body"}},"type":"object","required":["body"],"title":"MarketLeadSendReplyRequest"},"MarketLeadSenderConfig":{"properties":{"sms_sender_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sms Sender User Id"},"email_sender_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Sender User Id"},"email_sender_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Sender Address"},"sms_sender_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sms Sender Name"},"sms_sender_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sms Sender Phone"},"email_sender_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Sender Name"},"email_sender_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Sender Status"},"st_job_alert_to_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"St Job Alert To Number"},"notification_recipients":{"items":{"type":"string"},"type":"array","title":"Notification Recipients"},"market_leads_enabled":{"type":"boolean","title":"Market Leads Enabled","default":false},"ballpark_pricing_enabled":{"type":"boolean","title":"Ballpark Pricing Enabled","default":false}},"type":"object","title":"MarketLeadSenderConfig"},"MarketLeadSenderConfigUpdate":{"properties":{"sms_sender_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sms Sender User Id"},"email_sender_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Sender Address"},"st_job_alert_to_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"St Job Alert To Number"}},"type":"object","title":"MarketLeadSenderConfigUpdate"},"MarketLeadSourcePerformance":{"properties":{"source_key":{"type":"string","title":"Source Key"},"source_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Display Name"},"total":{"type":"integer","title":"Total"},"contacted":{"type":"integer","title":"Contacted"},"replied":{"type":"integer","title":"Replied"},"qualified":{"type":"integer","title":"Qualified"},"won":{"type":"integer","title":"Won"},"reply_rate":{"type":"number","title":"Reply Rate"},"conversion_rate":{"type":"number","title":"Conversion Rate"},"active_pipeline":{"type":"integer","title":"Active Pipeline"},"median_speed_to_lead_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Median Speed To Lead Seconds"},"qualified_rate":{"type":"number","title":"Qualified Rate"}},"type":"object","required":["source_key","total","contacted","replied","qualified","won","reply_rate","conversion_rate","active_pipeline","qualified_rate"],"title":"MarketLeadSourcePerformance"},"MarketLeadSummary":{"properties":{"id":{"type":"string","title":"Id"},"source_key":{"type":"string","title":"Source Key"},"source_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Display Name"},"customer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Name"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"primary_contact_method":{"type":"string","title":"Primary Contact Method"},"preferred_contact_method":{"type":"string","title":"Preferred Contact Method"},"status":{"type":"string","title":"Status"},"qualification_status":{"type":"string","title":"Qualification Status"},"service_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Category"},"project_details":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Details"},"ai_paused":{"type":"boolean","title":"Ai Paused","default":false},"needs_office":{"type":"boolean","title":"Needs Office","default":false},"st_job_id":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"St Job Id"},"st_booking_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"St Booking Status"},"st_booking_started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"St Booking Started At"},"st_booking_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"St Booking Error"},"backoffice_notification_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Backoffice Notification Status"},"first_contacted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Contacted At"},"last_message_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Message At"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","source_key","primary_contact_method","preferred_contact_method","status","qualification_status"],"title":"MarketLeadSummary"},"MarketLeadTimelineItem":{"properties":{"id":{"type":"string","title":"Id"},"type":{"type":"string","enum":["sms","email","event","outcome"],"title":"Type"},"direction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direction"},"title":{"type":"string","title":"Title"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"payload":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload"}},"type":"object","required":["id","type","title"],"title":"MarketLeadTimelineItem"},"MarketLeadUpdateRequest":{"properties":{"status":{"anyOf":[{"type":"string","enum":["received","contacted","engaged","collecting","not_qualified","qualified_ready_to_book","service_titan_job_created","won","lost","error"]},{"type":"null"}],"title":"Status"},"ai_paused":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Ai Paused"},"needs_office":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Needs Office"}},"type":"object","title":"MarketLeadUpdateRequest"},"MarketLeadWonJob":{"properties":{"market_lead_id":{"type":"string","title":"Market Lead Id"},"customer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Name"},"job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Id"},"job_completion_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Completion Date"},"estimate_sold_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Estimate Sold Date"},"won_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Won Amount"}},"type":"object","required":["market_lead_id"],"title":"MarketLeadWonJob"},"MarketLeadsDashboardResponse":{"properties":{"kpis":{"$ref":"#/components/schemas/MarketLeadKpis"},"sources":{"items":{"$ref":"#/components/schemas/MarketLeadSourcePerformance"},"type":"array","title":"Sources"},"comfort_advisors":{"items":{"$ref":"#/components/schemas/MarketLeadComfortAdvisorPerformance"},"type":"array","title":"Comfort Advisors"},"leads":{"items":{"$ref":"#/components/schemas/MarketLeadSummary"},"type":"array","title":"Leads"},"sender_config":{"$ref":"#/components/schemas/MarketLeadSenderConfig"}},"type":"object","required":["kpis","sources","leads","sender_config"],"title":"MarketLeadsDashboardResponse"},"MembershipSidebar":{"properties":{"id":{"type":"integer","title":"Id"},"membership_type_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Membership Type Name"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"from_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Date"},"to_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Date"},"billing_frequency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Frequency"}},"type":"object","required":["id"],"title":"MembershipSidebar","description":"Membership info for the CaseSidebar."},"MessageResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"conversation_id":{"type":"string","format":"uuid","title":"Conversation Id"},"followup_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Followup Id"},"direction":{"type":"string","title":"Direction"},"from_number":{"type":"string","title":"From Number"},"to_number":{"type":"string","title":"To Number"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"},"media_urls":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Media Urls"},"media_summary":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Media Summary"},"media_summary_generated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Media Summary Generated At"},"twilio_message_sid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Twilio Message Sid"},"is_read":{"type":"boolean","title":"Is Read"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"sender_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Name"},"provider_message_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Message Status"},"provider_error_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Provider Error Code"},"provider_error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Error Message"},"reactions":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Reactions"}},"type":"object","required":["id","conversation_id","followup_id","direction","from_number","to_number","body","media_urls","twilio_message_sid","is_read","created_at"],"title":"MessageResponse","description":"Response model for a message."},"MetricConfigRequest":{"properties":{"weight":{"type":"number","title":"Weight","default":1.0},"threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Threshold"},"enabled":{"type":"boolean","title":"Enabled","default":true},"judge_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Judge Model"},"judge_temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Judge Temperature"},"params":{"additionalProperties":true,"type":"object","title":"Params"}},"type":"object","title":"MetricConfigRequest"},"MobileAppConfig":{"properties":{"tech_full_schedule_enabled":{"type":"boolean","title":"Tech Full Schedule Enabled","description":"Whether technicians can see full schedule","default":false},"messages_tab_enabled":{"type":"boolean","title":"Messages Tab Enabled","description":"Whether the Messages tab is shown in the mobile app.","default":true},"phonebook_tab_enabled":{"type":"boolean","title":"Phonebook Tab Enabled","description":"Whether the Phonebook tab is shown in the mobile app.","default":true},"sms_forwarding_enabled":{"type":"boolean","title":"Sms Forwarding Enabled","description":"When enabled, inbound customer messages are forwarded via SMS to the technician's personal phone number. Technicians reply from the app or field view via the link in that forward.","default":false},"proposal_modules":{"items":{"type":"string"},"type":"array","title":"Proposal Modules","description":"Proposal modules enabled in the mobile app, such as landscaping."}},"type":"object","title":"MobileAppConfig"},"Model":{"properties":{"model_id":{"type":"string","title":"Model Id","example":"24ABC636A003"},"model":{"type":"string","title":"Model","example":"Performance 16 AC"},"series_id":{"type":"string","format":"uuid","title":"Series Id"},"model_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Notes","example":"26 Tons, 230V, 1Ph, R-22"},"functional_parts_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Functional Parts Count","example":50},"bucket":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bucket","example":"noso-training-data"},"logo_bucket_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Bucket Path","example":"havc/brand/logos/carrier_logo.png"},"image_bucket_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Bucket Path","example":"havc/model/images/24ABC636A003.jpg"},"call_group_tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Call Group Tags","example":["residential","split_system"]},"calling_groups":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Calling Groups","example":"Commercial Package Unit"},"unlocked":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Unlocked","default":false,"example":true},"id":{"type":"string","format":"uuid","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"series":{"anyOf":[{"$ref":"#/components/schemas/Series"},{"type":"null"}]},"manuals":{"items":{"$ref":"#/components/schemas/Manual"},"type":"array","title":"Manuals"},"parts":{"anyOf":[{"$ref":"#/components/schemas/Part"},{"type":"null"}]},"logo_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Logo Url","description":"Full URL to the model's logo, constructed by backend"},"image_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Image Url","description":"Full URL to the model's image, constructed by backend"}},"type":"object","required":["model_id","model","series_id","id","created_at"],"title":"Model"},"MoveCampaignConversationLostRequest":{"properties":{"reason":{"type":"string","title":"Reason"},"campaign_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign Id"}},"type":"object","required":["reason"],"title":"MoveCampaignConversationLostRequest"},"MoveCampaignConversationLostResponse":{"properties":{"customer_status":{"type":"string","title":"Customer Status"},"message":{"type":"string","title":"Message"}},"type":"object","required":["customer_status","message"],"title":"MoveCampaignConversationLostResponse"},"MoveCampaignConversationWonRequest":{"properties":{"st_job_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"St Job Id"},"campaign_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign Id"}},"type":"object","title":"MoveCampaignConversationWonRequest"},"MoveCampaignConversationWonResponse":{"properties":{"customer_status":{"type":"string","title":"Customer Status"},"email":{"type":"string","title":"Email"},"message":{"type":"string","title":"Message"}},"type":"object","required":["customer_status","email","message"],"title":"MoveCampaignConversationWonResponse"},"NextChargeResponse":{"properties":{"next_charge_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Charge At"},"amount_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Amount Cents"},"subscription_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription Status"}},"type":"object","title":"NextChargeResponse"},"NotificationConfig":{"properties":{"email_notification":{"$ref":"#/components/schemas/EmailNotificationConfig","description":"Model containing email notifications"}},"type":"object","title":"NotificationConfig"},"OcrProcessingLog":{"properties":{"id":{"type":"string","title":"Id","description":"Log row UUID"},"drive_link":{"type":"string","title":"Drive Link","description":"Google Drive folder link"},"status":{"type":"string","title":"Status","description":"Pipeline status: pending, processing, completed, failed"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","description":"Results metadata"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message","description":"Error message if failed"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the task was queued"},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Last status update time"}},"type":"object","required":["id","drive_link","status","created_at","updated_at"],"title":"OcrProcessingLog","description":"Single OCR processing log entry for the UI list."},"OcrProcessingLogList":{"properties":{"logs":{"items":{"$ref":"#/components/schemas/OcrProcessingLog"},"type":"array","title":"Logs","description":"Processing log entries"}},"type":"object","required":["logs"],"title":"OcrProcessingLogList","description":"Response for listing OCR processing logs."},"OperatorConfig":{"properties":{"warranty":{"$ref":"#/components/schemas/WarrantyConfig","description":"Post-install warranty-registration workflow configuration."},"rebate":{"$ref":"#/components/schemas/RebateConfig","description":"Friedrich spiff-rebate workflow configuration."},"permit":{"$ref":"#/components/schemas/PermitConfig","description":"NJ municipal permit-packet workflow configuration."},"purchase_order":{"$ref":"#/components/schemas/PurchaseOrderConfig","description":"Receive-purchase-order (vendor-invoice close-out) workflow configuration."},"bid":{"$ref":"#/components/schemas/BidConfig","description":"Takeoff-to-Aspire bid-automation workflow configuration."}},"type":"object","title":"OperatorConfig","description":"Per-org configuration for NOSO Operator (browser-agent) workflows.\n\nOne nested model per operator workflow (e.g. ``warranty``) — add a model here\nas each new operator comes online. The Operator dashboard (nav tab + page) is\nvisible when at least one workflow is enabled."},"OrganizationKnowledge":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"org_id":{"type":"string","title":"Org Id"},"company_profile":{"additionalProperties":true,"type":"object","title":"Company Profile"},"reviews":{"additionalProperties":true,"type":"object","title":"Reviews"},"directory":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Directory"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"authority_matrix":{"$ref":"#/components/schemas/AuthorityMatrix"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["org_id"],"title":"OrganizationKnowledge","description":"Structured org knowledge. Prose and prohibitions live in organization_knowledge_packs;\nplan numbers live in organization_membership_plans. Nothing here restates either."},"PagedTaskList":{"properties":{"jobs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Task"},"type":"array"},{"type":"null"}],"title":"Jobs","description":"List of tasks","default":[]},"page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page","description":"Current page number"},"page_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Size","description":"Number of items per page"},"total_items":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Items","description":"Total number of items available"}},"type":"object","title":"PagedTaskList","description":"Response model for task list endpoints with pagination."},"PaginatedConversationsResponse":{"properties":{"conversations":{"items":{"$ref":"#/components/schemas/ConversationResponse"},"type":"array","title":"Conversations"},"total_count":{"type":"integer","title":"Total Count"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["conversations","total_count","limit","offset"],"title":"PaginatedConversationsResponse","description":"Response model for paginated conversations by category."},"Part":{"properties":{"model_id":{"type":"string","format":"uuid","title":"Model Id"},"total_parts":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Parts","example":15},"parts":{"anyOf":[{"items":{"$ref":"#/components/schemas/PartDetail"},"type":"array"},{"type":"null"}],"title":"Parts","description":"List of individual part details"},"id":{"type":"string","format":"uuid","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["model_id","id","created_at"],"title":"Part"},"PartDetail":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"Part's own UUID or identifier from source system","example":"815B48A6-6F8C-4F9D-9D6B-84E758876F9D"},"number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Number","example":"8216026"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type","example":"motor"},"subtype":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtype","example":"condenser_motor"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","example":"Condenser Fan Motor"},"brand":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand","example":"Carrier"},"image_bucket_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Bucket Path","example":"havc/parts/images/part_image.png"},"subcategory":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subcategory","example":"Condenser Motor 1/10HP"},"replacements_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Replacements Count","example":2},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"has_detail_specifications":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Detail Specifications","example":false},"image_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Image Url","description":"Full URL to the part's image, constructed by backend"}},"type":"object","title":"PartDetail"},"PauseCampaignResponse":{"properties":{"campaign_id":{"type":"string","title":"Campaign Id"},"status":{"type":"string","title":"Status"}},"type":"object","required":["campaign_id","status"],"title":"PauseCampaignResponse"},"PendingCustomer":{"properties":{"id":{"type":"string","title":"Id"},"customer_name":{"type":"string","title":"Customer Name"},"phone":{"type":"string","title":"Phone"},"priority_score":{"type":"number","title":"Priority Score"},"membership_type_names":{"items":{"type":"string"},"type":"array","title":"Membership Type Names","default":[]}},"type":"object","required":["id","customer_name","phone","priority_score"],"title":"PendingCustomer"},"PendingCustomersResponse":{"properties":{"campaign_id":{"type":"string","title":"Campaign Id"},"customers":{"items":{"$ref":"#/components/schemas/PendingCustomer"},"type":"array","title":"Customers"},"total_count":{"type":"integer","title":"Total Count"}},"type":"object","required":["campaign_id","customers","total_count"],"title":"PendingCustomersResponse"},"PermitConfig":{"properties":{"registration":{"type":"boolean","title":"Registration","description":"Enables the permit operator workflow: the Permits tab on the Operator page (runs, packet, recordings, and push endpoints) and the weekly sheet pipeline for the org (see services/install_jobs_permits).","default":false},"batch_email_recipient":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Batch Email Recipient","description":"Recipient of the Monday permit-packet batch email (Pilot permit_packet_email). None/empty disables the Monday email — the weekly CLI treats an email-day run without a recipient as a failure so the gap is visible, not silent."}},"type":"object","title":"PermitConfig","description":"Per-org configuration for the NJ municipal permit-packet operator workflow."},"PipelineStep":{"properties":{"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"},"phase":{"type":"string","title":"Phase"},"status":{"type":"string","title":"Status"},"at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"At"},"due":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due"},"countdown_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Countdown Days"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"},"attention_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Attention Reason"},"attention":{"type":"boolean","title":"Attention","readOnly":true}},"type":"object","required":["key","label","phase","status","attention"],"title":"PipelineStep"},"PlatformType":{"type":"string","enum":["ios","android"],"title":"PlatformType"},"PlaudDeviceEventRequest":{"properties":{"serial_number":{"type":"string","maxLength":128,"minLength":1,"title":"Serial Number"},"event":{"type":"string","enum":["bound","connected","unpaired","failed"],"title":"Event"},"device_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Device Name"},"bind_status":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bind Status"},"error":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Error"},"app_install_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"App Install Id"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["serial_number","event"],"title":"PlaudDeviceEventRequest"},"PlaygroundScenario":{"properties":{"key":{"type":"string","title":"Key"},"title":{"type":"string","title":"Title"},"setup":{"type":"string","title":"Setup"}},"type":"object","required":["key","title","setup"],"title":"PlaygroundScenario"},"PlaygroundScenariosResponse":{"properties":{"scenarios":{"items":{"$ref":"#/components/schemas/PlaygroundScenario"},"type":"array","title":"Scenarios"}},"type":"object","required":["scenarios"],"title":"PlaygroundScenariosResponse"},"PlaygroundSessionCreateRequest":{"properties":{"phone":{"type":"string","title":"Phone","description":"Visitor's mobile number, any common US format"},"scenario_key":{"type":"string","title":"Scenario Key"},"consent":{"type":"boolean","title":"Consent","description":"Visitor ticked the SMS consent box"}},"type":"object","required":["phone","scenario_key","consent"],"title":"PlaygroundSessionCreateRequest"},"PlaygroundSessionResponse":{"properties":{"session_id":{"type":"string","title":"Session Id"},"status":{"type":"string","title":"Status"},"scenario_key":{"type":"string","title":"Scenario Key"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"message":{"type":"string","title":"Message"}},"type":"object","required":["session_id","status","scenario_key","expires_at","message"],"title":"PlaygroundSessionResponse"},"PlaygroundTranscriptMessage":{"properties":{"direction":{"type":"string","title":"Direction"},"body":{"type":"string","title":"Body"},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sent At"}},"type":"object","required":["direction","body"],"title":"PlaygroundTranscriptMessage"},"PlaygroundTranscriptResponse":{"properties":{"session_id":{"type":"string","title":"Session Id"},"status":{"type":"string","title":"Status"},"inbound_count":{"type":"integer","title":"Inbound Count"},"proactive_sent_count":{"type":"integer","title":"Proactive Sent Count"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"messages":{"items":{"$ref":"#/components/schemas/PlaygroundTranscriptMessage"},"type":"array","title":"Messages"}},"type":"object","required":["session_id","status","inbound_count","proactive_sent_count","expires_at","messages"],"title":"PlaygroundTranscriptResponse"},"PresignedPartUrlRequest":{"properties":{"bucket":{"type":"string","title":"Bucket"},"object_key":{"type":"string","title":"Object Key"},"upload_id":{"type":"string","title":"Upload Id"},"part_number":{"type":"integer","title":"Part Number"},"expiration":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expiration"}},"type":"object","required":["bucket","object_key","upload_id","part_number"],"title":"PresignedPartUrlRequest"},"PresignedPartUrlResponse":{"properties":{"url":{"type":"string","title":"Url"}},"type":"object","required":["url"],"title":"PresignedPartUrlResponse"},"PresignedUploadUrlRequest":{"properties":{"bucket":{"type":"string","title":"Bucket"},"object_key":{"type":"string","title":"Object Key"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"},"expiration":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expiration"}},"type":"object","required":["bucket","object_key"],"title":"PresignedUploadUrlRequest"},"PresignedUploadUrlResponse":{"properties":{"url":{"type":"string","title":"Url"}},"type":"object","required":["url"],"title":"PresignedUploadUrlResponse"},"PriceHoldAuthority":{"properties":{"offered":{"type":"boolean","title":"Offered","default":false}},"type":"object","title":"PriceHoldAuthority"},"PriceMatchGuaranteeAuthority":{"properties":{"offered":{"type":"boolean","title":"Offered","default":false},"beat_amount_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Beat Amount Usd"},"match_window_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Match Window Days"},"conditions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conditions"}},"type":"object","title":"PriceMatchGuaranteeAuthority"},"PrioritySchedulingAuthority":{"properties":{"offered":{"type":"boolean","title":"Offered","default":false}},"type":"object","title":"PrioritySchedulingAuthority"},"ProcessDrawSlipsRequest":{"properties":{"drive_link":{"type":"string","title":"Drive Link","description":"Google Drive folder link containing draw slip images"}},"type":"object","required":["drive_link"],"title":"ProcessDrawSlipsRequest","description":"Request body for triggering draw slip processing."},"ProcessDrawSlipsResponse":{"properties":{"celery_task_id":{"type":"string","title":"Celery Task Id","description":"Celery task ID for tracking"},"drive_link":{"type":"string","title":"Drive Link","description":"Submitted Google Drive folder link"}},"type":"object","required":["celery_task_id","drive_link"],"title":"ProcessDrawSlipsResponse","description":"Response after queuing a draw slip processing task."},"PurchaseOrderConfig":{"properties":{"enabled":{"type":"boolean","title":"Enabled","description":"Enables the receive-PO operator workflow: the Purchase Orders tab on the Operator page, runs endpoint, recordings endpoint, and digest visibility. This is a dashboard/workflow visibility flag only; purchase_order.auto_enqueue controls whether the cron/poller actually dispatches receive_purchase_order runs.","default":false},"auto_enqueue":{"type":"boolean","title":"Auto Enqueue","description":"Per-org gate for the receive-PO cron/poller dispatch to Pilot. When False (default), the workflow can still be visible in the dashboard, but the inbox poller must not enqueue new receive_purchase_order runs. Flip to True only when this org should actively process labelled PO vendor invoices.","default":false},"dry_run":{"type":"boolean","title":"Dry Run","description":"When True, runs match/reconcile/tie and PROPOSE, but skip the receive/attach writes that create the payable bill. Default True so supervised launches never bill until explicitly flipped live.","default":true},"label":{"type":"string","title":"Label","description":"Gmail label whose tagged vendor invoices the poller processes.","default":"NoSo - PO"},"max_invoices":{"type":"integer","title":"Max Invoices","description":"Cap on invoices dispatched per poll pass.","default":25}},"type":"object","title":"PurchaseOrderConfig","description":"Per-org configuration for the receive-purchase-order operator workflow."},"PushNotificationPayload":{"properties":{"title":{"type":"string","title":"Title","description":"Notification title"},"body":{"type":"string","title":"Body","description":"Notification body"},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data","description":"Additional data payload"},"sound":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sound","description":"Notification sound","default":"default"},"badge":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Badge","description":"Badge number for iOS"}},"type":"object","required":["title","body"],"title":"PushNotificationPayload"},"PushNotificationRequest":{"properties":{"user_ids":{"items":{"type":"string"},"type":"array","title":"User Ids","description":"List of user IDs to send notifications to"},"payload":{"$ref":"#/components/schemas/PushNotificationPayload","description":"Notification payload"}},"type":"object","required":["user_ids","payload"],"title":"PushNotificationRequest","example":{"payload":{"badge":1,"body":"Your job summary has been generated","data":{"redirect_url":"/task/12345","task_id":"12345","type":"summary_ready"},"sound":"default","title":"Summary Ready"},"user_ids":["user_2abc123"]}},"PushNotificationResponse":{"properties":{"success_count":{"type":"integer","title":"Success Count","description":"Number of successful notifications sent"},"failure_count":{"type":"integer","title":"Failure Count","description":"Number of failed notifications"},"total_tokens":{"type":"integer","title":"Total Tokens","description":"Total number of tokens processed"},"failed_tokens":{"items":{"type":"string"},"type":"array","title":"Failed Tokens","description":"List of failed tokens"},"details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Details","description":"Additional response details"}},"type":"object","required":["success_count","failure_count","total_tokens"],"title":"PushNotificationResponse"},"PushPermitRunRequest":{"properties":{"run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Id"},"job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Id"},"trade_tab":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trade Tab"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"PushPermitRunRequest","description":"Body for a manual permit run from the dashboard.\n\nExactly one target: ``run_id`` re-runs an existing row (sheet params reused);\n``job_id`` starts an ad-hoc run for one ServiceTitan job (no sheet row)."},"PushRebateRunRequest":{"properties":{"po_number":{"type":"string","title":"Po Number"},"dry_run":{"type":"boolean","title":"Dry Run","default":true}},"type":"object","required":["po_number"],"title":"PushRebateRunRequest","description":"Body for a manual NOSO-operator rebate push from the dashboard."},"PushTokenCreate":{"properties":{"device_id":{"type":"string","title":"Device Id","description":"Unique device identifier"},"push_token":{"type":"string","title":"Push Token","description":"Expo push notification token"},"platform":{"$ref":"#/components/schemas/PlatformType","description":"Device platform"},"app_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"App Version","description":"App version"},"device_info":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Device Info","description":"Additional device metadata"},"clerk_session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Clerk Session Id","description":"Clerk session ID"}},"type":"object","required":["device_id","push_token","platform"],"title":"PushTokenCreate"},"PushWarrantyRunRequest":{"properties":{"job_id":{"type":"string","title":"Job Id"},"force":{"type":"boolean","title":"Force","default":false},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["job_id"],"title":"PushWarrantyRunRequest","description":"Body for a manual NOSO-operator warranty push from the dashboard."},"RebateAuthority":{"properties":{"deadline":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deadline"}},"type":"object","title":"RebateAuthority"},"RebateConfig":{"properties":{"registration":{"type":"boolean","title":"Registration","description":"Enables the rebate operator workflow: the Rebates tab on the Operator page (runs, recordings, and exceptions endpoints).","default":false},"prod_only":{"type":"boolean","title":"Prod Only","description":"When True, the Rebates tab shows only production runs (business_workflow_version like 'prod%'), hiding dev/local/test runs. Default False so demo/dev runs surface; flip on for a live org so its test runs never appear in the dashboard.","default":false}},"type":"object","title":"RebateConfig","description":"Per-org configuration for the Friedrich spiff-rebate operator workflow."},"RecentCampaignContact":{"properties":{"campaign_id":{"type":"string","title":"Campaign Id"},"campaign_name":{"type":"string","title":"Campaign Name"},"contacted_at":{"type":"string","title":"Contacted At"},"status":{"type":"string","title":"Status","default":""}},"type":"object","required":["campaign_id","campaign_name","contacted_at"],"title":"RecentCampaignContact"},"Recording":{"properties":{"s3_bucket":{"type":"string","title":"S3 Bucket","description":"S3 bucket name"},"s3_object_key":{"type":"string","title":"S3 Object Key","description":"S3 object key"},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latitude","description":"GPS latitude"},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Longitude","description":"GPS longitude"},"location_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location Address","description":"Human-readable address"},"location_accuracy":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Location Accuracy","description":"GPS accuracy in meters"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Time","description":"Start time of the recording"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Time","description":"End time of the recording"},"user_id":{"type":"string","format":"uuid","title":"User Id","description":"User ID who created the recording"},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Id","description":"Organization ID (optional)"},"waveform_data":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Waveform Data","description":"Waveform data for audio visualization"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","description":"Recording status (e.g., uploading, transcribing, completed, failed)"},"id":{"type":"string","format":"uuid","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["s3_bucket","s3_object_key","user_id"],"title":"Recording"},"RecordingConfig":{"properties":{"site_summary_style":{"type":"string","enum":["paragraph","bullet"],"title":"Site Summary Style","default":"paragraph"},"recording_invoice_summary_enabled":{"type":"boolean","title":"Recording Invoice Summary Enabled","default":true},"recording_invoice_summary_write_to_ST":{"type":"boolean","title":"Recording Invoice Summary Write To St","default":false},"recording_invoice_summary_destination":{"type":"string","enum":["invoice_summary","location_notes","job_notes"],"title":"Recording Invoice Summary Destination","default":"invoice_summary"},"recording_insight_summary_ui_enabled":{"type":"boolean","title":"Recording Insight Summary Ui Enabled","default":true},"recording_insight_summary_write_to_ST":{"type":"boolean","title":"Recording Insight Summary Write To St","default":false},"tech_specs_installer_notes_enabled":{"type":"boolean","title":"Tech Specs Installer Notes Enabled","default":true},"recording_internal_notes_enabled":{"type":"boolean","title":"Recording Internal Notes Enabled","default":false}},"type":"object","title":"RecordingConfig"},"RecordingList":{"properties":{"recordings":{"items":{"$ref":"#/components/schemas/Recording"},"type":"array","title":"Recordings"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page","description":"Current page number"},"page_size":{"type":"integer","title":"Page Size","description":"Number of items per page"},"total_pages":{"type":"integer","title":"Total Pages","description":"Total number of pages"}},"type":"object","required":["recordings","total","page","page_size","total_pages"],"title":"RecordingList"},"RecordingTranscription":{"properties":{"recording_id":{"type":"string","format":"uuid","title":"Recording Id","description":"Reference to the recording"},"transcription_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transcription Text","description":"The transcribed text content"},"status":{"type":"string","title":"Status","description":"Transcription status","default":"pending"},"role_assigned_transcript":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role Assigned Transcript","description":"AI-processed transcript with speaker role assignments"},"formatted_content":{"anyOf":[{"items":{"$ref":"#/components/schemas/FormattedContentItem"},"type":"array"},{"type":"null"}],"title":"Formatted Content","description":"Structured transcription content for display"},"id":{"type":"string","format":"uuid","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["recording_id"],"title":"RecordingTranscription"},"RecordingWithTranscription":{"properties":{"recording":{"$ref":"#/components/schemas/Recording"},"transcription":{"anyOf":[{"$ref":"#/components/schemas/RecordingTranscription"},{"type":"null"}]}},"type":"object","required":["recording"],"title":"RecordingWithTranscription"},"ReleaseBatchRequest":{"properties":{"batch_size":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Batch Size"},"customer_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Customer Ids"}},"type":"object","title":"ReleaseBatchRequest"},"ReleaseBatchResponse":{"properties":{"campaign_id":{"type":"string","title":"Campaign Id"},"released_count":{"type":"integer","title":"Released Count"},"remaining_pending":{"type":"integer","title":"Remaining Pending"}},"type":"object","required":["campaign_id","released_count","remaining_pending"],"title":"ReleaseBatchResponse"},"ReminderConfigUpdate":{"properties":{"reminder_first_send_offset_days":{"anyOf":[{"type":"integer","maximum":90.0,"minimum":0.0},{"type":"null"}],"title":"Reminder First Send Offset Days"},"reminder_day_of_week":{"anyOf":[{"type":"integer","maximum":7.0,"minimum":1.0},{"type":"null"}],"title":"Reminder Day Of Week"},"reminder_hour_local":{"anyOf":[{"type":"integer","maximum":23.0,"minimum":0.0},{"type":"null"}],"title":"Reminder Hour Local"},"cc_emails":{"anyOf":[{"items":{"type":"string","format":"email"},"type":"array"},{"type":"null"}],"title":"Cc Emails"},"reminder_timezone":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Reminder Timezone"}},"type":"object","title":"ReminderConfigUpdate"},"ReminderEmailUpdate":{"properties":{"subject":{"type":"string","maxLength":200,"minLength":1,"title":"Subject"},"body":{"type":"string","maxLength":5000,"minLength":1,"title":"Body"},"save_as_template":{"type":"boolean","title":"Save As Template","default":false}},"type":"object","required":["subject","body"],"title":"ReminderEmailUpdate"},"RemoveCustomerResponse":{"properties":{"removed_count":{"type":"integer","title":"Removed Count"}},"type":"object","required":["removed_count"],"title":"RemoveCustomerResponse"},"RephraseMessageRequest":{"properties":{"message_text":{"type":"string","maxLength":1600,"minLength":1,"title":"Message Text"}},"type":"object","required":["message_text"],"title":"RephraseMessageRequest","description":"Request model for message rephrasing."},"RephraseMessageResponse":{"properties":{"rephrased_message":{"type":"string","title":"Rephrased Message"}},"type":"object","required":["rephrased_message"],"title":"RephraseMessageResponse","description":"Response model for rephrased message."},"ReportAbuse":{"properties":{"message_id":{"type":"string","format":"uuid","title":"Message Id","description":"ID of the message being reported"},"content":{"type":"string","title":"Content","description":"Report content or reason"},"id":{"type":"string","format":"uuid","title":"Id"},"user_id":{"type":"string","format":"uuid","title":"User Id","description":"ID of the user reporting abuse"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["message_id","content","user_id","created_at","updated_at"],"title":"ReportAbuse"},"ReportAbuseCreate":{"properties":{"message_id":{"type":"string","format":"uuid","title":"Message Id","description":"ID of the message being reported"},"content":{"type":"string","title":"Content","description":"Report content or reason"}},"type":"object","required":["message_id","content"],"title":"ReportAbuseCreate"},"ReportDislike":{"properties":{"message_id":{"type":"string","format":"uuid","title":"Message Id","description":"ID of the message being disliked"},"id":{"type":"string","format":"uuid","title":"Id"},"user_id":{"type":"string","format":"uuid","title":"User Id","description":"ID of the user disliking the message"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["message_id","user_id","created_at"],"title":"ReportDislike"},"ReportLike":{"properties":{"message_id":{"type":"string","format":"uuid","title":"Message Id","description":"ID of the message being liked"},"id":{"type":"string","format":"uuid","title":"Id"},"user_id":{"type":"string","format":"uuid","title":"User Id","description":"ID of the user liking the message"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["message_id","user_id","created_at"],"title":"ReportLike"},"ResolveBidExceptionRequest":{"properties":{"case_key":{"type":"string","title":"Case Key"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"opportunity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Opportunity Id"},"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["case_key"],"title":"ResolveBidExceptionRequest","description":"Body for marking one flagged bid case reviewed from the dashboard."},"ResolveContactThreadRequest":{"properties":{"target_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Phone"}},"type":"object","title":"ResolveContactThreadRequest"},"ResolveContactThreadResponse":{"properties":{"contact_id":{"type":"string","title":"Contact Id"},"conversation_id":{"type":"string","title":"Conversation Id"},"target_phone":{"type":"string","title":"Target Phone"},"created":{"type":"boolean","title":"Created","default":false}},"type":"object","required":["contact_id","conversation_id","target_phone"],"title":"ResolveContactThreadResponse"},"ResolveExceptionRequest":{"properties":{"case_key":{"type":"string","title":"Case Key"},"resolution":{"type":"string","enum":["schedule_retry","resolved_no_retry","error_fixed","already_registered"],"title":"Resolution"},"job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Id"},"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["case_key","resolution"],"title":"ResolveExceptionRequest","description":"Body for resolving one flagged case from the dashboard."},"ResolveOfficeEscalationRequest":{"properties":{"status":{"type":"string","pattern":"^(resolved|dismissed|in_progress)$","title":"Status","default":"resolved"},"outcome":{"anyOf":[{"type":"string","pattern":"^(goal_met|goal_not_met)$"},{"type":"null"}],"title":"Outcome"},"resolution_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolution Note"}},"type":"object","title":"ResolveOfficeEscalationRequest"},"ResolveOfficeEscalationResponse":{"properties":{"id":{"type":"string","title":"Id"},"status":{"type":"string","title":"Status"},"campaign_customer_id":{"type":"string","title":"Campaign Customer Id"}},"type":"object","required":["id","status","campaign_customer_id"],"title":"ResolveOfficeEscalationResponse"},"ResolvePurchaseOrderExceptionRequest":{"properties":{"case_key":{"type":"string","title":"Case Key"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"po_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Po Number"},"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["case_key"],"title":"ResolvePurchaseOrderExceptionRequest","description":"Body for marking one flagged purchase-order claim resolved."},"ResolveRebateExceptionRequest":{"properties":{"case_key":{"type":"string","title":"Case Key"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"po_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Po Number"},"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["case_key"],"title":"ResolveRebateExceptionRequest","description":"Body for marking one flagged rebate claim reviewed from the dashboard."},"RestoreAllResponse":{"properties":{"restored_count":{"type":"integer","title":"Restored Count"}},"type":"object","required":["restored_count"],"title":"RestoreAllResponse"},"ResumeCampaignRequest":{"properties":{"scheduled_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scheduled Date"}},"type":"object","title":"ResumeCampaignRequest"},"ResumeCampaignResponse":{"properties":{"campaign_id":{"type":"string","title":"Campaign Id"},"status":{"type":"string","title":"Status"},"next_round":{"type":"integer","title":"Next Round","default":0}},"type":"object","required":["campaign_id","status"],"title":"ResumeCampaignResponse"},"RetryBidExceptionRequest":{"properties":{"run_id":{"type":"string","title":"Run Id"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"opportunity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Opportunity Id"}},"type":"object","required":["run_id"],"title":"RetryBidExceptionRequest","description":"Body for re-running one flagged bid case from the dashboard."},"RetryPurchaseOrderExceptionRequest":{"properties":{"case_key":{"type":"string","title":"Case Key"},"po_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Po Number"},"message_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message Id"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["case_key"],"title":"RetryPurchaseOrderExceptionRequest","description":"Body for retrying one flagged purchase-order claim from the dashboard."},"ReviewConfig":{"properties":{"enabled":{"type":"boolean","title":"Enabled","description":"Master switch for the review-request pipeline on this org. When False, the daily enqueue and the scheduler both short-circuit.","default":false},"shadow_mode_enabled":{"type":"boolean","title":"Shadow Mode Enabled","description":"When True (shadow mode), the inbound reply handler classifies but writes the would-be reply to review_request_shadow_events instead of dispatching O2A/O2B/O3, and the daily Google sweep skips its match-and-apply step (still ingests new google_reviews rows). No state transitions are applied to review_request_v2 / customer_reviews while shadow_mode_enabled is True. Default False = full live auto-reply behavior. The first-touch O1 outbound is unaffected — use `enabled` to pause that.","default":false},"bot_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bot User Id","description":"users.id (UUID) of the per-org review bot. conversations created by this pipeline carry this user_id; the inbound webhook short-circuits to the review handler when conversation.user_id matches. The bot user's first_name is also used as the sender identity ('this is <first_name> from <org>...') in the O1 message."}},"type":"object","title":"ReviewConfig","description":"Per-org config for the review-request pipeline."},"SMSAttachmentUploadRequest":{"properties":{"filename":{"type":"string","title":"Filename"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"}},"type":"object","required":["filename"],"title":"SMSAttachmentUploadRequest","description":"Request model for getting presigned URL for SMS attachment upload."},"SMSAttachmentUploadResponse":{"properties":{"upload_url":{"type":"string","title":"Upload Url"},"s3_key":{"type":"string","title":"S3 Key"},"public_url":{"type":"string","title":"Public Url"}},"type":"object","required":["upload_url","s3_key","public_url"],"title":"SMSAttachmentUploadResponse","description":"Response model for SMS attachment upload URL."},"STCallFeedCheckpointResponse":{"properties":{"modified_on_or_after":{"type":"string","title":"Modified On Or After","description":"ST-formatted UTC cutoff, skew margin applied"},"created_on_or_after":{"type":"string","title":"Created On Or After","description":"ST-formatted floor of the staging window"},"cursor_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Cursor At","description":"Last completed run's cutoff"},"last_ingest_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Ingest At"}},"type":"object","required":["modified_on_or_after","created_on_or_after"],"title":"STCallFeedCheckpointResponse","description":"GET call-feed checkpoint: the modifiedOnOrAfter value Make should query with."},"STCallFeedIngestRequest":{"properties":{"hasMore":{"type":"boolean","title":"Hasmore","default":false},"data":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Data"}},"type":"object","required":["data"],"title":"STCallFeedIngestRequest","description":"POST call-feed request: one telecom v3 page in ST's own envelope, verbatim.\n\nTaking ST's shape means Make forwards the response untouched instead of\nrebuilding JSON, which is where collection mappings turn into [object Object]."},"STCallFeedIngestResponse":{"properties":{"received":{"type":"integer","title":"Received"},"staged":{"type":"integer","title":"Staged"},"skipped":{"type":"integer","title":"Skipped"},"stale":{"type":"integer","title":"Stale","description":"Skipped for a createdOn older than the staging window","default":0},"cursor_advanced":{"type":"boolean","title":"Cursor Advanced"}},"type":"object","required":["received","staged","skipped","cursor_advanced"],"title":"STCallFeedIngestResponse","description":"POST call-feed response: staging outcome and whether the cursor advanced."},"STCallRecordingIngestResponse":{"properties":{"st_call_id":{"type":"integer","title":"St Call Id"},"s3_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"S3 Key"},"bytes_stored":{"type":"integer","title":"Bytes Stored"},"available":{"type":"boolean","title":"Available"}},"type":"object","required":["st_call_id","s3_key","bytes_stored","available"],"title":"STCallRecordingIngestResponse","description":"POST recording response: where the audio landed, or that ST had none."},"STCallRecordingQueueResponse":{"properties":{"call_ids":{"items":{"type":"integer"},"type":"array","title":"Call Ids"},"ids_csv":{"type":"string","title":"Ids Csv","description":"Comma-joined ids, for iterating in Make"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["call_ids","ids_csv","count"],"title":"STCallRecordingQueueResponse","description":"GET recording queue: calls whose audio Make still has to fetch."},"STETLCheckpointResponse":{"properties":{"from":{"type":"string","title":"From","description":"Opaque ST export cursor or seed time"},"cursor_version":{"type":"integer","title":"Cursor Version","description":"Compare-and-swap version for the next commit"},"last_success_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Success At","description":"Last committed page time"},"has_more":{"type":"boolean","title":"Has More","description":"Whether the last committed page had more data","default":false}},"type":"object","required":["from","cursor_version"],"title":"STETLCheckpointResponse","description":"GET checkpoint response: where Make should resume the ST export from."},"STETLPageIngestRequest":{"properties":{"requested_from":{"type":"string","maxLength":512,"minLength":1,"title":"Requested From"},"expected_version":{"type":"integer","minimum":0.0,"title":"Expected Version"},"continue_from":{"type":"string","maxLength":512,"minLength":1,"title":"Continue From"},"has_more":{"type":"boolean","title":"Has More"},"make_execution_id":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Make Execution Id"},"data":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Data"}},"type":"object","required":["requested_from","expected_version","continue_from","has_more","data"],"title":"STETLPageIngestRequest","description":"POST page request: one whole ST export page plus its cursor context."},"STETLPageIngestResponse":{"properties":{"replayed":{"type":"boolean","title":"Replayed"},"page_id":{"type":"string","format":"uuid","title":"Page Id"},"record_count":{"type":"integer","title":"Record Count"},"continue_from":{"type":"string","title":"Continue From"},"cursor_version":{"type":"integer","title":"Cursor Version"}},"type":"object","required":["replayed","page_id","record_count","continue_from","cursor_version"],"title":"STETLPageIngestResponse","description":"POST page response: the committed (or replayed) page and new cursor."},"STETLSettingsSnapshotRequest":{"properties":{"tag_types":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Tag Types"},"business_units":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Business Units"},"job_types":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Job Types"},"membership_types":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Membership Types"},"recurring_service_types":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Recurring Service Types"},"technicians":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Technicians"},"employees":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Employees"},"campaigns":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Campaigns"},"job_cancel_reason_options":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Job Cancel Reason Options"}},"additionalProperties":false,"type":"object","title":"STETLSettingsSnapshotRequest","description":"POST settings request: any subset of the ST reference lists, raw and complete.\n\nOmitting a feed keeps its stored value, so the feeds can be split across\nscenarios by how fresh each one has to be. Unknown keys are rejected —\nwith every feed optional, a misspelled one would otherwise write nothing\nand still return 200."},"STETLSettingsSnapshotResponse":{"properties":{"organization_id":{"type":"string","title":"Organization Id"},"feeds_written":{"items":{"type":"string"},"type":"array","title":"Feeds Written"},"counts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Counts"},"last_synced_at":{"type":"string","format":"date-time","title":"Last Synced At"}},"type":"object","required":["organization_id","feeds_written","counts","last_synced_at"],"title":"STETLSettingsSnapshotResponse","description":"POST settings response: which feeds this call wrote, and the merged row's counts."},"SaveAsEvalCaseRequest":{"properties":{"message_id":{"type":"string","title":"Message Id"},"eval_dataset_id":{"type":"string","title":"Eval Dataset Id"},"agent_type":{"type":"string","title":"Agent Type","default":"sms_agent"}},"type":"object","required":["message_id","eval_dataset_id"],"title":"SaveAsEvalCaseRequest"},"ScheduleSubscriptionRequest":{"properties":{"payment_type":{"type":"string","pattern":"^(monthly|annual)$","title":"Payment Type"},"monthly_fee_cents":{"type":"integer","exclusiveMinimum":0.0,"title":"Monthly Fee Cents"},"start_date":{"type":"string","format":"date","title":"Start Date"},"discount_percent":{"type":"integer","maximum":100.0,"minimum":0.0,"title":"Discount Percent","default":0},"annual_billed_monthly":{"type":"boolean","title":"Annual Billed Monthly","default":false}},"type":"object","required":["payment_type","monthly_fee_cents","start_date"],"title":"ScheduleSubscriptionRequest"},"ScrapeJobEventsRequest":{"properties":{"conversation_id":{"type":"string","title":"Conversation Id"}},"type":"object","required":["conversation_id"],"title":"ScrapeJobEventsRequest"},"SendCheckoutEmailRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"SendCheckoutEmailRequest"},"SendEmailInput":{"properties":{"to":{"items":{"$ref":"#/components/schemas/EmailAddressInput"},"type":"array","title":"To"},"subject":{"type":"string","title":"Subject"},"cc":{"items":{"$ref":"#/components/schemas/EmailAddressInput"},"type":"array","title":"Cc","default":[]},"bcc":{"items":{"$ref":"#/components/schemas/EmailAddressInput"},"type":"array","title":"Bcc","default":[]},"body_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body Text"},"body_html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body Html"},"reply_to":{"anyOf":[{"$ref":"#/components/schemas/EmailAddressInput"},{"type":"null"}]},"attachments":{"items":{"$ref":"#/components/schemas/AttachmentInput"},"type":"array","title":"Attachments","default":[]},"reply_to_email_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reply To Email Id"},"thread_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thread Id"},"in_reply_to_message_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"In Reply To Message Id"},"provider_reply_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Reply Id"},"prefer_draft":{"type":"boolean","title":"Prefer Draft","default":false}},"type":"object","required":["to","subject"],"title":"SendEmailInput"},"SendEmailRequest":{"properties":{"conversation_id":{"type":"string","format":"uuid","title":"Conversation Id","description":"UUID of the conversation"},"recipient_emails":{"anyOf":[{"items":{"type":"string","format":"email"},"type":"array"},{"type":"null"}],"title":"Recipient Emails","description":"Recipient email list (bypasses org config when provided)"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject","description":"Custom email subject"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary","description":"Conversation summary. Auto-generated from transcript if omitted."},"call_to_action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call To Action","description":"Single action verb sentence for the back office. Auto-generated if omitted."},"from_message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"From Message Id","description":"Start of message range (inclusive). Fetches from this message to end if to_message_id omitted."},"to_message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"To Message Id","description":"End of message range (inclusive). Fetches from start to this message if from_message_id omitted."},"funnel_stage":{"type":"integer","maximum":4.0,"minimum":1.0,"title":"Funnel Stage","description":"Funnel progress stage (1–4)","default":2},"priority":{"type":"string","title":"Priority","description":"Email priority: 'normal' or 'high'","default":"normal"},"user_group":{"type":"string","enum":["csr","manager"],"title":"User Group","description":"Recipient group label written to the escalation timeline event.","default":"csr"},"continue_thread":{"type":"boolean","title":"Continue Thread","description":"When true, threads to the most recent prior outbound email for this conversation: subject is forced to match the previous email's subject and In-Reply-To/References headers reuse its captured Message-ID. Frontend should only set true when /thread-status reports has_existing_thread=true.","default":false}},"type":"object","required":["conversation_id"],"title":"SendEmailRequest","description":"Request body for sending conversation email"},"SendEmailResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message Id"},"recipients":{"items":{"type":"string"},"type":"array","title":"Recipients"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success","recipients"],"title":"SendEmailResponse","description":"Response from email sending endpoint"},"SendJobEmailRequest":{"properties":{"conversation_id":{"type":"string","title":"Conversation Id"},"email_type":{"type":"string","enum":["estimate","invoice"],"title":"Email Type"}},"type":"object","required":["conversation_id","email_type"],"title":"SendJobEmailRequest"},"SendMessageRequest":{"properties":{"body":{"anyOf":[{"type":"string","maxLength":1600},{"type":"null"}],"title":"Body"},"media_urls":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Media Urls"},"local_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Local Date","description":"User's local date in YYYY-MM-DD format for tracking attempts"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"Source of the request: 'mobile' or 'dashboard'","default":"mobile"},"target_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Phone","description":"Specific phone number to send to (for multi-phone support). If not provided, uses primary phone."}},"type":"object","title":"SendMessageRequest","description":"Request model for sending a message."},"SendReplyRequest":{"properties":{"body":{"type":"string","title":"Body"}},"type":"object","required":["body"],"title":"SendReplyRequest"},"SenderConfig":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name","description":"Exact customer-facing display-name override for this sender"},"technician_reference":{"anyOf":[{"type":"string","enum":["by_name","anonymous"]},{"type":"null"}],"title":"Technician Reference","description":"Set for a sender who does not attend visits: every agent then writes as office staff, naming the field technician ('by_name') or not ('anonymous'). None = each lane's own default; a lane that is always office stays office."},"instructions":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Instructions","description":"Optional wording and style guidance for this sender's messages"}},"type":"object","title":"SenderConfig","description":"Customer-facing sender persona overrides for a user."},"Series":{"properties":{"name_id":{"type":"string","title":"Name Id","example":"infinity_series"},"name":{"type":"string","title":"Name","example":"Infinity Series"},"brand_id":{"type":"string","format":"uuid","title":"Brand Id"},"bucket":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bucket","example":"noso-training-data"},"bucket_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bucket Path","example":"havc/brands/carrier/series/infinity/series_image.jpg"},"id":{"type":"string","format":"uuid","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"brand":{"anyOf":[{"$ref":"#/components/schemas/Brand"},{"type":"null"}]},"models":{"items":{"$ref":"#/components/schemas/Model"},"type":"array","title":"Models"},"image_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Image Url","description":"Full URL to a representative image, constructed by backend"}},"type":"object","required":["name_id","name","brand_id","id","created_at"],"title":"Series"},"SetListStateRequest":{"properties":{"state":{"type":"string","enum":["active","done","archive"],"title":"State"}},"type":"object","required":["state"],"title":"SetListStateRequest"},"SetPlayStateRequest":{"properties":{"action":{"type":"string","enum":["pause","resume","stop"],"title":"Action"}},"type":"object","required":["action"],"title":"SetPlayStateRequest","description":"pause / resume keep the config; stop disables the automated campaign."},"SignedURLRequest":{"properties":{"storage_path":{"type":"string","title":"Storage Path"}},"type":"object","required":["storage_path"],"title":"SignedURLRequest"},"SignedURLResponse":{"properties":{"signed_url":{"type":"string","title":"Signed Url"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["signed_url"],"title":"SignedURLResponse"},"SiteSummaryResponse":{"properties":{"status":{"$ref":"#/components/schemas/SummaryStatus"},"site_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site Summary"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"has_new_transcripts":{"type":"boolean","title":"Has New Transcripts","default":false}},"type":"object","required":["status"],"title":"SiteSummaryResponse"},"SlackIntegrationStatusResponse":{"properties":{"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["enabled"],"title":"SlackIntegrationStatusResponse"},"SmsAgentUserConfig":{"properties":{"message_grouping_window_seconds":{"anyOf":[{"type":"integer","maximum":3600.0,"minimum":0.0},{"type":"null"}],"title":"Message Grouping Window Seconds","description":"Replaces the org grouping window for this user's conversations: the agent waits until the customer has been silent this long before acting. None = org default; 0 = act immediately."}},"type":"object","title":"SmsAgentUserConfig","description":"Per-user overrides of the org-level SMS agent config."},"StartAudienceBuildRequest":{"properties":{"description":{"type":"string","maxLength":1200,"title":"Description","default":""},"objective":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Objective"},"suggested_goal_met_label":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Suggested Goal Met Label"},"campaign_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign User Id"},"audience_limit":{"anyOf":[{"type":"integer","maximum":5000.0,"minimum":1.0},{"type":"null"}],"title":"Audience Limit","default":500},"topic":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Topic"},"customer_ids":{"items":{"type":"string"},"type":"array","maxItems":5000,"title":"Customer Ids"}},"type":"object","title":"StartAudienceBuildRequest"},"StartAudienceBuildResponse":{"properties":{"build":{"$ref":"#/components/schemas/CampaignAudienceBuild"}},"type":"object","required":["build"],"title":"StartAudienceBuildResponse"},"StartCampaignRequest":{"properties":{"batch_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Batch Size"},"customer_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Customer Ids"}},"type":"object","title":"StartCampaignRequest"},"StartCampaignResponse":{"properties":{"campaign_id":{"type":"string","title":"Campaign Id"},"status":{"type":"string","title":"Status"},"total_customers":{"type":"integer","title":"Total Customers"}},"type":"object","required":["campaign_id","status","total_customers"],"title":"StartCampaignResponse"},"StopBatchResponse":{"properties":{"campaign_id":{"type":"string","title":"Campaign Id"},"batch_number":{"type":"integer","title":"Batch Number"},"status":{"type":"string","title":"Status"}},"type":"object","required":["campaign_id","batch_number","status"],"title":"StopBatchResponse"},"StopCampaignResponse":{"properties":{"campaign_id":{"type":"string","title":"Campaign Id"},"status":{"type":"string","title":"Status"},"batches_stopped":{"type":"integer","title":"Batches Stopped"}},"type":"object","required":["campaign_id","status","batches_stopped"],"title":"StopCampaignResponse"},"SuggestMessageResponse":{"properties":{"suggested_message":{"type":"string","title":"Suggested Message"}},"type":"object","required":["suggested_message"],"title":"SuggestMessageResponse","description":"Response model for message suggestion."},"SummaryStatus":{"type":"string","enum":["pending","processing","success","error","empty_audio"],"title":"SummaryStatus"},"SyncResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","message"],"title":"SyncResponse"},"TagScanResponse":{"properties":{"structured_data":{"additionalProperties":true,"type":"object","title":"Structured Data"},"raw_llm_output":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Raw Llm Output"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"}},"type":"object","required":["structured_data"],"title":"TagScanResponse"},"Task":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier for the task"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"Title of the task (may be empty for some integrations)"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Description of the task"},"customer":{"type":"string","title":"Customer","description":"Customer name (first_name + last_name)"},"start_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Date","description":"Scheduled start date/time in ISO format"},"end_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Date","description":"Scheduled end date/time in ISO format"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location","description":"Full address string"},"type":{"type":"string","title":"Type","description":"Integration type identifier","default":"housecall_pro"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Metadata for the task"}},"type":"object","required":["id","customer"],"title":"Task","description":"Internal task model that represents a standardized task structure."},"TaskDetailResponse":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"Title of the task"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Description of the task (fallback for title)"},"customer":{"type":"string","title":"Customer","description":"Customer name"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location","description":"Full address string"},"start_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Date","description":"Scheduled start date/time in ISO format"},"type":{"type":"string","title":"Type","description":"Integration type identifier","default":"housecall_pro"}},"type":"object","required":["customer"],"title":"TaskDetailResponse","description":"Lightweight response model for task detail endpoint - only includes fields used by mobile app."},"TechnicianFilterItem":{"properties":{"user_id":{"type":"string","title":"User Id"},"technician_name":{"type":"string","title":"Technician Name"},"categories":{"items":{"type":"string"},"type":"array","title":"Categories"},"trades":{"items":{"type":"string"},"type":"array","title":"Trades","default":[]}},"type":"object","required":["user_id","technician_name","categories"],"title":"TechnicianFilterItem","description":"A technician option for the filter dropdown."},"TechnicianFilterResponse":{"properties":{"technicians":{"items":{"$ref":"#/components/schemas/TechnicianFilterItem"},"type":"array","title":"Technicians"}},"type":"object","required":["technicians"],"title":"TechnicianFilterResponse","description":"Response model for technician filter list."},"TechnicianListResponse":{"properties":{"technicians":{"items":{"$ref":"#/components/schemas/TechnicianResponse"},"type":"array","title":"Technicians"}},"type":"object","required":["technicians"],"title":"TechnicianListResponse"},"TechnicianResponse":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"phone_number":{"type":"string","title":"Phone Number"},"login_name":{"type":"string","title":"Login Name"}},"type":"object","required":["id","email","phone_number","login_name"],"title":"TechnicianResponse"},"TestEmailRequest":{"properties":{"recipient_email":{"type":"string","format":"email","title":"Recipient Email","description":"Email address to send test to"}},"type":"object","required":["recipient_email"],"title":"TestEmailRequest","description":"Request body for test email"},"ThreadStatusResponse":{"properties":{"has_existing_thread":{"type":"boolean","title":"Has Existing Thread"},"last_subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Subject"}},"type":"object","required":["has_existing_thread"],"title":"ThreadStatusResponse","description":"Whether a conversation has a prior outbound email that can be threaded to."},"TimelineItemResponse":{"properties":{"type":{"type":"string","title":"Type"},"id":{"type":"string","format":"uuid","title":"Id"},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Conversation Id"},"followup_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Followup Id"},"direction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direction"},"from_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Number"},"to_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Number"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"},"media_urls":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Media Urls"},"media_summary":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Media Summary"},"media_summary_generated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Media Summary Generated At"},"twilio_message_sid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Twilio Message Sid"},"is_read":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Read"},"provider_message_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Message Status"},"provider_error_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Provider Error Code"},"provider_error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Error Message"},"call_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call Status"},"call_duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Call Duration Seconds"},"recording_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recording Url"},"transcription_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transcription Text"},"transcription_formatted_content":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Transcription Formatted Content"},"event_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Type"},"event_timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Event Timestamp"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"initiated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Initiated By"},"actor_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor Name"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"sender_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Name"},"sender_first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender First Name"},"sender_last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Last Name"},"reactions":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Reactions"},"ai_reasoning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Reasoning"},"send_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Send Source"}},"type":"object","required":["type","id","created_at"],"title":"TimelineItemResponse","description":"Response model for a timeline item (message, call, or event)."},"TimelineResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/TimelineItemResponse"},"type":"array","title":"Items"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"summary_generated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Summary Generated At"},"conversation_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Status"},"is_archived":{"type":"boolean","title":"Is Archived","default":false},"followup_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Followup Id"},"active_intent":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Active Intent"},"available_phones":{"items":{"$ref":"#/components/schemas/AvailablePhoneResponse"},"type":"array","title":"Available Phones","description":"Available phone numbers for this customer"},"has_more":{"type":"boolean","title":"Has More","description":"Older items exist before this page","default":false}},"type":"object","required":["items"],"title":"TimelineResponse","description":"Response model for timeline endpoint with optional summary."},"TranscribeRequest":{"properties":{"bucket":{"type":"string","title":"Bucket"},"object_key":{"type":"string","title":"Object Key"},"task_id":{"type":"string","title":"Task Id"},"speaker_labels":{"type":"boolean","title":"Speaker Labels","default":true},"streaming_transcribe_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Streaming Transcribe Text"},"location_lat":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Location Lat"},"location_lng":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Location Lng"},"location_accuracy":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Location Accuracy"},"start_timestamp":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start Timestamp"},"end_timestamp":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"End Timestamp"}},"type":"object","required":["bucket","object_key","task_id"],"title":"TranscribeRequest","example":{"bucket":"your-s3-bucket-name","end_timestamp":1704067800,"location_accuracy":10.0,"location_lat":37.7749,"location_lng":-122.4194,"object_key":"recordings/audio-file.wav","speaker_labels":true,"start_timestamp":1704067200,"streaming_transcribe_text":"Real-time transcription content from frontend","task_id":"your-task-id"}},"TranscriptionResponse":{"properties":{"transcription":{"type":"string","title":"Transcription"}},"type":"object","required":["transcription"],"title":"TranscriptionResponse"},"TriggerRunRequest":{"properties":{"agent_type":{"type":"string","title":"Agent Type"},"eval_dataset_ids":{"items":{"type":"string"},"type":"array","title":"Eval Dataset Ids"},"framework_name":{"type":"string","title":"Framework Name"},"trigger":{"type":"string","enum":["on_demand","ci","local"],"title":"Trigger","default":"on_demand"},"budget_cap_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Budget Cap Usd"},"max_concurrency":{"type":"integer","title":"Max Concurrency","default":5}},"type":"object","required":["agent_type","eval_dataset_ids","framework_name"],"title":"TriggerRunRequest"},"UpdateAppliedFiltersRequest":{"properties":{"applied_filters":{"$ref":"#/components/schemas/AppliedFilters"}},"type":"object","required":["applied_filters"],"title":"UpdateAppliedFiltersRequest"},"UpdateAudienceSuggestionRequest":{"properties":{"included":{"type":"boolean","title":"Included"}},"type":"object","required":["included"],"title":"UpdateAudienceSuggestionRequest"},"UpdateAuthorityMatrixRequest":{"properties":{"authority_matrix":{"$ref":"#/components/schemas/AuthorityMatrix"}},"type":"object","required":["authority_matrix"],"title":"UpdateAuthorityMatrixRequest"},"UpdateCampaignTemplateRequest":{"properties":{"first_message_template":{"type":"string","title":"First Message Template"}},"type":"object","required":["first_message_template"],"title":"UpdateCampaignTemplateRequest"},"UpdateCampaignTemplateResponse":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"UpdateCampaignTemplateResponse"},"UpdateChecklistRequest":{"properties":{"checklist_content":{"type":"string","title":"Checklist Content"}},"type":"object","required":["checklist_content"],"title":"UpdateChecklistRequest"},"UpdateConversationAgentToggleRequest":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"updated_by":{"type":"string","title":"Updated By","description":"Source of the toggle action: 'dashboard' or 'mobile'"},"user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Name","description":"Display name of the user performing the toggle, for activity log attribution"},"disable_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Disable Reason","description":"Free-text reason captured when a technician disables AI Reply. Stored on the agent_toggle timeline event metadata as feedback."}},"type":"object","required":["enabled","updated_by"],"title":"UpdateConversationAgentToggleRequest","description":"Request model for updating the per-conversation SMS agent toggle."},"UpdateCustomerStatusRequest":{"properties":{"item_ids":{"items":{"type":"string"},"type":"array","title":"Item Ids"},"customer_status":{"type":"string","title":"Customer Status"},"mark_all":{"type":"boolean","title":"Mark All","default":false}},"type":"object","required":["item_ids","customer_status"],"title":"UpdateCustomerStatusRequest"},"UpdateCustomerStatusResponse":{"properties":{"customer_status":{"type":"string","title":"Customer Status"},"items_updated":{"type":"integer","title":"Items Updated"},"message":{"type":"string","title":"Message"}},"type":"object","required":["customer_status","items_updated","message"],"title":"UpdateCustomerStatusResponse"},"UpdateEmployeeRequest":{"properties":{"email":{"type":"string","title":"Email"},"phone_number":{"type":"string","title":"Phone Number"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"trades":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Trades"}},"type":"object","required":["email","phone_number"],"title":"UpdateEmployeeRequest"},"UpdateEmployeeResponse":{"properties":{"message":{"type":"string","title":"Message"},"employee_id":{"type":"string","title":"Employee Id"}},"type":"object","required":["message","employee_id"],"title":"UpdateEmployeeResponse"},"UpdateLabelsRequest":{"properties":{"instance_class":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instance Class"},"case_quality":{"anyOf":[{"type":"string","enum":["exemplary","acceptable","bad"]},{"type":"null"}],"title":"Case Quality"},"difficulty":{"anyOf":[{"type":"string","enum":["easy","medium","hard"]},{"type":"null"}],"title":"Difficulty"},"criticality":{"anyOf":[{"type":"string","enum":["low","medium","high"]},{"type":"null"}],"title":"Criticality"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"labeled_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Labeled By"}},"type":"object","title":"UpdateLabelsRequest"},"UpdateNoteRequest":{"properties":{"body":{"type":"string","maxLength":2000,"title":"Body","default":""},"image_s3_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image S3 Key"},"remove_image":{"type":"boolean","title":"Remove Image","default":false}},"type":"object","title":"UpdateNoteRequest","description":"Request model for updating a conversation note."},"UpdateStatusRequest":{"properties":{"status":{"type":"string","enum":["draft","ready","needs_review","archived"],"title":"Status"}},"type":"object","required":["status"],"title":"UpdateStatusRequest"},"UploadStartedRequest":{"properties":{"recording_id":{"type":"string","title":"Recording Id","description":"UUID generated by mobile app for this recording"},"task_id":{"type":"string","minLength":1,"title":"Task Id","description":"Task ID to associate with this recording (required)"},"bucket":{"type":"string","title":"Bucket","description":"S3 bucket name"},"object_key":{"type":"string","title":"Object Key","description":"S3 object key"},"file_size":{"type":"integer","title":"File Size","description":"File size in bytes"},"location_lat":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Location Lat","description":"GPS latitude"},"location_lng":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Location Lng","description":"GPS longitude"},"location_accuracy":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Location Accuracy","description":"GPS accuracy in meters"},"start_timestamp":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start Timestamp","description":"Recording start time as Unix timestamp (seconds)"}},"type":"object","required":["recording_id","task_id","bucket","object_key","file_size"],"title":"UploadStartedRequest"},"UserConfig":{"properties":{"job_brief_enabled":{"type":"boolean","title":"Job Brief Enabled","description":"Whether job brief feature is enabled for this user","default":true},"sender":{"$ref":"#/components/schemas/SenderConfig","description":"Customer-facing sender persona configuration"},"sms_agent":{"$ref":"#/components/schemas/SmsAgentUserConfig","description":"Per-user SMS agent overrides"},"call_routing":{"$ref":"#/components/schemas/CallRoutingUserConfig","description":"Per-user inbound call routing overrides"}},"type":"object","title":"UserConfig","description":"Strongly-typed configuration for a user.\n\nThis model is stored in users.config column as JSONB."},"UserListResponse":{"properties":{"users":{"items":{"$ref":"#/components/schemas/UserResponse"},"type":"array","title":"Users"},"total_count":{"type":"integer","title":"Total Count"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["users","total_count","page","page_size"],"title":"UserListResponse","description":"Paginated list of users, returned by GET /users."},"UserResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"clerk_id":{"type":"string","title":"Clerk Id"},"email":{"type":"string","format":"email","title":"Email"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"},"twilio_phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Twilio Phone Number"},"role":{"anyOf":[{"type":"string","enum":["sales_tech","install","noso_sales_admin"]},{"type":"null"}],"title":"Role"},"auto_send_enabled":{"type":"boolean","title":"Auto Send Enabled","default":false},"invoice_synthesis_enabled":{"type":"boolean","title":"Invoice Synthesis Enabled","default":false},"push_all_inbound_messages":{"type":"boolean","title":"Push All Inbound Messages","default":false},"office_route_enabled":{"type":"boolean","title":"Office Route Enabled","default":false},"config":{"$ref":"#/components/schemas/UserConfig","description":"User-level configuration settings"},"trades":{"items":{"type":"string"},"type":"array","title":"Trades","description":"Trade types the technician belongs to (e.g. hvac, plumbing)"},"priority":{"type":"integer","minimum":0.0,"title":"Priority","default":0},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","clerk_id","email","is_active","created_at"],"title":"UserResponse","description":"User response model returned by API endpoints."},"UserUpdate":{"properties":{"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"},"twilio_phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Twilio Phone Number"},"role":{"anyOf":[{"type":"string","enum":["sales_tech","install","noso_sales_admin"]},{"type":"null"}],"title":"Role"},"auto_send_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Send Enabled"},"invoice_synthesis_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Invoice Synthesis Enabled"},"push_all_inbound_messages":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Push All Inbound Messages"},"config":{"anyOf":[{"$ref":"#/components/schemas/UserConfig"},{"type":"null"}]},"trades":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Trades"},"priority":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Priority"}},"type":"object","title":"UserUpdate","description":"Model for updating user information."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"Version":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"Unique identifier for the version."},"platform":{"$ref":"#/components/schemas/PlatformType","description":"Platform type of the version (ios/android)."},"version":{"type":"string","title":"Version","description":"Version number of the app."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Timestamp of when the version was created."},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"Timestamp of when the version was last updated."}},"type":"object","required":["id","platform","version"],"title":"Version"},"WarrantyConfig":{"properties":{"registration":{"type":"boolean","title":"Registration","description":"Enables the post-install warranty-registration operator workflow: the Warranty Registration tab on the Operator page (runs, recordings, and exceptions endpoints), the warranty block in the Monday weekly report, and the exceptions section in the Thursday require-action digest.","default":false},"ledger_spreadsheet_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ledger Spreadsheet Id","description":"For orgs whose warranty work-list is a Google Sheet (rather than the ServiceTitan dispatch board): the spreadsheet id (or full URL) of the ledger. The sheet-driven warranty pipeline reads the current-month tab for jobs to register and writes each outcome back to it. When set (and registration is on), the org runs the sheet flow; when null, the org uses the dispatch-board flow."},"portals":{"additionalProperties":{"$ref":"#/components/schemas/WarrantyPortal"},"type":"object","title":"Portals","description":"Per-org portal id -> manufacturer warranty portal. The KEY is a portal identifier (PortalKey = a known BrandName, or a free-form non-brand portal id) that NOSO Operator/Pilot looks up case-insensitively. A brand's registration portal is keyed by the brand (e.g. 'Bosch', 'Fujitsu', 'Allied', 'Hisense'); a non-registration portal carries its own id (e.g. 'trane_invoice' = Trane's invoice-management portal, distinct from the public Trane registration portal). For the dispatch-board brand gate, a job whose detected brand has no matching registration-portal key is skipped and a Slack alert is sent to the NOSO pilot channel. The value carries the portal URL + login (plaintext) that NOSO Operator/Pilot uses. When empty, the warranty pipeline falls back to the org's code-config supported brands (OrgWarrantyProfile). The non-brand half of PortalKey is open (str), so a stray or one-off portal id can never crash the whole Integration load."},"auto_enqueue":{"type":"boolean","title":"Auto Enqueue","description":"Per-org gate for the daily warranty cron's SQS publish to Pilot. When False (default), the pipeline still evaluates jobs, writes statuses, drains prior Pilot results, and writes outcomes back — but publishes NO new messages to the Pilot queue. Flip to True to let this org's verified-ready backlog and sheet rows be sent to Pilot. Operational toggle, not a workflow-enablement flag (excluded from /operator/access).","default":false}},"type":"object","title":"WarrantyConfig","description":"Per-org configuration for the post-install warranty-registration workflow."},"WarrantyPortal":{"properties":{"portal_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Portal Url","description":"Manufacturer warranty-portal URL"},"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username","description":"Portal login username (plaintext)"},"password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password","description":"Portal login password (plaintext)"}},"type":"object","title":"WarrantyPortal","description":"Per-org manufacturer warranty portal for one brand/OEM.\n\nSECURITY: ``username``/``password`` are stored in PLAINTEXT in the\noperator_config body (per product decision). Treat the operator_config as\nsensitive — these are the credentials NOSO Operator (Pilot) uses to log into\nthe manufacturer's warranty portal. (Preferred long-term: move the secret to\nAWS Secrets Manager and keep only a reference here.)"},"models__conversation__ConversationSummaryResponse":{"properties":{"summary":{"type":"string","title":"Summary"},"summary_generated_at":{"type":"string","format":"date-time","title":"Summary Generated At"}},"type":"object","required":["summary","summary_generated_at"],"title":"ConversationSummaryResponse","description":"Response model for conversation summary."},"routers__field_view__ConversationSummaryResponse":{"properties":{"conversation_id":{"type":"string","title":"Conversation Id"},"customer_name":{"type":"string","title":"Customer Name"}},"type":"object","required":["conversation_id","customer_name"],"title":"ConversationSummaryResponse"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}