{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/metrics":{"get":{"summary":"Metrics","description":"Endpoint that serves Prometheus metrics.","operationId":"metrics_metrics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/staff":{"get":{"tags":["Admin"],"summary":"Get Staff Users","description":"Get all active users (staff) for the current user's customer.\nOnly returns users where is_active=True.\nNon-developer users will not see developer users in the response.\nRequires admin authentication.","operationId":"getStaffUsers","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/StaffUserInfo"},"type":"array","title":"Response Getstaffusers"}}}}}}},"/admin/staff/invite":{"post":{"tags":["Admin"],"summary":"Invite Staff User","description":"Invite a new staff user to the current customer.\nCreates a user and sends them an invite email with a sign-in link.\nRequires admin authentication.","operationId":"inviteStaffUser","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteStaffUserRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteStaffUserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/staff/{user_id}":{"patch":{"tags":["Admin"],"summary":"Update Staff User","description":"Update a staff user's settings. Requires admin authentication.","operationId":"updateStaffUser","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateStaffUserRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateStaffUserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin"],"summary":"Delete Staff User","description":"Delete a staff user.\nRequires admin authentication. Non-developer admins cannot delete\ndeveloper users, and no one can delete their own account.\n\nDeletes the user and cascades to:\n- Calendar records (calendars, google_calendars, calendar_events)\n- User availability records (user_day_availability)\n- Staff group memberships (staff_group_member)\n\nSets to NULL:\n- Staff group created_by/updated_by references\n- Customer google_workspace_admin_user_id reference","operationId":"deleteStaffUser","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/staff/groups":{"get":{"tags":["Admin"],"summary":"Get Staff Groups","description":"Get all staff groups for the current user's customer.\nRequires admin authentication.","operationId":"getStaffGroups","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/StaffGroupInfo"},"type":"array","title":"Response Getstaffgroups"}}}}}},"post":{"tags":["Admin"],"summary":"Create Staff Group","description":"Create a new staff group for the current customer.\nRequires admin authentication.\n\nSupports two modes:\n- members: List of StaffGroupMemberInput with user_id and optional priority_order\n- member_ids: Legacy list of user IDs (for backward compatibility)","operationId":"createStaffGroup","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateStaffGroupRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffGroupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/staff/groups/{group_id}":{"put":{"tags":["Admin"],"summary":"Update Staff Group","description":"Update an existing staff group.\nRequires admin authentication.\n\nSupports two modes for members:\n- members: List of StaffGroupMemberInput with user_id and optional priority_order\n- member_ids: Legacy list of user IDs (for backward compatibility)","operationId":"updateStaffGroup","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","title":"Group Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateStaffGroupRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffGroupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin"],"summary":"Delete Staff Group","description":"Delete a staff group.\nRequires admin authentication.","operationId":"deleteStaffGroup","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","title":"Group Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/reports":{"get":{"tags":["Reports"],"summary":"Get Reports","description":"Get all reports for the current user's customer.\nRequires admin authentication.","operationId":"getReports","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ReportResponse"},"type":"array","title":"Response Getreports"}}}}}},"post":{"tags":["Reports"],"summary":"Create Report","description":"Create a new report for the current customer.\nRequires admin authentication.","operationId":"createReport","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateReportRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportMutationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/reports/{report_id}":{"get":{"tags":["Reports"],"summary":"Get Report","description":"Get a single report by ID.\nRequires admin authentication.","operationId":"getReport","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Reports"],"summary":"Update Report","description":"Update an existing report.\nRequires admin authentication.","operationId":"updateReport","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","title":"Report Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateReportRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportMutationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Reports"],"summary":"Delete Report","description":"Delete a report.\nRequires admin authentication.","operationId":"deleteReport","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","title":"Report Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/login":{"post":{"tags":["Auth"],"summary":"Login","description":"Authenticate user and set HTTP-only cookie with JWT token.\nTest credentials: email='testuser@example.com', password='testpass123'\n\nIf user is registered with Google OAuth, returns error prompting them to use Google login.","operationId":"login","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/forgot-password":{"post":{"tags":["Auth"],"summary":"Forgot Password","description":"Request a password reset link.\n\nAlways returns a generic success message regardless of whether the email\nmatches an eligible account, to prevent email enumeration. A reset email is\nonly sent for active password-login users with a set password.","operationId":"forgotPassword","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__auth__schemas__MessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/reset-password":{"post":{"tags":["Auth"],"summary":"Reset Password","description":"Set a new password using a valid, unused, unexpired reset token.\n\nDoes not log the user in — they return to /login with the new password.","operationId":"resetPassword","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__auth__schemas__MessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/change-password":{"post":{"tags":["Auth"],"summary":"Change Password","description":"Set a new password for the currently authenticated user.\n\nOnly available to password-login accounts; SSO accounts have no password.","operationId":"changePassword","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__auth__schemas__MessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/me":{"get":{"tags":["Auth"],"summary":"Get Current User Info","description":"Get current authenticated user information from cookie","operationId":"getCurrentUser","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserInfo"}}}}}}},"/auth/toggle-developer":{"post":{"tags":["Auth"],"summary":"Toggle Developer","description":"Toggle developer mode for authorized users.","operationId":"toggleDeveloper","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserInfo"}}}}}}},"/auth/logout":{"post":{"tags":["Auth"],"summary":"Logout","description":"Logout endpoint - clears the HTTP-only cookie","operationId":"logout","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/auth/google/authorize":{"get":{"tags":["Auth"],"summary":"Google Authorize","description":"Get Google OAuth authorization URL for sign-in.\nFrontend should redirect user to this URL.\n\nArgs:\n    return_to: Optional URL path to return to after authentication","operationId":"getGoogleSignInUrl","parameters":[{"name":"return_to","in":"query","required":false,"schema":{"type":"string","title":"Return To"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/google/callback":{"get":{"tags":["Auth"],"summary":"Google Callback","description":"OAuth callback endpoint for Google Sign-In.\nExchanges authorization code for access token, gets user info, and creates/logs in user.\nReturns JSON with user data - frontend will handle navigation.","operationId":"googleSignInCallback","parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string","title":"Code"}},{"name":"state","in":"query","required":true,"schema":{"type":"string","title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/microsoft/authorize":{"get":{"tags":["Auth"],"summary":"Microsoft Authorize","description":"Get Microsoft OAuth authorization URL for sign-in.\nFrontend should redirect user to this URL.\n\nArgs:\n    return_to: Optional URL path to return to after authentication","operationId":"getMicrosoftSignInUrl","parameters":[{"name":"return_to","in":"query","required":false,"schema":{"type":"string","title":"Return To"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/microsoft/callback":{"get":{"tags":["Auth"],"summary":"Microsoft Callback","description":"OAuth callback endpoint for Microsoft Sign-In.\nExchanges authorization code for access token, gets user info, and creates/logs in user.\nReturns JSON with user data - frontend will handle navigation.","operationId":"microsoftSignInCallback","parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string","title":"Code"}},{"name":"state","in":"query","required":true,"schema":{"type":"string","title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/status":{"get":{"tags":["Billing","billing"],"summary":"Get Billing Status","description":"Get the current billing setup status for the customer.\n\nAdmin only endpoint.","operationId":"get_billing_status_billing_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingStatusResponse"}}}}}}},"/billing/account":{"post":{"tags":["Billing","billing"],"summary":"Create Moov Account","description":"Create a Moov payment account for the customer.\n\nRequires simplified business information (name, address, phone) and a ToS token.\nThe ToS token should be obtained by the frontend using Moov.js.\n\nAdmin only endpoint.","operationId":"create_moov_account_billing_account_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMoovAccountRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMoovAccountResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/moov-token":{"get":{"tags":["Billing","billing"],"summary":"Get Moov Token","description":"Get a general Moov access token for frontend use.\n\nThe frontend uses this token with Moov.js to obtain ToS tokens\nand perform other Moov operations.\n\nAdmin only endpoint.","operationId":"get_moov_token_billing_moov_token_get","parameters":[{"name":"refresh_token","in":"query","required":false,"schema":{"type":"string","title":"Refresh Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoovTokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/bank-accounts":{"get":{"tags":["Billing","billing"],"summary":"Get Bank Accounts","description":"Get all bank accounts for the customer.\n\nAdmin only endpoint.","operationId":"get_bank_accounts_billing_bank_accounts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListBankAccountsResponse"}}}}}},"post":{"tags":["Billing","billing"],"summary":"Add Bank Account","description":"Add a bank account to the customer's Moov account.\n\nRequires routing number, account number, account type, and holder name.\nThe account will need to be verified via micro-deposits before it can be used.\n\nAdmin only endpoint.","operationId":"add_bank_account_billing_bank_accounts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBankAccountRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankAccountResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/bank-accounts/{bank_account_id}/verify":{"post":{"tags":["Billing","billing"],"summary":"Initiate Bank Verification","description":"Initiate micro-deposit verification for a bank account.\n\nMoov will send a small deposit (typically $0.01) with a verification code.\nThe code can then be submitted via the complete endpoint to verify ownership.\n\nAdmin only endpoint.","operationId":"initiate_bank_verification_billing_bank_accounts__bank_account_id__verify_post","parameters":[{"name":"bank_account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Bank Account Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Initiate Bank Verification Billing Bank Accounts  Bank Account Id  Verify Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Billing","billing"],"summary":"Get Bank Verification Status","description":"Get the current verification status of a bank account.\n\nAdmin only endpoint.","operationId":"get_bank_verification_status_billing_bank_accounts__bank_account_id__verify_get","parameters":[{"name":"bank_account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Bank Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankAccountVerification"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/bank-accounts/{bank_account_id}/verify/complete":{"post":{"tags":["Billing","billing"],"summary":"Complete Bank Verification","description":"Complete bank account verification by submitting the micro-deposit code.\n\nThe verification code is a 4-digit number found in the description\nof the micro-deposit (e.g., \"MV1234\").\n\nAdmin only endpoint.","operationId":"complete_bank_verification_billing_bank_accounts__bank_account_id__verify_complete_post","parameters":[{"name":"bank_account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Bank Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteVerificationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankAccountVerification"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/bank-accounts/{bank_account_id}":{"delete":{"tags":["Billing","billing"],"summary":"Disable Bank Account","description":"Disable a bank account. The account will no longer be usable for payments.\n\nAdmin only endpoint.","operationId":"disable_bank_account_billing_bank_accounts__bank_account_id__delete","parameters":[{"name":"bank_account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Bank Account Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/card-accounts":{"get":{"tags":["Billing","billing"],"summary":"Get Card Accounts","description":"Get all card payment methods for the customer.\n\nAdmin only endpoint.","operationId":"get_card_accounts_billing_card_accounts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListCardAccountsResponse"}}}}}}},"/billing/card-token":{"get":{"tags":["Billing","billing"],"summary":"Get Card Token","description":"Get a scoped Moov access token for adding cards via Moov.js.\n\nThis token has card write permissions and should be used\nby the frontend's Moov.js card form.\n\nAdmin only endpoint.","operationId":"get_card_token_billing_card_token_get","parameters":[{"name":"refresh_token","in":"query","required":false,"schema":{"type":"string","title":"Refresh Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoovTokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/card-accounts/{payment_method_id}":{"delete":{"tags":["Billing","billing"],"summary":"Disable Card Account","description":"Disable a card payment method. The card will no longer be usable for payments.\n\nAdmin only endpoint.","operationId":"disable_card_account_billing_card_accounts__payment_method_id__delete","parameters":[{"name":"payment_method_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Payment Method Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/bank-name":{"get":{"tags":["Billing","billing"],"summary":"Get Bank Name","description":"Look up bank name from routing number.\n\nUseful for validating routing numbers and showing the bank name\nto users before they submit their account information.\n\nAdmin only endpoint.","operationId":"get_bank_name_billing_bank_name_get","parameters":[{"name":"routing_number","in":"query","required":true,"schema":{"type":"string","minLength":9,"maxLength":9,"title":"Routing Number"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankNameResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/default-payment-method":{"get":{"tags":["Billing","billing"],"summary":"Get Default Payment Method","description":"Get the current default payment method.\n\nAdmin only endpoint.","operationId":"get_default_payment_method_billing_default_payment_method_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultPaymentMethodResponse"}}}}}},"post":{"tags":["Billing","billing"],"summary":"Set Default Payment Method","description":"Set the default payment method for monthly billing.\n\nThis should be called after user authorizes recurring payments.\n\nAdmin only endpoint.","operationId":"set_default_payment_method_billing_default_payment_method_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetDefaultPaymentMethodRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Set Default Payment Method Billing Default Payment Method Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/contract":{"get":{"tags":["Billing","billing"],"summary":"Get Billing Contract","description":"Get the billing contract for the customer.\n\nAdmin only endpoint.","operationId":"get_billing_contract_billing_contract_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingContractResponse"}}}}}},"post":{"tags":["Billing","billing"],"summary":"Create Or Update Billing Contract","description":"Create or update the billing contract for the customer.\n\nThis is managed from the developer portal.\n\nAdmin only endpoint.","operationId":"create_or_update_billing_contract_billing_contract_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBillingContractRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingContractResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/developer/contracts/{customer_id}":{"get":{"tags":["Billing","billing"],"summary":"List Customer Contracts Developer","description":"List all billing contracts for a specific customer (developer only).\n\nReturns contracts ordered by start_date descending (newest first).","operationId":"list_customer_contracts_developer_billing_developer_contracts__customer_id__get","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Customer Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BillingContractResponse"},"title":"Response List Customer Contracts Developer Billing Developer Contracts  Customer Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Billing","billing"],"summary":"Create Customer Contract Developer","description":"Create a new billing contract for a customer (developer only).","operationId":"create_customer_contract_developer_billing_developer_contracts__customer_id__post","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Customer Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBillingContractRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingContractResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/developer/contracts/{contract_id}":{"put":{"tags":["Billing","billing"],"summary":"Update Contract Developer","description":"Update an existing billing contract (developer only).","operationId":"update_contract_developer_billing_developer_contracts__contract_id__put","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contract Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBillingContractRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingContractResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Billing","billing"],"summary":"Delete Contract Developer","description":"Soft-delete a billing contract (developer only).","operationId":"delete_contract_developer_billing_developer_contracts__contract_id__delete","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contract Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/developer/moov-account/{customer_id}":{"get":{"tags":["Billing","billing"],"summary":"Get Customer Moov Account Info Developer","description":"Get Moov account information for a customer (developer only).\n\nReturns the legal name, billing address, and other company information\nfrom the customer's Moov account.","operationId":"get_customer_moov_account_info_developer_billing_developer_moov_account__customer_id__get","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Customer Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoovAccountInfoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/preferences":{"get":{"tags":["Billing","billing"],"summary":"Get Billing Preferences","description":"Get billing preferences for the customer.\n\nAdmin only endpoint.","operationId":"get_billing_preferences_billing_preferences_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingPreferencesResponse"}}}}}},"put":{"tags":["Billing","billing"],"summary":"Update Billing Preferences","description":"Update billing preferences for the customer.\n\nAdmin only endpoint.","operationId":"update_billing_preferences_billing_preferences_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBillingPreferencesRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingPreferencesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/developer/runs":{"get":{"tags":["Billing","billing"],"summary":"List Billing Runs","description":"List all billing runs, most recent first.\n\nDeveloper only.","operationId":"list_billing_runs_billing_developer_runs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingRunListResponse"}}}}}},"post":{"tags":["Billing","billing"],"summary":"Start Billing Run","description":"Start a new billing run. Creates a BillingRun record and dispatches a Celery task.\n\nDeveloper only.","operationId":"start_billing_run_billing_developer_runs_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartBillingRunRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/developer/runs/{billing_run_id}":{"get":{"tags":["Billing","billing"],"summary":"Get Billing Run Detail","description":"Get billing run details with all items.\n\nDeveloper only.","operationId":"get_billing_run_detail_billing_developer_runs__billing_run_id__get","parameters":[{"name":"billing_run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Billing Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingRunDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/developer/runs/{billing_run_id}/items/{billing_run_item_id}/mark-paid":{"post":{"tags":["Billing","billing"],"summary":"Mark Item Paid","description":"Manually mark a dry-run billing item as paid (status='success').\n\nThis prevents the period from being billed again in future runs,\nwithout executing a real payment. Developer only.","operationId":"mark_item_paid_billing_developer_runs__billing_run_id__items__billing_run_item_id__mark_paid_post","parameters":[{"name":"billing_run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Billing Run Id"}},{"name":"billing_run_item_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Billing Run Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingRunItemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/developer/runs/{billing_run_id}/execute":{"post":{"tags":["Billing","billing"],"summary":"Execute Dry Run","description":"Execute a dry run for real — converts the run in-place.\n\nDeletes old dry-run items, flips is_dry_run to False, resets counters,\nand re-dispatches the Celery task. The same run ID is reused so the\nUI updates in-place without clutter.\n\nDeveloper only.","operationId":"execute_dry_run_billing_developer_runs__billing_run_id__execute_post","parameters":[{"name":"billing_run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Billing Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/developer/adjustments/{customer_id}":{"get":{"tags":["Billing","billing"],"summary":"List Billing Adjustments","description":"List all billing adjustments for a customer. Developer only.","operationId":"list_billing_adjustments_billing_developer_adjustments__customer_id__get","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Customer Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingAdjustmentListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Billing","billing"],"summary":"Create Billing Adjustment","description":"Create a billing adjustment for a customer. Developer only.","operationId":"create_billing_adjustment_billing_developer_adjustments__customer_id__post","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Customer Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBillingAdjustmentRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingAdjustmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/developer/adjustments/{adjustment_id}":{"put":{"tags":["Billing","billing"],"summary":"Update Billing Adjustment","description":"Update a billing adjustment. Developer only.","operationId":"update_billing_adjustment_billing_developer_adjustments__adjustment_id__put","parameters":[{"name":"adjustment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Adjustment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBillingAdjustmentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingAdjustmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Billing","billing"],"summary":"Delete Billing Adjustment","description":"Soft-delete a billing adjustment. Developer only.","operationId":"delete_billing_adjustment_billing_developer_adjustments__adjustment_id__delete","parameters":[{"name":"adjustment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Adjustment Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/next-bill-preview":{"get":{"tags":["Billing","billing"],"summary":"Get Next Bill Preview","description":"Preview the next bill amount with adjustments applied. Admin only.","operationId":"get_next_bill_preview_billing_next_bill_preview_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NextBillPreviewResponse"}}}}}}},"/billing/adjustments":{"get":{"tags":["Billing","billing"],"summary":"Get Active Adjustments","description":"Get active billing adjustments for the current customer. Admin only.","operationId":"get_active_adjustments_billing_adjustments_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingAdjustmentListResponse"}}}}}}},"/billing/history":{"get":{"tags":["Billing","billing"],"summary":"Get Billing History","description":"Get billing history for the current customer.\n\nReturns all successfully billed periods, most recent first.\nAdmin only — used in customer-facing billing settings.","operationId":"get_billing_history_billing_history_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerBillingHistoryResponse"}}}}}}},"/calendars/customer-availability-timezone":{"get":{"tags":["Calendar"],"summary":"Get Customer Availability Timezone","description":"Get the default availability timezone for the current customer.","operationId":"get_customer_availability_timezone_calendars_customer_availability_timezone_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimezoneResponse"}}}}}},"patch":{"tags":["Calendar"],"summary":"Update Customer Availability Timezone","description":"Update the default availability timezone for the current customer.\n\n- **timezone**: The new timezone (e.g., \"America/New_York\")","operationId":"update_customer_availability_timezone_calendars_customer_availability_timezone_patch","parameters":[{"name":"timezone","in":"query","required":true,"schema":{"type":"string","description":"Timezone (e.g., 'America/New_York')","title":"Timezone"},"description":"Timezone (e.g., 'America/New_York')"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTimezoneResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calendars/{calendar_id}/events":{"get":{"tags":["Calendar"],"summary":"Get Calendar Events By Date","description":"Get calendar events from the database for a given date range.\n\n- **calendar_id**: The ID of the calendar to fetch events from (path parameter)\n- **date**: The start date (ISO format, e.g., '2025-10-06'). Defaults to today if not provided.\n- Returns events from the start of this date (00:00:00) to 2 months later\n\nNote: Events must be refreshed using POST /calendars/{calendar_id}/refresh to be available.","operationId":"get_calendar_events_by_date_calendars__calendar_id__events_get","parameters":[{"name":"calendar_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Calendar Id"}},{"name":"date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The start date (events will be fetched from beginning of this date to 2 months later). Defaults to today.","title":"Date"},"description":"The start date (events will be fetched from beginning of this date to 2 months later). Defaults to today."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Event"},"title":"Response Get Calendar Events By Date Calendars  Calendar Id  Events Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calendars/{calendar_id}/refresh":{"post":{"tags":["Calendar"],"summary":"Refresh Calendar Events","description":"Refresh calendar events by fetching from the provider and saving to the database.\n\nThis endpoint:\n1. Fetches events from the calendar provider for the next 2 months\n2. Deletes existing event records for this calendar\n3. Saves the newly fetched events to the database\n\n- **calendar_id**: The ID of the calendar to refresh (path parameter)\n\nReturns:\n    Dictionary with the number of events refreshed","operationId":"refresh_calendar_events_calendars__calendar_id__refresh_post","parameters":[{"name":"calendar_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Calendar Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calendars/availability":{"get":{"tags":["Calendar"],"summary":"Get User Availability","description":"Get all availability rules for the current user.\n\nReturns a list of availability time ranges grouped by day of the week.","operationId":"get_user_availability_calendars_availability_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AvailabilityResponse"},"type":"array","title":"Response Get User Availability Calendars Availability Get"}}}}}},"post":{"tags":["Calendar"],"summary":"Create User Availability","description":"Create a new availability rule for the current user.\n\n- **day_of_week**: Day of the week (monday, tuesday, etc.)\n- **start_time**: Start time (e.g., \"09:00:00\")\n- **end_time**: End time (e.g., \"17:00:00\")\n\nMultiple availability rules can exist for the same day to represent split schedules.","operationId":"create_user_availability_calendars_availability_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAvailabilityRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailabilityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calendars/users/{user_id}/calendar-access/{calendar_id}":{"patch":{"tags":["Calendar"],"summary":"Update User Calendar Access","description":"Update whether a specific user uses a specific calendar for availability checking.\n\n- **user_id**: The ID of the user\n- **calendar_id**: The ID of the calendar\n- **used_for_availability**: Whether this user should use this calendar for availability checking","operationId":"update_user_calendar_access_calendars_users__user_id__calendar_access__calendar_id__patch","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"calendar_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Calendar Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCalendarAvailabilityRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calendars/users/{user_id}/booking-calendar":{"patch":{"tags":["Calendar"],"summary":"Update User Booking Calendar","description":"Update the booking calendar for a user.\n\n- **user_id**: The ID of the user to update\n- **booking_calendar_id**: The ID of the calendar to use for booking (or null to clear)","operationId":"update_user_booking_calendar_calendars_users__user_id__booking_calendar_patch","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserBookingCalendarRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserBookingCalendarResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calendars/all-users-availability":{"get":{"tags":["Calendar"],"summary":"Get All Users Availability","description":"Get all active users for the current customer along with their availability.\n\nReturns a list of users with their availability schedules.\nNon-developer users will not see developer users in the response.\nOnly accessible by users in the same customer.","operationId":"get_all_users_availability_calendars_all_users_availability_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/UserWithAvailability"},"type":"array","title":"Response Get All Users Availability Calendars All Users Availability Get"}}}}}}},"/calendars/users/{user_id}/availability":{"get":{"tags":["Calendar"],"summary":"Get Specific User Availability","description":"Get all availability rules for a specific user.\n\n- **user_id**: The ID of the user to get availability for\n\nReturns a list of availability time ranges grouped by day of the week.\nOnly accessible by users in the same customer.","operationId":"get_specific_user_availability_calendars_users__user_id__availability_get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AvailabilityResponse"},"title":"Response Get Specific User Availability Calendars Users  User Id  Availability Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Calendar"],"summary":"Create Specific User Availability","description":"Create a new availability rule for a specific user.\n\n- **user_id**: The ID of the user to create availability for\n- **day_of_week**: Day of the week (monday, tuesday, etc.)\n- **start_time**: Start time (e.g., \"09:00:00\")\n- **end_time**: End time (e.g., \"17:00:00\")\n\nMultiple availability rules can exist for the same day to represent split schedules.\nOnly accessible by users in the same customer.","operationId":"create_specific_user_availability_calendars_users__user_id__availability_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAvailabilityRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailabilityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calendars/availability/{availability_id}":{"patch":{"tags":["Calendar"],"summary":"Update User Availability","description":"Update an availability rule for the current user.\n\n- **availability_id**: The ID of the availability rule to update\n- **day_of_week**: Optional new day of the week\n- **start_time**: Optional new start time\n- **end_time**: Optional new end time","operationId":"update_user_availability_calendars_availability__availability_id__patch","parameters":[{"name":"availability_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Availability Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAvailabilityRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailabilityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Calendar"],"summary":"Delete User Availability","description":"Delete an availability rule for the current user.\n\n- **availability_id**: The ID of the availability rule to delete","operationId":"delete_user_availability_calendars_availability__availability_id__delete","parameters":[{"name":"availability_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Availability Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calendars/users/{user_id}/availability/{availability_id}":{"patch":{"tags":["Calendar"],"summary":"Update Specific User Availability","description":"Update an availability rule for a specific user.\n\n- **user_id**: The ID of the user\n- **availability_id**: The ID of the availability rule to update\n- **day_of_week**: Optional new day of the week\n- **start_time**: Optional new start time\n- **end_time**: Optional new end time\n\nOnly accessible by users in the same customer.","operationId":"update_specific_user_availability_calendars_users__user_id__availability__availability_id__patch","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"availability_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Availability Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAvailabilityRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailabilityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Calendar"],"summary":"Delete Specific User Availability","description":"Delete an availability rule for a specific user.\n\n- **user_id**: The ID of the user\n- **availability_id**: The ID of the availability rule to delete\n\nOnly accessible by users in the same customer.","operationId":"delete_specific_user_availability_calendars_users__user_id__availability__availability_id__delete","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"availability_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Availability Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calendars/users/{user_id}/availability-timezone":{"patch":{"tags":["Calendar"],"summary":"Update User Availability Timezone","description":"Update the availability timezone for a specific user.\n\n- **user_id**: The ID of the user\n- **timezone**: The new timezone (e.g., \"America/New_York\")","operationId":"update_user_availability_timezone_calendars_users__user_id__availability_timezone_patch","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"timezone","in":"query","required":true,"schema":{"type":"string","description":"Timezone (e.g., 'America/New_York')","title":"Timezone"},"description":"Timezone (e.g., 'America/New_York')"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTimezoneResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calendars/users/{user_id}/apply-default-availability":{"post":{"tags":["Calendar"],"summary":"Apply Default Availability To User","description":"Apply the customer's default availability schedule to a specific user.\n\nThis will:\n1. Delete all existing availability for the user\n2. Copy all customer default availability slots to the user\n3. Set the user's timezone to the customer's default timezone\n\n- **user_id**: The ID of the user to apply the default schedule to","operationId":"apply_default_availability_to_user_calendars_users__user_id__apply_default_availability_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calendars/customer-availability":{"get":{"tags":["Calendar"],"summary":"Get Customer Availability","description":"Get all default availability rules for the current customer.\n\nReturns a list of default availability time ranges grouped by day of the week.","operationId":"get_customer_availability_calendars_customer_availability_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CustomerAvailabilityResponse"},"type":"array","title":"Response Get Customer Availability Calendars Customer Availability Get"}}}}}},"post":{"tags":["Calendar"],"summary":"Create Customer Availability","description":"Create a new default availability rule for the current customer.\n\n- **day_of_week**: Day of the week (monday, tuesday, etc.)\n- **start_time**: Start time (e.g., \"09:00:00\")\n- **end_time**: End time (e.g., \"17:00:00\")\n\nMultiple availability rules can exist for the same day to represent split schedules.","operationId":"create_customer_availability_calendars_customer_availability_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAvailabilityRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerAvailabilityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calendars/customer-availability/{availability_id}":{"patch":{"tags":["Calendar"],"summary":"Update Customer Availability","description":"Update a default availability rule for the current customer.\n\n- **availability_id**: The ID of the availability rule to update\n- **day_of_week**: Optional new day of the week\n- **start_time**: Optional new start time\n- **end_time**: Optional new end time","operationId":"update_customer_availability_calendars_customer_availability__availability_id__patch","parameters":[{"name":"availability_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Availability Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAvailabilityRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerAvailabilityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Calendar"],"summary":"Delete Customer Availability","description":"Delete a default availability rule for the current customer.\n\n- **availability_id**: The ID of the availability rule to delete","operationId":"delete_customer_availability_calendars_customer_availability__availability_id__delete","parameters":[{"name":"availability_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Availability Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calendars/google-calendars/sync":{"post":{"tags":["Calendar"],"summary":"Sync User Google Calendars","description":"Sync Google calendars for a user.\n\nFetches all calendars from the specified user's Google account and:\n1. Creates/updates GoogleCalendar records in the database\n2. Creates/updates corresponding Calendar records\n3. Deletes calendars that no longer exist in Google\n\n- **user_id**: Optional user ID to sync calendars for. If not provided, syncs current user's calendars.\n\nReturns the list of synced calendars.","operationId":"sync_user_google_calendars_calendars_google_calendars_sync_post","parameters":[{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Optional user ID to sync calendars for. If not provided, syncs current user's calendars.","title":"User Id"},"description":"Optional user ID to sync calendars for. If not provided, syncs current user's calendars."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncGoogleCalendarsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calendars/google-calendars":{"get":{"tags":["Calendar"],"summary":"List User Google Calendars","description":"List the current user's Google calendars stored in the database.\n\nReturns calendars that have been previously synced for this user.\nUse POST /calendars/google-calendars/sync to fetch the latest calendars from Google.","operationId":"list_user_google_calendars_calendars_google_calendars_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleCalendarListResponse"}}}}}}},"/calendars/microsoft365-calendars/sync":{"post":{"tags":["Calendar"],"summary":"Sync User Microsoft365 Calendars","description":"Sync Microsoft 365 calendars for a user.\n\nFetches all calendars from the specified user's Microsoft 365 account and:\n1. Creates/updates Microsoft365Calendar records in the database\n2. Creates/updates corresponding Calendar records\n3. Deletes calendars that no longer exist in Microsoft 365\n\n- **user_id**: Optional user ID to sync calendars for. If not provided, syncs current user's calendars.\n\nReturns the list of synced calendars.","operationId":"sync_user_microsoft365_calendars_calendars_microsoft365_calendars_sync_post","parameters":[{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Optional user ID to sync calendars for. If not provided, syncs current user's calendars.","title":"User Id"},"description":"Optional user ID to sync calendars for. If not provided, syncs current user's calendars."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncMicrosoft365CalendarsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calendars/microsoft365-calendars":{"get":{"tags":["Calendar"],"summary":"List User Microsoft365 Calendars","description":"List the current user's Microsoft 365 calendars stored in the database.\n\nReturns calendars that have been previously synced for this user.\nUse POST /calendars/microsoft365-calendars/sync to fetch the latest calendars from Microsoft 365.","operationId":"list_user_microsoft365_calendars_calendars_microsoft365_calendars_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365CalendarListResponse"}}}}}}},"/calendars/available-slots":{"get":{"tags":["Calendar"],"summary":"Get Staff Group Available Slots","description":"Get available time slots for a staff group on a given day.\n\nThis endpoint is authenticated using a service token (Bearer token in Authorization header).\n\nThis endpoint:\n1. Resolves the staff group from case_id (or defaults to first Office group)\n2. Gets the members of the staff group\n3. Fetches their availability schedules for that day\n4. Fetches their calendar events (only for calendars used for availability)\n5. Overlays them with the group's meeting configuration (respecting timezones)\n6. Returns time slots where at least one user is available (no calendar events overlapping)\n\n- **date**: The date to check availability for (ISO format, e.g., '2025-10-15')\n- **case_id**: Optional ID of case to get assigned staff group (defaults to first Office group)\n\nReturns:\n    List of available time slots with the user IDs that are available for each slot.","operationId":"get_staff_group_available_slots_calendars_available_slots_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"date","in":"query","required":true,"schema":{"type":"string","format":"date","description":"The date to check availability for (ISO format, e.g., '2025-10-15')","title":"Date"},"description":"The date to check availability for (ISO format, e.g., '2025-10-15')"},{"name":"case_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The case ID to get the staff group from","title":"Case Id"},"description":"The case ID to get the staff group from"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffGroupAvailableSlotsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calendars/group-busy-times":{"get":{"tags":["Calendar"],"summary":"Get Group Busy Times","description":"Get busy time ranges for a staff group over a date range.\n\nThis endpoint returns time ranges when ALL members of the group are busy\n(i.e., when no one is available to take a meeting). This is useful for\npreviewing group availability in a calendar view.\n\nThe endpoint reuses the same availability calculation logic as the live\ncall flow to ensure consistency.\n\n- **staff_group_id**: The staff group ID to check\n- **start_date**: Start date of the range (inclusive)\n- **end_date**: End date of the range (inclusive)\n\nReturns:\n    List of busy time ranges with start and end datetimes, plus the display timezone.","operationId":"get_group_busy_times_calendars_group_busy_times_get","parameters":[{"name":"staff_group_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"The staff group ID to get busy times for","title":"Staff Group Id"},"description":"The staff group ID to get busy times for"},{"name":"start_date","in":"query","required":true,"schema":{"type":"string","format":"date","description":"Start date of the range (ISO format, e.g., '2025-10-15')","title":"Start Date"},"description":"Start date of the range (ISO format, e.g., '2025-10-15')"},{"name":"end_date","in":"query","required":true,"schema":{"type":"string","format":"date","description":"End date of the range (ISO format, e.g., '2025-10-21')","title":"End Date"},"description":"End date of the range (ISO format, e.g., '2025-10-21')"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupBusyTimesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calendars/book-meeting":{"post":{"tags":["Calendar"],"summary":"Book Meeting","description":"Book a meeting with a staff group at a specific time slot.\n\nThis endpoint is authenticated using a service token (Bearer token in Authorization header).\n\nThis endpoint:\n1. Resolves the staff group from case_id (or defaults to first Office group)\n2. Checks if the call is a test call - if so, returns mock data without booking\n3. Checks which members of the staff group are available at the requested time\n4. Randomly selects one available member\n5. Books the meeting on that member's calendar\n\n- **call_id**: The ID of the call (required to determine if this is a test call)\n- **case_id**: Optional ID of case to get assigned staff group (defaults to first Office group)\n- **first_name**: Client's first name\n- **last_name**: Client's last name\n- **phone_number**: Client's phone number\n- **email**: *(deprecated)* Optional client's email address\n- **time_slot**: The desired meeting time (datetime with timezone)\n\nReturns:\n    Information about the booked meeting including the assigned staff member.","operationId":"book_meeting_calendars_book_meeting_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookMeetingRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookMeetingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/calendars/meetings/metrics":{"get":{"tags":["Calendar"],"summary":"Get Meeting Metrics","description":"Get metrics for meetings (last 24 hours, this week, total).\n\nThis endpoint is authenticated using user session authentication.\n\nReturns:\n    Meeting metrics including counts for last 24 hours, this week, and all time.","operationId":"get_meeting_metrics_calendars_meetings_metrics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingMetricsResponse"}}}}}}},"/calendars/meetings":{"get":{"tags":["Calendar"],"summary":"List Meetings","description":"Get a paginated list of meetings for the current customer.\n\nThis endpoint is authenticated using user session authentication.\n\nReturns:\n    Paginated list of meetings with attendee and staff member information.","operationId":"list_meetings_calendars_meetings_get","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 items per page","default":20,"title":"Page Size"},"description":"Number of items per page"},{"name":"sort_column","in":"query","required":false,"schema":{"type":"string","description":"Column to sort by","default":"start_time","title":"Sort Column"},"description":"Column to sort by"},{"name":"sort_direction","in":"query","required":false,"schema":{"type":"string","description":"Sort direction (asc or desc)","default":"desc","title":"Sort Direction"},"description":"Sort direction (asc or desc)"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search query for filtering meetings","title":"Search"},"description":"Search query for filtering meetings"},{"name":"staff_member_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by staff member ID","title":"Staff Member Id"},"description":"Filter by staff member ID"},{"name":"case_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by case ID","title":"Case Id"},"description":"Filter by case ID"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status (upcoming or past)","title":"Status"},"description":"Filter by status (upcoming or past)"},{"name":"include_past_meetings","in":"query","required":false,"schema":{"type":"boolean","description":"Include past meetings in results","default":true,"title":"Include Past Meetings"},"description":"Include past meetings in results"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__calendar__schemas__MeetingListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calendars/meetings/staff-members":{"get":{"tags":["Calendar"],"summary":"Get Meeting Staff Members","description":"Get list of staff members who have booked meetings.\n\nThis endpoint is authenticated using user session authentication.\nUsed for populating filter dropdowns in the frontend.\n\nReturns:\n    List of staff members with meetings.","operationId":"get_meeting_staff_members_calendars_meetings_staff_members_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingStaffMembersResponse"}}}}}}},"/calendars/meetings/cases":{"get":{"tags":["Calendar"],"summary":"Get Meeting Cases","description":"Get list of cases that have associated meetings.\n\nThis endpoint is authenticated using user session authentication.\nUsed for populating filter dropdowns in the frontend.\n\nReturns:\n    List of cases with meetings.","operationId":"get_meeting_cases_calendars_meetings_cases_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingCasesResponse"}}}}}}},"/calendars/meetings/by-call/{call_id}":{"get":{"tags":["Calendar"],"summary":"Get Meeting By Call","description":"Get meeting details by call ID.\n\nThis endpoint is authenticated using user session authentication.\n\nReturns:\n    Meeting details if a meeting was booked from the specified call,\n    or 404 if no meeting exists for the call.","operationId":"get_meeting_by_call_calendars_meetings_by_call__call_id__get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calendars/meetings/{meeting_id}":{"get":{"tags":["Calendar"],"summary":"Get Meeting","description":"Get details of a specific meeting.\n\nThis endpoint is authenticated using user session authentication.\n\nReturns:\n    Meeting details including attendee and staff member information.","operationId":"get_meeting_calendars_meetings__meeting_id__get","parameters":[{"name":"meeting_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Meeting Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calendars/{calendar_id}":{"get":{"tags":["Calendar"],"summary":"Get Calendar","description":"Get calendar details by ID.\n\n- **calendar_id**: The ID of the calendar (path parameter)\n\nReturns calendar details including timezone information.","operationId":"get_calendar_calendars__calendar_id__get","parameters":[{"name":"calendar_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Calendar Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}/pp-status":{"get":{"tags":["Calls"],"summary":"Get Pp Status","operationId":"get_pp_status_calls__call_id__pp_status_get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PPStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}/zapier-status":{"get":{"tags":["Calls"],"summary":"Get Zapier Status","operationId":"get_zapier_status_calls__call_id__zapier_status_get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__calls__pipeline__schemas__ZapierStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}/ghl-status":{"get":{"tags":["Calls"],"summary":"Get Ghl Card Status","description":"Get GoHighLevel display status for a call (customer-facing card).","operationId":"getGhlCardStatus","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GhlCardStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}/pp-contact-match":{"get":{"tags":["Calls"],"summary":"Get Pp Contact Match","operationId":"get_pp_contact_match_calls__call_id__pp_contact_match_get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PPContactMatchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}/processing-status":{"get":{"tags":["Calls"],"summary":"Get Call Processing Status","operationId":"get_call_processing_status_calls__call_id__processing_status_get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallProcessingStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}/pipeline":{"get":{"tags":["Calls"],"summary":"Get Call Pipeline","operationId":"get_call_pipeline_calls__call_id__pipeline_get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallPipelineResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}/retry-pipeline":{"post":{"tags":["Calls"],"summary":"Retry Call Pipeline","operationId":"retry_call_pipeline_calls__call_id__retry_pipeline_post","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}/force-create-lead":{"post":{"tags":["Calls"],"summary":"Force Create Lead","operationId":"force_create_lead_calls__call_id__force_create_lead_post","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}/force-create-inquiry":{"post":{"tags":["Calls"],"summary":"Force Create Inquiry","operationId":"force_create_inquiry_calls__call_id__force_create_inquiry_post","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/grade-missing":{"post":{"tags":["Calls"],"summary":"Grade Calls Missing Grades","operationId":"grade_calls_missing_grades_calls_grade_missing_post","responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/calls/screening/initiate":{"post":{"tags":["Calls"],"summary":"Initiate Screening","description":"Initiate call screening.\n\nThis endpoint initiates an outbound Twilio call to the screening phone number.\nThe recipient will hear a TTS prompt with the caller's name and reason,\nand can press 1 to accept or 2 to decline.\n\nRequires agent token authentication.\n\nReturns:\n- **screening_id**: UUID to poll for status\n- **status**: Initial status (pending)","operationId":"initiate_screening_calls_screening_initiate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitiateScreeningRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitiateScreeningResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/calls/screening/{screening_id}/status":{"get":{"tags":["Calls"],"summary":"Get Screening Status","description":"Get screening status for bot polling.\n\nThe bot should poll this endpoint every 1-2 seconds to check\nif the screening call has been accepted or declined.\n\nRequires agent token authentication.\n\nReturns:\n- **screening_id**: UUID of the screening request\n- **status**: Current status (pending, accepted, declined, no_answer, failed)\n- **updated_at**: When the status was last updated","operationId":"get_screening_status_calls_screening__screening_id__status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"screening_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Screening Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScreeningStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/screening/{screening_id}/bridge":{"post":{"tags":["Calls"],"summary":"Bridge Screening Calls","description":"Bridge the screening call with the original caller.\n\nCall this endpoint after the screening status becomes \"accepted\".\nThis will connect the screened person directly with the original caller\nvia Twilio conference, allowing the bot to disconnect.\n\nRequires agent token authentication.\n\nReturns:\n- **success**: Whether the bridge was successful\n- **screening_id**: UUID of the screening request\n- **bridged_at**: Timestamp when calls were bridged","operationId":"bridge_screening_calls_calls_screening__screening_id__bridge_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"screening_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Screening Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BridgeCallsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/screening/twiml/{screening_id}":{"post":{"tags":["Calls"],"summary":"Get Screening Twiml","description":"Twilio webhook: Get initial TwiML for screening call.\n\nThis endpoint is called by Twilio when the screening call connects.\nReturns TwiML with the screening prompt (TTS) and DTMF gather.\n\nNo authentication (Twilio webhook).","operationId":"get_screening_twiml_calls_screening_twiml__screening_id__post","parameters":[{"name":"screening_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Screening Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/screening/gather/{screening_id}":{"post":{"tags":["Calls"],"summary":"Handle Screening Gather","description":"Twilio webhook: Handle DTMF input from screening call.\n\nThis endpoint is called by Twilio when the recipient presses a digit.\n- Press 1: Accept the call (status becomes \"accepted\")\n- Press 2: Decline the call (status becomes \"declined\")\n\nNo authentication (Twilio webhook).","operationId":"handle_screening_gather_calls_screening_gather__screening_id__post","parameters":[{"name":"screening_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Screening Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/screening/decline-reason/{screening_id}":{"post":{"tags":["Calls"],"summary":"Handle Screening Decline Reason","description":"Twilio webhook: Handle decline reason speech/DTMF input.\n\nThis endpoint is called by Twilio after the user presses 2 (decline) and is\nprompted to optionally speak a reason. Twilio sends:\n- SpeechResult: Transcribed speech if the user spoke\n- Digits: DTMF digits if the user pressed a key to skip\n- Neither: If the user didn't respond (timeout) or just hung up\n\nNo authentication (Twilio webhook).","operationId":"handle_screening_decline_reason_calls_screening_decline_reason__screening_id__post","parameters":[{"name":"screening_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Screening Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/screening/status-callback/{screening_id}":{"post":{"tags":["Calls"],"summary":"Handle Screening Status Callback","description":"Twilio webhook: Handle call status updates for screening call.\n\nThis endpoint is called by Twilio when the screening call status changes\n(completed, busy, no-answer, failed, canceled).\n\nNo authentication (Twilio webhook).","operationId":"handle_screening_status_callback_calls_screening_status_callback__screening_id__post","parameters":[{"name":"screening_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Screening Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/screening/amd-callback/{screening_id}":{"post":{"tags":["Calls"],"summary":"Handle Screening Amd Callback","description":"Twilio webhook: Handle Answering Machine Detection (AMD) callback.\n\nThis endpoint is called by Twilio when AMD determines whether the call\nwas answered by a human or machine. If a machine is detected, we cancel\nthe call immediately to get back to the original caller faster.\n\nNo authentication (Twilio webhook).","operationId":"handle_screening_amd_callback_calls_screening_amd_callback__screening_id__post","parameters":[{"name":"screening_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Screening Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}/case-match":{"get":{"tags":["Calls"],"summary":"Get Call Case Match","description":"Get case matching result for a call.\n\nReturns matched case info, match status/method, case-note status, and\n(for developers) debug info. Requires user authentication.","operationId":"get_call_case_match_calls__call_id__case_match_get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallCaseMatchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}/case-search":{"get":{"tags":["Calls"],"summary":"User Case Search","description":"Search cases in the customer's active case-management system (SA or FV).","operationId":"user_case_search_calls__call_id__case_search_get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}},{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Search query (name or case number)","title":"Q"},"description":"Search query (name or case number)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCaseSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}/user-manual-case-match":{"post":{"tags":["Calls"],"summary":"User Manual Case Match","description":"Manually match a call to a specific case (end-user).","operationId":"user_manual_case_match_calls__call_id__user_manual_case_match_post","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserManualCaseMatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserManualCaseMatchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}/user-change-matched-case":{"post":{"tags":["Calls"],"summary":"User Change Matched Case","description":"Change the matched case for a call (end-user).\n\nRequires the case_match_corrections_enabled feature flag (developers\nbypass via the developer endpoint). Deletes the old note (if we posted\nit), regenerates the note against the new case's context, and posts it\nto the new case.","operationId":"user_change_matched_case_calls__call_id__user_change_matched_case_post","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeMatchedCaseRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeMatchedCaseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}/retry-case-matching":{"post":{"tags":["Calls"],"summary":"Retry Case Matching","description":"Retry case matching for a call.\n\nDevelopers bypass the feature gates (legacy parity); end users require\ncase_match_corrections_enabled + case_notes_enabled.","operationId":"retry_case_matching_calls__call_id__retry_case_matching_post","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetryCaseMatchingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}/approve-case-match":{"post":{"tags":["Calls"],"summary":"Approve Case Match","description":"Approve a pending case match (dry-run mode only).","operationId":"approve_case_match_calls__call_id__approve_case_match_post","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveCaseMatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveCaseMatchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}/reject-case-match":{"post":{"tags":["Calls"],"summary":"Reject Case Match","description":"Reject a pending case match (dry-run mode only).","operationId":"reject_case_match_calls__call_id__reject_case_match_post","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RejectCaseMatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RejectCaseMatchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}/mark-non-substantive":{"post":{"tags":["Calls"],"summary":"Mark Non Substantive","description":"Mark a call as non-substantive (override LLM assessment).","operationId":"mark_non_substantive_calls__call_id__mark_non_substantive_post","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkNonSubstantiveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}/change-matched-case":{"post":{"tags":["Calls"],"summary":"Change Matched Case","description":"Change the matched case for a call (and safely delete old note if posted).","operationId":"change_matched_case_calls__call_id__change_matched_case_post","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeMatchedCaseRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeMatchedCaseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}/manual-case-match":{"post":{"tags":["Calls"],"summary":"Manual Case Match","description":"Manually match a call to a specific case (developer).","operationId":"manual_case_match_calls__call_id__manual_case_match_post","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualCaseMatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualCaseMatchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}/transcript":{"get":{"tags":["Calls"],"summary":"Get Call Transcript","description":"Get call transcript with presigned recording URL.\n\nReturns transcript data including:\n- Real-time transcript from bot (available immediately)\n- Full aligned transcript with timestamps (when AssemblyAI completes)\n- Presigned URL for audio playback (expires in 1 hour)\n- Processing status and metadata\n\nRequires user authentication (not agent token).","operationId":"get_call_transcript_calls__call_id__transcript_get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallTranscriptResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}/live-transcript":{"get":{"tags":["Calls"],"summary":"Get Call Live Transcript","description":"Get the live transcript events for a call (developer-only).\n\nReturns the finalized utterances ingested from Vapi transcript webhook\nevents, ordered chronologically. Available while the call is still in\nprogress — unlike /transcript, which 404s until the end-of-call transcript\nrecord exists. Intended for polling from the calls page.","operationId":"get_call_live_transcript_calls__call_id__live_transcript_get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallLiveTranscriptResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}/transcript/regenerate":{"post":{"tags":["Calls"],"summary":"Regenerate Transcript","description":"Regenerate transcript for a call from the saved audio recording.\n\nThis endpoint allows regenerating the transcript when the original\ntranscription had issues (e.g., speaker misidentification).\n\nRequirements:\n- The call must have a saved audio recording in S3\n- User must have access to the call\n\nThe regeneration process:\n\nFor normal calls (not transferred):\n1. Resets the transcript status to pending\n2. Resubmits the audio to AssemblyAI with 1-2 expected speakers\n3. Uses LLM-based speaker identification for better accuracy\n4. Re-runs grading and summarization after transcription completes\n\nFor transferred calls:\n1. Resets the transcript status to pending\n2. Downloads the audio and splits it at the transfer point\n3. Transcribes bot segment (Caller + Assistant) separately\n4. Transcribes attorney segment (Caller + Attorney) separately\n5. Merges transcripts with correct speaker labels\n6. Re-runs grading and summarization after transcription completes\n\nReturns 202 Accepted since the transcription happens asynchronously.","operationId":"regenerate_transcript_calls__call_id__transcript_regenerate_post","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}/summary":{"get":{"tags":["Calls"],"summary":"Get Call Summary","description":"Get AI-generated summary for a call.\n\nReturns summary data including:\n- Short summary (1-2 sentences) - always present\n- Long summary (4-6 sentences) - optional, if additional details available\n- Caller identity (name/organization) - optional, if mentioned in call\n- Call message (identity + message left) - optional, if message was left\n\nThe summary is generated automatically after transcription completes.\n\nRequires user authentication (not agent token).","operationId":"get_call_summary_calls__call_id__summary_get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallSummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Calls"],"summary":"Update Call Summary","description":"Update a call's long_summary. Requires developer authentication.","operationId":"update_call_summary_calls__call_id__summary_patch","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCallSummaryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCallSummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}/summary/rewrite":{"post":{"tags":["Calls"],"summary":"Rewrite Call Summary","description":"Use AI to rewrite a call summary based on instructions.\nReturns the rewritten text without saving (user reviews first).\nRequires developer authentication.","operationId":"rewrite_call_summary_calls__call_id__summary_rewrite_post","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RewriteCallSummaryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RewriteCallSummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}/grading":{"patch":{"tags":["Calls"],"summary":"Update Call Grading","description":"Update a call's grading fields. Only fields provided in the request are\nupdated. Requires developer authentication.","operationId":"update_call_grading_calls__call_id__grading_patch","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCallGradingRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCallGradingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}/feedback":{"get":{"tags":["Calls"],"summary":"List Call Feedback","description":"List all feedback on a call, newest first. Admin or developer only.","operationId":"listCallFeedback","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CallFeedbackResponse"},"title":"Response Listcallfeedback"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Calls"],"summary":"Create Call Feedback","description":"Leave feedback on a call. Admin or developer only.\n\nFor wrong_transfer_destination feedback, expected_transfer_destination_id\nmust reference one of the customer's configured transfer destinations; its\nname is snapshotted onto the feedback row.","operationId":"createCallFeedback","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallFeedbackCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallFeedbackResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}/feedback/{feedback_id}":{"delete":{"tags":["Calls"],"summary":"Delete Call Feedback","description":"Delete a piece of call feedback. The author can delete their own feedback;\ndevelopers can delete any.","operationId":"deleteCallFeedback","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}},{"name":"feedback_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Feedback Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}/docusign-envelope":{"get":{"tags":["Calls"],"summary":"Get Call Docusign Envelope","description":"Return the DocuSign draft envelope generated for an intake call.\n\nThe extracted values are paired with their form field ``display_name`` so\nthe UI can render labeled rows. 404 when no envelope has been created yet\n(e.g. the pipeline is still running, or no template matched).","operationId":"get_call_docusign_envelope_calls__call_id__docusign_envelope_get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallDocuSignEnvelopeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/shortcode/{shortcode}":{"get":{"tags":["Calls"],"summary":"Resolve Shortcode","description":"Resolve a shortcode to its call_id.\n\nThis endpoint is public (no authentication required) as it's accessed\nfrom SMS links before the user is logged in.\n\nThe frontend will redirect to the call detail page after resolving.\n\nReturns:\n- **call_id**: The UUID of the call associated with the shortcode","operationId":"resolve_shortcode_calls_shortcode__shortcode__get","parameters":[{"name":"shortcode","in":"path","required":true,"schema":{"type":"string","title":"Shortcode"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShortcodeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/":{"get":{"tags":["Calls"],"summary":"List Calls","description":"List all calls for the current user's customer.\n\nReturns calls ordered by created_at descending (newest first).\nBy default, test calls are excluded. Set include_test_calls=true to include them.","operationId":"list_calls_calls__get","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"}},{"name":"include_test_calls","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Test Calls"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CallResponse"},"title":"Response List Calls Calls  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/dev-init":{"post":{"tags":["Calls"],"summary":"Dev Init Call","description":"Initialize a call record for local development (DEV ENVIRONMENT ONLY).\n\nThis endpoint allows local bot development without going through Twilio webhooks.\nIt creates a call record with test defaults and returns the call_id that the bot\ncan use to finalize the call information via PATCH /calls/{call_id}.\n\nOnly available in development environment (app_env=dev).\nRequires a per-customer agent token for authentication.\n\nDefaults applied:\n- is_test=True\n- phone_number=\"+15555551234\" (if not provided)\n- direction=\"inbound\" (if not provided)\n- start_time=now\n- session_id=auto-generated dev session ID\n\nReturns:\n- **call_id**: The UUID of the created call record\n- **call**: Full call object with all details","operationId":"dev_init_call_calls_dev_init_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevInitCallRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevInitCallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/calls/{call_id}":{"patch":{"tags":["Calls"],"summary":"Update Call","description":"Update an existing call record by UUID.\n\nThis endpoint is designed for the voice agent to update call details after the call is created.\nRequires a per-customer agent token for authentication.\nThe customer_id is automatically extracted from the agent token.\n\nAll fields are optional - only provided fields will be updated.\nThe call must belong to the customer associated with the agent token.\n\nReturns:\n- **success**: True if the call was updated successfully\n- **call_id**: The UUID of the updated call record","operationId":"update_call_calls__call_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCallRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Calls"],"summary":"Get Call","description":"Get individual call details by ID.\n\nReturns call information including metadata, status, and test flag.\nAlso includes next_call_id and previous_call_id for navigation (includes test calls).\nRequires user authentication.","operationId":"get_call_calls__call_id__get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Calls"],"summary":"Delete Call","description":"Delete a call record (developer only).\n\nThis endpoint is restricted to developer users only.\nDeletes the call and its associated transcript.\n\nRequires developer authentication.","operationId":"delete_call_calls__call_id__delete","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}/transfer-flow":{"get":{"tags":["Calls"],"summary":"Get Call Transfer Flow","description":"Reconstruct a transferred call's flow: our AI → transfer destination →\nthe PBX queue/agent hop chain (intake → fallback → who answered).\n\nDebugging view for developers, and for customer admins when the\ncustomer's transfer_flow_admin_enabled call-detail setting is on. PBX\nhops come from a live read-only NetSapiens CDR read; customers without\nNetSapiens (or an untransferred call) get just the our-side segment.","operationId":"getCallTransferFlow","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferFlowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}/case":{"patch":{"tags":["Calls"],"summary":"Set Call Case","description":"Set or clear the case associated with a call (developer only).\n\nPass a case_id to associate the call with a case, or null to clear the association.\n\nRequires developer authentication.","operationId":"set_call_case_calls__call_id__case_patch","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetCallCaseRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/status-callback/{call_id}":{"post":{"tags":["Calls"],"summary":"Handle Call Status Callback","description":"Twilio webhook: Handle call status updates for the main call.\n\nThis endpoint is called by Twilio when the call status changes\n(completed, busy, no-answer, failed, canceled).\n\nThis is primarily used to handle the case where a caller hangs up\nbefore the bot finishes initializing - in that case, the bot never\nsends the end-of-call PATCH request, leaving the call stuck in \"in_progress\".\n\nNo authentication (Twilio webhook).","operationId":"handle_call_status_callback_calls_status_callback__call_id__post","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/recording-status-callback/{call_id}":{"post":{"tags":["Calls"],"summary":"Handle Recording Status Callback","description":"Twilio webhook: fires when the dual-channel recording we started on the\ncarrier leg is finalized (BYOB attended transfer, or a Vapi-native warm\ntransfer on ``vapi_transfers_enabled``).\n\nBy the time Twilio fires ``RecordingStatus=completed``, the carrier call\nhas hung up, every Vapi end-of-call-report has been delivered, and the\nfull audio file is available. That makes this the right moment to trigger\nthe transcription pipeline for these calls — earlier triggers (the Vapi\nend-of-call-report) fire while the carrier call is still in progress and\nwould capture only the pre-transfer half.\n\n``absent``/``failed`` mean no usable Twilio file exists. Those clear\n``call_sid`` so the pipeline falls back to Vapi's own recording, then\ntrigger — dropping them would leave the call with no transcript at all.\n\nNo authentication (Twilio webhook).","operationId":"handle_recording_status_callback_calls_recording_status_callback__call_id__post","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/crm/lead-fields":{"get":{"tags":["CRM"],"summary":"Get Lead Fields","description":"Get configured lead fields for the customer.\n\nReturns all field configurations that will be automatically set on new leads\ncreated via the phone system.\n\nRequires user authentication.","operationId":"get_lead_fields_crm_lead_fields_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ZohoLeadFieldResponse"},"type":"array","title":"Response Get Lead Fields Crm Lead Fields Get"}}}}}},"post":{"tags":["CRM"],"summary":"Create Or Update Lead Field","description":"Create or update a lead field configuration.\n\nIf a field with the same field_api_name already exists for this customer,\nit will be updated. Otherwise, a new field configuration will be created.\n\nRequires user authentication.","operationId":"create_or_update_lead_field_crm_lead_fields_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLeadFieldRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZohoLeadFieldResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/crm/lead-fields/{zoho_lead_field_id}":{"delete":{"tags":["CRM"],"summary":"Delete Lead Field","description":"Delete a lead field configuration.\n\nPermanently removes the field configuration. New leads will no longer have\nthis field automatically set.\n\nRequires user authentication.","operationId":"delete_lead_field_crm_lead_fields__zoho_lead_field_id__delete","parameters":[{"name":"zoho_lead_field_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Zoho Lead Field Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dashboard/stats":{"get":{"tags":["Dashboard"],"summary":"Get Dashboard Stats","description":"Get dashboard statistics for the customer","operationId":"getDashboardStats","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardStats"}}}}}}},"/dashboard/recent-activity":{"get":{"tags":["Dashboard"],"summary":"Get Recent Activity","description":"Get recent activity for the customer","operationId":"getRecentActivity","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecentActivityResponse"}}}}}}},"/dashboard/recent-calls":{"get":{"tags":["Dashboard"],"summary":"Get Recent Calls","description":"Get recent calls for the customer.\n\nBy default, test calls are excluded. Set include_test_calls=true to include them.","operationId":"getRecentCalls","parameters":[{"name":"include_test_calls","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Test Calls"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecentCallsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dashboard/calls":{"get":{"tags":["Dashboard"],"summary":"Get Calls","description":"Get paginated, sorted, and filtered calls for the customer. By default, test calls are excluded.","operationId":"getCalls","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 items per page","default":20,"title":"Page Size"},"description":"Number of items per page"},{"name":"sort_column","in":"query","required":false,"schema":{"type":"string","description":"Column to sort by","default":"created_at","title":"Sort Column"},"description":"Column to sort by"},{"name":"sort_direction","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","description":"Sort direction","default":"desc","title":"Sort Direction"},"description":"Sort direction"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by phone number or caller name","title":"Search"},"description":"Search by phone number or caller name"},{"name":"direction","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by call direction","title":"Direction"},"description":"Filter by call direction"},{"name":"caller_client_status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by caller client status","title":"Caller Client Status"},"description":"Filter by caller client status"},{"name":"has_error","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by error status","title":"Has Error"},"description":"Filter by error status"},{"name":"outcome","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by call outcome","title":"Outcome"},"description":"Filter by call outcome"},{"name":"vxt_transfer","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by VXT transfer outcome: answered, voicemail, no_answer, not_transferred","title":"Vxt Transfer"},"description":"Filter by VXT transfer outcome: answered, voicemail, no_answer, not_transferred"},{"name":"dialtone_screening","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by dialtone screening outcome: accepted, declined, no_answer, none","title":"Dialtone Screening"},"description":"Filter by dialtone screening outcome: accepted, declined, no_answer, none"},{"name":"sa_case_number","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter to calls whose matched SmartAdvocate case number contains this text","title":"Sa Case Number"},"description":"Filter to calls whose matched SmartAdvocate case number contains this text"},{"name":"start_datetime","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter calls with start_time >= this UTC datetime (inclusive)","title":"Start Datetime"},"description":"Filter calls with start_time >= this UTC datetime (inclusive)"},{"name":"end_datetime","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter calls with start_time < this UTC datetime (exclusive)","title":"End Datetime"},"description":"Filter calls with start_time < this UTC datetime (exclusive)"},{"name":"intake","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by intake recording: true = only imported intake recordings (Intakes page), false = exclude them (Calls page), null = no filter","title":"Intake"},"description":"Filter by intake recording: true = only imported intake recordings (Intakes page), false = exclude them (Calls page), null = no filter"},{"name":"transfer_destination","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter to calls transferred to this TransferDestination (metrics drill-through; includes claimed bounce-back originals)","title":"Transfer Destination"},"description":"Filter to calls transferred to this TransferDestination (metrics drill-through; includes claimed bounce-back originals)"},{"name":"include_test_calls","in":"query","required":false,"schema":{"type":"boolean","description":"Include test calls in results","default":false,"title":"Include Test Calls"},"description":"Include test calls in results"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCallsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dashboard/calls/{call_id}":{"get":{"tags":["Dashboard"],"summary":"Get Dashboard Call","description":"Get a single fully-hydrated call by id, scoped to the customer.","operationId":"getDashboardCall","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecentCall"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/agent-tokens":{"post":{"tags":["Developer","Developer - Agent Tokens"],"summary":"Create Agent Token","description":"Create a new agent token for a customer.\n\nThis endpoint is restricted to developer users only.\nGenerates a secure random token that can be used by phone agents\nto authenticate API requests for the specified customer.\n\n- **customer_id**: The customer UUID to create the token for\n\nReturns:\n- **token**: The generated bearer token (store this securely!)\n- **customer_id**: The customer ID this token is associated with\n- **is_active**: Whether the token is active (always true for new tokens)","operationId":"create_agent_token_developer_agent_tokens_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgentTokenRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgentTokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/agent-tokens/customer/{customer_id}":{"get":{"tags":["Developer","Developer - Agent Tokens"],"summary":"List Customer Agent Tokens","description":"List all agent tokens for a customer.\n\nThis endpoint is restricted to developer users only.\nReturns all tokens (active and inactive) for the specified customer.\n\n- **customer_id**: The customer UUID to list tokens for","operationId":"list_customer_agent_tokens_developer_agent_tokens_customer__customer_id__get","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Customer Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/agent-tokens/{token_id}/deactivate":{"patch":{"tags":["Developer","Developer - Agent Tokens"],"summary":"Deactivate Agent Token","description":"Deactivate an agent token.\n\nThis endpoint is restricted to developer users only.\nSets the token's is_active flag to false, preventing it from being used.\n\n- **token_id**: The agent token UUID to deactivate","operationId":"deactivate_agent_token_developer_agent_tokens__token_id__deactivate_patch","parameters":[{"name":"token_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Token Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/customers":{"get":{"tags":["Developer","Developer - Customers"],"summary":"List Customers","description":"List all customers.\n\nThis endpoint is restricted to developer users only.\nReturns all customers in the system.","operationId":"list_customers_developer_customers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CustomerListItem"},"type":"array","title":"Response List Customers Developer Customers Get"}}}}}},"post":{"tags":["Developer","Developer - Customers"],"summary":"Create Customer","description":"Create a new customer with an admin user.\n\nThis endpoint is restricted to developer users only.\nCreates a customer (law firm) and an admin user for that customer.\n\n- **firm_name**: The name of the law firm/organization\n- **admin_first_name**: Admin user's first name\n- **admin_last_name**: Admin user's last name\n- **admin_email**: Admin user's email address\n- **admin_password**: Admin user's initial password\n- **default_timezone**: Default timezone for the customer\n\nReturns:\n- Customer and admin user details","operationId":"create_customer_developer_customers_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCustomerRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCustomerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/customers/recents":{"get":{"tags":["Developer","Developer - Customers"],"summary":"List Customers By Recency","description":"List all customers ordered by the developer's most-recently-used.\n\nRestricted to developer users. The developer's current customer is pinned\nfirst; remaining customers are ordered by ``last_used_at DESC NULLS LAST``,\nthen by name.","operationId":"list_customers_by_recency_developer_customers_recents_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/RecentCustomerListItem"},"type":"array","title":"Response List Customers By Recency Developer Customers Recents Get"}}}}}}},"/developer/switch-customer":{"post":{"tags":["Developer","Developer - Customers"],"summary":"Switch Customer","description":"Switch the current user's customer.\n\nThis endpoint is restricted to developer users only.\nUpdates the current user's customer_id to the specified customer.\n\n- **customer_id**: The customer UUID to switch to","operationId":"switch_customer_developer_switch_customer_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwitchCustomerRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/customer-users":{"get":{"tags":["Developer","Developer - Customers"],"summary":"List Customer Users","description":"List all active users for the current customer.\n\nThis endpoint is restricted to developer users only.\nReturns all active users in the customer's database.","operationId":"list_customer_users_developer_customer_users_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CustomerUserItem"},"type":"array","title":"Response List Customer Users Developer Customer Users Get"}}}}}}},"/developer/customer-address":{"get":{"tags":["Developer","Developer - Customers"],"summary":"Get Customer Address","description":"Get the address for the current customer.\n\nThis endpoint is restricted to developer users only.\nReturns the customer's physical address used for billing and invoices.","operationId":"get_customer_address_developer_customer_address_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"patch":{"tags":["Developer","Developer - Customers"],"summary":"Update Customer Address","description":"Update the address for the current customer.\n\nThis endpoint is restricted to developer users only.\nSets the customer's physical address used for billing and invoices.\n\n- **address**: The customer's physical address","operationId":"update_customer_address_developer_customer_address_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCustomerAddressRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/customers/{customer_id}/name":{"patch":{"tags":["Developer","Developer - Customers"],"summary":"Update Customer Name","description":"Update a customer's name.\n\nThis endpoint is restricted to developer users only.\nUpdates the display name for the specified customer.\n\n- **customer_id**: The customer UUID to update\n- **name**: The new customer name","operationId":"update_customer_name_developer_customers__customer_id__name_patch","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Customer Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCustomerNameRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCustomerNameResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/google-calendars":{"get":{"tags":["Developer","Developer - Calendar"],"summary":"List Google Calendars","description":"List Google calendars for the current customer.\n\nThis endpoint is restricted to developer users only.\nFetches all calendars from the Google Calendar API using service account impersonation.","operationId":"list_google_calendars_developer_google_calendars_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleCalendarsResponse"}}}}}}},"/developer/google-workspace-users":{"get":{"tags":["Developer","Developer - Calendar"],"summary":"List Google Workspace Users","description":"List Google Workspace users for the current customer.\n\nThis endpoint is restricted to developer users only.\nFetches all users from the Google Admin Directory API using service account impersonation.","operationId":"list_google_workspace_users_developer_google_workspace_users_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceUsersResponse"}}}}}}},"/developer/microsoft365-users":{"get":{"tags":["Developer","Developer - Calendar"],"summary":"List Microsoft365 Users","description":"List Microsoft 365 users for the current customer.\n\nThis endpoint is restricted to developer users only.\nFetches all users from the Microsoft Graph API using application permissions.","operationId":"list_microsoft365_users_developer_microsoft365_users_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__developer__schemas__Microsoft365UsersResponse"}}}}}}},"/developer/calendar-sync/customer":{"post":{"tags":["Developer","Developer - Calendar"],"summary":"Sync Customer Calendar Events","description":"Sync all calendar events for all users in the current customer.\n\nThis endpoint is restricted to developer users only.\n\n**WARNING**: This is a blocking operation that will run synchronously and may take\nseveral seconds to complete. It fetches events from all calendars for all users\nin the customer. In production, this should be run as a Celery task.\n\nThis endpoint is provided for development/debugging purposes.\n\nReturns:\n- Summary of the sync operation including number of users, calendars, and events processed","operationId":"sync_customer_calendar_events_developer_calendar_sync_customer_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerCalendarSyncResponse"}}}}}}},"/developer/calendar-sync/stats":{"get":{"tags":["Developer","Developer - Calendar"],"summary":"Get Calendar Sync Stats","description":"Get calendar sync statistics for the current customer.\n\nThis endpoint is restricted to developer users only.\n\nReturns:\n- Statistics about calendars, events, and sync status for the customer","operationId":"get_calendar_sync_stats_developer_calendar_sync_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarSyncStatsResponse"}}}}}}},"/developer/google-workspace-admin":{"get":{"tags":["Developer","Developer - Calendar"],"summary":"Get Google Workspace Admin","description":"Get the Google Workspace admin user for the current customer.\n\nThis endpoint is restricted to developer users only.\nReturns the user who is designated as the Google Workspace admin for making API requests.","operationId":"get_google_workspace_admin_developer_google_workspace_admin_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceAdminResponse"}}}}}},"patch":{"tags":["Developer","Developer - Calendar"],"summary":"Update Google Workspace Admin","description":"Update the Google Workspace admin user for the current customer.\n\nThis endpoint is restricted to developer users only.\nSets the user who will be impersonated for Google Workspace API requests.\n\n- **admin_user_id**: The user ID to set as the Google Workspace admin","operationId":"update_google_workspace_admin_developer_google_workspace_admin_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateGoogleWorkspaceAdminRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceAdminResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/calendar-invites/meetings":{"get":{"tags":["Developer","Developer - Calendar"],"summary":"List Recent Meetings","description":"List the 10 most recent meetings for the current customer.\n\nThis endpoint is restricted to developer users only.\nReturns meetings ordered by created_at desc for use in the calendar invite test page.","operationId":"list_recent_meetings_developer_calendar_invites_meetings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__developer__schemas__MeetingListResponse"}}}}}}},"/developer/calendar-invites/send":{"post":{"tags":["Developer","Developer - Calendar"],"summary":"Send Test Calendar Invite","description":"Send a test calendar invite to a staff member's calendar.\n\nThis endpoint is restricted to developer users only.\nCreates a calendar event using the same logic as the meeting booking system,\nbut does NOT create a Meeting record in the database.\n\nUse this to test calendar invite formatting without polluting the database.\n\nIf meeting_id is provided, uses the meeting's data and associated lead info.\nOtherwise, falls back to legacy manual fields.","operationId":"send_test_calendar_invite_developer_calendar_invites_send_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendCalendarInviteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendCalendarInviteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/test-events/staff-members":{"get":{"tags":["Developer","Developer - Calendar"],"summary":"List Staff With Booking Calendars","description":"List staff members who have booking calendars configured.\n\nThis endpoint is restricted to developer users only.\nReturns staff members with their booking calendar timezone for the test event tool.","operationId":"list_staff_with_booking_calendars_developer_test_events_staff_members_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffMembersWithBookingCalendarResponse"}}}}}}},"/developer/test-events/create":{"post":{"tags":["Developer","Developer - Calendar"],"summary":"Create Test Calendar Event","description":"Create a test calendar event on a staff member's booking calendar.\n\nThis endpoint is restricted to developer users only.\nCreates an event titled \"OpenIntake Test Calendar Event\" on the selected\nstaff member's booking calendar. Useful for testing calendar integration.","operationId":"create_test_calendar_event_developer_test_events_create_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTestCalendarEventRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTestCalendarEventResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/phone-numbers":{"get":{"tags":["Developer","Developer - Phone Numbers"],"summary":"List Phone Numbers","description":"List all phone numbers for the current customer.\n\nThis endpoint is restricted to developer users only.\nReturns all phone numbers (PSTN and SIP endpoints) for the current customer.","operationId":"list_phone_numbers_developer_phone_numbers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PhoneNumberResponse"},"type":"array","title":"Response List Phone Numbers Developer Phone Numbers Get"}}}}}},"post":{"tags":["Developer","Developer - Phone Numbers"],"summary":"Create Phone Number","description":"Create a new phone number entry for the current customer.\n\nThis endpoint is restricted to developer users only.\nCreates a phone number or SIP endpoint entry that can be used for inbound call routing.\n\n- **phone_number**: The phone number (e.g., +15551234567) or SIP endpoint (e.g., 1000)\n- **label**: Optional friendly label like \"Main Line\" or \"After Hours\"\n- **is_active**: Whether the number is active (default: true)","operationId":"create_phone_number_developer_phone_numbers_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumberCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumberResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/phone-numbers/{phone_number_id}":{"patch":{"tags":["Developer","Developer - Phone Numbers"],"summary":"Update Phone Number","description":"Update a phone number entry.\n\nThis endpoint is restricted to developer users only.\nUpdates the label or active status of a phone number.\n\n- **label**: Optional friendly label\n- **is_active**: Optional active status","operationId":"update_phone_number_developer_phone_numbers__phone_number_id__patch","parameters":[{"name":"phone_number_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Phone Number Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumberUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumberResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Developer","Developer - Phone Numbers"],"summary":"Delete Phone Number","description":"Delete a phone number entry.\n\nThis endpoint is restricted to developer users only.\nPermanently removes a phone number entry from the system.\n\n- **phone_number_id**: The phone number UUID to delete","operationId":"delete_phone_number_developer_phone_numbers__phone_number_id__delete","parameters":[{"name":"phone_number_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Phone Number Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/pipecat-agent-id":{"get":{"tags":["Developer","Developer - Bot Config"],"summary":"Get Pipecat Agent Id","description":"Get the Pipecat agent ID for the current customer.\n\nThis endpoint is restricted to developer users only.\nReturns the Pipecat Cloud agent identifier used for inbound calls.","operationId":"get_pipecat_agent_id_developer_pipecat_agent_id_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipecatAgentIdResponse"}}}}}},"patch":{"tags":["Developer","Developer - Bot Config"],"summary":"Update Pipecat Agent Id","description":"Update the Pipecat agent ID for the current customer.\n\nThis endpoint is restricted to developer users only.\nUpdates the Pipecat Cloud agent identifier that will be used for all inbound calls.\n\n- **pipecat_agent_id**: The Pipecat Cloud agent identifier (e.g., 'my-intake-bot')","operationId":"update_pipecat_agent_id_developer_pipecat_agent_id_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePipecatAgentIdRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipecatAgentIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/bot-preference":{"get":{"tags":["Developer","Developer - Bot Config"],"summary":"Get Bot Preference","description":"Get the bot preference for the current customer.\n\nThis endpoint is restricted to developer users only.\nReturns whether the customer is using custom bot or Pipecat Cloud.","operationId":"get_bot_preference_developer_bot_preference_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotPreferenceResponse"}}}}}},"patch":{"tags":["Developer","Developer - Bot Config"],"summary":"Update Bot Preference","description":"Update the bot preference for the current customer.\n\nThis endpoint is restricted to developer users only.\nToggles between custom bot and Pipecat Cloud (dev environment only).\n\n- **use_custom_bot**: Whether to use custom bot instead of Pipecat Cloud","operationId":"update_bot_preference_developer_bot_preference_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBotPreferenceRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotPreferenceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/llm-usage":{"get":{"tags":["Developer","Developer - Metrics"],"summary":"Get Llm Usage","description":"Aggregated LLM usage metrics across all customers (developer only).\n\nAggregation runs in Postgres — the response contains chart-ready\nsummaries and histograms, not raw rows.","operationId":"get_llm_usage_developer_llm_usage_get","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","pattern":"^(7d|30d|all)$","default":"7d","title":"Period"}},{"name":"input_token_bin_width","in":"query","required":false,"schema":{"type":"integer","maximum":5000,"minimum":50,"default":500,"title":"Input Token Bin Width"}},{"name":"cost_bin_width","in":"query","required":false,"schema":{"type":"number","maximum":1.0,"exclusiveMinimum":0,"default":0.001,"title":"Cost Bin Width"}},{"name":"processing_time_bin_width","in":"query","required":false,"schema":{"type":"integer","maximum":5000,"minimum":10,"default":100,"title":"Processing Time Bin Width"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMUsageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/zoho-fields":{"get":{"tags":["Developer","Developer - Integrations"],"summary":"Get Zoho Fields","description":"Get Zoho CRM Leads field metadata.\n\nThis endpoint is restricted to developer users only.\nFetches all field definitions from Zoho CRM Leads module including\nfield types, labels, picklist options, etc.\n\nReturns:\n- Field metadata for all Leads fields","operationId":"get_zoho_fields_developer_zoho_fields_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZohoFieldsResponse"}}}}}}},"/developer/smartadvocate/sync-cases":{"post":{"tags":["Developer","Developer - Integrations"],"summary":"Sync Smartadvocate Cases","description":"Trigger a SmartAdvocate sync for the current customer.\n\nThis endpoint is restricted to developer users only.\nQueues a Celery task that syncs cases, notes, case-contact links,\ninsurance, firm contacts (with phone enrichment), appointments, and\nmedical providers from SmartAdvocate (subject to the customer's\nSmartAdvocate settings toggles). Runs in the background.\n\nBy default a full sync is queued. Pass `days_back` to queue an\nincremental sync covering only cases modified in that window.\n\nReturns:\n- message: Status message\n- task_id: Celery task ID for tracking progress","operationId":"syncSmartAdvocateCases","parameters":[{"name":"days_back","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days Back"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartAdvocateCaseSyncResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/smartadvocate/sync-runs":{"get":{"tags":["Developer","Developer - Integrations"],"summary":"Get Smartadvocate Sync Runs","description":"SmartAdvocate sync run history for the current customer: the running run\n(if any) with live progress, plus recent finished runs, newest first.\n\nDeveloper-only endpoint.","operationId":"getSmartAdvocateSyncRuns","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartAdvocateSyncRunsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/practicepanther/audit-log":{"get":{"tags":["Developer","Developer - Integrations"],"summary":"Get Practicepanther Audit Log","description":"Get the PracticePanther audit trail for the current customer.\n\nReturns all logged PP actions ordered by most recent first.\nDeveloper-only endpoint.","operationId":"getPracticePantherAuditLog","parameters":[{"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"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PracticePantherAuditLogEntry"},"title":"Response Getpracticepantherauditlog"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/practicepanther/sync":{"post":{"tags":["Developer","Developer - Integrations"],"summary":"Sync Practicepanther Data","description":"Trigger a PracticePanther data sync for the current customer.\n\nSyncs all contacts and refreshes locally tracked matters.\nDeveloper-only endpoint.","operationId":"syncPracticePantherData","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PracticePantherSyncResponse"}}}}}}},"/developer/practicepanther/fix-phone-numbers":{"post":{"tags":["Developer","Developer - Integrations"],"summary":"Fix Practicepanther Phone Numbers","description":"Re-process all PracticePanther contact phone numbers using regex + LLM fallback.\n\nNormalizes mobile, phone_office, phone_home, and lookup_phone_number columns\nto E.164 format. Developer-only endpoint.","operationId":"fixPracticePantherPhoneNumbers","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PracticePantherSyncResponse"}}}}}}},"/developer/zoho/create-lead":{"post":{"tags":["Developer","Developer - Integrations"],"summary":"Create Zoho Lead","description":"Create a Zoho CRM lead from an internal Lead record.\n\nThis endpoint triggers a Celery task to create the lead in Zoho.\nDeveloper-only endpoint for testing/manual lead creation.","operationId":"createZohoLead","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateZohoLeadRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateZohoLeadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/zoho/leads":{"get":{"tags":["Developer","Developer - Integrations"],"summary":"List Zoho Leads","description":"List recent Zoho CRM leads for the current customer.\n\nReturns Zoho leads joined with internal lead data, ordered by most recently created.\nDeveloper-only endpoint.","operationId":"listZohoLeads","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZohoLeadListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/practicepanther/create-contact/{call_id}":{"post":{"tags":["Developer","Developer - Integrations"],"summary":"Create Practicepanther Contact For Call","description":"Manually trigger PracticePanther contact creation for a specific call.\n\nUsed when dry run mode is enabled to manually create contacts.\nDeveloper-only endpoint. Bypasses the dry run check.","operationId":"createPracticePantherContactForCall","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PracticePantherSyncResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/practicepanther/create-matter/{call_id}":{"post":{"tags":["Developer","Developer - Integrations"],"summary":"Create Practicepanther Matter For Call","description":"Manually trigger PracticePanther matter creation for a specific call.\n\nDeveloper-only endpoint. Bypasses the auto-create check.","operationId":"createPracticePantherMatterForCall","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PracticePantherSyncResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/practicepanther/create-portal/{call_id}":{"post":{"tags":["Developer","Developer - Integrations"],"summary":"Create Practicepanther Portal For Call","description":"Manually trigger PracticePanther client portal creation for a specific call.\n\nDeveloper-only endpoint. Bypasses the auto-create check.","operationId":"createPracticePantherPortalForCall","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PracticePantherSyncResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/practicepanther/create-call/{call_id}":{"post":{"tags":["Developer","Developer - Integrations"],"summary":"Create Practicepanther Call For Call","description":"Manually trigger PracticePanther call creation for a specific call.\n\nDeveloper-only endpoint. Bypasses the dry run and auto-create checks.\nResolves the PP contact from the lead (if one exists) or from a matched\nPP contact via phone number.","operationId":"createPracticePantherCallForCall","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PracticePantherSyncResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/practicepanther/chat/create-contact/{conversation_id}":{"post":{"tags":["Developer","Developer - Integrations"],"summary":"Create Practicepanther Contact For Chat","description":"Manually trigger PracticePanther contact creation for a chat conversation. Developer-only.","operationId":"createPracticePantherContactForChat","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/PracticePantherSyncResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/practicepanther/chat/create-matter/{conversation_id}":{"post":{"tags":["Developer","Developer - Integrations"],"summary":"Create Practicepanther Matter For Chat","description":"Manually trigger PracticePanther matter creation for a chat conversation. Developer-only.","operationId":"createPracticePantherMatterForChat","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/PracticePantherSyncResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/practicepanther/chat/create-portal/{conversation_id}":{"post":{"tags":["Developer","Developer - Integrations"],"summary":"Create Practicepanther Portal For Chat","description":"Manually trigger PracticePanther client portal creation for a chat conversation. Developer-only.","operationId":"createPracticePantherPortalForChat","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/PracticePantherSyncResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/netsapiens/reconcile-oncall":{"post":{"tags":["Developer","Developer - Integrations"],"summary":"Reconcile Netsapiens Oncall Queue","description":"Manually trigger the NetSapiens on-call queue reconciliation for the\ncurrent customer (same task the 15-minute beat runs).","operationId":"reconcileNetSapiensOnCallQueue","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/developer/call-goal":{"get":{"tags":["Developer","Developer - Settings"],"summary":"Get Call Goal","description":"Get the call goal for the current customer.\n\nThis endpoint is restricted to developer users only.\nReturns the custom call goal used for evaluating whether calls achieved their purpose.\n\nWhen set, this goal is used in the LLM prompt when grading calls to determine\nif the goal was accomplished.\n\nExample goals:\n- \"Collect caller name and book a consultation\"\n- \"Take a message with caller name and callback number\"\n- \"Gather incident details and schedule an appointment\"","operationId":"get_call_goal_developer_call_goal_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallGoalResponse"}}}}}},"patch":{"tags":["Developer","Developer - Settings"],"summary":"Update Call Goal","description":"Update the call goals for the current customer.\n\nThis endpoint is restricted to developer users only.\nSets the custom goals used to evaluate whether calls achieved their purpose,\nsplit by call direction (inbound vs outbound).\n\n- **inbound_call_goal**: Goal for inbound calls (or null to use defaults)\n- **outbound_call_goal**: Goal for outbound calls (or null to use defaults)","operationId":"update_call_goal_developer_call_goal_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCallGoalRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallGoalResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/message-generation-context":{"get":{"tags":["Developer","Developer - Settings"],"summary":"Get Message Generation Context","description":"Get the message generation context for the current customer.\n\nThis endpoint is restricted to developer users only.\nReturns the optional context that is included in the LLM prompt when generating messages.\n\nThis context can be used to provide firm-specific information, preferences, or \ninstructions that should be considered when generating message summaries.","operationId":"get_message_generation_context_developer_message_generation_context_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageGenerationContextResponse"}}}}}},"patch":{"tags":["Developer","Developer - Settings"],"summary":"Update Message Generation Context","description":"Update the message generation context for the current customer.\n\nThis endpoint is restricted to developer users only.\nSets the optional context that is included in the LLM prompt when generating messages.\n\n- **message_generation_context**: Context to include in the LLM prompt (can be multiple lines)\n\nThis context can include:\n- Firm-specific preferences for message formatting\n- Important information about the firm\n- Instructions for how messages should be generated\n- Any other context that should influence message generation","operationId":"update_message_generation_context_developer_message_generation_context_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMessageGenerationContextRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageGenerationContextResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/case-notes-settings":{"get":{"tags":["Developer","Developer - Settings"],"summary":"Get Case Notes Settings","description":"Get the case notes settings for the current customer.\n\nThis endpoint is restricted to developer users only.\nReturns settings for case matching and note generation.","operationId":"get_case_notes_settings_developer_case_notes_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseNotesSettingsResponse"}}}}}},"patch":{"tags":["Developer","Developer - Settings"],"summary":"Update Case Notes Settings","description":"Update the case notes settings for the current customer.\n\nThis endpoint is restricted to developer users only.\n\n- **case_notes_enabled**: Set to true to enable case notes for this customer\n- **dry_run_case_matching**: Set to true to enable dry-run mode for case matching\n- **note_generation_context**: Context to include in LLM prompt for case note generation\n\nWhen case_notes_enabled is false:\n- The case matching pipeline step is skipped entirely\n- No case notes will be generated or posted\n\nWhen dry-run mode is enabled:\n- Case matching still runs automatically\n- Matches are flagged as \"pending approval\" instead of being finalized\n- Developers can review and approve/reject matches in the call detail view\n- Case notes are only posted after manual approval\n\nThe note_generation_context can include:\n- Firm-specific preferences for note formatting\n- Important information about the firm\n- Instructions for how case notes should be generated\n- Any other context that should influence note generation","operationId":"update_case_notes_settings_developer_case_notes_settings_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCaseNotesSettingsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseNotesSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/calls-page-settings":{"get":{"tags":["Developer","Developer - Settings"],"summary":"Get Calls Page Settings","description":"Get the calls page settings for the current customer.\n\nThis endpoint is restricted to developer users only.\nReturns the enabled columns and metrics for the calls page.\nIf no settings exist, returns the defaults.","operationId":"get_calls_page_settings_developer_calls_page_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallsPageSettingsResponse"}}}}}},"patch":{"tags":["Developer","Developer - Settings"],"summary":"Update Calls Page Settings","description":"Update the calls page settings for the current customer.\n\nThis endpoint is restricted to developer users only.\nUpdates which columns and metrics are displayed on the calls page.\n\n- **enabled_columns**: List of column identifiers to display (in order)\n- **enabled_metrics**: List of metric card identifiers to display","operationId":"update_calls_page_settings_developer_calls_page_settings_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCallsPageSettingsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallsPageSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/chats-page-settings":{"get":{"tags":["Developer","Developer - Settings"],"summary":"Get Chats Page Settings","description":"Get the chats page settings for the current customer.\n\nThis endpoint is restricted to developer users only.","operationId":"get_chats_page_settings_developer_chats_page_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatsPageSettingsResponse"}}}}}},"patch":{"tags":["Developer","Developer - Settings"],"summary":"Update Chats Page Settings","description":"Update the chats page settings for the current customer.\n\nThis endpoint is restricted to developer users only.","operationId":"update_chats_page_settings_developer_chats_page_settings_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateChatsPageSettingsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatsPageSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/lead-classification-enabled":{"get":{"tags":["Developer","Developer - Settings"],"summary":"Get Lead Classification Enabled","description":"Get the lead classification setting for the current customer.\n\nThis endpoint is restricted to developer users only.\nWhen lead classification is enabled, the post-processing pipeline\nwill analyze call transcripts to classify leads.","operationId":"get_lead_classification_enabled_developer_lead_classification_enabled_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadClassificationEnabledResponse"}}}}}},"patch":{"tags":["Developer","Developer - Settings"],"summary":"Update Lead Classification Enabled","description":"Update the lead classification setting for the current customer.\n\nThis endpoint is restricted to developer users only.\n\n- **lead_classification_enabled**: Set to true to enable lead classification\n\nWhen enabled:\n- Post-processing pipeline analyzes transcripts to classify leads\n- Extracts contact info, determines qualification state\n- Matches leads to specific cases (lawsuits) if applicable\n- Creates Lead records for nightly notification scripts","operationId":"update_lead_classification_enabled_developer_lead_classification_enabled_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLeadClassificationEnabledRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadClassificationEnabledResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/summary-generation-context":{"get":{"tags":["Developer","Developer - Settings"],"summary":"Get Summary Generation Context","description":"Get the summary generation context for the current customer.\n\nThis endpoint is restricted to developer users only.\nReturns the optional context that is included in the LLM prompt when generating call summaries.\n\nThis context can be used to provide firm-specific information, preferences, or \ninstructions that should be considered when generating short and long summaries.","operationId":"get_summary_generation_context_developer_summary_generation_context_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummaryGenerationContextResponse"}}}}}},"patch":{"tags":["Developer","Developer - Settings"],"summary":"Update Summary Generation Context","description":"Update the summary generation context for the current customer.\n\nThis endpoint is restricted to developer users only.\nSets the optional context that is included in the LLM prompt when generating call summaries.\n\n- **summary_generation_context**: Context to include in the LLM prompt (can be multiple lines)\n\nThis context can include:\n- Firm-specific preferences for summary formatting\n- Important information about the firm\n- Instructions for how summaries should be generated\n- Any other context that should influence summary generation","operationId":"update_summary_generation_context_developer_summary_generation_context_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSummaryGenerationContextRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummaryGenerationContextResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/filevine-draft-generation-context":{"get":{"tags":["Developer","Developer - Settings"],"summary":"Get Filevine Draft Generation Context","description":"Get the Filevine draft generation context for the current customer.\n\nThis endpoint is restricted to developer users only.\nReturns the optional context that is included in the LLM prompt when generating draft\nFilevine contact fields from call transcripts.","operationId":"get_filevine_draft_generation_context_developer_filevine_draft_generation_context_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilevineDraftGenerationContextResponse"}}}}}},"patch":{"tags":["Developer","Developer - Settings"],"summary":"Update Filevine Draft Generation Context","description":"Update the Filevine draft generation context for the current customer.\n\nThis endpoint is restricted to developer users only.\nSets the optional context that is included in the LLM prompt when generating draft\nFilevine contact fields from call transcripts.\n\n- **draft_generation_context**: Context to include in the LLM prompt (can be multiple lines)","operationId":"update_filevine_draft_generation_context_developer_filevine_draft_generation_context_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFilevineDraftGenerationContextRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilevineDraftGenerationContextResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/transcript-settings":{"get":{"tags":["Developer","Developer - Settings"],"summary":"Get Transcript Settings","description":"Get the transcript settings for the current customer.\n\nReturns the text replacement rules that are applied to all transcripts.","operationId":"get_transcript_settings_developer_transcript_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranscriptSettingsResponse"}}}}}},"patch":{"tags":["Developer","Developer - Settings"],"summary":"Update Transcript Settings","description":"Update the transcript settings for the current customer.\n\nSets the text replacement rules that are applied to all transcripts\n(both realtime and finalized) as they enter the system.","operationId":"update_transcript_settings_developer_transcript_settings_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTranscriptSettingsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranscriptSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/developer-settings":{"get":{"tags":["Developer","Developer - Settings"],"summary":"Get Developer Settings","description":"Get the developer settings for the current customer.\n\nThis endpoint is restricted to developer users only.\nReturns settings for developer alerts and tools.","operationId":"get_developer_settings_developer_developer_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperSettingsResponse"}}}}}},"patch":{"tags":["Developer","Developer - Settings"],"summary":"Update Developer Settings","description":"Update the developer settings for the current customer.\n\nThis endpoint is restricted to developer users only.\n\n- **call_started_developer_alert_enabled**: Set to true to enable SMS alerts when new calls start\n- **grade_alert_threshold**: Which grade levels trigger alerts:\n  - b_and_below: Alert for B, C, F grades\n  - c_and_below: Alert for C, F grades\n  - f_only: Alert for F grades only\n  - none: No grade alerts","operationId":"update_developer_settings_developer_developer_settings_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDeveloperSettingsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/outbound-developer-settings":{"get":{"tags":["Developer","Developer - Settings"],"summary":"Get Outbound Developer Settings","description":"Get the developer-only outbound settings for the current customer.\n\nThis endpoint is restricted to developer users only.\nAll of these settings live on settings_outbound, alongside the\ncustomer-editable outbound settings.","operationId":"getOutboundDeveloperSettings","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutboundDeveloperSettingsResponse"}}}}}},"patch":{"tags":["Developer","Developer - Settings"],"summary":"Update Outbound Developer Settings","description":"Update the developer-only outbound settings for the current customer.\n\nThis endpoint is restricted to developer users only. Customers can read\nsome of these settings via their own outbound-settings endpoint (they\ndrive copy and which parts of the Outbound page apply) but not change them.","operationId":"updateOutboundDeveloperSettings","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOutboundDeveloperSettingsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutboundDeveloperSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/feature-flags":{"get":{"tags":["Developer","Developer - Settings"],"summary":"Get Feature Flags","description":"Get the feature flags for the current customer.\n\nThis endpoint is restricted to developer users only.\nReturns the feature flags that control which features are enabled.","operationId":"get_feature_flags_developer_feature_flags_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureFlagsResponse"}}}}}},"patch":{"tags":["Developer","Developer - Settings"],"summary":"Update Feature Flags","description":"Update the feature flags for the current customer.\n\nThis endpoint is restricted to developer users only.\n\n- **cases_enabled**: Whether cases feature is enabled\n- **leads_enabled**: Whether leads feature is enabled\n- **messages_enabled**: Whether messages feature is enabled\n- **case_notes_enabled**: Whether case notes feature is enabled\n- **known_contacts_enabled**: Whether known contacts feature is enabled","operationId":"update_feature_flags_developer_feature_flags_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFeatureFlagsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureFlagsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/auth-settings":{"get":{"tags":["Developer","Developer - Settings"],"summary":"Get Auth Settings","description":"Get the auth settings for the current customer.\n\nThis endpoint is restricted to developer users only.\nReturns settings for authentication methods.","operationId":"get_auth_settings_developer_auth_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthSettingsResponse"}}}}}},"patch":{"tags":["Developer","Developer - Settings"],"summary":"Update Auth Settings","description":"Update the auth settings for the current customer.\n\nThis endpoint is restricted to developer users only.\n\n- **password_login_enabled**: Set to true to enable password-based login for staff members\n- **require_social_login**: Set to true to require users who have used social sign-in to continue using it","operationId":"update_auth_settings_developer_auth_settings_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAuthSettingsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/reports-settings":{"get":{"tags":["Developer","Developer - Settings"],"summary":"Get Reports Settings","description":"Get reports settings for the current customer.\n\nThis endpoint is restricted to developer users only.\nReturns settings for scheduled report email delivery.","operationId":"get_reports_settings_developer_reports_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportsSettingsResponse"}}}}}},"patch":{"tags":["Developer","Developer - Settings"],"summary":"Update Reports Settings","description":"Update reports settings for the current customer.\n\nThis endpoint is restricted to developer users only.\n\n- **emails_disabled**: Set to true to disable scheduled report emails for this customer","operationId":"update_reports_settings_developer_reports_settings_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateReportsSettingsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportsSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/zoho-settings":{"get":{"tags":["Developer","Developer - Settings"],"summary":"Get Zoho Settings","description":"Get Zoho settings for the current customer.\n\nThis endpoint is restricted to developer users only.\nReturns settings for Zoho CRM integration.","operationId":"get_zoho_settings_developer_zoho_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZohoSettingsResponse"}}}}}},"patch":{"tags":["Developer","Developer - Settings"],"summary":"Update Zoho Settings","description":"Update Zoho settings for the current customer.\n\nThis endpoint is restricted to developer users only.\n\n- **zoho_leads_disabled**: Set to true to disable automatic Zoho lead creation in the pipeline","operationId":"update_zoho_settings_developer_zoho_settings_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateZohoSettingsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZohoSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/call-detail-settings":{"get":{"tags":["Developer","Developer - Settings"],"summary":"Get Call Detail Settings","description":"Get the call detail page settings for the current customer.","operationId":"get_call_detail_settings_developer_call_detail_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallDetailSettingsResponse"}}}}}},"patch":{"tags":["Developer","Developer - Settings"],"summary":"Update Call Detail Settings","description":"Update the call detail page settings for the current customer.","operationId":"update_call_detail_settings_developer_call_detail_settings_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCallDetailSettingsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallDetailSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/greetings":{"get":{"tags":["Developer","Developer - Settings"],"summary":"Get Greetings","description":"Get greeting settings for the current customer.","operationId":"get_greetings_developer_greetings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GreetingsResponse"}}}}}},"patch":{"tags":["Developer","Developer - Settings"],"summary":"Update Greetings","description":"Update greeting settings for the current customer.","operationId":"update_greetings_developer_greetings_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateGreetingsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GreetingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/voicemail-mode":{"get":{"tags":["Developer","Developer - Settings"],"summary":"Get Voicemail Mode Status","description":"Get the current voicemail mode status for the customer.","operationId":"get_voicemail_mode_status_developer_voicemail_mode_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoicemailModeStatusResponse"}}}}}}},"/developer/voicemail-mode/enable":{"post":{"tags":["Developer","Developer - Settings"],"summary":"Enable Voicemail Mode","description":"Enable voicemail mode for the customer.\nWhen enabled, all inbound calls will go straight to Twilio voicemail.\nAlso redirects all Twilio phone number webhooks to our handler so the\nvoicemail TwiML is returned even for Vapi-platform numbers.","operationId":"enable_voicemail_mode_developer_voicemail_mode_enable_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoicemailModeStatusResponse"}}}}}}},"/developer/voicemail-mode/disable":{"post":{"tags":["Developer","Developer - Settings"],"summary":"Disable Voicemail Mode","description":"Disable voicemail mode for the customer. No confirmation code required.\nCalls will resume normal routing.\nRestores each phone number's Twilio webhook to its configured agent platform.","operationId":"disable_voicemail_mode_developer_voicemail_mode_disable_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoicemailModeStatusResponse"}}}}}}},"/developer/realtime-lead-scoring-settings":{"get":{"tags":["Developer","Developer - Settings"],"summary":"Get Realtime Lead Scoring Settings","description":"Get the realtime (live, mid-call) lead scoring settings for the current customer.\n\nReturns the allowlist of `lead_scoring_custom_schema` property keys that are exposed\nto the voice agent when it invokes the live lead scoring tool.","operationId":"get_realtime_lead_scoring_settings_developer_realtime_lead_scoring_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RealtimeLeadScoringSettingsResponse"}}}}}},"patch":{"tags":["Developer","Developer - Settings"],"summary":"Update Realtime Lead Scoring Settings","description":"Update the realtime lead scoring settings for the current customer.\n\nValidates that every entry in `agent_visible_fields` exists as a key in the customer's\n`SettingsLeads.lead_scoring_custom_schema[\"properties\"]`. Requires the customer's lead\nscoring mode to be `custom_prompt` and a custom schema to be configured.","operationId":"update_realtime_lead_scoring_settings_developer_realtime_lead_scoring_settings_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRealtimeLeadScoringSettingsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RealtimeLeadScoringSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/active-call-check":{"get":{"tags":["Developer","Developer - Debug"],"summary":"Get Active Call Check","description":"Get the active call check setting for the current customer.\n\nThis endpoint is restricted to developer users only.\nReturns whether active call checking is disabled for call screening.\n\nWhen disabled, the system will not check if the screener is already on an active call\nbefore initiating a new screening call. This is a workaround for cases where calls\nare incorrectly showing as still in progress.","operationId":"get_active_call_check_developer_active_call_check_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActiveCallCheckResponse"}}}}}},"patch":{"tags":["Developer","Developer - Debug"],"summary":"Update Active Call Check","description":"Update the active call check setting for the current customer.\n\nThis endpoint is restricted to developer users only.\nToggles whether active call checking is disabled for call screening.\n\n- **disable_active_call_check**: Set to true to disable active call checking\n\nWhen disabled, the system will not check if the screener is already on an active call\nbefore initiating a new screening call. This is a workaround for cases where calls\nare incorrectly showing as still in progress.","operationId":"update_active_call_check_developer_active_call_check_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateActiveCallCheckRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActiveCallCheckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/screening-call-debug":{"get":{"tags":["Developer","Developer - Debug"],"summary":"Get Screening Call Debug","description":"Get debug information about screening calls for the current customer.\n\nThis endpoint is restricted to developer users only.\nReturns the same screening calls that are evaluated when determining if the\nscreener is busy, along with their current Twilio status.\n\nThis helps debug issues where calls are incorrectly showing as in progress.","operationId":"get_screening_call_debug_developer_screening_call_debug_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScreeningCallDebugResponse"}}}}}}},"/developer/dry-run-case-matching":{"get":{"tags":["Developer","Developer - Debug"],"summary":"Get Dry Run Case Matching","description":"Get the dry-run case matching setting for the current customer.\n\nThis endpoint is restricted to developer users only.\nWhen dry-run mode is enabled, case matches require manual approval before\ncase notes are posted to SmartAdvocate.\n\nNote: This endpoint is maintained for backward compatibility.\nPrefer using /case-notes-settings for new integrations.","operationId":"get_dry_run_case_matching_developer_dry_run_case_matching_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DryRunCaseMatchingResponse"}}}}}},"patch":{"tags":["Developer","Developer - Debug"],"summary":"Update Dry Run Case Matching","description":"Update the dry-run case matching setting for the current customer.\n\nThis endpoint is restricted to developer users only.\n\n- **dry_run_case_matching**: Set to true to enable dry-run mode\n\nWhen dry-run mode is enabled:\n- Case matching still runs automatically\n- Matches are flagged as \"pending approval\" instead of being finalized\n- Developers can review and approve/reject matches in the call detail view\n- Case notes are only posted after manual approval\n\nNote: This endpoint is maintained for backward compatibility.\nPrefer using /case-notes-settings for new integrations.","operationId":"update_dry_run_case_matching_developer_dry_run_case_matching_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDryRunCaseMatchingRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DryRunCaseMatchingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/mark-stuck-calls-completed":{"post":{"tags":["Developer","Developer - Debug"],"summary":"Mark Stuck Calls Completed","description":"Mark all in-progress calls as completed for the current customer.\n\nThis endpoint is restricted to developer users only.\nUsed to clean up calls that are stuck showing as \"in progress\" on the calls page\nwhen the end of call PATCH request was never made (e.g., due to a crash or network issue).\n\nOnly affects calls that started more than 5 minutes ago to avoid marking\nactive calls as stuck.\n\nSets:\n- status to \"completed\"\n- duration_seconds to 0\n- has_error to True\n- error_description to \"End of call PATCH request never made\"","operationId":"mark_stuck_calls_completed_developer_mark_stuck_calls_completed_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkStuckCallsCompletedResponse"}}}}}}},"/developer/cases/search":{"get":{"tags":["Developer","Developer - Cases"],"summary":"Search Cases","description":"Search cases in the customer's active case-management system.\n\nRoutes through the active CaseProvider (SmartAdvocate or Filevine), so\nFilevine customers now see their own projects here instead of an empty\nSA-only result set. Developer-only; used for manual match UI in dry-run.\n\nReturns minimal case information for privacy:\n- Case provider + local ID (+ back-compat smartadvocate_case_id for SA)\n- Case number and name\n- Phone numbers on file\n- SA: plaintiff/defendant names. FV: primary contact name + phone.","operationId":"search_cases_developer_cases_search_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Search query (phone number, case number, or name)","title":"Q"},"description":"Search query (phone number, case number, or name)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/cases/{case_id}":{"get":{"tags":["Developer","Developer - Cases"],"summary":"Get Case Detail","description":"Get detailed case information for manual matching.\n\nRoutes through the active CaseProvider (SA or FV) so Filevine customers\nget their project details here instead of a 404 from the SA-only path.\nDeveloper-only; used to preview a case before manually matching.","operationId":"get_case_detail_developer_cases__case_id__get","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/send-leads-summary-email":{"post":{"tags":["Developer","Developer - Email"],"summary":"Send Leads Summary Email Endpoint","description":"Send a leads summary email for the current customer.\n\nThis endpoint is restricted to developer users only.\nSends a summary email of all leads from 8am yesterday to 8am today\n(based on the customer's default timezone) to the specified email\nor the current user's email if not provided.","operationId":"send_leads_summary_email_endpoint_developer_send_leads_summary_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendLeadsSummaryEmailRequest","default":{"day_offset":0}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendLeadsSummaryEmailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/send-inquiry-summary-email":{"post":{"tags":["Developer","Developer - Email"],"summary":"Send Inquiry Summary Email Endpoint","description":"Send an inquiry summary email for the current customer.\n\nThis endpoint is restricted to developer users only.\nSends a summary email of all inquiries from 8am yesterday to 8am today\n(based on the customer's default timezone) to the specified email\nor the current user's email if not provided.","operationId":"send_inquiry_summary_email_endpoint_developer_send_inquiry_summary_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendInquirySummaryEmailRequest","default":{"day_offset":0}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendInquirySummaryEmailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/send-report-email":{"post":{"tags":["Developer","Developer - Email"],"summary":"Send Report Email Endpoint","description":"Send a specific report email based on report ID.\n\nThis endpoint is restricted to developer users only.\nSends the report email with its configured filters and name.","operationId":"send_report_email_endpoint_developer_send_report_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendReportEmailRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendReportEmailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/send-meeting-booked-email":{"post":{"tags":["Developer","Developer - Email"],"summary":"Send Meeting Booked Email Endpoint","description":"Send a meeting booked notification email for a specific meeting.\n\nThis endpoint is restricted to developer users only.\nReplicates the same email that is sent automatically via the Celery task\nwhen a meeting is booked, but sends it synchronously to the provided email address.","operationId":"send_meeting_booked_email_endpoint_developer_send_meeting_booked_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMeetingBookedEmailRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMeetingBookedEmailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/bedrock-ttfb":{"get":{"tags":["Developer","Developer - LLM TTFB"],"summary":"Get Bedrock Ttfb","description":"Get Bedrock TTFB measurements for the specified time range.\nRestricted to developer users in dev environment only.","operationId":"get_bedrock_ttfb_developer_bedrock_ttfb_get","parameters":[{"name":"time_range","in":"query","required":false,"schema":{"type":"string","enum":["24h","7d","30d"],"default":"24h","title":"Time Range"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BedrockTTFBResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/llm-ttfb":{"get":{"tags":["Developer","Developer - LLM TTFB"],"summary":"Get Llm Ttfb","description":"Get combined LLM TTFB data: synthetic Bedrock benchmarks and real-world Vapi call latency.\nRestricted to developer users in dev environment only.","operationId":"get_llm_ttfb_developer_llm_ttfb_get","parameters":[{"name":"time_range","in":"query","required":false,"schema":{"type":"string","enum":["24h","7d","30d"],"default":"24h","title":"Time Range"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMTTFBResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/outbound-phone-numbers":{"get":{"tags":["Developer","Developer - Outbound Calls"],"summary":"List Outbound Phone Numbers","description":"List outbound-enabled phone numbers for the current customer.","operationId":"list_outbound_phone_numbers_developer_outbound_phone_numbers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutboundPhoneNumbersResponse"}}}}}}},"/developer/trigger-outbound-call":{"post":{"tags":["Developer","Developer - Outbound Calls"],"summary":"Trigger Outbound Call","description":"Manually trigger an outbound VAPI call.\n\nDeveloper-only endpoint for testing. Takes contact info directly\nrather than referencing an outbound lead.","operationId":"trigger_outbound_call_developer_trigger_outbound_call_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerOutboundCallRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerOutboundCallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/force-process-next-queued-call":{"post":{"tags":["Developer","Developer - Outbound Calls"],"summary":"Force Process Next Queued Call","description":"Force-process the next queued outbound call for this customer.\n\nBypasses calling window and phone number daily limit checks.\nDeveloper-only endpoint for testing.","operationId":"force_process_next_queued_call_developer_force_process_next_queued_call_post","responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForceProcessNextCallResponse"}}}}}}},"/developer/customer-metrics":{"get":{"tags":["Developer","Developer - Customer Metrics"],"summary":"Get Customer Metrics","description":"Get customer-specific business metrics. Sections are conditionally\nincluded based on the customer's enabled feature flags.","operationId":"getCustomerMetrics","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","pattern":"^(7d|30d|all)$","default":"30d","title":"Period"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerMetricsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/call-quality-metrics":{"get":{"tags":["Developer","Developer - Call Quality"],"summary":"Get Call Quality Metrics","description":"Get time-bucketed call quality metrics across all customers.\n\nBuckets by Call.created_at (UTC date_trunc) so quality maps to when the\ncall happened, not when it was graded. Rates are null (not 0) when the\ndenominator is 0 so charts can show gaps instead of fake zeros.","operationId":"getCallQualityMetrics","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","pattern":"^(7d|30d|90d|all)$","default":"30d","title":"Period"}},{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter to one customer; omit for all customers","title":"Customer Id"},"description":"Filter to one customer; omit for all customers"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallQualityMetricsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/transfer-metrics":{"get":{"tags":["Developer","Developer - Transfer Metrics"],"summary":"Get Transfer Metrics","description":"Team-level transfer metrics, bucketed in the customer's local timezone.\n\nTeams are TransferDestination rows matched by the number the call was\ntransferred to; teams sort by missed rate (worst first). Pickup/missed\nrates are FIRST-QUEUE rates from transfer_outcome plus the transfer_flow\nsnapshot: a call answered only after rolling to a downstream queue counts\nas missed by the team it was sent to. Hand-off counts, queue waits, and\nper-extension answer counts come from the flow snapshot (coverage\nreported, since older calls may lack one). Trends compare against the\nimmediately preceding period of equal length.","operationId":"getTransferMetrics","parameters":[{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Customer whose transfers to analyze (developers only; admins always get their own)","title":"Customer Id"},"description":"Customer whose transfers to analyze (developers only; admins always get their own)"},{"name":"period","in":"query","required":false,"schema":{"type":"string","pattern":"^(today|7d|30d|90d)$","default":"today","title":"Period"}},{"name":"bucket","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(day|week|month)$"},{"type":"null"}],"description":"Override bucket granularity (ignored for period=today)","title":"Bucket"},"description":"Override bucket granularity (ignored for period=today)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferMetricsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/transfer-metrics/backfill":{"post":{"tags":["Developer","Developer - Transfer Metrics"],"summary":"Backfill Transfer Flows Endpoint","description":"Enqueue the read-only transfer-flow backfill for historical transferred\ncalls missing a snapshot. PBX access is strictly CDR/name reads; snapshots\nare written with backfilled=true and contain only CDR-anchored hops (no\nrule-walk inference — historical rules are unknowable).","operationId":"backfillTransferFlows","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferFlowBackfillRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferFlowBackfillResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/transfer-metrics/backfill-recordings":{"post":{"tags":["Developer","Developer - Transfer Metrics"],"summary":"Backfill Pbx Staff Legs Endpoint","description":"Enqueue the staff-leg RECORDING backfill for historical answered\ntransfers: fetch the queue recording from the PBX (read-only), transcribe,\nand stitch onto the AI leg — presentation only, the calls' pipelines are\nNOT re-run (pipeline_rerun=false rows).","operationId":"backfillPbxStaffLegs","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferFlowBackfillRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferFlowBackfillResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/transfer-metrics/reorder-flows":{"post":{"tags":["Developer","Developer - Transfer Metrics"],"summary":"Recapture Transfer Flow Order Endpoint","description":"One-time re-capture (read-only vs the PBX) of flow snapshots whose\nsame-start dispatch legs were captured before the time_answer ordering\ntiebreak — fixes first-answerer attribution in metrics and hop order in\nthe flow panel for multi-answered historical calls.","operationId":"recaptureTransferFlowOrder","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferFlowBackfillRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferFlowBackfillResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/technical-alerts":{"get":{"tags":["Developer","Developer - Technical Alerting"],"summary":"List Technical Alerts","description":"List technical alert evaluations for the current customer (developer only).\n\nReturns evaluations ordered by most recent first.","operationId":"list_technical_alerts_developer_technical_alerts_get","parameters":[{"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"}},{"name":"failures_only","in":"query","required":false,"schema":{"type":"boolean","description":"Only return alerts where a technical failure was detected","default":false,"title":"Failures Only"},"description":"Only return alerts where a technical failure was detected"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TechnicalAlertResponse"},"title":"Response List Technical Alerts Developer Technical Alerts Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/calls/{call_id}/technical-alert":{"get":{"tags":["Developer","Developer - Technical Alerting"],"summary":"Get Call Technical Alert","description":"Get the technical alert evaluation for a specific call (developer only).\n\nReturns the most recent evaluation, or null if no evaluation exists.","operationId":"get_call_technical_alert_developer_calls__call_id__technical_alert_get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TechnicalAlertResponse"},{"type":"null"}],"title":"Response Get Call Technical Alert Developer Calls  Call Id  Technical Alert Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/technical-alerts/test":{"post":{"tags":["Developer","Developer - Technical Alerting"],"summary":"Send Test Alert","description":"Send a test PagerDuty alert to verify the integration is working (developer only).\n\nFires a real PagerDuty alert with a test payload. Use this to confirm\nthat routing keys, escalation policies, and notification channels are\nconfigured correctly. Optionally include a custom message.","operationId":"send_test_alert_developer_technical_alerts_test_post","parameters":[{"name":"message","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Custom message for the test alert","title":"Message"},"description":"Custom message for the test alert"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestAlertResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/technical-alerts/prompt":{"get":{"tags":["Developer","Developer - Technical Alerting"],"summary":"Get Technical Alert Prompt","description":"Get the universal and customer-specific technical alert evaluation prompts.","operationId":"get_technical_alert_prompt_developer_technical_alerts_prompt_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TechnicalAlertPromptResponse"}}}}}},"put":{"tags":["Developer","Developer - Technical Alerting"],"summary":"Update Technical Alert Prompt","description":"Update the per-customer technical alert context addendum.\n\nThe base evaluation prompt is global and edited via the settings endpoint.","operationId":"update_technical_alert_prompt_developer_technical_alerts_prompt_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TechnicalAlertPromptUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TechnicalAlertPromptResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/technical-alerts/settings":{"get":{"tags":["Developer","Developer - Technical Alerting"],"summary":"Get Technical Alert Global Settings","description":"Get global technical alerting settings (dry-run mode, etc.).","operationId":"get_technical_alert_global_settings_developer_technical_alerts_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TechnicalAlertGlobalSettingsResponse"}}}}}},"patch":{"tags":["Developer","Developer - Technical Alerting"],"summary":"Update Technical Alert Global Settings","description":"Update global technical alerting settings.\n\nOnly fields present in the request are updated. Pass evaluation_prompt as an\nempty/whitespace string to clear the global override and revert to the default.","operationId":"update_technical_alert_global_settings_developer_technical_alerts_settings_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TechnicalAlertGlobalSettingsUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TechnicalAlertGlobalSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/reconciliation/issues":{"get":{"tags":["Developer","Developer - Reconciliation","Developer - Reconciliation"],"summary":"List Reconciliation Issues","description":"List Vapi-transferred calls whose VXT reconciliation needs attention.\n\nBy default returns everything non-matched (pending, timeout, multi_match,\nerror). Matched reconciliations aren't issues — they're already stitched.","operationId":"list_reconciliation_issues_developer_reconciliation_issues_get","parameters":[{"name":"status_filter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status. One of: pending, timeout, multi_match, error. Omit for all.","title":"Status Filter"},"description":"Filter by status. One of: pending, timeout, multi_match, error. Omit for all."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VxtReconciliationIssuesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/reconciliation/matched":{"get":{"tags":["Developer","Developer - Reconciliation","Developer - Reconciliation"],"summary":"List Matched Reconciliations","description":"List successfully matched + stitched Vapi transfers.\n\nLets developers confirm the pipeline is actually working end-to-end.\nEach item has a call_id that the frontend links to the call detail\npage where the stitched transcript lives.","operationId":"list_matched_reconciliations_developer_reconciliation_matched_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VxtMatchedReconciliationsResponse"}}}}}}},"/developer/reconciliation/orphan-webhooks":{"get":{"tags":["Developer","Developer - Reconciliation","Developer - Reconciliation"],"summary":"List Orphan Webhooks","description":"List VXT webhook events that couldn't be matched to any Vapi call.\n\nReturns rows in `orphan` (aged out of the match window unclaimed),\n`multi_match` (ambiguous), or `error` (processing failure).","operationId":"list_orphan_webhooks_developer_reconciliation_orphan_webhooks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VxtOrphanWebhooksResponse"}}}}}}},"/developer/reconciliation/{call_id}/rerun":{"post":{"tags":["Developer","Developer - Reconciliation","Developer - Reconciliation"],"summary":"Rerun Reconciliation","description":"Reset a reconciliation row to pending and re-enqueue fetch_vxt_transfer_leg.\n\nUseful when: VXT was temporarily down during the original run, a timeout\nfired too aggressively, or a multi_match was resolved manually. Does NOT\nun-stitch an already-stitched transcript — only replaces the state for\nreconciliations that didn't match successfully.","operationId":"rerun_reconciliation_developer_reconciliation__call_id__rerun_post","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VxtReconciliationActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/reconciliation/force-match":{"post":{"tags":["Developer","Developer - Reconciliation","Developer - Reconciliation"],"summary":"Force Match","description":"Manually link a VXT webhook event to a call, then fire stitching.\n\nBypasses the normal match criteria — used for multi_match or orphan\ncases where a developer has visually confirmed the correct pairing.\nIdempotent: safe to call again if a previous attempt failed mid-flow.","operationId":"force_match_developer_reconciliation_force_match_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForceMatchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VxtReconciliationActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/docusign/remote-templates":{"get":{"tags":["Developer","Developer - DocuSign"],"summary":"List Docusign Remote Templates","description":"List templates available in the connected DocuSign account.\n\nTemplates already imported into our DB are flagged with ``imported=True``\nso the UI can disable re-importing them.","operationId":"listDocuSignRemoteTemplates","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocuSignRemoteTemplatesResponse"}}}}}}},"/developer/docusign/forms":{"get":{"tags":["Developer","Developer - DocuSign"],"summary":"List Docusign Forms","description":"List DocuSign forms (templates) synced for the current customer.","operationId":"listDocuSignForms","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocuSignFormsResponse"}}}}}}},"/developer/docusign/forms/import":{"post":{"tags":["Developer","Developer - DocuSign"],"summary":"Import Docusign Template","description":"Import a single DocuSign template (+ tabs) into our DB.","operationId":"importDocuSignTemplate","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocuSignImportTemplateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocuSignFormResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/docusign/forms/{form_id}":{"get":{"tags":["Developer","Developer - DocuSign"],"summary":"Get Docusign Form Detail","description":"Return a DocuSign form along with its fields.","operationId":"getDocuSignFormDetail","parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Form Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocuSignFormDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Developer","Developer - DocuSign"],"summary":"Update Docusign Form","description":"Update a DocuSign form's editable fields (currently extraction_prompt).","operationId":"updateDocuSignForm","parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Form Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocuSignFormUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocuSignFormDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/docusign/forms/{form_id}/fields/{field_id}":{"patch":{"tags":["Developer","Developer - DocuSign"],"summary":"Update Docusign Form Field","description":"Update a DocuSign form field's sidecar columns.\n\nThese are the fields that are NEVER overwritten on resync.","operationId":"updateDocuSignFormField","parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Form Id"}},{"name":"field_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Field Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocuSignFormFieldUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocuSignFormFieldResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/docusign/forms/{form_id}/auto-label":{"post":{"tags":["Developer","Developer - DocuSign"],"summary":"Auto Label Docusign Fields","description":"Use Claude (multimodal) to label a form's fields from the template PDF.\n\nRenders the template's PDF pages with a numbered marker at each field's\nposition, asks Claude to read the printed label adjacent to each marker,\nand writes the generated ``display_name`` / ``llm_description`` into the\nsidecar columns. Returns the refreshed form detail.","operationId":"autoLabelDocuSignFields","parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Form Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocuSignFormDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/docusign/forms/{form_id}/preview":{"get":{"tags":["Developer","Developer - DocuSign"],"summary":"Get Docusign Form Preview","description":"Render the template's PDF pages (that carry fields) and return them\nalongside the positioned fields for a read-only overlay preview.\n\nThe frontend pins each field's ``display_name`` at its position using the\npage dimensions (points) returned per page.","operationId":"getDocuSignFormPreview","parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Form Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocuSignPreviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/docusign/forms/{form_id}/extract":{"post":{"tags":["Developer","Developer - DocuSign"],"summary":"Extract Docusign Values","description":"Run LLM extraction against a transcript for a given form (no envelope created).","operationId":"extractDocuSignValues","parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Form Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocuSignExtractRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocuSignExtractResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/docusign/forms/{form_id}/create-envelope":{"post":{"tags":["Developer","Developer - DocuSign"],"summary":"Create Docusign Envelope","description":"Create a DocuSign envelope from a template + extracted values.\n\nThe envelope is always created in draft state and a sender-view URL is\nreturned for reviewing/sending in DocuSign.","operationId":"createDocuSignEnvelope","parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Form Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocuSignCreateEnvelopeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocuSignEnvelopeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/docusign/envelopes":{"get":{"tags":["Developer","Developer - DocuSign"],"summary":"List Docusign Envelopes","description":"List recent DocuSign envelopes for the current customer.","operationId":"listDocuSignEnvelopes","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocuSignEnvelopesResponse"}}}}}}},"/developer/croo/filters":{"get":{"tags":["Developer","Developer - Croo"],"summary":"Get Croo Filters","operationId":"getCrooFilters","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrooFilterSettings"}}}}}},"put":{"tags":["Developer","Developer - Croo"],"summary":"Update Croo Filters","operationId":"updateCrooFilters","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrooFilterSettings"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrooFilterSettings"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/croo/intake-prompt":{"get":{"tags":["Developer","Developer - Croo"],"summary":"Get Croo Intake Prompt","description":"The customer's intake-screening criteria (or the built-in default).","operationId":"getCrooIntakePrompt","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrooIntakePrompt"}}}}}},"put":{"tags":["Developer","Developer - Croo"],"summary":"Update Croo Intake Prompt","description":"Set (or clear, by sending an empty prompt) the customer's intake\ncriteria. Applies to future screens only — already-decided rows are\nmanaged via the review queue.","operationId":"updateCrooIntakePrompt","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrooIntakePrompt"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrooIntakePrompt"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/croo/review-queue":{"get":{"tags":["Developer","Developer - Croo"],"summary":"Get Croo Review Queue","description":"Calls that passed the filters but were screened as non-intake (or\nflagged for manual review) — awaiting a developer's decision.","operationId":"getCrooReviewQueue","parameters":[{"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":{"$ref":"#/components/schemas/CrooReviewQueueResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/croo/review-queue/{croo_call_id}/graduate":{"post":{"tags":["Developer","Developer - Croo"],"summary":"Force Graduate Croo Call","description":"Manually graduate a parked call into a Call regardless of the screen\nverdict. The Call is created asynchronously (reusing the screening\ntranscript); poll the review queue for the resulting call_id.","operationId":"forceGraduateCrooCall","parameters":[{"name":"croo_call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Croo Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrooForceGraduateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/call-analysis/settings":{"get":{"tags":["Developer","Developer - Call Analysis"],"summary":"Get Call Analysis Settings","description":"Return this customer's enabled metrics plus the list of available metrics.","operationId":"get_call_analysis_settings_developer_call_analysis_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallAnalysisSettingsResponse"}}}}}},"patch":{"tags":["Developer","Developer - Call Analysis"],"summary":"Update Call Analysis Settings","description":"Upsert this customer's enabled metrics.","operationId":"update_call_analysis_settings_developer_call_analysis_settings_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCallAnalysisSettingsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallAnalysisSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/call-analysis/results":{"get":{"tags":["Developer","Developer - Call Analysis"],"summary":"Get Call Analysis Results","description":"Paginated recent calls for the customer joined with their analyses.","operationId":"get_call_analysis_results_developer_call_analysis_results_get","parameters":[{"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":{"$ref":"#/components/schemas/CallAnalysisResultsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/call-analysis/run-batch":{"post":{"tags":["Developer","Developer - Call Analysis"],"summary":"Run Batch Analysis","description":"Dispatch a Celery batch task to analyze this customer's un-analyzed calls.","operationId":"run_batch_analysis_developer_call_analysis_run_batch_post","responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunBatchAnalysisResponse"}}}}}}},"/developer/vapi-latency/backfill":{"post":{"tags":["Developer","Developer - Vapi Latency"],"summary":"Trigger Vapi Latency Backfill","description":"Enqueue the Vapi latency backfill orchestrator.","operationId":"trigger_vapi_latency_backfill_developer_vapi_latency_backfill_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VapiLatencyBackfillRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VapiLatencyBackfillResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/vapi-latency/stats":{"get":{"tags":["Developer","Developer - Vapi Latency"],"summary":"Get Vapi Latency Stats","description":"Aggregated latency stats for the dashboard, broken out by individual\nmodel per pipeline component (LLM / voice / transcriber). All aggregation\nruns in SQL so it scales on prod. Time filter applies to\n``VapiCallLatency.ended_at``.","operationId":"get_vapi_latency_stats_developer_vapi_latency_stats_get","parameters":[{"name":"time_range","in":"query","required":false,"schema":{"type":"string","enum":["24h","7d","30d","all"],"default":"7d","title":"Time Range"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VapiLatencyStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/vapi-latency":{"get":{"tags":["Developer","Developer - Vapi Latency"],"summary":"List Vapi Latency","description":"Recent stored call-level Vapi latency rows, newest call first.","operationId":"list_vapi_latency_developer_vapi_latency_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VapiCallLatencyListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/vapi-latency/{vapi_call_id}/turns":{"get":{"tags":["Developer","Developer - Vapi Latency"],"summary":"Get Vapi Latency Turns","description":"Per-turn latency rows for one Vapi call (drill-down).","operationId":"get_vapi_latency_turns_developer_vapi_latency__vapi_call_id__turns_get","parameters":[{"name":"vapi_call_id","in":"path","required":true,"schema":{"type":"string","title":"Vapi Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VapiTurnLatencyListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/llm-proxy-requests/import":{"post":{"tags":["Developer","Developer - LLM Proxy"],"summary":"Trigger Llm Proxy Import","description":"Enqueue an import. With a ``start`` this dispatches the backfill task, which\nnever touches the watermark; without one it runs the scheduled windowed import.","operationId":"trigger_llm_proxy_import_developer_llm_proxy_requests_import_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMProxyImportRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMProxyImportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/llm-proxy-requests/stats":{"get":{"tags":["Developer","Developer - LLM Proxy"],"summary":"Get Llm Proxy Stats","description":"TTFT percentiles per leg, per winner, and per outcome. All aggregation in SQL.","operationId":"get_llm_proxy_stats_developer_llm_proxy_requests_stats_get","parameters":[{"name":"time_range","in":"query","required":false,"schema":{"type":"string","enum":["1h","24h","7d","30d","all"],"default":"24h","title":"Time Range"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMProxyStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/llm-proxy-requests/import-state":{"get":{"tags":["Developer","Developer - LLM Proxy"],"summary":"Get Llm Proxy Import State","description":"Importer health: watermark, ingestion lag, last error, orphan counts, table size.\n\nThe orphan counts are the point. A metrics line whose bodies never arrived and a\nbodies line whose metrics never arrived are the two ways this importer can be\nsilently half-working, and neither shows up in a row count.","operationId":"get_llm_proxy_import_state_developer_llm_proxy_requests_import_state_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMProxyImportStateResponse"}}}}}}},"/developer/llm-proxy-requests/call/{vapi_call_id}":{"get":{"tags":["Developer","Developer - LLM Proxy"],"summary":"Get Llm Proxy Requests For Call","description":"One call's requests in order, with the computed ``request_seq``.\n\n``request_seq`` orders reading; it is not a join key against\n``vapi_turn_latency.turn_index``. Vapi retries a failed turn 3x, a tool-calling turn\nis one Vapi turn but 2+ requests, and a model-generated first message is a request\nwith no user turn at all. Align the two positionally with a FULL OUTER JOIN so\ndivergence shows up as one-sided NULLs instead of being silently dropped.","operationId":"get_llm_proxy_requests_for_call_developer_llm_proxy_requests_call__vapi_call_id__get","parameters":[{"name":"vapi_call_id","in":"path","required":true,"schema":{"type":"string","title":"Vapi Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMProxyRequestListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/llm-proxy-requests":{"get":{"tags":["Developer","Developer - LLM Proxy"],"summary":"List Llm Proxy Requests","description":"Recent proxy requests, newest first. Explicit columns only — no bodies.","operationId":"list_llm_proxy_requests_developer_llm_proxy_requests_get","parameters":[{"name":"vapi_call_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vapi Call Id"}},{"name":"call_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Call Id"}},{"name":"outcome","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outcome"}},{"name":"winner","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Winner"}},{"name":"has_error","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Error"}},{"name":"min_total_ms","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"title":"Min Total Ms"}},{"name":"time_range","in":"query","required":false,"schema":{"type":"string","enum":["1h","24h","7d","30d","all"],"default":"24h","title":"Time Range"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"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":{"$ref":"#/components/schemas/LLMProxyRequestListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/llm-proxy-requests/{request_id}":{"get":{"tags":["Developer","Developer - LLM Proxy"],"summary":"Get Llm Proxy Request","description":"One request in full, with the per-leg columns folded back into a list.\n\nDeclared after ``/stats``, ``/import-state``, and ``/call/{...}`` so those literal\nsegments win the match (FastAPI resolves in declaration order).","operationId":"get_llm_proxy_request_developer_llm_proxy_requests__request_id__get","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/LLMProxyRequestDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/llm-proxy-requests/{request_id}/bodies":{"get":{"tags":["Developer","Developer - LLM Proxy"],"summary":"Get Llm Proxy Request Bodies","description":"The raw Vapi payload, the translated Anthropic body, and the response.\n\nIts own endpoint deliberately: these are caller PII and easily hundreds of KB, so\nthey must never ride along in a list payload. ``bodies_imported_at`` set with a null\n``vapi_body`` means the body was dropped (over the proxy's 256 KB cap) or purged by\n``tasks.purge_llm_proxy_bodies``, not that it never existed.","operationId":"get_llm_proxy_request_bodies_developer_llm_proxy_requests__request_id__bodies_get","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/LLMProxyRequestBodiesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/zapier-config":{"get":{"tags":["Developer","Developer - Zapier"],"summary":"Get Zapier Config","operationId":"getZapierConfig","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZapierConfigResponse"}}}}}},"put":{"tags":["Developer","Developer - Zapier"],"summary":"Update Zapier Config","operationId":"updateZapierConfig","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateZapierConfigRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZapierConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/zapier-config/preview/{call_id}":{"post":{"tags":["Developer","Developer - Zapier"],"summary":"Preview Zapier Output","description":"Generate the Zapier payload for a specific call's lead and return it\nwithout sending. Runs the synchronous LLM generation against a sync session\n(the established dev-endpoint pattern; ``build_payload`` and Bedrock are\nsync).","operationId":"previewZapierOutput","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZapierPreviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/transcript-filing/settings":{"get":{"tags":["Developer","Developer - Transcript Filing"],"summary":"Get Transcript Filing Settings","operationId":"getTranscriptFilingSettings","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranscriptFilingSettingsSchema"}}}}}},"put":{"tags":["Developer","Developer - Transcript Filing"],"summary":"Update Transcript Filing Settings","operationId":"updateTranscriptFilingSettings","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranscriptFilingSettingsSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranscriptFilingSettingsSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/transcript-filing/filename-preview":{"post":{"tags":["Developer","Developer - Transcript Filing"],"summary":"Preview Filename Template","description":"Render a template against sample values, and report the naming\nconventions already present in the customer's Drive.\n\nThe observed examples are the point: a firm's client folders accumulate\nseveral conventions over the years, and the template should be written to\nmatch the prevailing one rather than invent a new one.","operationId":"previewFilenameTemplate","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilenameTemplatePreviewRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilenameTemplatePreviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/transcript-filing/backfill-dry-run":{"post":{"tags":["Developer","Developer - Transcript Filing"],"summary":"Backfill Transcript Filing Dry Run","description":"Queue retroactive dry-run filing proposals for historical transcripts.\n\nNever writes to Drive regardless of the customer's dry_run setting —\nevery dispatched run is forced dry-run and lands as a 'proposed' row on\nthe Automations tab. Sources that already have a run are skipped.","operationId":"backfillTranscriptFilingDryRun","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranscriptFilingBackfillResponse"}}}}}}},"/developer/transcript-filing/clear-dry-run-filings":{"post":{"tags":["Developer","Developer - Transcript Filing"],"summary":"Clear Dry Run Filings","description":"Delete undecided dry-run filing runs so a backfill can re-propose.\n\nThe backfill skips any source that already has a run, so a first pass\nwith bad matches otherwise blocks a retry after tuning. This clears\nthose proposals.\n\nDeliberately narrow — only rows that are all of: dry-run, transcript\nfiling, and still awaiting a decision ('proposed' / 'needs_review' /\n'screened_out' / 'already_filed', or a failed run that never reached one).\nA run a human approved or rejected, and any run that executed a Drive\nwrite, is kept: re-proposing those would discard a human decision or\nduplicate a file. 'already_filed' is the automation's own verdict rather\nthan a human's, and the re-run repeats the check, so it is clearable.","operationId":"clearDryRunFilings","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClearDryRunFilingsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClearDryRunFilingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/transcript-filing/purge-untagged-matters":{"post":{"tags":["Developer","Developer - Transcript Filing"],"summary":"Purge Untagged Matters","description":"Deactivate mirrored matters with no lifecycle status.\n\nRows without ``matter_status`` were mirrored by the legacy single-root +\ndepth sweep (mostly a matter's own subfolders — Pleadings, Discovery).\nOnce matter sources are configured, every legitimate matter is tagged, so\nuntagged rows are provably stale. This clears them without waiting for a\nfull rebuild sweep to complete.\n\nSoft-deactivation only — rows are kept, never deleted.","operationId":"purgeUntaggedMatters","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveCaseMatchingSyncStatus"}}}}}}},"/developer/transcript-filing/matter-sources":{"get":{"tags":["Developer","Developer - Transcript Filing"],"summary":"Get Matter Sources","description":"Configured matter source folders + exclude list.","operationId":"getMatterSources","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatterSourcesResponse"}}}}}},"put":{"tags":["Developer","Developer - Transcript Filing"],"summary":"Update Matter Sources","description":"Replace the matter sources and exclude list.\n\nSources define which folders' direct children are matters and what\nlifecycle status they get. After changing these, run a sync with\nrebuild=true so reclassified/stale matters don't linger.","operationId":"updateMatterSources","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMatterSourcesRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatterSourcesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/transcript-filing/drive-browse":{"get":{"tags":["Developer","Developer - Transcript Filing"],"summary":"Browse Drive Folders","description":"Read-only Drive folder picker for configuring the roots.\n\nDeliberately requires only the impersonation email (not a configured\nroot) — it exists to FIND the root id when we have no direct access to\nthe customer's Drive. Lists shared drives and My Drive at the top\nlevel, subfolders below. GET requests only.","operationId":"browseDriveFolders","parameters":[{"name":"parent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Folder or shared-drive id to list. Omit for the top level (shared drives + My Drive).","title":"Parent Id"},"description":"Folder or shared-drive id to list. Omit for the top level (shared drives + My Drive)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveBrowseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/transcript-filing/test-write":{"post":{"tags":["Developer","Developer - Transcript Filing"],"summary":"Test Drive Write","description":"Prove write access to the configured filing root before enabling live\nfiling: upload a uniquely-named marker file into drive_root_folder_id,\nthen trash it (recoverable ~30 days; never a hard delete).\n\nThe read-only browse endpoint proves impersonation + read; on a shared\ndrive only an actual write proves the impersonated user's membership role\nallows file creation. Every attempt is recorded in drive_write_test_log.","operationId":"testDriveWrite","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveWriteTestResponse"}}}}}}},"/developer/transcript-filing/drive-matters/{drive_matter_id}/reset-profile":{"post":{"tags":["Developer","Developer - Transcript Filing"],"summary":"Reset Drive Matter Profile","description":"Clear a matter's extracted profile and per-file extraction bookkeeping.\n\nThe correction path for a bad extraction: profiles are merge-only, so a\nmisextracted name would otherwise steer matching forever. Resetting\nclears the profile and marks every file un-extracted; the next extraction\nrun rebuilds the profile from scratch.","operationId":"resetDriveMatterProfile","parameters":[{"name":"drive_matter_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Drive Matter Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveMatterItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/transcript-filing/runs/{automation_run_id}/rescreen":{"post":{"tags":["Developer","Developer - Transcript Filing"],"summary":"Rescreen Automation Run","description":"Replay a screened-out or failed filing run through the full pipeline.\n\nA wrong relevance verdict (or a screen parse failure, which fails\nclosed) must not be terminal: this resets the run and re-dispatches\nfile_transcript with force_dry_run so the replay proposes, never writes.\nTune the screening criteria first, then rescreen the false negatives.","operationId":"rescreenAutomationRun","parameters":[{"name":"automation_run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Automation Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranscriptFilingBackfillResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/transcript-filing/drive-matters":{"get":{"tags":["Developer","Developer - Transcript Filing"],"summary":"List Drive Matters","description":"Browse the drive_matter mirror (read-only, local DB only — no Drive\ntraffic). Lets a developer verify what GDMS extracted: paths, names,\ndepth, and each matter's captured filename inventory.","operationId":"listDriveMatters","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by matter name (fuzzy-normalized substring)","title":"Q"},"description":"Filter by matter name (fuzzy-normalized substring)"},{"name":"include_inactive","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Inactive"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveMattersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/transcript-filing/case-matching-sync":{"get":{"tags":["Developer","Developer - Transcript Filing"],"summary":"Get Drive Case Matching Sync Status","description":"Status of the read-only Drive matter and Google contacts mirrors.","operationId":"getDriveCaseMatchingSyncStatus","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveCaseMatchingSyncStatus"}}}}}},"post":{"tags":["Developer","Developer - Transcript Filing"],"summary":"Trigger Drive Case Matching Sync","description":"Queue read-only mirror syncs (Drive matters; contacts if flag-enabled).\n\nOptionally updates matter_folder_depth first. Both syncs only read from\nGoogle — the mirrors are local tables.","operationId":"triggerDriveCaseMatchingSync","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveCaseMatchingSyncRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveCaseMatchingSyncResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/transcript-filing/matter-extraction/settings":{"post":{"tags":["Developer","Developer - Transcript Filing"],"summary":"Update Matter Extraction Settings","description":"Toggle content extraction (reading matter files' contents to build\nprofiles). Enable only after a sample run validates quality and cost.","operationId":"updateMatterExtractionSettings","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatterExtractionSettingsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveCaseMatchingSyncStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/transcript-filing/matter-extraction/run":{"post":{"tags":["Developer","Developer - Transcript Filing"],"summary":"Trigger Matter Extraction","description":"Queue a content-extraction run.\n\nsample_size 1-10: pre-flight test over that many unprofiled matters —\nallowed while content extraction is still disabled, so cost/quality can\nbe validated on a handful of folders before committing to a full run.\nsample_size 0: full run (requires the toggle to be on).","operationId":"triggerMatterExtraction","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatterExtractionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatterExtractionTriggerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/rc-contact-sync/settings":{"get":{"tags":["Developer","Developer - RC Contact Sync"],"summary":"Get Rc Contact Sync Settings","operationId":"getRcContactSyncSettings","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RcContactSyncSettingsSchema"}}}}}},"put":{"tags":["Developer","Developer - RC Contact Sync"],"summary":"Update Rc Contact Sync Settings","description":"Toggle dry-run. Turning it OFF arms the autonomous sync — the next\nhourly sweep (or manual trigger) will create missing contacts in\nRingCentral without further review.","operationId":"updateRcContactSyncSettings","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRcContactSyncSettingsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RcContactSyncSettingsSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/rc-contact-sync/trigger":{"post":{"tags":["Developer","Developer - RC Contact Sync"],"summary":"Trigger Rc Contact Sync","description":"Queue a sync sweep now (respects the current dry-run setting).","operationId":"triggerRcContactSync","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RcContactSyncTriggerResponse"}}}}}}},"/developer/custom-triggers/sources":{"get":{"tags":["Developer","Developer - Custom Triggers"],"summary":"List Custom Trigger Sources","description":"List the current customer's trigger tokens with captured-event counts.","operationId":"listCustomTriggerSources","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomTriggerSourceListResponse"}}}}}}},"/developer/custom-triggers/events":{"get":{"tags":["Developer","Developer - Custom Triggers"],"summary":"List Custom Trigger Events","description":"Page the current customer's captured trigger payloads, newest first.","operationId":"listCustomTriggerEvents","parameters":[{"name":"source_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Only events captured by this trigger source","title":"Source Id"},"description":"Only events captured by this trigger source"},{"name":"json_only","in":"query","required":false,"schema":{"type":"boolean","description":"Exclude requests whose body didn't parse as JSON (probes, form-encoded posts). body_json IS NOT NULL is a reliable filter.","default":false,"title":"Json Only"},"description":"Exclude requests whose body didn't parse as JSON (probes, form-encoded posts). body_json IS NOT NULL is a reliable filter."},{"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/CustomTriggerEventListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/custom-triggers/settings":{"get":{"tags":["Developer","Developer - Custom Triggers"],"summary":"Get Custom Trigger Settings","description":"Read whether captured events are armed to create real outbound leads.","operationId":"getCustomTriggerSettings","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomTriggerSettingsResponse"}}}}}},"put":{"tags":["Developer","Developer - Custom Triggers"],"summary":"Update Custom Trigger Settings","description":"Arm or disarm lead creation from captured events.\n\nTurning this on is the moment a customer's automation starts placing real\ncalls, so it's logged at info with the acting user.","operationId":"updateCustomTriggerSettings","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomTriggerSettingsUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomTriggerSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developer/custom-triggers/mappings":{"get":{"tags":["Developer","Developer - Custom Triggers"],"summary":"List Custom Trigger Mappings","description":"List the customer's payload→lead mappings in evaluation order.\n\nRead-only, same reasoning as sources: a mapping is what decides whether a\nreal person gets called, and it's edited deliberately in SQL or a script\nrather than in a browser tab. Surfacing it here is how an operator confirms\nwhich mapping an event matched.","operationId":"listCustomTriggerMappings","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomTriggerMappingListResponse"}}}}}}},"/email/send":{"post":{"tags":["Email"],"summary":"Send Email","description":"Send a templated email via AWS SES.\n\nArgs:\n    request: Email sending request\n    db_session: Database session\n    current_user: Authenticated user\n\nReturns:\n    Email log record","operationId":"send_email_email_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/EmailLogResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/email/send-invite":{"post":{"tags":["Email"],"summary":"Send Invite Email","description":"Send a user invite email.\n\nArgs:\n    request: Invite email request\n    db_session: Database session\n    current_user: Authenticated user\n\nReturns:\n    Email log record","operationId":"send_invite_email_email_send_invite_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendInviteEmailRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailLogResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/email/send-receipt":{"post":{"tags":["Email"],"summary":"Send Receipt Email","description":"Send a receipt email with PDF attachment.\n\nArgs:\n    request: Receipt email request\n    db_session: Database session\n    current_user: Authenticated user\n\nReturns:\n    Email log record","operationId":"send_receipt_email_email_send_receipt_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendReceiptEmailRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailLogResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/email/logs":{"get":{"tags":["Email"],"summary":"Get Email Logs","description":"Get email logs for the current customer.\n\nArgs:\n    limit: Maximum number of records to return\n    offset: Number of records to skip\n    db_session: Database session\n    current_user: Authenticated user\n\nReturns:\n    List of email log records","operationId":"get_email_logs_email_logs_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EmailLogResponse"},"title":"Response Get Email Logs Email Logs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/email/logs/{email_id}":{"get":{"tags":["Email"],"summary":"Get Email Log","description":"Get a specific email log record.\n\nArgs:\n    email_id: Email log ID\n    db_session: Database session\n    current_user: Authenticated user\n\nReturns:\n    Email log record","operationId":"get_email_log_email_logs__email_id__get","parameters":[{"name":"email_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Email Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailLogResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/list":{"get":{"tags":["Integrations"],"summary":"Get Integrations","description":"Get list of integrations for the customer","operationId":"get_integrations_integrations_list_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/integrations/{integration_id}":{"get":{"tags":["Integrations"],"summary":"Get Integration","description":"Get integration details - ensures it belongs to the customer","operationId":"get_integration_integrations__integration_id__get","parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Integration Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cases/agent":{"get":{"tags":["Cases"],"summary":"List Cases Agent","description":"List all cases for the customer associated with the agent token.\n\nThis endpoint is designed for internal services (voice agents, etc.) that use agent tokens.\nRequires a per-customer agent token for authentication.\n\nReturns cases ordered by created_at ascending (oldest first).\nIncludes title, description, and qualifications.","operationId":"list_cases_agent_cases_agent_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":{"type":"array","items":{"$ref":"#/components/schemas/CaseAgentResponse"},"title":"Response List Cases Agent Cases Agent Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cases/":{"get":{"tags":["Cases"],"summary":"List Cases","description":"List all cases for the current user's customer.\n\nReturns cases ordered by created_at ascending (oldest first).","operationId":"list_cases_cases__get","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":{"type":"array","items":{"$ref":"#/components/schemas/CaseResponse"},"title":"Response List Cases Cases  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Cases"],"summary":"Create Case","description":"Create a new case.\n\nReturns:\n- The created case object","operationId":"create_case_cases__post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCaseRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cases/{case_id}":{"get":{"tags":["Cases"],"summary":"Get Case","description":"Get a specific case by ID.","operationId":"get_case_cases__case_id__get","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Cases"],"summary":"Update Case","description":"Update an existing case.\n\nAll fields are optional. Only provided fields will be updated.","operationId":"update_case_cases__case_id__patch","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCaseRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Cases"],"summary":"Delete Case","description":"Delete a case.","operationId":"delete_case_cases__case_id__delete","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cases/{case_id}/qualifications":{"get":{"tags":["Cases"],"summary":"List Qualifications","description":"List all qualifications for a specific case.\n\nReturns qualifications ordered by created_at ascending (oldest first).","operationId":"list_qualifications_cases__case_id__qualifications_get","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}},{"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":{"type":"array","items":{"$ref":"#/components/schemas/QualificationResponse"},"title":"Response List Qualifications Cases  Case Id  Qualifications Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cases/qualifications":{"post":{"tags":["Cases"],"summary":"Create Qualification","description":"Create a new qualification for a litigation case.\n\nReturns:\n- The created qualification object","operationId":"create_qualification_cases_qualifications_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateQualificationRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QualificationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cases/qualifications/{qualification_id}":{"patch":{"tags":["Cases"],"summary":"Update Qualification","description":"Update an existing qualification.\n\nAll fields are optional. Only provided fields will be updated.","operationId":"update_qualification_cases_qualifications__qualification_id__patch","parameters":[{"name":"qualification_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Qualification Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateQualificationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QualificationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Cases"],"summary":"Delete Qualification","description":"Delete a qualification.","operationId":"delete_qualification_cases_qualifications__qualification_id__delete","parameters":[{"name":"qualification_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Qualification Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cases/qualifications/{qualification_id}/move":{"post":{"tags":["Cases"],"summary":"Move Qualification","description":"Move a qualification up or down in the list.\n\nQuery param `direction` must be 'up' or 'down'.\nReturns the two swapped qualifications.","operationId":"move_qualification_cases_qualifications__qualification_id__move_post","parameters":[{"name":"qualification_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Qualification Id"}},{"name":"direction","in":"query","required":true,"schema":{"type":"string","title":"Direction"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/QualificationResponse"},"title":"Response Move Qualification Cases Qualifications  Qualification Id  Move Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/leads/":{"get":{"tags":["Leads"],"summary":"List Leads","description":"List leads for the current user's customer.\n\nReturns leads ordered by created_at descending (newest first).\nSupports filtering by:\n- is_qualified: True (qualified) or False (not qualified)\n- case_id: Filter by matched case\n- client_status: existing_client, new_client, unknown\n- search: Search across name, phone, email, inquiry reason\n- lead_score: low, medium, high","operationId":"list_leads_leads__get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"is_qualified","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by qualification status","title":"Is Qualified"},"description":"Filter by qualification status"},{"name":"case_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by case ID","title":"Case Id"},"description":"Filter by case ID"},{"name":"client_status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by client status","title":"Client Status"},"description":"Filter by client status"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by name, phone, email, or inquiry reason","title":"Search"},"description":"Search by name, phone, email, or inquiry reason"},{"name":"lead_score","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by lead score (low, medium, high, unknown)","title":"Lead Score"},"description":"Filter by lead score (low, medium, high, unknown)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/leads/metrics":{"get":{"tags":["Leads"],"summary":"Get Lead Metrics","description":"Get lead metrics (last 24 hours, this week, total, qualified).","operationId":"get_lead_metrics_leads_metrics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadMetricsResponse"}}}}}}},"/leads/cases":{"get":{"tags":["Leads"],"summary":"Get Lead Cases","description":"Get list of cases that have associated leads.","operationId":"get_lead_cases_leads_cases_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadCasesResponse"}}}}}}},"/leads/by-call/{call_id}":{"get":{"tags":["Leads"],"summary":"Get Lead By Call","description":"Get a lead by call ID.\n\nReturns the lead associated with a specific call, or 404 if no lead exists for that call.","operationId":"get_lead_by_call_leads_by_call__call_id__get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadWithCaseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Leads"],"summary":"Delete Lead By Call","description":"Delete a lead by call ID (developer only).\n\nThe call record and pipeline status remain unchanged.","operationId":"delete_lead_by_call_leads_by_call__call_id__delete","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/leads/{lead_id}":{"get":{"tags":["Leads"],"summary":"Get Lead","description":"Get a specific lead by ID.","operationId":"get_lead_leads__lead_id__get","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lead Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadWithCaseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Leads"],"summary":"Update Lead","description":"Update an existing lead.\n\nAll fields are optional. Only provided fields will be updated.\nUseful for manual override of qualification status or case assignment.","operationId":"update_lead_leads__lead_id__patch","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lead Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLeadRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/leads/{lead_id}/send-notifications":{"post":{"tags":["Leads"],"summary":"Send Lead Notifications","description":"Manually send lead notifications (developer only).\n\nDispatches Celery tasks to send notification emails and SMS for this lead.\nUsed in dry-run mode to manually trigger notifications from the call detail page.","operationId":"sendLeadNotifications","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lead Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/inquiries/":{"get":{"tags":["Inquiries"],"summary":"List Inquiries","description":"List inquiries for the current user's customer.\n\nReturns inquiries ordered by call created_at descending (newest first).\nSupports filtering by search and notification status.","operationId":"list_inquiries_inquiries__get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"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"}],"description":"Search by name, phone, email, or description","title":"Search"},"description":"Search by name, phone, email, or description"},{"name":"notification_sent","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by notification status","title":"Notification Sent"},"description":"Filter by notification status"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InquiryListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/inquiries/metrics":{"get":{"tags":["Inquiries"],"summary":"Get Inquiry Metrics","description":"Get inquiry metrics (last 24 hours, this week, total).","operationId":"get_inquiry_metrics_inquiries_metrics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InquiryMetricsResponse"}}}}}}},"/inquiries/by-call/{call_id}":{"get":{"tags":["Inquiries"],"summary":"Get Inquiry By Call","description":"Get an inquiry by call ID.\n\nReturns the inquiry associated with a specific call, or 404 if no inquiry exists for that call.","operationId":"get_inquiry_by_call_inquiries_by_call__call_id__get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InquiryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Inquiries"],"summary":"Delete Inquiry By Call","description":"Delete an inquiry by call ID (developer only).\n\nThe call record and pipeline status remain unchanged.","operationId":"delete_inquiry_by_call_inquiries_by_call__call_id__delete","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/inquiries/{inquiry_id}":{"get":{"tags":["Inquiries"],"summary":"Get Inquiry","description":"Get a specific inquiry by ID.","operationId":"get_inquiry_inquiries__inquiry_id__get","parameters":[{"name":"inquiry_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Inquiry Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InquiryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Inquiries"],"summary":"Update Inquiry","description":"Update an existing inquiry.\n\nAll fields are optional. Only provided fields will be updated.","operationId":"update_inquiry_inquiries__inquiry_id__patch","parameters":[{"name":"inquiry_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Inquiry Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateInquiryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InquiryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/inquiries/{inquiry_id}/send-notifications":{"post":{"tags":["Inquiries"],"summary":"Send Inquiry Notifications","description":"Manually send inquiry notifications (developer only).\n\nDispatches Celery tasks to send notification emails and SMS for this inquiry.\nUsed in dry-run mode to manually trigger notifications from the call detail page.\nIntentionally ignores the follow-up filter: sends even when the filter\nsuppressed auto-notifications (requires_followup=False).","operationId":"sendInquiryNotifications","parameters":[{"name":"inquiry_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Inquiry Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/zoho/authorize":{"get":{"tags":["OAuth"],"summary":"Zoho Authorize","description":"Initiate Zoho OAuth integration.\nRedirects user to Zoho's authorization page.","operationId":"getZohoAuthUrl","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZohoAuthorizationUrl"}}}}}}},"/oauth/zoho/callback":{"post":{"tags":["OAuth"],"summary":"Zoho Callback","description":"OAuth callback endpoint for Zoho integration (called by frontend).\nExchanges authorization code for access token and stores credentials.","operationId":"zohoCallback","parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string","title":"Code"}},{"name":"state","in":"query","required":true,"schema":{"type":"string","title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZohoStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/zoho/status":{"get":{"tags":["OAuth"],"summary":"Zoho Status","description":"Check if Zoho integration is connected for the current customer","operationId":"getZohoStatus","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZohoStatus"}}}}}}},"/oauth/zoho/disconnect":{"post":{"tags":["OAuth"],"summary":"Zoho Disconnect","description":"Disconnect Zoho integration","operationId":"disconnectZoho","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthDisconnectResponse"}}}}}}},"/oauth/google-workspace/status":{"get":{"tags":["OAuth"],"summary":"Google Workspace Status","description":"Check Google Workspace service account integration status for the current customer","operationId":"getGoogleWorkspaceStatus","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceStatus"}}}}}}},"/oauth/google-workspace/test-connection":{"post":{"tags":["OAuth"],"summary":"Google Workspace Test Connection","description":"Test Google Workspace connection by making a Directory API call.\nIf successful, updates the customer's status to 'connected'.","operationId":"testGoogleWorkspaceConnection","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceTestConnectionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceTestConnectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/google-workspace/disconnect":{"post":{"tags":["OAuth"],"summary":"Google Workspace Disconnect","description":"Disconnect Google Workspace integration by resetting customer status","operationId":"disconnectGoogleWorkspace","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthDisconnectResponse"}}}}}}},"/oauth/microsoft365/authorize":{"get":{"tags":["OAuth"],"summary":"Microsoft365 Authorize","description":"Get Microsoft 365 admin consent URL.\nThe M365 admin clicks this URL to grant tenant-wide consent for the app.","operationId":"getMicrosoft365AuthUrl","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365AuthorizationUrl"}}}}}}},"/oauth/microsoft365/callback":{"post":{"tags":["OAuth"],"summary":"Microsoft365 Callback","description":"Handle the callback from Microsoft after admin consent.\nThe frontend calls this after being redirected back from Microsoft.","operationId":"microsoft365Callback","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365CallbackRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365Status"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/microsoft365/status":{"get":{"tags":["OAuth"],"summary":"Microsoft365 Status","description":"Check Microsoft 365 integration status for the current customer","operationId":"getMicrosoft365Status","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365Status"}}}}}}},"/oauth/microsoft365/disconnect":{"post":{"tags":["OAuth"],"summary":"Microsoft365 Disconnect","description":"Disconnect Microsoft 365 integration","operationId":"disconnectMicrosoft365","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthDisconnectResponse"}}}}}}},"/oauth/microsoft365/test-connection":{"post":{"tags":["OAuth"],"summary":"Microsoft365 Test Connection","description":"Test Microsoft 365 connection by listing users","operationId":"testMicrosoft365Connection","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365TestConnectionResponse"}}}}}}},"/oauth/microsoft365/users":{"get":{"tags":["OAuth"],"summary":"Microsoft365 Users","description":"List users from the connected Microsoft 365 tenant","operationId":"listMicrosoft365Users","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__integrations__schemas__Microsoft365UsersResponse"}}}}}}},"/oauth/microsoft365/users/{user_id}/calendars":{"get":{"tags":["OAuth"],"summary":"Microsoft365 User Calendars","description":"List calendars for a specific user in the connected Microsoft 365 tenant","operationId":"listMicrosoft365UserCalendars","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft365CalendarsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/ringcentral/authorize":{"get":{"tags":["OAuth"],"summary":"Ringcentral Authorize","description":"Initiate RingCentral OAuth integration.\nReturns the authorization URL for the user to grant access.","operationId":"getRingCentralAuthUrl","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RingCentralAuthorizationUrl"}}}}}}},"/oauth/ringcentral/callback":{"post":{"tags":["OAuth"],"summary":"Ringcentral Callback","description":"OAuth callback endpoint for RingCentral integration (called by frontend).\nExchanges authorization code for access token and stores credentials.","operationId":"ringcentralCallback","parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string","title":"Code"}},{"name":"state","in":"query","required":true,"schema":{"type":"string","title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RingCentralStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/ringcentral/status":{"get":{"tags":["OAuth"],"summary":"Ringcentral Status","description":"Check if RingCentral integration is connected for the current customer","operationId":"getRingCentralStatus","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RingCentralStatus"}}}}}}},"/oauth/ringcentral/disconnect":{"post":{"tags":["OAuth"],"summary":"Ringcentral Disconnect","description":"Disconnect RingCentral integration","operationId":"disconnectRingCentral","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthDisconnectResponse"}}}}}}},"/oauth/ringcentral-contacts/authorize":{"get":{"tags":["OAuth"],"summary":"Ringcentral Contacts Authorize","description":"Initiate OAuth for the RingCentral contacts app (separate app with\ncontacts entitlements; independent credential from the call-log app).","operationId":"getRingCentralContactsAuthUrl","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RingCentralAuthorizationUrl"}}}}}}},"/oauth/ringcentral-contacts/callback":{"post":{"tags":["OAuth"],"summary":"Ringcentral Contacts Callback","description":"OAuth callback for the RC contacts app.","operationId":"ringcentralContactsCallback","parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string","title":"Code"}},{"name":"state","in":"query","required":true,"schema":{"type":"string","title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RingCentralStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/ringcentral-contacts/status":{"get":{"tags":["OAuth"],"summary":"Ringcentral Contacts Status","description":"Connection status of the RC contacts app credential.","operationId":"getRingCentralContactsStatus","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RingCentralStatus"}}}}}}},"/oauth/ringcentral-contacts/disconnect":{"post":{"tags":["OAuth"],"summary":"Ringcentral Contacts Disconnect","description":"Disconnect the RC contacts credential (call-log credential untouched).","operationId":"disconnectRingCentralContacts","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthDisconnectResponse"}}}}}}},"/oauth/ringcentral/sync":{"post":{"tags":["OAuth"],"summary":"Ringcentral Sync","description":"Manually trigger a sync of RingCentral call logs.\nThis will fetch today's outbound calls with recordings and process them.","operationId":"syncRingCentralCalls","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RingCentralSyncResponse"}}}}}}},"/oauth/ringcentral/call-logs":{"get":{"tags":["OAuth"],"summary":"Ringcentral Call Logs","description":"Get all call logs from RingCentral (with and without recordings).\nThis is a debug endpoint to help diagnose issues with call log fetching.","operationId":"getRingCentralCallLogs","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RingCentralCallLogsResponse"}}}}}}},"/smartadvocate/connect":{"post":{"tags":["SmartAdvocate"],"summary":"Connect Smartadvocate","description":"Connect SmartAdvocate integration for the current customer.\n\nValidates the credentials by attempting to authenticate with SmartAdvocate.\nIf successful, saves the credentials and bearer token.","operationId":"connectSmartAdvocate","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartAdvocateConnectRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartAdvocateStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/smartadvocate/status":{"get":{"tags":["SmartAdvocate"],"summary":"Get Smartadvocate Status","description":"Check if SmartAdvocate integration is connected for the current customer","operationId":"getSmartAdvocateStatus","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartAdvocateStatus"}}}}}}},"/smartadvocate/settings":{"get":{"tags":["SmartAdvocate"],"summary":"Get Smartadvocate Settings","description":"Get customer-scoped SmartAdvocate sync settings (developer only).\n\nReturns defaults (everything synced) if the customer has no settings row.","operationId":"getSmartAdvocateSettings","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartAdvocateSettingsResponse"}}}}}},"patch":{"tags":["SmartAdvocate"],"summary":"Update Smartadvocate Settings","description":"Update SmartAdvocate sync settings (developer only). Creates the row if missing.","operationId":"updateSmartAdvocateSettings","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartAdvocateSettingsUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartAdvocateSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/smartadvocate/appointment-types/enabled":{"get":{"tags":["SmartAdvocate"],"summary":"Get Smartadvocate Appointment Types Enabled","description":"Whether the appointment visibility by type settings are enabled for the customer.\n\nUsed by the frontend to gate the SmartAdvocate settings section.","operationId":"getSmartAdvocateAppointmentTypesEnabled","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartAdvocateAppointmentTypesEnabledResponse"}}}}}}},"/smartadvocate/appointment-types":{"get":{"tags":["SmartAdvocate"],"summary":"List Smartadvocate Appointment Types","description":"List the customer's appointment type visibility rules, ordered by name.","operationId":"listSmartAdvocateAppointmentTypes","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartAdvocateAppointmentTypesResponse"}}}}}},"post":{"tags":["SmartAdvocate"],"summary":"Create Smartadvocate Appointment Type","description":"Create an appointment type visibility rule for the customer.","operationId":"createSmartAdvocateAppointmentType","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartAdvocateAppointmentTypeCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartAdvocateAppointmentTypeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/smartadvocate/appointment-types/{appointment_type_id}":{"put":{"tags":["SmartAdvocate"],"summary":"Update Smartadvocate Appointment Type","description":"Update an appointment type visibility rule. Omitted fields are unchanged.","operationId":"updateSmartAdvocateAppointmentType","parameters":[{"name":"appointment_type_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Appointment Type Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartAdvocateAppointmentTypeUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartAdvocateAppointmentTypeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["SmartAdvocate"],"summary":"Delete Smartadvocate Appointment Type","description":"Delete an appointment type visibility rule.","operationId":"deleteSmartAdvocateAppointmentType","parameters":[{"name":"appointment_type_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Appointment Type Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/smartadvocate/case-status-routing/enabled":{"get":{"tags":["SmartAdvocate"],"summary":"Get Smartadvocate Case Status Routing Enabled","description":"Whether case status routing settings are enabled for the customer.\n\nUsed by the frontend to gate the SmartAdvocate settings section.","operationId":"getSmartAdvocateCaseStatusRoutingEnabled","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartAdvocateCaseStatusRoutingEnabledResponse"}}}}}}},"/smartadvocate/case-status-routing/config":{"get":{"tags":["SmartAdvocate"],"summary":"Get Smartadvocate Case Status Routing Config","description":"Get the customer's case status routing configuration (default destination).","operationId":"getSmartAdvocateCaseStatusRoutingConfig","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartAdvocateCaseStatusRoutingConfigResponse"}}}}}},"put":{"tags":["SmartAdvocate"],"summary":"Update Smartadvocate Case Status Routing Config","description":"Set or clear the default transfer destination for case status routing.","operationId":"updateSmartAdvocateCaseStatusRoutingConfig","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartAdvocateCaseStatusRoutingConfigUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartAdvocateCaseStatusRoutingConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/smartadvocate/case-status-routing/status-options":{"get":{"tags":["SmartAdvocate"],"summary":"List Smartadvocate Case Status Options","description":"Distinct case statuses observed in the customer's synced cases.\n\nFeeds the settings UI dropdowns so rules can only target statuses that\nactually exist in the firm's data. Returns both primary case statuses\n(status_type_name = null) and second statuses (status_type_name set).","operationId":"listSmartAdvocateCaseStatusOptions","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartAdvocateCaseStatusOptionsResponse"}}}}}}},"/smartadvocate/case-status-routing/staff-options":{"get":{"tags":["SmartAdvocate"],"summary":"List Smartadvocate Case Staff Options","description":"Distinct staff members holding a role across the customer's synced cases.\n\nFeeds the staff destination mapping dropdown (defaults to Negotiator).","operationId":"listSmartAdvocateCaseStaffOptions","parameters":[{"name":"role","in":"query","required":false,"schema":{"type":"string","default":"Negotiator","title":"Role"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartAdvocateStaffOptionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/smartadvocate/case-status-rules":{"get":{"tags":["SmartAdvocate"],"summary":"List Smartadvocate Case Status Rules","description":"List the customer's case status routing rules (primary statuses first).","operationId":"listSmartAdvocateCaseStatusRules","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartAdvocateCaseStatusRulesResponse"}}}}}},"post":{"tags":["SmartAdvocate"],"summary":"Create Smartadvocate Case Status Rule","description":"Create a case status routing rule for the customer.","operationId":"createSmartAdvocateCaseStatusRule","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartAdvocateCaseStatusRuleCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartAdvocateCaseStatusRuleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/smartadvocate/case-status-rules/{rule_id}":{"put":{"tags":["SmartAdvocate"],"summary":"Update Smartadvocate Case Status Rule","description":"Update a case status routing rule. Omitted fields are unchanged.","operationId":"updateSmartAdvocateCaseStatusRule","parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rule Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartAdvocateCaseStatusRuleUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartAdvocateCaseStatusRuleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["SmartAdvocate"],"summary":"Delete Smartadvocate Case Status Rule","description":"Delete a case status routing rule.","operationId":"deleteSmartAdvocateCaseStatusRule","parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rule Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/smartadvocate/staff-destinations":{"get":{"tags":["SmartAdvocate"],"summary":"List Smartadvocate Staff Destinations","description":"List the customer's staff destination mappings, ordered by staff name.","operationId":"listSmartAdvocateStaffDestinations","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartAdvocateStaffDestinationsResponse"}}}}}},"post":{"tags":["SmartAdvocate"],"summary":"Create Smartadvocate Staff Destination","description":"Create a staff destination mapping for the customer.","operationId":"createSmartAdvocateStaffDestination","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartAdvocateStaffDestinationCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartAdvocateStaffDestinationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/smartadvocate/staff-destinations/{staff_destination_id}":{"put":{"tags":["SmartAdvocate"],"summary":"Update Smartadvocate Staff Destination","description":"Update a staff destination mapping. Omitted fields are unchanged.","operationId":"updateSmartAdvocateStaffDestination","parameters":[{"name":"staff_destination_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Staff Destination Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartAdvocateStaffDestinationUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartAdvocateStaffDestinationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["SmartAdvocate"],"summary":"Delete Smartadvocate Staff Destination","description":"Delete a staff destination mapping.","operationId":"deleteSmartAdvocateStaffDestination","parameters":[{"name":"staff_destination_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Staff Destination Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/smartadvocate/disconnect":{"post":{"tags":["SmartAdvocate"],"summary":"Disconnect Smartadvocate","description":"Disconnect SmartAdvocate integration","operationId":"disconnectSmartAdvocate","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartAdvocateDisconnectResponse"}}}}}}},"/smartadvocate/users":{"get":{"tags":["SmartAdvocate"],"summary":"Get Smartadvocate Users","description":"Get list of users from SmartAdvocate.\n\nRequires developer access.","operationId":"getSmartAdvocateUsers","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartAdvocateUsersResponse"}}}}}}},"/smartadvocate/cases/search":{"post":{"tags":["SmartAdvocate"],"summary":"Search Smartadvocate Cases","description":"Comprehensive case search for developers.\n\nSearch cases by any combination of:\n- Case number\n- Case name\n- Plaintiff name\n- Defendant name\n\nReturns cases with recent notes for debugging.\nRequires developer access.","operationId":"searchSmartAdvocateCases","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartAdvocateCaseSearchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartAdvocateCaseSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/smartadvocate/notes/{note_id}":{"patch":{"tags":["SmartAdvocate"],"summary":"Update Smartadvocate Note","description":"Update a SmartAdvocate case note.\n\nRequires developer access.","operationId":"updateSmartAdvocateNote","parameters":[{"name":"note_id","in":"path","required":true,"schema":{"type":"integer","title":"Note Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartAdvocateUpdateNoteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartAdvocateUpdateNoteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["SmartAdvocate"],"summary":"Delete Smartadvocate Note","description":"Delete a SmartAdvocate case note.\n\nThis will mark the note as deleted (not remove it entirely).\nRequires developer access.","operationId":"deleteSmartAdvocateNote","parameters":[{"name":"note_id","in":"path","required":true,"schema":{"type":"integer","title":"Note Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartAdvocateDeleteNoteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/smartadvocate/cases/{smartadvocate_case_id}/sync":{"post":{"tags":["SmartAdvocate"],"summary":"Trigger Smartadvocate Case Sync","description":"Trigger re-sync for a specific SmartAdvocate case.\n\nFetches the latest notes for this case from SmartAdvocate and upserts\nthem locally. Requires developer access.","operationId":"triggerSmartAdvocateCaseSync","parameters":[{"name":"smartadvocate_case_id","in":"path","required":true,"schema":{"type":"string","title":"Smartadvocate Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartAdvocateTriggerSyncResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/smartadvocate/intake-draft/by-call/{call_id}":{"get":{"tags":["SmartAdvocate"],"summary":"Get Smartadvocate Intake Draft By Call","description":"Return the SmartAdvocate intake draft extracted from a call's transcript, if any.\n\nReturns the draft whether pending or promoted — the call detail card\nrenders both states. Available to all authenticated users of the customer.","operationId":"getSmartAdvocateIntakeDraftByCall","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartAdvocateIntakeDraftResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/smartadvocate/intake-draft/case-groups":{"get":{"tags":["SmartAdvocate"],"summary":"List Smartadvocate Case Groups","description":"List the firm's SmartAdvocate case groups (for the promote dialog).","operationId":"listSmartAdvocateCaseGroups","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SmartAdvocatePicklistItem"},"type":"array","title":"Response Listsmartadvocatecasegroups"}}}}}}},"/smartadvocate/intake-draft/case-types":{"get":{"tags":["SmartAdvocate"],"summary":"List Smartadvocate Case Types","description":"List the firm's SmartAdvocate case types for a case group (for the promote dialog).","operationId":"listSmartAdvocateCaseTypes","parameters":[{"name":"case_group_id","in":"query","required":true,"schema":{"type":"integer","title":"Case Group Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SmartAdvocatePicklistItem"},"title":"Response Listsmartadvocatecasetypes"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/smartadvocate/intake-draft/{smartadvocate_intake_draft_id}/promote":{"post":{"tags":["SmartAdvocate"],"summary":"Promote Smartadvocate Intake Draft","description":"Promote a draft intake: create the contact and case in SmartAdvocate.\n\nUses the (user-edited) fields from the request. Dedup is re-checked at\npromote time (the draft's snapshot may be stale):\n\n- If the caller's phone matches an existing synced SA contact, only the\n  case is created, attached via PlaintiffContactID.\n- If the matched contact already has a case with the same incident date,\n  the promote is refused (409) unless override_duplicates is set.","operationId":"promoteSmartAdvocateIntakeDraft","parameters":[{"name":"smartadvocate_intake_draft_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Smartadvocate Intake Draft Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartAdvocateIntakeDraftPromoteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartAdvocateIntakeDraftResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/practicepanther/connect":{"post":{"tags":["PracticePanther"],"summary":"Connect Practicepanther","description":"Connect PracticePanther integration for the current customer.\n\nValidates the credentials by attempting to log in to PracticePanther.\nIf successful, saves the credentials.","operationId":"connectPracticePanther","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PracticePantherConnectRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PracticePantherStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/practicepanther/status":{"get":{"tags":["PracticePanther"],"summary":"Get Practicepanther Status","description":"Check if PracticePanther integration is connected for the current customer.","operationId":"getPracticePantherStatus","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PracticePantherStatus"}}}}}}},"/practicepanther/disconnect":{"post":{"tags":["PracticePanther"],"summary":"Disconnect Practicepanther","description":"Disconnect PracticePanther integration.","operationId":"disconnectPracticePanther","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PracticePantherDisconnectResponse"}}}}}}},"/practicepanther/users":{"get":{"tags":["PracticePanther"],"summary":"List Users","description":"List users from PracticePanther for assignment dropdowns. Developer access required.","operationId":"listPracticePantherUsers","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PracticePantherUsersResponse"}}}}}}},"/practicepanther/contacts":{"get":{"tags":["PracticePanther"],"summary":"List Contacts","description":"List contacts from PracticePanther. Developer access required.","operationId":"listPracticePantherContacts","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","default":25,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PracticePantherListContactsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/practicepanther/contacts/create":{"post":{"tags":["PracticePanther"],"summary":"Create Contact","description":"Create a contact in PracticePanther. Developer access required.","operationId":"createPracticePantherContact","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PracticePantherCreateContactRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PracticePantherCreateContactResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/practicepanther/contacts/{account_guid}":{"delete":{"tags":["PracticePanther"],"summary":"Delete Contact","description":"Delete a contact from PracticePanther.\nNote: PracticePanther doesn't have a direct delete-contact API. This is a placeholder.\nDeveloper access required.","operationId":"deletePracticePantherContact","parameters":[{"name":"account_guid","in":"path","required":true,"schema":{"type":"string","title":"Account Guid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PracticePantherDeleteContactResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/practicepanther/matters":{"get":{"tags":["PracticePanther"],"summary":"List Matters","description":"List matters/projects from PracticePanther. Developer access required.","operationId":"listPracticePantherMatters","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","default":25,"title":"Page Size"}},{"name":"status_filter","in":"query","required":false,"schema":{"type":"string","default":"Open","title":"Status Filter"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PracticePantherListMattersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/practicepanther/matters/create":{"post":{"tags":["PracticePanther"],"summary":"Create Matter","description":"Create a matter/project in PracticePanther. Developer access required.","operationId":"createPracticePantherMatter","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PracticePantherCreateMatterRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PracticePantherCreateMatterResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/practicepanther/portal-invite":{"post":{"tags":["PracticePanther"],"summary":"Send Portal Invite","description":"Send a client portal invite to a contact in PracticePanther. Developer access required.","operationId":"sendPracticePantherPortalInvite","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PracticePantherPortalInviteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PracticePantherPortalInviteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/practicepanther/calls":{"get":{"tags":["PracticePanther"],"summary":"List Calls","description":"List call records from PracticePanther. Developer access required.","operationId":"listPracticePantherCalls","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","default":25,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PracticePantherListCallsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/practicepanther/calls/create":{"post":{"tags":["PracticePanther"],"summary":"Create Call","description":"Create a call record in PracticePanther. Developer access required.","operationId":"createPracticePantherCall","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PracticePantherCreateCallRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PracticePantherCreateCallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/filevine/status":{"get":{"tags":["Filevine"],"summary":"Get Filevine Status","description":"Get Filevine connection status for the current customer.","operationId":"getFilevineStatus","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilevineStatus"}}}}}}},"/filevine/draft-contact/by-call/{call_id}":{"get":{"tags":["Filevine"],"summary":"Get Filevine Draft Contact By Call","description":"Return the Filevine contact extracted from a call's transcript, if any.\n\nReturns the contact whether it's still a draft or has been promoted to a real\nFilevine contact — the call detail card renders both states.\n\nAvailable to all authenticated users of the customer so the call detail card renders.","operationId":"getFilevineDraftContactByCall","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilevineDraftContactResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/filevine/draft-contact/{filevine_contact_id}/promote":{"post":{"tags":["Filevine"],"summary":"Promote Filevine Draft Contact","description":"Promote an LLM-drafted Filevine contact to a real Filevine contact.\n\nCreates the contact in Filevine using the (user-edited) fields from the request,\nthen updates the existing draft row in place so the originating call still\nrenders the card — now as a synced, non-draft contact.","operationId":"promoteFilevineDraftContact","parameters":[{"name":"filevine_contact_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Filevine Contact Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilevineDraftContactPromoteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilevineDraftContactResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/filevine/connect":{"post":{"tags":["Filevine"],"summary":"Connect Filevine","description":"Connect Filevine integration (developer only).\n\nValidates credentials by authenticating with Filevine API, then saves them.","operationId":"connectFilevine","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilevineConnectRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilevineStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/filevine/disconnect":{"post":{"tags":["Filevine"],"summary":"Disconnect Filevine","description":"Disconnect Filevine integration (developer only).","operationId":"disconnectFilevine","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilevineDisconnectResponse"}}}}}}},"/filevine/contacts":{"get":{"tags":["Filevine"],"summary":"List Filevine Contacts","description":"List locally synced Filevine contacts (developer only).","operationId":"listFilevineContacts","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":50,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilevineListContactsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/filevine/projects":{"get":{"tags":["Filevine"],"summary":"List Filevine Projects","description":"List locally synced Filevine projects (developer only).","operationId":"listFilevineProjects","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":50,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilevineListProjectsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/filevine/project-types":{"get":{"tags":["Filevine"],"summary":"List Filevine Project Types","description":"List locally synced Filevine project types (developer only).","operationId":"listFilevineProjectTypes","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilevineProjectTypesResponse"}}}}}}},"/filevine/sync":{"post":{"tags":["Filevine"],"summary":"Trigger Filevine Sync","description":"Trigger a manual Filevine data sync (developer only).","operationId":"triggerFilevineSync","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilevineSyncResponse"}}}}}}},"/filevine/audit-log":{"get":{"tags":["Filevine"],"summary":"Get Filevine Audit Log","description":"Get Filevine audit log entries (developer only).","operationId":"getFilevineAuditLog","parameters":[{"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":{"$ref":"#/components/schemas/FilevineAuditLogResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/filevine/contacts/create":{"post":{"tags":["Filevine"],"summary":"Create Filevine Contact","description":"Create a contact in Filevine (developer only).","operationId":"createFilevineContact","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilevineCreateContactRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilevineCreateContactResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/filevine/contacts/{contact_id}":{"patch":{"tags":["Filevine"],"summary":"Update Filevine Contact","description":"Update a contact in Filevine (developer only).","operationId":"updateFilevineContact","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilevineUpdateContactRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilevineUpdateContactResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/filevine/projects/create":{"post":{"tags":["Filevine"],"summary":"Create Filevine Project","description":"Create a project in Filevine (developer only).","operationId":"createFilevineProject","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilevineCreateProjectRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilevineCreateProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/filevine/projects/{project_id}":{"patch":{"tags":["Filevine"],"summary":"Update Filevine Project","description":"Update a project in Filevine (developer only).","operationId":"updateFilevineProject","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"integer","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilevineUpdateProjectRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilevineUpdateProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/filevine/notes/create":{"post":{"tags":["Filevine"],"summary":"Create Filevine Note","description":"Create a note on a Filevine project (developer only).","operationId":"createFilevineNote","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilevineCreateNoteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilevineCreateNoteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/croo/connect":{"post":{"tags":["Croo"],"summary":"Connect Croo","description":"Validate credentials by logging into the Croo portal, then persist\nthe credential + a SettingsCroo row populated with the resolved\ndomain/user-extension.","operationId":"connectCroo","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrooConnectRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrooStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/croo/status":{"get":{"tags":["Croo"],"summary":"Get Croo Status","operationId":"getCrooStatus","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrooStatus"}}}}}}},"/croo/disconnect":{"post":{"tags":["Croo"],"summary":"Disconnect Croo","operationId":"disconnectCroo","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrooDisconnectResponse"}}}}}}},"/croo/sync":{"post":{"tags":["Croo"],"summary":"Trigger Croo Sync","description":"Enqueue a one-off Croo sync for the current customer.","operationId":"syncCroo","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrooSyncResponse"}}}}}}},"/croo/audit-log":{"get":{"tags":["Croo"],"summary":"Get Croo Audit Log","description":"Recent Croo integration activity for the developer panel.","operationId":"getCrooAuditLog","parameters":[{"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":{"$ref":"#/components/schemas/CrooAuditLogResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/croo/extensions":{"get":{"tags":["Croo"],"summary":"Get Croo Extensions","description":"The user extensions currently configured to graduate from Croo.","operationId":"getCrooExtensions","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrooExtensionsSettings"}}}}}},"put":{"tags":["Croo"],"summary":"Update Croo Extensions","description":"Replace the configured extension list. Other filter dimensions are left\nuntouched. Re-evaluates parked calls in the background, same as the dev\nfilter endpoint.","operationId":"updateCrooExtensions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrooExtensionsSettings"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrooExtensionsSettings"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/croo/known-extensions":{"get":{"tags":["Croo"],"summary":"Get Croo Known Extensions","description":"Best-effort extension -> name directory derived from scraped call\nhistory. Used to label configured extensions and to power add-box\nautocomplete. Names are inferred from outbound rows only and may be stale.","operationId":"getCrooKnownExtensions","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrooKnownExtensionsResponse"}}}}}}},"/granola/status":{"get":{"tags":["Granola"],"summary":"Get Granola Status","operationId":"getGranolaStatus","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GranolaStatus"}}}}}}},"/granola/connect":{"post":{"tags":["Granola"],"summary":"Connect Granola","description":"Validate the pasted API key against Granola's API, persist it, and\nkick off an immediate first sync.","operationId":"connectGranola","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GranolaConnectRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GranolaStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/granola/disconnect":{"post":{"tags":["Granola"],"summary":"Disconnect Granola","description":"Delete the stored API key + sync state. Mirrored notes are retained.","operationId":"disconnectGranola","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GranolaDisconnectResponse"}}}}}}},"/granola/sync":{"post":{"tags":["Granola"],"summary":"Trigger Granola Sync","description":"Enqueue a one-off Granola sync for the current customer.","operationId":"syncGranola","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GranolaSyncResponse"}}}}}}},"/integrations/clio/authorize":{"get":{"tags":["Clio"],"summary":"Clio Authorize","description":"Initiate Clio Manage OAuth; returns the authorization URL.","operationId":"getClioAuthUrl","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClioAuthorizationUrl"}}}}}}},"/integrations/clio/callback":{"post":{"tags":["Clio"],"summary":"Clio Callback","description":"Exchange the Clio Manage authorization code and store credentials.","operationId":"clioCallback","parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string","title":"Code"}},{"name":"state","in":"query","required":true,"schema":{"type":"string","title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClioStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/clio/status":{"get":{"tags":["Clio"],"summary":"Clio Status","description":"Check whether Clio Manage is connected for the current customer.","operationId":"getClioStatus","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClioStatus"}}}}}}},"/integrations/clio/disconnect":{"post":{"tags":["Clio"],"summary":"Clio Disconnect","description":"Disconnect Clio Manage (revokes the token with Clio, best effort).","operationId":"disconnectClio","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthDisconnectResponse"}}}}}}},"/integrations/clio-grow/authorize":{"get":{"tags":["Clio"],"summary":"Clio Grow Authorize","description":"Initiate Clio Grow OAuth; returns the authorization URL.","operationId":"getClioGrowAuthUrl","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClioAuthorizationUrl"}}}}}}},"/integrations/clio-grow/callback":{"post":{"tags":["Clio"],"summary":"Clio Grow Callback","description":"Exchange the Clio Grow authorization code and store credentials.","operationId":"clioGrowCallback","parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string","title":"Code"}},{"name":"state","in":"query","required":true,"schema":{"type":"string","title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClioStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/clio-grow/status":{"get":{"tags":["Clio"],"summary":"Clio Grow Status","description":"Check whether Clio Grow is connected for the current customer.","operationId":"getClioGrowStatus","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClioStatus"}}}}}}},"/integrations/clio-grow/disconnect":{"post":{"tags":["Clio"],"summary":"Clio Grow Disconnect","description":"Disconnect Clio Grow (revokes the token with Clio, best effort).","operationId":"disconnectClioGrow","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthDisconnectResponse"}}}}}}},"/integrations/clio-grow/config":{"get":{"tags":["Clio"],"summary":"Get Clio Grow Config","description":"Return the Clio Grow lead-push configuration for this customer.","operationId":"getClioGrowConfig","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClioGrowConfigResponse"}}}}}},"put":{"tags":["Clio"],"summary":"Update Clio Grow Config","description":"Upsert the Clio Grow lead-push configuration for this customer.","operationId":"updateClioGrowConfig","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClioGrowConfigUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClioGrowConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/clio-grow/audit-log":{"get":{"tags":["Clio"],"summary":"Get Clio Grow Audit Log","operationId":"getClioGrowAuditLog","parameters":[{"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":{"$ref":"#/components/schemas/ClioGrowAuditLogResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/clio-grow/pending/{lead_id}":{"get":{"tags":["Clio"],"summary":"Get Clio Grow Pending","description":"Return the most recent `push_pending` audit entry for a lead, if any.","operationId":"getClioGrowPending","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lead Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ClioGrowPendingPushItem"},{"type":"null"}],"title":"Response Getcliogrowpending"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/clio-grow/pending/{lead_id}/approve":{"post":{"tags":["Clio"],"summary":"Approve Clio Grow Push","description":"Approve a queued Clio Grow push and send it now (overrides dry_run).","operationId":"approveClioGrowPush","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lead Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClioGrowApproveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/ghl/authorize":{"get":{"tags":["GoHighLevel"],"summary":"Ghl Authorize","description":"Initiate GoHighLevel OAuth; returns the authorization URL.","operationId":"getGhlAuthUrl","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GhlAuthorizationUrl"}}}}}}},"/integrations/ghl/callback":{"post":{"tags":["GoHighLevel"],"summary":"Ghl Callback","description":"Exchange the GoHighLevel authorization code and store credentials.","operationId":"ghlCallback","parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string","title":"Code"}},{"name":"state","in":"query","required":true,"schema":{"type":"string","title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GhlStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/ghl/status":{"get":{"tags":["GoHighLevel"],"summary":"Ghl Status","description":"Check whether GoHighLevel is connected for the current customer.","operationId":"getGhlStatus","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GhlStatus"}}}}}}},"/integrations/ghl/disconnect":{"post":{"tags":["GoHighLevel"],"summary":"Ghl Disconnect","description":"Disconnect GoHighLevel (deletes our stored credential).","operationId":"disconnectGhl","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthDisconnectResponse"}}}}}}},"/integrations/ghl/config":{"get":{"tags":["GoHighLevel"],"summary":"Get Ghl Config","description":"Return the GoHighLevel configuration for this customer.","operationId":"getGhlConfig","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GhlConfigResponse"}}}}}},"put":{"tags":["GoHighLevel"],"summary":"Update Ghl Config","description":"Upsert the GoHighLevel configuration for this customer.","operationId":"updateGhlConfig","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GhlConfigUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GhlConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/ghl/pipelines":{"get":{"tags":["GoHighLevel"],"summary":"Get Ghl Pipelines","description":"Fetch pipelines (with stages) live from the connected GHL location.","operationId":"getGhlPipelines","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GhlPipelinesResponse"}}}}}}},"/integrations/ghl/fields":{"get":{"tags":["GoHighLevel"],"summary":"Get Ghl Fields","description":"Fetch custom-field metadata live from the connected GHL location.","operationId":"getGhlFields","parameters":[{"name":"model","in":"query","required":false,"schema":{"type":"string","pattern":"^(contact|opportunity|all)$","default":"all","title":"Model"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GhlFieldsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/ghl/mappings":{"get":{"tags":["GoHighLevel"],"summary":"List Ghl Mappings","operationId":"listGhlMappings","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GhlFieldMappingListResponse"}}}}}},"post":{"tags":["GoHighLevel"],"summary":"Create Ghl Mapping","operationId":"createGhlMapping","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GhlFieldMappingCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GhlFieldMappingItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/ghl/mappings/{mapping_id}":{"patch":{"tags":["GoHighLevel"],"summary":"Update Ghl Mapping","operationId":"updateGhlMapping","parameters":[{"name":"mapping_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Mapping Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GhlFieldMappingUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GhlFieldMappingItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["GoHighLevel"],"summary":"Delete Ghl Mapping","operationId":"deleteGhlMapping","parameters":[{"name":"mapping_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Mapping Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/ghl/audit-log":{"get":{"tags":["GoHighLevel"],"summary":"Get Ghl Audit Log","operationId":"getGhlAuditLog","parameters":[{"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":{"$ref":"#/components/schemas/GhlAuditLogResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/ghl/pending/{lead_id}":{"get":{"tags":["GoHighLevel"],"summary":"Get Ghl Pending","description":"Return the most recent `push_pending` audit entry for a lead, if any.","operationId":"getGhlPending","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lead Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/GhlPendingPushItem"},{"type":"null"}],"title":"Response Getghlpending"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/ghl/pending/{lead_id}/approve":{"post":{"tags":["GoHighLevel"],"summary":"Approve Ghl Push","description":"Approve a queued GoHighLevel push and send it now (overrides dry_run).","operationId":"approveGhlPush","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lead Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GhlApproveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/onedrive/authorize":{"get":{"tags":["OneDrive"],"summary":"Onedrive Authorize","description":"Initiate OneDrive OAuth; returns the authorization URL.","operationId":"getOnedriveAuthUrl","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OneDriveAuthorizationUrl"}}}}}}},"/integrations/onedrive/callback":{"post":{"tags":["OneDrive"],"summary":"Onedrive Callback","description":"Exchange the OneDrive authorization code and store credentials.","operationId":"onedriveCallback","parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string","title":"Code"}},{"name":"state","in":"query","required":true,"schema":{"type":"string","title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OneDriveStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/onedrive/status":{"get":{"tags":["OneDrive"],"summary":"Onedrive Status","description":"Check whether OneDrive is connected for the current customer.","operationId":"getOnedriveStatus","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OneDriveStatus"}}}}}}},"/integrations/onedrive/disconnect":{"post":{"tags":["OneDrive"],"summary":"Onedrive Disconnect","description":"Disconnect OneDrive (drops our tokens; Microsoft has no client-side revoke).","operationId":"disconnectOnedrive","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthDisconnectResponse"}}}}}}},"/automations":{"get":{"tags":["Automations"],"summary":"List Automation Runs","operationId":"listAutomationRuns","parameters":[{"name":"review_status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by review status","title":"Review Status"},"description":"Filter by review status"},{"name":"source_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by source type","title":"Source Type"},"description":"Filter by source type"},{"name":"include_contact_sync","in":"query","required":false,"schema":{"type":"boolean","description":"Developer-only: include RingCentral contact-sync runs. These are high-volume operational noise for customers, so they are hidden unless a developer opts in.","default":false,"title":"Include Contact Sync"},"description":"Developer-only: include RingCentral contact-sync runs. These are high-volume operational noise for customers, so they are hidden unless a developer opts in."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRunsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/automations/filing-destinations":{"get":{"tags":["Automations"],"summary":"Search Filing Destinations","description":"Destination picker for the review interface: the customer's mirrored\nmatter folders, searched by (normalized) name. Local DB only — no Drive\ntraffic — and exactly the universe the matcher itself uses, so anything\npickable here is a folder review overrides may target.","operationId":"searchFilingDestinations","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Folder name to search for","title":"Q"},"description":"Folder name to search for"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilingDestinationsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/automations/filing-controls":{"get":{"tags":["Automations"],"summary":"Get Filing Controls","description":"The customer's view of per-source auto-filing: which sources are\nactive, which toggles the developer has handed over, and each source's\ncurrent mode. Customer-facing — no developer-only knobs leak here.","operationId":"getFilingControls","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilingControlsResponse"}}}}}},"put":{"tags":["Automations"],"summary":"Update Filing Controls","description":"Flip a source's auto-file mode (the customer-facing inverse of the\ndeveloper's dry-run flag).\n\nEnforced per source, not per request: each toggle requires the developer\nto have both enabled the source and exposed its toggle, so a customer can\nnever reach a knob they weren't handed — including via the raw API.\nDevelopers may flip either regardless of exposure (same knob as the\ndeveloper panel).","operationId":"updateFilingControls","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFilingControlsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilingControlsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/automations/{automation_run_id}":{"get":{"tags":["Automations"],"summary":"Get Automation Run","operationId":"getAutomationRun","parameters":[{"name":"automation_run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Automation Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRunDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/automations/{automation_run_id}/review":{"post":{"tags":["Automations"],"summary":"Review Automation Run","description":"Approve or reject a proposed/needs-review action.\n\nApproving queues live execution of the proposed action (even if the run\nwas a dry run — approval is the explicit human go-ahead). An approval may\ncarry overrides — a different destination folder, a new lead folder to\ncreate, or a different filename — which is also how a needs-matching run\n(no proposal at all) gets filed: the reviewer's answer becomes the\nproposal. Rejecting parks it permanently.","operationId":"reviewAutomationRun","parameters":[{"name":"automation_run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Automation Run Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRunReviewRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRunDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/lead-docket/status":{"get":{"tags":["Lead Docket"],"summary":"Get Lead Docket Status","description":"Return Lead Docket integration state for the tile and dev page.","operationId":"getLeadDocketStatus","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadDocketStatusResponse"}}}}}}},"/lead-docket/config":{"put":{"tags":["Lead Docket"],"summary":"Update Lead Docket Config","description":"Upsert the Lead Docket configuration for this customer.","operationId":"updateLeadDocketConfig","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadDocketConfigUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadDocketStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/lead-docket/mappings":{"get":{"tags":["Lead Docket"],"summary":"List Lead Docket Mappings","operationId":"listLeadDocketMappings","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadDocketFieldMappingListResponse"}}}}}},"post":{"tags":["Lead Docket"],"summary":"Create Lead Docket Mapping","operationId":"createLeadDocketMapping","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadDocketFieldMappingCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadDocketFieldMappingItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/lead-docket/mappings/{mapping_id}":{"patch":{"tags":["Lead Docket"],"summary":"Update Lead Docket Mapping","operationId":"updateLeadDocketMapping","parameters":[{"name":"mapping_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Mapping Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadDocketFieldMappingUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadDocketFieldMappingItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Lead Docket"],"summary":"Delete Lead Docket Mapping","operationId":"deleteLeadDocketMapping","parameters":[{"name":"mapping_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Mapping Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/lead-docket/audit-log":{"get":{"tags":["Lead Docket"],"summary":"Get Lead Docket Audit Log","operationId":"getLeadDocketAuditLog","parameters":[{"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":{"$ref":"#/components/schemas/LeadDocketAuditLogResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/lead-docket/pending/{lead_id}":{"get":{"tags":["Lead Docket"],"summary":"Get Lead Docket Pending","description":"Return the most recent `push_pending` audit entry for a lead, if any.","operationId":"getLeadDocketPending","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lead Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/LeadDocketPendingPushItem"},{"type":"null"}],"title":"Response Getleaddocketpending"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/lead-docket/pending/{lead_id}/approve":{"post":{"tags":["Lead Docket"],"summary":"Approve Lead Docket Push","description":"Approve a queued Lead Docket push and send it now (overrides dry_run).","operationId":"approveLeadDocketPush","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lead Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadDocketApproveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vxt/status":{"get":{"tags":["VXT"],"summary":"Get Vxt Status","description":"Get VXT connection status for the current user's customer.","operationId":"getVXTStatus","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VXTStatus"}}}}}}},"/vxt/connect":{"post":{"tags":["VXT"],"summary":"Connect Vxt","description":"Connect VXT integration by validating + storing the user's refresh token.\n\nCustomer-facing — any admin user in the customer can connect.","operationId":"connectVXT","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VXTConnectRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VXTStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vxt/connect-password":{"post":{"tags":["VXT"],"summary":"Connect Vxt With Password","description":"Connect VXT by signing in with a VXT email/password.\n\nHits Firebase's signInWithPassword (same endpoint the VXT web app uses),\nstores the refresh token on SettingsVXT, and stores the creds themselves\non UserPassCredential so we can silently re-auth if the token dies.","operationId":"connectVXTWithPassword","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VXTConnectPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VXTStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vxt/disconnect":{"post":{"tags":["VXT"],"summary":"Disconnect Vxt","description":"Disconnect VXT integration (any admin user).","operationId":"disconnectVXT","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VXTDisconnectResponse"}}}}}}},"/vxt/rotate-webhook-token":{"post":{"tags":["VXT"],"summary":"Rotate Vxt Webhook Token","description":"Rotate the per-customer webhook bearer token (developer only).\n\nAfter rotation the customer must update VXT's webhook Authorization\nheader, or incoming webhooks will start returning 401.","operationId":"rotateVXTWebhookToken","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VXTRotateWebhookTokenResponse"}}}}}}},"/vxt/test":{"post":{"tags":["VXT"],"summary":"Test Vxt","description":"Re-validate the stored refresh token (useful after a 'disconnected' error).","operationId":"testVXT","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VXTTestResponse"}}}}}}},"/vxt/diagnostics":{"get":{"tags":["VXT"],"summary":"Get Vxt Diagnostics","description":"Developer-only diagnostics for the VXT integration.","operationId":"getVXTDiagnostics","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VXTDiagnosticsResponse"}}}}}}},"/vxt/settings":{"get":{"tags":["VXT"],"summary":"Get Vxt Settings","description":"Get customer-scoped VXT runtime settings (developer only).","operationId":"getVXTSettings","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VXTSettingsResponse"}}}}}},"patch":{"tags":["VXT"],"summary":"Update Vxt Settings","description":"Update VXT runtime settings (developer only).","operationId":"updateVXTSettings","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VXTSettingsUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VXTSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vxt/reingest":{"post":{"tags":["VXT"],"summary":"Reingest Vxt Call","description":"Re-queue a VXT call for ingest (developer only).\n\nIf `vxt_call_id` is provided, rebuild the ingest payload from an existing\nCall row or from the webhook's raw metadata. If `call_log` is provided,\nre-play the exact callLog payload (useful for replaying a historical\nwebhook body captured from logs).","operationId":"reingestVXTCall","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VXTReingestRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VXTReingestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/docusign/status":{"get":{"tags":["DocuSign"],"summary":"Docusign Status","description":"Return DocuSign integration connection status for the current customer.","operationId":"getDocuSignStatus","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocuSignStatus"}}}}}}},"/integrations/docusign/connect":{"post":{"tags":["DocuSign"],"summary":"Docusign Connect","description":"Initiate a DocuSign connection.\n\nTries to mint a JWT Grant access token. If consent has been granted, we\ncache the token and return ``connected: true``. If consent hasn't been\ngranted yet, return the consent URL so the admin can authorize.","operationId":"connectDocuSign","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocuSignConnectResponse"}}}}}}},"/integrations/docusign/callback":{"post":{"tags":["DocuSign"],"summary":"Docusign Callback","description":"OAuth callback endpoint for DocuSign consent (called by frontend).\n\nDocuSign redirects the admin back to the Integrations page, which POSTs\nthe ``code``/``state`` here via XHR (so the auth cookie is sent same-site).\nExchanges the code for a one-shot access token, calls ``/oauth/userinfo``\nto capture the per-customer DocuSign user GUID + account info, and\npersists those to the credential row. After this, JWT Grant token\nminting works for the customer.","operationId":"docuSignCallback","parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string","title":"Code"}},{"name":"state","in":"query","required":true,"schema":{"type":"string","title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocuSignStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/docusign/disconnect":{"post":{"tags":["DocuSign"],"summary":"Docusign Disconnect","description":"Disconnect the DocuSign integration by deleting the cached credential row.","operationId":"disconnectDocuSign","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthDisconnectResponse"}}}}}}},"/zapier/oauth/authorize":{"post":{"tags":["Zapier"],"summary":"Authorize Zapier","description":"Mint an authorization code for the logged-in firm admin and return the\nZapier redirect URL (with code + state appended) for the SPA to navigate\nto. Cookie-authenticated and same-site (called by our own frontend).","operationId":"authorizeZapier","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZapierAuthorizeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZapierAuthorizeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/zapier/oauth/token":{"post":{"tags":["Zapier"],"summary":"Zapier Oauth Token","description":"OAuth2 token endpoint called by Zapier's backend. Supports the\n``authorization_code`` and ``refresh_token`` grants. Public (authenticated\nby client credentials in the form body), so it is exempt from the cookie\nsession.","operationId":"zapierOAuthToken","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_zapierOAuthToken"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZapierTokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/zapier/oauth/me":{"get":{"tags":["Zapier"],"summary":"Zapier Oauth Me","description":"Account identity for Zapier's 'Test Authentication' step. Bearer\nauthenticated with the token we issued.","operationId":"zapierOAuthMe","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZapierMeResponse"}}}}}}},"/zapier/status":{"get":{"tags":["Zapier"],"summary":"Get Zapier Status","description":"Whether this firm has a live Zapier connection (drives the tile badge).","operationId":"getZapierStatus","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__integrations__zapier_schemas__ZapierStatusResponse"}}}}}}},"/zapier/disconnect":{"post":{"tags":["Zapier"],"summary":"Disconnect Zapier","description":"Revoke this firm's Zapier tokens. Zapier's stored connection will stop\nworking until the firm reconnects from Zapier.","operationId":"disconnectZapier","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZapierDisconnectResponse"}}}}}}},"/pdfs/invoice/{customer_id}":{"get":{"tags":["PDFs"],"summary":"Generate Customer Invoice","description":"Generate an invoice PDF for a customer based on their billing contract.\n\nThis endpoint generates an invoice PDF for the specified customer using their\nbilling contract. If contract_id is provided, uses that specific contract;\notherwise uses the most recent active contract.\n\nArgs:\n- customer_id: The customer ID\n- contract_id: Optional specific contract ID to generate invoice for\n- invoice_date: Optional invoice date in ISO format (defaults to current date)\n- due_date: Optional due date in ISO format (defaults to invoice_date + 30 days)\n- hide_due_date: Optional flag to hide due date on invoice (defaults to False)\n\nReturns:\n- PDF file as application/pdf","operationId":"generate_customer_invoice_pdfs_invoice__customer_id__get","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Customer Id"}},{"name":"contract_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Contract Id"}},{"name":"invoice_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice Date"}},{"name":"due_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Due Date"}},{"name":"hide_due_date","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Hide Due Date"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pdfs/invoice/manual":{"post":{"tags":["PDFs"],"summary":"Generate Manual Invoice","description":"Generate an invoice PDF from manually entered data.\n\nDeveloper-only endpoint that allows creating invoices with custom information\nnot tied to any customer or contract in the database.\n\nArgs:\n- invoice_data: Complete invoice data including customer info, line items, etc.\n\nReturns:\n- PDF file as application/pdf","operationId":"generate_manual_invoice_pdfs_invoice_manual_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceData"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pdfs/receipt/{customer_id}":{"post":{"tags":["PDFs"],"summary":"Generate Customer Receipt","description":"Generate a receipt PDF for a customer based on their billing contract.\n\nArgs:\n- customer_id: The customer ID\n- request: Receipt generation request with optional date, tax percentage, and receipt number\n  - date: Date paid (defaults to first of previous month)\n  - tax_percentage: Tax percentage to apply (default 0)\n  - receipt_number: Custom receipt number (auto-generated if not provided)\n\nReturns:\n- PDF file as application/pdf","operationId":"generate_customer_receipt_pdfs_receipt__customer_id__post","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Customer Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateReceiptRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/profile":{"get":{"tags":["Settings"],"summary":"Get User Settings","description":"Get settings for the customer (firm/organization)","operationId":"getUserProfile","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSettingsResponse"}}}}}},"put":{"tags":["Settings"],"summary":"Update User Settings","description":"Update settings for the customer","operationId":"updateUserProfile","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSettings"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/firm":{"get":{"tags":["Settings"],"summary":"Get Firm Information","description":"Get firm information for the customer","operationId":"getFirmInformation","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FirmInformationResponse"}}}}}},"put":{"tags":["Settings"],"summary":"Update Firm Information","description":"Update firm information for the customer","operationId":"updateFirmInformation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFirmInformationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFirmInformationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/law-firm-info-prompt":{"get":{"tags":["Settings"],"summary":"Get Law Firm Info Prompt","description":"Get law firm info prompt for the customer","operationId":"getLawFirmInfoPrompt","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LawFirmInfoPromptResponse"}}}}}},"put":{"tags":["Settings"],"summary":"Update Law Firm Info Prompt","description":"Update law firm info prompt for the customer","operationId":"updateLawFirmInfoPrompt","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLawFirmInfoPromptRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLawFirmInfoPromptResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/agent/law-firm-info-prompt":{"get":{"tags":["Settings"],"summary":"Get Law Firm Info Prompt Agent","description":"Get law firm info prompt for the customer associated with the agent token.\n\nThis endpoint is designed for internal services (voice agents, etc.) that use agent tokens.\nRequires a per-customer agent token for authentication.","operationId":"getLawFirmInfoPromptAgent","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LawFirmInfoPromptResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/settings/phone-numbers":{"get":{"tags":["Settings"],"summary":"Get Phone Numbers","description":"List all phone numbers for the current customer.\n\nReturns phone numbers and their test status for display in settings.","operationId":"getPhoneNumbers","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PhoneNumberInfo"},"type":"array","title":"Response Getphonenumbers"}}}}}}},"/settings/messages":{"get":{"tags":["Settings"],"summary":"Get Message Settings","description":"Get message settings for the customer.\n\nReturns message taking and notification settings.\nNote: messages_enabled is only visible to admin users.","operationId":"getMessageSettings","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageSettingsResponse"}}}}}},"put":{"tags":["Settings"],"summary":"Update Message Settings","description":"Update message settings for the customer.\n\nAll users can update notification settings.\nOnly admin users can update messages_enabled (ignored for non-admin users).","operationId":"updateMessageSettings","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMessageSettingsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/screening-phone":{"get":{"tags":["Settings"],"summary":"Get Screening Phone Number","description":"Get the screening phone number for the customer.\n\nReturns the phone number used for call screening/transfers.\nAvailable to all authenticated users.","operationId":"getScreeningPhoneNumber","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScreeningPhoneNumberResponse"}}}}}},"put":{"tags":["Settings"],"summary":"Update Screening Phone Number","description":"Update the screening phone number for the customer.\n\nSets the phone number used for call screening/transfers.","operationId":"updateScreeningPhoneNumber","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateScreeningPhoneNumberRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScreeningPhoneNumberResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/known-contacts/enabled":{"get":{"tags":["Settings"],"summary":"Get Known Contacts Enabled","description":"Get whether known contacts feature is enabled for the customer.","operationId":"getKnownContactsEnabled","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnownContactsEnabledResponse"}}}}}}},"/settings/known-contacts":{"get":{"tags":["Settings"],"summary":"List Known Contacts","description":"List all known contacts for the customer.","operationId":"listKnownContacts","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/KnownContactResponse"},"type":"array","title":"Response Listknowncontacts"}}}}}},"post":{"tags":["Settings"],"summary":"Create Known Contact","description":"Create a new known contact.\n\nRequires known_contacts_enabled to be true for the customer.\nPhone number must be in E.164 format (e.g., +12025551234).","operationId":"createKnownContact","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnownContactCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnownContactResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/known-contacts/{known_contact_id}":{"put":{"tags":["Settings"],"summary":"Update Known Contact","description":"Update an existing known contact.","operationId":"updateKnownContact","parameters":[{"name":"known_contact_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Known Contact Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnownContactUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnownContactResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Settings"],"summary":"Delete Known Contact","description":"Delete a known contact.","operationId":"deleteKnownContact","parameters":[{"name":"known_contact_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Known Contact Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/agent/known-contacts":{"get":{"tags":["Settings"],"summary":"Get Known Contacts Agent","description":"Get all known contacts for the customer associated with the agent token.\n\nThis endpoint is designed for internal services (voice agents, etc.) that use agent tokens.\nReturns all known contacts if the feature is enabled, or an empty list if disabled.","operationId":"getKnownContactsAgent","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnownContactsListResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/settings/blocked-phone-numbers":{"get":{"tags":["Settings"],"summary":"List Blocked Phone Numbers","description":"List all blocked phone numbers for the customer.","operationId":"listBlockedPhoneNumbers","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/BlockedPhoneNumberResponse"},"type":"array","title":"Response Listblockedphonenumbers"}}}}}},"post":{"tags":["Settings"],"summary":"Create Blocked Phone Number","description":"Create a new blocked phone number.\n\nThe voice agent will not transfer calls from this phone number to staff.\nPhone number must be in E.164 format (e.g., +12025551234).","operationId":"createBlockedPhoneNumber","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlockedPhoneNumberCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlockedPhoneNumberResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/blocked-phone-numbers/{blocked_phone_number_id}":{"put":{"tags":["Settings"],"summary":"Update Blocked Phone Number","description":"Update an existing blocked phone number.","operationId":"updateBlockedPhoneNumber","parameters":[{"name":"blocked_phone_number_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Blocked Phone Number Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlockedPhoneNumberUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlockedPhoneNumberResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Settings"],"summary":"Delete Blocked Phone Number","description":"Delete a blocked phone number.","operationId":"deleteBlockedPhoneNumber","parameters":[{"name":"blocked_phone_number_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Blocked Phone Number Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/transfer-destinations/enabled":{"get":{"tags":["Settings"],"summary":"Get Transfer Destinations Enabled","description":"Get whether the transfer destinations feature is enabled for the customer.","operationId":"getTransferDestinationsEnabled","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferDestinationsEnabledResponse"}}}}}}},"/settings/transfer-destinations":{"get":{"tags":["Settings"],"summary":"List Transfer Destinations","description":"List all transfer destinations for the customer.\n\nRequires transfer_destinations_enabled to be true for the customer.","operationId":"listTransferDestinations","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TransferDestinationResponse"},"type":"array","title":"Response Listtransferdestinations"}}}}}},"post":{"tags":["Settings"],"summary":"Create Transfer Destination","description":"Create a new transfer destination. Developer only.\n\nRequires transfer_destinations_enabled to be true for the customer.\nDestination names must be unique per customer.","operationId":"createTransferDestination","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferDestinationCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferDestinationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/transfer-destinations/{transfer_destination_id}":{"put":{"tags":["Settings"],"summary":"Update Transfer Destination","description":"Update an existing transfer destination. Developer only.","operationId":"updateTransferDestination","parameters":[{"name":"transfer_destination_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Transfer Destination Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferDestinationUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferDestinationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Settings"],"summary":"Delete Transfer Destination","description":"Delete a transfer destination. Developer only.","operationId":"deleteTransferDestination","parameters":[{"name":"transfer_destination_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Transfer Destination Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/calls-page":{"get":{"tags":["Settings"],"summary":"Get Calls Page Settings","description":"Get the calls page settings for the current customer.\n\nReturns the enabled columns and metrics for the calls page.\nIf no settings exist, returns the defaults.","operationId":"getCallsPageSettings","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallsPageSettingsResponse"}}}}}}},"/settings/chats-page":{"get":{"tags":["Settings"],"summary":"Get Chats Page Settings","description":"Get the chats page settings for the current customer.\n\nReturns the enabled columns and metrics for the chats page.\nIf no settings exist, returns the defaults.","operationId":"getChatsPageSettings","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatsPageSettingsResponse"}}}}}}},"/settings/features":{"get":{"tags":["Settings"],"summary":"Get Feature Flags","description":"Get the feature flags for the current customer.\n\nReturns which features are enabled for this customer.","operationId":"getFeatureFlags","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureFlagsResponse"}}}}}}},"/settings/call-detail":{"get":{"tags":["Settings"],"summary":"Get Call Detail Settings","description":"Get call detail page settings for the current customer (read-only).","operationId":"getCallDetailSettings","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallDetailSettingsResponse"}}}}}}},"/settings/booking":{"get":{"tags":["Settings"],"summary":"Get Booking Settings","description":"Get booking confirmation settings for the current customer.\n\nReturns booking SMS template settings and whether SMS confirmations are enabled.","operationId":"getBookingSettings","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingSettingsResponse"}}}}}},"put":{"tags":["Settings"],"summary":"Update Booking Settings","description":"Update booking confirmation settings for the current customer.\n\nAllows updating the SMS template for booking confirmations.\nSupports variables: {{staff_member}}, {{staff_phone}}, {{client_name}}, {{booking_date}}, {{booking_time}}, {{case_title}}","operationId":"updateBookingSettings","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBookingSettingsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/booking/preview-sms":{"post":{"tags":["Settings"],"summary":"Preview Booking Sms","description":"Preview a booking SMS template with demo data.\n\nReturns the rendered message with demo data, character count, and SMS segment count.","operationId":"previewBookingSms","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewBookingSmsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewBookingSmsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/inquiries":{"get":{"tags":["Settings"],"summary":"Get Inquiry Settings","description":"Get inquiry notification settings for the customer.\n\nReturns inquiry notification settings including dry run mode and email recipients.\nIf no settings exist, returns defaults (dry_run=True, empty recipients).","operationId":"getInquirySettings","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InquirySettingsResponse"}}}}}},"put":{"tags":["Settings"],"summary":"Update Inquiry Settings","description":"Update inquiry notification settings for the customer.\n\nAllows updating dry run mode and notification email recipients.","operationId":"updateInquirySettings","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateInquirySettingsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InquirySettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/leads":{"get":{"tags":["Settings"],"summary":"Get Lead Settings","description":"Get lead notification settings for the customer.\n\nReturns lead notification settings including dry run mode and email recipients.\nIf no settings exist, returns defaults (dry_run=True, empty recipients).","operationId":"getLeadSettings","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadSettingsResponse"}}}}}},"put":{"tags":["Settings"],"summary":"Update Lead Settings","description":"Update lead notification settings for the customer.\n\nAllows updating dry run mode and notification email recipients.","operationId":"updateLeadSettings","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLeadSettingsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/outbound":{"get":{"tags":["Settings"],"summary":"Get Outbound Settings","description":"Get outbound calling window settings for the customer.\n\nReturns the calling window start/end times in Eastern Time, plus the allowed\nbounds for this customer (wider when the developer-only extended calling\nwindow is on). If no settings exist, returns defaults (12:00-18:00 ET).","operationId":"getOutboundSettings","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutboundSettingsResponse"}}}}}},"put":{"tags":["Settings"],"summary":"Update Outbound Settings","description":"Update outbound calling window settings for the customer.\n\nTimes are in Eastern Time and start must be < end. The allowed bounds depend\non the customer's developer-only extended calling window setting: 12:00-18:00\nET normally, 08:00-20:00 ET when it is enabled.","operationId":"updateOutboundSettings","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOutboundSettingsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutboundSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/business-hours":{"get":{"tags":["Settings"],"summary":"Get Business Hours","description":"Get business hours settings for the customer.\n\nReturns per-day open/close times. If no settings exist, returns defaults\n(Mon-Fri 09:00-17:00 enabled, Sat-Sun disabled).","operationId":"getBusinessHours","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessHoursResponse"}}}}}},"put":{"tags":["Settings"],"summary":"Update Business Hours","description":"Update business hours settings for the customer.\n\nTimes are in HH:MM format. Open time must be before close time for each day.","operationId":"updateBusinessHours","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBusinessHoursRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessHoursResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/system":{"get":{"tags":["Settings"],"summary":"Get System Settings","description":"Get system settings for the customer.\n\nReturns system-level settings like CNAM lookup configuration.","operationId":"getSystemSettings","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemSettingsResponse"}}}}}},"put":{"tags":["Settings"],"summary":"Update System Settings","description":"Update system settings for the customer.\n\nAllows updating system-level settings like CNAM lookup configuration.","operationId":"updateSystemSettings","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSystemSettingsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/chat-widget":{"get":{"tags":["Settings"],"summary":"Get Chat Widget Config","description":"Get chat widget configuration for the current customer.","operationId":"getChatWidgetConfig","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatWidgetConfigResponse"}}}}}},"put":{"tags":["Settings"],"summary":"Update Chat Widget Config","description":"Update chat widget configuration for the current customer.\n\nLegacy singleton endpoint: operates on the customer's default widget\n(creating it on first update). Use /settings/chat-widgets for\nmulti-widget management.","operationId":"updateChatWidgetConfig","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateChatWidgetConfigRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatWidgetConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/chat-widgets":{"get":{"tags":["Settings"],"summary":"List Chat Widgets","description":"List all chat widgets for the current customer, default first.","operationId":"listChatWidgets","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ChatWidgetSummaryResponse"},"type":"array","title":"Response Listchatwidgets"}}}}}},"post":{"tags":["Settings"],"summary":"Create Chat Widget","description":"Create an additional chat widget for the current customer.\n\nNew widgets are never the default; the default is the customer's original\nwidget (created on first legacy update, or promoted via update).","operationId":"createChatWidget","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateChatWidgetRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatWidgetDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/chat-widgets/{chat_widget_id}":{"get":{"tags":["Settings"],"summary":"Get Chat Widget","description":"Get a single chat widget's full configuration.","operationId":"getChatWidget","parameters":[{"name":"chat_widget_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Chat Widget Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatWidgetDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Settings"],"summary":"Update Chat Widget","description":"Update a chat widget's configuration.\n\nPass is_default=true to make this widget the customer's default\n(the previous default is demoted atomically). is_default=false is\nrejected — make another widget the default instead.","operationId":"updateChatWidget","parameters":[{"name":"chat_widget_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Chat Widget Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateChatWidgetRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatWidgetDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Settings"],"summary":"Delete Chat Widget","description":"Delete a chat widget.\n\nThe default widget cannot be deleted — legacy embed snippets resolve to\nit by customer id. Conversations from a deleted widget fall back to the\ndefault widget's configuration.","operationId":"deleteChatWidget","parameters":[{"name":"chat_widget_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Chat Widget Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/practicepanther":{"get":{"tags":["Settings"],"summary":"Get Practicepanther Settings","description":"Get PracticePanther integration settings for the customer.\n\nReturns PracticePanther settings including auto-creation toggles.\nIf no settings exist, returns defaults (all auto-create enabled).","operationId":"getPracticePantherSettings","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PracticePantherSettingsResponse"}}}}}},"put":{"tags":["Settings"],"summary":"Update Practicepanther Settings","description":"Update PracticePanther integration settings for the customer.\n\nAllows updating auto-creation toggles, assigned user, and contact tags.","operationId":"updatePracticePantherSettings","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePracticePantherSettingsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PracticePantherSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/filevine":{"get":{"tags":["Settings"],"summary":"Get Filevine Settings","description":"Get Filevine integration settings for the customer.","operationId":"getFilevineSettings","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilevineSettingsResponse"}}}}}},"put":{"tags":["Settings"],"summary":"Update Filevine Settings","description":"Update Filevine integration settings for the customer.","operationId":"updateFilevineSettings","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFilevineSettingsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilevineSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/branding":{"get":{"tags":["Branding","branding"],"summary":"Get Branding Config","description":"Get branding configuration for the current customer.","operationId":"getBrandingConfig","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandingConfigResponse"}}}}}},"put":{"tags":["Branding","branding"],"summary":"Update Branding Config","description":"Update branding configuration for the current customer.","operationId":"updateBrandingConfig","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBrandingConfigRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandingConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/branding/logo":{"post":{"tags":["Branding","branding"],"summary":"Upload Branding Logo","description":"Upload a logo image for branding. Accepts PNG, JPEG, WebP, or SVG (max 5MB).","operationId":"uploadBrandingLogo","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_uploadBrandingLogo"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandingConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sms/send":{"post":{"tags":["SMS","sms"],"summary":"Send Sms","description":"Send an SMS message via Twilio.\n\nArgs:\n    request: SMS sending request\n    db_session: Database session\n    current_user: Authenticated user\n\nReturns:\n    SMS log record","operationId":"send_sms_sms_send_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendSMSRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSLogResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sms/logs":{"get":{"tags":["SMS","sms"],"summary":"Get Sms Logs","description":"Get SMS logs for the current customer.\n\nArgs:\n    limit: Maximum number of records to return\n    offset: Number of records to skip\n    db_session: Database session\n    current_user: Authenticated user\n\nReturns:\n    List of SMS log records","operationId":"get_sms_logs_sms_logs_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SMSLogResponse"},"title":"Response Get Sms Logs Sms Logs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sms/logs/{sms_id}":{"get":{"tags":["SMS","sms"],"summary":"Get Sms Log","description":"Get a specific SMS log record.\n\nArgs:\n    sms_id: SMS log ID\n    db_session: Database session\n    current_user: Authenticated user\n\nReturns:\n    SMS log record","operationId":"get_sms_log_sms_logs__sms_id__get","parameters":[{"name":"sms_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Sms Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMSLogResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sms/webhook/status":{"post":{"tags":["SMS","sms"],"summary":"Handle Sms Status Callback","description":"Handle Twilio SMS status callback webhook.\n\nThis endpoint receives status updates from Twilio when an SMS message\nstatus changes (e.g., from 'queued' to 'sent' to 'delivered').\n\nTwilio sends form-encoded POST data with the following fields:\n- MessageSid: Twilio's unique message identifier\n- MessageStatus: Current status (queued, sending, sent, delivered, undelivered, failed)\n- To: Recipient phone number\n- From: Sender phone number\n- ErrorCode: Error code if message failed (optional)\n- ErrorMessage: Error message if message failed (optional)\n\nReturns:\n    Empty 200 response to acknowledge receipt","operationId":"handle_sms_status_callback_sms_webhook_status_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/sms/webhook/inbound":{"post":{"tags":["SMS","sms"],"summary":"Handle Inbound Sms","description":"Handle inbound SMS messages from Twilio.\n\nCurrently routes to:\n- Info request opt-in flow: If the sender has a pending_opt_in info request,\n  and the message matches an affirmative reply, transition to pending_submission\n  and send the link SMS.\n\nReturns empty TwiML response to Twilio.","operationId":"handle_inbound_sms_sms_webhook_inbound_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/telephony/call":{"post":{"tags":["Telephony"],"summary":"Handle Twilio Call","description":"Handle inbound calls from Twilio via WebSocket Media Streams.\n\nFlow:\n1. Parse Twilio webhook (To, From, CallSid)\n2. Lookup customer by To number -> sip_number\n3. Get customer's pipecat_agent_id and AgentToken\n4. Check agent availability via router API\n5. If no agent: return hold music TwiML with <Redirect> to re-check\n6. If agent available: return <Connect><Stream> TwiML\n7. Twilio opens WebSocket directly to bot -> bot speaks immediately\n\nOn hold music redirects (attempt > 1), steps 3-4 (call creation, CNAM, status\ncallback) are skipped since they were already done on the first attempt.","operationId":"handle_twilio_call_telephony_call_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/telephony/daily-dialin":{"post":{"tags":["Telephony"],"summary":"Handle Daily Dialin","description":"Handle inbound PSTN calls from Daily.\n\nFlow:\n1. Parse Daily webhook (From, To, callId, callDomain)\n2. Lookup customer by To number (must be provider='daily')\n3. Get customer's pipecat_agent_id and AgentToken\n4. Start Pipecat Cloud session with createDailyRoom=true\n5. Return JSON response\n6. Bot joins Daily room automatically and starts speaking","operationId":"handle_daily_dialin_telephony_daily_dialin_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/telephony/stream-fallback":{"post":{"tags":["Telephony"],"summary":"Stream Fallback","description":"Twilio hits this when the <Connect><Stream> ends (timeout, error, or normal disconnect).\n\nIf the stream ended normally (the bot hung up via SIP), this is a no-op — just hang up.\nIf it ended abnormally (SIP bridge never happened), send voicemail TwiML and fire a\nPagerDuty alert (respecting dry-run and environment settings).","operationId":"stream_fallback_telephony_stream_fallback_post","parameters":[{"name":"call_id","in":"query","required":false,"schema":{"type":"string","title":"Call Id"}},{"name":"customer_id","in":"query","required":false,"schema":{"type":"string","title":"Customer Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/telephony/health":{"get":{"tags":["Telephony"],"summary":"Telephony Health","description":"Health check for telephony webhook.","operationId":"telephony_health_telephony_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/telephony/conference-park":{"post":{"tags":["Telephony"],"summary":"Conference Park","description":"Twilio Voice webhook for the dedicated parking number used during attended\ntransfers. Drops the caller into a conference named ``park-{CallSid}`` with\nhold music until the screener call is bridged or a decline reconnect runs.\n\nPhase 0 (prototype): conference name is derived from the inbound CallSid\nso we don't need DB state. Phase 2 will switch to a session-keyed name so\nthe screener-bridge / decline-reconnect paths can locate the right room.","operationId":"conference_park_telephony_conference_park_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/telephony/conference-hold-music":{"get":{"tags":["Telephony"],"summary":"Conference Hold Music","description":"TwiML returned by Twilio's Conference waitUrl while a caller is on hold.\n\nMatches ``waitMethod=\"GET\"`` set on the ``<Conference>`` in conference_park.\nUses ``hold-music-1.mp3`` to match the on-hold track that\n``ScreeningService`` plays during attended-transfer screening, not the\nshorter ``hold-music.mp3`` used during the bot-availability hold loop.","operationId":"conference_hold_music_telephony_conference_hold_music_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/telephony/inbound-vapi":{"post":{"tags":["Telephony"],"summary":"Inbound Vapi","description":"Phone-call-provider-bypass inbound webhook for Vapi-routed customers\nwhere we want full control of the Twilio CallSid.\n\nUses ``phoneCallProviderBypassEnabled: true`` per Vapi's\n\"custom call control through your telephony provider\" pattern documented\nat docs.vapi.ai/calls/call-handling-with-vapi-and-twilio. Vapi receives\nonly the audio stream and has no Twilio API access to this call, so our\nlater ``calls(sid).update_async`` won't race against Vapi's internal\ncleanup (which would otherwise send <Hangup/> when its WebSocket closes).\n\nTwilio's Voice webhook on the customer's number is pointed at this endpoint\ninstead of api.vapi.ai/twilio/inbound_call. We:\n  1. Look up the customer + squad via resolve_inbound_routing.\n  2. POST to Vapi /call with phoneCallProviderBypassEnabled=true so Vapi\n     creates the call but does NOT touch the Twilio carrier leg.\n  3. Return the <Connect><Stream> TwiML Vapi gives us back to Twilio.\n\nResult: Vapi has no Twilio API access to the call, so calls(sid).update_async\nlater (during attended-transfer parking) can move the caller into a\nconference without Vapi sending its <Hangup/> cleanup.","operationId":"inbound_vapi_telephony_inbound_vapi_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/telephony/conference-callback/{conference_name}":{"post":{"tags":["Telephony"],"summary":"Conference Callback","description":"Twilio Conference statusCallback for attended-transfer parking rooms.\n\nWired in app/vapi/router.py initiate_attended_transfer's park TwiML.\nReceives ``participant-leave`` and ``conference-end`` events. The only\ncase we act on: caller leaves the parking conference BEFORE Marc has\nbeen bridged in. That's a real caller hangup (as opposed to the false-\nalarm Vapi end-of-call event that fires when we yank the leg out of\n<Connect><Stream> at park time). When we detect it, tell Marc the caller\ndisconnected and mark the screening as no_answer.\n\nNo auth (Twilio webhook).","operationId":"conference_callback_telephony_conference_callback__conference_name__post","parameters":[{"name":"conference_name","in":"path","required":true,"schema":{"type":"string","title":"Conference Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/outbound-leads/":{"get":{"tags":["Outbound Leads"],"summary":"List Outbound Leads","description":"List outbound leads for the current user's customer.","operationId":"list_outbound_leads_outbound_leads__get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"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"}],"description":"Search by name, phone, or email","title":"Search"},"description":"Search by name, phone, or email"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status","title":"Status"},"description":"Filter by status"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutboundLeadListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Outbound Leads"],"summary":"Create Outbound Lead","description":"Create a new outbound lead.","operationId":"create_outbound_lead_outbound_leads__post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOutboundLeadRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutboundLeadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/outbound-leads/batch":{"post":{"tags":["Outbound Leads"],"summary":"Batch Create Outbound Leads","description":"Batch create outbound leads from CSV import.","operationId":"batch_create_outbound_leads_outbound_leads_batch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchCreateOutboundLeadsRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchCreateOutboundLeadsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/outbound-leads/check-duplicates":{"post":{"tags":["Outbound Leads"],"summary":"Check Duplicate Phones","description":"Check which phone numbers already exist as outbound leads.","operationId":"check_duplicate_phones_outbound_leads_check_duplicates_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckDuplicatePhonesRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckDuplicatePhonesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/outbound-leads/ids":{"get":{"tags":["Outbound Leads"],"summary":"List Outbound Lead Ids","description":"Return just the IDs of all outbound leads matching the current filters.","operationId":"list_outbound_lead_ids_outbound_leads_ids_get","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by name, phone, or email","title":"Search"},"description":"Search by name, phone, or email"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status","title":"Status"},"description":"Filter by status"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutboundLeadIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/outbound-leads/{outbound_lead_id}":{"get":{"tags":["Outbound Leads"],"summary":"Get Outbound Lead","description":"Get a single outbound lead by ID.","operationId":"get_outbound_lead_outbound_leads__outbound_lead_id__get","parameters":[{"name":"outbound_lead_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Outbound Lead Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutboundLeadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Outbound Leads"],"summary":"Update Outbound Lead","description":"Update an outbound lead.","operationId":"update_outbound_lead_outbound_leads__outbound_lead_id__patch","parameters":[{"name":"outbound_lead_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Outbound Lead Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOutboundLeadRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutboundLeadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Outbound Leads"],"summary":"Delete Outbound Lead","description":"Delete an outbound lead.","operationId":"delete_outbound_lead_outbound_leads__outbound_lead_id__delete","parameters":[{"name":"outbound_lead_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Outbound Lead Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/outbound-leads/batch-delete":{"post":{"tags":["Outbound Leads"],"summary":"Batch Delete Outbound Leads","description":"Batch delete outbound leads by list of IDs.","operationId":"batch_delete_outbound_leads_outbound_leads_batch_delete_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchDeleteRequest"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/outbound-leads/batch-hard-delete":{"post":{"tags":["Outbound Leads"],"summary":"Batch Hard Delete Outbound Leads","description":"Permanently delete outbound leads from the database. Developer-only.","operationId":"batch_hard_delete_outbound_leads_outbound_leads_batch_hard_delete_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchDeleteRequest"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/outbound-leads/{outbound_lead_id}/call":{"post":{"tags":["Outbound Leads"],"summary":"Initiate Outbound Call","description":"Initiate a VAPI outbound call to a lead. Developer-only.","operationId":"initiate_outbound_call_outbound_leads__outbound_lead_id__call_post","parameters":[{"name":"outbound_lead_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Outbound Lead Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitiateOutboundCallRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitiateOutboundCallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queued-outbound-calls/":{"get":{"tags":["Queued Outbound Calls"],"summary":"List Queued Outbound Calls","description":"List queued outbound calls for the current user's customer.","operationId":"list_queued_outbound_calls_queued_outbound_calls__get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status","title":"Status"},"description":"Filter by status"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueuedOutboundCallListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Queued Outbound Calls"],"summary":"Create Queued Outbound Call","description":"Create a single queued outbound call.","operationId":"create_queued_outbound_call_queued_outbound_calls__post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateQueuedOutboundCallRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueuedOutboundCallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queued-outbound-calls/batch":{"post":{"tags":["Queued Outbound Calls"],"summary":"Batch Create Queued Outbound Calls","description":"Batch create queued outbound calls. Skips leads that already have a queued or in_progress call, or whose phone number matches an existing queued/in_progress call.","operationId":"batch_create_queued_outbound_calls_queued_outbound_calls_batch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchCreateQueuedOutboundCallsRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchCreateQueuedOutboundCallsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queued-outbound-calls/{queued_outbound_call_id}/cancel":{"post":{"tags":["Queued Outbound Calls"],"summary":"Cancel Queued Outbound Call","description":"Cancel a queued outbound call (only if currently queued).","operationId":"cancel_queued_outbound_call_queued_outbound_calls__queued_outbound_call_id__cancel_post","parameters":[{"name":"queued_outbound_call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Queued Outbound Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueuedOutboundCallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queued-outbound-calls/{queued_outbound_call_id}/retry":{"post":{"tags":["Queued Outbound Calls"],"summary":"Retry Queued Outbound Call","description":"Retry a failed queued outbound call by creating a new queued call for the same lead.","operationId":"retry_queued_outbound_call_queued_outbound_calls__queued_outbound_call_id__retry_post","parameters":[{"name":"queued_outbound_call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Queued Outbound Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueuedOutboundCallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/outbound-test-calls/phone-numbers":{"get":{"tags":["Outbound Test Calls"],"summary":"List Test Call Phone Numbers","description":"List the customer's outbound-enabled numbers available for a test call.\n\nOmits VAPI/squad IDs -- `ready` is all the client needs to know.","operationId":"list_test_call_phone_numbers_outbound_test_calls_phone_numbers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutboundTestCallPhoneNumbersResponse"}}}}}}},"/outbound-test-calls/":{"post":{"tags":["Outbound Test Calls"],"summary":"Place Outbound Test Call","description":"Place a one-off outbound test call to an arbitrary number.\n\nThe call is flagged `is_test=True` and no outbound lead is created.","operationId":"place_outbound_test_call_outbound_test_calls__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaceOutboundTestCallRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaceOutboundTestCallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/availability-blocks/":{"get":{"tags":["Availability Blocks"],"summary":"List Availability Blocks","description":"List all availability block rules for the current customer, including the customer timezone.","operationId":"list_availability_blocks_availability_blocks__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailabilityBlockListResponse"}}}}}},"post":{"tags":["Availability Blocks"],"summary":"Create Availability Block","description":"Create a new availability block rule for the current customer.","operationId":"create_availability_block_availability_blocks__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAvailabilityBlockRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailabilityBlockResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/availability-blocks/{block_id}":{"patch":{"tags":["Availability Blocks"],"summary":"Update Availability Block","description":"Update an existing availability block rule.","operationId":"update_availability_block_availability_blocks__block_id__patch","parameters":[{"name":"block_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Block Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAvailabilityBlockRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailabilityBlockResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Availability Blocks"],"summary":"Delete Availability Block","description":"Delete an availability block rule.","operationId":"delete_availability_block_availability_blocks__block_id__delete","parameters":[{"name":"block_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Block Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/on-call-schedule/":{"get":{"tags":["On-Call Schedule"],"summary":"Get On Call Schedule","description":"Get the on-call schedule (assignments in range, default user, weekly hours).","operationId":"getOnCallSchedule","parameters":[{"name":"start","in":"query","required":true,"schema":{"type":"string","format":"date","description":"Range start date (inclusive)","title":"Start"},"description":"Range start date (inclusive)"},{"name":"end","in":"query","required":true,"schema":{"type":"string","format":"date","description":"Range end date (inclusive)","title":"End"},"description":"Range end date (inclusive)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnCallScheduleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/on-call-schedule/assignments/{assignment_date}":{"put":{"tags":["On-Call Schedule"],"summary":"Upsert On Call Assignment","description":"Set the on-call user for a date (creates or replaces the assignment).","operationId":"upsertOnCallAssignment","parameters":[{"name":"assignment_date","in":"path","required":true,"schema":{"type":"string","format":"date","title":"Assignment Date"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertOnCallAssignmentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnCallAssignmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["On-Call Schedule"],"summary":"Delete On Call Assignment","description":"Remove the explicit assignment for a date (the default user takes over).","operationId":"deleteOnCallAssignment","parameters":[{"name":"assignment_date","in":"path","required":true,"schema":{"type":"string","format":"date","title":"Assignment Date"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/on-call-schedule/settings":{"patch":{"tags":["On-Call Schedule"],"summary":"Update On Call Schedule Settings","description":"Update the default on-call user. Pass default_user_id: null to clear it.","operationId":"updateOnCallScheduleSettings","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOnCallScheduleSettingsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnCallScheduleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/on-call-schedule/hours":{"put":{"tags":["On-Call Schedule"],"summary":"Update On Call Schedule Hours","description":"Replace the full set of per-weekday on-call windows.\n\nAn empty list means on-call 24/7 (the queue reconciler always runs).\nend_time <= start_time means the window crosses midnight into the next day.","operationId":"updateOnCallScheduleHours","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOnCallScheduleHoursRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/OnCallScheduleHoursResponse"},"type":"array","title":"Response Updateoncallschedulehours"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/netsapiens/connect":{"post":{"tags":["NetSapiens"],"summary":"Connect Netsapiens","description":"Validate credentials against the PBX (token grant + queue read probe)\nand upsert the customer's NetSapiens connection.","operationId":"connectNetSapiens","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetSapiensConnectRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetSapiensStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/netsapiens/status":{"get":{"tags":["NetSapiens"],"summary":"Get Netsapiens Status","description":"Get the NetSapiens connection status (never returns secrets).","operationId":"getNetSapiensStatus","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetSapiensStatus"}}}}}}},"/netsapiens/settings":{"patch":{"tags":["NetSapiens"],"summary":"Update Netsapiens Settings","description":"Update NetSapiens settings. Pass oncall_queue_extension: null to disable reconciliation.","operationId":"updateNetSapiensSettings","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetSapiensSettingsUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetSapiensStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/netsapiens/disconnect":{"delete":{"tags":["NetSapiens"],"summary":"Disconnect Netsapiens","description":"Disconnect NetSapiens (deletes stored credentials and reconcile state).","operationId":"disconnectNetSapiens","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetSapiensDisconnectResponse"}}}}}}},"/saved-filters/":{"get":{"tags":["Saved Filters"],"summary":"List Saved Filters","description":"List all saved filters for the current customer + view_key.","operationId":"list_saved_filters_saved_filters__get","parameters":[{"name":"view_key","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"title":"View Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SavedFilterResponse"},"title":"Response List Saved Filters Saved Filters  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Saved Filters"],"summary":"Create Saved Filter","description":"Create a new saved filter for the current customer.","operationId":"create_saved_filter_saved_filters__post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSavedFilterRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedFilterResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/saved-filters/{saved_filter_id}":{"patch":{"tags":["Saved Filters"],"summary":"Update Saved Filter","description":"Update a saved filter (rename and/or replace filter body).","operationId":"update_saved_filter_saved_filters__saved_filter_id__patch","parameters":[{"name":"saved_filter_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Saved Filter Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSavedFilterRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedFilterResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Saved Filters"],"summary":"Delete Saved Filter","description":"Delete a saved filter.","operationId":"delete_saved_filter_saved_filters__saved_filter_id__delete","parameters":[{"name":"saved_filter_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Saved Filter Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/vapi":{"post":{"tags":["Webhooks"],"summary":"Handle Vapi Webhook","description":"Handle incoming webhook events from Vapi.\n\nVapi sends events to this endpoint for call lifecycle updates.\nKey events handled:\n- status-update (in-progress): Creates a new call record when the call starts\n- end-of-call-report: Updates call with transcript, triggers recording pipeline\n\nAuthentication is via x-vapi-secret header (configured in Vapi dashboard).","operationId":"handle_vapi_webhook_webhooks_vapi_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/webhooks/vxt":{"post":{"tags":["Webhooks"],"summary":"Handle Vxt Webhook","description":"Receive a callLog webhook from VXT.\n\nThe customer is resolved from the `Authorization: Bearer <token>` header.\nReturns 401 if the header is missing or the token doesn't match a\nconnected customer. Otherwise the body is parsed, the call is enqueued\nfor ingest, and 200 is returned fast so VXT doesn't retry.","operationId":"handle_vxt_webhook_webhooks_vxt_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/vapi/get-availability":{"post":{"tags":["Vapi"],"summary":"Get Availability","description":"Get available time slots for a given case and date.\n\nVapi custom tool. Expects arguments: date, case_name, caller_timezone (optional).","operationId":"get_availability_vapi_get_availability_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VapiCustomToolRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VapiCustomToolResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/vapi/book-meeting":{"post":{"tags":["Vapi"],"summary":"Vapi Book Meeting","description":"Book a meeting with a staff group at a specific time slot.\n\nVapi custom tool. The Vapi call ID is extracted from message.call.id.\nExpects arguments: case_name, first_name, last_name, phone_number, time_slot,\ncaller_timezone (optional).","operationId":"vapi_book_meeting_vapi_book_meeting_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VapiCustomToolRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VapiCustomToolResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/vapi/book-meeting-outbound":{"post":{"tags":["Vapi"],"summary":"Vapi Book Meeting Outbound","description":"Book a meeting for an outbound call. Lead info is derived from the Call/OutboundLead records.\n\nVapi custom tool. Expects arguments: time_slot, caller_timezone (optional),\nphone_number (optional override).","operationId":"vapi_book_meeting_outbound_vapi_book_meeting_outbound_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VapiCustomToolRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VapiCustomToolResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/vapi/get-qualification-questions":{"post":{"tags":["Vapi"],"summary":"Get Qualification Questions","description":"Get qualification questions for a given case.\n\nVapi custom tool. Expects arguments: case_name.","operationId":"get_qualification_questions_vapi_get_qualification_questions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VapiCustomToolRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VapiCustomToolResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/vapi/check-qualification-answers":{"post":{"tags":["Vapi"],"summary":"Check Qualification Answers","description":"Evaluate caller's answers against qualification criteria for a case.\n\nVapi custom tool. Expects arguments:\n  - case_name: name of the matched case\n  - answers: array of {question, answer} objects","operationId":"check_qualification_answers_vapi_check_qualification_answers_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VapiCustomToolRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VapiCustomToolResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/vapi/check-qualification-answers-outbound":{"post":{"tags":["Vapi"],"summary":"Check Qualification Answers Outbound","description":"Evaluate caller's answers against qualification criteria for an outbound call.\nCase is derived from the Call/OutboundLead records instead of fuzzy-matching case_name.\n\nVapi custom tool. Expects arguments:\n  - answers: array of {question, answer} objects","operationId":"check_qualification_answers_outbound_vapi_check_qualification_answers_outbound_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VapiCustomToolRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VapiCustomToolResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/vapi/score-lead":{"post":{"tags":["Vapi"],"summary":"Score Lead","description":"Mid-call live lead scoring. Runs the full classification (name, qualification,\ncustom_score_output, etc.) using the realtime transcript, persists a Lead row,\nand returns a developer-selected subset of `custom_score_output` to the agent.\n\nGated by `SettingsFeatures.realtime_lead_scoring_enabled` and requires custom_prompt\nscoring mode with a populated schema. Idempotent: a second invocation for the same\ncall returns the existing Lead's filtered `custom_score_output` without a new LLM call.","operationId":"score_lead_vapi_score_lead_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VapiCustomToolRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VapiCustomToolResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/vapi/get-cases":{"post":{"tags":["Vapi"],"summary":"Get Cases","description":"Get all cases for the current customer.\n\nVapi custom tool. No arguments required.","operationId":"get_cases_vapi_get_cases_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VapiCustomToolRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VapiCustomToolResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/vapi/lookup-client":{"post":{"tags":["Vapi"],"summary":"Lookup Client","description":"Look up an existing client, either by name + date of birth or by a\nserver-injected contact id.\n\nVapi custom tool. Two argument modes:\n  - first_name + last_name + date_of_birth (YYYY-MM-DD): identify by\n    name and DOB against synced SmartAdvocate contacts.\n  - contact_id: the saContactId variable injected at call start from the\n    caller-ID phone match. Verified server-side against the calling\n    number (message.call.customer.number) — an id that doesn't belong to\n    a contact matching the caller's phone returns match=none, so the\n    model cannot look up arbitrary contacts. Use only after the caller\n    confirms the injected name.\n\nReturns one of three shapes:\n  - match=exact: the client's cases and upcoming appointments\n  - match=candidates: contacts sharing the DOB when the name doesn't\n    match exactly, so the agent can retry with a corrected name\n  - match=none: no matching contact","operationId":"lookup_client_vapi_lookup_client_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VapiCustomToolRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VapiCustomToolResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/vapi/lookup-client-for-medical-provider":{"post":{"tags":["Vapi"],"summary":"Lookup Client For Medical Provider","description":"Look up a client on behalf of a calling medical provider.\n\nVapi custom tool. Expects arguments:\n  - first_name: the patient's first name\n  - last_name: the patient's last name\n  - date_of_birth: the patient's date of birth (YYYY-MM-DD, optional)\n  - date_of_loss: the incident date (YYYY-MM-DD, optional)\n\nAt least one of date_of_birth or date_of_loss is required. When both are\ngiven, date of loss is the primary match key (much of the firm's DOB data\nis missing), with DOB corroborating. Returns one of three shapes:\n  - match=exact: name + date of loss matched; the matching case(s) with\n    status, insurance records, and lien records, plus a dob_matched flag\n  - match=candidates: the union of clients sharing the date of birth and\n    clients on a case with that date of loss, so the agent can retry with\n    a corrected name if one was mis-transcribed\n  - match=none: nothing matched either date","operationId":"lookup_client_for_medical_provider_vapi_lookup_client_for_medical_provider_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VapiCustomToolRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VapiCustomToolResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/vapi/lookup-client-for-insurance-adjuster":{"post":{"tags":["Vapi"],"summary":"Lookup Client For Insurance Adjuster","description":"Look up a client on behalf of a calling insurance adjuster.\n\nVapi custom tool. Expects arguments:\n  - first_name: the client's first name\n  - last_name: the client's last name\n  - date_of_birth: the client's date of birth (YYYY-MM-DD, optional)\n  - date_of_loss: the incident date (YYYY-MM-DD, optional)\n\nSame matching pipeline as the medical-provider tool (at least one date\nrequired; date of loss primary when both given, DOB corroborating). On an\nexact match, returns the client's info sheet\nread entirely from the local mirror: demographics (address, phones,\nemail), SSN last-4 (confirm-only — the full SSN is never stored or\nreturned), and per-case facts of loss, injuries, and treating medical\nproviders. Contacts not yet through fullInfo enrichment return\nssn_on_file=null with synced fallbacks.","operationId":"lookup_client_for_insurance_adjuster_vapi_lookup_client_for_insurance_adjuster_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VapiCustomToolRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VapiCustomToolResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/vapi/send-info-request-sms":{"post":{"tags":["Vapi"],"summary":"Send Info Request Sms","description":"Send an SMS to collect additional information from the caller.\n\nTriggers a two-step SMS flow: first a welcome/opt-in message, then a link\nafter the caller replies with confirmation.\n\nVapi custom tool. Expects arguments:\n  - phone_number: caller's phone number (E.164 format)\n  - first_name: caller's first name (optional)\n  - last_name: caller's last name (optional)","operationId":"send_info_request_sms_vapi_send_info_request_sms_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VapiCustomToolRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VapiCustomToolResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/vapi/transfer-call-vxt":{"post":{"tags":["Vapi"],"summary":"Transfer Call Vxt","description":"Transfer a VXT-bridged call to a destination phone number via VXT blind transfer.\n\nThis tool is called by the Vapi AI when it decides to transfer the caller.\nThe backend reads the VXT call context (posted earlier by the bridge) and\ncalls VXT's CPaaS transfer API directly — the bridge stays as a dumb audio pipe.\n\nVapi custom tool. Expects arguments:\n  - destination_number: E.164 phone number to transfer to","operationId":"transfer_call_vxt_vapi_transfer_call_vxt_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VapiCustomToolRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VapiCustomToolResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/vapi/initiate-attended-transfer":{"post":{"tags":["Vapi"],"summary":"Initiate Attended Transfer","description":"Park the inbound caller in a Twilio conference room with hold music, then\nkick off the screener-ask outbound call. Replaces the built-in Vapi\ntransferCall used in Phase 0; eliminates the dial-tone gap because the\ncaller's leg is moved into the conference directly via the live Twilio\nCallSid (no second outbound call to a parking number).\n\nThe screener-accept bridge step joins the same ``conference_name`` we pin\nhere, so accept flow auto-bridges. Decline reconnect (Phase 3) reads the\nsame row and reroutes the caller's leg.\n\nVapi custom tool. Expects arguments:\n  - caller_name: str (required)\n  - call_reason: str (required for unknown callers; optional for known contacts)\n  - special_caller: bool (optional, default False)\n\nKnown-contact status is determined server-side via a strict E.164\nphone-number lookup (see ScreeningService.lookup_known_contact); it is NOT a\ntool argument. Any ``is_known_contact`` arg the agent sends is ignored.","operationId":"initiate_attended_transfer_vapi_initiate_attended_transfer_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VapiCustomToolRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VapiCustomToolResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/vapi/transfer-destination":{"post":{"tags":["Vapi"],"summary":"Transfer Destination Request","description":"Resolve and execute a Vapi dynamic transfer (the routeTransfer tool).\n\nrouteTransfer is a custom `function` tool carrying arguments, so it is\ndispatched as a normal tool-calls message — NOT a transfer-destination-request\nwebhook. (Vapi only fires that webhook for a transferCall tool that supplies\n*no* destination; a tool call carrying arguments is treated as a supplied\ndestination and Vapi would try to dial the argument as a phone number,\ndropping the call. That is the bug this endpoint replaces.)\n\nFlow (Vapi Live Call Control, see\nhttps://docs.vapi.ai/calls/call-dynamic-transfers): resolve the\nTransferDestination from the arguments, then POST the transfer to the call's\nmonitor.controlUrl. We respond with the standard {\"results\": [...]} custom\ntool shape.\n\nTool arguments:\n  - reason (required): a department name (\"Lien Dept\", \"Intake Dept\",\n    \"Settlement Dept\", \"Opening Dept\", \"Prelit Dept\", \"Calendar Dept\",\n    \"Client Services\", \"Office\") maps to the customer's\n    TransferDestination rows by name;\n    \"case\" routes by the case's SmartAdvocate status rules.\n  - case_number (optional): the synced case to route by when\n    reason=\"case\", copied verbatim from lookupClient.\n  - announcement (required in the tool schema, tolerated absent here):\n    the line the model SPEAKS itself, mirrored into the argument for\n    logging. The system never speaks it: dev A/B on 2026-08-31 showed\n    every system-spoken slot doubles — the model narrates alongside the\n    tool call on about half of transfer turns (three prompt phrasings\n    could not stop it), and Vapi occasionally double-played the LCC\n    `content` field even on bare tool calls. Instead the prompt has the\n    model speak the announcement (ending with <flush />) and then call\n    this tool in the same response, and this handler holds the transfer\n    POST until the announcement's TTS actually finishes. The hold is\n    closed-loop, not a blind timer: it arms a TransferAnnouncementGate row\n    and waits for the /webhooks/vapi speech-update events to show the\n    assistant has gone quiet (see _await_announcement_quiet). The tool is\n    sync (async: false), so Vapi blocks the model's next turn during the\n    hold, and the in-flight announcement keeps streaming meanwhile.\n\nBad or missing arguments degrade to the office fallback, never to a failed\ntransfer. Only when no destination exists at all, or the control URL is\nmissing, does this return a tool error (the model then apologizes and keeps\nthe call going).","operationId":"transfer_destination_request_vapi_transfer_destination_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VapiCustomToolRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VapiCustomToolResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/vapi/on-call-transfer-destination":{"post":{"tags":["Vapi"],"summary":"On Call Transfer Destination Request","description":"Resolve the after-hours on-call transfer (dedicated transferCall tool).\n\nSame transfer-destination-request contract as /transfer-destination, but\nsingle-purpose: connect a new-case caller to the on-call person. The tool\ntakes no arguments — there is exactly one destination, the customer's\n\"On Call\" TransferDestination row (for BJL a DID that rings the PBX ONCALL\nqueue, whose membership the NetSapiens reconciler keeps equal to the\nscheduled on-call person).\n\nThe on-call window is re-checked here, not just at call start (the\nprompt's onCallActive variable is frozen when the call begins, and a call\ncan span the window boundary). There is deliberately NO fallback chain: a\nrefused transfer returns {\"error\": ...}, which plays the tool's\nrequest-failed message and lets the prompt recover into the in-house mini\nintake.","operationId":"on_call_transfer_destination_request_vapi_on_call_transfer_destination_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VapiTransferDestinationRequest"}}},"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":[]}]}},"/internal/bridge/call-context":{"post":{"tags":["Internal"],"summary":"Receive Bridge Call Context","description":"Store VXT call context posted by the bridge service.\n\nCalled immediately after the bridge places the outbound Twilio call to Vapi.\nThe twilio_call_sid is the join key — the Vapi webhook will link it to our\nCall record later.","operationId":"receive_bridge_call_context_internal_bridge_call_context_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BridgeCallContextRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/bridge/customers":{"get":{"tags":["Internal"],"summary":"List Bridge Customers","description":"Return all bridge-enabled customers with fresh VXT credentials.\n\nThe bridge polls this endpoint periodically to know which customers to\nserve. Each entry includes a Firebase id_token that the bridge can use\ndirectly on VXT's RTDB — the backend handles refresh via the shared\nensure_fresh_vxt_token helper.","operationId":"list_bridge_customers_internal_bridge_customers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BridgeCustomersResponse"}}}}}}},"/internal/demo-customers":{"post":{"tags":["Internal"],"summary":"Create Demo Customer","description":"Provision a demo customer with widgets enabled and pre-filled configs.\n\nIdempotent on admin_email: if a user with that email already exists, the\nexisting customer is returned with existing=true and nothing is created.","operationId":"create_demo_customer_internal_demo_customers_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDemoCustomerRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDemoCustomerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/info-requests":{"get":{"tags":["Info Requests","Info Requests"],"summary":"List Info Requests","description":"List info requests for the current customer with optional status filter.","operationId":"listInfoRequests","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InfoRequestListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/info-requests/{info_request_id}/messages":{"get":{"tags":["Info Requests","Info Requests"],"summary":"Get Info Request Messages","description":"Get SMS message history for a specific info request.","operationId":"getInfoRequestMessages","parameters":[{"name":"info_request_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Info Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InfoRequestMessageItem"},"title":"Response Getinforequestmessages"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/info-requests/{info_request_id}":{"delete":{"tags":["Info Requests","Info Requests"],"summary":"Delete Info Request","description":"Delete an info request. Used to reset caller state during development.","operationId":"deleteInfoRequest","parameters":[{"name":"info_request_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Info Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/info-requests/send-test":{"post":{"tags":["Info Requests","Info Requests"],"summary":"Send Test Info Request","description":"Send a test info request SMS to an arbitrary phone number. Triggers the full two-step flow.","operationId":"sendTestInfoRequest","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendTestInfoRequestRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendTestInfoRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/chat/conversations/metrics":{"get":{"tags":["Chat"],"summary":"Get Chat Metrics","description":"Get chat metrics (today, this week, total) for the current customer.","operationId":"getChatMetrics","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatMetricsResponse"}}}}}}},"/chat/conversations":{"get":{"tags":["Chat"],"summary":"List Conversations","description":"List chat conversations for the current customer.","operationId":"listConversations","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"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":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"sort_column","in":"query","required":false,"schema":{"type":"string","default":"created_at","title":"Sort Column"}},{"name":"sort_direction","in":"query","required":false,"schema":{"type":"string","default":"desc","title":"Sort Direction"}},{"name":"chat_widget_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter to conversations from this widget. The default widget also matches legacy conversations without a widget id.","title":"Chat Widget Id"},"description":"Filter to conversations from this widget. The default widget also matches legacy conversations without a widget id."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/chat/conversations/{conversation_id}/process-pipeline":{"post":{"tags":["Chat"],"summary":"Trigger Chat Pipeline","description":"Queue the chat processing pipeline (developer only).","operationId":"triggerChatPipeline","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/chat/conversations/{conversation_id}":{"delete":{"tags":["Chat"],"summary":"Delete Conversation","description":"Delete a chat conversation and all associated data (developer only).","operationId":"deleteConversation","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Chat"],"summary":"Get Conversation Detail","description":"Get a single conversation with all messages.","operationId":"getConversationDetail","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/ConversationDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/chat/conversations/{conversation_id}/pipeline":{"get":{"tags":["Chat"],"summary":"Get Chat Pipeline","description":"Get pipeline status for a conversation.","operationId":"getChatPipeline","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/ChatPipelineResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/chat/conversations/{conversation_id}/zapier-status":{"get":{"tags":["Chat"],"summary":"Get Chat Zapier Status","description":"Get Zapier display status for a chat conversation (customer-facing card).","operationId":"getChatZapierStatus","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/app__calls__pipeline__schemas__ZapierStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/chat/conversations/{conversation_id}/ghl-status":{"get":{"tags":["Chat"],"summary":"Get Chat Ghl Card Status","description":"Get GoHighLevel display status for a chat conversation (customer-facing card).","operationId":"getChatGhlCardStatus","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/GhlCardStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/chat/conversations/{conversation_id}/pp-status":{"get":{"tags":["Chat"],"summary":"Get Chat Pp Status","description":"Get PracticePanther display status for a chat conversation.","operationId":"getChatPpStatus","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/PPStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/chat/config/{firm_id}":{"get":{"tags":["Chat Widget"],"summary":"Get Widget Config","description":"Fetch widget configuration for a firm.\n\nCalled on page load so the bubble can render with the correct theme\nbefore the user opens the chat. Lightweight — no conversation created.","operationId":"get_widget_config_chat_config__firm_id__get","parameters":[{"name":"firm_id","in":"path","required":true,"schema":{"type":"string","title":"Firm Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WidgetConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/chat/init":{"post":{"tags":["Chat Widget"],"summary":"Init Conversation","description":"Initialize a new chat conversation.\n\nCalled by the widget when a user first opens it. Returns a session token,\nconversation ID, widget theming config, and the greeting message.","operationId":"init_conversation_chat_init_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatInitRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatInitResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/chat/{conversation_id}/message":{"post":{"tags":["Chat Widget"],"summary":"Send Message","description":"Send a user message and get the AI response.\n\nRequires the session token in the X-Session-Token header.","operationId":"send_message_chat__conversation_id__message_post","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/SendMessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/chat/{conversation_id}/nudge":{"post":{"tags":["Chat Widget"],"summary":"Nudge Conversation","description":"Send an idle nudge message to the conversation.\n\nRate-limited server-side: the nudge is only inserted if enough time\nhas passed since the last assistant message (based on idle_delay_seconds\nconfigured on the widget). Returns nudged=false if rate-limited, no\nidle_message is configured, or conversation is not active.","operationId":"nudge_conversation_chat__conversation_id__nudge_post","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/NudgeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/chat/{conversation_id}/end":{"post":{"tags":["Chat Widget"],"summary":"End Conversation","description":"End a conversation at the visitor's request (Quick Exit).\n\nMarks the conversation completed and triggers the post-processing\npipeline. Idempotent — ending an already-completed conversation\nreturns ended=false.\n\nAuth: X-Session-Token header, or a JSON body {\"session_token\": ...}\nas a fallback for navigator.sendBeacon, which cannot set headers and\nmust send text/plain to avoid a CORS preflight — so the body is\nparsed manually rather than via a Pydantic model.","operationId":"end_conversation_chat__conversation_id__end_post","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/EndConversationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/chat/{conversation_id}/messages":{"get":{"tags":["Chat Widget"],"summary":"Get Messages","description":"Restore conversation messages (e.g., after page refresh).\n\nRequires the session token in the X-Session-Token header.","operationId":"get_messages_chat__conversation_id__messages_get","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/ConversationMessagesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/forms/sessions/metrics":{"get":{"tags":["Forms"],"summary":"Get Form Metrics","description":"Get form metrics (today, this week, total) for the current customer.","operationId":"getFormMetrics","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormMetricsResponse"}}}}}}},"/forms/sessions":{"get":{"tags":["Forms"],"summary":"List Form Sessions","description":"List form sessions for the current customer.","operationId":"listFormSessions","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"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":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"sort_column","in":"query","required":false,"schema":{"type":"string","default":"created_at","title":"Sort Column"}},{"name":"sort_direction","in":"query","required":false,"schema":{"type":"string","default":"desc","title":"Sort Direction"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormSessionListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/forms/sessions/{session_id}/process-pipeline":{"post":{"tags":["Forms"],"summary":"Trigger Form Pipeline","description":"Queue the form processing pipeline (developer only).","operationId":"triggerFormPipeline","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/forms/sessions/{session_id}":{"delete":{"tags":["Forms"],"summary":"Delete Form Session","description":"Delete a form session and all associated data (developer only).","operationId":"deleteFormSession","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Forms"],"summary":"Get Form Session Detail","description":"Get a single form session with all responses.","operationId":"getFormSessionDetail","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormSessionDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/forms/sessions/{session_id}/pipeline":{"get":{"tags":["Forms"],"summary":"Get Form Pipeline","description":"Get pipeline status for a form session.","operationId":"getFormPipeline","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormPipelineResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/forms/settings":{"get":{"tags":["Forms"],"summary":"Get Intake Form Config","description":"Get intake form configuration for the current customer.","operationId":"getIntakeFormConfig","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntakeFormConfigResponse"}}}}}},"put":{"tags":["Forms"],"summary":"Update Intake Form Config","description":"Update intake form configuration for the current customer.","operationId":"updateIntakeFormConfig","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateIntakeFormConfigRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntakeFormConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/forms/config/{firm_id}":{"get":{"tags":["Form Widget"],"summary":"Get Form Widget Config","description":"Fetch form widget configuration for a firm.","operationId":"getFormWidgetConfig","parameters":[{"name":"firm_id","in":"path","required":true,"schema":{"type":"string","title":"Firm Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormWidgetConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/forms/init":{"post":{"tags":["Form Widget"],"summary":"Init Form Session","description":"Initialize a new form session and get the first question.","operationId":"initFormSession","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormInitRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormInitResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/forms/{session_id}/select-language":{"post":{"tags":["Form Widget"],"summary":"Select Form Language","description":"Resolve a visitor-selected language and return the first question in that language.\n\nCalled by the form widget when the language selector is enabled. The widget\npasses either a preset_code (from the configured buttons) or other_text\n(free-form input); backend validates against the supported-language set,\nfalling back to a Haiku language-resolution call if local fuzzy matching fails.","operationId":"selectFormLanguage","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SelectLanguageRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SelectLanguageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/forms/{session_id}/answer":{"post":{"tags":["Form Widget"],"summary":"Submit Answer","description":"Submit an answer and get the next question or completion.","operationId":"submitFormAnswer","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitAnswerRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitAnswerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/forms/{session_id}/responses":{"get":{"tags":["Form Widget"],"summary":"Get Form Responses","description":"Restore form responses after page refresh.","operationId":"getFormResponses","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormResponsesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/info/{shortcode}":{"get":{"tags":["Info Request","info-request"],"summary":"Get Info Request","description":"Get info request status and branding for the public info page.","operationId":"getInfoRequest","parameters":[{"name":"shortcode","in":"path","required":true,"schema":{"type":"string","title":"Shortcode"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InfoRequestPublicResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/info/{shortcode}/submit":{"post":{"tags":["Info Request","info-request"],"summary":"Submit Info Request","description":"Submit collected information for an info request.","operationId":"submitInfoRequest","parameters":[{"name":"shortcode","in":"path","required":true,"schema":{"type":"string","title":"Shortcode"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InfoRequestSubmitRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"summary":"Root","description":"Root endpoint","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health":{"get":{"summary":"Health Check","description":"Health check endpoint for Kubernetes liveness/readiness probes","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"ACHReturnCode":{"type":"string","enum":["R02","R03","R04","R05","R07","R08","R10","R11","R12","R13","R14","R15","R16","R17","R20","R23","R29","R34","R38","R39"],"title":"ACHReturnCode","description":"The return code of an ACH transaction that caused the bank account status to change.\n\n- R02: Account Closed\n- R03: No Account/Unable to Locate Account\n- R04: Invalid Account Number\n- R05: Improper Debit to Consumer Account\n- R07: Authorization Revoked by Customer\n- R08: Payment Stopped\n- R10: Customer Advises Originator is Not Known or Authorized to Receiver\n- R11: Customer Advises Entry Not in Accordance with the Terms of the Authorization\n- R12: Branch Sold to Another DFI\n- R13: RDFI not qualified to participate\n- R14: Representative payee deceased or unable to continue in that capacity\n- R15: Beneficiary or bank account holder\n- R16: Bank account frozen\n- R17: Entry with Invalid Account Number Initiated Under Questionable Circumstances\n- R20: Non-payment bank account\n- R23: Credit entry refused by receiver\n- R29: Corporate customer advises not authorized\n- R34: Limited participation RDFI\n- R38: Stop Payment on Source Document (Adjustment Entry)\n- R39: Improper Source Document"},"ActiveCallCheckResponse":{"properties":{"customer_id":{"type":"string","format":"uuid","title":"Customer Id","description":"The customer ID"},"disable_active_call_check":{"type":"boolean","title":"Disable Active Call Check","description":"Whether active call checking is disabled for screening"}},"type":"object","required":["customer_id","disable_active_call_check"],"title":"ActiveCallCheckResponse","description":"Response with customer's active call check setting"},"Activity":{"properties":{"id":{"type":"integer","title":"Id"},"type":{"type":"string","title":"Type"},"description":{"type":"string","title":"Description"},"timestamp":{"type":"string","title":"Timestamp"}},"type":"object","required":["id","type","description","timestamp"],"title":"Activity","description":"Activity item schema"},"AnswererBreakdownItem":{"properties":{"label":{"type":"string","title":"Label"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["label","count"],"title":"AnswererBreakdownItem","description":"One slice of an answerer's total: the queue they answered in (staff)\nor the team whose call bounced back (AI)."},"AppliedAdjustmentResponse":{"properties":{"billing_adjustment_id":{"type":"string","format":"uuid","title":"Billing Adjustment Id"},"description":{"type":"string","title":"Description"},"adjustment_type":{"$ref":"#/components/schemas/BillingAdjustmentType"},"amount_cents":{"type":"integer","title":"Amount Cents"},"amount_display":{"type":"string","title":"Amount Display"}},"type":"object","required":["billing_adjustment_id","description","adjustment_type","amount_cents","amount_display"],"title":"AppliedAdjustmentResponse"},"ApproveCaseMatchRequest":{"properties":{"edited_note_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Edited Note Text","description":"Edited case note text (if user modified it)"}},"type":"object","title":"ApproveCaseMatchRequest","description":"Request to approve a pending case match (dry-run mode)."},"ApproveCaseMatchResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether approval was successful"},"case_note_posted":{"type":"boolean","title":"Case Note Posted","description":"Whether a case note was posted","default":false},"case_note_external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Case Note External Id","description":"External note ID if posted"},"message":{"type":"string","title":"Message","description":"Status message"}},"type":"object","required":["success","message"],"title":"ApproveCaseMatchResponse","description":"Response from approving a case match."},"AuthSettingsResponse":{"properties":{"password_login_enabled":{"type":"boolean","title":"Password Login Enabled","description":"Whether password-based staff login is enabled"},"require_social_login":{"type":"boolean","title":"Require Social Login","description":"Whether users who have signed in with social (Google/Microsoft) are required to continue using social login"}},"type":"object","required":["password_login_enabled","require_social_login"],"title":"AuthSettingsResponse","description":"Auth settings response model"},"AutomationRunDetail":{"properties":{"automation_run_id":{"type":"string","format":"uuid","title":"Automation Run Id"},"action_type":{"type":"string","title":"Action Type"},"source_type":{"type":"string","title":"Source Type"},"source_id":{"type":"string","format":"uuid","title":"Source Id"},"run_status":{"type":"string","title":"Run Status"},"was_dry_run":{"type":"boolean","title":"Was Dry Run"},"review_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Review Status"},"proposed_folder_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposed Folder Path"},"proposed_filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposed Filename"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"},"reasoning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoning"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"executed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Executed At"},"occurred_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Occurred At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"source_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Label"},"can_approve":{"type":"boolean","title":"Can Approve","default":false},"can_reject":{"type":"boolean","title":"Can Reject","default":false},"review_blocked_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Review Blocked Reason"},"proposed_folder_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposed Folder Id"},"executed_file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Executed File Id"},"trace":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Trace"},"input_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Input Tokens"},"output_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Output Tokens"},"matched_drive_matter_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Matched Drive Matter Id"},"match_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Match Method"},"match_evidence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Match Evidence"},"proposed_payload":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Proposed Payload"}},"type":"object","required":["automation_run_id","action_type","source_type","source_id","run_status","was_dry_run","created_at","updated_at"],"title":"AutomationRunDetail","description":"Run detail: adds the agent trace and IDs for deep links."},"AutomationRunItem":{"properties":{"automation_run_id":{"type":"string","format":"uuid","title":"Automation Run Id"},"action_type":{"type":"string","title":"Action Type"},"source_type":{"type":"string","title":"Source Type"},"source_id":{"type":"string","format":"uuid","title":"Source Id"},"run_status":{"type":"string","title":"Run Status"},"was_dry_run":{"type":"boolean","title":"Was Dry Run"},"review_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Review Status"},"proposed_folder_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposed Folder Path"},"proposed_filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposed Filename"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"},"reasoning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoning"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"executed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Executed At"},"occurred_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Occurred At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"source_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Label"},"can_approve":{"type":"boolean","title":"Can Approve","default":false},"can_reject":{"type":"boolean","title":"Can Reject","default":false},"review_blocked_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Review Blocked Reason"}},"type":"object","required":["automation_run_id","action_type","source_type","source_id","run_status","was_dry_run","created_at","updated_at"],"title":"AutomationRunItem","description":"One automation run in the list view."},"AutomationRunReviewRequest":{"properties":{"decision":{"type":"string","title":"Decision","description":"'approve' or 'reject'"},"folder_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Folder Id"},"create_folder_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Create Folder Name"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"}},"type":"object","required":["decision"],"title":"AutomationRunReviewRequest","description":"Approve or reject a proposed/needs-review action.\n\nAn approval may carry overrides — the reviewer redirecting the filing to\na folder/name of their choosing, or supplying the destination a\nneeds-matching run couldn't determine. Exactly one destination override\nmay be set: an existing folder (folder_id) or a new lead folder to create\n(create_folder_name). Overrides are how a run with no proposal at all\nbecomes executable: the human's answer IS the proposal."},"AutomationRunsResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AutomationRunItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["items","total","page","page_size"],"title":"AutomationRunsResponse"},"AvailabilityBlockListResponse":{"properties":{"blocks":{"items":{"$ref":"#/components/schemas/AvailabilityBlockResponse"},"type":"array","title":"Blocks"},"timezone":{"type":"string","title":"Timezone"}},"type":"object","required":["blocks","timezone"],"title":"AvailabilityBlockListResponse"},"AvailabilityBlockResponse":{"properties":{"availability_block_id":{"type":"string","format":"uuid","title":"Availability Block Id"},"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"name":{"type":"string","title":"Name"},"monday":{"type":"boolean","title":"Monday"},"tuesday":{"type":"boolean","title":"Tuesday"},"wednesday":{"type":"boolean","title":"Wednesday"},"thursday":{"type":"boolean","title":"Thursday"},"friday":{"type":"boolean","title":"Friday"},"saturday":{"type":"boolean","title":"Saturday"},"sunday":{"type":"boolean","title":"Sunday"},"start_time":{"type":"string","format":"time","title":"Start Time"},"end_time":{"type":"string","format":"time","title":"End Time"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"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":["availability_block_id","customer_id","name","monday","tuesday","wednesday","thursday","friday","saturday","sunday","start_time","end_time","created_at"],"title":"AvailabilityBlockResponse"},"AvailabilityResponse":{"properties":{"availability_id":{"type":"string","format":"uuid","title":"Availability Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"day_of_week":{"$ref":"#/components/schemas/DayOfWeek"},"start_time":{"type":"string","format":"time","title":"Start Time"},"end_time":{"type":"string","format":"time","title":"End Time"}},"type":"object","required":["availability_id","user_id","day_of_week","start_time","end_time"],"title":"AvailabilityResponse","description":"Response model for user availability"},"BankAccountException":{"properties":{"description":{"type":"string","title":"Description"},"achReturnCode":{"anyOf":[{"$ref":"#/components/schemas/ACHReturnCode"},{"type":"null"}]},"rtpRejectionCode":{"anyOf":[{"$ref":"#/components/schemas/RTPRejectionCode"},{"type":"null"}]},"fednowRejectionCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fednowrejectioncode"}},"type":"object","required":["description"],"title":"BankAccountException","description":"Reason for, and details related to, an `errored` or `verificationFailed` bank account status."},"BankAccountResponse":{"properties":{"bank_account_id":{"type":"string","format":"uuid","title":"Bank Account Id"},"bank_name":{"type":"string","title":"Bank Name"},"last_four":{"type":"string","title":"Last Four"},"bank_account_type":{"type":"string","title":"Bank Account Type"},"status":{"type":"string","title":"Status"},"fingerprint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fingerprint"}},"type":"object","required":["bank_account_id","bank_name","last_four","bank_account_type","status"],"title":"BankAccountResponse","description":"Response with bank account details."},"BankAccountType":{"type":"string","enum":["checking","savings"],"title":"BankAccountType","description":"Bank account types."},"BankAccountVerification":{"properties":{"verificationMethod":{"$ref":"#/components/schemas/BankAccountVerificationMethod"},"status":{"$ref":"#/components/schemas/BankAccountVerificationStatus"},"exceptionDetails":{"anyOf":[{"$ref":"#/components/schemas/BankAccountException"},{"type":"null"}]}},"type":"object","required":["verificationMethod","status"],"title":"BankAccountVerification"},"BankAccountVerificationMethod":{"type":"string","enum":["instant","ach"],"title":"BankAccountVerificationMethod"},"BankAccountVerificationStatus":{"type":"string","enum":["new","sent-credit","max-attempts-exceeded","failed","expired","successful"],"title":"BankAccountVerificationStatus"},"BankNameResponse":{"properties":{"bank_name":{"type":"string","title":"Bank Name"},"routing_number":{"type":"string","title":"Routing Number"}},"type":"object","required":["bank_name","routing_number"],"title":"BankNameResponse","description":"Response with bank name from routing number."},"BatchCreateOutboundLeadItem":{"properties":{"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"case_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Case Id"}},"type":"object","title":"BatchCreateOutboundLeadItem","description":"Single lead item in a batch create request."},"BatchCreateOutboundLeadsRequest":{"properties":{"leads":{"items":{"$ref":"#/components/schemas/BatchCreateOutboundLeadItem"},"type":"array","maxItems":5000,"title":"Leads"}},"type":"object","required":["leads"],"title":"BatchCreateOutboundLeadsRequest","description":"Request to batch create outbound leads from CSV import."},"BatchCreateOutboundLeadsResponse":{"properties":{"created_count":{"type":"integer","title":"Created Count"},"restored_count":{"type":"integer","title":"Restored Count","default":0},"names_pending":{"type":"integer","title":"Names Pending"},"errors":{"items":{"type":"string"},"type":"array","title":"Errors"}},"type":"object","required":["created_count","names_pending","errors"],"title":"BatchCreateOutboundLeadsResponse","description":"Response from batch creating outbound leads."},"BatchCreateQueuedOutboundCallsRequest":{"properties":{"outbound_lead_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Outbound Lead Ids"}},"type":"object","required":["outbound_lead_ids"],"title":"BatchCreateQueuedOutboundCallsRequest","description":"Request to batch create queued outbound calls."},"BatchCreateQueuedOutboundCallsResponse":{"properties":{"created_count":{"type":"integer","title":"Created Count"},"skipped_duplicate_phone_count":{"type":"integer","title":"Skipped Duplicate Phone Count","default":0},"errors":{"items":{"type":"string"},"type":"array","title":"Errors"}},"type":"object","required":["created_count","errors"],"title":"BatchCreateQueuedOutboundCallsResponse","description":"Response from batch creating queued outbound calls."},"BatchDeleteRequest":{"properties":{"ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Ids","description":"List of outbound lead IDs to delete"}},"type":"object","required":["ids"],"title":"BatchDeleteRequest","description":"Request to batch delete outbound leads."},"BedrockTTFBMeasurementSchema":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"Measurement ID"},"model":{"type":"string","title":"Model","description":"Bedrock model ID"},"region":{"type":"string","title":"Region","description":"AWS region"},"ttfb_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ttfb Ms","description":"Time to first byte in milliseconds"},"total_time_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Time Ms","description":"Total response time in milliseconds"},"response_length":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Response Length","description":"Response text length"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Error message if measurement failed"},"created_at":{"type":"string","title":"Created At","description":"Measurement timestamp"}},"type":"object","required":["id","model","region","created_at"],"title":"BedrockTTFBMeasurementSchema","description":"Single Bedrock TTFB measurement data point"},"BedrockTTFBResponse":{"properties":{"measurements":{"items":{"$ref":"#/components/schemas/BedrockTTFBMeasurementSchema"},"type":"array","title":"Measurements","description":"TTFB measurement data points"}},"type":"object","title":"BedrockTTFBResponse","description":"Response with Bedrock TTFB measurements"},"BillingAdjustmentListResponse":{"properties":{"adjustments":{"items":{"$ref":"#/components/schemas/BillingAdjustmentResponse"},"type":"array","title":"Adjustments"}},"type":"object","required":["adjustments"],"title":"BillingAdjustmentListResponse"},"BillingAdjustmentRecurrence":{"type":"string","enum":["one_off","recurring"],"title":"BillingAdjustmentRecurrence"},"BillingAdjustmentResponse":{"properties":{"billing_adjustment_id":{"type":"string","format":"uuid","title":"Billing Adjustment Id"},"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"description":{"type":"string","title":"Description"},"amount_cents":{"type":"integer","title":"Amount Cents"},"amount_display":{"type":"string","title":"Amount Display"},"adjustment_type":{"$ref":"#/components/schemas/BillingAdjustmentType"},"recurrence":{"$ref":"#/components/schemas/BillingAdjustmentRecurrence"},"effective_date":{"type":"string","format":"date-time","title":"Effective Date"},"expiration_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expiration Date"},"is_consumed":{"type":"boolean","title":"Is Consumed"},"is_active":{"type":"boolean","title":"Is Active"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["billing_adjustment_id","customer_id","description","amount_cents","amount_display","adjustment_type","recurrence","effective_date","is_consumed","is_active","created_at","updated_at"],"title":"BillingAdjustmentResponse"},"BillingAdjustmentType":{"type":"string","enum":["credit","charge"],"title":"BillingAdjustmentType"},"BillingContractItemResponse":{"properties":{"billing_contract_item_id":{"type":"string","format":"uuid","title":"Billing Contract Item Id"},"billing_contract_id":{"type":"string","format":"uuid","title":"Billing Contract Id"},"item_type":{"$ref":"#/components/schemas/BillingContractItemType"},"price":{"type":"string","title":"Price"},"quota":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Quota"},"min_call_duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Call Duration Seconds"},"count_voicemails":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Count Voicemails"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["billing_contract_item_id","billing_contract_id","item_type","price","created_at","updated_at"],"title":"BillingContractItemResponse","description":"Response with billing contract item details."},"BillingContractItemType":{"type":"string","enum":["base_rate","outbound_call_over_quota","monthly_minimum","per_call_rate"],"title":"BillingContractItemType","description":"Billing contract item types."},"BillingContractResponse":{"properties":{"billing_contract_id":{"type":"string","format":"uuid","title":"Billing Contract Id"},"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"start_date":{"type":"string","format":"date-time","title":"Start Date"},"number_of_months":{"type":"integer","title":"Number Of Months"},"items":{"items":{"$ref":"#/components/schemas/BillingContractItemResponse"},"type":"array","title":"Items"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"end_date":{"type":"string","format":"date-time","title":"End Date"},"is_active":{"type":"boolean","title":"Is Active"}},"type":"object","required":["billing_contract_id","customer_id","start_date","number_of_months","items","created_at","updated_at","end_date","is_active"],"title":"BillingContractResponse","description":"Response with billing contract details."},"BillingPreferencesResponse":{"properties":{"set_first_payment_today":{"type":"boolean","title":"Set First Payment Today","description":"Override payment date to today if enabled"}},"type":"object","required":["set_first_payment_today"],"title":"BillingPreferencesResponse","description":"Response with billing preferences."},"BillingRunDetailResponse":{"properties":{"run":{"$ref":"#/components/schemas/BillingRunResponse"},"items":{"items":{"$ref":"#/components/schemas/BillingRunItemResponse"},"type":"array","title":"Items"}},"type":"object","required":["run","items"],"title":"BillingRunDetailResponse"},"BillingRunItemResponse":{"properties":{"billing_run_item_id":{"type":"string","format":"uuid","title":"Billing Run Item Id"},"billing_run_id":{"type":"string","format":"uuid","title":"Billing Run Id"},"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"customer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Name"},"billing_contract_id":{"type":"string","format":"uuid","title":"Billing Contract Id"},"status":{"type":"string","title":"Status"},"period_start":{"type":"string","format":"date-time","title":"Period Start"},"period_end":{"type":"string","format":"date-time","title":"Period End"},"billing_date":{"type":"string","format":"date-time","title":"Billing Date"},"gross_amount_cents":{"type":"integer","title":"Gross Amount Cents"},"gross_amount_display":{"type":"string","title":"Gross Amount Display"},"adjustment_amount_cents":{"type":"integer","title":"Adjustment Amount Cents"},"adjustment_amount_display":{"type":"string","title":"Adjustment Amount Display"},"amount_cents":{"type":"integer","title":"Amount Cents"},"amount_display":{"type":"string","title":"Amount Display"},"call_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Call Count"},"applied_adjustments":{"items":{"$ref":"#/components/schemas/AppliedAdjustmentResponse"},"type":"array","title":"Applied Adjustments","default":[]},"moov_transfer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Moov Transfer Id"},"moov_transfer_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Moov Transfer Status"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["billing_run_item_id","billing_run_id","customer_id","billing_contract_id","status","period_start","period_end","billing_date","gross_amount_cents","gross_amount_display","adjustment_amount_cents","adjustment_amount_display","amount_cents","amount_display","created_at"],"title":"BillingRunItemResponse"},"BillingRunListResponse":{"properties":{"runs":{"items":{"$ref":"#/components/schemas/BillingRunResponse"},"type":"array","title":"Runs"}},"type":"object","required":["runs"],"title":"BillingRunListResponse"},"BillingRunResponse":{"properties":{"billing_run_id":{"type":"string","format":"uuid","title":"Billing Run Id"},"status":{"type":"string","title":"Status"},"is_dry_run":{"type":"boolean","title":"Is Dry Run"},"initiated_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Initiated By"},"total_customers":{"type":"integer","title":"Total Customers"},"total_items":{"type":"integer","title":"Total Items"},"successful_items":{"type":"integer","title":"Successful Items"},"failed_items":{"type":"integer","title":"Failed Items"},"skipped_items":{"type":"integer","title":"Skipped Items"},"total_amount_cents":{"type":"integer","title":"Total Amount Cents"},"total_amount_display":{"type":"string","title":"Total Amount Display"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"celery_task_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Celery Task Id"},"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"}},"type":"object","required":["billing_run_id","status","is_dry_run","total_customers","total_items","successful_items","failed_items","skipped_items","total_amount_cents","total_amount_display","created_at"],"title":"BillingRunResponse"},"BillingStatus":{"type":"string","enum":["NOT_SETUP","ACTIVE","VERIFICATION_PENDING"],"title":"BillingStatus","description":"Billing setup status for a customer."},"BillingStatusResponse":{"properties":{"status":{"$ref":"#/components/schemas/BillingStatus"},"has_bank_accounts":{"type":"boolean","title":"Has Bank Accounts","default":false},"has_card_accounts":{"type":"boolean","title":"Has Card Accounts","default":false},"pending_verification_count":{"type":"integer","title":"Pending Verification Count","default":0}},"type":"object","required":["status"],"title":"BillingStatusResponse","description":"Response for billing status endpoint."},"BlockedPhoneNumberCreateRequest":{"properties":{"phone_number":{"type":"string","title":"Phone Number","description":"Phone number in E.164 format (e.g., +12025551234)"},"name":{"type":"string","title":"Name","description":"Label for the blocked phone number"}},"type":"object","required":["phone_number","name"],"title":"BlockedPhoneNumberCreateRequest","description":"Create blocked phone number request model"},"BlockedPhoneNumberResponse":{"properties":{"blocked_phone_number_id":{"type":"string","format":"uuid","title":"Blocked Phone Number Id"},"phone_number":{"type":"string","title":"Phone Number","description":"Phone number in E.164 format"},"name":{"type":"string","title":"Name","description":"Label for the blocked phone number"}},"type":"object","required":["blocked_phone_number_id","phone_number","name"],"title":"BlockedPhoneNumberResponse","description":"Blocked phone number response model"},"BlockedPhoneNumberUpdateRequest":{"properties":{"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number","description":"Phone number in E.164 format (e.g., +12025551234)"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Label for the blocked phone number"}},"type":"object","title":"BlockedPhoneNumberUpdateRequest","description":"Update blocked phone number request model"},"Body_uploadBrandingLogo":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_uploadBrandingLogo"},"Body_zapierOAuthToken":{"properties":{"grant_type":{"type":"string","title":"Grant Type"},"client_id":{"type":"string","title":"Client Id"},"client_secret":{"type":"string","title":"Client Secret"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"redirect_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect Uri"},"refresh_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Token"}},"type":"object","required":["grant_type","client_id","client_secret"],"title":"Body_zapierOAuthToken"},"BookMeetingRequest":{"properties":{"call_id":{"type":"string","format":"uuid","title":"Call Id"},"case_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Case Id"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"phone_number":{"type":"string","title":"Phone Number"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","deprecated":true},"time_slot":{"type":"string","format":"date-time","title":"Time Slot"},"attendee_timezone":{"type":"string","title":"Attendee Timezone"}},"type":"object","required":["call_id","first_name","last_name","phone_number","time_slot","attendee_timezone"],"title":"BookMeetingRequest","description":"Request model for booking a meeting"},"BookMeetingResponse":{"properties":{"message":{"type":"string","title":"Message"},"staff_group_id":{"type":"string","format":"uuid","title":"Staff Group Id"},"assigned_user_id":{"type":"string","format":"uuid","title":"Assigned User Id"},"assigned_user_name":{"type":"string","title":"Assigned User Name"},"time_slot":{"type":"string","title":"Time Slot"},"meeting_duration_minutes":{"type":"integer","title":"Meeting Duration Minutes"}},"type":"object","required":["message","staff_group_id","assigned_user_id","assigned_user_name","time_slot","meeting_duration_minutes"],"title":"BookMeetingResponse","description":"Response model for booking a meeting"},"BookingSettingsResponse":{"properties":{"booking_confirmation_sms_enabled":{"type":"boolean","title":"Booking Confirmation Sms Enabled","description":"Whether SMS booking confirmations are enabled"},"booking_confirmation_sms_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Booking Confirmation Sms Template","description":"Template for SMS booking confirmations. Supports variables: {{staff_member}}, {{staff_phone}}, {{client_name}}, {{booking_date}}, {{booking_time}}, {{case_title}}"},"booking_notification_email_recipient":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Booking Notification Email Recipient","description":"Email address to send booking notification emails to (e.g., intake@lawfirm.com)"},"max_meetings_per_day":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Meetings Per Day","description":"Maximum number of meetings a single staff member can have per day. Null means no limit."}},"type":"object","required":["booking_confirmation_sms_enabled"],"title":"BookingSettingsResponse","description":"Booking settings response model"},"BotPreferenceResponse":{"properties":{"customer_id":{"type":"string","format":"uuid","title":"Customer Id","description":"The customer ID"},"use_custom_bot":{"type":"boolean","title":"Use Custom Bot","description":"Whether custom bot is enabled"},"custom_bot_available":{"type":"boolean","title":"Custom Bot Available","description":"Whether custom bot is configured and available"}},"type":"object","required":["customer_id","use_custom_bot","custom_bot_available"],"title":"BotPreferenceResponse","description":"Response with customer's bot preference"},"BrandingConfigResponse":{"properties":{"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"accent_color":{"type":"string","title":"Accent Color","default":"#B5683C"},"secondary_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secondary Color"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"},"info_page_title":{"type":"string","title":"Info Page Title","default":"Additional Information"},"info_request_subtitle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Info Request Subtitle"},"info_request_email_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Info Request Email Label"},"info_request_email_placeholder":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Info Request Email Placeholder"},"info_request_sms_welcome_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Info Request Sms Welcome Template"},"info_request_sms_welcome_template_no_first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Info Request Sms Welcome Template No First Name"},"info_request_sms_link_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Info Request Sms Link Template"},"info_request_sms_from_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Info Request Sms From Number"},"info_request_send_during_test_calls":{"type":"boolean","title":"Info Request Send During Test Calls","default":true}},"type":"object","required":["customer_id"],"title":"BrandingConfigResponse","description":"Response schema for branding settings."},"BrandingPublicResponse":{"properties":{"accent_color":{"type":"string","title":"Accent Color","default":"#B5683C"},"secondary_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secondary Color"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"},"info_page_title":{"type":"string","title":"Info Page Title","default":"Additional Information"},"info_request_subtitle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Info Request Subtitle"},"info_request_email_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Info Request Email Label"},"info_request_email_placeholder":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Info Request Email Placeholder"}},"type":"object","title":"BrandingPublicResponse","description":"Public-facing branding info (no sensitive fields)."},"BridgeCallContextRequest":{"properties":{"correlation_id":{"type":"string","title":"Correlation Id"},"twilio_call_sid":{"type":"string","title":"Twilio Call Sid"},"vxt_call_id":{"type":"string","title":"Vxt Call Id"},"vxt_party_id":{"type":"string","title":"Vxt Party Id"},"vxt_instance_host_port":{"type":"string","title":"Vxt Instance Host Port"},"caller_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caller Number"},"org_phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Phone Number"}},"type":"object","required":["correlation_id","twilio_call_sid","vxt_call_id","vxt_party_id","vxt_instance_host_port"],"title":"BridgeCallContextRequest"},"BridgeCallsResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the bridge was successful"},"screening_id":{"type":"string","format":"uuid","title":"Screening Id","description":"The ID of the screening request"},"bridged_at":{"type":"string","format":"date-time","title":"Bridged At","description":"When the calls were bridged"}},"type":"object","required":["success","screening_id","bridged_at"],"title":"BridgeCallsResponse","description":"Response after bridging calls."},"BridgeCustomer":{"properties":{"customer_id":{"type":"string","title":"Customer Id"},"vxt_uid":{"type":"string","title":"Vxt Uid"},"vxt_id_token":{"type":"string","title":"Vxt Id Token"},"vxt_id_token_expires_at":{"type":"string","title":"Vxt Id Token Expires At"},"transfer_via_org_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transfer Via Org Phone"}},"type":"object","required":["customer_id","vxt_uid","vxt_id_token","vxt_id_token_expires_at","transfer_via_org_phone"],"title":"BridgeCustomer"},"BridgeCustomersResponse":{"properties":{"customers":{"items":{"$ref":"#/components/schemas/BridgeCustomer"},"type":"array","title":"Customers"}},"type":"object","required":["customers"],"title":"BridgeCustomersResponse"},"BusinessHoursResponse":{"properties":{"monday_enabled":{"type":"boolean","title":"Monday Enabled"},"monday_open":{"type":"string","title":"Monday Open"},"monday_close":{"type":"string","title":"Monday Close"},"tuesday_enabled":{"type":"boolean","title":"Tuesday Enabled"},"tuesday_open":{"type":"string","title":"Tuesday Open"},"tuesday_close":{"type":"string","title":"Tuesday Close"},"wednesday_enabled":{"type":"boolean","title":"Wednesday Enabled"},"wednesday_open":{"type":"string","title":"Wednesday Open"},"wednesday_close":{"type":"string","title":"Wednesday Close"},"thursday_enabled":{"type":"boolean","title":"Thursday Enabled"},"thursday_open":{"type":"string","title":"Thursday Open"},"thursday_close":{"type":"string","title":"Thursday Close"},"friday_enabled":{"type":"boolean","title":"Friday Enabled"},"friday_open":{"type":"string","title":"Friday Open"},"friday_close":{"type":"string","title":"Friday Close"},"saturday_enabled":{"type":"boolean","title":"Saturday Enabled"},"saturday_open":{"type":"string","title":"Saturday Open"},"saturday_close":{"type":"string","title":"Saturday Close"},"sunday_enabled":{"type":"boolean","title":"Sunday Enabled"},"sunday_open":{"type":"string","title":"Sunday Open"},"sunday_close":{"type":"string","title":"Sunday Close"},"holidays":{"items":{"$ref":"#/components/schemas/Holiday"},"type":"array","title":"Holidays","default":[]}},"type":"object","required":["monday_enabled","monday_open","monday_close","tuesday_enabled","tuesday_open","tuesday_close","wednesday_enabled","wednesday_open","wednesday_close","thursday_enabled","thursday_open","thursday_close","friday_enabled","friday_open","friday_close","saturday_enabled","saturday_open","saturday_close","sunday_enabled","sunday_open","sunday_close"],"title":"BusinessHoursResponse","description":"Business hours settings response model"},"BusyTimeRange":{"properties":{"start":{"type":"string","title":"Start"},"end":{"type":"string","title":"End"}},"type":"object","required":["start","end"],"title":"BusyTimeRange","description":"A single busy time range"},"CalendarProvider":{"type":"string","enum":["google_calendar","zoho","google_calendar_ics","microsoft365_calendar"],"title":"CalendarProvider","description":"Calendar provider types"},"CalendarResponse":{"properties":{"calendar_id":{"type":"string","format":"uuid","title":"Calendar Id"},"name":{"type":"string","title":"Name"},"provider":{"$ref":"#/components/schemas/CalendarProvider"},"ics_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ics Url"},"timezone":{"type":"string","title":"Timezone","default":"America/New_York"},"used_for_availability":{"type":"boolean","title":"Used For Availability","default":false},"is_google_primary":{"type":"boolean","title":"Is Google Primary","default":false}},"type":"object","required":["calendar_id","name","provider"],"title":"CalendarResponse","description":"Response model for calendar"},"CalendarSyncStatsResponse":{"properties":{"customer_id":{"type":"string","format":"uuid","title":"Customer Id","description":"The customer ID"},"total_calendars":{"type":"integer","title":"Total Calendars","description":"Total number of calendars"},"total_events":{"type":"integer","title":"Total Events","description":"Total number of synced events"},"most_recent_sync":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Most Recent Sync","description":"Timestamp of the most recent sync"},"total_users_with_calendars":{"type":"integer","title":"Total Users With Calendars","description":"Number of users with calendars"}},"type":"object","required":["customer_id","total_calendars","total_events","total_users_with_calendars"],"title":"CalendarSyncStatsResponse","description":"Response with calendar sync statistics for a customer"},"CallAnalysisMetric":{"type":"string","enum":["opted_out_of_ai","hung_up_after_intro","asked_for_specific_person"],"title":"CallAnalysisMetric","description":"LLM-decided per-call diagnostic metrics."},"CallAnalysisMetricInfo":{"properties":{"value":{"$ref":"#/components/schemas/CallAnalysisMetric"},"label":{"type":"string","title":"Label"}},"type":"object","required":["value","label"],"title":"CallAnalysisMetricInfo","description":"An available metric with its human-readable label."},"CallAnalysisResultRow":{"properties":{"call_id":{"type":"string","format":"uuid","title":"Call Id"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Time"},"analyzed":{"type":"boolean","title":"Analyzed"},"analyzed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Analyzed At"},"opted_out_of_ai":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Opted Out Of Ai"},"hung_up_after_intro":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Hung Up After Intro"},"asked_for_specific_person":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Asked For Specific Person"}},"type":"object","required":["call_id","start_time","analyzed"],"title":"CallAnalysisResultRow","description":"A recent call joined with its analysis (if any)."},"CallAnalysisResultsResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/CallAnalysisResultRow"},"type":"array","title":"Results"},"un_analyzed_count":{"type":"integer","title":"Un Analyzed Count"}},"type":"object","required":["results","un_analyzed_count"],"title":"CallAnalysisResultsResponse","description":"Paginated recent calls with their analyses, plus the un-analyzed count."},"CallAnalysisSettingsResponse":{"properties":{"enabled_metrics":{"items":{"$ref":"#/components/schemas/CallAnalysisMetric"},"type":"array","title":"Enabled Metrics"},"available_metrics":{"items":{"$ref":"#/components/schemas/CallAnalysisMetricInfo"},"type":"array","title":"Available Metrics"}},"type":"object","required":["enabled_metrics","available_metrics"],"title":"CallAnalysisSettingsResponse","description":"The customer's enabled metrics plus the full list of available metrics."},"CallCaseMatchResponse":{"properties":{"case_match_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Case Match Id"},"call_id":{"type":"string","format":"uuid","title":"Call Id"},"case_matching_pipeline_status":{"type":"string","title":"Case Matching Pipeline Status","default":"not_started"},"matched_case_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matched Case Provider"},"matched_case_local_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Matched Case Local Id"},"matched_smartadvocate_case_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Matched Smartadvocate Case Id"},"matched_filevine_project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Matched Filevine Project Id"},"matched_case_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matched Case Number"},"matched_case_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matched Case Name"},"matched_case_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matched Case Url"},"match_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Match Status"},"match_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Match Method"},"confidence_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confidence Level"},"case_note_posted":{"type":"boolean","title":"Case Note Posted","default":false},"case_note_external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Case Note External Id"},"case_note_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Case Note Text"},"candidate_cases":{"anyOf":[{"items":{"$ref":"#/components/schemas/CandidateCase"},"type":"array"},{"type":"null"}],"title":"Candidate Cases"},"case_matching_debug":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Case Matching Debug"},"was_dry_run":{"type":"boolean","title":"Was Dry Run","default":false},"has_substantive_conversation":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Substantive Conversation"},"lead_exists":{"type":"boolean","title":"Lead Exists","default":false},"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":["call_id"],"title":"CallCaseMatchResponse","description":"Case matching result for a call."},"CallDetailSettingsResponse":{"properties":{"recording_playback_enabled":{"type":"boolean","title":"Recording Playback Enabled","description":"Whether recording playback is enabled for customer admins"},"recording_playback_staff_enabled":{"type":"boolean","title":"Recording Playback Staff Enabled","description":"Whether recording playback is also enabled for staff users"},"show_realtime_transcript":{"type":"boolean","title":"Show Realtime Transcript","description":"Whether the realtime transcript tab is visible to non-developer users"},"show_finalized_transcript":{"type":"boolean","title":"Show Finalized Transcript","description":"Whether the finalized transcript tab is visible to non-developer users"},"show_translated_transcript":{"type":"boolean","title":"Show Translated Transcript","description":"Whether the translated transcript tab is visible to non-developer users"},"transfer_flow_admin_enabled":{"type":"boolean","title":"Transfer Flow Admin Enabled","description":"Whether the transfer flow card is visible to customer admins"},"pbx_transfer_flow_available":{"type":"boolean","title":"Pbx Transfer Flow Available","description":"Whether the customer has a NetSapiens PBX integration, so transfer-flow hop data can exist"}},"type":"object","required":["recording_playback_enabled","recording_playback_staff_enabled","show_realtime_transcript","show_finalized_transcript","show_translated_transcript","transfer_flow_admin_enabled","pbx_transfer_flow_available"],"title":"CallDetailSettingsResponse","description":"Call detail page settings response model"},"CallDocuSignEnvelopeResponse":{"properties":{"docusign_envelope_id":{"type":"string","format":"uuid","title":"Docusign Envelope Id"},"status":{"type":"string","title":"Status"},"form_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Form Name"},"recipient_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipient Email"},"recipient_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipient Name"},"sender_view_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender View Url"},"envelope_id_from_docusign":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Envelope Id From Docusign"},"fields":{"items":{"$ref":"#/components/schemas/DocuSignExtractedFieldValue"},"type":"array","title":"Fields","default":[]},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["docusign_envelope_id","status"],"title":"CallDocuSignEnvelopeResponse","description":"The DocuSign draft envelope generated for an intake call, with the\nextracted values labeled by their form field ``display_name`` for the\nIntake detail page."},"CallError":{"properties":{"severity":{"type":"string","title":"Severity","description":"Error severity: 'warning' or 'error'"},"text":{"type":"string","title":"Text","description":"Error message text"}},"type":"object","required":["severity","text"],"title":"CallError","description":"Individual error from voice agent."},"CallFeedbackCreateRequest":{"properties":{"feedback_type":{"$ref":"#/components/schemas/CallFeedbackType","description":"Type of feedback: general or wrong_transfer_destination","default":"general"},"expected_transfer_destination_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Expected Transfer Destination Id","description":"For wrong_transfer_destination feedback: the destination the call should have been transferred to"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment","description":"Free-form feedback text"}},"type":"object","title":"CallFeedbackCreateRequest","description":"Create call feedback request model."},"CallFeedbackResponse":{"properties":{"feedback_id":{"type":"string","format":"uuid","title":"Feedback Id"},"call_id":{"type":"string","format":"uuid","title":"Call Id"},"feedback_type":{"$ref":"#/components/schemas/CallFeedbackType"},"expected_transfer_destination_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Expected Transfer Destination Id"},"expected_transfer_destination_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expected Transfer Destination Name"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"},"created_by_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By User Id"},"created_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Name","description":"Display name of the user who left the feedback"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["feedback_id","call_id","feedback_type","created_at"],"title":"CallFeedbackResponse","description":"Call feedback response model."},"CallFeedbackType":{"type":"string","enum":["general","wrong_transfer_destination"],"title":"CallFeedbackType"},"CallGoalResponse":{"properties":{"customer_id":{"type":"string","format":"uuid","title":"Customer Id","description":"The customer ID"},"inbound_call_goal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inbound Call Goal","description":"Call goal for inbound calls"},"outbound_call_goal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outbound Call Goal","description":"Call goal for outbound calls"}},"type":"object","required":["customer_id"],"title":"CallGoalResponse","description":"Response with customer's call goals"},"CallLiveTranscriptResponse":{"properties":{"call_id":{"type":"string","format":"uuid","title":"Call Id"},"call_status":{"type":"string","title":"Call Status"},"realtime_transcripts_enabled":{"type":"boolean","title":"Realtime Transcripts Enabled"},"events":{"items":{"$ref":"#/components/schemas/LiveTranscriptEventResponse"},"type":"array","title":"Events"}},"type":"object","required":["call_id","call_status","realtime_transcripts_enabled","events"],"title":"CallLiveTranscriptResponse","description":"Live transcript events for an in-progress call (developer-only polling)."},"CallPipelineResponse":{"properties":{"pipeline_id":{"type":"string","format":"uuid","title":"Pipeline Id","description":"The pipeline record ID"},"call_id":{"type":"string","format":"uuid","title":"Call Id","description":"The call ID this pipeline is for"},"recording_download_status":{"type":"string","title":"Recording Download Status","description":"Status of recording download step"},"transcription_status":{"type":"string","title":"Transcription Status","description":"Status of transcription step"},"grading_status":{"type":"string","title":"Grading Status","description":"Status of grading step"},"case_matching_status":{"type":"string","title":"Case Matching Status","description":"Status of case matching step"},"summarization_status":{"type":"string","title":"Summarization Status","description":"Status of summarization step"},"notifications_status":{"type":"string","title":"Notifications Status","description":"Status of notifications step"},"lead_classification_status":{"type":"string","title":"Lead Classification Status","description":"Status of lead classification step"},"cnam_lookup_status":{"type":"string","title":"Cnam Lookup Status","description":"Status of CNAM lookup step","default":"not_started"},"inquiry_classification_status":{"type":"string","title":"Inquiry Classification Status","description":"Status of inquiry classification step","default":"not_started"},"zoho_lead_creation_status":{"type":"string","title":"Zoho Lead Creation Status","description":"Status of Zoho lead creation step","default":"not_started"},"call_classification_status":{"type":"string","title":"Call Classification Status","description":"Status of unified call classification step","default":"not_started"},"pp_contact_creation_status":{"type":"string","title":"Pp Contact Creation Status","description":"Status of PP contact creation step","default":"not_started"},"pp_matter_creation_status":{"type":"string","title":"Pp Matter Creation Status","description":"Status of PP matter creation step","default":"not_started"},"pp_portal_creation_status":{"type":"string","title":"Pp Portal Creation Status","description":"Status of PP portal creation step","default":"not_started"},"pp_call_creation_status":{"type":"string","title":"Pp Call Creation Status","description":"Status of PP call creation step","default":"not_started"},"filevine_draft_contact_status":{"type":"string","title":"Filevine Draft Contact Status","description":"Status of the draft Filevine contact extraction step","default":"not_started"},"smartadvocate_intake_draft_status":{"type":"string","title":"Smartadvocate Intake Draft Status","description":"Status of the draft SmartAdvocate intake extraction step","default":"not_started"},"vxt_reconciliation_status":{"type":"string","title":"Vxt Reconciliation Status","description":"Status of the VXT transfer-leg reconciliation gate (Vapi→VXT transferred calls only)","default":"not_started"},"recording_download_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recording Download Error","description":"Error message for recording download"},"transcription_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transcription Error","description":"Error message for transcription"},"grading_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grading Error","description":"Error message for grading"},"case_matching_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Case Matching Error","description":"Error message for case matching"},"summarization_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summarization Error","description":"Error message for summarization"},"notifications_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notifications Error","description":"Error message for notifications"},"lead_classification_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lead Classification Error","description":"Error message for lead classification"},"cnam_lookup_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cnam Lookup Error","description":"Error message for CNAM lookup"},"inquiry_classification_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inquiry Classification Error","description":"Error message for inquiry classification"},"zoho_lead_creation_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zoho Lead Creation Error","description":"Error message for Zoho lead creation"},"call_classification_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call Classification Error","description":"Error message for unified call classification"},"pp_contact_creation_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pp Contact Creation Error","description":"Error message for PP contact creation"},"pp_matter_creation_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pp Matter Creation Error","description":"Error message for PP matter creation"},"pp_portal_creation_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pp Portal Creation Error","description":"Error message for PP portal creation"},"pp_call_creation_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pp Call Creation Error","description":"Error message for PP call creation"},"filevine_draft_contact_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filevine Draft Contact Error","description":"Error message for the draft Filevine contact extraction step"},"smartadvocate_intake_draft_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Smartadvocate Intake Draft Error","description":"Error message for the draft SmartAdvocate intake extraction step"},"vxt_reconciliation_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vxt Reconciliation Error","description":"Error message for the VXT transfer-leg reconciliation gate"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At","description":"When the pipeline started"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At","description":"When the pipeline completed"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the pipeline record was created"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"When the pipeline was last updated"},"stages":{"items":{"$ref":"#/components/schemas/StageInfo"},"type":"array","title":"Stages","description":"Per-stage applicability and status for the call pipeline"}},"type":"object","required":["pipeline_id","call_id","recording_download_status","transcription_status","grading_status","case_matching_status","summarization_status","notifications_status","lead_classification_status","created_at"],"title":"CallPipelineResponse","description":"Response for call pipeline status."},"CallProcessingStatusResponse":{"properties":{"call_id":{"type":"string","format":"uuid","title":"Call Id","description":"The call ID this processing status is for"},"is_processing":{"type":"boolean","title":"Is Processing","description":"True while any pipeline step is in-flight"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At","description":"When the pipeline started"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"When the pipeline was last updated"}},"type":"object","required":["call_id","is_processing"],"title":"CallProcessingStatusResponse","description":"Lightweight polling response for whether a call's pipeline is still running."},"CallQualityBucket":{"properties":{"bucket_start":{"type":"string","format":"date-time","title":"Bucket Start","description":"Inclusive start of the bucket (UTC)"},"total_calls":{"type":"integer","title":"Total Calls"},"graded_calls":{"type":"integer","title":"Graded Calls"},"quality_a":{"type":"integer","title":"Quality A"},"quality_b":{"type":"integer","title":"Quality B"},"quality_c":{"type":"integer","title":"Quality C"},"quality_f":{"type":"integer","title":"Quality F"},"quality_ungraded":{"type":"integer","title":"Quality Ungraded"},"gpa":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Gpa","description":"Mean of A=4/B=3/C=2/F=0 over graded calls; null if none graded"},"goal_accomplished":{"type":"integer","title":"Goal Accomplished"},"goal_not_accomplished":{"type":"integer","title":"Goal Not Accomplished"},"goal_accomplished_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Goal Accomplished Pct","description":"Null when no calls have goal data"},"caller_hung_up":{"type":"integer","title":"Caller Hung Up"},"caller_hung_up_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Caller Hung Up Pct","description":"Null when no calls are graded"},"graded_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Graded Pct","description":"Null when the bucket has no calls"}},"type":"object","required":["bucket_start","total_calls","graded_calls","quality_a","quality_b","quality_c","quality_f","quality_ungraded","goal_accomplished","goal_not_accomplished","caller_hung_up"],"title":"CallQualityBucket","description":"One time bucket of grading metrics (bucketed by Call.created_at)"},"CallQualityMetricsResponse":{"properties":{"period":{"type":"string","title":"Period","description":"Requested period: 7d|30d|90d|all"},"bucket":{"type":"string","title":"Bucket","description":"Bucket granularity used: day|week|month"},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Customer Id","description":"Customer filter applied, or null for all customers"},"summary":{"$ref":"#/components/schemas/CallQualitySummary"},"buckets":{"items":{"$ref":"#/components/schemas/CallQualityBucket"},"type":"array","title":"Buckets","description":"Chronological, gap-filled buckets"}},"type":"object","required":["period","bucket","summary"],"title":"CallQualityMetricsResponse","description":"Time-bucketed call quality metrics from the grading system"},"CallQualitySummary":{"properties":{"total_calls":{"type":"integer","title":"Total Calls"},"graded_calls":{"type":"integer","title":"Graded Calls"},"graded_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Graded Pct"},"quality_a":{"type":"integer","title":"Quality A"},"quality_b":{"type":"integer","title":"Quality B"},"quality_c":{"type":"integer","title":"Quality C"},"quality_f":{"type":"integer","title":"Quality F"},"quality_ungraded":{"type":"integer","title":"Quality Ungraded"},"gpa":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Gpa"},"goal_accomplished_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Goal Accomplished Pct"},"caller_hung_up_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Caller Hung Up Pct"}},"type":"object","required":["total_calls","graded_calls","graded_pct","quality_a","quality_b","quality_c","quality_f","quality_ungraded","gpa","goal_accomplished_pct","caller_hung_up_pct"],"title":"CallQualitySummary","description":"Whole-window grading aggregates"},"CallResponse":{"properties":{"call_id":{"type":"string","format":"uuid","title":"Call Id"},"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"case_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Case Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"},"system_phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Phone Number"},"duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Seconds"},"direction":{"type":"string","title":"Direction"},"channel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel"},"status":{"type":"string","title":"Status"},"caller_client_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caller Client Status"},"is_test":{"type":"boolean","title":"Is Test"},"transferred":{"type":"boolean","title":"Transferred"},"call_sid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call Sid"},"forwarded_call_sid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Forwarded Call Sid"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Time"},"caller_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caller Name"},"caller_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caller Email"},"has_error":{"type":"boolean","title":"Has Error"},"error_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Description"},"errors":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Errors"},"quality_score":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quality Score"},"quality_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quality Reason"},"goal_accomplished":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Goal Accomplished"},"goal_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Goal Reason"},"caller_hung_up":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Caller Hung Up"},"billable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Billable"},"hit_voicemail":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Hit Voicemail"},"call_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call Provider","description":"Voice agent provider: 'pipecat', 'vapi', or 'ringcentral' (null means pipecat/legacy)"},"cnam_caller_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cnam Caller Name","description":"Caller ID name from Twilio CNAM lookup (display only - may be account holder, not actual caller)"},"cnam_caller_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cnam Caller Type","description":"Caller type from CNAM: 'CONSUMER' or 'BUSINESS'"},"next_call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next Call Id"},"previous_call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Previous Call Id"}},"type":"object","required":["call_id","customer_id","case_id","created_at","phone_number","system_phone_number","duration_seconds","direction","status","caller_client_status","is_test","transferred","call_sid","forwarded_call_sid","session_id","start_time","end_time","caller_name","caller_email","has_error","error_description","quality_score","quality_reason","goal_accomplished","goal_reason","caller_hung_up"],"title":"CallResponse","description":"Full call record response."},"CallSummaryResponse":{"properties":{"summary_id":{"type":"string","format":"uuid","title":"Summary Id"},"call_id":{"type":"string","format":"uuid","title":"Call Id"},"short_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Short Summary"},"long_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Long Summary"},"caller_identity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caller Identity"},"call_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call Message"},"skipped":{"type":"boolean","title":"Skipped"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["summary_id","call_id","short_summary","long_summary","caller_identity","call_message","skipped","created_at"],"title":"CallSummaryResponse","description":"Call summary response with AI-generated summaries."},"CallTranscriptResponse":{"properties":{"transcript_id":{"type":"string","format":"uuid","title":"Transcript Id"},"call_id":{"type":"string","format":"uuid","title":"Call Id"},"status":{"type":"string","title":"Status"},"utterances":{"anyOf":[{"items":{"$ref":"#/components/schemas/TranscriptUtterance"},"type":"array"},{"type":"null"}],"title":"Utterances"},"transcript_realtime":{"anyOf":[{"items":{"$ref":"#/components/schemas/RealtimeTranscriptItem"},"type":"array"},{"type":"null"}],"title":"Transcript Realtime"},"recording_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recording Url"},"recording_duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Recording Duration Ms"},"recording_peaks":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Recording Peaks"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"transcription_completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Transcription Completed At"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"transfer_split_point_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Transfer Split Point Ms"},"post_transfer_voicemail":{"anyOf":[{"items":{"$ref":"#/components/schemas/TranscriptUtterance"},"type":"array"},{"type":"null"}],"title":"Post Transfer Voicemail"},"detected_language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detected Language"},"detected_language_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detected Language Name"},"translated_utterances":{"anyOf":[{"items":{"$ref":"#/components/schemas/TranslatedUtteranceResponse"},"type":"array"},{"type":"null"}],"title":"Translated Utterances"}},"type":"object","required":["transcript_id","call_id","status","utterances","transcript_realtime","recording_url","recording_duration_ms","created_at","transcription_completed_at","error_message"],"title":"CallTranscriptResponse","description":"Call transcript response with recording URL and structured data."},"CallsPageColumnEnum":{"type":"string","enum":["direction","caller","phone_number","status","duration","time","case","transfer","vxt_transfer","dialtone_screening","case_match","sa_case","outcome","grade","goal"],"title":"CallsPageColumnEnum","description":"Enum for calls page column identifiers"},"CallsPageMetricEnum":{"type":"string","enum":["calls_today","calls_this_week","booked_meetings"],"title":"CallsPageMetricEnum","description":"Enum for calls page metric card identifiers"},"CallsPageSettingsResponse":{"properties":{"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"enabled_columns":{"items":{"$ref":"#/components/schemas/CallsPageColumnEnum"},"type":"array","title":"Enabled Columns","description":"List of enabled column identifiers in display order"},"enabled_metrics":{"items":{"$ref":"#/components/schemas/CallsPageMetricEnum"},"type":"array","title":"Enabled Metrics","description":"List of enabled metric card identifiers"}},"type":"object","required":["customer_id","enabled_columns","enabled_metrics"],"title":"CallsPageSettingsResponse","description":"Calls page settings response model"},"CandidateCase":{"properties":{"case_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Case Provider"},"case_local_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Case Local Id"},"smartadvocate_case_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Smartadvocate Case Id"},"case_number":{"type":"string","title":"Case Number"},"case_name":{"type":"string","title":"Case Name"},"plaintiffs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Plaintiffs"},"defendants":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Defendants"}},"type":"object","required":["case_number","case_name"],"title":"CandidateCase","description":"A candidate case for display when there's ambiguity."},"CardAccountResponse":{"properties":{"payment_method_id":{"type":"string","format":"uuid","title":"Payment Method Id"},"brand":{"type":"string","title":"Brand"},"last_four_card_number":{"type":"string","title":"Last Four Card Number"},"expiration_month":{"type":"string","title":"Expiration Month"},"expiration_year":{"type":"string","title":"Expiration Year"},"holder_name":{"type":"string","title":"Holder Name"},"card_type":{"type":"string","title":"Card Type"}},"type":"object","required":["payment_method_id","brand","last_four_card_number","expiration_month","expiration_year","holder_name","card_type"],"title":"CardAccountResponse","description":"Response with card account details."},"CaseAgentResponse":{"properties":{"case_id":{"type":"string","format":"uuid","title":"Case Id"},"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description"},"meeting_booking_enabled":{"type":"boolean","title":"Meeting Booking Enabled","default":true},"qualifications":{"items":{"$ref":"#/components/schemas/QualificationAgentResponse"},"type":"array","title":"Qualifications","default":[]}},"type":"object","required":["case_id","title","description"],"title":"CaseAgentResponse","description":"Simplified case response for agent endpoints."},"CaseDetailResponse":{"properties":{"case_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Case Provider","description":"'smartadvocate' or 'filevine'"},"case_local_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Case Local Id","description":"PK in the provider's local table"},"smartadvocate_case_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Smartadvocate Case Id","description":"Internal case ID (SA only)"},"case_number":{"type":"string","title":"Case Number","description":"Case number"},"case_name":{"type":"string","title":"Case Name","description":"Case name"},"phone_numbers":{"items":{"type":"string"},"type":"array","title":"Phone Numbers","description":"Phone numbers"},"plaintiff_names":{"items":{"type":"string"},"type":"array","title":"Plaintiff Names","description":"Plaintiff names (SA)"},"defendant_names":{"items":{"type":"string"},"type":"array","title":"Defendant Names","description":"Defendant names (SA)"},"primary_contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Contact Name","description":"Primary contact name (FV)"},"primary_contact_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Contact Phone","description":"Primary contact phone (FV)"},"recent_notes":{"items":{"$ref":"#/components/schemas/CaseNotePreview"},"type":"array","title":"Recent Notes","description":"Recent case notes (last 5)"}},"type":"object","required":["case_number","case_name"],"title":"CaseDetailResponse","description":"Detailed case information for manual matching modal"},"CaseNotePreview":{"properties":{"note_id":{"type":"string","format":"uuid","title":"Note Id","description":"Note ID"},"note_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note Type","description":"Type of note"},"note_text":{"type":"string","title":"Note Text","description":"Note content (truncated)"},"note_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note Date","description":"Date of note"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By","description":"Who created the note"}},"type":"object","required":["note_id","note_text"],"title":"CaseNotePreview","description":"Preview of a case note"},"CaseNotesSettingsResponse":{"properties":{"customer_id":{"type":"string","format":"uuid","title":"Customer Id","description":"The customer ID"},"case_notes_enabled":{"type":"boolean","title":"Case Notes Enabled","description":"Whether case notes feature is enabled for this customer"},"dry_run_case_matching":{"type":"boolean","title":"Dry Run Case Matching","description":"Whether case matching is in dry-run mode (requires manual approval)"},"note_generation_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note Generation Context","description":"Optional context to include in LLM prompt for case note generation"},"substantive_conversation_criteria":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Substantive Conversation Criteria","description":"Custom criteria for determining if a call has substantive conversation"}},"type":"object","required":["customer_id","case_notes_enabled","dry_run_case_matching"],"title":"CaseNotesSettingsResponse","description":"Response with customer's case notes settings"},"CaseResponse":{"properties":{"case_id":{"type":"string","format":"uuid","title":"Case Id"},"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description"},"staff_group_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Staff Group Id"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"updated_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By"},"meeting_booking_enabled":{"type":"boolean","title":"Meeting Booking Enabled"}},"type":"object","required":["case_id","customer_id","created_at","updated_at","title","description","staff_group_id","created_by","updated_by","meeting_booking_enabled"],"title":"CaseResponse","description":"Full case record response."},"CaseSearchResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/CaseSearchResult"},"type":"array","title":"Results","description":"List of matching cases"},"total":{"type":"integer","title":"Total","description":"Total number of results"}},"type":"object","required":["total"],"title":"CaseSearchResponse","description":"Response from case search"},"CaseSearchResult":{"properties":{"case_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Case Provider","description":"'smartadvocate' or 'filevine'"},"case_local_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Case Local Id","description":"PK in the provider's local table"},"smartadvocate_case_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Smartadvocate Case Id","description":"Internal case ID (SA only)"},"case_number":{"type":"string","title":"Case Number","description":"Case number (e.g., 'BBLG-2026-000007')"},"case_name":{"type":"string","title":"Case Name","description":"Case name (e.g., 'Bravo v. Defendant')"},"phone_numbers":{"items":{"type":"string"},"type":"array","title":"Phone Numbers","description":"Phone numbers associated with the case"},"plaintiff_names":{"items":{"type":"string"},"type":"array","title":"Plaintiff Names","description":"Names of plaintiffs (SA) — empty for FV"},"defendant_names":{"items":{"type":"string"},"type":"array","title":"Defendant Names","description":"Names of defendants (SA) — empty for FV"},"primary_contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Contact Name","description":"Primary contact name"},"primary_contact_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Contact Phone","description":"Primary contact phone"}},"type":"object","required":["case_number","case_name"],"title":"CaseSearchResult","description":"A case search result with minimal information for frontend display"},"ChangeMatchedCaseRequest":{"properties":{"case_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Case Provider","description":"'smartadvocate' or 'filevine'"},"case_local_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Case Local Id","description":"PK in the provider's local table"},"new_smartadvocate_case_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"New Smartadvocate Case Id","description":"Legacy SA-only field"}},"type":"object","title":"ChangeMatchedCaseRequest","description":"Request to change the matched case (and safely delete old note if posted).\n\nCross-provider changes are not supported. Provide `case_provider` +\n`case_local_id` (preferred) or legacy `new_smartadvocate_case_id`."},"ChangeMatchedCaseResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the operation was successful"},"old_note_deleted":{"type":"boolean","title":"Old Note Deleted","description":"Whether the old note was deleted","default":false},"new_note_posted":{"type":"boolean","title":"New Note Posted","description":"Whether a new note was posted","default":false},"matched_case_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matched Case Number","description":"New case number"},"matched_case_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matched Case Name","description":"New case name"},"message":{"type":"string","title":"Message","description":"Status message"}},"type":"object","required":["success","message"],"title":"ChangeMatchedCaseResponse","description":"Response from changing the matched case."},"ChangePasswordRequest":{"properties":{"new_password":{"type":"string","minLength":8,"title":"New Password","description":"New password"}},"type":"object","required":["new_password"],"title":"ChangePasswordRequest","description":"Request from an authenticated user to set a new password"},"ChatInitRequest":{"properties":{"firm_id":{"type":"string","title":"Firm Id","description":"Embed identifier: a chat widget ID (new snippets) or a customer/firm ID (legacy snippets, resolves to the default widget)"},"origin_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Url","description":"Page URL where chat was started"},"visitor_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visitor Id","description":"Persistent visitor identifier from localStorage for grouping conversations"},"is_test":{"type":"boolean","title":"Is Test","description":"Whether this is a test conversation (excluded from pipeline/lead generation)","default":false},"visitor_language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visitor Language","description":"Visitor's browser language tag (e.g., 'es-419'); resolved against the supported-language registry"}},"type":"object","required":["firm_id"],"title":"ChatInitRequest"},"ChatInitResponse":{"properties":{"conversation_id":{"type":"string","format":"uuid","title":"Conversation Id"},"session_token":{"type":"string","title":"Session Token"},"greeting":{"$ref":"#/components/schemas/app__chat__schemas__MessageResponse"},"widget_config":{"$ref":"#/components/schemas/WidgetConfigResponse"},"language_code":{"type":"string","title":"Language Code","default":"en"}},"type":"object","required":["conversation_id","session_token","greeting","widget_config"],"title":"ChatInitResponse"},"ChatMetricsResponse":{"properties":{"chats_today":{"type":"integer","title":"Chats Today"},"chats_this_week":{"type":"integer","title":"Chats This Week"},"total_chats":{"type":"integer","title":"Total Chats"}},"type":"object","required":["chats_today","chats_this_week","total_chats"],"title":"ChatMetricsResponse"},"ChatPipelineResponse":{"properties":{"pipeline_id":{"type":"string","format":"uuid","title":"Pipeline Id"},"conversation_id":{"type":"string","format":"uuid","title":"Conversation Id"},"translation_status":{"type":"string","title":"Translation Status","default":"not_started"},"summarization_status":{"type":"string","title":"Summarization Status"},"classification_status":{"type":"string","title":"Classification Status"},"pp_contact_creation_status":{"type":"string","title":"Pp Contact Creation Status","default":"not_started"},"pp_matter_creation_status":{"type":"string","title":"Pp Matter Creation Status","default":"not_started"},"pp_portal_creation_status":{"type":"string","title":"Pp Portal Creation Status","default":"not_started"},"translation_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Translation Error"},"summarization_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summarization Error"},"classification_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Classification Error"},"pp_contact_creation_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pp Contact Creation Error"},"pp_matter_creation_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pp Matter Creation Error"},"pp_portal_creation_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pp Portal Creation 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":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["pipeline_id","conversation_id","summarization_status","classification_status","created_at"],"title":"ChatPipelineResponse"},"ChatSummaryResponse":{"properties":{"summary_id":{"type":"string","format":"uuid","title":"Summary Id"},"conversation_id":{"type":"string","format":"uuid","title":"Conversation Id"},"short_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Short Summary"},"long_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Long Summary"},"skipped":{"type":"boolean","title":"Skipped","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["summary_id","conversation_id","created_at"],"title":"ChatSummaryResponse"},"ChatWidgetConfigResponse":{"properties":{"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"enabled":{"type":"boolean","title":"Enabled","description":"Whether the chat widget is shown on the customer's website"},"accent_color":{"type":"string","title":"Accent Color","description":"Primary color for the bubble, header, and assistant messages"},"secondary_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secondary Color","description":"Secondary accent color. When null, derived automatically from the accent color."},"position":{"type":"string","title":"Position","description":"Where the chat bubble appears on the page (bottom-right or bottom-left)"},"greeting_message":{"type":"string","title":"Greeting Message","description":"The first message shown when a visitor opens the chat"},"assistant_name":{"type":"string","title":"Assistant Name","description":"Displayed in the chat header"},"system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Prompt","description":"Full system prompt override. When set, replaces the assembled prompt entirely."},"persona_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Persona Prompt","description":"Personality/tone instructions (e.g. 'You are Ashley, a warm and professional intake specialist')"},"law_firm_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Law Firm Context","description":"Firm-specific information injected into the prompt. Falls back to Customer.law_firm_info_prompt if not set."},"fields_to_collect":{"anyOf":[{"items":{"$ref":"#/components/schemas/FieldToCollect"},"type":"array"},{"type":"null"}],"title":"Fields To Collect","description":"Fields to collect from visitors. Each field can be marked as required for lead generation."},"intake_goal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intake Goal","description":"What to do after collecting info (e.g. 'Let them know an attorney will follow up within 24 hours')"},"additional_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Additional Instructions","description":"Extra rules or context for the AI assistant"},"teaser_enabled":{"type":"boolean","title":"Teaser Enabled","description":"Whether to show a teaser message bubble next to the chat button","default":true},"teaser_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Teaser Message","description":"Teaser message text. Falls back to greeting_message if not set."},"teaser_delay_seconds":{"type":"integer","title":"Teaser Delay Seconds","description":"Seconds to wait before showing the teaser message","default":5},"show_online_status":{"type":"boolean","title":"Show Online Status","description":"Whether to show an online indicator on the chat bubble and header","default":true},"show_unread_badge":{"type":"boolean","title":"Show Unread Badge","description":"Whether to show an unread badge on the chat bubble","default":true},"tab_notification_enabled":{"type":"boolean","title":"Tab Notification Enabled","description":"Whether to flash unread count in the browser tab title","default":false},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url","description":"URL of the agent avatar image for the header and messages"},"avatar_video_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Video Url","description":"URL of a silent looping video shown in place of the avatar image (header and launcher). Takes precedence over avatar_url."},"avatar_video_in_header":{"type":"boolean","title":"Avatar Video In Header","description":"When false, the open panel's header shows the static avatar image and the avatar video only plays on the launcher bubble","default":true},"launcher_avatar_enabled":{"type":"boolean","title":"Launcher Avatar Enabled","description":"When true (and avatar_url is set), the floating launcher shows the avatar image inside an accent-colored ring instead of the default chat bubble icon","default":false},"intro_video_enabled":{"type":"boolean","title":"Intro Video Enabled","description":"When true (and intro_video_url is set), opening the widget plays an intro video full-panel before transitioning into the chat","default":false},"intro_video_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intro Video Url","description":"URL of the intro video (mp4/webm) played when the widget opens"},"intro_video_autoplay_on_load":{"type":"boolean","title":"Intro Video Autoplay On Load","description":"When true, desktop visitors see the muted intro video playing in the widget corner on page load; when false it only plays after they click the launcher","default":true},"attention_grabber_enabled":{"type":"boolean","title":"Attention Grabber Enabled","description":"When true, a full-page modal asks visitors if they need help; Yes opens the chat directly, No dismisses it","default":false},"attention_grabber_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Attention Grabber Message","description":"Question shown in the attention grabber modal. Falls back to a default when not set."},"attention_grabber_delay_seconds":{"type":"integer","title":"Attention Grabber Delay Seconds","description":"Seconds to wait before showing the attention grabber modal","default":8},"idle_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idle Message","description":"Message shown when visitor is idle. Leave empty to disable."},"idle_delay_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Idle Delay Seconds","description":"Seconds of inactivity before showing the idle nudge message"},"quick_exit_enabled":{"type":"boolean","title":"Quick Exit Enabled","description":"Privacy Quick Exit: the widget never persists the chat across page loads — the conversation is ended and reset on browser close/refresh","default":false},"mobile_bottom_offset_px":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mobile Bottom Offset Px","description":"Extra clearance in pixels between the widget and the bottom of the viewport on mobile, for sites with a fixed bottom bar. Null = none."},"chat_idle_timeout_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Chat Idle Timeout Minutes","description":"Minutes of inactivity before a chat is auto-completed. Default: 10 minutes."},"allowed_origins":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Origins","description":"Allowed origins for CORS. When empty or null, any origin can embed the widget."}},"type":"object","required":["customer_id","enabled","accent_color","position","greeting_message","assistant_name"],"title":"ChatWidgetConfigResponse","description":"Chat widget configuration response model"},"ChatWidgetDetailResponse":{"properties":{"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"enabled":{"type":"boolean","title":"Enabled","description":"Whether the chat widget is shown on the customer's website"},"accent_color":{"type":"string","title":"Accent Color","description":"Primary color for the bubble, header, and assistant messages"},"secondary_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secondary Color","description":"Secondary accent color. When null, derived automatically from the accent color."},"position":{"type":"string","title":"Position","description":"Where the chat bubble appears on the page (bottom-right or bottom-left)"},"greeting_message":{"type":"string","title":"Greeting Message","description":"The first message shown when a visitor opens the chat"},"assistant_name":{"type":"string","title":"Assistant Name","description":"Displayed in the chat header"},"system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Prompt","description":"Full system prompt override. When set, replaces the assembled prompt entirely."},"persona_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Persona Prompt","description":"Personality/tone instructions (e.g. 'You are Ashley, a warm and professional intake specialist')"},"law_firm_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Law Firm Context","description":"Firm-specific information injected into the prompt. Falls back to Customer.law_firm_info_prompt if not set."},"fields_to_collect":{"anyOf":[{"items":{"$ref":"#/components/schemas/FieldToCollect"},"type":"array"},{"type":"null"}],"title":"Fields To Collect","description":"Fields to collect from visitors. Each field can be marked as required for lead generation."},"intake_goal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intake Goal","description":"What to do after collecting info (e.g. 'Let them know an attorney will follow up within 24 hours')"},"additional_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Additional Instructions","description":"Extra rules or context for the AI assistant"},"teaser_enabled":{"type":"boolean","title":"Teaser Enabled","description":"Whether to show a teaser message bubble next to the chat button","default":true},"teaser_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Teaser Message","description":"Teaser message text. Falls back to greeting_message if not set."},"teaser_delay_seconds":{"type":"integer","title":"Teaser Delay Seconds","description":"Seconds to wait before showing the teaser message","default":5},"show_online_status":{"type":"boolean","title":"Show Online Status","description":"Whether to show an online indicator on the chat bubble and header","default":true},"show_unread_badge":{"type":"boolean","title":"Show Unread Badge","description":"Whether to show an unread badge on the chat bubble","default":true},"tab_notification_enabled":{"type":"boolean","title":"Tab Notification Enabled","description":"Whether to flash unread count in the browser tab title","default":false},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url","description":"URL of the agent avatar image for the header and messages"},"avatar_video_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Video Url","description":"URL of a silent looping video shown in place of the avatar image (header and launcher). Takes precedence over avatar_url."},"avatar_video_in_header":{"type":"boolean","title":"Avatar Video In Header","description":"When false, the open panel's header shows the static avatar image and the avatar video only plays on the launcher bubble","default":true},"launcher_avatar_enabled":{"type":"boolean","title":"Launcher Avatar Enabled","description":"When true (and avatar_url is set), the floating launcher shows the avatar image inside an accent-colored ring instead of the default chat bubble icon","default":false},"intro_video_enabled":{"type":"boolean","title":"Intro Video Enabled","description":"When true (and intro_video_url is set), opening the widget plays an intro video full-panel before transitioning into the chat","default":false},"intro_video_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intro Video Url","description":"URL of the intro video (mp4/webm) played when the widget opens"},"intro_video_autoplay_on_load":{"type":"boolean","title":"Intro Video Autoplay On Load","description":"When true, desktop visitors see the muted intro video playing in the widget corner on page load; when false it only plays after they click the launcher","default":true},"attention_grabber_enabled":{"type":"boolean","title":"Attention Grabber Enabled","description":"When true, a full-page modal asks visitors if they need help; Yes opens the chat directly, No dismisses it","default":false},"attention_grabber_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Attention Grabber Message","description":"Question shown in the attention grabber modal. Falls back to a default when not set."},"attention_grabber_delay_seconds":{"type":"integer","title":"Attention Grabber Delay Seconds","description":"Seconds to wait before showing the attention grabber modal","default":8},"idle_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idle Message","description":"Message shown when visitor is idle. Leave empty to disable."},"idle_delay_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Idle Delay Seconds","description":"Seconds of inactivity before showing the idle nudge message"},"quick_exit_enabled":{"type":"boolean","title":"Quick Exit Enabled","description":"Privacy Quick Exit: the widget never persists the chat across page loads — the conversation is ended and reset on browser close/refresh","default":false},"mobile_bottom_offset_px":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mobile Bottom Offset Px","description":"Extra clearance in pixels between the widget and the bottom of the viewport on mobile, for sites with a fixed bottom bar. Null = none."},"chat_idle_timeout_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Chat Idle Timeout Minutes","description":"Minutes of inactivity before a chat is auto-completed. Default: 10 minutes."},"allowed_origins":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Origins","description":"Allowed origins for CORS. When empty or null, any origin can embed the widget."},"chat_widget_id":{"type":"string","format":"uuid","title":"Chat Widget Id"},"name":{"type":"string","title":"Name","description":"Display label for the widget"},"is_default":{"type":"boolean","title":"Is Default","description":"Whether this is the customer's default widget"}},"type":"object","required":["customer_id","enabled","accent_color","position","greeting_message","assistant_name","chat_widget_id","name","is_default"],"title":"ChatWidgetDetailResponse","description":"Full configuration of a single chat widget"},"ChatWidgetSummaryResponse":{"properties":{"chat_widget_id":{"type":"string","format":"uuid","title":"Chat Widget Id"},"name":{"type":"string","title":"Name","description":"Display label for the widget (e.g. which website it serves)"},"is_default":{"type":"boolean","title":"Is Default","description":"Whether this is the customer's default widget (resolved by legacy customer-id embed snippets)"},"enabled":{"type":"boolean","title":"Enabled","description":"Whether the chat widget is shown on the customer's website"}},"type":"object","required":["chat_widget_id","name","is_default","enabled"],"title":"ChatWidgetSummaryResponse","description":"Summary of a chat widget for the widget list"},"ChatsPageColumnEnum":{"type":"string","enum":["visitor_name","visitor_phone","visitor_email","status","message_count","origin_url","time","widget"],"title":"ChatsPageColumnEnum","description":"Enum for chats page column identifiers"},"ChatsPageMetricEnum":{"type":"string","enum":["chats_today","chats_this_week","total_chats"],"title":"ChatsPageMetricEnum","description":"Enum for chats page metric card identifiers"},"ChatsPageSettingsResponse":{"properties":{"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"enabled_columns":{"items":{"$ref":"#/components/schemas/ChatsPageColumnEnum"},"type":"array","title":"Enabled Columns","description":"List of enabled column identifiers in display order"},"enabled_metrics":{"items":{"$ref":"#/components/schemas/ChatsPageMetricEnum"},"type":"array","title":"Enabled Metrics","description":"List of enabled metric card identifiers"}},"type":"object","required":["customer_id","enabled_columns","enabled_metrics"],"title":"ChatsPageSettingsResponse","description":"Chats page settings response model"},"CheckDuplicatePhonesRequest":{"properties":{"phone_numbers":{"items":{"type":"string"},"type":"array","maxItems":5000,"title":"Phone Numbers"}},"type":"object","required":["phone_numbers"],"title":"CheckDuplicatePhonesRequest","description":"Request to check which phone numbers already exist as outbound leads."},"CheckDuplicatePhonesResponse":{"properties":{"existing_phone_numbers":{"items":{"type":"string"},"type":"array","title":"Existing Phone Numbers"}},"type":"object","required":["existing_phone_numbers"],"title":"CheckDuplicatePhonesResponse","description":"Response containing phone numbers that already exist."},"ClearDryRunFilingsRequest":{"properties":{"source_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Type","description":"Limit the clear to one source type ('granola_note' or 'call'). Omit to clear both."}},"type":"object","title":"ClearDryRunFilingsRequest","description":"Which source type's dry-run proposals to clear before a re-run."},"ClearDryRunFilingsResponse":{"properties":{"deleted":{"type":"integer","title":"Deleted"},"kept_decided":{"type":"integer","title":"Kept Decided"}},"type":"object","required":["deleted","kept_decided"],"title":"ClearDryRunFilingsResponse","description":"Count of dry-run filing runs deleted, so the caller can confirm the\nre-run will actually re-propose."},"ClioAuthorizationUrl":{"properties":{"authorization_url":{"type":"string","title":"Authorization Url"}},"type":"object","required":["authorization_url"],"title":"ClioAuthorizationUrl","description":"Clio OAuth authorization URL response"},"ClioGrowApproveResponse":{"properties":{"status":{"type":"string","title":"Status"},"response_status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Response Status Code"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["status"],"title":"ClioGrowApproveResponse","description":"Result of approving a queued Clio Grow push"},"ClioGrowAuditLogItem":{"properties":{"audit_log_id":{"type":"string","format":"uuid","title":"Audit Log Id"},"lead_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Lead Id"},"call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Call Id"},"event_type":{"type":"string","title":"Event Type"},"status":{"type":"string","title":"Status"},"endpoint_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Endpoint Url"},"request_payload":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Request Payload"},"response_status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Response Status Code"},"response_body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Body"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sent At"}},"type":"object","required":["audit_log_id","event_type","status","created_at"],"title":"ClioGrowAuditLogItem","description":"One Clio Grow audit-log entry"},"ClioGrowAuditLogResponse":{"properties":{"entries":{"items":{"$ref":"#/components/schemas/ClioGrowAuditLogItem"},"type":"array","title":"Entries","default":[]},"total":{"type":"integer","title":"Total","default":0}},"type":"object","title":"ClioGrowAuditLogResponse","description":"Clio Grow audit-log page"},"ClioGrowConfigResponse":{"properties":{"referring_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referring Url"},"from_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Source"},"dry_run":{"type":"boolean","title":"Dry Run","default":true}},"type":"object","title":"ClioGrowConfigResponse","description":"Clio Grow per-customer lead-push configuration"},"ClioGrowConfigUpdate":{"properties":{"referring_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referring Url"},"from_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Source"},"dry_run":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dry Run"}},"type":"object","title":"ClioGrowConfigUpdate","description":"Partial update for the Clio Grow lead-push configuration"},"ClioGrowPendingPushItem":{"properties":{"audit_log_id":{"type":"string","format":"uuid","title":"Audit Log Id"},"lead_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Lead Id"},"request_payload":{"additionalProperties":true,"type":"object","title":"Request Payload","default":{}},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["audit_log_id","created_at"],"title":"ClioGrowPendingPushItem","description":"A queued (dry-run) Clio Grow push awaiting developer approval"},"ClioStatus":{"properties":{"connected":{"type":"boolean","title":"Connected"},"connected_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connected At"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"}},"type":"object","required":["connected"],"title":"ClioStatus","description":"Clio (Manage or Grow) connection status"},"CompleteVerificationRequest":{"properties":{"verification_code":{"type":"string","maxLength":4,"minLength":4,"title":"Verification Code"}},"type":"object","required":["verification_code"],"title":"CompleteVerificationRequest","description":"Request to complete bank account verification."},"ConversationDetailResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"visitor_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visitor Name"},"visitor_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visitor Phone"},"visitor_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visitor Email"},"status":{"type":"string","title":"Status"},"message_count":{"type":"integer","title":"Message Count","default":0},"chat_widget_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Chat Widget Id"},"widget_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Widget Name"},"origin_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Url"},"ip_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip Address"},"is_test":{"type":"boolean","title":"Is Test","default":false},"extracted_first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extracted First Name"},"extracted_last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extracted Last Name"},"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"},"duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Seconds"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"messages":{"items":{"$ref":"#/components/schemas/app__chat__schemas__MessageResponse"},"type":"array","title":"Messages"},"pipeline":{"anyOf":[{"$ref":"#/components/schemas/ChatPipelineResponse"},{"type":"null"}]},"summary":{"anyOf":[{"$ref":"#/components/schemas/ChatSummaryResponse"},{"type":"null"}]},"lead":{"anyOf":[{"$ref":"#/components/schemas/LeadResponse"},{"type":"null"}]},"detected_language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detected Language"},"detected_language_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detected Language Name"},"translated_messages":{"anyOf":[{"items":{"$ref":"#/components/schemas/TranslatedChatMessageResponse"},"type":"array"},{"type":"null"}],"title":"Translated Messages"},"next_conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next Conversation Id"},"previous_conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Previous Conversation Id"}},"type":"object","required":["id","status","created_at","messages"],"title":"ConversationDetailResponse"},"ConversationListItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"visitor_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visitor Name"},"visitor_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visitor Phone"},"visitor_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visitor Email"},"status":{"type":"string","title":"Status"},"message_count":{"type":"integer","title":"Message Count","default":0},"chat_widget_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Chat Widget Id"},"widget_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Widget Name"},"origin_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Url"},"ip_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip Address"},"is_test":{"type":"boolean","title":"Is Test","default":false},"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"},"duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Seconds"},"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","status","created_at"],"title":"ConversationListItem"},"ConversationListResponse":{"properties":{"conversations":{"items":{"$ref":"#/components/schemas/ConversationListItem"},"type":"array","title":"Conversations"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["conversations","total"],"title":"ConversationListResponse"},"ConversationMessagesResponse":{"properties":{"conversation_id":{"type":"string","format":"uuid","title":"Conversation Id"},"messages":{"items":{"$ref":"#/components/schemas/app__chat__schemas__MessageResponse"},"type":"array","title":"Messages"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["conversation_id","messages","status","created_at"],"title":"ConversationMessagesResponse"},"CreateAgentTokenRequest":{"properties":{"customer_id":{"type":"string","format":"uuid","title":"Customer Id","description":"The customer ID to create the token for"}},"type":"object","required":["customer_id"],"title":"CreateAgentTokenRequest","description":"Request to create an agent token for a customer"},"CreateAgentTokenResponse":{"properties":{"token":{"type":"string","title":"Token","description":"The generated agent token (bearer token)"},"customer_id":{"type":"string","format":"uuid","title":"Customer Id","description":"The customer ID this token is for"},"is_active":{"type":"boolean","title":"Is Active","description":"Whether the token is active"}},"type":"object","required":["token","customer_id","is_active"],"title":"CreateAgentTokenResponse","description":"Response with the created agent token"},"CreateAvailabilityBlockRequest":{"properties":{"name":{"type":"string","title":"Name"},"monday":{"type":"boolean","title":"Monday","default":false},"tuesday":{"type":"boolean","title":"Tuesday","default":false},"wednesday":{"type":"boolean","title":"Wednesday","default":false},"thursday":{"type":"boolean","title":"Thursday","default":false},"friday":{"type":"boolean","title":"Friday","default":false},"saturday":{"type":"boolean","title":"Saturday","default":false},"sunday":{"type":"boolean","title":"Sunday","default":false},"start_time":{"type":"string","format":"time","title":"Start Time"},"end_time":{"type":"string","format":"time","title":"End Time"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["name","start_time","end_time"],"title":"CreateAvailabilityBlockRequest"},"CreateAvailabilityRequest":{"properties":{"day_of_week":{"$ref":"#/components/schemas/DayOfWeek"},"start_time":{"type":"string","format":"time","title":"Start Time"},"end_time":{"type":"string","format":"time","title":"End Time"}},"type":"object","required":["day_of_week","start_time","end_time"],"title":"CreateAvailabilityRequest","description":"Request model for creating availability"},"CreateBankAccountRequest":{"properties":{"routing_number":{"type":"string","maxLength":9,"minLength":9,"title":"Routing Number"},"account_number":{"type":"string","title":"Account Number"},"account_type":{"$ref":"#/components/schemas/BankAccountType"},"bank_account_holder_name":{"type":"string","title":"Bank Account Holder Name"}},"type":"object","required":["routing_number","account_number","account_type","bank_account_holder_name"],"title":"CreateBankAccountRequest","description":"Request to add a bank account."},"CreateBillingAdjustmentRequest":{"properties":{"description":{"type":"string","maxLength":255,"title":"Description"},"amount_cents":{"type":"integer","exclusiveMinimum":0.0,"title":"Amount Cents"},"adjustment_type":{"$ref":"#/components/schemas/BillingAdjustmentType"},"recurrence":{"$ref":"#/components/schemas/BillingAdjustmentRecurrence"},"effective_date":{"type":"string","format":"date-time","title":"Effective Date"},"expiration_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expiration Date"},"send_notification_email":{"type":"boolean","title":"Send Notification Email","default":true}},"type":"object","required":["description","amount_cents","adjustment_type","recurrence","effective_date"],"title":"CreateBillingAdjustmentRequest"},"CreateBillingContractItemRequest":{"properties":{"item_type":{"$ref":"#/components/schemas/BillingContractItemType"},"price":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string"}],"title":"Price","description":"Price in dollars"},"quota":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Quota","description":"Quota (e.g., number of included calls)"},"min_call_duration_seconds":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Min Call Duration Seconds","description":"Per-call rate only: calls shorter than this many seconds are not billed"},"count_voicemails":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Count Voicemails","description":"Per-call rate only: whether outbound calls that hit voicemail are billed"}},"type":"object","required":["item_type","price"],"title":"CreateBillingContractItemRequest","description":"Request to create a billing contract item."},"CreateBillingContractRequest":{"properties":{"start_date":{"type":"string","format":"date-time","title":"Start Date"},"number_of_months":{"type":"integer","exclusiveMinimum":0.0,"title":"Number Of Months","description":"Contract length in months"},"items":{"items":{"$ref":"#/components/schemas/CreateBillingContractItemRequest"},"type":"array","minItems":1,"title":"Items","description":"Contract line items"}},"type":"object","required":["start_date","number_of_months","items"],"title":"CreateBillingContractRequest","description":"Request to create or update billing contract (admin only)."},"CreateCaseRequest":{"properties":{"title":{"type":"string","title":"Title","description":"Title of the case"},"description":{"type":"string","title":"Description","description":"Description of the case"},"staff_group_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Staff Group Id","description":"ID of the staff group assigned to this case"},"meeting_booking_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Meeting Booking Enabled","description":"Whether meeting booking is enabled for this case"}},"type":"object","required":["title","description"],"title":"CreateCaseRequest","description":"Request to create a new case record."},"CreateChatWidgetRequest":{"properties":{"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled","description":"Whether the chat widget is shown on the customer's website"},"accent_color":{"anyOf":[{"type":"string","maxLength":7},{"type":"null"}],"title":"Accent Color","description":"Primary color hex code (e.g., #B5683C)"},"secondary_color":{"anyOf":[{"type":"string","maxLength":7},{"type":"null"}],"title":"Secondary Color","description":"Secondary accent color hex code. Set to null to auto-derive from accent color."},"position":{"anyOf":[{"type":"string","pattern":"^bottom-(right|left)$"},{"type":"null"}],"title":"Position","description":"Widget position: bottom-right or bottom-left"},"greeting_message":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Greeting Message","description":"The first message shown when a visitor opens the chat"},"assistant_name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Assistant Name","description":"Displayed in the chat header"},"system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Prompt","description":"Full system prompt override. Set to null to use assembled prompt from structured fields."},"persona_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Persona Prompt","description":"Personality/tone instructions"},"law_firm_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Law Firm Context","description":"Firm-specific information. Set to null to fall back to Customer.law_firm_info_prompt."},"fields_to_collect":{"anyOf":[{"items":{"$ref":"#/components/schemas/FieldToCollect"},"type":"array"},{"type":"null"}],"title":"Fields To Collect","description":"Fields to collect from visitors with lead generation requirements"},"intake_goal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intake Goal","description":"What to do after collecting info"},"additional_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Additional Instructions","description":"Extra rules or context"},"teaser_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Teaser Enabled","description":"Whether to show a teaser message bubble"},"teaser_message":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Teaser Message","description":"Teaser message text"},"teaser_delay_seconds":{"anyOf":[{"type":"integer","maximum":60.0,"minimum":1.0},{"type":"null"}],"title":"Teaser Delay Seconds","description":"Seconds before teaser appears"},"show_online_status":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Show Online Status","description":"Whether to show online indicator"},"show_unread_badge":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Show Unread Badge","description":"Whether to show unread badge on bubble"},"tab_notification_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Tab Notification Enabled","description":"Whether to flash unread count in tab title"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url","description":"URL of agent avatar image"},"avatar_video_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Video Url","description":"URL of a silent looping video shown in place of the avatar image (header and launcher). Takes precedence over avatar_url."},"avatar_video_in_header":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Avatar Video In Header","description":"When false, the open panel's header shows the static avatar image and the avatar video only plays on the launcher bubble"},"launcher_avatar_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Launcher Avatar Enabled","description":"When true (and avatar_url is set), the floating launcher shows the avatar image inside an accent-colored ring instead of the default chat bubble icon"},"intro_video_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Intro Video Enabled","description":"When true (and intro_video_url is set), opening the widget plays an intro video full-panel before transitioning into the chat"},"intro_video_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intro Video Url","description":"URL of the intro video (mp4/webm) played when the widget opens"},"intro_video_autoplay_on_load":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Intro Video Autoplay On Load","description":"When true, desktop visitors see the muted intro video playing in the widget corner on page load; when false it only plays after they click the launcher"},"attention_grabber_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Attention Grabber Enabled","description":"When true, a full-page modal asks visitors if they need help; Yes opens the chat directly, No dismisses it"},"attention_grabber_message":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Attention Grabber Message","description":"Question shown in the attention grabber modal"},"attention_grabber_delay_seconds":{"anyOf":[{"type":"integer","maximum":120.0,"minimum":1.0},{"type":"null"}],"title":"Attention Grabber Delay Seconds","description":"Seconds before the attention grabber modal appears (1-120)"},"idle_message":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Idle Message","description":"Message shown when visitor is idle"},"idle_delay_seconds":{"anyOf":[{"type":"integer","maximum":300.0,"minimum":10.0},{"type":"null"}],"title":"Idle Delay Seconds","description":"Seconds of inactivity before nudge (10-300)"},"quick_exit_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Quick Exit Enabled","description":"Privacy Quick Exit: the widget never persists the chat across page loads — the conversation is ended and reset on browser close/refresh"},"mobile_bottom_offset_px":{"anyOf":[{"type":"integer","maximum":300.0,"minimum":0.0},{"type":"null"}],"title":"Mobile Bottom Offset Px","description":"Extra clearance in pixels between the widget and the bottom of the viewport on mobile (0-300). Null = none."},"chat_idle_timeout_minutes":{"anyOf":[{"type":"integer","maximum":60.0,"minimum":1.0},{"type":"null"}],"title":"Chat Idle Timeout Minutes","description":"Minutes of inactivity before auto-completing a chat (1-60). Default: 10 minutes."},"allowed_origins":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Origins","description":"Allowed origins for CORS. When empty or null, any origin can embed the widget."},"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name","description":"Display label for the widget (e.g. which website it serves)"}},"type":"object","required":["name"],"title":"CreateChatWidgetRequest","description":"Create a new chat widget request model"},"CreateCustomerRequest":{"properties":{"firm_name":{"type":"string","title":"Firm Name","description":"The name of the law firm/organization"},"admin_first_name":{"type":"string","title":"Admin First Name","description":"Admin user's first name"},"admin_last_name":{"type":"string","title":"Admin Last Name","description":"Admin user's last name"},"admin_email":{"type":"string","title":"Admin Email","description":"Admin user's email address"},"admin_password":{"type":"string","title":"Admin Password","description":"Admin user's initial password"},"default_timezone":{"type":"string","title":"Default Timezone","description":"Default timezone for the customer"},"set_first_payment_today":{"type":"boolean","title":"Set First Payment Today","description":"Override the first billing date to today if enabled","default":false}},"type":"object","required":["firm_name","admin_first_name","admin_last_name","admin_email","admin_password","default_timezone"],"title":"CreateCustomerRequest","description":"Request to create a new customer with an admin user"},"CreateCustomerResponse":{"properties":{"customer_id":{"type":"string","format":"uuid","title":"Customer Id","description":"The created customer ID"},"customer_name":{"type":"string","title":"Customer Name","description":"The customer name"},"admin_user_id":{"type":"string","format":"uuid","title":"Admin User Id","description":"The created admin user ID"},"admin_email":{"type":"string","title":"Admin Email","description":"The admin user email"}},"type":"object","required":["customer_id","customer_name","admin_user_id","admin_email"],"title":"CreateCustomerResponse","description":"Response for creating a customer"},"CreateDemoCustomerRequest":{"properties":{"firm_name":{"type":"string","minLength":1,"title":"Firm Name"},"admin_email":{"type":"string","minLength":3,"title":"Admin Email"},"admin_password":{"type":"string","minLength":8,"title":"Admin Password"},"default_timezone":{"type":"string","title":"Default Timezone","default":"America/New_York"},"chat_widget":{"anyOf":[{"$ref":"#/components/schemas/DemoChatWidgetInput"},{"type":"null"}]},"intake_form":{"anyOf":[{"$ref":"#/components/schemas/DemoIntakeFormInput"},{"type":"null"}]}},"type":"object","required":["firm_name","admin_email","admin_password"],"title":"CreateDemoCustomerRequest"},"CreateDemoCustomerResponse":{"properties":{"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"customer_name":{"type":"string","title":"Customer Name"},"admin_user_id":{"type":"string","format":"uuid","title":"Admin User Id"},"admin_email":{"type":"string","title":"Admin Email"},"existing":{"type":"boolean","title":"Existing"}},"type":"object","required":["customer_id","customer_name","admin_user_id","admin_email","existing"],"title":"CreateDemoCustomerResponse"},"CreateLeadFieldRequest":{"properties":{"field_api_name":{"type":"string","title":"Field Api Name","description":"Zoho field API name (e.g., 'Lead_Source', 'Industry')"},"field_label":{"type":"string","title":"Field Label","description":"Display label for the field"},"field_data_type":{"type":"string","title":"Field Data Type","description":"Zoho data type (text, picklist, boolean, date, datetime, integer, bigint, currency, decimal)"},"value_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value Text","description":"Value for text/textarea fields"},"value_picklist":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value Picklist","description":"Actual value for picklist fields"},"value_picklist_options":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Value Picklist Options","description":"Available picklist options from Zoho"},"value_boolean":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Value Boolean","description":"Value for boolean fields"},"value_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Value Date","description":"Value for date fields"},"value_datetime":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Value Datetime","description":"Value for datetime fields"},"value_integer":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Value Integer","description":"Value for integer/bigint fields"},"value_decimal":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value Decimal","description":"Value for currency/decimal fields"}},"type":"object","required":["field_api_name","field_label","field_data_type"],"title":"CreateLeadFieldRequest","description":"Request model for creating or updating a lead field configuration"},"CreateMoovAccountRequest":{"properties":{"business_name":{"type":"string","title":"Business Name"},"address":{"$ref":"#/components/schemas/MoovAddress"},"phone":{"$ref":"#/components/schemas/PhoneNumber"},"email":{"type":"string","format":"email","title":"Email"},"terms_of_service_token":{"type":"string","title":"Terms Of Service Token","description":"Token accepting Terms of Service"}},"type":"object","required":["business_name","address","phone","email","terms_of_service_token"],"title":"CreateMoovAccountRequest","description":"Request to create a Moov account with simplified business info."},"CreateMoovAccountResponse":{"properties":{"account_id":{"type":"string","format":"uuid","title":"Account Id"}},"type":"object","required":["account_id"],"title":"CreateMoovAccountResponse","description":"Response after creating Moov account."},"CreateOutboundLeadRequest":{"properties":{"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name","description":"First name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name","description":"Last name"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number","description":"Phone number"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"Email address"},"case_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Case Id","description":"Associated case ID"},"trigger_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Trigger Metadata","description":"Resolved trigger-supplied values, keyed by the customer's configured trigger field keys"}},"type":"object","title":"CreateOutboundLeadRequest","description":"Request to create a new outbound lead."},"CreateQualificationRequest":{"properties":{"case_id":{"type":"string","format":"uuid","title":"Case Id","description":"ID of the case"},"question":{"type":"string","title":"Question","description":"Qualification question to ask"},"criteria":{"type":"string","title":"Criteria","description":"Criteria to evaluate the answer"}},"type":"object","required":["case_id","question","criteria"],"title":"CreateQualificationRequest","description":"Request to create a new qualification for a case."},"CreateQueuedOutboundCallRequest":{"properties":{"outbound_lead_id":{"type":"string","format":"uuid","title":"Outbound Lead Id"}},"type":"object","required":["outbound_lead_id"],"title":"CreateQueuedOutboundCallRequest","description":"Request to create a single queued outbound call."},"CreateReportRequest":{"properties":{"name":{"type":"string","title":"Name","description":"Report name"},"report_type":{"$ref":"#/components/schemas/ReportTypeEnum","description":"Type of report"},"frequency":{"$ref":"#/components/schemas/ReportFrequencyEnum","description":"Report frequency"},"send_time":{"type":"string","title":"Send Time","description":"Time of day to send the report (HH:MM:SS)","default":"08:00:00"},"emails":{"items":{"type":"string"},"type":"array","title":"Emails","description":"List of email addresses"},"user_ids":{"items":{"type":"string"},"type":"array","title":"User Ids","description":"List of user IDs to receive the report"},"staff_group_ids":{"items":{"type":"string"},"type":"array","title":"Staff Group Ids","description":"List of staff group IDs to receive the report"},"leads_summary_include_qualified":{"type":"boolean","title":"Leads Summary Include Qualified","description":"Include qualified leads in leads summary report","default":true},"leads_summary_include_partially_qualified":{"type":"boolean","title":"Leads Summary Include Partially Qualified","description":"Include partially qualified leads in leads summary report","default":true},"leads_summary_include_no_matched_case":{"type":"boolean","title":"Leads Summary Include No Matched Case","description":"Include no matched case leads in leads summary report","default":true}},"type":"object","required":["name","report_type","frequency"],"title":"CreateReportRequest","description":"Create report request model"},"CreateSavedFilterRequest":{"properties":{"view_key":{"type":"string","maxLength":64,"minLength":1,"title":"View Key"},"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"},"filters":{"additionalProperties":true,"type":"object","title":"Filters"}},"type":"object","required":["view_key","name","filters"],"title":"CreateSavedFilterRequest"},"CreateStaffGroupRequest":{"properties":{"name":{"type":"string","title":"Name"},"member_ids":{"items":{"type":"string"},"type":"array","title":"Member Ids","default":[]},"members":{"anyOf":[{"items":{"$ref":"#/components/schemas/StaffGroupMemberInput"},"type":"array"},{"type":"null"}],"title":"Members"},"meeting_duration_minutes":{"type":"integer","title":"Meeting Duration Minutes","default":30},"slot_every_minutes":{"type":"integer","title":"Slot Every Minutes","default":30},"priority_order_enabled":{"type":"boolean","title":"Priority Order Enabled","default":false}},"type":"object","required":["name"],"title":"CreateStaffGroupRequest","description":"Request to create a new staff group"},"CreateTestCalendarEventRequest":{"properties":{"staff_user_id":{"type":"string","format":"uuid","title":"Staff User Id","description":"The staff user whose calendar will receive the event"},"event_datetime":{"type":"string","title":"Event Datetime","description":"Event start time in ISO format"},"duration_minutes":{"type":"integer","title":"Duration Minutes","description":"Event duration in minutes","default":30}},"type":"object","required":["staff_user_id","event_datetime"],"title":"CreateTestCalendarEventRequest","description":"Request to create a test calendar event on a staff member's calendar"},"CreateTestCalendarEventResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the event was created successfully"},"event_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Id","description":"Calendar event ID if successful"},"event_title":{"type":"string","title":"Event Title","description":"Event title that was created"},"calendar_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Calendar Provider","description":"Calendar provider used"},"calendar_timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Calendar Timezone","description":"Booking calendar timezone"},"message":{"type":"string","title":"Message","description":"Status message"}},"type":"object","required":["success","event_title","message"],"title":"CreateTestCalendarEventResponse","description":"Response from creating a test calendar event"},"CreateZohoLeadRequest":{"properties":{"lead_id":{"type":"string","format":"uuid","title":"Lead Id","description":"Internal lead ID to sync to Zoho"}},"type":"object","required":["lead_id"],"title":"CreateZohoLeadRequest","description":"Request to create a Zoho lead from an internal lead"},"CreateZohoLeadResponse":{"properties":{"message":{"type":"string","title":"Message","description":"Status message"},"task_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Id","description":"Celery task ID for tracking"}},"type":"object","required":["message"],"title":"CreateZohoLeadResponse","description":"Response from triggering Zoho lead creation"},"CrooAuditLogItem":{"properties":{"audit_log_id":{"type":"string","format":"uuid","title":"Audit Log Id"},"event_type":{"type":"string","title":"Event Type"},"status":{"type":"string","title":"Status"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"},"call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Call Id"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["audit_log_id","event_type","status","created_at"],"title":"CrooAuditLogItem"},"CrooAuditLogResponse":{"properties":{"entries":{"items":{"$ref":"#/components/schemas/CrooAuditLogItem"},"type":"array","title":"Entries","default":[]},"total":{"type":"integer","title":"Total","default":0}},"type":"object","title":"CrooAuditLogResponse"},"CrooConnectRequest":{"properties":{"username":{"type":"string","title":"Username"},"password":{"type":"string","title":"Password"}},"type":"object","required":["username","password"],"title":"CrooConnectRequest","description":"Request to connect the Croo integration. `username` is the\nCroo-portal-formatted \"<extension>@<short_domain>\" string the operator\ntypes (e.g. \"353@schmidt01\")."},"CrooDisconnectResponse":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"CrooDisconnectResponse"},"CrooExtensionsSettings":{"properties":{"filter_user_exts":{"items":{"type":"string"},"type":"array","title":"Filter User Exts"}},"type":"object","title":"CrooExtensionsSettings","description":"Customer-facing slice of the Croo filter config: just the list of user\nextensions the AI agent handles. The other filter dimensions (caller /\ndialed number, call direction, intake prompt) stay developer-only."},"CrooFilterSettings":{"properties":{"filter_user_exts":{"items":{"type":"string"},"type":"array","title":"Filter User Exts"},"filter_caller_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filter Caller Number"},"filter_dialed_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filter Dialed Number"},"filter_call_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filter Call Type"}},"type":"object","title":"CrooFilterSettings","description":"Developer-panel filter configuration. Empty/None values mean 'no\nconstraint on this dimension'. The sync task fails closed when no\nconstraint is configured at all."},"CrooForceGraduateResponse":{"properties":{"croo_call_id":{"type":"string","format":"uuid","title":"Croo Call Id"},"call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Call Id"},"queued":{"type":"boolean","title":"Queued","default":false},"message":{"type":"string","title":"Message"}},"type":"object","required":["croo_call_id","message"],"title":"CrooForceGraduateResponse","description":"Result of requesting a manual graduate of a parked croo_call. The Call\nis created asynchronously (reusing the screening transcript), so call_id is\npopulated only when the row had already graduated; otherwise clients\nre-poll the review queue (the row leaves it once graduated)."},"CrooIntakePrompt":{"properties":{"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt"},"effective_prompt":{"type":"string","title":"Effective Prompt"},"is_default":{"type":"boolean","title":"Is Default"}},"type":"object","required":["effective_prompt","is_default"],"title":"CrooIntakePrompt","description":"Per-customer intake-screening criteria. `prompt` is None when the\ncustomer hasn't customized it; `effective_prompt` is what the screen\nactually uses (the customer prompt or the built-in default)."},"CrooKnownExtension":{"properties":{"ext":{"type":"string","title":"Ext"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"last_seen":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Seen"},"call_count":{"type":"integer","title":"Call Count","default":0}},"type":"object","required":["ext"],"title":"CrooKnownExtension","description":"An extension we've observed in scraped call history, with the name most\nrecently associated with it. Best-effort — names are inferred from\noutbound call rows (where the from-name belongs to the extension owner),\nso an extension we've never seen place a call won't have a name."},"CrooKnownExtensionsResponse":{"properties":{"extensions":{"items":{"$ref":"#/components/schemas/CrooKnownExtension"},"type":"array","title":"Extensions","default":[]}},"type":"object","title":"CrooKnownExtensionsResponse"},"CrooReviewItem":{"properties":{"croo_call_id":{"type":"string","format":"uuid","title":"Croo Call Id"},"review_status":{"type":"string","title":"Review Status"},"screen_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Screen Reason"},"caller_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caller Number"},"dialed_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dialed Number"},"from_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Name"},"from_user_ext":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From User Ext"},"to_user_ext":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To User Ext"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Time"},"duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Seconds"},"has_recording":{"type":"boolean","title":"Has Recording","default":false},"transcript":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Transcript"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["croo_call_id","review_status","created_at"],"title":"CrooReviewItem","description":"A scraped Croo call awaiting (or rejected by) intake screening, shown\nin the developer review queue."},"CrooReviewQueueResponse":{"properties":{"entries":{"items":{"$ref":"#/components/schemas/CrooReviewItem"},"type":"array","title":"Entries","default":[]},"total":{"type":"integer","title":"Total","default":0}},"type":"object","title":"CrooReviewQueueResponse"},"CrooStatus":{"properties":{"connected":{"type":"boolean","title":"Connected"},"connected_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connected At"},"croo_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Croo Domain"},"croo_user_ext":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Croo User Ext"},"last_sync_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Sync At"},"last_successful_sync_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Successful Sync At"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"last_error_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error At"},"last_error_msg":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error Msg"}},"type":"object","required":["connected"],"title":"CrooStatus","description":"Croo connection status."},"CrooSyncResponse":{"properties":{"task_id":{"type":"string","title":"Task Id"}},"type":"object","required":["task_id"],"title":"CrooSyncResponse","description":"Manual-sync trigger response."},"CustomTriggerEventItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"custom_trigger_source_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Custom Trigger Source Id"},"source_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Name"},"received_at":{"type":"string","format":"date-time","title":"Received At"},"method":{"type":"string","title":"Method"},"path":{"type":"string","title":"Path"},"query_params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Query Params"},"headers":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Headers"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"},"body_raw":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body Raw"},"body_json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Body Json"},"feature_enabled":{"type":"boolean","title":"Feature Enabled"},"processed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Processed At"},"processed_outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processed Outcome"},"processed_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processed Error"},"queued_outbound_call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Queued Outbound Call Id"},"processed_result":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Processed Result"}},"type":"object","required":["id","received_at","method","path","feature_enabled"],"title":"CustomTriggerEventItem","description":"One captured request, verbatim."},"CustomTriggerEventListResponse":{"properties":{"events":{"items":{"$ref":"#/components/schemas/CustomTriggerEventItem"},"type":"array","title":"Events"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["events","total","limit","offset"],"title":"CustomTriggerEventListResponse"},"CustomTriggerMappingItem":{"properties":{"custom_trigger_mapping_id":{"type":"string","format":"uuid","title":"Custom Trigger Mapping Id"},"name":{"type":"string","title":"Name"},"custom_trigger_source_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Custom Trigger Source Id"},"source_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Name"},"match_conditions":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Match Conditions"},"correlation_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Correlation Path"},"correlation_window_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Correlation Window Minutes"},"field_map":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Field Map"},"trigger_metadata_map":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Trigger Metadata Map"},"fire_conditions":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Fire Conditions"},"is_active":{"type":"boolean","title":"Is Active"},"priority":{"type":"integer","title":"Priority"}},"type":"object","required":["custom_trigger_mapping_id","name","is_active","priority"],"title":"CustomTriggerMappingItem","description":"One payload→lead mapping, as configured."},"CustomTriggerMappingListResponse":{"properties":{"mappings":{"items":{"$ref":"#/components/schemas/CustomTriggerMappingItem"},"type":"array","title":"Mappings"}},"type":"object","required":["mappings"],"title":"CustomTriggerMappingListResponse"},"CustomTriggerSettingsResponse":{"properties":{"outbound_lead_creation_enabled":{"type":"boolean","title":"Outbound Lead Creation Enabled"}},"type":"object","required":["outbound_lead_creation_enabled"],"title":"CustomTriggerSettingsResponse","description":"The arm switch: whether captured events create real outbound leads."},"CustomTriggerSettingsUpdate":{"properties":{"outbound_lead_creation_enabled":{"type":"boolean","title":"Outbound Lead Creation Enabled","description":"When false (the default), events are still captured and mapped and the resolved lead is recorded on the event as a dry run, but no OutboundLead or call is created."}},"type":"object","required":["outbound_lead_creation_enabled"],"title":"CustomTriggerSettingsUpdate"},"CustomTriggerSourceItem":{"properties":{"custom_trigger_source_id":{"type":"string","format":"uuid","title":"Custom Trigger Source Id"},"name":{"type":"string","title":"Name"},"token":{"type":"string","title":"Token"},"is_active":{"type":"boolean","title":"Is Active"},"last_event_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Event At"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"event_count":{"type":"integer","title":"Event Count","default":0}},"type":"object","required":["custom_trigger_source_id","name","token","is_active"],"title":"CustomTriggerSourceItem","description":"One of the customer's trigger tokens, with its capture count."},"CustomTriggerSourceListResponse":{"properties":{"sources":{"items":{"$ref":"#/components/schemas/CustomTriggerSourceItem"},"type":"array","title":"Sources"},"orphaned_event_count":{"type":"integer","title":"Orphaned Event Count","default":0}},"type":"object","required":["sources"],"title":"CustomTriggerSourceListResponse"},"CustomerAddress":{"properties":{"address_line1":{"type":"string","maxLength":255,"minLength":1,"title":"Address Line1","description":"Street address"},"address_line2":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Address Line2","description":"Apartment, suite, unit, etc."},"city":{"type":"string","maxLength":100,"minLength":1,"title":"City","description":"City"},"state":{"type":"string","maxLength":2,"minLength":2,"title":"State","description":"Two-letter state code (e.g., NY, CA)"},"zip":{"type":"string","pattern":"^\\d{5}(-\\d{4})?$","title":"Zip","description":"5-digit or 9-digit ZIP code"}},"type":"object","required":["address_line1","city","state","zip"],"title":"CustomerAddress","description":"Physical address for a customer (law firm/organization).","example":{"address_line1":"123 Main Street","address_line2":"Suite 200","city":"New York","state":"NY","zip":"10001"}},"CustomerAvailabilityResponse":{"properties":{"availability_id":{"type":"string","format":"uuid","title":"Availability Id"},"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"day_of_week":{"$ref":"#/components/schemas/DayOfWeek"},"start_time":{"type":"string","format":"time","title":"Start Time"},"end_time":{"type":"string","format":"time","title":"End Time"}},"type":"object","required":["availability_id","customer_id","day_of_week","start_time","end_time"],"title":"CustomerAvailabilityResponse","description":"Response model for customer default availability"},"CustomerBillingHistoryResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/BillingRunItemResponse"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"CustomerBillingHistoryResponse"},"CustomerCalendarSyncResponse":{"properties":{"customer_id":{"type":"string","format":"uuid","title":"Customer Id","description":"The customer ID"},"users_total":{"type":"integer","title":"Users Total","description":"Total number of users"},"users_processed":{"type":"integer","title":"Users Processed","description":"Number of users processed"},"calendars_total":{"type":"integer","title":"Calendars Total","description":"Total number of calendars"},"calendars_refreshed":{"type":"integer","title":"Calendars Refreshed","description":"Number of calendars refreshed"},"total_events":{"type":"integer","title":"Total Events","description":"Total number of events saved"},"errors":{"items":{"type":"string"},"type":"array","title":"Errors","description":"List of errors encountered"}},"type":"object","required":["customer_id","users_total","users_processed","calendars_total","calendars_refreshed","total_events"],"title":"CustomerCalendarSyncResponse","description":"Response for customer calendar sync operation"},"CustomerListItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"Customer UUID"},"name":{"type":"string","title":"Name","description":"Customer name"},"created_at":{"type":"string","title":"Created At","description":"Customer creation timestamp"}},"type":"object","required":["id","name","created_at"],"title":"CustomerListItem","description":"Customer list item for developer tools"},"CustomerMetricsCallStats":{"properties":{"total_calls":{"type":"integer","title":"Total Calls"},"completed_calls":{"type":"integer","title":"Completed Calls"},"failed_calls":{"type":"integer","title":"Failed Calls"},"error_calls":{"type":"integer","title":"Error Calls"},"avg_duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Duration Seconds"},"inbound_calls":{"type":"integer","title":"Inbound Calls"},"outbound_calls":{"type":"integer","title":"Outbound Calls"},"transferred_calls":{"type":"integer","title":"Transferred Calls"},"quality_a":{"type":"integer","title":"Quality A"},"quality_b":{"type":"integer","title":"Quality B"},"quality_c":{"type":"integer","title":"Quality C"},"quality_f":{"type":"integer","title":"Quality F"},"quality_ungraded":{"type":"integer","title":"Quality Ungraded"},"goal_accomplished":{"type":"integer","title":"Goal Accomplished"},"goal_not_accomplished":{"type":"integer","title":"Goal Not Accomplished"},"goal_unknown":{"type":"integer","title":"Goal Unknown"},"caller_hung_up":{"type":"integer","title":"Caller Hung Up"}},"type":"object","required":["total_calls","completed_calls","failed_calls","error_calls","avg_duration_seconds","inbound_calls","outbound_calls","transferred_calls","quality_a","quality_b","quality_c","quality_f","quality_ungraded","goal_accomplished","goal_not_accomplished","goal_unknown","caller_hung_up"],"title":"CustomerMetricsCallStats","description":"Core call statistics - always returned"},"CustomerMetricsCasesSection":{"properties":{"funnel":{"items":{"$ref":"#/components/schemas/CustomerMetricsFunnelStep"},"type":"array","title":"Funnel"},"calls_with_leads_pct":{"type":"number","title":"Calls With Leads Pct"},"calls_with_inquiries_pct":{"type":"number","title":"Calls With Inquiries Pct"},"leads_qualified_pct":{"type":"number","title":"Leads Qualified Pct"},"leads_with_meetings_pct":{"type":"number","title":"Leads With Meetings Pct"},"lead_score_high":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lead Score High"},"lead_score_medium":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lead Score Medium"},"lead_score_low":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lead Score Low"},"lead_score_unknown":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lead Score Unknown"},"lead_score_unscored":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lead Score Unscored"},"new_clients":{"type":"integer","title":"New Clients"},"existing_clients":{"type":"integer","title":"Existing Clients"},"unknown_clients":{"type":"integer","title":"Unknown Clients"}},"type":"object","required":["funnel","calls_with_leads_pct","calls_with_inquiries_pct","leads_qualified_pct","leads_with_meetings_pct","new_clients","existing_clients","unknown_clients"],"title":"CustomerMetricsCasesSection","description":"Metrics for customers with cases enabled"},"CustomerMetricsFunnelStep":{"properties":{"label":{"type":"string","title":"Label"},"count":{"type":"integer","title":"Count"},"percentage":{"type":"number","title":"Percentage"}},"type":"object","required":["label","count","percentage"],"title":"CustomerMetricsFunnelStep","description":"Single step in the funnel visualization"},"CustomerMetricsOutboundSection":{"properties":{"total_outbound_leads":{"type":"integer","title":"Total Outbound Leads"},"not_contacted":{"type":"integer","title":"Not Contacted"},"left_voicemail":{"type":"integer","title":"Left Voicemail"},"declined":{"type":"integer","title":"Declined"},"meeting_booked":{"type":"integer","title":"Meeting Booked"},"no_answer":{"type":"integer","title":"No Answer"},"disqualified":{"type":"integer","title":"Disqualified"},"partially_qualified":{"type":"integer","title":"Partially Qualified"},"qualified":{"type":"integer","title":"Qualified"},"caller_hung_up":{"type":"integer","title":"Caller Hung Up"},"error":{"type":"integer","title":"Error"},"qualification_rate":{"type":"number","title":"Qualification Rate"}},"type":"object","required":["total_outbound_leads","not_contacted","left_voicemail","declined","meeting_booked","no_answer","disqualified","partially_qualified","qualified","caller_hung_up","error","qualification_rate"],"title":"CustomerMetricsOutboundSection","description":"Metrics for customers with outbound enabled"},"CustomerMetricsResponse":{"properties":{"cases_enabled":{"type":"boolean","title":"Cases Enabled"},"leads_enabled":{"type":"boolean","title":"Leads Enabled"},"inquiries_enabled":{"type":"boolean","title":"Inquiries Enabled"},"outbound_enabled":{"type":"boolean","title":"Outbound Enabled"},"lead_scoring_enabled":{"type":"boolean","title":"Lead Scoring Enabled"},"call_stats":{"$ref":"#/components/schemas/CustomerMetricsCallStats"},"cases_section":{"anyOf":[{"$ref":"#/components/schemas/CustomerMetricsCasesSection"},{"type":"null"}]},"outbound_section":{"anyOf":[{"$ref":"#/components/schemas/CustomerMetricsOutboundSection"},{"type":"null"}]}},"type":"object","required":["cases_enabled","leads_enabled","inquiries_enabled","outbound_enabled","lead_scoring_enabled","call_stats"],"title":"CustomerMetricsResponse","description":"Full customer metrics response - sections are null when features disabled"},"CustomerUserItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"User UUID"},"email":{"type":"string","title":"Email","description":"User email"},"name":{"type":"string","title":"Name","description":"User full name"},"user_type":{"type":"string","title":"User Type","description":"User type (admin, staff)"}},"type":"object","required":["id","email","name","user_type"],"title":"CustomerUserItem","description":"Customer user item for dropdown selection"},"DashboardStats":{"properties":{"calls_today":{"type":"integer","title":"Calls Today"},"calls_this_week":{"type":"integer","title":"Calls This Week"},"calls_this_week_change":{"type":"number","title":"Calls This Week Change"},"booked_meetings":{"type":"integer","title":"Booked Meetings"},"booked_meetings_change":{"type":"number","title":"Booked Meetings Change"},"conversion_rate":{"type":"number","title":"Conversion Rate"}},"type":"object","required":["calls_today","calls_this_week","calls_this_week_change","booked_meetings","booked_meetings_change","conversion_rate"],"title":"DashboardStats","description":"Dashboard statistics schema"},"DayOfWeek":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"],"title":"DayOfWeek","description":"Day of week enum"},"DefaultPaymentMethodResponse":{"properties":{"payment_method_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Method Id"},"payment_method_type":{"anyOf":[{"$ref":"#/components/schemas/PaymentMethodType"},{"type":"null"}]}},"type":"object","title":"DefaultPaymentMethodResponse","description":"Response with default payment method info."},"DemoChatWidgetInput":{"properties":{"assistant_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assistant Name"},"greeting_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Greeting Message"},"persona_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Persona Prompt"},"law_firm_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Law Firm Context"},"fields_to_collect":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Fields To Collect"},"intake_goal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intake Goal"}},"type":"object","title":"DemoChatWidgetInput","description":"Optional chat widget config overrides; absent fields use model defaults."},"DemoIntakeFormInput":{"properties":{"form_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Form Title"},"completion_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completion Message"},"law_firm_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Law Firm Context"},"intake_goal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intake Goal"}},"type":"object","title":"DemoIntakeFormInput","description":"Optional intake form config overrides; absent fields use model defaults."},"DevInitCallRequest":{"properties":{"direction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direction","description":"Direction of the call: 'inbound' or 'outbound'","default":"inbound"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number","description":"Phone number associated with the call (defaults to +15555551234)"}},"type":"object","title":"DevInitCallRequest","description":"Request to initialize a call for local development (dev environment only)."},"DevInitCallResponse":{"properties":{"call_id":{"type":"string","format":"uuid","title":"Call Id","description":"The ID of the created call record"},"call":{"$ref":"#/components/schemas/CallResponse","description":"Full call object with all details"}},"type":"object","required":["call_id","call"],"title":"DevInitCallResponse","description":"Response after initializing a development call."},"DeveloperSettingsResponse":{"properties":{"customer_id":{"type":"string","format":"uuid","title":"Customer Id","description":"The customer ID"},"call_started_developer_alert_enabled":{"type":"boolean","title":"Call Started Developer Alert Enabled","description":"Whether SMS alerts are sent when new calls start"},"outbound_developer_alert_enabled":{"type":"boolean","title":"Outbound Developer Alert Enabled","description":"Whether SMS alerts are sent for outbound lead activity"},"unsent_notification_developer_alert_enabled":{"type":"boolean","title":"Unsent Notification Developer Alert Enabled","description":"Whether this customer is included in the unsent-notification-emails watchdog alert"},"grade_alert_threshold":{"type":"string","title":"Grade Alert Threshold","description":"Which grade levels trigger developer alerts (b_and_below, c_and_below, f_only, none)"},"auto_billing_enabled":{"type":"boolean","title":"Auto Billing Enabled","description":"Whether automated daily billing (live, no dry run) is enabled"}},"type":"object","required":["customer_id","call_started_developer_alert_enabled","outbound_developer_alert_enabled","unsent_notification_developer_alert_enabled","grade_alert_threshold","auto_billing_enabled"],"title":"DeveloperSettingsResponse","description":"Response with customer's developer settings"},"DocuSignConnectResponse":{"properties":{"connected":{"type":"boolean","title":"Connected"},"consent_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Consent Url"}},"type":"object","required":["connected"],"title":"DocuSignConnectResponse","description":"Response from initiating a DocuSign connection.\n\nIf admin consent is already granted ``connected`` is ``True`` and\n``consent_url`` is omitted. Otherwise the caller should redirect the\nadmin to ``consent_url`` to complete one-time consent."},"DocuSignCreateEnvelopeRequest":{"properties":{"recipient_email":{"type":"string","title":"Recipient Email"},"recipient_name":{"type":"string","title":"Recipient Name"},"values":{"additionalProperties":true,"type":"object","title":"Values"},"source_transcript":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Transcript"}},"type":"object","required":["recipient_email","recipient_name","values"],"title":"DocuSignCreateEnvelopeRequest","description":"Create a DocuSign envelope from a template + extracted values."},"DocuSignEnvelopeResponse":{"properties":{"docusign_envelope_id":{"type":"string","format":"uuid","title":"Docusign Envelope Id"},"docusign_form_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Docusign Form Id"},"envelope_id_from_docusign":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Envelope Id From Docusign"},"status":{"type":"string","title":"Status"},"recipient_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipient Email"},"recipient_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipient Name"},"sender_view_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender View Url"},"extracted_values":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extracted Values"},"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":["docusign_envelope_id","status"],"title":"DocuSignEnvelopeResponse","description":"A DocuSign envelope row stored in our DB."},"DocuSignEnvelopesResponse":{"properties":{"envelopes":{"items":{"$ref":"#/components/schemas/DocuSignEnvelopeResponse"},"type":"array","title":"Envelopes","default":[]}},"type":"object","title":"DocuSignEnvelopesResponse","description":"Listing of recent envelopes for the current customer."},"DocuSignExtractRequest":{"properties":{"transcript":{"type":"string","minLength":1,"title":"Transcript"}},"type":"object","required":["transcript"],"title":"DocuSignExtractRequest","description":"Run LLM extraction against a transcript for a given form."},"DocuSignExtractResponse":{"properties":{"values":{"additionalProperties":true,"type":"object","title":"Values"}},"type":"object","required":["values"],"title":"DocuSignExtractResponse","description":"Result of an LLM extraction — keyed by tab_label."},"DocuSignExtractedFieldValue":{"properties":{"tab_label":{"type":"string","title":"Tab Label"},"display_name":{"type":"string","title":"Display Name"},"value":{"title":"Value"}},"type":"object","required":["tab_label","display_name","value"],"title":"DocuSignExtractedFieldValue","description":"One extracted value paired with its human-readable label for display."},"DocuSignFormDetailResponse":{"properties":{"docusign_form_id":{"type":"string","format":"uuid","title":"Docusign Form Id"},"template_id":{"type":"string","title":"Template Id"},"name":{"type":"string","title":"Name"},"email_subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Subject"},"extraction_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extraction Prompt"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"last_synced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Synced At"},"fields":{"items":{"$ref":"#/components/schemas/DocuSignFormFieldResponse"},"type":"array","title":"Fields","default":[]}},"type":"object","required":["docusign_form_id","template_id","name"],"title":"DocuSignFormDetailResponse","description":"A DocuSign template plus its fields."},"DocuSignFormFieldResponse":{"properties":{"docusign_form_field_id":{"type":"string","format":"uuid","title":"Docusign Form Field Id"},"tab_label":{"type":"string","title":"Tab Label"},"tab_type":{"type":"string","title":"Tab Type"},"recipient_role_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipient Role Name"},"display_name":{"type":"string","title":"Display Name"},"llm_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Llm Description"},"extract":{"type":"boolean","title":"Extract"}},"type":"object","required":["docusign_form_field_id","tab_label","tab_type","display_name","extract"],"title":"DocuSignFormFieldResponse","description":"A single DocuSign form field (Tab) with sidecar metadata."},"DocuSignFormFieldUpdateRequest":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"llm_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Llm Description"},"extract":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Extract"}},"type":"object","title":"DocuSignFormFieldUpdateRequest","description":"Patch a DocuSign form field's sidecar columns."},"DocuSignFormResponse":{"properties":{"docusign_form_id":{"type":"string","format":"uuid","title":"Docusign Form Id"},"template_id":{"type":"string","title":"Template Id"},"name":{"type":"string","title":"Name"},"email_subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Subject"},"extraction_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extraction Prompt"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"last_synced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Synced At"},"field_count":{"type":"integer","title":"Field Count","default":0}},"type":"object","required":["docusign_form_id","template_id","name"],"title":"DocuSignFormResponse","description":"A DocuSign template synced into our DB."},"DocuSignFormUpdateRequest":{"properties":{"extraction_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extraction Prompt"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"DocuSignFormUpdateRequest","description":"Patch a DocuSign form's editable fields (extraction_prompt, description)."},"DocuSignFormsResponse":{"properties":{"forms":{"items":{"$ref":"#/components/schemas/DocuSignFormResponse"},"type":"array","title":"Forms","default":[]}},"type":"object","title":"DocuSignFormsResponse","description":"Listing of DocuSign forms for a customer."},"DocuSignImportTemplateRequest":{"properties":{"template_id":{"type":"string","title":"Template Id"}},"type":"object","required":["template_id"],"title":"DocuSignImportTemplateRequest"},"DocuSignPreviewFieldResponse":{"properties":{"docusign_form_field_id":{"type":"string","format":"uuid","title":"Docusign Form Field Id"},"tab_label":{"type":"string","title":"Tab Label"},"tab_type":{"type":"string","title":"Tab Type"},"display_name":{"type":"string","title":"Display Name"},"llm_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Llm Description"},"document_id":{"type":"string","title":"Document Id"},"page_number":{"type":"integer","title":"Page Number"},"x_position":{"type":"integer","title":"X Position"},"y_position":{"type":"integer","title":"Y Position"},"width":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Width"},"height":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Height"}},"type":"object","required":["docusign_form_field_id","tab_label","tab_type","display_name","document_id","page_number","x_position","y_position"],"title":"DocuSignPreviewFieldResponse","description":"A positioned DocuSign field for the PDF preview overlay."},"DocuSignPreviewPageResponse":{"properties":{"document_id":{"type":"string","title":"Document Id"},"page_number":{"type":"integer","title":"Page Number"},"width":{"type":"number","title":"Width"},"height":{"type":"number","title":"Height"},"image_base64":{"type":"string","title":"Image Base64"}},"type":"object","required":["document_id","page_number","width","height","image_base64"],"title":"DocuSignPreviewPageResponse","description":"A rendered template PDF page (PNG, base64) plus its dimensions in points."},"DocuSignPreviewResponse":{"properties":{"pages":{"items":{"$ref":"#/components/schemas/DocuSignPreviewPageResponse"},"type":"array","title":"Pages","default":[]},"fields":{"items":{"$ref":"#/components/schemas/DocuSignPreviewFieldResponse"},"type":"array","title":"Fields","default":[]}},"type":"object","title":"DocuSignPreviewResponse","description":"A read-only PDF preview: rendered pages plus positioned fields."},"DocuSignRemoteTemplate":{"properties":{"template_id":{"type":"string","title":"Template Id"},"name":{"type":"string","title":"Name"},"imported":{"type":"boolean","title":"Imported"}},"type":"object","required":["template_id","name","imported"],"title":"DocuSignRemoteTemplate","description":"A template available in the connected DocuSign account."},"DocuSignRemoteTemplatesResponse":{"properties":{"templates":{"items":{"$ref":"#/components/schemas/DocuSignRemoteTemplate"},"type":"array","title":"Templates","default":[]}},"type":"object","title":"DocuSignRemoteTemplatesResponse"},"DocuSignStatus":{"properties":{"connected":{"type":"boolean","title":"Connected"},"connected_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connected At"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"},"account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Id"},"account_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Name"}},"type":"object","required":["connected"],"title":"DocuSignStatus","description":"DocuSign integration connection status."},"DriveBrowseEntry":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"kind":{"type":"string","title":"Kind"}},"type":"object","required":["id","name","kind"],"title":"DriveBrowseEntry","description":"One selectable node in the Drive folder picker."},"DriveBrowseResponse":{"properties":{"entries":{"items":{"$ref":"#/components/schemas/DriveBrowseEntry"},"type":"array","title":"Entries"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"parent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Name"},"at_root":{"type":"boolean","title":"At Root","default":false}},"type":"object","required":["entries"],"title":"DriveBrowseResponse","description":"Children of the browsed location, plus breadcrumb context."},"DriveCaseMatchingSyncRequest":{"properties":{"rebuild":{"type":"boolean","title":"Rebuild","default":false},"matter_folder_depth":{"anyOf":[{"type":"integer","maximum":5.0,"minimum":1.0},{"type":"null"}],"title":"Matter Folder Depth","description":"Folders at depth <= N under the root are matters"},"matter_root_folder_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matter Root Folder Id","description":"Narrower root for the matter mirror (e.g. a shared drive's cases folder). Empty string clears it back to the filing root."}},"type":"object","title":"DriveCaseMatchingSyncRequest","description":"Manual sync trigger; optionally update mirror config first.\n\n``rebuild`` re-baselines the mirror: matters no longer found under the\nconfigured sources are deactivated even if that's most of the mirror.\nUse after changing sources or excludes so no stale rows survive."},"DriveCaseMatchingSyncResponse":{"properties":{"queued":{"type":"boolean","title":"Queued"},"matters_queued":{"type":"boolean","title":"Matters Queued"},"contacts_queued":{"type":"boolean","title":"Contacts Queued"}},"type":"object","required":["queued","matters_queued","contacts_queued"],"title":"DriveCaseMatchingSyncResponse"},"DriveCaseMatchingSyncStatus":{"properties":{"matter_folder_depth":{"type":"integer","title":"Matter Folder Depth","default":2},"matter_root_folder_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matter Root Folder Id"},"content_extraction_enabled":{"type":"boolean","title":"Content Extraction Enabled","default":false},"extraction_status":{"type":"string","title":"Extraction Status","default":"never_run"},"extraction_last_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Extraction Last Run At"},"extraction_last_error_msg":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extraction Last Error Msg"},"profiled_matter_count":{"type":"integer","title":"Profiled Matter Count","default":0},"matters_status":{"type":"string","title":"Matters Status","default":"never_synced"},"matters_last_synced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Matters Last Synced At"},"matters_last_error_msg":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matters Last Error Msg"},"active_matter_count":{"type":"integer","title":"Active Matter Count","default":0},"untagged_matter_count":{"type":"integer","title":"Untagged Matter Count","default":0},"contacts_status":{"type":"string","title":"Contacts Status","default":"never_synced"},"contacts_last_synced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Contacts Last Synced At"},"contacts_last_error_msg":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contacts Last Error Msg"},"active_contact_count":{"type":"integer","title":"Active Contact Count","default":0}},"type":"object","title":"DriveCaseMatchingSyncStatus","description":"Status of the Drive matter + Google contacts mirrors (developer panel)."},"DriveMatterItem":{"properties":{"drive_matter_id":{"type":"string","format":"uuid","title":"Drive Matter Id"},"drive_folder_id":{"type":"string","title":"Drive Folder Id"},"parent_folder_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Folder Id"},"depth":{"type":"integer","title":"Depth"},"name":{"type":"string","title":"Name"},"folder_path":{"type":"string","title":"Folder Path"},"child_file_names":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Child File Names"},"child_folder_names":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Child Folder Names"},"is_active":{"type":"boolean","title":"Is Active"},"last_seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Seen At"},"matter_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matter Status"},"source_folder_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Folder Id"},"profile":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Profile"},"profile_updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Profile Updated At"},"profile_attempted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Profile Attempted At"}},"type":"object","required":["drive_matter_id","drive_folder_id","depth","name","folder_path","is_active"],"title":"DriveMatterItem","description":"One mirrored matter folder, for the developer mirror browser."},"DriveMatterSourceItem":{"properties":{"folder_id":{"type":"string","title":"Folder Id"},"folder_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Folder Label"},"kind":{"type":"string","title":"Kind"}},"type":"object","required":["folder_id","kind"],"title":"DriveMatterSourceItem","description":"A configured matter source folder."},"DriveMattersResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/DriveMatterItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["items","total","page","page_size"],"title":"DriveMattersResponse"},"DriveWriteTestResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"uploaded":{"type":"boolean","title":"Uploaded"},"trashed":{"type":"boolean","title":"Trashed"},"file_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Name"},"failed_stage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failed Stage"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"detail":{"type":"string","title":"Detail"}},"type":"object","required":["success","uploaded","trashed","detail"],"title":"DriveWriteTestResponse","description":"Outcome of a Drive write-access test (upload marker file + trash it)."},"DryRunCaseMatchingResponse":{"properties":{"customer_id":{"type":"string","format":"uuid","title":"Customer Id","description":"The customer ID"},"dry_run_case_matching":{"type":"boolean","title":"Dry Run Case Matching","description":"Whether case matching is in dry-run mode (requires manual approval)"}},"type":"object","required":["customer_id","dry_run_case_matching"],"title":"DryRunCaseMatchingResponse","description":"Response with customer's dry-run case matching setting"},"EmailLogResponse":{"properties":{"email_id":{"type":"string","format":"uuid","title":"Email Id"},"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"inquiry_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Inquiry Id"},"lead_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Lead Id"},"template_name":{"type":"string","title":"Template Name"},"to_recipients":{"items":{"type":"string"},"type":"array","title":"To Recipients"},"cc_recipients":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Cc Recipients"},"bcc_recipients":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Bcc Recipients"},"subject":{"type":"string","title":"Subject"},"template_args":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Template Args"},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sent At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["email_id","customer_id","template_name","to_recipients","subject","created_at"],"title":"EmailLogResponse","description":"Response containing email log details."},"EndConversationResponse":{"properties":{"ended":{"type":"boolean","title":"Ended","description":"True if this call ended the conversation; false if it was already completed/expired"}},"type":"object","required":["ended"],"title":"EndConversationResponse"},"Event":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"start_time":{"type":"string","format":"date-time","title":"Start Time"},"end_time":{"type":"string","format":"date-time","title":"End Time"},"all_day":{"type":"boolean","title":"All Day","default":false},"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"attendees":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Attendees"},"organizer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organizer"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},"type":"object","required":["title","start_time","end_time"],"title":"Event","description":"Standard calendar event model","example":{"all_day":false,"attendees":["john.doe@example.com"],"description":"Initial consultation with John Doe","end_time":"2025-10-15T15:00:00Z","location":"Law Office - Room 201","start_time":"2025-10-15T14:00:00Z","title":"Client Consultation"}},"FeatureFlagsResponse":{"properties":{"cases_enabled":{"type":"boolean","title":"Cases Enabled","description":"Whether cases feature is enabled for this customer"},"leads_enabled":{"type":"boolean","title":"Leads Enabled","description":"Whether leads feature is enabled for this customer"},"messages_enabled":{"type":"boolean","title":"Messages Enabled","description":"Whether messages feature is enabled for this customer"},"case_notes_enabled":{"type":"boolean","title":"Case Notes Enabled","description":"Whether case notes feature is enabled for this customer"},"known_contacts_enabled":{"type":"boolean","title":"Known Contacts Enabled","description":"Whether known contacts feature is enabled for this customer"},"inquiries_enabled":{"type":"boolean","title":"Inquiries Enabled","description":"Whether inquiries feature is enabled for this customer"},"reports_enabled":{"type":"boolean","title":"Reports Enabled","description":"Whether reports feature is enabled for this customer"},"availability_blocks_enabled":{"type":"boolean","title":"Availability Blocks Enabled","description":"Whether availability blocks feature is enabled for this customer"},"outbound_enabled":{"type":"boolean","title":"Outbound Enabled","description":"Whether outbound leads feature is enabled for this customer"},"staff_enabled":{"type":"boolean","title":"Staff Enabled","description":"Whether staff management feature is enabled for this customer"},"practicepanther_enabled":{"type":"boolean","title":"Practicepanther Enabled","description":"Whether PracticePanther integration is enabled for this customer"},"lead_scoring_enabled":{"type":"boolean","title":"Lead Scoring Enabled","description":"Whether lead scoring is enabled for this customer"},"chat_widget_enabled":{"type":"boolean","title":"Chat Widget Enabled","description":"Whether chat widget feature is enabled for this customer"},"info_request_enabled":{"type":"boolean","title":"Info Request Enabled","description":"Whether info request SMS feature is enabled for this customer"},"google_calendar_enabled":{"type":"boolean","title":"Google Calendar Enabled","description":"Whether the Google Workspace integration (calendar/directory) is enabled for this customer (key kept as google_calendar_enabled for compatibility)"},"microsoft365_enabled":{"type":"boolean","title":"Microsoft365 Enabled","description":"Whether Microsoft 365 integration is enabled for this customer"},"zoho_enabled":{"type":"boolean","title":"Zoho Enabled","description":"Whether Zoho integration is enabled for this customer"},"ringcentral_enabled":{"type":"boolean","title":"Ringcentral Enabled","description":"Whether RingCentral integration is enabled for this customer"},"smartadvocate_enabled":{"type":"boolean","title":"Smartadvocate Enabled","description":"Whether SmartAdvocate integration is enabled for this customer"},"intake_forms_enabled":{"type":"boolean","title":"Intake Forms Enabled","description":"Whether intake forms feature is enabled for this customer"},"business_hours_enabled":{"type":"boolean","title":"Business Hours Enabled","description":"Whether business hours feature is enabled for this customer"},"filevine_enabled":{"type":"boolean","title":"Filevine Enabled","description":"Whether Filevine integration is enabled for this customer"},"vxt_enabled":{"type":"boolean","title":"Vxt Enabled","description":"Whether VXT integration is enabled for this customer"},"lead_docket_enabled":{"type":"boolean","title":"Lead Docket Enabled","description":"Whether Lead Docket integration is enabled for this customer"},"croo_enabled":{"type":"boolean","title":"Croo Enabled","description":"Whether Croo integration is enabled for this customer"},"intakes_enabled":{"type":"boolean","title":"Intakes Enabled","description":"Whether the Intakes page (imported intake recordings) is enabled for this customer"},"realtime_transcripts_enabled":{"type":"boolean","title":"Realtime Transcripts Enabled","description":"Whether realtime transcript webhook ingestion is enabled for this customer"},"realtime_lead_scoring_enabled":{"type":"boolean","title":"Realtime Lead Scoring Enabled","description":"Whether the live (mid-call) lead scoring tool is enabled for this customer"},"docusign_enabled":{"type":"boolean","title":"Docusign Enabled","description":"Whether DocuSign integration is enabled for this customer"},"zapier_enabled":{"type":"boolean","title":"Zapier Enabled","description":"Whether the Zapier integration is enabled for this customer"},"law_firm_info_prompt_enabled":{"type":"boolean","title":"Law Firm Info Prompt Enabled","description":"Whether the Law Firm Info Prompt (AI Prompt) settings card is shown for this customer"},"case_match_corrections_enabled":{"type":"boolean","title":"Case Match Corrections Enabled","description":"Whether end users can correct case matches (change matched case / re-run matching) on the call detail page"},"granola_enabled":{"type":"boolean","title":"Granola Enabled","description":"Whether the Granola meeting-notes integration is enabled for this customer"},"ringcentral_outbound_calls_enabled":{"type":"boolean","title":"Ringcentral Outbound Calls Enabled","description":"Whether staged RingCentral outbound calls graduate into canonical call records for this customer"},"transcript_filing_enabled":{"type":"boolean","title":"Transcript Filing Enabled","description":"Whether the Google Drive transcript-filing automation is enabled for this customer"},"google_contacts_sync_enabled":{"type":"boolean","title":"Google Contacts Sync Enabled","description":"Whether Google contacts sync is enabled for this customer (scopes only for now; no sync behavior yet)"},"google_email_sync_enabled":{"type":"boolean","title":"Google Email Sync Enabled","description":"Whether Google email (Gmail) sync is enabled for this customer (scopes only for now; no sync behavior yet)"},"clio_enabled":{"type":"boolean","title":"Clio Enabled","description":"Whether the Clio Manage integration is enabled for this customer"},"clio_grow_enabled":{"type":"boolean","title":"Clio Grow Enabled","description":"Whether the Clio Grow integration is enabled for this customer"},"drive_case_matching_enabled":{"type":"boolean","title":"Drive Case Matching Enabled","description":"Whether case matching uses the Google Drive matter mirror as the case provider for this customer"},"rc_contact_sync_enabled":{"type":"boolean","title":"Rc Contact Sync Enabled","description":"Whether Google contacts are proposed for sync into the customer's RingCentral address book (separate RC contacts app)"},"custom_trigger_enabled":{"type":"boolean","title":"Custom Trigger Enabled","description":"Whether custom trigger webhook endpoints are enabled for this customer"},"ghl_enabled":{"type":"boolean","title":"Ghl Enabled","description":"Whether the GoHighLevel integration is enabled for this customer"},"onedrive_enabled":{"type":"boolean","title":"Onedrive Enabled","description":"Whether the OneDrive integration (call transcript/recording upload) is enabled for this customer"},"vapi_transfers_enabled":{"type":"boolean","title":"Vapi Transfers Enabled","description":"Whether Vapi-native transferCall warm transfers (Vapi owns the Twilio bridge) are enabled for this customer — records the whole parent Twilio call so the post-transfer staff conversation is captured. Distinct from VXT blind transfers and the attended-transfer (provider-bypass) flow"},"transfer_destinations_enabled":{"type":"boolean","title":"Transfer Destinations Enabled","description":"Whether the Transfer Destinations settings page (named transfer phone numbers) is enabled for this customer"},"test_transfer_numbers_enabled":{"type":"boolean","title":"Test Transfer Numbers Enabled","description":"Whether test calls resolve dynamic transfers to each destination's test phone number instead of the real number"},"netsapiens_enabled":{"type":"boolean","title":"Netsapiens Enabled","description":"Whether the NetSapiens PBX integration (on-call queue reconciliation) is enabled for this customer"},"on_call_schedule_enabled":{"type":"boolean","title":"On Call Schedule Enabled","description":"Whether the on-call schedule calendar is enabled for this customer"},"bounce_back_enabled":{"type":"boolean","title":"Bounce Back Enabled","description":"Whether bounce-back handling is enabled: calls to a bounce-back number are matched to the caller's recent transferred-out call and the original conversation is injected into the bounce-back squad"},"transfer_metrics_enabled":{"type":"boolean","title":"Transfer Metrics Enabled","description":"Whether the Transfer Metrics dashboard (team pickup/missed rates) is visible to this customer's admins"},"pbx_recording_stitch_enabled":{"type":"boolean","title":"Pbx Recording Stitch Enabled","description":"Whether answered transfers hold their pipeline for the staff-side PBX recording to be fetched, transcribed, and stitched (full-conversation grading/summaries)"}},"type":"object","required":["cases_enabled","leads_enabled","messages_enabled","case_notes_enabled","known_contacts_enabled","inquiries_enabled","reports_enabled","availability_blocks_enabled","outbound_enabled","staff_enabled","practicepanther_enabled","lead_scoring_enabled","chat_widget_enabled","info_request_enabled","google_calendar_enabled","microsoft365_enabled","zoho_enabled","ringcentral_enabled","smartadvocate_enabled","intake_forms_enabled","business_hours_enabled","filevine_enabled","vxt_enabled","lead_docket_enabled","croo_enabled","intakes_enabled","realtime_transcripts_enabled","realtime_lead_scoring_enabled","docusign_enabled","zapier_enabled","law_firm_info_prompt_enabled","case_match_corrections_enabled","granola_enabled","ringcentral_outbound_calls_enabled","transcript_filing_enabled","google_contacts_sync_enabled","google_email_sync_enabled","clio_enabled","clio_grow_enabled","drive_case_matching_enabled","rc_contact_sync_enabled","custom_trigger_enabled","ghl_enabled","onedrive_enabled","vapi_transfers_enabled","transfer_destinations_enabled","test_transfer_numbers_enabled","netsapiens_enabled","on_call_schedule_enabled","bounce_back_enabled","transfer_metrics_enabled","pbx_recording_stitch_enabled"],"title":"FeatureFlagsResponse","description":"Feature flags response model"},"FieldToCollect":{"properties":{"key":{"type":"string","title":"Key","description":"Unique field identifier (e.g. 'name', 'phone', 'email')"},"label":{"type":"string","title":"Label","description":"Human-readable label (e.g. 'Full Name', 'Phone Number')"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Hint for the AI on how to collect this field"},"required_for_lead":{"type":"boolean","title":"Required For Lead","description":"Whether this field must be collected before a lead can be generated","default":false}},"type":"object","required":["key","label"],"title":"FieldToCollect","description":"Definition of a field the chat widget should collect from visitors"},"FilenameTemplatePreviewRequest":{"properties":{"template":{"type":"string","title":"Template"},"source_type":{"type":"string","title":"Source Type","default":"granola_note"}},"type":"object","required":["template"],"title":"FilenameTemplatePreviewRequest","description":"Render a template against sample values so a developer can see the\nresult before saving it."},"FilenameTemplatePreviewResponse":{"properties":{"filename":{"type":"string","title":"Filename"},"observed_examples":{"items":{"type":"string"},"type":"array","title":"Observed Examples"}},"type":"object","required":["filename"],"title":"FilenameTemplatePreviewResponse"},"FilevineAuditLogItem":{"properties":{"event_type":{"type":"string","title":"Event Type"},"status":{"type":"string","title":"Status"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["event_type","status","created_at"],"title":"FilevineAuditLogItem","description":"An audit log entry for Filevine"},"FilevineAuditLogResponse":{"properties":{"entries":{"items":{"$ref":"#/components/schemas/FilevineAuditLogItem"},"type":"array","title":"Entries","default":[]},"total":{"type":"integer","title":"Total","default":0}},"type":"object","title":"FilevineAuditLogResponse","description":"Response from listing Filevine audit logs"},"FilevineConnectRequest":{"properties":{"client_id":{"type":"string","title":"Client Id"},"client_secret":{"type":"string","title":"Client Secret"},"pat":{"type":"string","title":"Pat"}},"type":"object","required":["client_id","client_secret","pat"],"title":"FilevineConnectRequest","description":"Request to connect Filevine integration"},"FilevineContactItem":{"properties":{"contact_id":{"type":"integer","title":"Contact Id"},"first_name":{"type":"string","title":"First Name","default":""},"last_name":{"type":"string","title":"Last Name","default":""},"email":{"type":"string","title":"Email","default":""},"mobile":{"type":"string","title":"Mobile","default":""},"phone_office":{"type":"string","title":"Phone Office","default":""},"phone_home":{"type":"string","title":"Phone Home","default":""},"person_types":{"items":{"type":"string"},"type":"array","title":"Person Types","default":[]}},"type":"object","required":["contact_id"],"title":"FilevineContactItem","description":"A locally synced contact from Filevine"},"FilevineCreateContactRequest":{"properties":{"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","default":""},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number","default":""},"person_types":{"items":{"anyOf":[{"$ref":"#/components/schemas/FilevinePersonType"},{"type":"string"}]},"type":"array","minItems":1,"title":"Person Types"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes","default":""}},"type":"object","required":["first_name","last_name","person_types"],"title":"FilevineCreateContactRequest","description":"Request to create a contact in Filevine"},"FilevineCreateContactResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"filevine_contact_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Filevine Contact Id"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","message"],"title":"FilevineCreateContactResponse","description":"Response from creating a contact in Filevine"},"FilevineCreateNoteRequest":{"properties":{"project_id":{"type":"integer","title":"Project Id"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body","default":""},"type_tag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type Tag"}},"type":"object","required":["project_id"],"title":"FilevineCreateNoteRequest","description":"Request to create a note on a Filevine project"},"FilevineCreateNoteResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","message"],"title":"FilevineCreateNoteResponse","description":"Response from creating a note in Filevine"},"FilevineCreateProjectRequest":{"properties":{"contact_id":{"type":"integer","title":"Contact Id"},"project_type_id":{"type":"integer","title":"Project Type Id"},"project_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Name","default":""},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","default":""},"incident_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Incident Date"}},"type":"object","required":["contact_id","project_type_id"],"title":"FilevineCreateProjectRequest","description":"Request to create a project in Filevine"},"FilevineCreateProjectResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"filevine_project_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Filevine Project Id"},"project_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Name"},"project_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Number"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","message"],"title":"FilevineCreateProjectResponse","description":"Response from creating a project in Filevine"},"FilevineDisconnectResponse":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"FilevineDisconnectResponse","description":"Response from disconnecting Filevine"},"FilevineDraftContactPromoteRequest":{"properties":{"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","default":""},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number","default":""},"person_types":{"items":{"anyOf":[{"$ref":"#/components/schemas/FilevinePersonType"},{"type":"string"}]},"type":"array","minItems":1,"title":"Person Types"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes","default":""}},"type":"object","required":["first_name","last_name","person_types"],"title":"FilevineDraftContactPromoteRequest","description":"Request to promote a draft Filevine contact to a real contact in Filevine."},"FilevineDraftContactResponse":{"properties":{"filevine_contact_id":{"type":"string","format":"uuid","title":"Filevine Contact Id"},"call_id":{"type":"string","format":"uuid","title":"Call Id"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"mobile":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mobile"},"phone_office":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Office"},"phone_home":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Home"},"person_types":{"items":{"type":"string"},"type":"array","title":"Person Types","default":[]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"is_draft":{"type":"boolean","title":"Is Draft","default":true},"filevine_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Filevine Id"},"matched_from_phone":{"type":"boolean","title":"Matched From Phone","default":false},"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":["filevine_contact_id","call_id","created_at"],"title":"FilevineDraftContactResponse","description":"LLM-drafted Filevine contact derived from a call transcript (not yet synced)."},"FilevineDraftGenerationContextResponse":{"properties":{"customer_id":{"type":"string","format":"uuid","title":"Customer Id","description":"The customer ID"},"draft_generation_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Draft Generation Context","description":"Optional context to include in LLM prompt for Filevine draft contact generation"}},"type":"object","required":["customer_id"],"title":"FilevineDraftGenerationContextResponse","description":"Response with customer's Filevine draft generation context"},"FilevineListContactsResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"contacts":{"items":{"$ref":"#/components/schemas/FilevineContactItem"},"type":"array","title":"Contacts","default":[]},"total":{"type":"integer","title":"Total","default":0},"has_more":{"type":"boolean","title":"Has More","default":false}},"type":"object","required":["success"],"title":"FilevineListContactsResponse","description":"Response from listing locally synced contacts"},"FilevineListProjectsResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"projects":{"items":{"$ref":"#/components/schemas/FilevineProjectItem"},"type":"array","title":"Projects","default":[]},"total":{"type":"integer","title":"Total","default":0},"has_more":{"type":"boolean","title":"Has More","default":false}},"type":"object","required":["success"],"title":"FilevineListProjectsResponse","description":"Response from listing projects"},"FilevinePersonType":{"type":"string","enum":["Adjuster","Attorney","Client","Court","Defendant","Plaintiff","Expert","Firm","Insurance Company","Involved Party","Judge","Medical Provider"],"title":"FilevinePersonType","description":"Standard person types accepted by Filevine's Contact API.\n\nSource: FV.App.API.json `definitions.Contact.properties.PersonTypes.description`.\nOrgs may also define custom person types, which are passed through as plain strings."},"FilevineProjectItem":{"properties":{"project_id":{"type":"integer","title":"Project Id"},"name":{"type":"string","title":"Name","default":""},"status":{"type":"string","title":"Status","default":""},"project_number":{"type":"string","title":"Project Number","default":""},"project_type_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Project Type Id"}},"type":"object","required":["project_id"],"title":"FilevineProjectItem","description":"A locally synced project from Filevine"},"FilevineProjectTypeItem":{"properties":{"project_type_id":{"type":"integer","title":"Project Type Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["project_type_id","name"],"title":"FilevineProjectTypeItem","description":"A project type from Filevine"},"FilevineProjectTypesResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"project_types":{"items":{"$ref":"#/components/schemas/FilevineProjectTypeItem"},"type":"array","title":"Project Types","default":[]}},"type":"object","required":["success"],"title":"FilevineProjectTypesResponse","description":"Response from listing project types"},"FilevineSettingsResponse":{"properties":{"default_project_type_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Default Project Type Id"},"dry_run":{"type":"boolean","title":"Dry Run","default":true},"blocked_contact_types":{"items":{"type":"string"},"type":"array","title":"Blocked Contact Types"}},"type":"object","title":"FilevineSettingsResponse","description":"Filevine settings response model"},"FilevineStatus":{"properties":{"connected":{"type":"boolean","title":"Connected"},"connected_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connected At"},"token_expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Expires At"}},"type":"object","required":["connected"],"title":"FilevineStatus","description":"Filevine connection status"},"FilevineSyncResponse":{"properties":{"message":{"type":"string","title":"Message"},"task_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Id"}},"type":"object","required":["message"],"title":"FilevineSyncResponse","description":"Response from triggering Filevine sync"},"FilevineUpdateContactRequest":{"properties":{"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"},"person_types":{"anyOf":[{"items":{"anyOf":[{"$ref":"#/components/schemas/FilevinePersonType"},{"type":"string"}]},"type":"array"},{"type":"null"}],"title":"Person Types"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"FilevineUpdateContactRequest","description":"Request to update a contact in Filevine (all fields optional)"},"FilevineUpdateContactResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","message"],"title":"FilevineUpdateContactResponse","description":"Response from updating a contact in Filevine"},"FilevineUpdateProjectRequest":{"properties":{"project_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"incident_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Incident Date"},"number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Number"},"phase_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Phase Id"}},"type":"object","title":"FilevineUpdateProjectRequest","description":"Request to update a project in Filevine (all fields optional)"},"FilevineUpdateProjectResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","message"],"title":"FilevineUpdateProjectResponse","description":"Response from updating a project in Filevine"},"FilingControlsResponse":{"properties":{"granola":{"$ref":"#/components/schemas/FilingSourceControl"},"ringcentral":{"$ref":"#/components/schemas/FilingSourceControl"}},"type":"object","required":["granola","ringcentral"],"title":"FilingControlsResponse"},"FilingDestinationItem":{"properties":{"folder_id":{"type":"string","title":"Folder Id"},"name":{"type":"string","title":"Name"},"folder_path":{"type":"string","title":"Folder Path"},"matter_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matter Status"}},"type":"object","required":["folder_id","name","folder_path"],"title":"FilingDestinationItem","description":"One candidate destination from the mirrored matter folders."},"FilingDestinationsResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/FilingDestinationItem"},"type":"array","title":"Items"},"lead_folder_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lead Folder Label"}},"type":"object","required":["items"],"title":"FilingDestinationsResponse"},"FilingSourceControl":{"properties":{"source_enabled":{"type":"boolean","title":"Source Enabled"},"toggle_exposed":{"type":"boolean","title":"Toggle Exposed"},"auto_file":{"type":"boolean","title":"Auto File"}},"type":"object","required":["source_enabled","toggle_exposed","auto_file"],"title":"FilingSourceControl","description":"One source's auto-file state as the customer sees it.\n\n``auto_file`` is the customer-facing inverse of the developer's dry-run\nflag; \"dry run\" never appears in customer-facing language."},"FirmAdmin":{"properties":{"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"email":{"type":"string","title":"Email"}},"type":"object","required":["first_name","last_name","email"],"title":"FirmAdmin","description":"A single admin user of the firm"},"FirmInformationResponse":{"properties":{"firm_name":{"type":"string","title":"Firm Name"},"admins":{"items":{"$ref":"#/components/schemas/FirmAdmin"},"type":"array","title":"Admins"},"default_timezone":{"type":"string","title":"Default Timezone"}},"type":"object","required":["firm_name","admins","default_timezone"],"title":"FirmInformationResponse","description":"Firm information response model"},"ForceMatchRequest":{"properties":{"call_id":{"type":"string","format":"uuid","title":"Call Id"},"event_id":{"type":"string","format":"uuid","title":"Event Id"}},"type":"object","required":["call_id","event_id"],"title":"ForceMatchRequest","description":"Manually link a vxt_webhook_event to a call and trigger stitching."},"ForceProcessNextCallResponse":{"properties":{"task_id":{"type":"string","title":"Task Id"},"message":{"type":"string","title":"Message"}},"type":"object","required":["task_id","message"],"title":"ForceProcessNextCallResponse","description":"Response from force-processing the next queued call."},"ForgotPasswordRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email","description":"Email address"}},"type":"object","required":["email"],"title":"ForgotPasswordRequest","description":"Request to send a password reset link"},"FormInitRequest":{"properties":{"firm_id":{"type":"string","title":"Firm Id","description":"Customer/firm identifier"},"origin_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Url","description":"Page URL where form was started"},"visitor_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visitor Id","description":"Persistent visitor identifier from localStorage"},"is_test":{"type":"boolean","title":"Is Test","description":"Whether this is a test session","default":false},"visitor_language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visitor Language","description":"Visitor's browser language tag (e.g., 'es-419'); resolved against the supported-language registry"}},"type":"object","required":["firm_id"],"title":"FormInitRequest"},"FormInitResponse":{"properties":{"session_id":{"type":"string","format":"uuid","title":"Session Id"},"session_token":{"type":"string","title":"Session Token"},"first_question":{"anyOf":[{"$ref":"#/components/schemas/FormQuestionData"},{"type":"null"}]},"widget_config":{"$ref":"#/components/schemas/FormWidgetConfigResponse"},"language_code":{"type":"string","title":"Language Code","default":"en"},"language_selector_required":{"type":"boolean","title":"Language Selector Required","default":false}},"type":"object","required":["session_id","session_token","widget_config"],"title":"FormInitResponse"},"FormMetricsResponse":{"properties":{"forms_today":{"type":"integer","title":"Forms Today"},"forms_this_week":{"type":"integer","title":"Forms This Week"},"total_forms":{"type":"integer","title":"Total Forms"}},"type":"object","required":["forms_today","forms_this_week","total_forms"],"title":"FormMetricsResponse"},"FormPipelineResponse":{"properties":{"session_id":{"type":"string","format":"uuid","title":"Session Id"},"summarization_status":{"type":"string","title":"Summarization Status"},"classification_status":{"type":"string","title":"Classification Status"},"summarization_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summarization Error"},"classification_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Classification 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":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["session_id","summarization_status","classification_status","created_at"],"title":"FormPipelineResponse"},"FormQuestionData":{"properties":{"question_text":{"type":"string","title":"Question Text"},"answer_format":{"type":"string","title":"Answer Format"},"options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Options"}},"type":"object","required":["question_text","answer_format"],"title":"FormQuestionData"},"FormResponseData":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"sequence_number":{"type":"integer","title":"Sequence Number"},"question_text":{"type":"string","title":"Question Text"},"answer_format":{"type":"string","title":"Answer Format"},"options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Options"},"answer_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Answer Text"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","sequence_number","question_text","answer_format","created_at"],"title":"FormResponseData"},"FormResponsesResponse":{"properties":{"session_id":{"type":"string","format":"uuid","title":"Session Id"},"responses":{"items":{"$ref":"#/components/schemas/FormResponseData"},"type":"array","title":"Responses"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["session_id","responses","status","created_at"],"title":"FormResponsesResponse"},"FormSessionDetailResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"visitor_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visitor Name"},"visitor_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visitor Phone"},"visitor_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visitor Email"},"status":{"type":"string","title":"Status"},"response_count":{"type":"integer","title":"Response Count","default":0},"origin_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Url"},"ip_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip Address"},"is_test":{"type":"boolean","title":"Is Test","default":false},"extracted_first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extracted First Name"},"extracted_last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extracted Last Name"},"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"},"duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Seconds"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"responses":{"items":{"$ref":"#/components/schemas/FormResponseData"},"type":"array","title":"Responses"},"pipeline":{"anyOf":[{"$ref":"#/components/schemas/FormPipelineResponse"},{"type":"null"}]},"summary":{"anyOf":[{"$ref":"#/components/schemas/FormSummaryResponse"},{"type":"null"}]},"lead":{"anyOf":[{"$ref":"#/components/schemas/LeadResponse"},{"type":"null"}]},"next_session_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next Session Id"},"previous_session_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Previous Session Id"}},"type":"object","required":["id","status","created_at","responses"],"title":"FormSessionDetailResponse"},"FormSessionListItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"visitor_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visitor Name"},"visitor_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visitor Phone"},"visitor_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visitor Email"},"status":{"type":"string","title":"Status"},"response_count":{"type":"integer","title":"Response Count","default":0},"origin_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Url"},"ip_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip Address"},"is_test":{"type":"boolean","title":"Is Test","default":false},"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"},"duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Seconds"},"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","status","created_at"],"title":"FormSessionListItem"},"FormSessionListResponse":{"properties":{"sessions":{"items":{"$ref":"#/components/schemas/FormSessionListItem"},"type":"array","title":"Sessions"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["sessions","total"],"title":"FormSessionListResponse"},"FormSummaryResponse":{"properties":{"session_id":{"type":"string","format":"uuid","title":"Session Id"},"short_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Short Summary"},"long_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Long Summary"},"skipped":{"type":"boolean","title":"Skipped","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["session_id","created_at"],"title":"FormSummaryResponse"},"FormWidgetConfigResponse":{"properties":{"accent_color":{"type":"string","title":"Accent Color"},"form_title":{"type":"string","title":"Form Title"},"enabled":{"type":"boolean","title":"Enabled","default":false},"completion_message":{"type":"string","title":"Completion Message"},"default_language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Language"},"language_selector_enabled":{"type":"boolean","title":"Language Selector Enabled","default":false},"language_selector_options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Language Selector Options"}},"type":"object","required":["accent_color","form_title","completion_message"],"title":"FormWidgetConfigResponse"},"GenerateReceiptRequest":{"properties":{"receipt_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Receipt Number"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"tax_percentage":{"anyOf":[{"type":"number"},{"type":"string"}],"title":"Tax Percentage","default":"0.0"},"description":{"type":"string","title":"Description","default":"OpenIntake Answering Service"},"billing_run_item_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Billing Run Item Id"}},"type":"object","title":"GenerateReceiptRequest","description":"Request to generate a receipt for a customer."},"GhlApproveResponse":{"properties":{"status":{"type":"string","title":"Status"},"response_status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Response Status Code"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["status"],"title":"GhlApproveResponse","description":"Result of approving a queued GoHighLevel push"},"GhlAuditLogItem":{"properties":{"audit_log_id":{"type":"string","format":"uuid","title":"Audit Log Id"},"lead_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Lead Id"},"call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Call Id"},"event_type":{"type":"string","title":"Event Type"},"status":{"type":"string","title":"Status"},"endpoint_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Endpoint Url"},"request_payload":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Request Payload"},"response_status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Response Status Code"},"response_body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Body"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sent At"}},"type":"object","required":["audit_log_id","event_type","status","created_at"],"title":"GhlAuditLogItem","description":"One GoHighLevel audit-log entry"},"GhlAuditLogResponse":{"properties":{"entries":{"items":{"$ref":"#/components/schemas/GhlAuditLogItem"},"type":"array","title":"Entries","default":[]},"total":{"type":"integer","title":"Total","default":0}},"type":"object","title":"GhlAuditLogResponse","description":"GoHighLevel audit-log page"},"GhlAuthorizationUrl":{"properties":{"authorization_url":{"type":"string","title":"Authorization Url"}},"type":"object","required":["authorization_url"],"title":"GhlAuthorizationUrl","description":"GoHighLevel OAuth authorization URL response"},"GhlCardStatusResponse":{"properties":{"visible":{"type":"boolean","title":"Visible","description":"Whether to render the card at all"},"is_test_call":{"type":"boolean","title":"Is Test Call","default":false},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","description":"sent | pending | skipped | failed"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"contact":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Contact","description":"The contact upsert payload"},"opportunity":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Opportunity","description":"The opportunity create payload"},"pipeline_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pipeline Name"},"pipeline_stage_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pipeline Stage Name"},"contact_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Url","description":"Deep link to the contact in GHL (sent pushes only)"},"should_poll":{"type":"boolean","title":"Should Poll","description":"True while a result may still be materializing","default":false}},"type":"object","required":["visible"],"title":"GhlCardStatusResponse","description":"Display-ready GoHighLevel status for the customer-facing detail card.\n\n``status`` is one of ``sent`` / ``pending`` / ``skipped`` / ``failed``\n(derived from the latest GHL audit entry for the lead). ``contact`` and\n``opportunity`` hold the built payloads — populated even for skipped test\ncalls and dry-run pending pushes so the card can show what would have\nbeen / will be sent."},"GhlConfigResponse":{"properties":{"pipeline_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pipeline Id"},"pipeline_stage_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pipeline Stage Id"},"pipeline_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pipeline Name"},"pipeline_stage_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pipeline Stage Name"},"opportunity_name_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Opportunity Name Template"},"contact_tags":{"items":{"type":"string"},"type":"array","title":"Contact Tags","default":[]},"contact_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Source"},"dry_run":{"type":"boolean","title":"Dry Run","default":true}},"type":"object","title":"GhlConfigResponse","description":"GoHighLevel per-customer configuration"},"GhlConfigUpdate":{"properties":{"pipeline_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pipeline Id"},"pipeline_stage_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pipeline Stage Id"},"pipeline_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pipeline Name"},"pipeline_stage_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pipeline Stage Name"},"opportunity_name_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Opportunity Name Template"},"contact_tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Contact Tags"},"contact_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Source"},"dry_run":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dry Run"}},"type":"object","title":"GhlConfigUpdate","description":"Partial update for the GoHighLevel configuration"},"GhlFieldItem":{"properties":{"id":{"type":"string","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"field_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Field Key"},"data_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data Type"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"picklist_options":{"items":{"type":"string"},"type":"array","title":"Picklist Options","default":[]}},"type":"object","required":["id"],"title":"GhlFieldItem","description":"A GoHighLevel custom field (live metadata from the connected location)"},"GhlFieldMappingCreate":{"properties":{"ghl_field_id":{"type":"string","minLength":1,"title":"Ghl Field Id"},"ghl_field_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ghl Field Key"},"ghl_field_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ghl Field Name"},"ghl_field_data_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ghl Field Data Type"},"ghl_field_model":{"type":"string","title":"Ghl Field Model","default":"contact"},"picklist_options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Picklist Options"},"source_type":{"type":"string","title":"Source Type"},"source_key":{"type":"string","title":"Source Key","default":""},"constant_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Constant Value"},"display_order":{"type":"integer","title":"Display Order","default":0}},"type":"object","required":["ghl_field_id","source_type"],"title":"GhlFieldMappingCreate","description":"Create a lead → GHL custom-field mapping"},"GhlFieldMappingItem":{"properties":{"ghl_field_mapping_id":{"type":"string","format":"uuid","title":"Ghl Field Mapping Id"},"ghl_field_id":{"type":"string","title":"Ghl Field Id"},"ghl_field_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ghl Field Key"},"ghl_field_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ghl Field Name"},"ghl_field_data_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ghl Field Data Type"},"ghl_field_model":{"type":"string","title":"Ghl Field Model","default":"contact"},"picklist_options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Picklist Options"},"source_type":{"type":"string","title":"Source Type"},"source_key":{"type":"string","title":"Source Key","default":""},"constant_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Constant Value"},"display_order":{"type":"integer","title":"Display Order","default":0}},"type":"object","required":["ghl_field_mapping_id","ghl_field_id","source_type"],"title":"GhlFieldMappingItem","description":"One configured lead → GHL custom-field mapping"},"GhlFieldMappingListResponse":{"properties":{"mappings":{"items":{"$ref":"#/components/schemas/GhlFieldMappingItem"},"type":"array","title":"Mappings","default":[]}},"type":"object","title":"GhlFieldMappingListResponse","description":"All configured GHL field mappings for this customer"},"GhlFieldMappingUpdate":{"properties":{"ghl_field_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ghl Field Id"},"ghl_field_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ghl Field Key"},"ghl_field_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ghl Field Name"},"ghl_field_data_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ghl Field Data Type"},"ghl_field_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ghl Field Model"},"picklist_options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Picklist Options"},"source_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Type"},"source_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Key"},"constant_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Constant Value"},"display_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Display Order"}},"type":"object","title":"GhlFieldMappingUpdate","description":"Partial update for a lead → GHL custom-field mapping"},"GhlFieldsResponse":{"properties":{"fields":{"items":{"$ref":"#/components/schemas/GhlFieldItem"},"type":"array","title":"Fields","default":[]}},"type":"object","title":"GhlFieldsResponse","description":"Custom fields available in the connected GoHighLevel location"},"GhlPendingPushItem":{"properties":{"audit_log_id":{"type":"string","format":"uuid","title":"Audit Log Id"},"lead_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Lead Id"},"request_payload":{"additionalProperties":true,"type":"object","title":"Request Payload","default":{}},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["audit_log_id","created_at"],"title":"GhlPendingPushItem","description":"A queued (dry-run) GoHighLevel push awaiting developer approval"},"GhlPipeline":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"stages":{"items":{"$ref":"#/components/schemas/GhlPipelineStage"},"type":"array","title":"Stages","default":[]}},"type":"object","required":["id","name"],"title":"GhlPipeline","description":"A GoHighLevel opportunity pipeline with its stages"},"GhlPipelineStage":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"GhlPipelineStage","description":"A stage within a GoHighLevel pipeline"},"GhlPipelinesResponse":{"properties":{"pipelines":{"items":{"$ref":"#/components/schemas/GhlPipeline"},"type":"array","title":"Pipelines","default":[]}},"type":"object","title":"GhlPipelinesResponse","description":"Pipelines available in the connected GoHighLevel location"},"GhlStatus":{"properties":{"connected":{"type":"boolean","title":"Connected"},"connected_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connected At"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"},"location_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location Id"}},"type":"object","required":["connected"],"title":"GhlStatus","description":"GoHighLevel connection status"},"GoogleCalendarListResponse":{"properties":{"calendars":{"items":{"$ref":"#/components/schemas/app__calendar__schemas__GoogleCalendarItem"},"type":"array","title":"Calendars"}},"type":"object","required":["calendars"],"title":"GoogleCalendarListResponse","description":"Response model for list of Google Calendars"},"GoogleCalendarsResponse":{"properties":{"connected":{"type":"boolean","title":"Connected","description":"Whether Google is connected"},"calendars":{"items":{"$ref":"#/components/schemas/app__developer__schemas__GoogleCalendarItem"},"type":"array","title":"Calendars","description":"List of calendars"}},"type":"object","required":["connected"],"title":"GoogleCalendarsResponse","description":"Response with list of Google calendars"},"GoogleWorkspaceAdminResponse":{"properties":{"customer_id":{"type":"string","format":"uuid","title":"Customer Id","description":"The customer ID"},"admin_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Admin User Id","description":"The Google Workspace admin user ID"},"admin_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Email","description":"The Google Workspace admin user email"},"admin_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Name","description":"The Google Workspace admin user name"}},"type":"object","required":["customer_id"],"title":"GoogleWorkspaceAdminResponse","description":"Response with Google Workspace admin user information"},"GoogleWorkspaceStatus":{"properties":{"connected":{"type":"boolean","title":"Connected"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"required_scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Required Scopes"}},"type":"object","required":["connected"],"title":"GoogleWorkspaceStatus","description":"Google Workspace service account connection status"},"GoogleWorkspaceTestConnectionRequest":{"properties":{},"type":"object","title":"GoogleWorkspaceTestConnectionRequest","description":"Request to test Google Workspace connection"},"GoogleWorkspaceTestConnectionResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"logs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Logs"},"error_details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Error Details"}},"type":"object","required":["success","message"],"title":"GoogleWorkspaceTestConnectionResponse","description":"Response from testing Google Workspace connection"},"GoogleWorkspaceUser":{"properties":{"id":{"type":"string","title":"Id","description":"User ID"},"primary_email":{"type":"string","title":"Primary Email","description":"User's primary email"},"name":{"anyOf":[{"$ref":"#/components/schemas/GoogleWorkspaceUserName"},{"type":"null"}],"description":"User's name"},"is_admin":{"type":"boolean","title":"Is Admin","description":"Whether user is an admin","default":false},"is_suspended":{"type":"boolean","title":"Is Suspended","description":"Whether user is suspended","default":false},"org_unit_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Unit Path","description":"User's organization unit path"}},"type":"object","required":["id","primary_email"],"title":"GoogleWorkspaceUser","description":"Google Workspace user"},"GoogleWorkspaceUserName":{"properties":{"given_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Given Name","description":"User's first name"},"family_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Family Name","description":"User's last name"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name","description":"User's full name"}},"type":"object","title":"GoogleWorkspaceUserName","description":"Google Workspace user name"},"GoogleWorkspaceUsersResponse":{"properties":{"connected":{"type":"boolean","title":"Connected","description":"Whether Google is connected"},"users":{"items":{"$ref":"#/components/schemas/GoogleWorkspaceUser"},"type":"array","title":"Users","description":"List of users"}},"type":"object","required":["connected"],"title":"GoogleWorkspaceUsersResponse","description":"Response with list of Google Workspace users"},"GranolaConnectRequest":{"properties":{"api_key":{"type":"string","minLength":1,"title":"Api Key","description":"Granola API key (starts with grn_)"}},"type":"object","required":["api_key"],"title":"GranolaConnectRequest","description":"Request to connect the Granola integration. The customer pastes a\nGranola API key (personal or workspace, prefixed grn_)."},"GranolaDisconnectResponse":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"GranolaDisconnectResponse"},"GranolaStatus":{"properties":{"connected":{"type":"boolean","title":"Connected"},"connected_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connected At"},"key_owner_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key Owner Name"},"key_owner_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key Owner Email"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"last_sync_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Sync At"},"last_successful_sync_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Successful Sync At"},"last_error_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error At"},"last_error_msg":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error Msg"},"note_count":{"type":"integer","title":"Note Count","default":0}},"type":"object","required":["connected"],"title":"GranolaStatus","description":"Granola connection status."},"GranolaSyncResponse":{"properties":{"task_id":{"type":"string","title":"Task Id"},"message":{"type":"string","title":"Message"}},"type":"object","required":["task_id","message"],"title":"GranolaSyncResponse","description":"Manual-sync trigger response."},"GreetingsResponse":{"properties":{"default_greeting":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Greeting"},"business_hours_default_greeting":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Hours Default Greeting"},"after_hours_default_greeting":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"After Hours Default Greeting"},"outbound_lead_greeting":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outbound Lead Greeting"},"pp_contact_greeting":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pp Contact Greeting"},"filevine_contact_greeting":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filevine Contact Greeting"},"smartadvocate_contact_greeting":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Smartadvocate Contact Greeting"}},"type":"object","title":"GreetingsResponse","description":"Response for greeting settings"},"GroupBusyTimesResponse":{"properties":{"staff_group_id":{"type":"string","format":"uuid","title":"Staff Group Id"},"start_date":{"type":"string","title":"Start Date"},"end_date":{"type":"string","title":"End Date"},"timezone":{"type":"string","title":"Timezone"},"busy_times":{"items":{"$ref":"#/components/schemas/BusyTimeRange"},"type":"array","title":"Busy Times"}},"type":"object","required":["staff_group_id","start_date","end_date","timezone","busy_times"],"title":"GroupBusyTimesResponse","description":"Response model for busy times for a staff group over a date range"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"Holiday":{"properties":{"name":{"type":"string","title":"Name"},"start_date":{"type":"string","title":"Start Date"},"end_date":{"type":"string","title":"End Date"}},"type":"object","required":["name","start_date","end_date"],"title":"Holiday","description":"A named holiday date range (recurring annually)"},"InfoRequestListItem":{"properties":{"info_request_id":{"type":"string","format":"uuid","title":"Info Request Id"},"shortcode":{"type":"string","title":"Shortcode"},"phone_number":{"type":"string","title":"Phone Number"},"status":{"type":"string","title":"Status"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"phone_number_collected":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number Collected"},"collected_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Collected Email"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Call Id"},"lead_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Lead Id"}},"type":"object","required":["info_request_id","shortcode","phone_number","status","created_at","expires_at"],"title":"InfoRequestListItem"},"InfoRequestListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/InfoRequestListItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"InfoRequestListResponse"},"InfoRequestMessageItem":{"properties":{"sms_id":{"type":"string","format":"uuid","title":"Sms Id"},"to_number":{"type":"string","title":"To Number"},"from_number":{"type":"string","title":"From Number"},"message_body":{"type":"string","title":"Message Body"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sent At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["sms_id","to_number","from_number","message_body","created_at"],"title":"InfoRequestMessageItem"},"InfoRequestPublicResponse":{"properties":{"status":{"type":"string","title":"Status"},"branding":{"$ref":"#/components/schemas/BrandingPublicResponse"},"customer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Name"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"}},"type":"object","required":["status","branding"],"title":"InfoRequestPublicResponse","description":"Public response for info request page."},"InfoRequestSubmitRequest":{"properties":{"email":{"type":"string","title":"Email"}},"type":"object","required":["email"],"title":"InfoRequestSubmitRequest","description":"Request to submit collected information."},"InitiateOutboundCallRequest":{"properties":{"case_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Case Id","description":"Case ID to associate with the call (falls back to lead's case_id)"},"phone_number_id":{"type":"string","title":"Phone Number Id","description":"VAPI phone number ID to dial from"}},"type":"object","required":["phone_number_id"],"title":"InitiateOutboundCallRequest","description":"Request to initiate a VAPI outbound call to a lead."},"InitiateOutboundCallResponse":{"properties":{"call_id":{"type":"string","format":"uuid","title":"Call Id","description":"Internal call record ID"},"vapi_call_id":{"type":"string","title":"Vapi Call Id","description":"VAPI call ID"},"outbound_lead_id":{"type":"string","format":"uuid","title":"Outbound Lead Id"},"status":{"type":"string","title":"Status"}},"type":"object","required":["call_id","vapi_call_id","outbound_lead_id","status"],"title":"InitiateOutboundCallResponse","description":"Response from initiating a VAPI outbound call."},"InitiateScreeningRequest":{"properties":{"call_id":{"type":"string","format":"uuid","title":"Call Id","description":"The call ID this screening is for"},"caller_name":{"type":"string","title":"Caller Name","description":"Name of the caller to announce"},"call_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call Reason","description":"Reason for the call to announce (optional for known contacts)"},"is_known_contact":{"type":"boolean","title":"Is Known Contact","description":"Whether this caller is a known contact - uses different announcement","default":false},"special_caller":{"type":"boolean","title":"Special Caller","description":"Whether this caller is a special caller (judge, court staff, new client) - bypasses availability blocks","default":false}},"type":"object","required":["call_id","caller_name"],"title":"InitiateScreeningRequest","description":"Request to initiate call screening."},"InitiateScreeningResponse":{"properties":{"screening_id":{"type":"string","format":"uuid","title":"Screening Id","description":"The ID of the screening request"},"status":{"type":"string","title":"Status","description":"Current status of the screening (pending)"}},"type":"object","required":["screening_id","status"],"title":"InitiateScreeningResponse","description":"Response after initiating call screening."},"InquiryListResponse":{"properties":{"inquiries":{"items":{"$ref":"#/components/schemas/InquiryWithCallResponse"},"type":"array","title":"Inquiries"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["inquiries","total","limit","offset"],"title":"InquiryListResponse","description":"Response for listing inquiries with pagination."},"InquiryMetricsResponse":{"properties":{"inquiries_last_24_hours":{"type":"integer","title":"Inquiries Last 24 Hours"},"inquiries_this_week":{"type":"integer","title":"Inquiries This Week"},"total_inquiries":{"type":"integer","title":"Total Inquiries"}},"type":"object","required":["inquiries_last_24_hours","inquiries_this_week","total_inquiries"],"title":"InquiryMetricsResponse","description":"Response model for inquiry metrics."},"InquiryResponse":{"properties":{"inquiry_id":{"type":"string","format":"uuid","title":"Inquiry Id"},"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Call Id"},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Conversation Id"},"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"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"inquiry_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inquiry Description"},"subject_line":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject Line"},"requires_followup":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Requires Followup"},"followup_reasoning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Followup Reasoning"},"notification_emails_sent":{"type":"boolean","title":"Notification Emails Sent"},"notification_sms_sent":{"type":"boolean","title":"Notification Sms Sent"},"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":["inquiry_id","customer_id","notification_emails_sent","notification_sms_sent","created_at"],"title":"InquiryResponse","description":"Full inquiry record response."},"InquirySettingsResponse":{"properties":{"email_notifications_enabled":{"type":"boolean","title":"Email Notifications Enabled","description":"Whether automatic inquiry notification emails are enabled"},"dry_run":{"type":"boolean","title":"Dry Run","description":"Whether inquiry notification emails require manual sending"},"notification_email_recipients":{"items":{"type":"string"},"type":"array","title":"Notification Email Recipients","description":"List of email addresses to receive inquiry notification emails"},"sms_notifications_enabled":{"type":"boolean","title":"Sms Notifications Enabled","description":"Whether automatic inquiry notification SMS are enabled"},"notification_sms_recipients":{"items":{"type":"string"},"type":"array","title":"Notification Sms Recipients","description":"List of phone numbers (E.164 format) to receive inquiry notification SMS"},"test_notifications_enabled":{"type":"boolean","title":"Test Notifications Enabled","description":"Whether notifications are sent for test calls and chats"},"followup_filter_enabled":{"type":"boolean","title":"Followup Filter Enabled","description":"Whether the LLM follow-up filter runs on inquiry classification; when enabled, auto-notifications are only sent for inquiries requiring follow-up"},"followup_filter_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Followup Filter Prompt","description":"Custom follow-up criteria prompt; null means the default criteria are used"},"followup_filter_default_prompt":{"type":"string","title":"Followup Filter Default Prompt","description":"The built-in default follow-up criteria (read-only, for display)"},"sa_subject_enhancement_enabled":{"type":"boolean","title":"Sa Subject Enhancement Enabled","description":"Whether to prefix the notification email subject with the SmartAdvocate case's team and a short summary of the ask (requires SmartAdvocate)","default":false},"sa_case_link_enabled":{"type":"boolean","title":"Sa Case Link Enabled","description":"Whether to include a link to the matched SmartAdvocate case in the notification email body (requires SmartAdvocate)","default":false}},"type":"object","required":["email_notifications_enabled","dry_run","sms_notifications_enabled","test_notifications_enabled","followup_filter_enabled","followup_filter_default_prompt"],"title":"InquirySettingsResponse","description":"Inquiry notification settings response model"},"InquiryWithCallResponse":{"properties":{"inquiry_id":{"type":"string","format":"uuid","title":"Inquiry Id"},"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Call Id"},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Conversation Id"},"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"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"inquiry_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inquiry Description"},"subject_line":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject Line"},"requires_followup":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Requires Followup"},"followup_reasoning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Followup Reasoning"},"notification_emails_sent":{"type":"boolean","title":"Notification Emails Sent"},"notification_sms_sent":{"type":"boolean","title":"Notification Sms Sent"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"call_created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Call Created At"},"call_direction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call Direction"},"is_test":{"type":"boolean","title":"Is Test","default":false}},"type":"object","required":["inquiry_id","customer_id","notification_emails_sent","notification_sms_sent","created_at"],"title":"InquiryWithCallResponse","description":"Inquiry response with call data included."},"IntakeFormConfigResponse":{"properties":{"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"enabled":{"type":"boolean","title":"Enabled"},"accent_color":{"type":"string","title":"Accent Color"},"form_title":{"type":"string","title":"Form Title"},"completion_message":{"type":"string","title":"Completion Message"},"intake_goal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intake Goal"},"law_firm_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Law Firm Context"},"additional_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Additional Instructions"},"allowed_origins":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Origins"},"form_idle_timeout_minutes":{"type":"integer","title":"Form Idle Timeout Minutes"},"default_language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Language"},"language_selector_enabled":{"type":"boolean","title":"Language Selector Enabled","default":false},"language_selector_options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Language Selector Options"},"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":["customer_id","enabled","accent_color","form_title","completion_message","form_idle_timeout_minutes"],"title":"IntakeFormConfigResponse"},"InviteStaffUserRequest":{"properties":{"email":{"type":"string","title":"Email"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"user_type":{"$ref":"#/components/schemas/UserType","default":"staff"},"login_methods":{"anyOf":[{"items":{"type":"string","enum":["password","google","microsoft"]},"type":"array"},{"type":"null"}],"title":"Login Methods","default":["password","google"]},"password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password"},"skip_invite_email":{"type":"boolean","title":"Skip Invite Email","default":false}},"type":"object","required":["email","first_name","last_name"],"title":"InviteStaffUserRequest","description":"Request to invite a new staff user"},"InviteStaffUserResponse":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"user_type":{"$ref":"#/components/schemas/UserType"},"message":{"type":"string","title":"Message"}},"type":"object","required":["id","email","first_name","last_name","user_type","message"],"title":"InviteStaffUserResponse","description":"Response after inviting a staff user"},"InvoiceData":{"properties":{"invoice_number":{"type":"string","title":"Invoice Number"},"invoice_date":{"type":"string","format":"date-time","title":"Invoice Date"},"due_date":{"type":"string","format":"date-time","title":"Due Date"},"hide_due_date":{"type":"boolean","title":"Hide Due Date","default":false},"customer_name":{"type":"string","title":"Customer Name"},"customer_address_line1":{"type":"string","title":"Customer Address Line1"},"customer_address_line2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Address Line2"},"customer_city":{"type":"string","title":"Customer City"},"customer_state":{"type":"string","title":"Customer State"},"customer_zip":{"type":"string","title":"Customer Zip"},"items":{"items":{"$ref":"#/components/schemas/InvoiceItemData"},"type":"array","title":"Items"},"subtotal":{"anyOf":[{"type":"number"},{"type":"string"}],"title":"Subtotal"},"tax_rate":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Tax Rate"},"tax_amount":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Tax Amount"},"total":{"anyOf":[{"type":"number"},{"type":"string"}],"title":"Total"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["invoice_number","invoice_date","due_date","customer_name","customer_address_line1","customer_city","customer_state","customer_zip","items","subtotal","total"],"title":"InvoiceData","description":"Data required to generate an invoice PDF."},"InvoiceItemData":{"properties":{"description":{"type":"string","title":"Description"},"amount":{"anyOf":[{"type":"number"},{"type":"string"}],"title":"Amount"},"quantity":{"type":"integer","title":"Quantity","default":1}},"type":"object","required":["description","amount"],"title":"InvoiceItemData","description":"Data for a single line item on an invoice."},"KnownContactCreateRequest":{"properties":{"phone_number":{"type":"string","title":"Phone Number","description":"Phone number in E.164 format (e.g., +12025551234)"},"name":{"type":"string","title":"Name","description":"Name of the contact"},"first_name_phonetic":{"type":"string","title":"First Name Phonetic","description":"Phonetic spelling of first name for AI pronunciation"}},"type":"object","required":["phone_number","name","first_name_phonetic"],"title":"KnownContactCreateRequest","description":"Create known contact request model"},"KnownContactResponse":{"properties":{"known_contact_id":{"type":"string","format":"uuid","title":"Known Contact Id"},"phone_number":{"type":"string","title":"Phone Number","description":"Phone number in E.164 format"},"name":{"type":"string","title":"Name","description":"Name of the contact"},"first_name_phonetic":{"type":"string","title":"First Name Phonetic","description":"Phonetic spelling of first name for AI pronunciation"}},"type":"object","required":["known_contact_id","phone_number","name","first_name_phonetic"],"title":"KnownContactResponse","description":"Known contact response model"},"KnownContactUpdateRequest":{"properties":{"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number","description":"Phone number in E.164 format (e.g., +12025551234)"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name of the contact"},"first_name_phonetic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name Phonetic","description":"Phonetic spelling of first name for AI pronunciation"}},"type":"object","title":"KnownContactUpdateRequest","description":"Update known contact request model"},"KnownContactsEnabledResponse":{"properties":{"known_contacts_enabled":{"type":"boolean","title":"Known Contacts Enabled","description":"Whether known contacts feature is enabled for this customer"}},"type":"object","required":["known_contacts_enabled"],"title":"KnownContactsEnabledResponse","description":"Known contacts enabled status response model"},"KnownContactsListResponse":{"properties":{"known_contacts_enabled":{"type":"boolean","title":"Known Contacts Enabled","description":"Whether known contacts feature is enabled for this customer"},"contacts":{"items":{"$ref":"#/components/schemas/KnownContactResponse"},"type":"array","title":"Contacts","description":"List of known contacts"}},"type":"object","required":["known_contacts_enabled"],"title":"KnownContactsListResponse","description":"List of known contacts response model (for agent endpoint)"},"LLMProxyImportRequest":{"properties":{"start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start","description":"Backfill range start (UTC); omit to run the scheduled windowed import"},"end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End","description":"Backfill range end (UTC); defaults to now"},"lookback_minutes":{"anyOf":[{"type":"integer","maximum":43200.0,"minimum":1.0},{"type":"null"}],"title":"Lookback Minutes","description":"Override the scheduled importer's start, ignoring the watermark"}},"type":"object","title":"LLMProxyImportRequest","description":"Trigger an import. A range dispatches the backfill task instead of the\nscheduled importer, so it can never rewind or skip the watermark."},"LLMProxyImportResponse":{"properties":{"message":{"type":"string","title":"Message","description":"Status message"},"task_id":{"type":"string","title":"Task Id","description":"Celery task ID"},"mode":{"type":"string","title":"Mode","description":"\"scheduled\" or \"backfill\""}},"type":"object","required":["message","task_id","mode"],"title":"LLMProxyImportResponse"},"LLMProxyImportStateResponse":{"properties":{"log_group":{"type":"string","title":"Log Group"},"last_event_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Event At"},"last_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Run At"},"last_run_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Run Status"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"},"last_events_scanned":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Events Scanned"},"last_rows_upserted":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Rows Upserted"},"watermark_lag_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Watermark Lag Seconds","description":"now - last_event_at"},"max_ingestion_lag_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Ingestion Lag Seconds","description":"max(cw_ingested_at - logged_at) over the last 24h; must stay well under the overlap window"},"rows_total":{"type":"integer","title":"Rows Total","default":0},"rows_missing_bodies":{"type":"integer","title":"Rows Missing Bodies","description":"Metrics line imported, bodies line never arrived","default":0},"rows_missing_metrics":{"type":"integer","title":"Rows Missing Metrics","description":"Bodies line imported, metrics line never arrived","default":0},"rows_unlinked":{"type":"integer","title":"Rows Unlinked","description":"Rows with a vapi_call_id that resolved to no call","default":0},"table_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Table Bytes","description":"pg_total_relation_size of llm_proxy_request"},"import_enabled":{"type":"boolean","title":"Import Enabled","default":false}},"type":"object","required":["log_group"],"title":"LLMProxyImportStateResponse","description":"Importer health. The two orphan counts are how a silently half-working\nimporter becomes visible."},"LLMProxyLegDetail":{"properties":{"leg":{"type":"string","title":"Leg"},"started":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Started"},"won":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Won"},"ttft_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ttft Ms"},"cancelled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Cancelled"},"cancel_latency_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cancel Latency Ms"},"error_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Kind"},"error_detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Detail"},"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"provider_request_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Request Id"},"input_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Input Tokens"},"output_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Output Tokens"},"cache_read_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cache Read Tokens"},"cache_write_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cache Write Tokens"}},"type":"object","required":["leg"],"title":"LLMProxyLegDetail","description":"One leg's outcome within a request."},"LLMProxyLegStats":{"properties":{"leg":{"type":"string","title":"Leg"},"request_count":{"type":"integer","title":"Request Count","default":0},"win_count":{"type":"integer","title":"Win Count","default":0},"error_count":{"type":"integer","title":"Error Count","default":0},"ttft_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ttft Mean"},"ttft_p50":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ttft P50"},"ttft_p90":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ttft P90"},"ttft_p95":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ttft P95"},"ttft_p99":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ttft P99"}},"type":"object","required":["leg"],"title":"LLMProxyLegStats","description":"One leg's TTFT distribution across every request where it ran — not only the\nones it won. That is the actual hedging question."},"LLMProxyOutcomeStats":{"properties":{"outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outcome"},"request_count":{"type":"integer","title":"Request Count","default":0},"total_ms_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Ms Mean"}},"type":"object","title":"LLMProxyOutcomeStats"},"LLMProxyRequestBodiesResponse":{"properties":{"request_id":{"type":"string","title":"Request Id"},"bodies_truncated":{"type":"boolean","title":"Bodies Truncated","default":false},"bodies_logged_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Bodies Logged At"},"vapi_body":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Vapi Body"},"anthropic_body":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Anthropic Body"},"response_body":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Response Body"}},"type":"object","required":["request_id"],"title":"LLMProxyRequestBodiesResponse","description":"The three bodies, fetched on demand."},"LLMProxyRequestDetail":{"properties":{"request_id":{"type":"string","title":"Request Id"},"vapi_call_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vapi Call Id"},"call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Call Id"},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Customer Id"},"logged_at":{"type":"string","format":"date-time","title":"Logged At"},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outcome"},"winner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Winner"},"winner_ttft_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Winner Ttft Ms"},"total_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Ms"},"stream_duration_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stream Duration Ms"},"assistant_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assistant Hint"},"requested_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requested Model"},"n_messages":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"N Messages"},"n_tools":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"N Tools"},"output_chunks":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Output Chunks"},"output_chars":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Output Chars"},"finish_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Finish Reason"},"stop_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stop Reason"},"tool_names":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tool Names"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"anthropic_ttft_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Anthropic Ttft Ms"},"bedrock_ttft_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Bedrock Ttft Ms"},"anthropic_error_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Anthropic Error Kind"},"bedrock_error_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bedrock Error Kind"},"image_tag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Tag"},"ecs_task_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ecs Task Id"},"prewarm_ok":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Prewarm Ok"},"has_bodies":{"type":"boolean","title":"Has Bodies","description":"Whether a bodies line was imported for this request","default":false},"request_seq":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Request Seq"},"cw_ingested_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Cw Ingested At"},"log_stream":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Log Stream"},"hedge_delay_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hedge Delay Ms"},"empty_completion_at_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Empty Completion At Ms"},"legs_started":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Legs Started"},"system_prompt_chars":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"System Prompt Chars"},"max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Tokens"},"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temperature"},"bodies_truncated":{"type":"boolean","title":"Bodies Truncated","default":false},"bodies_logged_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Bodies Logged At"},"metrics_imported_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Metrics Imported At"},"bodies_imported_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Bodies Imported At"},"legs":{"items":{"$ref":"#/components/schemas/LLMProxyLegDetail"},"type":"array","title":"Legs"},"legs_extra":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Legs Extra"},"raw_metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Raw Metrics"}},"type":"object","required":["request_id","logged_at"],"title":"LLMProxyRequestDetail","description":"One proxy request in full, still without bodies."},"LLMProxyRequestItem":{"properties":{"request_id":{"type":"string","title":"Request Id"},"vapi_call_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vapi Call Id"},"call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Call Id"},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Customer Id"},"logged_at":{"type":"string","format":"date-time","title":"Logged At"},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outcome"},"winner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Winner"},"winner_ttft_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Winner Ttft Ms"},"total_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Ms"},"stream_duration_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stream Duration Ms"},"assistant_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assistant Hint"},"requested_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requested Model"},"n_messages":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"N Messages"},"n_tools":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"N Tools"},"output_chunks":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Output Chunks"},"output_chars":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Output Chars"},"finish_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Finish Reason"},"stop_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stop Reason"},"tool_names":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tool Names"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"anthropic_ttft_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Anthropic Ttft Ms"},"bedrock_ttft_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Bedrock Ttft Ms"},"anthropic_error_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Anthropic Error Kind"},"bedrock_error_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bedrock Error Kind"},"image_tag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Tag"},"ecs_task_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ecs Task Id"},"prewarm_ok":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Prewarm Ok"},"has_bodies":{"type":"boolean","title":"Has Bodies","description":"Whether a bodies line was imported for this request","default":false},"request_seq":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Request Seq"}},"type":"object","required":["request_id","logged_at"],"title":"LLMProxyRequestItem","description":"One proxy request, without bodies.\n\nBodies live behind their own endpoint: selecting them here would pull the TOASTed\ncolumns for every row and turn a 100-row page into tens of megabytes."},"LLMProxyRequestListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/LLMProxyRequestItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total","description":"Total matching rows, ignoring pagination","default":0}},"type":"object","title":"LLMProxyRequestListResponse"},"LLMProxyStatsResponse":{"properties":{"time_range":{"type":"string","title":"Time Range"},"request_count":{"type":"integer","title":"Request Count","default":0},"legs":{"items":{"$ref":"#/components/schemas/LLMProxyLegStats"},"type":"array","title":"Legs"},"winners":{"items":{"$ref":"#/components/schemas/LLMProxyWinnerStats"},"type":"array","title":"Winners"},"outcomes":{"items":{"$ref":"#/components/schemas/LLMProxyOutcomeStats"},"type":"array","title":"Outcomes"}},"type":"object","required":["time_range"],"title":"LLMProxyStatsResponse"},"LLMProxyWinnerStats":{"properties":{"winner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Winner"},"request_count":{"type":"integer","title":"Request Count","default":0},"ttft_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ttft Mean"},"ttft_p50":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ttft P50"},"ttft_p90":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ttft P90"},"ttft_p95":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ttft P95"},"ttft_p99":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ttft P99"}},"type":"object","title":"LLMProxyWinnerStats","description":"TTFT distribution of the requests a leg won."},"LLMTTFBResponse":{"properties":{"bedrock_measurements":{"items":{"$ref":"#/components/schemas/BedrockTTFBMeasurementSchema"},"type":"array","title":"Bedrock Measurements","description":"Bedrock TTFB measurement data points"},"vapi_measurements":{"items":{"$ref":"#/components/schemas/VapiLLMLatencyMeasurementSchema"},"type":"array","title":"Vapi Measurements","description":"Vapi LLM latency measurement data points"}},"type":"object","title":"LLMTTFBResponse","description":"Combined response with Bedrock TTFB and Vapi LLM latency measurements"},"LLMUsageComponentSummary":{"properties":{"component":{"type":"string","title":"Component","description":"Component that made the LLM call"},"total_calls":{"type":"integer","title":"Total Calls","description":"Total LLM calls for this component"},"total_input_tokens":{"type":"integer","title":"Total Input Tokens","description":"Sum of input tokens"},"total_output_tokens":{"type":"integer","title":"Total Output Tokens","description":"Sum of output tokens"},"total_cost":{"type":"number","title":"Total Cost","description":"Total cost in USD"},"input_cost":{"type":"number","title":"Input Cost","description":"Cost attributable to input tokens"},"output_cost":{"type":"number","title":"Output Cost","description":"Cost attributable to output tokens"},"avg_processing_time_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Processing Time Ms","description":"Average processing time, ms"},"min_processing_time_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Processing Time Ms","description":"Minimum processing time, ms"},"max_processing_time_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Processing Time Ms","description":"Maximum processing time, ms"},"p90_processing_time_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P90 Processing Time Ms","description":"90th percentile processing time, ms"},"p95_processing_time_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P95 Processing Time Ms","description":"95th percentile processing time, ms"},"p99_processing_time_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P99 Processing Time Ms","description":"99th percentile processing time, ms"}},"type":"object","required":["component","total_calls","total_input_tokens","total_output_tokens","total_cost","input_cost","output_cost"],"title":"LLMUsageComponentSummary","description":"Per-component aggregated LLM usage stats."},"LLMUsageHistogramBin":{"properties":{"range_start":{"type":"number","title":"Range Start","description":"Start of bin range (inclusive)"},"range_end":{"type":"number","title":"Range End","description":"End of bin range (exclusive)"},"counts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Counts","description":"Counts keyed by component"}},"type":"object","required":["range_start","range_end"],"title":"LLMUsageHistogramBin","description":"A single histogram bin with per-component counts."},"LLMUsageOverallStats":{"properties":{"total_calls":{"type":"integer","title":"Total Calls","description":"Total LLM calls"},"total_input_tokens":{"type":"integer","title":"Total Input Tokens","description":"Sum of input tokens"},"total_output_tokens":{"type":"integer","title":"Total Output Tokens","description":"Sum of output tokens"},"total_cost":{"type":"number","title":"Total Cost","description":"Total cost in USD"},"avg_input_tokens":{"type":"integer","title":"Avg Input Tokens","description":"Average input tokens per call"},"avg_output_tokens":{"type":"integer","title":"Avg Output Tokens","description":"Average output tokens per call"},"avg_processing_time_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Processing Time Ms","description":"Average processing time, ms"}},"type":"object","required":["total_calls","total_input_tokens","total_output_tokens","total_cost","avg_input_tokens","avg_output_tokens"],"title":"LLMUsageOverallStats","description":"Aggregate stats across all components."},"LLMUsageResponse":{"properties":{"overall":{"$ref":"#/components/schemas/LLMUsageOverallStats","description":"Overall aggregate stats"},"by_component":{"items":{"$ref":"#/components/schemas/LLMUsageComponentSummary"},"type":"array","title":"By Component","description":"Per-component aggregates"},"input_token_histogram":{"items":{"$ref":"#/components/schemas/LLMUsageHistogramBin"},"type":"array","title":"Input Token Histogram","description":"Input token distribution"},"cost_histogram":{"items":{"$ref":"#/components/schemas/LLMUsageHistogramBin"},"type":"array","title":"Cost Histogram","description":"Cost distribution"},"processing_time_histogram":{"items":{"$ref":"#/components/schemas/LLMUsageHistogramBin"},"type":"array","title":"Processing Time Histogram","description":"Processing time distribution"},"components":{"items":{"type":"string"},"type":"array","title":"Components","description":"Unique components for filtering"}},"type":"object","required":["overall"],"title":"LLMUsageResponse","description":"Aggregated LLM usage response."},"LawFirmInfoPromptResponse":{"properties":{"law_firm_info_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Law Firm Info Prompt"}},"type":"object","title":"LawFirmInfoPromptResponse","description":"Law firm info prompt response model"},"LeadCaseOption":{"properties":{"case_id":{"type":"string","title":"Case Id"},"title":{"type":"string","title":"Title"}},"type":"object","required":["case_id","title"],"title":"LeadCaseOption","description":"A case that has associated leads."},"LeadCasesResponse":{"properties":{"cases":{"items":{"$ref":"#/components/schemas/LeadCaseOption"},"type":"array","title":"Cases"}},"type":"object","required":["cases"],"title":"LeadCasesResponse","description":"Response listing cases that have leads."},"LeadClassificationEnabledResponse":{"properties":{"customer_id":{"type":"string","format":"uuid","title":"Customer Id","description":"The customer ID"},"lead_classification_enabled":{"type":"boolean","title":"Lead Classification Enabled","description":"Whether lead classification is enabled for this customer"}},"type":"object","required":["customer_id","lead_classification_enabled"],"title":"LeadClassificationEnabledResponse","description":"Response with customer's lead classification setting"},"LeadDocketApproveResponse":{"properties":{"status":{"type":"string","title":"Status"},"audit_log_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Audit Log Id"},"response_status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Response Status Code"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["status"],"title":"LeadDocketApproveResponse"},"LeadDocketAuditLogItem":{"properties":{"audit_log_id":{"type":"string","format":"uuid","title":"Audit Log Id"},"event_type":{"type":"string","title":"Event Type"},"status":{"type":"string","title":"Status"},"lead_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Lead Id"},"call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Call Id"},"endpoint_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Endpoint Url"},"request_payload":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Request Payload"},"response_status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Response Status Code"},"response_body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Body"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sent At"}},"type":"object","required":["audit_log_id","event_type","status","created_at"],"title":"LeadDocketAuditLogItem"},"LeadDocketAuditLogResponse":{"properties":{"entries":{"items":{"$ref":"#/components/schemas/LeadDocketAuditLogItem"},"type":"array","title":"Entries","default":[]},"total":{"type":"integer","title":"Total","default":0}},"type":"object","title":"LeadDocketAuditLogResponse"},"LeadDocketConfigUpdate":{"properties":{"endpoint_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Endpoint Url","description":"Lead Docket Definitions endpoint URL"},"dry_run":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dry Run","description":"Whether pushes require manual approval"},"timeout_seconds":{"anyOf":[{"type":"integer","maximum":120.0,"minimum":1.0},{"type":"null"}],"title":"Timeout Seconds","description":"Per-request timeout in seconds"}},"type":"object","title":"LeadDocketConfigUpdate"},"LeadDocketFieldMappingCreate":{"properties":{"ld_field_name":{"type":"string","minLength":1,"title":"Ld Field Name"},"source_type":{"type":"string","enum":["lead_field","constant"],"title":"Source Type"},"source_key":{"type":"string","title":"Source Key","default":""},"constant_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Constant Value"},"display_order":{"type":"integer","title":"Display Order","default":0}},"type":"object","required":["ld_field_name","source_type"],"title":"LeadDocketFieldMappingCreate"},"LeadDocketFieldMappingItem":{"properties":{"lead_docket_field_mapping_id":{"type":"string","format":"uuid","title":"Lead Docket Field Mapping Id"},"ld_field_name":{"type":"string","title":"Ld Field Name"},"source_type":{"type":"string","enum":["lead_field","constant"],"title":"Source Type"},"source_key":{"type":"string","title":"Source Key"},"constant_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Constant Value"},"display_order":{"type":"integer","title":"Display Order"}},"type":"object","required":["lead_docket_field_mapping_id","ld_field_name","source_type","source_key","display_order"],"title":"LeadDocketFieldMappingItem"},"LeadDocketFieldMappingListResponse":{"properties":{"mappings":{"items":{"$ref":"#/components/schemas/LeadDocketFieldMappingItem"},"type":"array","title":"Mappings","default":[]}},"type":"object","title":"LeadDocketFieldMappingListResponse"},"LeadDocketFieldMappingUpdate":{"properties":{"ld_field_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ld Field Name"},"source_type":{"anyOf":[{"type":"string","enum":["lead_field","constant"]},{"type":"null"}],"title":"Source Type"},"source_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Key"},"constant_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Constant Value"},"display_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Display Order"}},"type":"object","title":"LeadDocketFieldMappingUpdate"},"LeadDocketPendingPushItem":{"properties":{"audit_log_id":{"type":"string","format":"uuid","title":"Audit Log Id"},"lead_id":{"type":"string","format":"uuid","title":"Lead Id"},"request_payload":{"additionalProperties":true,"type":"object","title":"Request Payload"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["audit_log_id","lead_id","request_payload","created_at"],"title":"LeadDocketPendingPushItem"},"LeadDocketStatusResponse":{"properties":{"feature_enabled":{"type":"boolean","title":"Feature Enabled","description":"Whether lead_docket_enabled is on for this customer"},"endpoint_url_set":{"type":"boolean","title":"Endpoint Url Set","description":"Whether an endpoint URL has been configured"},"endpoint_url_masked":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Endpoint Url Masked","description":"Stored endpoint URL with query parameter values dotted out for safe display"},"connected":{"type":"boolean","title":"Connected","description":"True when feature is enabled, endpoint is set, and dry_run is off"},"dry_run":{"type":"boolean","title":"Dry Run","description":"Whether pushes require manual approval"},"timeout_seconds":{"type":"integer","title":"Timeout Seconds","description":"Per-request timeout in seconds"},"mapping_count":{"type":"integer","title":"Mapping Count","description":"Number of configured field mappings"}},"type":"object","required":["feature_enabled","endpoint_url_set","connected","dry_run","timeout_seconds","mapping_count"],"title":"LeadDocketStatusResponse"},"LeadListResponse":{"properties":{"leads":{"items":{"$ref":"#/components/schemas/LeadWithCaseResponse"},"type":"array","title":"Leads"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["leads","total","limit","offset"],"title":"LeadListResponse","description":"Response for listing leads with pagination."},"LeadMetricsResponse":{"properties":{"leads_last_24_hours":{"type":"integer","title":"Leads Last 24 Hours"},"leads_this_week":{"type":"integer","title":"Leads This Week"},"total_leads":{"type":"integer","title":"Total Leads"},"qualified_leads":{"type":"integer","title":"Qualified Leads"}},"type":"object","required":["leads_last_24_hours","leads_this_week","total_leads","qualified_leads"],"title":"LeadMetricsResponse","description":"Response model for lead metrics."},"LeadResponse":{"properties":{"lead_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Lead Id"},"outbound_lead_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Outbound Lead Id"},"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Call Id"},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Conversation Id"},"form_session_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Form Session Id"},"case_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Case Id"},"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"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"client_status":{"type":"string","title":"Client Status"},"is_qualified":{"type":"boolean","title":"Is Qualified","default":false},"qualification_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qualification Summary"},"qualification_details":{"anyOf":[{"items":{"$ref":"#/components/schemas/QualificationQA"},"type":"array"},{"type":"null"}],"title":"Qualification Details"},"lead_score":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lead Score"},"lead_score_reasoning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lead Score Reasoning"},"custom_score_output":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Custom Score Output"},"inquiry_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inquiry Reason"},"matter_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matter Name"},"subject_line":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject Line"},"lead_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lead Source"},"notification_emails_sent":{"type":"boolean","title":"Notification Emails Sent","default":false},"notification_sms_sent":{"type":"boolean","title":"Notification Sms Sent","default":false},"skip_notifications":{"type":"boolean","title":"Skip Notifications","default":false},"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":["customer_id","client_status","created_at"],"title":"LeadResponse","description":"Full lead record response."},"LeadSettingsResponse":{"properties":{"email_notifications_enabled":{"type":"boolean","title":"Email Notifications Enabled","description":"Whether automatic lead notification emails are enabled"},"dry_run":{"type":"boolean","title":"Dry Run","description":"Whether lead notification emails require manual sending"},"notification_email_recipients":{"items":{"type":"string"},"type":"array","title":"Notification Email Recipients","description":"List of email addresses to receive lead notification emails"},"sms_notifications_enabled":{"type":"boolean","title":"Sms Notifications Enabled","description":"Whether automatic lead notification SMS are enabled"},"notification_sms_recipients":{"items":{"type":"string"},"type":"array","title":"Notification Sms Recipients","description":"List of phone numbers (E.164 format) to receive lead notification SMS"},"lead_scoring_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lead Scoring Context","description":"Criteria for scoring leads as low, medium, or high value"},"lead_scoring_mode":{"type":"string","enum":["low_medium_high","custom_prompt"],"title":"Lead Scoring Mode","description":"Which lead scoring strategy to use","default":"low_medium_high"},"lead_scoring_custom_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lead Scoring Custom Prompt","description":"Free-text scoring instructions used when lead_scoring_mode is 'custom_prompt'"},"lead_scoring_custom_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Lead Scoring Custom Schema","description":"JSON Schema (draft-7 object) describing the custom scoring output when lead_scoring_mode is 'custom_prompt'"},"test_notifications_enabled":{"type":"boolean","title":"Test Notifications Enabled","description":"Whether notifications are sent for test calls and chats"},"lead_source_enabled":{"type":"boolean","title":"Lead Source Enabled","description":"Whether lead source extraction is enabled for calls and chats"},"lead_generation_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lead Generation Context","description":"General context to guide lead classification and extraction behavior"},"info_request_forces_lead":{"type":"boolean","title":"Info Request Forces Lead","description":"Whether sending an info request SMS during a call forces the call to be classified as a lead"},"lead_notification_template":{"type":"string","enum":["default","legal_pocket","credit_hound"],"title":"Lead Notification Template","description":"Which SES email template variant to use for lead notifications","default":"default"},"lead_value_label":{"type":"string","enum":["lead_value","lead_priority","lead_score"],"title":"Lead Value Label","description":"Which label to display for the lead score metric (app UI, emails, SMS)","default":"lead_value"}},"type":"object","required":["email_notifications_enabled","dry_run","sms_notifications_enabled","test_notifications_enabled","lead_source_enabled","info_request_forces_lead"],"title":"LeadSettingsResponse","description":"Lead notification settings response model"},"LeadWithCaseResponse":{"properties":{"lead_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Lead Id"},"outbound_lead_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Outbound Lead Id"},"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Call Id"},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Conversation Id"},"form_session_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Form Session Id"},"case_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Case Id"},"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"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"client_status":{"type":"string","title":"Client Status"},"is_qualified":{"type":"boolean","title":"Is Qualified","default":false},"qualification_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qualification Summary"},"qualification_details":{"anyOf":[{"items":{"$ref":"#/components/schemas/QualificationQA"},"type":"array"},{"type":"null"}],"title":"Qualification Details"},"lead_score":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lead Score"},"lead_score_reasoning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lead Score Reasoning"},"custom_score_output":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Custom Score Output"},"inquiry_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inquiry Reason"},"matter_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matter Name"},"subject_line":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject Line"},"lead_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lead Source"},"notification_emails_sent":{"type":"boolean","title":"Notification Emails Sent","default":false},"notification_sms_sent":{"type":"boolean","title":"Notification Sms Sent","default":false},"skip_notifications":{"type":"boolean","title":"Skip Notifications","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"case_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Case Title"},"call_created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Call Created At"},"call_direction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call Direction"},"is_test":{"type":"boolean","title":"Is Test","default":false},"pp_contact_guid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pp Contact Guid"},"pp_matter_guid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pp Matter Guid"},"pp_matter_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pp Matter Name"},"info_request_sms_sent":{"type":"boolean","title":"Info Request Sms Sent","default":false}},"type":"object","required":["customer_id","client_status","created_at"],"title":"LeadWithCaseResponse","description":"Lead response with case details included."},"ListBankAccountsResponse":{"properties":{"bank_accounts":{"items":{"$ref":"#/components/schemas/BankAccountResponse"},"type":"array","title":"Bank Accounts"}},"type":"object","required":["bank_accounts"],"title":"ListBankAccountsResponse","description":"Response with list of bank accounts."},"ListCardAccountsResponse":{"properties":{"card_accounts":{"items":{"$ref":"#/components/schemas/CardAccountResponse"},"type":"array","title":"Card Accounts"}},"type":"object","required":["card_accounts"],"title":"ListCardAccountsResponse","description":"Response with list of card accounts."},"LiveTranscriptEventResponse":{"properties":{"event_id":{"type":"string","format":"uuid","title":"Event Id"},"role":{"type":"string","title":"Role"},"text":{"type":"string","title":"Text"},"occurred_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Occurred At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["event_id","role","text","created_at"],"title":"LiveTranscriptEventResponse","description":"One finalized utterance ingested from a Vapi transcript webhook event."},"LoginRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email","description":"Email address"},"password":{"type":"string","minLength":1,"title":"Password","description":"Password"}},"type":"object","required":["email","password"],"title":"LoginRequest","description":"Login request schema"},"LoginResponse":{"properties":{"user":{"$ref":"#/components/schemas/UserInfo","description":"User information"},"message":{"type":"string","title":"Message","description":"Success message"}},"type":"object","required":["user","message"],"title":"LoginResponse","description":"Login response schema"},"LoginType":{"type":"string","enum":["password","google","microsoft"],"title":"LoginType","description":"Enum for user login types"},"ManualCaseMatchRequest":{"properties":{"case_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Case Provider","description":"'smartadvocate' or 'filevine'"},"case_local_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Case Local Id","description":"PK in the provider's local table"},"smartadvocate_case_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Smartadvocate Case Id","description":"Legacy SA-only field"},"note_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note Text","description":"Case note text to post (if any)"}},"type":"object","title":"ManualCaseMatchRequest","description":"Request to manually match a call to a case.\n\nEither provide `case_provider` + `case_local_id` (preferred) OR the\nlegacy `smartadvocate_case_id`. When only the legacy field is provided\nit's interpreted as SmartAdvocate."},"ManualCaseMatchResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the match was successful"},"matched_case_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matched Case Number","description":"Case number if matched"},"matched_case_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matched Case Name","description":"Case name if matched"},"case_note_posted":{"type":"boolean","title":"Case Note Posted","description":"Whether a case note was posted","default":false},"case_note_external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Case Note External Id","description":"External note ID if posted"},"message":{"type":"string","title":"Message","description":"Status message"}},"type":"object","required":["success","message"],"title":"ManualCaseMatchResponse","description":"Response from manual case matching."},"MarkNonSubstantiveResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the operation was successful"},"message":{"type":"string","title":"Message","description":"Status message"}},"type":"object","required":["success","message"],"title":"MarkNonSubstantiveResponse","description":"Response from marking a call as non-substantive."},"MarkStuckCallsCompletedResponse":{"properties":{"calls_updated":{"type":"integer","title":"Calls Updated","description":"Number of calls that were marked as completed"},"call_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Call Ids","description":"List of call IDs that were updated"},"message":{"type":"string","title":"Message","description":"Status message"}},"type":"object","required":["calls_updated","message"],"title":"MarkStuckCallsCompletedResponse","description":"Response from marking stuck in-progress calls as completed"},"MatterExtractionRequest":{"properties":{"sample_size":{"type":"integer","maximum":10.0,"minimum":0.0,"title":"Sample Size","default":0}},"type":"object","title":"MatterExtractionRequest","description":"Trigger content extraction; sample_size > 0 = pre-flight test over N\nunprofiled matters (allowed before opting in), 0 = full run (requires\ncontent_extraction_enabled)."},"MatterExtractionSettingsRequest":{"properties":{"content_extraction_enabled":{"type":"boolean","title":"Content Extraction Enabled"}},"type":"object","required":["content_extraction_enabled"],"title":"MatterExtractionSettingsRequest"},"MatterExtractionTriggerResponse":{"properties":{"queued":{"type":"boolean","title":"Queued"},"sample":{"type":"boolean","title":"Sample"}},"type":"object","required":["queued","sample"],"title":"MatterExtractionTriggerResponse"},"MatterSourcesResponse":{"properties":{"sources":{"items":{"$ref":"#/components/schemas/DriveMatterSourceItem"},"type":"array","title":"Sources"},"exclude_folder_names":{"items":{"type":"string"},"type":"array","title":"Exclude Folder Names"},"extract_closed_matters":{"type":"boolean","title":"Extract Closed Matters"}},"type":"object","required":["sources","exclude_folder_names","extract_closed_matters"],"title":"MatterSourcesResponse"},"MeetingCaseOption":{"properties":{"case_id":{"type":"string","format":"uuid","title":"Case Id"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["case_id","title"],"title":"MeetingCaseOption","description":"Case option for meeting filters"},"MeetingCasesResponse":{"properties":{"cases":{"items":{"$ref":"#/components/schemas/MeetingCaseOption"},"type":"array","title":"Cases"}},"type":"object","required":["cases"],"title":"MeetingCasesResponse","description":"Response model for list of cases with meetings"},"MeetingListItem":{"properties":{"meeting_id":{"type":"string","format":"uuid","title":"Meeting Id","description":"Meeting UUID"},"attendee_first_name":{"type":"string","title":"Attendee First Name","description":"Attendee first name"},"attendee_last_name":{"type":"string","title":"Attendee Last Name","description":"Attendee last name"},"attendee_phone_number":{"type":"string","title":"Attendee Phone Number","description":"Attendee phone number"},"attendee_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Attendee Email","description":"Attendee email"},"case_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Case Name","description":"Case name if associated"},"staff_name":{"type":"string","title":"Staff Name","description":"Staff member name"},"start_time":{"type":"string","title":"Start Time","description":"Meeting start time in ISO format"},"created_at":{"type":"string","title":"Created At","description":"Meeting creation timestamp"}},"type":"object","required":["meeting_id","attendee_first_name","attendee_last_name","attendee_phone_number","staff_name","start_time","created_at"],"title":"MeetingListItem","description":"Meeting item for dropdown selection"},"MeetingMetricsResponse":{"properties":{"meetings_last_24_hours":{"type":"integer","title":"Meetings Last 24 Hours"},"meetings_this_week":{"type":"integer","title":"Meetings This Week"},"total_meetings":{"type":"integer","title":"Total Meetings"}},"type":"object","required":["meetings_last_24_hours","meetings_this_week","total_meetings"],"title":"MeetingMetricsResponse","description":"Response model for meeting metrics"},"MeetingResponse":{"properties":{"meeting_id":{"type":"string","format":"uuid","title":"Meeting Id"},"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"booked_with_user_id":{"type":"string","format":"uuid","title":"Booked With User Id"},"booked_with_user_first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Booked With User First Name"},"booked_with_user_last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Booked With User Last Name"},"booked_with_user_timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Booked With User Timezone"},"call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Call Id"},"attendee_first_name":{"type":"string","title":"Attendee First Name"},"attendee_last_name":{"type":"string","title":"Attendee Last Name"},"attendee_phone_number":{"type":"string","title":"Attendee Phone Number"},"attendee_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Attendee Email"},"attendee_timezone":{"type":"string","title":"Attendee Timezone"},"case_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Case Id"},"case_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Case Title"},"case_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Case Description"},"start_time":{"type":"string","title":"Start Time"},"duration_minutes":{"type":"integer","title":"Duration Minutes"},"created_at":{"type":"string","title":"Created At"},"is_test_meeting":{"type":"boolean","title":"Is Test Meeting","default":false}},"type":"object","required":["meeting_id","customer_id","booked_with_user_id","attendee_first_name","attendee_last_name","attendee_phone_number","attendee_email","attendee_timezone","case_id","start_time","duration_minutes","created_at"],"title":"MeetingResponse","description":"Response model for a meeting"},"MeetingStaffMemberOption":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"full_name":{"type":"string","title":"Full Name"}},"type":"object","required":["user_id","first_name","last_name","full_name"],"title":"MeetingStaffMemberOption","description":"Staff member option for meeting filters"},"MeetingStaffMembersResponse":{"properties":{"staff_members":{"items":{"$ref":"#/components/schemas/MeetingStaffMemberOption"},"type":"array","title":"Staff Members"}},"type":"object","required":["staff_members"],"title":"MeetingStaffMembersResponse","description":"Response model for list of staff members with meetings"},"MessageGenerationContextResponse":{"properties":{"customer_id":{"type":"string","format":"uuid","title":"Customer Id","description":"The customer ID"},"message_generation_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message Generation Context","description":"Optional context to include in LLM prompt for message generation"}},"type":"object","required":["customer_id"],"title":"MessageGenerationContextResponse","description":"Response with customer's message generation context"},"MessageSettingsResponse":{"properties":{"messages_enabled":{"type":"boolean","title":"Messages Enabled","description":"Whether message taking is enabled for this customer"},"sms_notifications_enabled":{"type":"boolean","title":"Sms Notifications Enabled","description":"Whether SMS notifications are enabled"},"sms_recipients":{"items":{"type":"string"},"type":"array","title":"Sms Recipients","description":"List of phone numbers (E.164 format) to receive SMS notifications"},"email_notifications_enabled":{"type":"boolean","title":"Email Notifications Enabled","description":"Whether email notifications are enabled"},"email_recipients":{"items":{"type":"string"},"type":"array","title":"Email Recipients","description":"List of email addresses to receive notifications"}},"type":"object","required":["messages_enabled","sms_notifications_enabled","email_notifications_enabled"],"title":"MessageSettingsResponse","description":"Message settings response model"},"Microsoft365AuthorizationUrl":{"properties":{"authorization_url":{"type":"string","title":"Authorization Url"}},"type":"object","required":["authorization_url"],"title":"Microsoft365AuthorizationUrl","description":"Microsoft 365 admin consent URL response"},"Microsoft365Calendar":{"properties":{"id":{"type":"string","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"is_default_calendar":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Default Calendar"},"can_edit":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Can Edit"},"owner":{"anyOf":[{"$ref":"#/components/schemas/Microsoft365CalendarOwner"},{"type":"null"}]}},"type":"object","required":["id"],"title":"Microsoft365Calendar","description":"Microsoft 365 calendar"},"Microsoft365CalendarItem":{"properties":{"microsoft365_calendar_id":{"type":"string","format":"uuid","title":"Microsoft365 Calendar Id"},"microsoft365_calendar_unique_id":{"type":"string","title":"Microsoft365 Calendar Unique Id"},"calendar_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Calendar Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"is_default_calendar":{"type":"boolean","title":"Is Default Calendar"},"can_edit":{"type":"boolean","title":"Can Edit"},"owner_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Name"},"owner_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Email"}},"type":"object","required":["microsoft365_calendar_id","microsoft365_calendar_unique_id","calendar_id","name","color","is_default_calendar","can_edit","owner_name","owner_email"],"title":"Microsoft365CalendarItem","description":"Response model for a Microsoft 365 Calendar"},"Microsoft365CalendarListResponse":{"properties":{"calendars":{"items":{"$ref":"#/components/schemas/Microsoft365CalendarItem"},"type":"array","title":"Calendars"}},"type":"object","required":["calendars"],"title":"Microsoft365CalendarListResponse","description":"Response model for list of Microsoft 365 Calendars"},"Microsoft365CalendarOwner":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"}},"type":"object","title":"Microsoft365CalendarOwner","description":"Calendar owner info"},"Microsoft365CalendarsResponse":{"properties":{"calendars":{"items":{"$ref":"#/components/schemas/Microsoft365Calendar"},"type":"array","title":"Calendars","default":[]}},"type":"object","title":"Microsoft365CalendarsResponse","description":"Response containing list of Microsoft 365 calendars"},"Microsoft365CallbackRequest":{"properties":{"tenant":{"type":"string","title":"Tenant"},"admin_consent":{"type":"string","title":"Admin Consent"},"state":{"type":"string","title":"State"}},"type":"object","required":["tenant","admin_consent","state"],"title":"Microsoft365CallbackRequest","description":"Request body for Microsoft 365 admin consent callback"},"Microsoft365Status":{"properties":{"connected":{"type":"boolean","title":"Connected"},"tenant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Id"}},"type":"object","required":["connected"],"title":"Microsoft365Status","description":"Microsoft 365 integration status"},"Microsoft365TestConnectionResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"user_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Count"}},"type":"object","required":["success","message"],"title":"Microsoft365TestConnectionResponse","description":"Response from testing Microsoft 365 connection"},"MoovAccountInfoResponse":{"properties":{"account_id":{"type":"string","format":"uuid","title":"Account Id"},"legal_name":{"type":"string","title":"Legal Name"},"address":{"$ref":"#/components/schemas/MoovAddress"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"account_type":{"type":"string","title":"Account Type"}},"type":"object","required":["account_id","legal_name","address","account_type"],"title":"MoovAccountInfoResponse","description":"Response with Moov account information."},"MoovAddress":{"properties":{"address_line1":{"type":"string","title":"Address Line1"},"address_line2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line2"},"city":{"type":"string","title":"City"},"state_or_province":{"type":"string","title":"State Or Province"},"postal_code":{"type":"string","title":"Postal Code"},"country":{"type":"string","title":"Country","default":"US"}},"type":"object","required":["address_line1","city","state_or_province","postal_code"],"title":"MoovAddress","description":"Physical address for Moov account."},"MoovTokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"refresh_token":{"type":"string","title":"Refresh Token"},"expires_in":{"type":"integer","title":"Expires In"},"token_type":{"type":"string","title":"Token Type","default":"Bearer"},"account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Id"}},"type":"object","required":["access_token","refresh_token","expires_in"],"title":"MoovTokenResponse","description":"Response with Moov access token."},"NetSapiensConnectRequest":{"properties":{"base_url":{"type":"string","title":"Base Url","description":"ns-api base URL, e.g. https://24735-hpbx.dashmanager.com/ns-api/"},"client_id":{"type":"string","title":"Client Id"},"client_secret":{"type":"string","title":"Client Secret"},"username":{"type":"string","title":"Username"},"password":{"type":"string","title":"Password"},"pbx_domain":{"type":"string","title":"Pbx Domain","description":"PBX domain, e.g. brianjlevy.24735.service"},"oncall_queue_extension":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Oncall Queue Extension","description":"Call queue extension whose membership tracks the on-call user, e.g. 4607"}},"type":"object","required":["base_url","client_id","client_secret","username","password","pbx_domain"],"title":"NetSapiensConnectRequest"},"NetSapiensDisconnectResponse":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"NetSapiensDisconnectResponse"},"NetSapiensSettingsUpdateRequest":{"properties":{"oncall_queue_extension":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Oncall Queue Extension","description":"Queue extension to reconcile; pass null explicitly to clear the configured queue"},"oncall_reconcile_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Oncall Reconcile Enabled","description":"Master switch for on-call queue-member reconciliation. Set false to pause it while preserving the configured queue and all other NetSapiens behavior. Omit to leave unchanged."}},"type":"object","title":"NetSapiensSettingsUpdateRequest"},"NetSapiensStatus":{"properties":{"connected":{"type":"boolean","title":"Connected"},"base_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Url"},"pbx_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pbx Domain"},"oncall_queue_extension":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Oncall Queue Extension"},"oncall_reconcile_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Oncall Reconcile Enabled"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"last_reconcile_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Reconcile At"},"last_successful_reconcile_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Successful Reconcile At"},"last_error_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Error At"},"last_error_msg":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error Msg"}},"type":"object","required":["connected"],"title":"NetSapiensStatus"},"NextBillPreviewResponse":{"properties":{"gross_amount_cents":{"type":"integer","title":"Gross Amount Cents"},"gross_amount_display":{"type":"string","title":"Gross Amount Display"},"total_credits_cents":{"type":"integer","title":"Total Credits Cents"},"total_credits_display":{"type":"string","title":"Total Credits Display"},"total_charges_cents":{"type":"integer","title":"Total Charges Cents"},"total_charges_display":{"type":"string","title":"Total Charges Display"},"net_amount_cents":{"type":"integer","title":"Net Amount Cents"},"net_amount_display":{"type":"string","title":"Net Amount Display"},"per_call_usage":{"anyOf":[{"$ref":"#/components/schemas/PerCallUsageResponse"},{"type":"null"}],"description":"Usage breakdown; only present for minimum + per-call contracts"}},"type":"object","required":["gross_amount_cents","gross_amount_display","total_credits_cents","total_credits_display","total_charges_cents","total_charges_display","net_amount_cents","net_amount_display"],"title":"NextBillPreviewResponse"},"NudgeResponse":{"properties":{"message":{"$ref":"#/components/schemas/app__chat__schemas__MessageResponse"},"nudged":{"type":"boolean","title":"Nudged","description":"Whether a nudge was actually sent (false if rate-limited or no idle_message configured)"}},"type":"object","required":["message","nudged"],"title":"NudgeResponse"},"OAuthDisconnectResponse":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"OAuthDisconnectResponse","description":"OAuth disconnect response"},"OnCallAssignmentResponse":{"properties":{"assignment_date":{"type":"string","format":"date","title":"Assignment Date","description":"Date this assignment applies to (in the firm's timezone)"},"user_id":{"type":"string","format":"uuid","title":"User Id","description":"User on call for this date"}},"type":"object","required":["assignment_date","user_id"],"title":"OnCallAssignmentResponse"},"OnCallScheduleHoursEntry":{"properties":{"weekday":{"type":"integer","maximum":6.0,"minimum":0.0,"title":"Weekday","description":"Weekday, 0=Monday .. 6=Sunday"},"enabled":{"type":"boolean","title":"Enabled","description":"Whether there is an on-call window on this weekday","default":true},"start_time":{"type":"string","format":"time","title":"Start Time","description":"Window start (firm timezone)"},"end_time":{"type":"string","format":"time","title":"End Time","description":"Window end; end <= start means the window crosses midnight"}},"type":"object","required":["weekday","start_time","end_time"],"title":"OnCallScheduleHoursEntry"},"OnCallScheduleHoursResponse":{"properties":{"weekday":{"type":"integer","title":"Weekday","description":"Weekday, 0=Monday .. 6=Sunday"},"enabled":{"type":"boolean","title":"Enabled","description":"Whether there is an on-call window on this weekday"},"start_time":{"type":"string","format":"time","title":"Start Time","description":"Window start (firm timezone)"},"end_time":{"type":"string","format":"time","title":"End Time","description":"Window end; end <= start means the window crosses midnight into the next day"}},"type":"object","required":["weekday","enabled","start_time","end_time"],"title":"OnCallScheduleHoursResponse"},"OnCallScheduleResponse":{"properties":{"assignments":{"items":{"$ref":"#/components/schemas/OnCallAssignmentResponse"},"type":"array","title":"Assignments","description":"Explicit per-date assignments in the requested range"},"default_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Default User Id","description":"Fallback on-call user for dates with no explicit assignment"},"hours":{"items":{"$ref":"#/components/schemas/OnCallScheduleHoursResponse"},"type":"array","title":"Hours","description":"Per-weekday on-call windows; empty list means on-call 24/7"}},"type":"object","required":["assignments","hours"],"title":"OnCallScheduleResponse"},"OneDriveAuthorizationUrl":{"properties":{"authorization_url":{"type":"string","title":"Authorization Url"}},"type":"object","required":["authorization_url"],"title":"OneDriveAuthorizationUrl","description":"OneDrive OAuth authorization URL response"},"OneDriveStatus":{"properties":{"connected":{"type":"boolean","title":"Connected"},"connected_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connected At"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"},"account_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Email"},"folder_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Folder Path"}},"type":"object","required":["connected"],"title":"OneDriveStatus","description":"OneDrive connection status"},"OutboundDeveloperSettingsResponse":{"properties":{"customer_id":{"type":"string","format":"uuid","title":"Customer Id","description":"The customer ID"},"extended_calling_window_enabled":{"type":"boolean","title":"Extended Calling Window Enabled","description":"Whether this customer may set an outbound calling window wider than 12:00-18:00 ET (relaxes the bounds to 08:00-20:00 ET)"},"trigger_fields":{"items":{"$ref":"#/components/schemas/TriggerFieldConfig"},"type":"array","title":"Trigger Fields","description":"Fields an outbound call trigger supplies for this customer (from their CRM or a Meta lead-ad automation)"},"call_pacing_enabled":{"type":"boolean","title":"Call Pacing Enabled","description":"Whether outbound calls are paced at one per customer per 10 minutes. When false, the whole queue drains in one run and enqueueing dials immediately."},"max_calls_per_number_per_day":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Calls Per Number Per Day","description":"Per-phone-number daily outbound call limit. Null means no limit."},"outbound_leads_enabled":{"type":"boolean","title":"Outbound Leads Enabled","description":"Whether this customer curates an outbound lead list. When false their leads come from a trigger, so the lead list, CSV import and manual call queueing are hidden and the lead-writing endpoints reject."}},"type":"object","required":["customer_id","extended_calling_window_enabled","call_pacing_enabled","outbound_leads_enabled"],"title":"OutboundDeveloperSettingsResponse","description":"Response with customer's developer-only outbound settings (stored on settings_outbound)"},"OutboundLeadIdsResponse":{"properties":{"ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Ids"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["ids","total"],"title":"OutboundLeadIdsResponse","description":"Response containing just IDs of matching outbound leads."},"OutboundLeadListResponse":{"properties":{"leads":{"items":{"$ref":"#/components/schemas/OutboundLeadResponse"},"type":"array","title":"Leads"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["leads","total","limit","offset"],"title":"OutboundLeadListResponse","description":"Response for listing outbound leads with pagination."},"OutboundLeadResponse":{"properties":{"outbound_lead_id":{"type":"string","format":"uuid","title":"Outbound Lead Id"},"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"status":{"type":"string","title":"Status"},"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"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"case_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Case Id"},"case_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Case Title"},"is_qualified":{"type":"boolean","title":"Is Qualified","default":false},"qualification_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qualification Summary"},"qualification_details":{"anyOf":[{"items":{"$ref":"#/components/schemas/QualificationQA"},"type":"array"},{"type":"null"}],"title":"Qualification Details"},"inquiry_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inquiry Reason"},"trigger_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Trigger Metadata"},"call_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call Status"},"has_call":{"type":"boolean","title":"Has Call","default":false},"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":["outbound_lead_id","customer_id","status","created_at"],"title":"OutboundLeadResponse","description":"Full outbound lead response."},"OutboundPhoneNumberOption":{"properties":{"phone_number_id":{"type":"string","format":"uuid","title":"Phone Number Id"},"phone_number":{"type":"string","title":"Phone Number"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"vapi_phone_number_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vapi Phone Number Id"},"inbound_squad_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inbound Squad Id"},"outbound_squad_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outbound Squad Id"}},"type":"object","required":["phone_number_id","phone_number"],"title":"OutboundPhoneNumberOption","description":"An outbound-enabled phone number available for calling."},"OutboundPhoneNumbersResponse":{"properties":{"phone_numbers":{"items":{"$ref":"#/components/schemas/OutboundPhoneNumberOption"},"type":"array","title":"Phone Numbers"}},"type":"object","required":["phone_numbers"],"title":"OutboundPhoneNumbersResponse","description":"Response with available outbound phone numbers."},"OutboundSettingsResponse":{"properties":{"calling_window_start":{"type":"string","title":"Calling Window Start","description":"Start of calling window in HH:MM format (Eastern Time)"},"calling_window_end":{"type":"string","title":"Calling Window End","description":"End of calling window in HH:MM format (Eastern Time)"},"min_calling_window_start":{"type":"string","title":"Min Calling Window Start","description":"Earliest allowed calling window start in HH:MM format (Eastern Time), based on the customer's extended calling window flag"},"max_calling_window_end":{"type":"string","title":"Max Calling Window End","description":"Latest allowed calling window end in HH:MM format (Eastern Time), based on the customer's extended calling window flag"},"trigger_fields":{"items":{"$ref":"#/components/schemas/TriggerFieldConfig"},"type":"array","title":"Trigger Fields","description":"Fields an outbound call trigger supplies for this customer. Read-only here -- edited on the developer settings router."},"call_pacing_enabled":{"type":"boolean","title":"Call Pacing Enabled","description":"Whether outbound calls are paced at one per 10 minutes. When false, calls are placed as soon as they are queued. Read-only here -- edited on the developer settings router.","default":true},"outbound_leads_enabled":{"type":"boolean","title":"Outbound Leads Enabled","description":"Whether this customer curates a lead list. When false their leads arrive from a trigger, so the lead list, CSV import and manual call queueing are hidden. Read-only here -- edited on the developer settings router.","default":true}},"type":"object","required":["calling_window_start","calling_window_end","min_calling_window_start","max_calling_window_end"],"title":"OutboundSettingsResponse","description":"Outbound calling window settings response model"},"OutboundTestCallPhoneNumberOption":{"properties":{"phone_number_id":{"type":"string","format":"uuid","title":"Phone Number Id"},"phone_number":{"type":"string","title":"Phone Number"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"ready":{"type":"boolean","title":"Ready","description":"True when the number can actually place calls"}},"type":"object","required":["phone_number_id","phone_number","ready"],"title":"OutboundTestCallPhoneNumberOption","description":"An outbound-enabled number available for a test call.\n\nDeliberately omits VAPI/squad IDs -- those are internal identifiers and this\nis a customer-facing endpoint. `ready` is all the client needs."},"OutboundTestCallPhoneNumbersResponse":{"properties":{"phone_numbers":{"items":{"$ref":"#/components/schemas/OutboundTestCallPhoneNumberOption"},"type":"array","title":"Phone Numbers"}},"type":"object","required":["phone_numbers"],"title":"OutboundTestCallPhoneNumbersResponse","description":"Response listing numbers available for an outbound test call."},"OverallAnswerer":{"properties":{"agent_extension":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Extension","description":"Null for the AI receptionist row"},"agent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Name"},"answered_count":{"type":"integer","title":"Answered Count"},"is_ai":{"type":"boolean","title":"Is Ai","default":false},"breakdown":{"items":{"$ref":"#/components/schemas/AnswererBreakdownItem"},"type":"array","title":"Breakdown","description":"Per-queue (staff) or per-intended-team (AI) counts, largest first"}},"type":"object","required":["answered_count"],"title":"OverallAnswerer","description":"One answerer across ALL teams: a staff extension (from flow snapshots,\npark legs excluded) or the AI receptionist (bounced calls — the answerer\nof last resort, not on any team)."},"PPContactMatchContact":{"properties":{"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"mobile":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mobile"},"phone_office":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Office"},"phone_home":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Home"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"practicepanther_guid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Practicepanther Guid"}},"type":"object","title":"PPContactMatchContact","description":"Contact info for a matched PracticePanther contact."},"PPContactMatchMatter":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"matter_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matter Number"},"practicepanther_guid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Practicepanther Guid"}},"type":"object","title":"PPContactMatchMatter","description":"Matter info for a matched PracticePanther contact."},"PPContactMatchResponse":{"properties":{"matched":{"type":"boolean","title":"Matched"},"contact":{"anyOf":[{"$ref":"#/components/schemas/PPContactMatchContact"},{"type":"null"}]},"matters":{"items":{"$ref":"#/components/schemas/PPContactMatchMatter"},"type":"array","title":"Matters","default":[]}},"type":"object","required":["matched"],"title":"PPContactMatchResponse","description":"Response for PP contact match lookup on a call."},"PPStatusResponse":{"properties":{"visible":{"type":"boolean","title":"Visible"},"is_test_call":{"type":"boolean","title":"Is Test Call"},"should_poll":{"type":"boolean","title":"Should Poll"},"pp_link_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pp Link Url"},"contact":{"anyOf":[{"$ref":"#/components/schemas/PPStepDisplay"},{"type":"null"}]},"matter":{"anyOf":[{"$ref":"#/components/schemas/PPStepDisplay"},{"type":"null"}]},"portal":{"anyOf":[{"$ref":"#/components/schemas/PPStepDisplay"},{"type":"null"}]},"call":{"$ref":"#/components/schemas/PPStepDisplay"}},"type":"object","required":["visible","is_test_call","should_poll","call"],"title":"PPStatusResponse","description":"Display-ready PracticePanther status for the call detail page."},"PPStepDisplay":{"properties":{"status":{"$ref":"#/components/schemas/PPStepStatus"},"badge_label":{"type":"string","title":"Badge Label"},"badge_variant":{"type":"string","title":"Badge Variant"},"can_create":{"type":"boolean","title":"Can Create"}},"type":"object","required":["status","badge_label","badge_variant","can_create"],"title":"PPStepDisplay","description":"Display-ready data for a single PP step."},"PPStepStatus":{"type":"string","enum":["created","skipped","pending","failed","not_started"],"title":"PPStepStatus","description":"Display status for a PracticePanther step."},"PaginatedCallsResponse":{"properties":{"calls":{"items":{"$ref":"#/components/schemas/RecentCall"},"type":"array","title":"Calls"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"},"total_pages":{"type":"integer","title":"Total Pages"}},"type":"object","required":["calls","total","page","page_size","total_pages"],"title":"PaginatedCallsResponse","description":"Paginated calls response schema"},"PaymentMethodType":{"type":"string","enum":["bank","card"],"title":"PaymentMethodType","description":"Payment method type enum."},"PerCallUsageResponse":{"properties":{"period_start":{"type":"string","format":"date-time","title":"Period Start","description":"Start of the current service period"},"period_end":{"type":"string","format":"date-time","title":"Period End","description":"End of the current service period (exclusive)"},"billable_call_count":{"type":"integer","title":"Billable Call Count","description":"Calls counted toward this period's charges"},"per_call_rate_cents":{"type":"integer","title":"Per Call Rate Cents"},"per_call_rate_display":{"type":"string","title":"Per Call Rate Display"},"usage_amount_cents":{"type":"integer","title":"Usage Amount Cents","description":"billable_call_count * per_call_rate"},"usage_amount_display":{"type":"string","title":"Usage Amount Display"},"minimum_cents":{"type":"integer","title":"Minimum Cents","description":"Monthly minimum; 0 when the contract has no minimum item"},"minimum_display":{"type":"string","title":"Minimum Display"},"is_minimum_applied":{"type":"boolean","title":"Is Minimum Applied","description":"True when the minimum exceeds usage, so the minimum is what's billed"},"min_call_duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Call Duration Seconds","description":"Calls shorter than this weren't counted; null means no minimum duration"},"count_voicemails":{"type":"boolean","title":"Count Voicemails","description":"Whether outbound voicemail calls were counted"},"total_calls":{"type":"integer","title":"Total Calls","description":"All calls placed or received in the period, before exclusions"},"excluded_test":{"type":"integer","title":"Excluded Test","description":"Test calls, never billable"},"excluded_imported":{"type":"integer","title":"Excluded Imported","description":"Imported call logs and intake recordings (RingCentral/VXT/Croo), not agent calls"},"excluded_error":{"type":"integer","title":"Excluded Error","description":"Calls that ended in an error"},"excluded_no_duration":{"type":"integer","title":"Excluded No Duration","description":"Calls with no recorded duration (failed or incomplete)"},"excluded_unanswered":{"type":"integer","title":"Excluded Unanswered","description":"Outbound calls that never connected (no answer, busy)"},"excluded_too_short":{"type":"integer","title":"Excluded Too Short","description":"Calls below min_call_duration_seconds"},"excluded_voicemail":{"type":"integer","title":"Excluded Voicemail","description":"Outbound calls that reached voicemail"}},"type":"object","required":["period_start","period_end","billable_call_count","per_call_rate_cents","per_call_rate_display","usage_amount_cents","usage_amount_display","minimum_cents","minimum_display","is_minimum_applied","count_voicemails","total_calls","excluded_test","excluded_imported","excluded_error","excluded_no_duration","excluded_unanswered","excluded_too_short","excluded_voicemail"],"title":"PerCallUsageResponse","description":"Current-period usage for a minimum + per-call contract.\n\nProvisional until the period closes: duration and voicemail outcomes are set\nby post-processing, so calls from the last few minutes may not be counted yet."},"PhoneNumber":{"properties":{"number":{"type":"string","title":"Number"},"country_code":{"type":"string","title":"Country Code","default":"1"}},"type":"object","required":["number"],"title":"PhoneNumber","description":"Phone number with country code."},"PhoneNumberCreate":{"properties":{"phone_number":{"type":"string","title":"Phone Number","description":"Phone number or SIP endpoint (e.g., +15551234567 or 1000)"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label","description":"Friendly label like 'Main Line' or 'After Hours'"},"is_active":{"type":"boolean","title":"Is Active","description":"Whether the number is active"},"is_test":{"type":"boolean","title":"Is Test","description":"Whether this is a test number (calls won't make real changes)"},"provider":{"type":"string","enum":["twilio","daily","vapi"],"title":"Provider","description":"Telephony provider (twilio, daily, or vapi)"},"call_transport":{"type":"string","enum":["daily_sip","twilio_websocket"],"title":"Call Transport","description":"Call transport: 'daily_sip' (legacy) or 'twilio_websocket' (WebSocket Media Streams)","default":"daily_sip"},"agent_platform":{"type":"string","enum":["pipecat","vapi"],"title":"Agent Platform","description":"Voice agent platform: 'pipecat' or 'vapi'","default":"pipecat"},"inbound_squad_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inbound Squad Id","description":"Vapi squad ID for inbound assistant-request routing"},"outbound_squad_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outbound Squad Id","description":"Vapi squad ID for outbound calls"},"business_hours_inbound_squad_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Hours Inbound Squad Id","description":"Vapi squad ID for inbound calls during business hours (used when business_hours_enabled feature flag is on)"},"after_hours_inbound_squad_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"After Hours Inbound Squad Id","description":"Vapi squad ID for inbound calls outside business hours (used when business_hours_enabled feature flag is on)"},"outbound_enabled":{"type":"boolean","title":"Outbound Enabled","description":"Whether this number is available for automated outbound dialing","default":false},"provider_bypass_enabled":{"type":"boolean","title":"Provider Bypass Enabled","description":"Route inbound Twilio calls through our own /telephony/inbound-vapi endpoint instead of Vapi's inbound webhook. Required for attended transfer, which needs Twilio call control to stay on our side","default":false},"is_bounce_back":{"type":"boolean","title":"Is Bounce Back","description":"Dedicated bounce-back return line: unanswered transferred calls forwarded back here are matched to their original call and the conversation is injected into the inbound squad","default":false},"vapi_phone_number_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vapi Phone Number Id","description":"VAPI phone number resource ID (for outbound API calls)"},"default_greeting_override":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Greeting Override","description":"Per-number default greeting; overrides the customer-wide default/business-hours greeting selection for calls to this number"},"contact_greeting_override":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Greeting Override","description":"Per-number known-contact greeting template ({first_name}/{last_name}); overrides the customer-wide contact greeting for calls to this number"}},"type":"object","required":["phone_number","is_active","is_test","provider"],"title":"PhoneNumberCreate","description":"Schema for creating a phone number."},"PhoneNumberInfo":{"properties":{"phone_number":{"type":"string","title":"Phone Number"},"is_test":{"type":"boolean","title":"Is Test"},"outbound_enabled":{"type":"boolean","title":"Outbound Enabled","default":false},"is_bounce_back":{"type":"boolean","title":"Is Bounce Back","default":false}},"type":"object","required":["phone_number","is_test"],"title":"PhoneNumberInfo","description":"Simple phone number info for settings display"},"PhoneNumberResponse":{"properties":{"phone_number":{"type":"string","title":"Phone Number","description":"Phone number or SIP endpoint (e.g., +15551234567 or 1000)"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label","description":"Friendly label like 'Main Line' or 'After Hours'"},"is_active":{"type":"boolean","title":"Is Active","description":"Whether the number is active"},"is_test":{"type":"boolean","title":"Is Test","description":"Whether this is a test number (calls won't make real changes)"},"provider":{"type":"string","enum":["twilio","daily","vapi"],"title":"Provider","description":"Telephony provider (twilio, daily, or vapi)"},"call_transport":{"type":"string","enum":["daily_sip","twilio_websocket"],"title":"Call Transport","description":"Call transport: 'daily_sip' (legacy) or 'twilio_websocket' (WebSocket Media Streams)","default":"daily_sip"},"agent_platform":{"type":"string","enum":["pipecat","vapi"],"title":"Agent Platform","description":"Voice agent platform: 'pipecat' or 'vapi'","default":"pipecat"},"inbound_squad_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inbound Squad Id","description":"Vapi squad ID for inbound assistant-request routing"},"outbound_squad_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outbound Squad Id","description":"Vapi squad ID for outbound calls"},"business_hours_inbound_squad_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Hours Inbound Squad Id","description":"Vapi squad ID for inbound calls during business hours (used when business_hours_enabled feature flag is on)"},"after_hours_inbound_squad_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"After Hours Inbound Squad Id","description":"Vapi squad ID for inbound calls outside business hours (used when business_hours_enabled feature flag is on)"},"outbound_enabled":{"type":"boolean","title":"Outbound Enabled","description":"Whether this number is available for automated outbound dialing","default":false},"provider_bypass_enabled":{"type":"boolean","title":"Provider Bypass Enabled","description":"Route inbound Twilio calls through our own /telephony/inbound-vapi endpoint instead of Vapi's inbound webhook. Required for attended transfer, which needs Twilio call control to stay on our side","default":false},"is_bounce_back":{"type":"boolean","title":"Is Bounce Back","description":"Dedicated bounce-back return line: unanswered transferred calls forwarded back here are matched to their original call and the conversation is injected into the inbound squad","default":false},"vapi_phone_number_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vapi Phone Number Id","description":"VAPI phone number resource ID (for outbound API calls)"},"default_greeting_override":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Greeting Override","description":"Per-number default greeting; overrides the customer-wide default/business-hours greeting selection for calls to this number"},"contact_greeting_override":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Greeting Override","description":"Per-number known-contact greeting template ({first_name}/{last_name}); overrides the customer-wide contact greeting for calls to this number"},"phone_number_id":{"type":"string","format":"uuid","title":"Phone Number Id","description":"Phone number ID"},"customer_id":{"type":"string","format":"uuid","title":"Customer Id","description":"Customer ID"},"created_at":{"type":"string","title":"Created At","description":"Creation timestamp"},"type":{"type":"string","enum":["PSTN","SIP"],"title":"Type","description":"Derived phone number type based on format.","readOnly":true}},"type":"object","required":["phone_number","is_active","is_test","provider","phone_number_id","customer_id","created_at","type"],"title":"PhoneNumberResponse","description":"Schema for phone number response."},"PhoneNumberUpdate":{"properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label","description":"Friendly label"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active","description":"Active status"},"is_test":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Test","description":"Whether this is a test number"},"provider":{"anyOf":[{"type":"string","enum":["twilio","daily","vapi"]},{"type":"null"}],"title":"Provider","description":"Telephony provider"},"call_transport":{"anyOf":[{"type":"string","enum":["daily_sip","twilio_websocket"]},{"type":"null"}],"title":"Call Transport","description":"Call transport type"},"agent_platform":{"anyOf":[{"type":"string","enum":["pipecat","vapi"]},{"type":"null"}],"title":"Agent Platform","description":"Voice agent platform"},"inbound_squad_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inbound Squad Id","description":"Vapi squad ID for inbound assistant-request routing"},"outbound_squad_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outbound Squad Id","description":"Vapi squad ID for outbound calls"},"business_hours_inbound_squad_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Hours Inbound Squad Id","description":"Vapi squad ID for inbound calls during business hours (used when business_hours_enabled feature flag is on)"},"after_hours_inbound_squad_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"After Hours Inbound Squad Id","description":"Vapi squad ID for inbound calls outside business hours (used when business_hours_enabled feature flag is on)"},"outbound_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Outbound Enabled","description":"Whether this number is available for automated outbound dialing"},"provider_bypass_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Provider Bypass Enabled","description":"Route inbound Twilio calls through our own /telephony/inbound-vapi endpoint instead of Vapi's inbound webhook. Required for attended transfer, which needs Twilio call control to stay on our side"},"is_bounce_back":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Bounce Back","description":"Dedicated bounce-back return line: unanswered transferred calls forwarded back here are matched to their original call and the conversation is injected into the inbound squad"},"vapi_phone_number_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vapi Phone Number Id","description":"VAPI phone number resource ID (for outbound API calls)"},"default_greeting_override":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Greeting Override","description":"Per-number default greeting; overrides the customer-wide default/business-hours greeting selection for calls to this number"},"contact_greeting_override":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Greeting Override","description":"Per-number known-contact greeting template ({first_name}/{last_name}); overrides the customer-wide contact greeting for calls to this number"}},"type":"object","title":"PhoneNumberUpdate","description":"Schema for updating a phone number."},"PipecatAgentIdResponse":{"properties":{"customer_id":{"type":"string","format":"uuid","title":"Customer Id","description":"The customer ID"},"pipecat_agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pipecat Agent Id","description":"Pipecat Cloud agent identifier"}},"type":"object","required":["customer_id"],"title":"PipecatAgentIdResponse","description":"Response with customer's Pipecat agent ID"},"PlaceOutboundTestCallRequest":{"properties":{"customer_number":{"type":"string","title":"Customer Number","description":"Phone number to dial"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name","description":"Contact first name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name","description":"Contact last name"},"phone_number_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Phone Number Id","description":"Internal phone number ID to dial from. Optional when the customer has exactly one ready number."},"trigger_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Trigger Metadata","description":"Values for the customer's configured trigger fields (e.g. {\"lead_source\": \"instagram_ad\"})"}},"type":"object","required":["customer_number"],"title":"PlaceOutboundTestCallRequest","description":"Request to place a one-off outbound test call to an arbitrary number."},"PlaceOutboundTestCallResponse":{"properties":{"call_id":{"type":"string","format":"uuid","title":"Call Id","description":"Internal call record ID"},"phone_number":{"type":"string","title":"Phone Number","description":"The number the call was placed from"},"status":{"type":"string","title":"Status"}},"type":"object","required":["call_id","phone_number","status"],"title":"PlaceOutboundTestCallResponse","description":"Response from placing an outbound test call."},"PracticePantherAuditLogEntry":{"properties":{"audit_log_id":{"type":"string","format":"uuid","title":"Audit Log Id"},"event_type":{"type":"string","title":"Event Type"},"status":{"type":"string","title":"Status"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"},"call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Call Id"},"lead_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Lead Id"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["audit_log_id","event_type","status","created_at"],"title":"PracticePantherAuditLogEntry","description":"Single entry in the PracticePanther audit trail."},"PracticePantherCallItem":{"properties":{"guid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guid"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"priority":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Priority"},"date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date"},"account_guid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Guid"},"account_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Name"},"project_guid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Guid"},"project_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Name"},"assigned_to_users":{"anyOf":[{"items":{"$ref":"#/components/schemas/PracticePantherUser"},"type":"array"},{"type":"null"}],"title":"Assigned To Users"},"is_private":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Private"},"created_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created Date"}},"type":"object","title":"PracticePantherCallItem","description":"A normalized call record from PracticePanther"},"PracticePantherConnectRequest":{"properties":{"username":{"type":"string","title":"Username"},"password":{"type":"string","title":"Password"}},"type":"object","required":["username","password"],"title":"PracticePantherConnectRequest","description":"Request to connect PracticePanther integration"},"PracticePantherContactItem":{"properties":{"guid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guid"},"contact_guid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Guid"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"mobile":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mobile"},"phone_office":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Office"},"phone_home":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Home"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},"type":"object","title":"PracticePantherContactItem","description":"A normalized contact from the PracticePanther contacts list"},"PracticePantherCreateCallRequest":{"properties":{"name":{"type":"string","title":"Name"},"account_guid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Guid"},"project_guid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Guid"},"call_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call Type","default":"Inbound"},"call_date_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call Date Time"},"call_duration":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call Duration","default":"0"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","default":"Completed"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","default":""},"priority":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Priority","default":"Medium"},"is_private":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Private","default":false},"assigned_to_user_guids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Assigned To User Guids"}},"type":"object","required":["name"],"title":"PracticePantherCreateCallRequest","description":"Request to create a call record in PracticePanther"},"PracticePantherCreateCallResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"activity_guid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Activity Guid"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","message"],"title":"PracticePantherCreateCallResponse","description":"Response from creating a call record"},"PracticePantherCreateContactRequest":{"properties":{"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","default":""},"mobile":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mobile","default":""},"phone_office":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Office","default":""},"phone_home":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Home","default":""},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes","default":""}},"type":"object","required":["first_name","last_name"],"title":"PracticePantherCreateContactRequest","description":"Request to create a contact in PracticePanther"},"PracticePantherCreateContactResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"account_guid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Guid"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","message"],"title":"PracticePantherCreateContactResponse","description":"Response from creating a contact"},"PracticePantherCreateMatterRequest":{"properties":{"account_guid":{"type":"string","title":"Account Guid"},"name":{"type":"string","title":"Name"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes","default":""},"flat_rate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flat Rate"},"hourly_rate_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hourly Rate Type","default":"FlatRate"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","default":"Open"}},"type":"object","required":["account_guid","name"],"title":"PracticePantherCreateMatterRequest","description":"Request to create a matter/project in PracticePanther"},"PracticePantherCreateMatterResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"project_guid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Guid"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","message"],"title":"PracticePantherCreateMatterResponse","description":"Response from creating a matter"},"PracticePantherDeleteContactResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","message"],"title":"PracticePantherDeleteContactResponse","description":"Response from deleting a contact"},"PracticePantherDisconnectResponse":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"PracticePantherDisconnectResponse","description":"PracticePanther disconnect response"},"PracticePantherListCallsResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"calls":{"items":{"$ref":"#/components/schemas/PracticePantherCallItem"},"type":"array","title":"Calls","default":[]},"total":{"type":"integer","title":"Total","default":0}},"type":"object","required":["success"],"title":"PracticePantherListCallsResponse","description":"Response from listing call records"},"PracticePantherListContactsResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"contacts":{"items":{"$ref":"#/components/schemas/PracticePantherContactItem"},"type":"array","title":"Contacts","default":[]},"total":{"type":"integer","title":"Total","default":0}},"type":"object","required":["success"],"title":"PracticePantherListContactsResponse","description":"Response from listing contacts"},"PracticePantherListMattersResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"matters":{"items":{"$ref":"#/components/schemas/PracticePantherMatterItem"},"type":"array","title":"Matters","default":[]},"total":{"type":"integer","title":"Total","default":0}},"type":"object","required":["success"],"title":"PracticePantherListMattersResponse","description":"Response from listing matters"},"PracticePantherMatterItem":{"properties":{"guid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guid"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"account_guid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Guid"},"account_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Name"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Number"}},"type":"object","title":"PracticePantherMatterItem","description":"A normalized matter from the PracticePanther matters list"},"PracticePantherPortalInviteRequest":{"properties":{"account_guid":{"type":"string","title":"Account Guid"},"email":{"type":"string","title":"Email"}},"type":"object","required":["account_guid","email"],"title":"PracticePantherPortalInviteRequest","description":"Request to send a portal invite to a contact"},"PracticePantherPortalInviteResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","message"],"title":"PracticePantherPortalInviteResponse","description":"Response from sending a portal invite"},"PracticePantherSettingsResponse":{"properties":{"assigned_to_guid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned To Guid","description":"GUID of the PracticePanther user to assign new contacts and matters to"},"contact_tag_voice":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Tag Voice","description":"Tag applied to contacts created by voice agent"},"contact_tag_chat":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Tag Chat","description":"Tag applied to contacts created by web chat agent"},"dry_run":{"type":"boolean","title":"Dry Run","description":"Master override - when enabled, blocks all automatic PracticePanther actions regardless of individual auto-create settings"},"auto_create_contact":{"type":"boolean","title":"Auto Create Contact","description":"Whether contacts are automatically created in PracticePanther during the call pipeline"},"auto_create_matter":{"type":"boolean","title":"Auto Create Matter","description":"Whether matters are automatically created in PracticePanther during the call pipeline"},"auto_create_portal":{"type":"boolean","title":"Auto Create Portal","description":"Whether client portal invitations are automatically sent during the call pipeline"},"auto_create_call":{"type":"boolean","title":"Auto Create Call","description":"Whether call activities are automatically created in PracticePanther during the call pipeline"}},"type":"object","required":["dry_run","auto_create_contact","auto_create_matter","auto_create_portal","auto_create_call"],"title":"PracticePantherSettingsResponse","description":"PracticePanther integration settings response model"},"PracticePantherStatus":{"properties":{"connected":{"type":"boolean","title":"Connected"},"connected_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connected At"},"credentials_refreshed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Credentials Refreshed At"}},"type":"object","required":["connected"],"title":"PracticePantherStatus","description":"PracticePanther connection status"},"PracticePantherSyncResponse":{"properties":{"message":{"type":"string","title":"Message","description":"Status message"},"task_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Id","description":"Celery task ID for tracking (if async)"}},"type":"object","required":["message"],"title":"PracticePantherSyncResponse","description":"Response for triggering PracticePanther data sync"},"PracticePantherUser":{"properties":{"guid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guid"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"}},"type":"object","title":"PracticePantherUser","description":"A user from PracticePanther's user list"},"PracticePantherUsersResponse":{"properties":{"connected":{"type":"boolean","title":"Connected"},"users":{"items":{"$ref":"#/components/schemas/PracticePantherUser"},"type":"array","title":"Users","default":[]}},"type":"object","required":["connected"],"title":"PracticePantherUsersResponse","description":"Response containing list of PracticePanther users"},"PreviewBookingSmsRequest":{"properties":{"template":{"type":"string","title":"Template","description":"Template to preview with demo data"}},"type":"object","required":["template"],"title":"PreviewBookingSmsRequest","description":"Preview booking SMS request model"},"PreviewBookingSmsResponse":{"properties":{"rendered_message":{"type":"string","title":"Rendered Message","description":"Rendered message with demo data"},"character_count":{"type":"integer","title":"Character Count","description":"Character count of rendered message"},"sms_segment_count":{"type":"integer","title":"Sms Segment Count","description":"Number of SMS segments (160 chars each)"}},"type":"object","required":["rendered_message","character_count","sms_segment_count"],"title":"PreviewBookingSmsResponse","description":"Preview booking SMS response model"},"QualificationAgentResponse":{"properties":{"question":{"type":"string","title":"Question"},"criteria":{"type":"string","title":"Criteria"},"position":{"type":"integer","title":"Position"}},"type":"object","required":["question","criteria","position"],"title":"QualificationAgentResponse","description":"Simplified qualification response for agent endpoints."},"QualificationQA":{"properties":{"question":{"type":"string","title":"Question","description":"The qualification question that was asked or evaluated"},"answer":{"type":"string","title":"Answer","description":"The caller's answer or the evaluated response from the transcript"}},"type":"object","required":["question","answer"],"title":"QualificationQA","description":"A single qualification question and answer pair."},"QualificationResponse":{"properties":{"qualification_id":{"type":"string","format":"uuid","title":"Qualification Id"},"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"case_id":{"type":"string","format":"uuid","title":"Case Id"},"question":{"type":"string","title":"Question"},"criteria":{"type":"string","title":"Criteria"},"position":{"type":"integer","title":"Position"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["qualification_id","customer_id","case_id","question","criteria","position","created_at","updated_at"],"title":"QualificationResponse","description":"Full qualification record response."},"QueuedOutboundCallListResponse":{"properties":{"calls":{"items":{"$ref":"#/components/schemas/QueuedOutboundCallResponse"},"type":"array","title":"Calls"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["calls","total","limit","offset"],"title":"QueuedOutboundCallListResponse","description":"Response for listing queued outbound calls with pagination."},"QueuedOutboundCallResponse":{"properties":{"queued_outbound_call_id":{"type":"string","format":"uuid","title":"Queued Outbound Call Id"},"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"outbound_lead_id":{"type":"string","format":"uuid","title":"Outbound Lead Id"},"call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Call Id"},"status":{"type":"string","title":"Status"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"lead_first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lead First Name"},"lead_last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lead Last Name"},"lead_phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lead Phone Number"},"estimated_call_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Estimated Call Time"}},"type":"object","required":["queued_outbound_call_id","customer_id","outbound_lead_id","status","created_at"],"title":"QueuedOutboundCallResponse","description":"Full queued outbound call response."},"RTPRejectionCode":{"type":"string","enum":["AC03","AC04","AC06","AC14","AG01","AG03","MD07"],"title":"RTPRejectionCode","description":"The rejection code of an RTP transaction that caused the bank account status to change.\n\n- AC03: Account Invalid\n- AC04: Account Closed\n- AC06: Account Blocked\n- AC14: Creditor Account Type Invalid\n- AG01: Transactions Forbidden On Account\n- AG03: Transaction Type Not Supported\n- MD07: Customer Deceased"},"RcContactSyncSettingsSchema":{"properties":{"dry_run":{"type":"boolean","title":"Dry Run","default":true},"status":{"type":"string","title":"Status","default":"never_synced"},"last_sync_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Sync At"},"last_error_msg":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error Msg"}},"type":"object","title":"RcContactSyncSettingsSchema"},"RcContactSyncTriggerResponse":{"properties":{"queued":{"type":"boolean","title":"Queued"}},"type":"object","required":["queued"],"title":"RcContactSyncTriggerResponse"},"RealtimeLeadScoringSettingsResponse":{"properties":{"agent_visible_fields":{"items":{"type":"string"},"type":"array","title":"Agent Visible Fields","description":"Allowlist of property keys from lead_scoring_custom_schema that are exposed to the voice agent"}},"type":"object","title":"RealtimeLeadScoringSettingsResponse","description":"Realtime (live, mid-call) lead scoring settings response model"},"RealtimeTranscriptItem":{"properties":{"speaker":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Speaker","description":"Speaker identifier: 'user' or 'assistant'"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text","description":"The transcribed text for this turn"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp","description":"Timestamp of when this transcript item occurred"},"start_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start Ms","description":"Start offset in recording-clock milliseconds"},"end_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"End Ms","description":"End offset in recording-clock milliseconds"}},"type":"object","title":"RealtimeTranscriptItem","description":"Single item from a realtime transcript.\n\nThese are generated during the call by the bot and represent\neach turn in the conversation.\n\nAll fields are optional to handle malformed data gracefully."},"RecentActivityResponse":{"properties":{"activities":{"items":{"$ref":"#/components/schemas/Activity"},"type":"array","title":"Activities"}},"type":"object","required":["activities"],"title":"RecentActivityResponse","description":"Recent activity response schema"},"RecentCall":{"properties":{"call_id":{"type":"string","format":"uuid","title":"Call Id"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"},"caller_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caller Name"},"caller_identity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caller Identity"},"caller_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caller Display Name"},"duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Seconds"},"direction":{"type":"string","title":"Direction"},"channel":{"type":"string","title":"Channel","default":"phone"},"status":{"type":"string","title":"Status"},"caller_client_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caller Client Status"},"is_test":{"type":"boolean","title":"Is Test"},"transferred":{"type":"boolean","title":"Transferred","default":false},"transfer_outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transfer Outcome"},"staff_leg_pending":{"type":"boolean","title":"Staff Leg Pending","default":false},"vxt_transferred":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Vxt Transferred"},"vxt_voicemail":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Vxt Voicemail"},"vxt_transfer_no_answer":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Vxt Transfer No Answer"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Time"},"has_error":{"type":"boolean","title":"Has Error"},"error_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Description"},"hung_up_before_connect":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Hung Up Before Connect"},"errors":{"anyOf":[{"items":{"$ref":"#/components/schemas/CallError"},"type":"array"},{"type":"null"}],"title":"Errors"},"case_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Case Id"},"case_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Case Title"},"external_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Source"},"quality_score":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quality Score"},"quality_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quality Reason"},"goal_accomplished":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Goal Accomplished"},"goal_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Goal Reason"},"caller_hung_up":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Caller Hung Up"},"cnam_caller_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cnam Caller Name"},"cnam_caller_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cnam Caller Type"},"screening_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Screening Status"},"screening_phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Screening Phone Number"},"screening_caller_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Screening Caller Name"},"screening_call_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Screening Call Reason"},"screening_decline_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Screening Decline Reason"},"case_note_posted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Case Note Posted"},"case_match_case_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Case Match Case Name"},"has_substantive_conversation":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Substantive Conversation"},"case_matching_pipeline_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Case Matching Pipeline Status"},"case_match_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Case Match Status"},"sa_case_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sa Case Number"},"sa_case_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sa Case Url"},"lead_exists":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Lead Exists"},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outcome"},"intake_client_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intake Client Name"},"docusign_envelope_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Docusign Envelope Status"},"docusign_sender_view_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Docusign Sender View Url"},"intake_docusign_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intake Docusign Status"},"intake_docusign_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intake Docusign Error"}},"type":"object","required":["call_id","phone_number","caller_name","duration_seconds","direction","status","caller_client_status","is_test","start_time","has_error","error_description","case_id","case_title"],"title":"RecentCall","description":"Recent call item schema"},"RecentCallsResponse":{"properties":{"calls":{"items":{"$ref":"#/components/schemas/RecentCall"},"type":"array","title":"Calls"}},"type":"object","required":["calls"],"title":"RecentCallsResponse","description":"Recent calls response schema"},"RecentCustomerListItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"Customer UUID"},"name":{"type":"string","title":"Name","description":"Customer name"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At","description":"When the developer last switched to this customer"},"is_current":{"type":"boolean","title":"Is Current","description":"Whether this is the developer's current customer"}},"type":"object","required":["id","name","is_current"],"title":"RecentCustomerListItem","description":"Customer list item ordered by recency for the sidebar switcher"},"RejectCaseMatchRequest":{"properties":{"mark_as_non_substantive":{"type":"boolean","title":"Mark As Non Substantive","description":"Mark call as non-substantive when rejecting","default":false}},"type":"object","title":"RejectCaseMatchRequest","description":"Request to reject a case match."},"RejectCaseMatchResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether rejection was successful"},"message":{"type":"string","title":"Message","description":"Status message"}},"type":"object","required":["success","message"],"title":"RejectCaseMatchResponse","description":"Response from rejecting a case match."},"ReportFrequencyEnum":{"type":"string","enum":["daily","weekly"],"title":"ReportFrequencyEnum","description":"Report frequency enum for Pydantic schemas"},"ReportMutationResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Report ID"},"name":{"type":"string","title":"Name","description":"Report name"},"message":{"type":"string","title":"Message","description":"Success message"}},"type":"object","required":["id","name","message"],"title":"ReportMutationResponse","description":"Response for report create/update operations"},"ReportResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Report ID"},"name":{"type":"string","title":"Name","description":"Report name"},"report_type":{"$ref":"#/components/schemas/ReportTypeEnum","description":"Type of report"},"frequency":{"$ref":"#/components/schemas/ReportFrequencyEnum","description":"Report frequency"},"send_time":{"type":"string","title":"Send Time","description":"Time of day to send the report (HH:MM:SS)"},"emails":{"items":{"type":"string"},"type":"array","title":"Emails","description":"List of email addresses"},"users":{"items":{"$ref":"#/components/schemas/ReportUserInfo"},"type":"array","title":"Users","description":"List of users to receive the report"},"staff_groups":{"items":{"$ref":"#/components/schemas/ReportStaffGroupInfo"},"type":"array","title":"Staff Groups","description":"List of staff groups to receive the report"},"leads_summary_include_qualified":{"type":"boolean","title":"Leads Summary Include Qualified","description":"Include qualified leads in leads summary report"},"leads_summary_include_partially_qualified":{"type":"boolean","title":"Leads Summary Include Partially Qualified","description":"Include partially qualified leads in leads summary report"},"leads_summary_include_no_matched_case":{"type":"boolean","title":"Leads Summary Include No Matched Case","description":"Include no matched case leads in leads summary report"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At","description":"Creation timestamp"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At","description":"Last update timestamp"}},"type":"object","required":["id","name","report_type","frequency","send_time","leads_summary_include_qualified","leads_summary_include_partially_qualified","leads_summary_include_no_matched_case"],"title":"ReportResponse","description":"Full report response with nested users and groups"},"ReportStaffGroupInfo":{"properties":{"id":{"type":"string","title":"Id","description":"Staff group ID"},"name":{"type":"string","title":"Name","description":"Staff group name"}},"type":"object","required":["id","name"],"title":"ReportStaffGroupInfo","description":"Nested staff group information for report responses"},"ReportTypeEnum":{"type":"string","enum":["leads_summary","inquiries_summary"],"title":"ReportTypeEnum","description":"Report type enum for Pydantic schemas"},"ReportUserInfo":{"properties":{"id":{"type":"string","title":"Id","description":"User ID"},"first_name":{"type":"string","title":"First Name","description":"User's first name"},"last_name":{"type":"string","title":"Last Name","description":"User's last name"},"email":{"type":"string","title":"Email","description":"User's email address"}},"type":"object","required":["id","first_name","last_name","email"],"title":"ReportUserInfo","description":"Nested user information for report responses"},"ReportsSettingsResponse":{"properties":{"emails_disabled":{"type":"boolean","title":"Emails Disabled","description":"Whether scheduled report emails are disabled"}},"type":"object","required":["emails_disabled"],"title":"ReportsSettingsResponse","description":"Reports settings response model"},"ResetPasswordRequest":{"properties":{"token":{"type":"string","title":"Token","description":"Raw reset token from the emailed link"},"new_password":{"type":"string","minLength":8,"title":"New Password","description":"New password"}},"type":"object","required":["token","new_password"],"title":"ResetPasswordRequest","description":"Request to set a new password using a reset token"},"RetryCaseMatchingResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the case matching was successful"},"matched":{"type":"boolean","title":"Matched","description":"Whether a case was matched"},"matched_case_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matched Case Number","description":"Case number if matched"},"matched_case_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matched Case Name","description":"Case name if matched"},"case_note_posted":{"type":"boolean","title":"Case Note Posted","description":"Whether a case note was posted","default":false},"case_note_external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Case Note External Id","description":"External note ID if posted"},"message":{"type":"string","title":"Message","description":"Status message"}},"type":"object","required":["success","matched","message"],"title":"RetryCaseMatchingResponse","description":"Response from retrying case matching for a call."},"RewriteCallSummaryRequest":{"properties":{"current_summary":{"type":"string","title":"Current Summary","description":"The current summary text to rewrite"},"instructions":{"type":"string","title":"Instructions","description":"Instructions for how to rewrite the summary"}},"type":"object","required":["current_summary","instructions"],"title":"RewriteCallSummaryRequest","description":"Request to rewrite a call summary using AI."},"RewriteCallSummaryResponse":{"properties":{"rewritten_summary":{"type":"string","title":"Rewritten Summary","description":"The rewritten summary text"}},"type":"object","required":["rewritten_summary"],"title":"RewriteCallSummaryResponse","description":"Response with the AI-rewritten summary."},"RingCentralAuthorizationUrl":{"properties":{"authorization_url":{"type":"string","title":"Authorization Url"}},"type":"object","required":["authorization_url"],"title":"RingCentralAuthorizationUrl","description":"RingCentral OAuth authorization URL response"},"RingCentralCallLogEntry":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"start_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Time"},"duration":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration"},"direction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direction"},"result":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result"},"from_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Number"},"to_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Number"},"has_recording":{"type":"boolean","title":"Has Recording","default":false},"recording_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recording Id"}},"type":"object","title":"RingCentralCallLogEntry","description":"A single call log entry from RingCentral"},"RingCentralCallLogsResponse":{"properties":{"call_logs":{"items":{"$ref":"#/components/schemas/RingCentralCallLogEntry"},"type":"array","title":"Call Logs"},"total_count":{"type":"integer","title":"Total Count"}},"type":"object","required":["call_logs","total_count"],"title":"RingCentralCallLogsResponse","description":"Response containing list of RingCentral call logs"},"RingCentralStatus":{"properties":{"connected":{"type":"boolean","title":"Connected"},"connected_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connected At"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"}},"type":"object","required":["connected"],"title":"RingCentralStatus","description":"RingCentral connection status"},"RingCentralSyncResponse":{"properties":{"message":{"type":"string","title":"Message"},"task_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Id"}},"type":"object","required":["message"],"title":"RingCentralSyncResponse","description":"Response from triggering RingCentral sync"},"RunBatchAnalysisResponse":{"properties":{"task_id":{"type":"string","title":"Task Id"},"message":{"type":"string","title":"Message"}},"type":"object","required":["task_id","message"],"title":"RunBatchAnalysisResponse","description":"Response from dispatching the batch analysis task."},"SMSLogResponse":{"properties":{"sms_id":{"type":"string","format":"uuid","title":"Sms Id"},"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"to_number":{"type":"string","title":"To Number"},"from_number":{"type":"string","title":"From Number"},"message_body":{"type":"string","title":"Message Body"},"twilio_message_sid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Twilio Message Sid"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sent At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["sms_id","customer_id","to_number","from_number","message_body","created_at"],"title":"SMSLogResponse","description":"Response containing SMS log details."},"SavedFilterResponse":{"properties":{"saved_filter_id":{"type":"string","format":"uuid","title":"Saved Filter Id"},"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"view_key":{"type":"string","title":"View Key"},"name":{"type":"string","title":"Name"},"filters":{"additionalProperties":true,"type":"object","title":"Filters"},"created_by_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By User 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":["saved_filter_id","customer_id","view_key","name","filters","created_at"],"title":"SavedFilterResponse"},"ScreeningCallDebugItem":{"properties":{"screening_id":{"type":"string","format":"uuid","title":"Screening Id","description":"Screening record ID"},"call_id":{"type":"string","format":"uuid","title":"Call Id","description":"Associated call ID"},"screening_call_sid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Screening Call Sid","description":"Twilio call SID for the screening call"},"screening_status":{"type":"string","title":"Screening Status","description":"Screening status in our database (pending, accepted, etc.)"},"twilio_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Twilio Status","description":"Current Twilio call status"},"twilio_duration":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Twilio Duration","description":"Call duration in seconds (if completed)"},"twilio_start_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Twilio Start Time","description":"Call start time from Twilio"},"twilio_end_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Twilio End Time","description":"Call end time from Twilio"},"twilio_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Twilio Error","description":"Error message if Twilio lookup failed"},"created_at":{"type":"string","title":"Created At","description":"Screening record creation time"},"bridged_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bridged At","description":"Time when call was bridged (if accepted)"},"category":{"type":"string","title":"Category","description":"Category: 'pending' or 'recent_accepted'"}},"type":"object","required":["screening_id","call_id","screening_status","created_at","category"],"title":"ScreeningCallDebugItem","description":"Debug info for a single screening call"},"ScreeningCallDebugResponse":{"properties":{"is_screener_busy":{"type":"boolean","title":"Is Screener Busy","description":"Whether the screener is considered busy based on the evaluation"},"disable_active_call_check":{"type":"boolean","title":"Disable Active Call Check","description":"Whether active call checking is disabled for this customer"},"active_call_statuses":{"items":{"type":"string"},"type":"array","title":"Active Call Statuses","description":"Twilio statuses considered 'active'"},"screenings":{"items":{"$ref":"#/components/schemas/ScreeningCallDebugItem"},"type":"array","title":"Screenings","description":"List of screening calls being evaluated"}},"type":"object","required":["is_screener_busy","disable_active_call_check","active_call_statuses"],"title":"ScreeningCallDebugResponse","description":"Response with screening call debug information"},"ScreeningPhoneNumberResponse":{"properties":{"screening_phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Screening Phone Number","description":"Phone number for call screening/transfers (E.164 format)"}},"type":"object","title":"ScreeningPhoneNumberResponse","description":"Screening phone number response model"},"ScreeningStatusResponse":{"properties":{"screening_id":{"type":"string","format":"uuid","title":"Screening Id","description":"The ID of the screening request"},"status":{"type":"string","title":"Status","description":"Current status: pending, accepted, declined, no_answer, failed"},"decline_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decline Reason","description":"Transcribed reason for declining (if user provided one)"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"When the status was last updated"}},"type":"object","required":["screening_id","status"],"title":"ScreeningStatusResponse","description":"Response with current screening status (for bot polling)."},"SelectLanguageRequest":{"properties":{"preset_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preset Code","description":"ISO 639-1 / BCP-47 code from the preset options"},"other_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Other Text","description":"Free-form language name entered via 'Other'"}},"type":"object","title":"SelectLanguageRequest"},"SelectLanguageResponse":{"properties":{"language_code":{"type":"string","title":"Language Code"},"language_name_native":{"type":"string","title":"Language Name Native"},"first_question":{"$ref":"#/components/schemas/FormQuestionData"}},"type":"object","required":["language_code","language_name_native","first_question"],"title":"SelectLanguageResponse"},"SendCalendarInviteRequest":{"properties":{"meeting_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Meeting Id","description":"Meeting ID to use for calendar invite (preferred)"},"start_time_override":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Time Override","description":"Override start time in ISO format (for testing multiple invites)"},"duration_minutes_override":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Minutes Override","description":"Override duration in minutes (for testing)"},"recipient_user_id_override":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Recipient User Id Override","description":"Override recipient user (send to different user's calendar for testing)"},"staff_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Staff User Id","description":"The staff user whose calendar will receive the invite"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name","description":"Attendee first name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name","description":"Attendee last name"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number","description":"Attendee phone number"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"Attendee email (optional)"},"case_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Case Id","description":"Case ID (optional)"},"start_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Time","description":"Event start time in ISO format"},"duration_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Minutes","description":"Event duration in minutes"}},"type":"object","title":"SendCalendarInviteRequest","description":"Request to send a test calendar invite"},"SendCalendarInviteResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the invite was sent successfully"},"event_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Id","description":"Calendar event ID if successful"},"event_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Title","description":"Event title that was created"},"calendar_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Calendar Provider","description":"Calendar provider used"},"message":{"type":"string","title":"Message","description":"Status message"}},"type":"object","required":["success","message"],"title":"SendCalendarInviteResponse","description":"Response from sending a test calendar invite"},"SendEmailRequest":{"properties":{"template_name":{"type":"string","title":"Template Name"},"to_recipients":{"items":{"type":"string","format":"email"},"type":"array","title":"To Recipients"},"cc_recipients":{"anyOf":[{"items":{"type":"string","format":"email"},"type":"array"},{"type":"null"}],"title":"Cc Recipients"},"bcc_recipients":{"anyOf":[{"items":{"type":"string","format":"email"},"type":"array"},{"type":"null"}],"title":"Bcc Recipients"},"template_data":{"additionalProperties":true,"type":"object","title":"Template Data"},"source_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Source Email"}},"type":"object","required":["template_name","to_recipients","template_data"],"title":"SendEmailRequest","description":"Request to send a templated email."},"SendInquirySummaryEmailRequest":{"properties":{"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"Email address to send to (defaults to current user's email)"},"day_offset":{"type":"integer","title":"Day Offset","description":"Day offset: 0=today, 1=tomorrow, -1=yesterday","default":0}},"type":"object","title":"SendInquirySummaryEmailRequest","description":"Request to send inquiry summary email"},"SendInquirySummaryEmailResponse":{"properties":{"message":{"type":"string","title":"Message","description":"Status message"},"task_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Id","description":"Celery task ID for tracking"}},"type":"object","required":["message"],"title":"SendInquirySummaryEmailResponse","description":"Response from triggering inquiry summary email"},"SendInviteEmailRequest":{"properties":{"to_email":{"type":"string","format":"email","title":"To Email"},"first_name":{"type":"string","title":"First Name"},"firm_name":{"type":"string","title":"Firm Name"},"inviter_first_name":{"type":"string","title":"Inviter First Name"},"sign_in_link":{"type":"string","title":"Sign In Link"}},"type":"object","required":["to_email","first_name","firm_name","inviter_first_name","sign_in_link"],"title":"SendInviteEmailRequest","description":"Request to send a user invite email."},"SendLeadsSummaryEmailRequest":{"properties":{"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"Email address to send to (defaults to current user's email)"},"day_offset":{"type":"integer","title":"Day Offset","description":"Day offset: 0=today, 1=tomorrow, -1=yesterday","default":0}},"type":"object","title":"SendLeadsSummaryEmailRequest","description":"Request to send leads summary email"},"SendLeadsSummaryEmailResponse":{"properties":{"message":{"type":"string","title":"Message","description":"Status message"},"task_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Id","description":"Celery task ID for tracking"}},"type":"object","required":["message"],"title":"SendLeadsSummaryEmailResponse","description":"Response from triggering leads summary email"},"SendMeetingBookedEmailRequest":{"properties":{"meeting_id":{"type":"string","format":"uuid","title":"Meeting Id","description":"The meeting ID to send the notification for"},"recipient_email":{"type":"string","title":"Recipient Email","description":"Email address to send the notification to"}},"type":"object","required":["meeting_id","recipient_email"],"title":"SendMeetingBookedEmailRequest","description":"Request to send a meeting booked notification email"},"SendMeetingBookedEmailResponse":{"properties":{"message":{"type":"string","title":"Message","description":"Status message"},"success":{"type":"boolean","title":"Success","description":"Whether the email was sent successfully"}},"type":"object","required":["message","success"],"title":"SendMeetingBookedEmailResponse","description":"Response from sending a meeting booked notification email"},"SendMessageRequest":{"properties":{"content":{"type":"string","maxLength":5000,"minLength":1,"title":"Content"}},"type":"object","required":["content"],"title":"SendMessageRequest"},"SendMessageResponse":{"properties":{"user_message":{"$ref":"#/components/schemas/app__chat__schemas__MessageResponse"},"assistant_message":{"$ref":"#/components/schemas/app__chat__schemas__MessageResponse"},"conversation_complete":{"type":"boolean","title":"Conversation Complete","default":false},"language_code":{"type":"string","title":"Language Code","default":"en"}},"type":"object","required":["user_message","assistant_message"],"title":"SendMessageResponse"},"SendReceiptEmailRequest":{"properties":{"to_email":{"type":"string","format":"email","title":"To Email"},"receipt_amount":{"type":"string","title":"Receipt Amount"},"receipt_date_full":{"type":"string","title":"Receipt Date Full"},"receipt_date_short":{"type":"string","title":"Receipt Date Short"},"receipt_number":{"type":"string","title":"Receipt Number"},"invoice_number":{"type":"string","title":"Invoice Number"},"payment_method":{"type":"string","title":"Payment Method"},"invoice_period_start_date":{"type":"string","title":"Invoice Period Start Date"},"invoice_period_end_date":{"type":"string","title":"Invoice Period End Date"},"customer_id":{"type":"string","format":"uuid","title":"Customer Id"}},"type":"object","required":["to_email","receipt_amount","receipt_date_full","receipt_date_short","receipt_number","invoice_number","payment_method","invoice_period_start_date","invoice_period_end_date","customer_id"],"title":"SendReceiptEmailRequest","description":"Request to send a receipt email."},"SendReportEmailRequest":{"properties":{"report_id":{"type":"string","format":"uuid","title":"Report Id","description":"The report ID to send"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"Email address to send to (defaults to current user's email)"},"day_offset":{"type":"integer","title":"Day Offset","description":"Day offset: 0=today, 1=tomorrow","default":0},"include_test_calls":{"type":"boolean","title":"Include Test Calls","description":"Whether to include leads from test calls","default":true},"append_subject_suffix":{"type":"boolean","title":"Append Subject Suffix","description":"Whether to append a bracketed random suffix to the email subject line","default":true}},"type":"object","required":["report_id"],"title":"SendReportEmailRequest","description":"Request to send a specific report email"},"SendReportEmailResponse":{"properties":{"message":{"type":"string","title":"Message","description":"Status message"},"report_name":{"type":"string","title":"Report Name","description":"Name of the report that was sent"},"report_type":{"type":"string","title":"Report Type","description":"Type of report (leads_summary or inquiries_summary)"}},"type":"object","required":["message","report_name","report_type"],"title":"SendReportEmailResponse","description":"Response from sending a report email"},"SendSMSRequest":{"properties":{"to_number":{"type":"string","title":"To Number","description":"Phone number to send SMS to (E.164 format recommended)"},"message":{"type":"string","title":"Message","description":"Message body to send"}},"type":"object","required":["to_number","message"],"title":"SendSMSRequest","description":"Request to send an SMS message."},"SendTestInfoRequestRequest":{"properties":{"phone_number":{"type":"string","title":"Phone Number","description":"Phone number to send test info request SMS to (E.164 format)"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name","description":"First name of the recipient (for SMS personalization)"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name","description":"Last name of the recipient (for SMS personalization)"}},"type":"object","required":["phone_number"],"title":"SendTestInfoRequestRequest"},"SendTestInfoRequestResponse":{"properties":{"info_request_id":{"type":"string","format":"uuid","title":"Info Request Id"},"shortcode":{"type":"string","title":"Shortcode"},"message":{"type":"string","title":"Message"}},"type":"object","required":["info_request_id","shortcode","message"],"title":"SendTestInfoRequestResponse"},"SetCallCaseRequest":{"properties":{"case_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Case Id","description":"Case ID to associate, or null to clear"}},"type":"object","title":"SetCallCaseRequest","description":"Request to set or clear the case associated with a call."},"SetDefaultPaymentMethodRequest":{"properties":{"payment_method_id":{"type":"string","title":"Payment Method Id","description":"Bank account ID or card payment method ID"},"payment_method_type":{"type":"string","pattern":"^(bank|card)$","title":"Payment Method Type","description":"Type: 'bank' or 'card'"}},"type":"object","required":["payment_method_id","payment_method_type"],"title":"SetDefaultPaymentMethodRequest","description":"Request to set default payment method."},"ShortcodeResponse":{"properties":{"call_id":{"type":"string","format":"uuid","title":"Call Id","description":"The call ID associated with this shortcode"}},"type":"object","required":["call_id"],"title":"ShortcodeResponse","description":"Response for shortcode resolution."},"SmartAdvocateAppointmentTypeCreateRequest":{"properties":{"name":{"type":"string","minLength":1,"title":"Name","description":"SmartAdvocate activity type name"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"action":{"type":"string","enum":["provide_details","transfer_to_calendar"],"title":"Action"},"active":{"type":"boolean","title":"Active","default":true}},"type":"object","required":["name","action"],"title":"SmartAdvocateAppointmentTypeCreateRequest","description":"Create an appointment type visibility rule"},"SmartAdvocateAppointmentTypeResponse":{"properties":{"smartadvocate_appointment_type_id":{"type":"string","format":"uuid","title":"Smartadvocate Appointment Type Id"},"name":{"type":"string","title":"Name"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"action":{"type":"string","enum":["provide_details","transfer_to_calendar"],"title":"Action"},"active":{"type":"boolean","title":"Active"}},"type":"object","required":["smartadvocate_appointment_type_id","name","action","active"],"title":"SmartAdvocateAppointmentTypeResponse","description":"One per-customer appointment (activity) type visibility rule"},"SmartAdvocateAppointmentTypeUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Name"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"action":{"anyOf":[{"type":"string","enum":["provide_details","transfer_to_calendar"]},{"type":"null"}],"title":"Action"},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"}},"type":"object","title":"SmartAdvocateAppointmentTypeUpdateRequest","description":"Update an appointment type visibility rule. Omitted fields are unchanged."},"SmartAdvocateAppointmentTypesEnabledResponse":{"properties":{"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["enabled"],"title":"SmartAdvocateAppointmentTypesEnabledResponse","description":"Whether the appointment visibility by type settings are enabled for the customer"},"SmartAdvocateAppointmentTypesResponse":{"properties":{"appointment_types":{"items":{"$ref":"#/components/schemas/SmartAdvocateAppointmentTypeResponse"},"type":"array","title":"Appointment Types"}},"type":"object","required":["appointment_types"],"title":"SmartAdvocateAppointmentTypesResponse","description":"All appointment type visibility rules for the customer"},"SmartAdvocateCaseNote":{"properties":{"note_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Note Id"},"note_type_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note Type Name"},"note_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note Text"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"},"note_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note Date"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"}},"type":"object","title":"SmartAdvocateCaseNote","description":"SmartAdvocate case note"},"SmartAdvocateCaseSearchRequest":{"properties":{"case_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Case Number"},"case_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Case Name"},"plaintiff_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plaintiff Name"},"defendant_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Defendant Name"},"limit":{"type":"integer","title":"Limit","default":50},"offset":{"type":"integer","title":"Offset","default":0}},"type":"object","title":"SmartAdvocateCaseSearchRequest","description":"Request for comprehensive case search"},"SmartAdvocateCaseSearchResponse":{"properties":{"connected":{"type":"boolean","title":"Connected"},"cases":{"items":{"$ref":"#/components/schemas/SmartAdvocateCaseSearchResult"},"type":"array","title":"Cases","default":[]},"total":{"type":"integer","title":"Total","default":0}},"type":"object","required":["connected"],"title":"SmartAdvocateCaseSearchResponse","description":"Response for case search"},"SmartAdvocateCaseSearchResult":{"properties":{"smartadvocate_case_id":{"type":"string","title":"Smartadvocate Case Id"},"smartadvocate_id":{"type":"integer","title":"Smartadvocate Id"},"case_number":{"type":"string","title":"Case Number"},"case_name":{"type":"string","title":"Case Name"},"plaintiffs":{"items":{"type":"string"},"type":"array","title":"Plaintiffs","default":[]},"defendants":{"items":{"type":"string"},"type":"array","title":"Defendants","default":[]},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"created_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created Date"},"last_sync":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Sync"},"recent_notes":{"items":{"$ref":"#/components/schemas/SmartAdvocateCaseNote"},"type":"array","title":"Recent Notes","default":[]}},"type":"object","required":["smartadvocate_case_id","smartadvocate_id","case_number","case_name"],"title":"SmartAdvocateCaseSearchResult","description":"Single case search result with comprehensive details"},"SmartAdvocateCaseStatusOption":{"properties":{"sa_status_id":{"type":"integer","title":"Sa Status Id"},"status_name":{"type":"string","title":"Status Name"},"status_type_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Type Name","description":"None = primary case status; otherwise the second-status type it belongs to"},"case_count":{"type":"integer","title":"Case Count"}},"type":"object","required":["sa_status_id","status_name","case_count"],"title":"SmartAdvocateCaseStatusOption","description":"A case status observed in the customer's synced cases (dropdown option)"},"SmartAdvocateCaseStatusOptionsResponse":{"properties":{"statuses":{"items":{"$ref":"#/components/schemas/SmartAdvocateCaseStatusOption"},"type":"array","title":"Statuses"}},"type":"object","required":["statuses"],"title":"SmartAdvocateCaseStatusOptionsResponse","description":"Distinct case statuses from the customer's synced cases"},"SmartAdvocateCaseStatusRoutingConfigResponse":{"properties":{"default_transfer_destination_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Default Transfer Destination Id"}},"type":"object","title":"SmartAdvocateCaseStatusRoutingConfigResponse","description":"Customer-level case status routing configuration"},"SmartAdvocateCaseStatusRoutingConfigUpdateRequest":{"properties":{"default_transfer_destination_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Default Transfer Destination Id"}},"type":"object","title":"SmartAdvocateCaseStatusRoutingConfigUpdateRequest","description":"Update case status routing configuration. Explicit null clears the default."},"SmartAdvocateCaseStatusRoutingEnabledResponse":{"properties":{"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["enabled"],"title":"SmartAdvocateCaseStatusRoutingEnabledResponse","description":"Whether case status routing settings are enabled for the customer"},"SmartAdvocateCaseStatusRuleCreateRequest":{"properties":{"sa_status_id":{"type":"integer","title":"Sa Status Id"},"status_name":{"type":"string","minLength":1,"title":"Status Name"},"status_type_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Type Name"},"destination_kind":{"type":"string","enum":["destination","case_staff"],"title":"Destination Kind"},"transfer_destination_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Transfer Destination Id","description":"Required when destination_kind is 'destination'"},"staff_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Staff Role","description":"Required when destination_kind is 'case_staff', e.g. 'Negotiator'"},"active":{"type":"boolean","title":"Active","default":true}},"type":"object","required":["sa_status_id","status_name","destination_kind"],"title":"SmartAdvocateCaseStatusRuleCreateRequest","description":"Create a case status routing rule"},"SmartAdvocateCaseStatusRuleResponse":{"properties":{"smartadvocate_case_status_rule_id":{"type":"string","format":"uuid","title":"Smartadvocate Case Status Rule Id"},"sa_status_id":{"type":"integer","title":"Sa Status Id"},"status_name":{"type":"string","title":"Status Name"},"status_type_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Type Name","description":"None = primary case status rule; otherwise the second-status type this rule matches within"},"destination_kind":{"type":"string","enum":["destination","case_staff"],"title":"Destination Kind"},"transfer_destination_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Transfer Destination Id"},"staff_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Staff Role"},"active":{"type":"boolean","title":"Active"}},"type":"object","required":["smartadvocate_case_status_rule_id","sa_status_id","status_name","destination_kind","active"],"title":"SmartAdvocateCaseStatusRuleResponse","description":"One per-customer case status -> transfer destination routing rule"},"SmartAdvocateCaseStatusRuleUpdateRequest":{"properties":{"destination_kind":{"anyOf":[{"type":"string","enum":["destination","case_staff"]},{"type":"null"}],"title":"Destination Kind"},"transfer_destination_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Transfer Destination Id"},"staff_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Staff Role"},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"}},"type":"object","title":"SmartAdvocateCaseStatusRuleUpdateRequest","description":"Update a case status routing rule. Omitted fields are unchanged.\n\nThe status identity (sa_status_id / status_name / status_type_name) is\nimmutable; delete and recreate to retarget a rule. Changing\ndestination_kind requires supplying the matching target field."},"SmartAdvocateCaseStatusRulesResponse":{"properties":{"rules":{"items":{"$ref":"#/components/schemas/SmartAdvocateCaseStatusRuleResponse"},"type":"array","title":"Rules"}},"type":"object","required":["rules"],"title":"SmartAdvocateCaseStatusRulesResponse","description":"All case status routing rules for the customer"},"SmartAdvocateCaseSyncResponse":{"properties":{"message":{"type":"string","title":"Message","description":"Status message"},"task_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Id","description":"Celery task ID for tracking (if async)"},"run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Id","description":"Sync run ID (set when resuming an existing run; new runs are created asynchronously — poll GET sync-runs)"}},"type":"object","required":["message"],"title":"SmartAdvocateCaseSyncResponse","description":"Response for triggering SmartAdvocate case sync"},"SmartAdvocateConnectRequest":{"properties":{"username":{"type":"string","title":"Username"},"password":{"type":"string","title":"Password"},"base_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Url"}},"type":"object","required":["username","password"],"title":"SmartAdvocateConnectRequest","description":"Request to connect SmartAdvocate integration"},"SmartAdvocateDeleteNoteResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","message"],"title":"SmartAdvocateDeleteNoteResponse","description":"Response from deleting a note"},"SmartAdvocateDisconnectResponse":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"SmartAdvocateDisconnectResponse","description":"SmartAdvocate disconnect response"},"SmartAdvocateIntakeDraftPromoteRequest":{"properties":{"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"},"date_of_birth":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date Of Birth"},"gender":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gender"},"address_line1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line1"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"zip_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip Code"},"case_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Case Summary"},"incident_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Incident Date"},"case_group_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Case Group Id"},"case_type_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Case Type Id"},"override_duplicates":{"type":"boolean","title":"Override Duplicates","description":"Create the case even when an existing case with the same incident date was found for the matched contact","default":false}},"type":"object","required":["first_name","last_name"],"title":"SmartAdvocateIntakeDraftPromoteRequest","description":"Promote a draft intake: create the contact (unless matched) and case in SmartAdvocate.\n\nFields carry the user's edits from the promote dialog. Case group/type IDs\nfall back to the customer's configured intake defaults when omitted."},"SmartAdvocateIntakeDraftResponse":{"properties":{"smartadvocate_intake_draft_id":{"type":"string","format":"uuid","title":"Smartadvocate Intake Draft Id"},"call_id":{"type":"string","format":"uuid","title":"Call Id"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"},"date_of_birth":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date Of Birth"},"gender":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gender"},"address_line1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line1"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"zip_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip Code"},"case_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Case Summary"},"incident_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Incident Date"},"incident_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Incident State"},"case_type_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Case Type Hint"},"matched_sa_contact_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Matched Sa Contact Id","description":"Existing SA contact matched by the caller's phone number; promotion attaches the case to it instead of creating a new contact"},"matched_sa_contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matched Sa Contact Name"},"ambiguous_contact_match":{"type":"boolean","title":"Ambiguous Contact Match","description":"Multiple person contacts share the caller's phone number; the match shown is a best guess and needs manual review","default":false},"duplicate_case_numbers":{"items":{"type":"string"},"type":"array","title":"Duplicate Case Numbers","description":"Existing case numbers on the matched contact with the same incident date (likely repeat caller about the same accident)"},"status":{"type":"string","title":"Status","default":"draft"},"sa_contact_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sa Contact Id"},"sa_case_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sa Case Id"},"sa_case_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sa Case Number"},"was_dry_run":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Was Dry Run"},"auto_promoted":{"type":"boolean","title":"Auto Promoted","default":false},"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":["smartadvocate_intake_draft_id","call_id","created_at"],"title":"SmartAdvocateIntakeDraftResponse","description":"LLM-drafted SmartAdvocate intake (contact + case) derived from a call transcript."},"SmartAdvocatePicklistItem":{"properties":{"id":{"type":"integer","title":"Id"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["id"],"title":"SmartAdvocatePicklistItem","description":"One SmartAdvocate picklist entry (case group, case type, ...)."},"SmartAdvocateRoleInfo":{"properties":{"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"SmartAdvocateRoleInfo","description":"Role/title info from SmartAdvocate"},"SmartAdvocateSettingsResponse":{"properties":{"sync_cases":{"type":"boolean","title":"Sync Cases","description":"Whether scheduled syncs pull cases (master switch; all other data depends on it)"},"sync_case_notes":{"type":"boolean","title":"Sync Case Notes","description":"Whether scheduled syncs pull case notes"},"sync_contacts":{"type":"boolean","title":"Sync Contacts","description":"Whether scheduled syncs pull firm contacts and case-contact links"},"sync_calendar":{"type":"boolean","title":"Sync Calendar","description":"Whether scheduled syncs pull calendar appointments"},"sync_insurance":{"type":"boolean","title":"Sync Insurance","description":"Whether scheduled syncs pull insurance records"},"sync_medical_providers":{"type":"boolean","title":"Sync Medical Providers","description":"Whether scheduled syncs pull medical providers"},"sync_injuries":{"type":"boolean","title":"Sync Injuries","description":"Whether scheduled syncs pull injuries"},"sync_case_staff":{"type":"boolean","title":"Sync Case Staff","description":"Whether scheduled syncs pull case staff assignments"},"sync_liens":{"type":"boolean","title":"Sync Liens","description":"Whether scheduled syncs pull lien records (opt-in, default false: one API call per active case per sync)"},"appointment_visibility_by_type_enabled":{"type":"boolean","title":"Appointment Visibility By Type Enabled","description":"Whether the customer's per-type appointment visibility rules are enabled (exposes the settings UI)"},"case_status_routing_enabled":{"type":"boolean","title":"Case Status Routing Enabled","description":"Whether the customer's case status transfer routing rules are enabled (also requires the transfer_destinations feature flag)"},"intake_push_enabled":{"type":"boolean","title":"Intake Push Enabled","description":"Whether new-intake calls generate a draft SmartAdvocate contact + case for review (opt-in)"},"intake_push_dry_run":{"type":"boolean","title":"Intake Push Dry Run","description":"When true, promoting an intake draft returns 409 instead of writing to SmartAdvocate"},"intake_push_automatic":{"type":"boolean","title":"Intake Push Automatic","description":"When true (and dry-run off), eligible lead-call drafts are promoted automatically after creation"},"intake_draft_generation_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intake Draft Generation Context","description":"Firm-provided context injected into the intake draft extraction prompt"},"intake_default_case_group_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Intake Default Case Group Id","description":"Default SA case group ID for cases created from intake drafts"},"intake_default_case_type_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Intake Default Case Type Id","description":"Default SA case type ID for cases created from intake drafts"},"intake_default_office_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Intake Default Office Id","description":"Default SA office ID for cases created from intake drafts"},"intake_default_contact_type_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Intake Default Contact Type Id","description":"SA contactTypeId for contacts created from intake drafts (e.g. 10 = General); null lets SA pick its default"},"intake_default_defendant_contact_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Intake Default Defendant Contact Id","description":"SA contactId of the firm's placeholder defendant (e.g. BJL's 'Doe, John') attached to created cases; null = no defendant"},"intake_default_incident_state_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Intake Default Incident State Id","description":"SA incident state id (GET case/incident/states) applied to created cases when extraction yields none; null = leave unset"}},"type":"object","required":["sync_cases","sync_case_notes","sync_contacts","sync_calendar","sync_insurance","sync_medical_providers","sync_injuries","sync_case_staff","sync_liens","appointment_visibility_by_type_enabled","case_status_routing_enabled","intake_push_enabled","intake_push_dry_run","intake_push_automatic"],"title":"SmartAdvocateSettingsResponse","description":"Customer-scoped SmartAdvocate sync settings (developer only)."},"SmartAdvocateSettingsUpdateRequest":{"properties":{"sync_cases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sync Cases"},"sync_case_notes":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sync Case Notes"},"sync_contacts":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sync Contacts"},"sync_calendar":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sync Calendar"},"sync_insurance":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sync Insurance"},"sync_medical_providers":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sync Medical Providers"},"sync_injuries":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sync Injuries"},"sync_case_staff":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sync Case Staff"},"sync_liens":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sync Liens"},"appointment_visibility_by_type_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Appointment Visibility By Type Enabled"},"case_status_routing_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Case Status Routing Enabled"},"intake_push_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Intake Push Enabled"},"intake_push_dry_run":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Intake Push Dry Run"},"intake_push_automatic":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Intake Push Automatic"},"intake_draft_generation_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intake Draft Generation Context"},"intake_default_case_group_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Intake Default Case Group Id"},"intake_default_case_type_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Intake Default Case Type Id"},"intake_default_office_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Intake Default Office Id"},"intake_default_contact_type_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Intake Default Contact Type Id"},"intake_default_defendant_contact_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Intake Default Defendant Contact Id"},"intake_default_incident_state_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Intake Default Incident State Id"}},"type":"object","title":"SmartAdvocateSettingsUpdateRequest","description":"Update SmartAdvocate sync settings (developer only). Omitted fields are unchanged."},"SmartAdvocateStaffDestinationCreateRequest":{"properties":{"sa_user_id":{"type":"integer","title":"Sa User Id"},"staff_name":{"type":"string","minLength":1,"title":"Staff Name"},"transfer_destination_id":{"type":"string","format":"uuid","title":"Transfer Destination Id"}},"type":"object","required":["sa_user_id","staff_name","transfer_destination_id"],"title":"SmartAdvocateStaffDestinationCreateRequest","description":"Create a staff destination mapping"},"SmartAdvocateStaffDestinationResponse":{"properties":{"smartadvocate_staff_destination_id":{"type":"string","format":"uuid","title":"Smartadvocate Staff Destination Id"},"sa_user_id":{"type":"integer","title":"Sa User Id"},"staff_name":{"type":"string","title":"Staff Name"},"transfer_destination_id":{"type":"string","format":"uuid","title":"Transfer Destination Id"}},"type":"object","required":["smartadvocate_staff_destination_id","sa_user_id","staff_name","transfer_destination_id"],"title":"SmartAdvocateStaffDestinationResponse","description":"One staff member -> transfer destination mapping"},"SmartAdvocateStaffDestinationUpdateRequest":{"properties":{"staff_name":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Staff Name"},"transfer_destination_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Transfer Destination Id"}},"type":"object","title":"SmartAdvocateStaffDestinationUpdateRequest","description":"Update a staff destination mapping. Omitted fields are unchanged."},"SmartAdvocateStaffDestinationsResponse":{"properties":{"staff_destinations":{"items":{"$ref":"#/components/schemas/SmartAdvocateStaffDestinationResponse"},"type":"array","title":"Staff Destinations"}},"type":"object","required":["staff_destinations"],"title":"SmartAdvocateStaffDestinationsResponse","description":"All staff destination mappings for the customer"},"SmartAdvocateStaffOption":{"properties":{"sa_user_id":{"type":"integer","title":"Sa User Id"},"staff_name":{"type":"string","title":"Staff Name"},"case_count":{"type":"integer","title":"Case Count"}},"type":"object","required":["sa_user_id","staff_name","case_count"],"title":"SmartAdvocateStaffOption","description":"A staff member observed in the customer's synced cases (dropdown option)"},"SmartAdvocateStaffOptionsResponse":{"properties":{"role":{"type":"string","title":"Role"},"staff":{"items":{"$ref":"#/components/schemas/SmartAdvocateStaffOption"},"type":"array","title":"Staff"}},"type":"object","required":["role","staff"],"title":"SmartAdvocateStaffOptionsResponse","description":"Distinct staff members holding a role across the customer's synced cases"},"SmartAdvocateStatus":{"properties":{"connected":{"type":"boolean","title":"Connected"},"connected_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connected At"},"token_expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Expires At"},"base_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Url"}},"type":"object","required":["connected"],"title":"SmartAdvocateStatus","description":"SmartAdvocate connection status"},"SmartAdvocateSyncRunProgress":{"properties":{"run_id":{"type":"string","format":"uuid","title":"Run Id","description":"Sync run ID"},"kind":{"type":"string","title":"Kind","description":"'full' or 'incremental'"},"status":{"type":"string","title":"Status","description":"running | completed | failed"},"phase":{"type":"string","title":"Phase","description":"Current (or final) sync phase"},"phase_index":{"type":"integer","title":"Phase Index","description":"1-based index of the phase among enabled phases"},"phase_count":{"type":"integer","title":"Phase Count","description":"Number of enabled phases for this run"},"percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Percent","description":"Intra-phase percent estimate where computable (case_details / phone_enrich); null for open-ended paged phases"},"counters":{"additionalProperties":true,"type":"object","title":"Counters","description":"Per-phase counters"},"chunks_executed":{"type":"integer","title":"Chunks Executed","description":"Chunks completed so far"},"started_at":{"type":"string","format":"date-time","title":"Started At","description":"Run start time"},"heartbeat_at":{"type":"string","format":"date-time","title":"Heartbeat At","description":"Last chunk heartbeat (updated_at)"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At","description":"Run completion/failure time"},"errors":{"items":{"type":"string"},"type":"array","title":"Errors","description":"Capped error list"},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Seconds","description":"Elapsed run duration"},"is_stale":{"type":"boolean","title":"Is Stale","description":"Running run whose heartbeat is stale — will be auto-resumed by the reaper, or immediately by re-triggering the sync","default":false}},"type":"object","required":["run_id","kind","status","phase","phase_index","phase_count","chunks_executed","started_at","heartbeat_at"],"title":"SmartAdvocateSyncRunProgress","description":"Progress snapshot of one chunked SmartAdvocate sync run"},"SmartAdvocateSyncRunsResponse":{"properties":{"current":{"anyOf":[{"$ref":"#/components/schemas/SmartAdvocateSyncRunProgress"},{"type":"null"}],"description":"The running run, if any"},"recent":{"items":{"$ref":"#/components/schemas/SmartAdvocateSyncRunProgress"},"type":"array","title":"Recent","description":"Finished runs, newest first"}},"type":"object","title":"SmartAdvocateSyncRunsResponse","description":"Current + recent SmartAdvocate sync runs for the customer"},"SmartAdvocateTriggerSyncResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","message"],"title":"SmartAdvocateTriggerSyncResponse","description":"Response from triggering case sync"},"SmartAdvocateUpdateNoteRequest":{"properties":{"note_text":{"type":"string","title":"Note Text"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"}},"type":"object","required":["note_text"],"title":"SmartAdvocateUpdateNoteRequest","description":"Request to update a case note"},"SmartAdvocateUpdateNoteResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","message"],"title":"SmartAdvocateUpdateNoteResponse","description":"Response from updating a note"},"SmartAdvocateUser":{"properties":{"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"contact_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Id"},"active_state":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active State"},"is_locked":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Locked"},"firm_role":{"anyOf":[{"$ref":"#/components/schemas/SmartAdvocateRoleInfo"},{"type":"null"}]},"title":{"anyOf":[{"$ref":"#/components/schemas/SmartAdvocateRoleInfo"},{"type":"null"}]},"default_case_role":{"anyOf":[{"$ref":"#/components/schemas/SmartAdvocateRoleInfo"},{"type":"null"}]},"last_login_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Login Time"}},"type":"object","title":"SmartAdvocateUser","description":"SmartAdvocate user from the API"},"SmartAdvocateUsersResponse":{"properties":{"connected":{"type":"boolean","title":"Connected"},"users":{"items":{"$ref":"#/components/schemas/SmartAdvocateUser"},"type":"array","title":"Users","default":[]}},"type":"object","required":["connected"],"title":"SmartAdvocateUsersResponse","description":"Response containing list of SmartAdvocate users"},"StaffGroupAvailableSlotsResponse":{"properties":{"staff_group_id":{"type":"string","format":"uuid","title":"Staff Group Id"},"date":{"type":"string","title":"Date"},"slots":{"items":{"type":"string"},"type":"array","title":"Slots"},"meeting_duration_minutes":{"type":"integer","title":"Meeting Duration Minutes"}},"type":"object","required":["staff_group_id","date","slots","meeting_duration_minutes"],"title":"StaffGroupAvailableSlotsResponse","description":"Response model for available slots for a staff group"},"StaffGroupInfo":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"member_count":{"type":"integer","title":"Member Count"},"members":{"items":{"$ref":"#/components/schemas/StaffGroupMember"},"type":"array","title":"Members"},"meeting_duration_minutes":{"type":"integer","title":"Meeting Duration Minutes","default":30},"slot_every_minutes":{"type":"integer","title":"Slot Every Minutes","default":30},"priority_order_enabled":{"type":"boolean","title":"Priority Order Enabled","default":false},"created_at":{"type":"string","title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","name","member_count","members","created_at"],"title":"StaffGroupInfo","description":"Schema for staff group information"},"StaffGroupMember":{"properties":{"id":{"type":"string","title":"Id"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"email":{"type":"string","title":"Email"},"priority_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Priority Order"}},"type":"object","required":["id","first_name","last_name","email"],"title":"StaffGroupMember","description":"Schema for a member of a staff group"},"StaffGroupMemberInput":{"properties":{"user_id":{"type":"string","title":"User Id"},"priority_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Priority Order"}},"type":"object","required":["user_id"],"title":"StaffGroupMemberInput","description":"Input schema for creating/updating a staff group member with ordering"},"StaffGroupResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"member_count":{"type":"integer","title":"Member Count"},"message":{"type":"string","title":"Message"}},"type":"object","required":["id","name","member_count","message"],"title":"StaffGroupResponse","description":"Response after creating or updating a staff group"},"StaffMemberWithBookingCalendar":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id","description":"User UUID"},"first_name":{"type":"string","title":"First Name","description":"User's first name"},"last_name":{"type":"string","title":"Last Name","description":"User's last name"},"email":{"type":"string","title":"Email","description":"User's email"},"booking_calendar_id":{"type":"string","format":"uuid","title":"Booking Calendar Id","description":"Booking calendar UUID"},"booking_calendar_timezone":{"type":"string","title":"Booking Calendar Timezone","description":"Booking calendar timezone"}},"type":"object","required":["user_id","first_name","last_name","email","booking_calendar_id","booking_calendar_timezone"],"title":"StaffMemberWithBookingCalendar","description":"Staff member with booking calendar info for dropdown selection"},"StaffMembersWithBookingCalendarResponse":{"properties":{"staff_members":{"items":{"$ref":"#/components/schemas/StaffMemberWithBookingCalendar"},"type":"array","title":"Staff Members","description":"List of staff members with booking calendars"}},"type":"object","title":"StaffMembersWithBookingCalendarResponse","description":"Response with list of staff members who have booking calendars"},"StaffUserInfo":{"properties":{"id":{"type":"string","title":"Id"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"email":{"type":"string","title":"Email"},"user_type":{"$ref":"#/components/schemas/UserType"},"login_type":{"$ref":"#/components/schemas/LoginType"},"created_at":{"type":"string","title":"Created At"},"last_login":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Login"},"meeting_phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meeting Phone Number"},"voip_extension":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voip Extension"}},"type":"object","required":["id","first_name","last_name","email","user_type","login_type","created_at"],"title":"StaffUserInfo","description":"Staff user information schema for listing users"},"StageInfo":{"properties":{"key":{"type":"string","title":"Key"},"applicable":{"type":"boolean","title":"Applicable"},"status":{"type":"string","title":"Status"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["key","applicable","status"],"title":"StageInfo","description":"Display-ready state for one pipeline stage."},"StartBillingRunRequest":{"properties":{"is_dry_run":{"type":"boolean","title":"Is Dry Run","description":"If true, compute billable periods but do not execute transfers","default":true}},"type":"object","title":"StartBillingRunRequest"},"SubmitAnswerRequest":{"properties":{"answer_text":{"type":"string","maxLength":5000,"minLength":1,"title":"Answer Text"}},"type":"object","required":["answer_text"],"title":"SubmitAnswerRequest"},"SubmitAnswerResponse":{"properties":{"answered_response":{"anyOf":[{"$ref":"#/components/schemas/FormResponseData"},{"type":"null"}]},"next_question":{"anyOf":[{"$ref":"#/components/schemas/FormQuestionData"},{"type":"null"}]},"form_complete":{"type":"boolean","title":"Form Complete","default":false},"completion_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completion Message"},"validation_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Validation Error"},"language_code":{"type":"string","title":"Language Code","default":"en"}},"type":"object","title":"SubmitAnswerResponse"},"SummaryGenerationContextResponse":{"properties":{"customer_id":{"type":"string","format":"uuid","title":"Customer Id","description":"The customer ID"},"summary_generation_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary Generation Context","description":"Optional context to include in LLM prompt for summary generation"}},"type":"object","required":["customer_id"],"title":"SummaryGenerationContextResponse","description":"Response with customer's summary generation context"},"SwitchCustomerRequest":{"properties":{"customer_id":{"type":"string","format":"uuid","title":"Customer Id","description":"The customer ID to switch to"}},"type":"object","required":["customer_id"],"title":"SwitchCustomerRequest","description":"Request to switch the current user's customer"},"SyncGoogleCalendarsResponse":{"properties":{"message":{"type":"string","title":"Message"},"synced_count":{"type":"integer","title":"Synced Count"},"calendars":{"items":{"$ref":"#/components/schemas/app__calendar__schemas__GoogleCalendarItem"},"type":"array","title":"Calendars"}},"type":"object","required":["message","synced_count","calendars"],"title":"SyncGoogleCalendarsResponse","description":"Response model for syncing Google Calendars"},"SyncMicrosoft365CalendarsResponse":{"properties":{"message":{"type":"string","title":"Message"},"synced_count":{"type":"integer","title":"Synced Count"},"calendars":{"items":{"$ref":"#/components/schemas/Microsoft365CalendarItem"},"type":"array","title":"Calendars"}},"type":"object","required":["message","synced_count","calendars"],"title":"SyncMicrosoft365CalendarsResponse","description":"Response model for syncing Microsoft 365 Calendars"},"SystemSettingsResponse":{"properties":{"cnam_lookup_before_call":{"type":"boolean","title":"Cnam Lookup Before Call","description":"Whether to perform caller ID (CNAM) lookup before connecting calls"}},"type":"object","required":["cnam_lookup_before_call"],"title":"SystemSettingsResponse","description":"System settings response model"},"TechnicalAlertGlobalSettingsResponse":{"properties":{"pagerduty_dry_run":{"type":"boolean","title":"Pagerduty Dry Run"},"evaluation_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evaluation Prompt"}},"type":"object","required":["pagerduty_dry_run"],"title":"TechnicalAlertGlobalSettingsResponse"},"TechnicalAlertGlobalSettingsUpdateRequest":{"properties":{"pagerduty_dry_run":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Pagerduty Dry Run"},"evaluation_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evaluation Prompt"}},"type":"object","title":"TechnicalAlertGlobalSettingsUpdateRequest"},"TechnicalAlertPromptResponse":{"properties":{"default_prompt":{"type":"string","title":"Default Prompt"},"global_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Global Prompt"},"customer_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Context"}},"type":"object","required":["default_prompt"],"title":"TechnicalAlertPromptResponse"},"TechnicalAlertPromptUpdateRequest":{"properties":{"customer_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Context"}},"type":"object","title":"TechnicalAlertPromptUpdateRequest"},"TechnicalAlertResponse":{"properties":{"alert_id":{"type":"string","format":"uuid","title":"Alert Id"},"call_id":{"type":"string","format":"uuid","title":"Call Id"},"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"is_technical_failure":{"type":"boolean","title":"Is Technical Failure"},"severity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity"},"failure_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Type"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"evidence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evidence"},"affected_service":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Affected Service"},"pagerduty_alert_sent":{"type":"boolean","title":"Pagerduty Alert Sent"},"pagerduty_dry_run":{"type":"boolean","title":"Pagerduty Dry Run","default":false},"pagerduty_dedup_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pagerduty Dedup Key"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["alert_id","call_id","customer_id","is_technical_failure","pagerduty_alert_sent","created_at"],"title":"TechnicalAlertResponse"},"TestAlertResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","message"],"title":"TestAlertResponse"},"TimezoneResponse":{"properties":{"timezone":{"type":"string","title":"Timezone"}},"type":"object","required":["timezone"],"title":"TimezoneResponse","description":"Response model for timezone"},"TranscriptFilingBackfillResponse":{"properties":{"queued":{"type":"boolean","title":"Queued"}},"type":"object","required":["queued"],"title":"TranscriptFilingBackfillResponse","description":"Ack for a queued retroactive dry-run backfill."},"TranscriptFilingSettingsSchema":{"properties":{"drive_root_folder_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Drive Root Folder Id"},"impersonate_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Impersonate Email"},"dry_run_granola":{"type":"boolean","title":"Dry Run Granola","default":true},"dry_run_ringcentral":{"type":"boolean","title":"Dry Run Ringcentral","default":true},"customer_toggle_granola_enabled":{"type":"boolean","title":"Customer Toggle Granola Enabled","default":false},"customer_toggle_ringcentral_enabled":{"type":"boolean","title":"Customer Toggle Ringcentral Enabled","default":false},"lead_folder_creation_enabled":{"type":"boolean","title":"Lead Folder Creation Enabled","default":false},"customer_review_enabled":{"type":"boolean","title":"Customer Review Enabled","default":false},"screening_enabled":{"type":"boolean","title":"Screening Enabled","default":false},"screening_criteria":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Screening Criteria"},"confidence_threshold":{"type":"number","title":"Confidence Threshold","default":0.8},"agent_fallback_enabled":{"type":"boolean","title":"Agent Fallback Enabled","default":true},"file_ringcentral_calls":{"type":"boolean","title":"File Ringcentral Calls","default":false},"file_granola_notes":{"type":"boolean","title":"File Granola Notes","default":false},"granola_filename_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Granola Filename Template"},"ringcentral_filename_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ringcentral Filename Template"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"last_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Run At"},"last_error_msg":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error Msg"}},"type":"object","title":"TranscriptFilingSettingsSchema","description":"Developer-panel config for the transcript filing automation."},"TranscriptSettingsResponse":{"properties":{"customer_id":{"type":"string","format":"uuid","title":"Customer Id","description":"The customer ID"},"text_replacements":{"items":{"$ref":"#/components/schemas/TranscriptTextReplacementRule"},"type":"array","title":"Text Replacements","description":"List of text replacement rules"},"transcription_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transcription Prompt","description":"Contextual prompt sent to AssemblyAI describing the audio domain"},"transcription_keyterms":{"items":{"type":"string"},"type":"array","title":"Transcription Keyterms","description":"Keyterms sent to AssemblyAI to boost domain-term accuracy"}},"type":"object","required":["customer_id"],"title":"TranscriptSettingsResponse","description":"Response with customer's transcript settings"},"TranscriptTextReplacementRule":{"properties":{"find":{"type":"string","title":"Find","description":"Text to find in transcripts"},"replace":{"type":"string","title":"Replace","description":"Text to replace with"},"case_sensitive":{"type":"boolean","title":"Case Sensitive","description":"Whether the match is case-sensitive","default":false}},"type":"object","required":["find","replace"],"title":"TranscriptTextReplacementRule","description":"A single text replacement rule for transcripts"},"TranscriptUtterance":{"properties":{"speaker":{"type":"string","title":"Speaker"},"text":{"type":"string","title":"Text"},"start_ms":{"type":"integer","title":"Start Ms"},"end_ms":{"type":"integer","title":"End Ms"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"},"words":{"items":{"$ref":"#/components/schemas/TranscriptWord"},"type":"array","title":"Words"}},"type":"object","required":["speaker","text","start_ms","end_ms","words"],"title":"TranscriptUtterance","description":"Utterance (speaker turn) in the transcript."},"TranscriptWord":{"properties":{"text":{"type":"string","title":"Text"},"start_ms":{"type":"integer","title":"Start Ms"},"end_ms":{"type":"integer","title":"End Ms"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"}},"type":"object","required":["text","start_ms","end_ms"],"title":"TranscriptWord","description":"Word-level transcript data with timestamp."},"TransferDestinationCreateRequest":{"properties":{"name":{"type":"string","minLength":1,"title":"Name","description":"Name of the transfer destination"},"phone_number":{"type":"string","title":"Phone Number","description":"Phone number in E.164 format (e.g., +12025551234)"},"test_phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Test Phone Number","description":"Alternate number in E.164 format used for test calls when test transfer numbers are enabled"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Optional description of when to use this destination"}},"type":"object","required":["name","phone_number"],"title":"TransferDestinationCreateRequest","description":"Create transfer destination request model"},"TransferDestinationResponse":{"properties":{"transfer_destination_id":{"type":"string","format":"uuid","title":"Transfer Destination Id"},"name":{"type":"string","title":"Name","description":"Name of the transfer destination"},"phone_number":{"type":"string","title":"Phone Number","description":"Phone number in E.164 format"},"test_phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Test Phone Number","description":"Alternate number used for test calls when test transfer numbers are enabled"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Optional description of when to use this destination"}},"type":"object","required":["transfer_destination_id","name","phone_number"],"title":"TransferDestinationResponse","description":"Transfer destination response model"},"TransferDestinationUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Name","description":"Name of the transfer destination"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number","description":"Phone number in E.164 format (e.g., +12025551234)"},"test_phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Test Phone Number","description":"Alternate number in E.164 format used for test calls when test transfer numbers are enabled"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Optional description of when to use this destination"}},"type":"object","title":"TransferDestinationUpdateRequest","description":"Update transfer destination request model"},"TransferDestinationsEnabledResponse":{"properties":{"transfer_destinations_enabled":{"type":"boolean","title":"Transfer Destinations Enabled","description":"Whether the transfer destinations feature is enabled for this customer"}},"type":"object","required":["transfer_destinations_enabled"],"title":"TransferDestinationsEnabledResponse","description":"Transfer destinations enabled status response model"},"TransferExtensionAnswers":{"properties":{"agent_extension":{"type":"string","title":"Agent Extension"},"agent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Name"},"answered_count":{"type":"integer","title":"Answered Count"},"via_queue":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Via Queue","description":"Set when this extension answered in a DOWNSTREAM queue (not the team's own) — e.g. a receptionist catching a rolled call. Queue name, or extension if unnamed."}},"type":"object","required":["agent_extension","answered_count"],"title":"TransferExtensionAnswers","description":"Answered-call count for one staff extension within a team. Answered\nlegs only — the PBX records who answered, not who was rung and didn't."},"TransferFlowBackfillRequest":{"properties":{"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"days_back":{"type":"integer","maximum":365.0,"minimum":1.0,"title":"Days Back","default":30},"limit":{"type":"integer","maximum":1000.0,"minimum":1.0,"title":"Limit","default":200},"dry_run":{"type":"boolean","title":"Dry Run","default":false}},"type":"object","required":["customer_id"],"title":"TransferFlowBackfillRequest"},"TransferFlowBackfillResponse":{"properties":{"candidates":{"type":"integer","title":"Candidates","description":"Transferred calls in range missing a transfer_flow snapshot"},"enqueued":{"type":"boolean","title":"Enqueued","description":"Whether the backfill task was dispatched (false for dry runs)"}},"type":"object","required":["candidates","enqueued"],"title":"TransferFlowBackfillResponse"},"TransferFlowHop":{"properties":{"source":{"type":"string","title":"Source","description":"'openintake' (our side) or 'pbx'"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp","description":"When this hop started"},"label":{"type":"string","title":"Label","description":"Human-readable hop, e.g. 'Intake Dept' or 'AI Receptionist'"},"action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action","description":"Verb/action, e.g. 'Transferred', 'Queue dispatch'"},"queue_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Queue Name","description":"PBX queue name if this hop rang a queue"},"agent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Name","description":"Staff member who was rung/answered"},"answered":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Answered","description":"Whether this hop was answered"},"talk_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Talk Seconds","description":"Seconds of conversation on this hop"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail","description":"Extra context, e.g. release reason or transfer outcome"},"inferred":{"type":"boolean","title":"Inferred","description":"Hop reconstructed from the forward-rule chain at capture time (the PBX emits no CDR row for unanswered intermediate queues)","default":false},"post_answer":{"type":"boolean","title":"Post Answer","description":"Hop after the first answered PBX hop (staff-side onward transfers); the UI collapses these behind an 'additional transfers' toggle","default":false}},"type":"object","required":["source","label"],"title":"TransferFlowHop","description":"One segment of a transferred call's flow, for the developer-only\nTransfer Flow card. The first hop is our own side (AI → destination);\nthe rest are PBX-side queue/agent hops reconstructed from CDRs."},"TransferFlowResponse":{"properties":{"transferred":{"type":"boolean","title":"Transferred","description":"Whether the call was transferred at all"},"hops":{"items":{"$ref":"#/components/schemas/TransferFlowHop"},"type":"array","title":"Hops","description":"Ordered flow hops"},"pbx_available":{"type":"boolean","title":"Pbx Available","description":"Whether PBX-side hops could be resolved (NetSapiens configured)"}},"type":"object","required":["transferred","pbx_available"],"title":"TransferFlowResponse","description":"Developer-only transfer-flow reconstruction for a call."},"TransferMetricsBucket":{"properties":{"bucket_start":{"type":"string","format":"date-time","title":"Bucket Start","description":"Naive customer-local bucket start"},"total":{"type":"integer","title":"Total"},"answered":{"type":"integer","title":"Answered"},"assumed_answered":{"type":"integer","title":"Assumed Answered"},"bounced":{"type":"integer","title":"Bounced"},"downstream_answered":{"type":"integer","title":"Downstream Answered","default":0},"pickup_rate_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pickup Rate Pct"},"missed_rate_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Missed Rate Pct"},"avg_duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Duration Seconds"},"avg_transfer_hops":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Transfer Hops"}},"type":"object","required":["bucket_start","total","answered","assumed_answered","bounced"],"title":"TransferMetricsBucket","description":"One time bucket (customer-local day/week/month)."},"TransferMetricsResponse":{"properties":{"period":{"type":"string","title":"Period"},"bucket":{"type":"string","title":"Bucket"},"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"timezone":{"type":"string","title":"Timezone"},"summary":{"$ref":"#/components/schemas/TransferMetricsSummary"},"teams":{"items":{"$ref":"#/components/schemas/TransferTeamMetrics"},"type":"array","title":"Teams","description":"Sorted by missed rate, worst first"},"answerers":{"items":{"$ref":"#/components/schemas/OverallAnswerer"},"type":"array","title":"Answerers","description":"Individual answerers across all teams, most answers first; AI bounce-backs included"},"buckets":{"items":{"$ref":"#/components/schemas/TransferMetricsBucket"},"type":"array","title":"Buckets"}},"type":"object","required":["period","bucket","customer_id","timezone","summary"],"title":"TransferMetricsResponse"},"TransferMetricsSummary":{"properties":{"total_transferred":{"type":"integer","title":"Total Transferred"},"answered":{"type":"integer","title":"Answered"},"assumed_answered":{"type":"integer","title":"Assumed Answered"},"bounced":{"type":"integer","title":"Bounced"},"outcome_unknown":{"type":"integer","title":"Outcome Unknown"},"downstream_answered":{"type":"integer","title":"Downstream Answered","description":"Answered only after rolling past the entry queue — counted as missed by the first queue","default":0},"pickup_rate_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pickup Rate Pct"},"missed_rate_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Missed Rate Pct"},"transfer_hops":{"type":"integer","title":"Transfer Hops","description":"Total onward hand-offs (queue rolls + staff transfers) across flow-snapshot calls","default":0},"avg_transfer_hops":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Transfer Hops"},"max_transfer_hops":{"type":"integer","title":"Max Transfer Hops","default":0},"total_duration_seconds":{"type":"integer","title":"Total Duration Seconds","description":"Sum of call durations (calls with a recorded duration)","default":0},"avg_duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Duration Seconds"},"avg_queue_wait_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Queue Wait Seconds","description":"Mean landing-to-answer wait, answered flow-snapshot calls only"},"avg_staff_talk_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Staff Talk Seconds","description":"Mean staff talk time on the answering leg, answered flow-snapshot calls only"},"flow_calls":{"type":"integer","title":"Flow Calls","description":"Calls with a transfer_flow snapshot (hop/wait metrics denominator)"},"flow_coverage_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Flow Coverage Pct"},"prior_total_transferred":{"type":"integer","title":"Prior Total Transferred","default":0},"prior_pickup_rate_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Prior Pickup Rate Pct"},"prior_missed_rate_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Prior Missed Rate Pct"},"prior_avg_transfer_hops":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Prior Avg Transfer Hops"},"pickup_rate_delta":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pickup Rate Delta","description":"Percentage-point change vs prior period"},"missed_rate_delta":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Missed Rate Delta"},"avg_transfer_hops_delta":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Transfer Hops Delta"}},"type":"object","required":["total_transferred","answered","assumed_answered","bounced","outcome_unknown","flow_calls"],"title":"TransferMetricsSummary","description":"Whole-window aggregates with prior-period comparison. Pickup/missed are\nfirst-queue rates (downstream answers count as missed)."},"TransferTeamMetrics":{"properties":{"transfer_destination_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Transfer Destination Id","description":"Null for numbers with no matching TransferDestination"},"name":{"type":"string","title":"Name"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"},"total":{"type":"integer","title":"Total"},"answered":{"type":"integer","title":"Answered"},"assumed_answered":{"type":"integer","title":"Assumed Answered"},"bounced":{"type":"integer","title":"Bounced"},"outcome_unknown":{"type":"integer","title":"Outcome Unknown","description":"Transferred before outcome gating existed; excluded from rate denominators"},"downstream_answered":{"type":"integer","title":"Downstream Answered","description":"Answered, but only after rolling past the entry queue (missed by the first queue)","default":0},"pickup_rate_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pickup Rate Pct","description":"Answered by the FIRST destination queue / resolved"},"missed_rate_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Missed Rate Pct","description":"Bounced or answered downstream / resolved"},"transfer_hops":{"type":"integer","title":"Transfer Hops","description":"Total onward hand-offs (queue rolls + staff transfers) across this team's flow-snapshot calls","default":0},"avg_transfer_hops":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Transfer Hops","description":"Onward hand-offs per call with a flow snapshot"},"avg_duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Duration Seconds","description":"Mean total call duration (calls with a recorded duration)"},"avg_queue_wait_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Queue Wait Seconds","description":"Mean landing-to-answer wait, answered flow-snapshot calls only"},"extensions":{"items":{"$ref":"#/components/schemas/TransferExtensionAnswers"},"type":"array","title":"Extensions"}},"type":"object","required":["name","total","answered","assumed_answered","bounced","outcome_unknown"],"title":"TransferTeamMetrics","description":"One transfer destination (\"team\") over the selected window. Pickup and\nmissed rates are FIRST-QUEUE rates: a call answered only after rolling to\na downstream queue counts as missed by this team."},"TranslatedChatMessageResponse":{"properties":{"role":{"type":"string","title":"Role"},"translated_content":{"type":"string","title":"Translated Content"},"original_content":{"type":"string","title":"Original Content"}},"type":"object","required":["role","translated_content","original_content"],"title":"TranslatedChatMessageResponse","description":"API response model for a translated chat message."},"TranslatedUtteranceResponse":{"properties":{"speaker":{"type":"string","title":"Speaker"},"text":{"type":"string","title":"Text"},"original_text":{"type":"string","title":"Original Text"},"start_ms":{"type":"integer","title":"Start Ms"},"end_ms":{"type":"integer","title":"End Ms"}},"type":"object","required":["speaker","text","original_text","start_ms","end_ms"],"title":"TranslatedUtteranceResponse","description":"API response model for a translated utterance."},"TriggerFieldConfig":{"properties":{"key":{"type":"string","title":"Key","description":"Key under which the resolved value is stored in trigger_metadata"},"label":{"type":"string","title":"Label","description":"Human label shown in the UI"},"type":{"type":"string","title":"Type","description":"Control type: \"select\", \"text\" or \"qa_list\""},"options":{"items":{"$ref":"#/components/schemas/TriggerFieldOption"},"type":"array","title":"Options","description":"Allowed values; required for type=select, ignored for type=text and type=qa_list"}},"type":"object","required":["key","label","type"],"title":"TriggerFieldConfig","description":"One field an outbound call trigger supplies for a customer.\n\nStored as a list on SettingsOutbound.trigger_fields. Three types, and no more --\nthis is a small config contract, not a form builder:\n\n  - `select`: the raw value is mapped through `options` to a label.\n  - `text`: a scalar passed through as-is.\n  - `qa_list`: a list of {question, answer} dicts, rendered as an indented\n    block. Pre-call context a trigger collected (a website quiz, say) that the\n    agent should open with rather than re-ask. Takes no options. Configure it\n    LAST -- it renders multi-line, so a scalar field after it would trail off\n    the end of the block."},"TriggerFieldOption":{"properties":{"value":{"type":"string","title":"Value","description":"Value stored in OutboundLead.trigger_metadata"},"label":{"type":"string","title":"Label","description":"Human label; this is what gets injected into the prompt"}},"type":"object","required":["value","label"],"title":"TriggerFieldOption","description":"One allowed value for a `select`-type trigger field."},"TriggerOutboundCallRequest":{"properties":{"first_name":{"type":"string","title":"First Name","description":"Contact first name"},"last_name":{"type":"string","title":"Last Name","description":"Contact last name","default":""},"customer_number":{"type":"string","title":"Customer Number","description":"Phone number to dial (E.164)"},"case_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Case Id","description":"Case to associate with the call. Optional -- some outbound lines have no cases at all."},"phone_number_id":{"type":"string","format":"uuid","title":"Phone Number Id","description":"Internal phone number ID to dial from"},"trigger_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Trigger Metadata","description":"Resolved trigger-supplied values, keyed by the customer's configured trigger field keys (e.g. {\"lead_source\": \"instagram_ad\"})"}},"type":"object","required":["first_name","customer_number","phone_number_id"],"title":"TriggerOutboundCallRequest","description":"Request to manually trigger an outbound call."},"TriggerOutboundCallResponse":{"properties":{"call_id":{"type":"string","format":"uuid","title":"Call Id"},"vapi_call_id":{"type":"string","title":"Vapi Call Id"},"phone_number":{"type":"string","title":"Phone Number"},"status":{"type":"string","title":"Status"}},"type":"object","required":["call_id","vapi_call_id","phone_number","status"],"title":"TriggerOutboundCallResponse","description":"Response from triggering an outbound call."},"UpdateActiveCallCheckRequest":{"properties":{"disable_active_call_check":{"type":"boolean","title":"Disable Active Call Check","description":"Set to true to disable active call checking (workaround for calls incorrectly showing as in progress)"}},"type":"object","required":["disable_active_call_check"],"title":"UpdateActiveCallCheckRequest","description":"Request to update customer's active call check setting"},"UpdateAuthSettingsRequest":{"properties":{"password_login_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Password Login Enabled","description":"Whether password-based staff login is enabled"},"require_social_login":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Require Social Login","description":"Whether users who have signed in with social (Google/Microsoft) are required to continue using social login"}},"type":"object","title":"UpdateAuthSettingsRequest","description":"Update auth settings request model (developer only)"},"UpdateAvailabilityBlockRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"monday":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Monday"},"tuesday":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Tuesday"},"wednesday":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Wednesday"},"thursday":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Thursday"},"friday":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Friday"},"saturday":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Saturday"},"sunday":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sunday"},"start_time":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"End Time"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","title":"UpdateAvailabilityBlockRequest"},"UpdateAvailabilityRequest":{"properties":{"day_of_week":{"anyOf":[{"$ref":"#/components/schemas/DayOfWeek"},{"type":"null"}]},"start_time":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"End Time"}},"type":"object","title":"UpdateAvailabilityRequest","description":"Request model for updating availability"},"UpdateBillingAdjustmentRequest":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Description"},"amount_cents":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Amount Cents"},"adjustment_type":{"anyOf":[{"$ref":"#/components/schemas/BillingAdjustmentType"},{"type":"null"}]},"recurrence":{"anyOf":[{"$ref":"#/components/schemas/BillingAdjustmentRecurrence"},{"type":"null"}]},"effective_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Effective Date"},"expiration_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expiration Date"}},"type":"object","title":"UpdateBillingAdjustmentRequest"},"UpdateBillingPreferencesRequest":{"properties":{"set_first_payment_today":{"type":"boolean","title":"Set First Payment Today","description":"Override payment date to today if enabled"}},"type":"object","required":["set_first_payment_today"],"title":"UpdateBillingPreferencesRequest","description":"Request to update billing preferences."},"UpdateBookingSettingsRequest":{"properties":{"booking_confirmation_sms_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Booking Confirmation Sms Enabled","description":"Whether SMS booking confirmations are enabled"},"booking_confirmation_sms_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Booking Confirmation Sms Template","description":"Template for SMS booking confirmations. Supports variables: {{staff_member}}, {{staff_phone}}, {{client_name}}, {{booking_date}}, {{booking_time}}, {{case_title}}"},"booking_notification_email_recipient":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Booking Notification Email Recipient","description":"Email address to send booking notification emails to (e.g., intake@lawfirm.com)"},"max_meetings_per_day":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Meetings Per Day","description":"Maximum number of meetings a single staff member can have per day. Null means no limit."}},"type":"object","title":"UpdateBookingSettingsRequest","description":"Update booking settings request model"},"UpdateBotPreferenceRequest":{"properties":{"use_custom_bot":{"type":"boolean","title":"Use Custom Bot","description":"Whether to use custom bot instead of Pipecat Cloud (dev environment only)"}},"type":"object","required":["use_custom_bot"],"title":"UpdateBotPreferenceRequest","description":"Request to update customer's bot preference"},"UpdateBrandingConfigRequest":{"properties":{"accent_color":{"anyOf":[{"type":"string","maxLength":7},{"type":"null"}],"title":"Accent Color"},"secondary_color":{"anyOf":[{"type":"string","maxLength":7},{"type":"null"}],"title":"Secondary Color"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"},"info_page_title":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Info Page Title"},"info_request_subtitle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Info Request Subtitle"},"info_request_email_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Info Request Email Label"},"info_request_email_placeholder":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Info Request Email Placeholder"},"info_request_sms_welcome_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Info Request Sms Welcome Template"},"info_request_sms_welcome_template_no_first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Info Request Sms Welcome Template No First Name"},"info_request_sms_link_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Info Request Sms Link Template"},"info_request_sms_from_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Info Request Sms From Number"},"info_request_send_during_test_calls":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Info Request Send During Test Calls"}},"type":"object","title":"UpdateBrandingConfigRequest","description":"Request schema for updating branding settings."},"UpdateBusinessHoursRequest":{"properties":{"monday_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Monday Enabled"},"monday_open":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Monday Open"},"monday_close":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Monday Close"},"tuesday_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Tuesday Enabled"},"tuesday_open":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tuesday Open"},"tuesday_close":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tuesday Close"},"wednesday_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Wednesday Enabled"},"wednesday_open":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wednesday Open"},"wednesday_close":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wednesday Close"},"thursday_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Thursday Enabled"},"thursday_open":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thursday Open"},"thursday_close":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thursday Close"},"friday_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Friday Enabled"},"friday_open":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Friday Open"},"friday_close":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Friday Close"},"saturday_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Saturday Enabled"},"saturday_open":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Saturday Open"},"saturday_close":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Saturday Close"},"sunday_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sunday Enabled"},"sunday_open":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sunday Open"},"sunday_close":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sunday Close"},"holidays":{"anyOf":[{"items":{"$ref":"#/components/schemas/Holiday"},"type":"array"},{"type":"null"}],"title":"Holidays"}},"type":"object","title":"UpdateBusinessHoursRequest","description":"Update business hours request model"},"UpdateCalendarAvailabilityRequest":{"properties":{"used_for_availability":{"type":"boolean","title":"Used For Availability"}},"type":"object","required":["used_for_availability"],"title":"UpdateCalendarAvailabilityRequest","description":"Request model for updating calendar availability flag"},"UpdateCallAnalysisSettingsRequest":{"properties":{"enabled_metrics":{"items":{"$ref":"#/components/schemas/CallAnalysisMetric"},"type":"array","title":"Enabled Metrics","description":"The metrics to enable for this customer"}},"type":"object","title":"UpdateCallAnalysisSettingsRequest","description":"Request to update which metrics are enabled for the customer."},"UpdateCallDetailSettingsRequest":{"properties":{"recording_playback_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Recording Playback Enabled","description":"Whether recording playback is enabled for customer admins"},"recording_playback_staff_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Recording Playback Staff Enabled","description":"Whether recording playback is also enabled for staff users"},"show_realtime_transcript":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Show Realtime Transcript","description":"Whether the realtime transcript tab is visible"},"show_finalized_transcript":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Show Finalized Transcript","description":"Whether the finalized transcript tab is visible"},"show_translated_transcript":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Show Translated Transcript","description":"Whether the translated transcript tab is visible"},"transfer_flow_admin_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Transfer Flow Admin Enabled","description":"Whether the transfer flow card is visible to customer admins"}},"type":"object","title":"UpdateCallDetailSettingsRequest","description":"Update call detail page settings request model"},"UpdateCallGoalRequest":{"properties":{"inbound_call_goal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inbound Call Goal","description":"Call goal for inbound calls"},"outbound_call_goal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outbound Call Goal","description":"Call goal for outbound calls"}},"type":"object","title":"UpdateCallGoalRequest","description":"Request to update customer's call goals"},"UpdateCallGradingRequest":{"properties":{"quality_score":{"anyOf":[{"type":"string","enum":["A","B","C","F"]},{"type":"null"}],"title":"Quality Score","description":"Letter grade for call quality"},"quality_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quality Reason","description":"Reason for the quality score"},"goal_accomplished":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Goal Accomplished","description":"Whether the call goal was achieved"},"goal_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Goal Reason","description":"Reason for the goal assessment"},"caller_hung_up":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Caller Hung Up","description":"Whether the caller hung up"}},"type":"object","title":"UpdateCallGradingRequest","description":"Request to update a call's grading fields. All fields optional; only provided fields are updated."},"UpdateCallGradingResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the grading was updated successfully"},"grading_id":{"type":"string","format":"uuid","title":"Grading Id","description":"The ID of the updated grading"}},"type":"object","required":["success","grading_id"],"title":"UpdateCallGradingResponse","description":"Response after updating a call grading."},"UpdateCallRequest":{"properties":{"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number","description":"Phone number associated with the call"},"duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Seconds","description":"Duration of the call in seconds"},"case_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Case Id","description":"Case ID associated with the call"},"forwarded_call_sid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Forwarded Call Sid","description":"Forwarded Twilio CallSid (for SIP forwarding)"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id","description":"Unique session identifier from voice agent"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Time","description":"When the call ended"},"caller_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caller Name","description":"Name of the caller if collected"},"caller_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caller Email","description":"Email of the caller if collected"},"has_error":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Error","description":"Whether any errors occurred during the call"},"error_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Description","description":"Description of the error if one occurred"},"caller_client_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caller Client Status","description":"Client status of the caller: 'existing_client', 'new_client', or null"},"transcript_realtime":{"anyOf":[{"items":{"$ref":"#/components/schemas/RealtimeTranscriptItem"},"type":"array"},{"type":"null"}],"title":"Transcript Realtime","description":"Real-time transcript as array of conversation items"},"transferred":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Transferred","description":"Whether the call was transferred live to a human"},"transfer_destination_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transfer Destination Number","description":"E.164 number the call was transferred to"},"hit_voicemail":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Hit Voicemail","description":"Whether an outbound call reached voicemail"},"hung_up_before_connect":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Hung Up Before Connect","description":"Whether the caller hung up before the call connected"},"errors":{"anyOf":[{"items":{"$ref":"#/components/schemas/CallError"},"type":"array"},{"type":"null"}],"title":"Errors","description":"Array of errors from voice agent"}},"type":"object","title":"UpdateCallRequest","description":"Request to update an existing call record. All fields are optional."},"UpdateCallResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the call was updated successfully"},"call_id":{"type":"string","format":"uuid","title":"Call Id","description":"The ID of the updated call record"}},"type":"object","required":["success","call_id"],"title":"UpdateCallResponse","description":"Response after updating a call record."},"UpdateCallSummaryRequest":{"properties":{"long_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Long Summary","description":"Updated long summary text"}},"type":"object","title":"UpdateCallSummaryRequest","description":"Request to update a call summary's long_summary."},"UpdateCallSummaryResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the summary was updated successfully"},"summary_id":{"type":"string","format":"uuid","title":"Summary Id","description":"The ID of the updated summary"}},"type":"object","required":["success","summary_id"],"title":"UpdateCallSummaryResponse","description":"Response after updating a call summary."},"UpdateCallsPageSettingsRequest":{"properties":{"enabled_columns":{"anyOf":[{"items":{"$ref":"#/components/schemas/CallsPageColumnEnum"},"type":"array"},{"type":"null"}],"title":"Enabled Columns","description":"List of enabled column identifiers in display order"},"enabled_metrics":{"anyOf":[{"items":{"$ref":"#/components/schemas/CallsPageMetricEnum"},"type":"array"},{"type":"null"}],"title":"Enabled Metrics","description":"List of enabled metric card identifiers"}},"type":"object","title":"UpdateCallsPageSettingsRequest","description":"Update calls page settings request model"},"UpdateCaseNotesSettingsRequest":{"properties":{"case_notes_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Case Notes Enabled","description":"Set to true to enable case notes for this customer"},"dry_run_case_matching":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dry Run Case Matching","description":"Set to true to enable dry-run mode for case matching"},"note_generation_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note Generation Context","description":"Context to include in LLM prompt for case note generation (can be multiple lines)"},"substantive_conversation_criteria":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Substantive Conversation Criteria","description":"Custom criteria for determining if a call has substantive conversation (can be multiple lines)"}},"type":"object","title":"UpdateCaseNotesSettingsRequest","description":"Request to update customer's case notes settings"},"UpdateCaseRequest":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"Title of the case"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Description of the case"},"staff_group_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Staff Group Id","description":"ID of the staff group assigned to this case"},"meeting_booking_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Meeting Booking Enabled","description":"Whether meeting booking is enabled for this case"}},"type":"object","title":"UpdateCaseRequest","description":"Request to update an existing case record."},"UpdateChatWidgetConfigRequest":{"properties":{"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled","description":"Whether the chat widget is shown on the customer's website"},"accent_color":{"anyOf":[{"type":"string","maxLength":7},{"type":"null"}],"title":"Accent Color","description":"Primary color hex code (e.g., #B5683C)"},"secondary_color":{"anyOf":[{"type":"string","maxLength":7},{"type":"null"}],"title":"Secondary Color","description":"Secondary accent color hex code. Set to null to auto-derive from accent color."},"position":{"anyOf":[{"type":"string","pattern":"^bottom-(right|left)$"},{"type":"null"}],"title":"Position","description":"Widget position: bottom-right or bottom-left"},"greeting_message":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Greeting Message","description":"The first message shown when a visitor opens the chat"},"assistant_name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Assistant Name","description":"Displayed in the chat header"},"system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Prompt","description":"Full system prompt override. Set to null to use assembled prompt from structured fields."},"persona_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Persona Prompt","description":"Personality/tone instructions"},"law_firm_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Law Firm Context","description":"Firm-specific information. Set to null to fall back to Customer.law_firm_info_prompt."},"fields_to_collect":{"anyOf":[{"items":{"$ref":"#/components/schemas/FieldToCollect"},"type":"array"},{"type":"null"}],"title":"Fields To Collect","description":"Fields to collect from visitors with lead generation requirements"},"intake_goal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intake Goal","description":"What to do after collecting info"},"additional_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Additional Instructions","description":"Extra rules or context"},"teaser_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Teaser Enabled","description":"Whether to show a teaser message bubble"},"teaser_message":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Teaser Message","description":"Teaser message text"},"teaser_delay_seconds":{"anyOf":[{"type":"integer","maximum":60.0,"minimum":1.0},{"type":"null"}],"title":"Teaser Delay Seconds","description":"Seconds before teaser appears"},"show_online_status":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Show Online Status","description":"Whether to show online indicator"},"show_unread_badge":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Show Unread Badge","description":"Whether to show unread badge on bubble"},"tab_notification_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Tab Notification Enabled","description":"Whether to flash unread count in tab title"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url","description":"URL of agent avatar image"},"avatar_video_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Video Url","description":"URL of a silent looping video shown in place of the avatar image (header and launcher). Takes precedence over avatar_url."},"avatar_video_in_header":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Avatar Video In Header","description":"When false, the open panel's header shows the static avatar image and the avatar video only plays on the launcher bubble"},"launcher_avatar_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Launcher Avatar Enabled","description":"When true (and avatar_url is set), the floating launcher shows the avatar image inside an accent-colored ring instead of the default chat bubble icon"},"intro_video_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Intro Video Enabled","description":"When true (and intro_video_url is set), opening the widget plays an intro video full-panel before transitioning into the chat"},"intro_video_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intro Video Url","description":"URL of the intro video (mp4/webm) played when the widget opens"},"intro_video_autoplay_on_load":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Intro Video Autoplay On Load","description":"When true, desktop visitors see the muted intro video playing in the widget corner on page load; when false it only plays after they click the launcher"},"attention_grabber_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Attention Grabber Enabled","description":"When true, a full-page modal asks visitors if they need help; Yes opens the chat directly, No dismisses it"},"attention_grabber_message":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Attention Grabber Message","description":"Question shown in the attention grabber modal"},"attention_grabber_delay_seconds":{"anyOf":[{"type":"integer","maximum":120.0,"minimum":1.0},{"type":"null"}],"title":"Attention Grabber Delay Seconds","description":"Seconds before the attention grabber modal appears (1-120)"},"idle_message":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Idle Message","description":"Message shown when visitor is idle"},"idle_delay_seconds":{"anyOf":[{"type":"integer","maximum":300.0,"minimum":10.0},{"type":"null"}],"title":"Idle Delay Seconds","description":"Seconds of inactivity before nudge (10-300)"},"quick_exit_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Quick Exit Enabled","description":"Privacy Quick Exit: the widget never persists the chat across page loads — the conversation is ended and reset on browser close/refresh"},"mobile_bottom_offset_px":{"anyOf":[{"type":"integer","maximum":300.0,"minimum":0.0},{"type":"null"}],"title":"Mobile Bottom Offset Px","description":"Extra clearance in pixels between the widget and the bottom of the viewport on mobile (0-300). Null = none."},"chat_idle_timeout_minutes":{"anyOf":[{"type":"integer","maximum":60.0,"minimum":1.0},{"type":"null"}],"title":"Chat Idle Timeout Minutes","description":"Minutes of inactivity before auto-completing a chat (1-60). Default: 10 minutes."},"allowed_origins":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Origins","description":"Allowed origins for CORS. When empty or null, any origin can embed the widget."}},"type":"object","title":"UpdateChatWidgetConfigRequest","description":"Update chat widget configuration request model"},"UpdateChatWidgetRequest":{"properties":{"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled","description":"Whether the chat widget is shown on the customer's website"},"accent_color":{"anyOf":[{"type":"string","maxLength":7},{"type":"null"}],"title":"Accent Color","description":"Primary color hex code (e.g., #B5683C)"},"secondary_color":{"anyOf":[{"type":"string","maxLength":7},{"type":"null"}],"title":"Secondary Color","description":"Secondary accent color hex code. Set to null to auto-derive from accent color."},"position":{"anyOf":[{"type":"string","pattern":"^bottom-(right|left)$"},{"type":"null"}],"title":"Position","description":"Widget position: bottom-right or bottom-left"},"greeting_message":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Greeting Message","description":"The first message shown when a visitor opens the chat"},"assistant_name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Assistant Name","description":"Displayed in the chat header"},"system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Prompt","description":"Full system prompt override. Set to null to use assembled prompt from structured fields."},"persona_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Persona Prompt","description":"Personality/tone instructions"},"law_firm_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Law Firm Context","description":"Firm-specific information. Set to null to fall back to Customer.law_firm_info_prompt."},"fields_to_collect":{"anyOf":[{"items":{"$ref":"#/components/schemas/FieldToCollect"},"type":"array"},{"type":"null"}],"title":"Fields To Collect","description":"Fields to collect from visitors with lead generation requirements"},"intake_goal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intake Goal","description":"What to do after collecting info"},"additional_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Additional Instructions","description":"Extra rules or context"},"teaser_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Teaser Enabled","description":"Whether to show a teaser message bubble"},"teaser_message":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Teaser Message","description":"Teaser message text"},"teaser_delay_seconds":{"anyOf":[{"type":"integer","maximum":60.0,"minimum":1.0},{"type":"null"}],"title":"Teaser Delay Seconds","description":"Seconds before teaser appears"},"show_online_status":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Show Online Status","description":"Whether to show online indicator"},"show_unread_badge":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Show Unread Badge","description":"Whether to show unread badge on bubble"},"tab_notification_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Tab Notification Enabled","description":"Whether to flash unread count in tab title"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url","description":"URL of agent avatar image"},"avatar_video_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Video Url","description":"URL of a silent looping video shown in place of the avatar image (header and launcher). Takes precedence over avatar_url."},"avatar_video_in_header":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Avatar Video In Header","description":"When false, the open panel's header shows the static avatar image and the avatar video only plays on the launcher bubble"},"launcher_avatar_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Launcher Avatar Enabled","description":"When true (and avatar_url is set), the floating launcher shows the avatar image inside an accent-colored ring instead of the default chat bubble icon"},"intro_video_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Intro Video Enabled","description":"When true (and intro_video_url is set), opening the widget plays an intro video full-panel before transitioning into the chat"},"intro_video_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intro Video Url","description":"URL of the intro video (mp4/webm) played when the widget opens"},"intro_video_autoplay_on_load":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Intro Video Autoplay On Load","description":"When true, desktop visitors see the muted intro video playing in the widget corner on page load; when false it only plays after they click the launcher"},"attention_grabber_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Attention Grabber Enabled","description":"When true, a full-page modal asks visitors if they need help; Yes opens the chat directly, No dismisses it"},"attention_grabber_message":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Attention Grabber Message","description":"Question shown in the attention grabber modal"},"attention_grabber_delay_seconds":{"anyOf":[{"type":"integer","maximum":120.0,"minimum":1.0},{"type":"null"}],"title":"Attention Grabber Delay Seconds","description":"Seconds before the attention grabber modal appears (1-120)"},"idle_message":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Idle Message","description":"Message shown when visitor is idle"},"idle_delay_seconds":{"anyOf":[{"type":"integer","maximum":300.0,"minimum":10.0},{"type":"null"}],"title":"Idle Delay Seconds","description":"Seconds of inactivity before nudge (10-300)"},"quick_exit_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Quick Exit Enabled","description":"Privacy Quick Exit: the widget never persists the chat across page loads — the conversation is ended and reset on browser close/refresh"},"mobile_bottom_offset_px":{"anyOf":[{"type":"integer","maximum":300.0,"minimum":0.0},{"type":"null"}],"title":"Mobile Bottom Offset Px","description":"Extra clearance in pixels between the widget and the bottom of the viewport on mobile (0-300). Null = none."},"chat_idle_timeout_minutes":{"anyOf":[{"type":"integer","maximum":60.0,"minimum":1.0},{"type":"null"}],"title":"Chat Idle Timeout Minutes","description":"Minutes of inactivity before auto-completing a chat (1-60). Default: 10 minutes."},"allowed_origins":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Origins","description":"Allowed origins for CORS. When empty or null, any origin can embed the widget."},"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Name","description":"Display label for the widget"},"is_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Default","description":"Set to true to make this the customer's default widget. Setting false is not allowed — make another widget default instead."}},"type":"object","title":"UpdateChatWidgetRequest","description":"Update a chat widget request model"},"UpdateChatsPageSettingsRequest":{"properties":{"enabled_columns":{"anyOf":[{"items":{"$ref":"#/components/schemas/ChatsPageColumnEnum"},"type":"array"},{"type":"null"}],"title":"Enabled Columns","description":"List of enabled column identifiers in display order"},"enabled_metrics":{"anyOf":[{"items":{"$ref":"#/components/schemas/ChatsPageMetricEnum"},"type":"array"},{"type":"null"}],"title":"Enabled Metrics","description":"List of enabled metric card identifiers"}},"type":"object","title":"UpdateChatsPageSettingsRequest","description":"Update chats page settings request model"},"UpdateCustomerAddressRequest":{"properties":{"address":{"$ref":"#/components/schemas/CustomerAddress"}},"type":"object","required":["address"],"title":"UpdateCustomerAddressRequest","description":"Request to update customer address."},"UpdateCustomerNameRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name","description":"The new customer name"}},"type":"object","required":["name"],"title":"UpdateCustomerNameRequest","description":"Request to update a customer's name"},"UpdateCustomerNameResponse":{"properties":{"customer_id":{"type":"string","format":"uuid","title":"Customer Id","description":"The customer ID"},"name":{"type":"string","title":"Name","description":"The updated customer name"},"message":{"type":"string","title":"Message","description":"Status message"}},"type":"object","required":["customer_id","name","message"],"title":"UpdateCustomerNameResponse","description":"Response from updating a customer's name"},"UpdateDeveloperSettingsRequest":{"properties":{"call_started_developer_alert_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Call Started Developer Alert Enabled","description":"Set to true to enable SMS alerts when new calls start"},"outbound_developer_alert_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Outbound Developer Alert Enabled","description":"Set to true to enable SMS alerts for outbound lead activity"},"unsent_notification_developer_alert_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Unsent Notification Developer Alert Enabled","description":"Set to false to exclude this customer from the unsent-notification-emails watchdog alert"},"grade_alert_threshold":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grade Alert Threshold","description":"Which grade levels trigger alerts: b_and_below, c_and_below, f_only, none"},"auto_billing_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Billing Enabled","description":"Set to true to enable automated daily billing (live runs without dry run)"}},"type":"object","title":"UpdateDeveloperSettingsRequest","description":"Request to update customer's developer settings"},"UpdateDryRunCaseMatchingRequest":{"properties":{"dry_run_case_matching":{"type":"boolean","title":"Dry Run Case Matching","description":"Set to true to enable dry-run mode for case matching"}},"type":"object","required":["dry_run_case_matching"],"title":"UpdateDryRunCaseMatchingRequest","description":"Request to update customer's dry-run case matching setting"},"UpdateFeatureFlagsRequest":{"properties":{"cases_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Cases Enabled","description":"Whether cases feature is enabled"},"leads_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Leads Enabled","description":"Whether leads feature is enabled"},"messages_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Messages Enabled","description":"Whether messages feature is enabled"},"case_notes_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Case Notes Enabled","description":"Whether case notes feature is enabled"},"known_contacts_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Known Contacts Enabled","description":"Whether known contacts feature is enabled"},"inquiries_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Inquiries Enabled","description":"Whether inquiries feature is enabled"},"reports_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Reports Enabled","description":"Whether reports feature is enabled"},"availability_blocks_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Availability Blocks Enabled","description":"Whether availability blocks feature is enabled"},"outbound_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Outbound Enabled","description":"Whether outbound leads feature is enabled"},"staff_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Staff Enabled","description":"Whether staff management feature is enabled"},"practicepanther_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Practicepanther Enabled","description":"Whether PracticePanther integration is enabled"},"lead_scoring_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Lead Scoring Enabled","description":"Whether lead scoring is enabled"},"chat_widget_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Chat Widget Enabled","description":"Whether chat widget feature is enabled"},"info_request_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Info Request Enabled","description":"Whether info request SMS feature is enabled"},"google_calendar_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Google Calendar Enabled","description":"Whether the Google Workspace integration (calendar/directory) is enabled"},"microsoft365_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Microsoft365 Enabled","description":"Whether Microsoft 365 integration is enabled"},"zoho_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Zoho Enabled","description":"Whether Zoho integration is enabled"},"ringcentral_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Ringcentral Enabled","description":"Whether RingCentral integration is enabled"},"smartadvocate_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Smartadvocate Enabled","description":"Whether SmartAdvocate integration is enabled"},"intake_forms_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Intake Forms Enabled","description":"Whether intake forms feature is enabled"},"business_hours_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Business Hours Enabled","description":"Whether business hours feature is enabled"},"filevine_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Filevine Enabled","description":"Whether Filevine integration is enabled"},"vxt_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Vxt Enabled","description":"Whether VXT integration is enabled"},"lead_docket_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Lead Docket Enabled","description":"Whether Lead Docket integration is enabled"},"croo_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Croo Enabled","description":"Whether Croo integration is enabled"},"intakes_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Intakes Enabled","description":"Whether the Intakes page (imported intake recordings) is enabled"},"realtime_transcripts_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Realtime Transcripts Enabled","description":"Whether realtime transcript webhook ingestion is enabled"},"realtime_lead_scoring_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Realtime Lead Scoring Enabled","description":"Whether the live (mid-call) lead scoring tool is enabled"},"docusign_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Docusign Enabled","description":"Whether DocuSign integration is enabled"},"zapier_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Zapier Enabled","description":"Whether the Zapier integration is enabled"},"law_firm_info_prompt_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Law Firm Info Prompt Enabled","description":"Whether the Law Firm Info Prompt settings card is shown"},"case_match_corrections_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Case Match Corrections Enabled","description":"Whether end users can correct case matches on the call detail page"},"granola_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Granola Enabled","description":"Whether the Granola meeting-notes integration is enabled"},"ringcentral_outbound_calls_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Ringcentral Outbound Calls Enabled","description":"Whether staged RingCentral outbound calls graduate into canonical call records"},"transcript_filing_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Transcript Filing Enabled","description":"Whether the Google Drive transcript-filing automation is enabled"},"google_contacts_sync_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Google Contacts Sync Enabled","description":"Whether Google contacts sync is enabled (scopes only for now)"},"google_email_sync_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Google Email Sync Enabled","description":"Whether Google email (Gmail) sync is enabled (scopes only for now)"},"clio_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Clio Enabled","description":"Whether the Clio Manage integration is enabled"},"clio_grow_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Clio Grow Enabled","description":"Whether the Clio Grow integration is enabled"},"drive_case_matching_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Drive Case Matching Enabled","description":"Whether case matching uses the Google Drive matter mirror as the case provider"},"rc_contact_sync_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Rc Contact Sync Enabled","description":"Whether Google contacts are proposed for sync into the customer's RingCentral address book"},"custom_trigger_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Custom Trigger Enabled","description":"Whether custom trigger webhook endpoints are enabled"},"ghl_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Ghl Enabled","description":"Whether the GoHighLevel integration is enabled"},"onedrive_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Onedrive Enabled","description":"Whether the OneDrive integration (call transcript/recording upload) is enabled"},"vapi_transfers_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Vapi Transfers Enabled","description":"Whether Vapi-native transferCall warm transfers (Vapi owns the Twilio bridge) are enabled — records the whole parent Twilio call so the post-transfer staff conversation is captured. Distinct from VXT blind transfers and the attended-transfer (provider-bypass) flow"},"transfer_destinations_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Transfer Destinations Enabled","description":"Whether the Transfer Destinations settings page (named transfer phone numbers) is enabled"},"test_transfer_numbers_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Test Transfer Numbers Enabled","description":"Whether test calls resolve dynamic transfers to each destination's test phone number instead of the real number"},"netsapiens_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Netsapiens Enabled","description":"Whether the NetSapiens PBX integration (on-call queue reconciliation) is enabled"},"on_call_schedule_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"On Call Schedule Enabled","description":"Whether the on-call schedule calendar is enabled"},"bounce_back_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Bounce Back Enabled","description":"Whether bounce-back handling (matching returned unanswered transfers to their original call) is enabled"},"transfer_metrics_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Transfer Metrics Enabled","description":"Whether the Transfer Metrics dashboard is visible to this customer's admins"},"pbx_recording_stitch_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Pbx Recording Stitch Enabled","description":"Whether answered transfers hold their pipeline for the staff-side PBX recording stitch"}},"type":"object","title":"UpdateFeatureFlagsRequest","description":"Update feature flags request model (developer only)"},"UpdateFilevineDraftGenerationContextRequest":{"properties":{"draft_generation_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Draft Generation Context","description":"Context to include in LLM prompt for Filevine draft contact generation (can be multiple lines)"}},"type":"object","title":"UpdateFilevineDraftGenerationContextRequest","description":"Request to update customer's Filevine draft generation context"},"UpdateFilevineSettingsRequest":{"properties":{"default_project_type_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Default Project Type Id"},"dry_run":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dry Run"},"blocked_contact_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Blocked Contact Types"}},"type":"object","title":"UpdateFilevineSettingsRequest","description":"Update Filevine settings request model"},"UpdateFilingControlsRequest":{"properties":{"auto_file_granola":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto File Granola"},"auto_file_ringcentral":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto File Ringcentral"}},"type":"object","title":"UpdateFilingControlsRequest","description":"Customer-editable subset: only the auto-file toggles, and only for\nsources the developer has exposed. Omitted fields are left unchanged."},"UpdateFirmInformationRequest":{"properties":{"firm_name":{"type":"string","title":"Firm Name"}},"type":"object","required":["firm_name"],"title":"UpdateFirmInformationRequest","description":"Update firm information request model"},"UpdateFirmInformationResponse":{"properties":{"message":{"type":"string","title":"Message"},"firm_name":{"type":"string","title":"Firm Name"}},"type":"object","required":["message","firm_name"],"title":"UpdateFirmInformationResponse","description":"Update firm information response model"},"UpdateGoogleWorkspaceAdminRequest":{"properties":{"admin_user_id":{"type":"string","format":"uuid","title":"Admin User Id","description":"The user ID to set as Google Workspace admin"}},"type":"object","required":["admin_user_id"],"title":"UpdateGoogleWorkspaceAdminRequest","description":"Request to update Google Workspace admin user"},"UpdateGreetingsRequest":{"properties":{"default_greeting":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Greeting"},"business_hours_default_greeting":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Hours Default Greeting"},"after_hours_default_greeting":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"After Hours Default Greeting"},"outbound_lead_greeting":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outbound Lead Greeting"},"pp_contact_greeting":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pp Contact Greeting"},"filevine_contact_greeting":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filevine Contact Greeting"},"smartadvocate_contact_greeting":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Smartadvocate Contact Greeting"}},"type":"object","title":"UpdateGreetingsRequest","description":"Request to update greeting settings"},"UpdateInquiryRequest":{"properties":{"inquiry_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inquiry Description","description":"Update inquiry description"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name","description":"Update first name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name","description":"Update last name"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number","description":"Update phone number"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"Update email"}},"type":"object","title":"UpdateInquiryRequest","description":"Request to update an existing inquiry record."},"UpdateInquirySettingsRequest":{"properties":{"email_notifications_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Email Notifications Enabled","description":"Whether automatic inquiry notification emails are enabled"},"dry_run":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dry Run","description":"Whether inquiry notification emails require manual sending"},"notification_email_recipients":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Notification Email Recipients","description":"List of email addresses to receive inquiry notification emails"},"sms_notifications_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sms Notifications Enabled","description":"Whether automatic inquiry notification SMS are enabled"},"notification_sms_recipients":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Notification Sms Recipients","description":"List of phone numbers (E.164 format) to receive inquiry notification SMS"},"test_notifications_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Test Notifications Enabled","description":"Whether notifications are sent for test calls and chats"},"followup_filter_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Followup Filter Enabled","description":"Whether the LLM follow-up filter runs on inquiry classification"},"followup_filter_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Followup Filter Prompt","description":"Custom follow-up criteria prompt; send null explicitly to reset to the default"},"sa_subject_enhancement_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sa Subject Enhancement Enabled","description":"Whether to prefix the notification email subject with the SmartAdvocate case's team and a short summary of the ask (requires SmartAdvocate)"},"sa_case_link_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sa Case Link Enabled","description":"Whether to include a link to the matched SmartAdvocate case in the notification email body (requires SmartAdvocate)"}},"type":"object","title":"UpdateInquirySettingsRequest","description":"Update inquiry notification settings request model"},"UpdateIntakeFormConfigRequest":{"properties":{"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"accent_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accent Color"},"form_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Form Title"},"completion_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completion Message"},"intake_goal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intake Goal"},"law_firm_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Law Firm Context"},"additional_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Additional Instructions"},"allowed_origins":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Origins"},"form_idle_timeout_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Form Idle Timeout Minutes"},"default_language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Language"},"language_selector_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Language Selector Enabled"},"language_selector_options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Language Selector Options"}},"type":"object","title":"UpdateIntakeFormConfigRequest"},"UpdateLawFirmInfoPromptRequest":{"properties":{"law_firm_info_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Law Firm Info Prompt"}},"type":"object","title":"UpdateLawFirmInfoPromptRequest","description":"Update law firm info prompt request model"},"UpdateLawFirmInfoPromptResponse":{"properties":{"message":{"type":"string","title":"Message"},"law_firm_info_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Law Firm Info Prompt"}},"type":"object","required":["message"],"title":"UpdateLawFirmInfoPromptResponse","description":"Update law firm info prompt response model"},"UpdateLeadClassificationEnabledRequest":{"properties":{"lead_classification_enabled":{"type":"boolean","title":"Lead Classification Enabled","description":"Set to true to enable lead classification in post-processing"}},"type":"object","required":["lead_classification_enabled"],"title":"UpdateLeadClassificationEnabledRequest","description":"Request to update customer's lead classification setting"},"UpdateLeadRequest":{"properties":{"case_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Case Id","description":"Case ID to associate with the lead"},"is_qualified":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Qualified","description":"Override qualification status"},"qualification_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qualification Summary","description":"Override qualification summary"},"qualification_details":{"anyOf":[{"items":{"$ref":"#/components/schemas/QualificationQA"},"type":"array"},{"type":"null"}],"title":"Qualification Details","description":"Update qualification Q&A pairs"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name","description":"Update first name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name","description":"Update last name"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number","description":"Update phone number"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"Update email"},"inquiry_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inquiry Reason","description":"Update reason for call"},"lead_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lead Source","description":"Update where they heard about the firm"},"lead_score":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lead Score","description":"Override lead score (low, medium, high, unknown)"},"lead_score_reasoning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lead Score Reasoning","description":"Override reasoning for lead score"}},"type":"object","title":"UpdateLeadRequest","description":"Request to update an existing lead record."},"UpdateLeadSettingsRequest":{"properties":{"email_notifications_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Email Notifications Enabled","description":"Whether automatic lead notification emails are enabled"},"dry_run":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dry Run","description":"Whether lead notification emails require manual sending"},"notification_email_recipients":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Notification Email Recipients","description":"List of email addresses to receive lead notification emails"},"sms_notifications_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sms Notifications Enabled","description":"Whether automatic lead notification SMS are enabled"},"notification_sms_recipients":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Notification Sms Recipients","description":"List of phone numbers (E.164 format) to receive lead notification SMS"},"lead_scoring_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lead Scoring Context","description":"Criteria for scoring leads as low, medium, or high value"},"lead_scoring_mode":{"anyOf":[{"type":"string","enum":["low_medium_high","custom_prompt"]},{"type":"null"}],"title":"Lead Scoring Mode","description":"Which lead scoring strategy to use"},"lead_scoring_custom_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lead Scoring Custom Prompt","description":"Free-text scoring instructions used when lead_scoring_mode is 'custom_prompt'"},"lead_scoring_custom_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Lead Scoring Custom Schema","description":"JSON Schema (draft-7 object) describing the custom scoring output when lead_scoring_mode is 'custom_prompt'"},"test_notifications_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Test Notifications Enabled","description":"Whether notifications are sent for test calls and chats"},"lead_source_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Lead Source Enabled","description":"Whether lead source extraction is enabled for calls and chats"},"lead_generation_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lead Generation Context","description":"General context to guide lead classification and extraction behavior"},"info_request_forces_lead":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Info Request Forces Lead","description":"Whether sending an info request SMS during a call forces the call to be classified as a lead"},"lead_notification_template":{"anyOf":[{"type":"string","enum":["default","legal_pocket","credit_hound"]},{"type":"null"}],"title":"Lead Notification Template","description":"Which SES email template variant to use for lead notifications"},"lead_value_label":{"anyOf":[{"type":"string","enum":["lead_value","lead_priority","lead_score"]},{"type":"null"}],"title":"Lead Value Label","description":"Which label to display for the lead score metric (app UI, emails, SMS)"}},"type":"object","title":"UpdateLeadSettingsRequest","description":"Update lead notification settings request model"},"UpdateMatterSourcesRequest":{"properties":{"sources":{"items":{"$ref":"#/components/schemas/DriveMatterSourceItem"},"type":"array","title":"Sources"},"exclude_folder_names":{"items":{"type":"string"},"type":"array","title":"Exclude Folder Names"},"extract_closed_matters":{"type":"boolean","title":"Extract Closed Matters","default":false}},"type":"object","title":"UpdateMatterSourcesRequest","description":"Replace the full source set plus the exclude list.\n\nSent whole rather than patched so the sources always reflect exactly\nwhat the operator sees in the UI."},"UpdateMessageGenerationContextRequest":{"properties":{"message_generation_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message Generation Context","description":"Context to include in LLM prompt for message generation (can be multiple lines)"}},"type":"object","title":"UpdateMessageGenerationContextRequest","description":"Request to update customer's message generation context"},"UpdateMessageSettingsRequest":{"properties":{"messages_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Messages Enabled","description":"Whether message taking is enabled (admin only, ignored for non-admin users)"},"sms_notifications_enabled":{"type":"boolean","title":"Sms Notifications Enabled","description":"Whether SMS notifications are enabled"},"sms_recipients":{"items":{"type":"string"},"type":"array","title":"Sms Recipients","description":"List of phone numbers (E.164 format) to receive SMS notifications"},"email_notifications_enabled":{"type":"boolean","title":"Email Notifications Enabled","description":"Whether email notifications are enabled"},"email_recipients":{"items":{"type":"string"},"type":"array","title":"Email Recipients","description":"List of email addresses to receive notifications"}},"type":"object","required":["sms_notifications_enabled","email_notifications_enabled"],"title":"UpdateMessageSettingsRequest","description":"Update message settings request model"},"UpdateOnCallScheduleHoursRequest":{"properties":{"hours":{"items":{"$ref":"#/components/schemas/OnCallScheduleHoursEntry"},"type":"array","title":"Hours","description":"Full replacement set of weekday windows; an empty list means on-call 24/7"}},"type":"object","required":["hours"],"title":"UpdateOnCallScheduleHoursRequest"},"UpdateOnCallScheduleSettingsRequest":{"properties":{"default_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Default User Id","description":"Fallback on-call user; pass null explicitly to clear"}},"type":"object","title":"UpdateOnCallScheduleSettingsRequest"},"UpdateOutboundDeveloperSettingsRequest":{"properties":{"extended_calling_window_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Extended Calling Window Enabled","description":"Set to true to relax the outbound calling window bounds for this customer from 12:00-18:00 ET to 08:00-20:00 ET"},"trigger_fields":{"anyOf":[{"items":{"$ref":"#/components/schemas/TriggerFieldConfig"},"type":"array"},{"type":"null"}],"title":"Trigger Fields","description":"Replaces the full list of fields an outbound call trigger supplies for this customer. Customers cannot edit their own trigger contract."},"call_pacing_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Call Pacing Enabled","description":"Set to false to drain the whole outbound queue per run and dial immediately on enqueue instead of one call per 10 minutes"},"max_calls_per_number_per_day":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Max Calls Per Number Per Day","description":"Per-phone-number daily outbound call limit. Send 0 for no limit (stored as null). Omit to leave unchanged."},"outbound_leads_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Outbound Leads Enabled","description":"Set to false when this customer's leads come from a trigger: hides their lead list, CSV import and manual call queueing, and rejects the lead-writing endpoints"}},"type":"object","title":"UpdateOutboundDeveloperSettingsRequest","description":"Request to update customer's developer-only outbound settings"},"UpdateOutboundLeadRequest":{"properties":{"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","description":"Lead status"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name","description":"First name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name","description":"Last name"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number","description":"Phone number"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"Email address"},"case_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Case Id","description":"Associated case ID"},"trigger_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Trigger Metadata","description":"Resolved trigger-supplied values, keyed by the customer's configured trigger field keys"}},"type":"object","title":"UpdateOutboundLeadRequest","description":"Request to update an outbound lead."},"UpdateOutboundSettingsRequest":{"properties":{"calling_window_start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Calling Window Start","description":"Start of calling window in HH:MM format (Eastern Time). Must be >= the customer's minimum allowed start, which depends on their extended calling window flag (12:00 normally, 08:00 when extended)."},"calling_window_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Calling Window End","description":"End of calling window in HH:MM format (Eastern Time). Must be <= the customer's maximum allowed end, which depends on their extended calling window flag (18:00 normally, 20:00 when extended)."}},"type":"object","title":"UpdateOutboundSettingsRequest","description":"Update outbound calling window settings request model"},"UpdatePipecatAgentIdRequest":{"properties":{"pipecat_agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pipecat Agent Id","description":"Pipecat Cloud agent identifier (e.g., 'my-intake-bot')"}},"type":"object","title":"UpdatePipecatAgentIdRequest","description":"Request to update customer's Pipecat agent ID"},"UpdatePracticePantherSettingsRequest":{"properties":{"assigned_to_guid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned To Guid","description":"GUID of the PracticePanther user to assign new contacts and matters to"},"contact_tag_voice":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Tag Voice","description":"Tag applied to contacts created by voice agent"},"contact_tag_chat":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Tag Chat","description":"Tag applied to contacts created by web chat agent"},"dry_run":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dry Run","description":"Master override - when enabled, blocks all automatic PracticePanther actions regardless of individual auto-create settings"},"auto_create_contact":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Create Contact","description":"Whether contacts are automatically created in PracticePanther during the call pipeline"},"auto_create_matter":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Create Matter","description":"Whether matters are automatically created in PracticePanther during the call pipeline"},"auto_create_portal":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Create Portal","description":"Whether client portal invitations are automatically sent during the call pipeline"},"auto_create_call":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Create Call","description":"Whether call activities are automatically created in PracticePanther during the call pipeline"}},"type":"object","title":"UpdatePracticePantherSettingsRequest","description":"Update PracticePanther integration settings request model"},"UpdateQualificationRequest":{"properties":{"question":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Question","description":"Qualification question to ask"},"criteria":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Criteria","description":"Criteria to evaluate the answer"},"position":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Position","description":"Position for ordering"}},"type":"object","title":"UpdateQualificationRequest","description":"Request to update an existing qualification."},"UpdateRcContactSyncSettingsRequest":{"properties":{"dry_run":{"type":"boolean","title":"Dry Run"}},"type":"object","required":["dry_run"],"title":"UpdateRcContactSyncSettingsRequest"},"UpdateRealtimeLeadScoringSettingsRequest":{"properties":{"agent_visible_fields":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Agent Visible Fields","description":"Allowlist of property keys from lead_scoring_custom_schema that are exposed to the voice agent"}},"type":"object","title":"UpdateRealtimeLeadScoringSettingsRequest","description":"Update realtime lead scoring settings request model (developer only)"},"UpdateReportRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Report name"},"report_type":{"anyOf":[{"$ref":"#/components/schemas/ReportTypeEnum"},{"type":"null"}],"description":"Type of report"},"frequency":{"anyOf":[{"$ref":"#/components/schemas/ReportFrequencyEnum"},{"type":"null"}],"description":"Report frequency"},"send_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Send Time","description":"Time of day to send the report (HH:MM:SS)"},"emails":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Emails","description":"List of email addresses"},"user_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"User Ids","description":"List of user IDs to receive the report"},"staff_group_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Staff Group Ids","description":"List of staff group IDs to receive the report"},"leads_summary_include_qualified":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Leads Summary Include Qualified","description":"Include qualified leads in leads summary report"},"leads_summary_include_partially_qualified":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Leads Summary Include Partially Qualified","description":"Include partially qualified leads in leads summary report"},"leads_summary_include_no_matched_case":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Leads Summary Include No Matched Case","description":"Include no matched case leads in leads summary report"}},"type":"object","title":"UpdateReportRequest","description":"Update report request model - all fields optional"},"UpdateReportsSettingsRequest":{"properties":{"emails_disabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Emails Disabled","description":"Whether to disable scheduled report emails"}},"type":"object","title":"UpdateReportsSettingsRequest","description":"Update reports settings request model"},"UpdateSavedFilterRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Name"},"filters":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Filters"}},"type":"object","title":"UpdateSavedFilterRequest"},"UpdateScreeningPhoneNumberRequest":{"properties":{"screening_phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Screening Phone Number","description":"Phone number for call screening/transfers (E.164 format). Set to null to clear."}},"type":"object","title":"UpdateScreeningPhoneNumberRequest","description":"Update screening phone number request model (developer only)"},"UpdateStaffGroupRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"member_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Member Ids"},"members":{"anyOf":[{"items":{"$ref":"#/components/schemas/StaffGroupMemberInput"},"type":"array"},{"type":"null"}],"title":"Members"},"meeting_duration_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Meeting Duration Minutes"},"slot_every_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Slot Every Minutes"},"priority_order_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Priority Order Enabled"}},"type":"object","title":"UpdateStaffGroupRequest","description":"Request to update an existing staff group"},"UpdateStaffUserRequest":{"properties":{"meeting_phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meeting Phone Number"},"voip_extension":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voip Extension"},"user_type":{"anyOf":[{"$ref":"#/components/schemas/UserType"},{"type":"null"}]}},"type":"object","title":"UpdateStaffUserRequest","description":"Request to update a staff user's settings"},"UpdateStaffUserResponse":{"properties":{"id":{"type":"string","title":"Id"},"meeting_phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meeting Phone Number"},"voip_extension":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voip Extension"},"user_type":{"$ref":"#/components/schemas/UserType"},"message":{"type":"string","title":"Message"}},"type":"object","required":["id","user_type","message"],"title":"UpdateStaffUserResponse","description":"Response after updating a staff user"},"UpdateSummaryGenerationContextRequest":{"properties":{"summary_generation_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary Generation Context","description":"Context to include in LLM prompt for summary generation (can be multiple lines)"}},"type":"object","title":"UpdateSummaryGenerationContextRequest","description":"Request to update customer's summary generation context"},"UpdateSystemSettingsRequest":{"properties":{"cnam_lookup_before_call":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Cnam Lookup Before Call","description":"Whether to perform caller ID (CNAM) lookup before connecting calls"}},"type":"object","title":"UpdateSystemSettingsRequest","description":"Update system settings request model"},"UpdateTimezoneResponse":{"properties":{"message":{"type":"string","title":"Message"},"timezone":{"type":"string","title":"Timezone"}},"type":"object","required":["message","timezone"],"title":"UpdateTimezoneResponse","description":"Response model for updating timezone"},"UpdateTranscriptSettingsRequest":{"properties":{"text_replacements":{"items":{"$ref":"#/components/schemas/TranscriptTextReplacementRule"},"type":"array","title":"Text Replacements","description":"List of text replacement rules"},"transcription_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transcription Prompt","description":"Contextual prompt sent to AssemblyAI describing the audio domain"},"transcription_keyterms":{"items":{"type":"string"},"type":"array","title":"Transcription Keyterms","description":"Keyterms sent to AssemblyAI to boost domain-term accuracy"}},"type":"object","required":["text_replacements"],"title":"UpdateTranscriptSettingsRequest","description":"Request to update customer's transcript settings"},"UpdateUserBookingCalendarRequest":{"properties":{"booking_calendar_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Booking Calendar Id"}},"type":"object","required":["booking_calendar_id"],"title":"UpdateUserBookingCalendarRequest","description":"Request model for updating user's booking calendar"},"UpdateUserBookingCalendarResponse":{"properties":{"message":{"type":"string","title":"Message"},"booking_calendar_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Booking Calendar Id"}},"type":"object","required":["message","booking_calendar_id"],"title":"UpdateUserBookingCalendarResponse","description":"Response model for updating user's booking calendar"},"UpdateZapierConfigRequest":{"properties":{"zapier_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zapier Prompt","description":"Optional supplemental guidance"},"dry_run":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dry Run","description":"Dry-run toggle"}},"type":"object","title":"UpdateZapierConfigRequest","description":"Update the developer Zapier config. Omitted fields are left unchanged."},"UpdateZohoSettingsRequest":{"properties":{"zoho_leads_disabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Zoho Leads Disabled","description":"Whether to disable automatic Zoho lead creation in the pipeline"}},"type":"object","title":"UpdateZohoSettingsRequest","description":"Update Zoho settings request model"},"UpsertOnCallAssignmentRequest":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id","description":"User to put on call for this date"}},"type":"object","required":["user_id"],"title":"UpsertOnCallAssignmentRequest"},"UserCaseSearchResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/UserCaseSearchResult"},"type":"array","title":"Results"},"total":{"type":"integer","title":"Total","description":"Total number of results found","default":0}},"type":"object","title":"UserCaseSearchResponse","description":"Response from user case search."},"UserCaseSearchResult":{"properties":{"case_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Case Provider"},"case_local_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Case Local Id"},"smartadvocate_case_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Smartadvocate Case Id"},"case_number":{"type":"string","title":"Case Number"},"case_name":{"type":"string","title":"Case Name"},"plaintiffs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Plaintiffs"},"defendants":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Defendants"},"primary_contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Contact Name"},"primary_contact_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Contact Phone"}},"type":"object","required":["case_number","case_name"],"title":"UserCaseSearchResult","description":"A case search result for end-users (simplified)."},"UserInfo":{"properties":{"user_id":{"type":"string","title":"User Id"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"email":{"type":"string","title":"Email"},"is_developer":{"type":"boolean","title":"Is Developer","default":false},"user_type":{"$ref":"#/components/schemas/UserType"},"login_type":{"$ref":"#/components/schemas/LoginType"},"customer_id":{"type":"string","title":"Customer Id"},"feature_flags":{"anyOf":[{"$ref":"#/components/schemas/FeatureFlagsResponse"},{"type":"null"}]}},"type":"object","required":["user_id","first_name","last_name","email","user_type","login_type","customer_id"],"title":"UserInfo","description":"User information schema"},"UserManualCaseMatchRequest":{"properties":{"case_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Case Provider","description":"'smartadvocate' or 'filevine'"},"case_local_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Case Local Id","description":"PK in the provider's local table"},"smartadvocate_case_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Smartadvocate Case Id","description":"Legacy SA-only field"}},"type":"object","title":"UserManualCaseMatchRequest","description":"Request for end-user to manually match a call to a case.\n\nEither provide `case_provider` + `case_local_id` OR legacy `smartadvocate_case_id`."},"UserManualCaseMatchResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the match was successful"},"matched_case_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matched Case Number","description":"Case number if matched"},"matched_case_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matched Case Name","description":"Case name if matched"},"case_note_status":{"type":"string","title":"Case Note Status","description":"Status of case note: 'posted', 'pending', or 'none'"},"message":{"type":"string","title":"Message","description":"Status message"}},"type":"object","required":["success","case_note_status","message"],"title":"UserManualCaseMatchResponse","description":"Response from end-user manual case matching."},"UserSettings":{"properties":{"email_notifications":{"type":"boolean","title":"Email Notifications","default":true},"theme":{"type":"string","title":"Theme","default":"light"},"language":{"type":"string","title":"Language","default":"en"}},"type":"object","title":"UserSettings","description":"User settings model"},"UserSettingsResponse":{"properties":{"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"email":{"type":"string","title":"Email"},"email_notifications":{"type":"boolean","title":"Email Notifications"},"theme":{"type":"string","title":"Theme"},"language":{"type":"string","title":"Language"}},"type":"object","required":["first_name","last_name","email","email_notifications","theme","language"],"title":"UserSettingsResponse","description":"User settings response model"},"UserType":{"type":"string","enum":["admin","staff"],"title":"UserType","description":"Enum for user types"},"UserWithAvailability":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"email":{"type":"string","title":"Email"},"availability_timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Availability Timezone"},"booking_calendar_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Booking Calendar Id"},"availability":{"items":{"$ref":"#/components/schemas/AvailabilityResponse"},"type":"array","title":"Availability"},"calendars":{"items":{"$ref":"#/components/schemas/CalendarResponse"},"type":"array","title":"Calendars","default":[]}},"type":"object","required":["user_id","first_name","last_name","email","availability_timezone","booking_calendar_id","availability"],"title":"UserWithAvailability","description":"Response model for user with their availability"},"VXTConnectPasswordRequest":{"properties":{"email":{"type":"string","minLength":3,"title":"Email","description":"VXT account email"},"password":{"type":"string","minLength":1,"title":"Password","description":"VXT account password"}},"type":"object","required":["email","password"],"title":"VXTConnectPasswordRequest","description":"Request to connect VXT with the user's VXT-specific email/password.\n\nVXT email/password is independent of the user's Google password. We\nstore it so we can silently re-authenticate if the refresh token ever\ndies, and so future backend-driven UI automation has creds to use."},"VXTConnectRequest":{"properties":{"refresh_token":{"type":"string","minLength":10,"title":"Refresh Token","description":"Firebase refresh token obtained from app.vxt.co.nz"}},"type":"object","required":["refresh_token"],"title":"VXTConnectRequest","description":"Request to connect the VXT integration.\n\nThe user pastes the refresh token retrieved from VXT's web app\n(see VXT_INTEGRATION_GUIDE.md §Onboarding — Option A)."},"VXTDiagnosticsEntry":{"properties":{"call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Call Id"},"external_call_id":{"type":"string","title":"External Call Id"},"status":{"type":"string","title":"Status"},"direction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direction"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"error_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Description"}},"type":"object","required":["external_call_id","status"],"title":"VXTDiagnosticsEntry","description":"One recently ingested VXT call (developer view)."},"VXTDiagnosticsResponse":{"properties":{"status":{"type":"string","title":"Status"},"vxt_uid":{"type":"string","title":"Vxt Uid"},"vxt_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vxt Email"},"vxt_org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vxt Org Id"},"webhook_token":{"type":"string","title":"Webhook Token","description":"Per-customer bearer token used to authenticate VXT webhooks"},"transcript_source":{"type":"string","title":"Transcript Source","description":"Active transcript source: 'vxt' or 'assemblyai'","default":"vxt"},"has_stored_password":{"type":"boolean","title":"Has Stored Password","description":"Whether VXT email/password creds are stored for auto-recovery","default":false},"id_token_expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id Token Expires At"},"last_error_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error At"},"last_error_msg":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error Msg"},"last_successful_call_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Successful Call At"},"recent_calls":{"items":{"$ref":"#/components/schemas/VXTDiagnosticsEntry"},"type":"array","title":"Recent Calls"}},"type":"object","required":["status","vxt_uid","webhook_token","recent_calls"],"title":"VXTDiagnosticsResponse","description":"Developer-only diagnostics for the VXT integration."},"VXTDisconnectResponse":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"VXTDisconnectResponse"},"VXTReingestRequest":{"properties":{"vxt_call_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vxt Call Id"},"call_log":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Call Log"}},"type":"object","title":"VXTReingestRequest","description":"Manually re-queue a VXT call for ingest (developer only).\n\nEither pass the VXT callLog id directly (looks up its sharing token from\nthe stored Call/raw webhook), OR pass a full callLog JSON payload to\nreplay a historical webhook."},"VXTReingestResponse":{"properties":{"task_id":{"type":"string","title":"Task Id"},"vxt_call_id":{"type":"string","title":"Vxt Call Id"},"message":{"type":"string","title":"Message"}},"type":"object","required":["task_id","vxt_call_id","message"],"title":"VXTReingestResponse"},"VXTRotateWebhookTokenResponse":{"properties":{"webhook_token":{"type":"string","title":"Webhook Token"},"message":{"type":"string","title":"Message"}},"type":"object","required":["webhook_token","message"],"title":"VXTRotateWebhookTokenResponse","description":"Response from rotating the per-customer webhook bearer token."},"VXTSettingsResponse":{"properties":{"transcript_source":{"type":"string","title":"Transcript Source","description":"'vxt' to use VXT's transcript, 'assemblyai' to run our own pipeline"}},"type":"object","required":["transcript_source"],"title":"VXTSettingsResponse","description":"Customer-scoped VXT runtime settings (developer only)."},"VXTSettingsUpdateRequest":{"properties":{"transcript_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transcript Source","description":"'vxt' or 'assemblyai'"}},"type":"object","title":"VXTSettingsUpdateRequest","description":"Update VXT runtime settings (developer only)."},"VXTStatus":{"properties":{"connected":{"type":"boolean","title":"Connected"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","description":"connected | disconnected | error"},"connected_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connected At"},"vxt_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vxt Email","description":"Email of the VXT user whose refresh token is stored"},"last_successful_call_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Successful Call At"},"last_error_msg":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error Msg"},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"Stable webhook URL to paste into VXT Settings → Webhooks (same for all customers)"},"webhook_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Token","description":"Per-customer bearer token. Customer pastes this into VXT as 'Bearer <token>' in the Authorization header of the webhook."}},"type":"object","required":["connected"],"title":"VXTStatus","description":"VXT connection status for the current customer."},"VXTTestResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"vxt_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vxt Email"}},"type":"object","required":["success","message"],"title":"VXTTestResponse","description":"Response from forcing a re-validation of the stored refresh token."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VapiCallLatencyItem":{"properties":{"vapi_call_latency_id":{"type":"string","format":"uuid","title":"Vapi Call Latency Id"},"vapi_call_id":{"type":"string","title":"Vapi Call Id"},"call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Call Id"},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Customer Id"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"ended_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ended Reason"},"squad_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Squad Id"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"ended_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ended At"},"call_duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Call Duration Seconds"},"turn_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Turn Count"},"model_latency_avg_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Model Latency Avg Ms"},"voice_latency_avg_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Voice Latency Avg Ms"},"transcriber_latency_avg_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Transcriber Latency Avg Ms"},"endpointing_latency_avg_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Endpointing Latency Avg Ms"},"turn_latency_avg_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Turn Latency Avg Ms"},"from_transport_latency_avg_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"From Transport Latency Avg Ms"},"to_transport_latency_avg_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"To Transport Latency Avg Ms"},"llm_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Llm Model"},"llm_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Llm Provider"},"voice_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voice Model"},"voice_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voice Provider"},"transcriber_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transcriber Model"},"transcriber_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transcriber Provider"},"cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["vapi_call_latency_id","vapi_call_id","created_at"],"title":"VapiCallLatencyItem","description":"A stored call-level Vapi latency row."},"VapiCallLatencyListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/VapiCallLatencyItem"},"type":"array","title":"Items"}},"type":"object","title":"VapiCallLatencyListResponse","description":"Recent stored Vapi call-level latency rows."},"VapiCallObject":{"properties":{"id":{"type":"string","title":"Id"}},"additionalProperties":true,"type":"object","required":["id"],"title":"VapiCallObject"},"VapiCustomToolRequest":{"properties":{"message":{"$ref":"#/components/schemas/VapiMessage"}},"type":"object","required":["message"],"title":"VapiCustomToolRequest","description":"Wrapper for Vapi custom tool requests."},"VapiCustomToolResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/VapiToolResult"},"type":"array","title":"Results"}},"type":"object","required":["results"],"title":"VapiCustomToolResponse","description":"Standard Vapi custom tool response format."},"VapiLLMLatencyMeasurementSchema":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"Measurement ID"},"vapi_call_id":{"type":"string","title":"Vapi Call Id","description":"Vapi call ID"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"LLM model used (e.g. claude-sonnet-4-6)"},"model_latency_avg_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Model Latency Avg Ms","description":"Average model latency in milliseconds"},"turn_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Turn Count","description":"Number of turns with latency data"},"turn_latencies_ms":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Turn Latencies Ms","description":"Raw turn latencies array"},"call_duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Call Duration Seconds","description":"Call duration in seconds"},"call_ended_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call Ended At","description":"When the call ended (ISO timestamp)"},"created_at":{"type":"string","title":"Created At","description":"Row insertion timestamp"}},"type":"object","required":["id","vapi_call_id","created_at"],"title":"VapiLLMLatencyMeasurementSchema","description":"Single Vapi LLM latency measurement data point"},"VapiLatencyBackfillRequest":{"properties":{"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit","description":"Max number of calls to enqueue (newest first); None = all"},"only_missing":{"type":"boolean","title":"Only Missing","description":"Only enqueue Vapi calls that don't yet have a stored latency row","default":true}},"type":"object","title":"VapiLatencyBackfillRequest","description":"Request to enqueue the Vapi latency backfill."},"VapiLatencyBackfillResponse":{"properties":{"message":{"type":"string","title":"Message","description":"Status message"},"task_id":{"type":"string","title":"Task Id","description":"Celery task ID for the orchestrator"}},"type":"object","required":["message","task_id"],"title":"VapiLatencyBackfillResponse","description":"Response from enqueuing the Vapi latency backfill."},"VapiLatencyCallPoint":{"properties":{"vapi_call_id":{"type":"string","title":"Vapi Call Id"},"ended_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ended At"},"turn_latency_avg_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Turn Latency Avg Ms"},"model_latency_avg_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Model Latency Avg Ms"},"llm_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Llm Model"},"cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost"}},"type":"object","required":["vapi_call_id"],"title":"VapiLatencyCallPoint","description":"Lightweight per-call point for the overview time-series."},"VapiLatencyComponentModelStats":{"properties":{"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"turn_count":{"type":"integer","title":"Turn Count","default":0},"latency_mean":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Latency Mean"},"latency_p50":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Latency P50"},"latency_p90":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Latency P90"},"latency_p95":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Latency P95"},"latency_p99":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Latency P99"}},"type":"object","title":"VapiLatencyComponentModelStats","description":"Aggregated latency stats for a single model on one pipeline component\n(LLM, voice, or transcriber). The latency fields hold that component's\nlatency (e.g. for an LLM row, model latency)."},"VapiLatencyOverallStats":{"properties":{"call_count":{"type":"integer","title":"Call Count","default":0},"turn_count":{"type":"integer","title":"Turn Count","default":0},"turn_latency_mean":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Turn Latency Mean"},"turn_latency_p50":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Turn Latency P50"},"turn_latency_p90":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Turn Latency P90"},"model_latency_mean":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Model Latency Mean"},"voice_latency_mean":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Voice Latency Mean"},"transcriber_latency_mean":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Transcriber Latency Mean"},"endpointing_latency_mean":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Endpointing Latency Mean"},"avg_cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Cost"},"total_cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Cost"}},"type":"object","title":"VapiLatencyOverallStats","description":"Aggregate latency stats across the whole window."},"VapiLatencyStatsResponse":{"properties":{"time_range":{"type":"string","title":"Time Range"},"overall":{"$ref":"#/components/schemas/VapiLatencyOverallStats"},"llm_models":{"items":{"$ref":"#/components/schemas/VapiLatencyComponentModelStats"},"type":"array","title":"Llm Models"},"voice_models":{"items":{"$ref":"#/components/schemas/VapiLatencyComponentModelStats"},"type":"array","title":"Voice Models"},"transcriber_models":{"items":{"$ref":"#/components/schemas/VapiLatencyComponentModelStats"},"type":"array","title":"Transcriber Models"},"calls":{"items":{"$ref":"#/components/schemas/VapiLatencyCallPoint"},"type":"array","title":"Calls"}},"type":"object","required":["time_range","overall"],"title":"VapiLatencyStatsResponse","description":"Dashboard stats for the Vapi latency developer page."},"VapiMessage":{"properties":{"type":{"type":"string","title":"Type"},"toolCallList":{"items":{"$ref":"#/components/schemas/VapiToolCall"},"type":"array","title":"Toolcalllist"},"call":{"anyOf":[{"$ref":"#/components/schemas/VapiCallObject"},{"type":"null"}]}},"additionalProperties":true,"type":"object","required":["type","toolCallList"],"title":"VapiMessage"},"VapiToolCall":{"properties":{"id":{"type":"string","title":"Id"},"type":{"type":"string","title":"Type","default":"function"},"function":{"$ref":"#/components/schemas/VapiToolCallFunction"}},"additionalProperties":true,"type":"object","required":["id","function"],"title":"VapiToolCall","description":"Matches the Vapi ToolCall type: id, type, function: {name, arguments}."},"VapiToolCallFunction":{"properties":{"name":{"type":"string","title":"Name"},"arguments":{"additionalProperties":true,"type":"object","title":"Arguments"}},"type":"object","required":["name","arguments"],"title":"VapiToolCallFunction"},"VapiToolResult":{"properties":{"toolCallId":{"type":"string","title":"Toolcallid"},"result":{"type":"string","title":"Result"}},"type":"object","required":["toolCallId","result"],"title":"VapiToolResult"},"VapiTransferDestinationMessage":{"properties":{"type":{"type":"string","title":"Type","default":""},"call":{"anyOf":[{"$ref":"#/components/schemas/VapiCallObject"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"VapiTransferDestinationMessage"},"VapiTransferDestinationRequest":{"properties":{"message":{"$ref":"#/components/schemas/VapiTransferDestinationMessage"}},"additionalProperties":true,"type":"object","required":["message"],"title":"VapiTransferDestinationRequest"},"VapiTurnLatencyItem":{"properties":{"vapi_turn_latency_id":{"type":"string","format":"uuid","title":"Vapi Turn Latency Id"},"turn_index":{"type":"integer","title":"Turn Index"},"model_latency_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Model Latency Ms"},"voice_latency_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Voice Latency Ms"},"transcriber_latency_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Transcriber Latency Ms"},"endpointing_latency_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Endpointing Latency Ms"},"turn_latency_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Turn Latency Ms"},"llm_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Llm Model"},"llm_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Llm Provider"},"voice_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voice Model"},"voice_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voice Provider"},"transcriber_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transcriber Model"},"transcriber_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transcriber Provider"},"active_assistant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Active Assistant Id"},"active_assistant_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Active Assistant Name"}},"type":"object","required":["vapi_turn_latency_id","turn_index"],"title":"VapiTurnLatencyItem","description":"A stored per-turn Vapi latency row."},"VapiTurnLatencyListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/VapiTurnLatencyItem"},"type":"array","title":"Items"}},"type":"object","title":"VapiTurnLatencyListResponse","description":"Per-turn latency rows for a single Vapi call (drill-down)."},"VoicemailModeStatusResponse":{"properties":{"customer_id":{"type":"string","format":"uuid","title":"Customer Id","description":"The customer ID"},"voicemail_mode":{"type":"boolean","title":"Voicemail Mode","description":"Whether voicemail mode is currently enabled"}},"type":"object","required":["customer_id","voicemail_mode"],"title":"VoicemailModeStatusResponse","description":"Response with customer's voicemail mode status"},"VxtMatchedReconciliationItem":{"properties":{"reconciliation_id":{"type":"string","format":"uuid","title":"Reconciliation Id"},"call_id":{"type":"string","format":"uuid","title":"Call Id"},"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"caller_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caller Number"},"our_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Our Number"},"transfer_destination_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transfer Destination Number"},"call_end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Call End Time"},"vxt_call_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vxt Call Id"},"vxt_started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Vxt Started At"},"vxt_hangup_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Vxt Hangup At"},"has_vxt_recording":{"type":"boolean","title":"Has Vxt Recording"},"poll_attempts":{"type":"integer","title":"Poll Attempts"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["reconciliation_id","call_id","customer_id","has_vxt_recording","poll_attempts","updated_at"],"title":"VxtMatchedReconciliationItem","description":"A successfully matched + stitched Vapi-transferred call."},"VxtMatchedReconciliationsResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/VxtMatchedReconciliationItem"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"VxtMatchedReconciliationsResponse"},"VxtOrphanWebhooksResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/VxtWebhookEventItem"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"VxtOrphanWebhooksResponse"},"VxtReconciliationActionResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","message"],"title":"VxtReconciliationActionResponse","description":"Generic ack for mutating endpoints (rerun, force-match)."},"VxtReconciliationIssueItem":{"properties":{"reconciliation_id":{"type":"string","format":"uuid","title":"Reconciliation Id"},"call_id":{"type":"string","format":"uuid","title":"Call Id"},"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"status":{"type":"string","title":"Status"},"caller_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caller Number"},"our_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Our Number"},"transfer_destination_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transfer Destination Number"},"call_end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Call End Time"},"poll_attempts":{"type":"integer","title":"Poll Attempts"},"last_polled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Polled At"},"vxt_call_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vxt Call Id"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["reconciliation_id","call_id","customer_id","status","poll_attempts","created_at","updated_at"],"title":"VxtReconciliationIssueItem","description":"A Vapi-transferred call whose VXT leg reconciliation is non-terminal\nor needs attention (pending, timeout, multi_match, error)."},"VxtReconciliationIssuesResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/VxtReconciliationIssueItem"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"VxtReconciliationIssuesResponse"},"VxtWebhookEventItem":{"properties":{"event_id":{"type":"string","format":"uuid","title":"Event Id"},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Customer Id"},"received_at":{"type":"string","format":"date-time","title":"Received At"},"event_type":{"type":"string","title":"Event Type"},"direction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direction"},"vxt_call_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vxt Call Id"},"caller_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caller Number"},"our_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Our Number"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"hangup_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Hangup At"},"processing_status":{"type":"string","title":"Processing Status"},"matched_call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Matched Call Id"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"}},"type":"object","required":["event_id","received_at","event_type","processing_status"],"title":"VxtWebhookEventItem","description":"A raw VXT webhook row — shown in the developer panel when orphaned\n(no matching Vapi transfer within the window) or multi-matched."},"WidgetConfigResponse":{"properties":{"chat_widget_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Chat Widget Id"},"firm_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Firm Id"},"accent_color":{"type":"string","title":"Accent Color"},"secondary_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secondary Color"},"position":{"type":"string","title":"Position"},"greeting_message":{"type":"string","title":"Greeting Message"},"assistant_name":{"type":"string","title":"Assistant Name"},"enabled":{"type":"boolean","title":"Enabled","default":true},"teaser_enabled":{"type":"boolean","title":"Teaser Enabled","default":true},"teaser_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Teaser Message"},"teaser_delay_seconds":{"type":"integer","title":"Teaser Delay Seconds","default":5},"show_online_status":{"type":"boolean","title":"Show Online Status","default":true},"show_unread_badge":{"type":"boolean","title":"Show Unread Badge","default":true},"tab_notification_enabled":{"type":"boolean","title":"Tab Notification Enabled","default":false},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"avatar_video_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Video Url"},"avatar_video_in_header":{"type":"boolean","title":"Avatar Video In Header","default":true},"launcher_avatar_enabled":{"type":"boolean","title":"Launcher Avatar Enabled","default":false},"intro_video_enabled":{"type":"boolean","title":"Intro Video Enabled","default":false},"intro_video_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intro Video Url"},"intro_video_autoplay_on_load":{"type":"boolean","title":"Intro Video Autoplay On Load","default":true},"attention_grabber_enabled":{"type":"boolean","title":"Attention Grabber Enabled","default":false},"attention_grabber_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Attention Grabber Message"},"attention_grabber_delay_seconds":{"type":"integer","title":"Attention Grabber Delay Seconds","default":8},"idle_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idle Message"},"idle_delay_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Idle Delay Seconds"},"quick_exit_enabled":{"type":"boolean","title":"Quick Exit Enabled","default":false},"mobile_bottom_offset_px":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mobile Bottom Offset Px"},"default_language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Language"}},"type":"object","required":["accent_color","position","greeting_message","assistant_name"],"title":"WidgetConfigResponse"},"ZapierAuthorizeRequest":{"properties":{"client_id":{"type":"string","title":"Client Id","description":"OAuth client_id supplied by Zapier"},"redirect_uri":{"type":"string","title":"Redirect Uri","description":"Zapier callback the code is delivered to"},"response_type":{"type":"string","title":"Response Type","description":"Must be 'code'","default":"code"},"scope":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope","description":"Requested scope (optional)"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State","description":"Opaque CSRF value echoed back to Zapier"}},"type":"object","required":["client_id","redirect_uri"],"title":"ZapierAuthorizeRequest","description":"Body the SPA posts (same-site, cookie-authenticated) to mint an\nauthorization code on behalf of the logged-in firm admin. The values\noriginate from the query string Zapier sent to the frontend authorize\npage."},"ZapierAuthorizeResponse":{"properties":{"redirect_to":{"type":"string","title":"Redirect To","description":"Zapier redirect_uri with ?code=...&state=... appended"}},"type":"object","required":["redirect_to"],"title":"ZapierAuthorizeResponse","description":"The fully-built redirect URL the SPA should send the browser to, with\nthe freshly minted code (and echoed state) appended."},"ZapierConfigResponse":{"properties":{"zapier_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zapier Prompt","description":"Optional firm-specific guidance appended to the base mapping prompt"},"dry_run":{"type":"boolean","title":"Dry Run","description":"When true, generate + log the payload but do not transmit","default":true}},"type":"object","title":"ZapierConfigResponse","description":"Developer-configured Zapier output settings.\n\nThe output field set is a hardcoded model (ZapierLeadOutput); this config\nonly carries the optional supplemental guidance prompt and the dry-run flag."},"ZapierDisconnectResponse":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"ZapierDisconnectResponse"},"ZapierMeResponse":{"properties":{"customer_id":{"type":"string","title":"Customer Id"},"firm_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Firm Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"}},"type":"object","required":["customer_id"],"title":"ZapierMeResponse","description":"Account identity returned to Zapier's 'Test Authentication' step so it\ncan label the connection."},"ZapierPreviewResponse":{"properties":{"call_id":{"type":"string","title":"Call Id"},"lead_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lead Id"},"generated":{"type":"boolean","title":"Generated","description":"Whether a payload was generated"},"payload":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload","description":"The structured output that would be sent"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail","description":"Why generation was skipped, if applicable"}},"type":"object","required":["call_id","generated"],"title":"ZapierPreviewResponse","description":"Result of generating the Zapier payload for a specific call without\nsending it — drives the developer preview panel."},"ZapierTokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"Bearer"},"expires_in":{"type":"integer","title":"Expires In"},"refresh_token":{"type":"string","title":"Refresh Token"},"scope":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope"}},"type":"object","required":["access_token","expires_in","refresh_token"],"title":"ZapierTokenResponse","description":"Standard OAuth2 token response returned to Zapier's backend."},"ZohoAuthorizationUrl":{"properties":{"authorization_url":{"type":"string","title":"Authorization Url"}},"type":"object","required":["authorization_url"],"title":"ZohoAuthorizationUrl","description":"OAuth authorization URL response"},"ZohoFieldItem":{"properties":{"id":{"type":"string","title":"Id","description":"Field ID"},"api_name":{"type":"string","title":"Api Name","description":"API name"},"field_label":{"type":"string","title":"Field Label","description":"Display label"},"data_type":{"type":"string","title":"Data Type","description":"Data type"},"required":{"type":"boolean","title":"Required","description":"Whether field is required","default":false},"read_only":{"type":"boolean","title":"Read Only","description":"Whether field is read-only","default":false},"custom_field":{"type":"boolean","title":"Custom Field","description":"Whether field is custom","default":false},"pick_list_values":{"items":{"$ref":"#/components/schemas/ZohoFieldPickListValue"},"type":"array","title":"Pick List Values","description":"Picklist options"},"length":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Length","description":"Max length for text fields"}},"type":"object","required":["id","api_name","field_label","data_type"],"title":"ZohoFieldItem","description":"Zoho CRM field metadata"},"ZohoFieldPickListValue":{"properties":{"display_value":{"type":"string","title":"Display Value","description":"Display value"},"actual_value":{"type":"string","title":"Actual Value","description":"Actual value sent to API"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"Zoho field ID"},"sequence_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sequence Number","description":"Sort order"}},"type":"object","required":["display_value","actual_value"],"title":"ZohoFieldPickListValue","description":"Zoho CRM field picklist value"},"ZohoFieldsResponse":{"properties":{"connected":{"type":"boolean","title":"Connected","description":"Whether Zoho is connected"},"fields":{"items":{"$ref":"#/components/schemas/ZohoFieldItem"},"type":"array","title":"Fields","description":"List of fields"}},"type":"object","required":["connected"],"title":"ZohoFieldsResponse","description":"Response with Zoho CRM fields metadata"},"ZohoLeadFieldResponse":{"properties":{"zoho_lead_field_id":{"type":"string","format":"uuid","title":"Zoho Lead Field Id"},"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"field_api_name":{"type":"string","title":"Field Api Name"},"field_label":{"type":"string","title":"Field Label"},"field_data_type":{"type":"string","title":"Field Data Type"},"value_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value Text"},"value_picklist":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value Picklist"},"value_picklist_options":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Value Picklist Options"},"value_boolean":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Value Boolean"},"value_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Value Date"},"value_datetime":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Value Datetime"},"value_integer":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Value Integer"},"value_decimal":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value Decimal"},"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":["zoho_lead_field_id","customer_id","field_api_name","field_label","field_data_type","created_at"],"title":"ZohoLeadFieldResponse","description":"Response model for Zoho Lead Field configuration"},"ZohoLeadListItem":{"properties":{"zoho_lead_id":{"type":"string","format":"uuid","title":"Zoho Lead Id","description":"Internal Zoho lead record ID"},"zoho_id":{"type":"string","title":"Zoho Id","description":"Zoho CRM lead ID"},"lead_id":{"type":"string","format":"uuid","title":"Lead Id","description":"Internal lead ID"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name","description":"Lead first name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name","description":"Lead last name"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number","description":"Lead phone number"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"Lead email"},"created_at":{"type":"string","title":"Created At","description":"When the Zoho lead was created"}},"type":"object","required":["zoho_lead_id","zoho_id","lead_id","created_at"],"title":"ZohoLeadListItem","description":"A Zoho lead with associated internal lead details"},"ZohoLeadListResponse":{"properties":{"leads":{"items":{"$ref":"#/components/schemas/ZohoLeadListItem"},"type":"array","title":"Leads","description":"List of Zoho leads"},"total":{"type":"integer","title":"Total","description":"Total number of Zoho leads"}},"type":"object","required":["total"],"title":"ZohoLeadListResponse","description":"Response with list of Zoho leads"},"ZohoSettingsResponse":{"properties":{"zoho_leads_disabled":{"type":"boolean","title":"Zoho Leads Disabled","description":"Whether automatic Zoho lead creation is disabled in the pipeline"}},"type":"object","required":["zoho_leads_disabled"],"title":"ZohoSettingsResponse","description":"Zoho settings response model"},"ZohoStatus":{"properties":{"connected":{"type":"boolean","title":"Connected"},"connected_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connected At"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"}},"type":"object","required":["connected"],"title":"ZohoStatus","description":"Zoho Calendar connection status"},"app__auth__schemas__MessageResponse":{"properties":{"message":{"type":"string","title":"Message","description":"Message"}},"type":"object","required":["message"],"title":"MessageResponse","description":"Generic message response"},"app__calendar__schemas__GoogleCalendarItem":{"properties":{"google_calendar_id":{"type":"string","format":"uuid","title":"Google Calendar Id"},"google_calendar_unique_name":{"type":"string","title":"Google Calendar Unique Name"},"calendar_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Calendar Id"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"time_zone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Time Zone"},"primary_calendar":{"type":"boolean","title":"Primary Calendar"},"access_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Role"}},"type":"object","required":["google_calendar_id","google_calendar_unique_name","calendar_id","summary","description","time_zone","primary_calendar","access_role"],"title":"GoogleCalendarItem","description":"Response model for a Google Calendar"},"app__calendar__schemas__MeetingListResponse":{"properties":{"meetings":{"items":{"$ref":"#/components/schemas/MeetingResponse"},"type":"array","title":"Meetings"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"},"total_pages":{"type":"integer","title":"Total Pages"}},"type":"object","required":["meetings","total","page","page_size","total_pages"],"title":"MeetingListResponse","description":"Response model for paginated list of meetings"},"app__calls__pipeline__schemas__ZapierStatusResponse":{"properties":{"visible":{"type":"boolean","title":"Visible","description":"Whether to render the card at all"},"is_test_call":{"type":"boolean","title":"Is Test Call","default":false},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","description":"generated | skipped | failed"},"skip_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Skip Reason"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"payload":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload","description":"The generated field set"},"should_poll":{"type":"boolean","title":"Should Poll","description":"True while a result may still be materializing","default":false},"email_pending":{"type":"boolean","title":"Email Pending","description":"True when the lead has no email yet — email is collected via SMS and may arrive after the pipeline ran. Signals that the Zapier lead will be updated once the email is added.","default":false}},"type":"object","required":["visible"],"title":"ZapierStatusResponse","description":"Display-ready Zapier status for the customer-facing call detail card.\n\n``status`` is one of ``generated`` / ``skipped`` / ``failed`` (mirrors the\nZapierCallResult record). ``payload`` holds the generated fields — populated\neven for skipped test calls so the card can show what would have been sent."},"app__chat__schemas__MessageResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"role":{"type":"string","title":"Role"},"content":{"type":"string","title":"Content"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","role","content","created_at"],"title":"MessageResponse"},"app__developer__schemas__GoogleCalendarItem":{"properties":{"id":{"type":"string","title":"Id","description":"Calendar ID"},"summary":{"type":"string","title":"Summary","description":"Calendar title/summary"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Calendar description"},"time_zone":{"type":"string","title":"Time Zone","description":"Calendar timezone"},"access_role":{"type":"string","title":"Access Role","description":"User's access role"},"primary":{"type":"boolean","title":"Primary","description":"Whether this is the user's primary calendar","default":false}},"type":"object","required":["id","summary","time_zone","access_role"],"title":"GoogleCalendarItem","description":"Google Calendar item"},"app__developer__schemas__MeetingListResponse":{"properties":{"meetings":{"items":{"$ref":"#/components/schemas/MeetingListItem"},"type":"array","title":"Meetings","description":"List of recent meetings"}},"type":"object","title":"MeetingListResponse","description":"Response with list of recent meetings"},"app__developer__schemas__Microsoft365User":{"properties":{"id":{"type":"string","title":"Id","description":"User ID"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name","description":"User's display name"},"user_principal_name":{"type":"string","title":"User Principal Name","description":"User's principal name (email)"},"mail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mail","description":"User's email address"},"job_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Title","description":"User's job title"}},"type":"object","required":["id","user_principal_name"],"title":"Microsoft365User","description":"Microsoft 365 user from Graph API"},"app__developer__schemas__Microsoft365UsersResponse":{"properties":{"connected":{"type":"boolean","title":"Connected","description":"Whether Microsoft 365 is connected"},"users":{"items":{"$ref":"#/components/schemas/app__developer__schemas__Microsoft365User"},"type":"array","title":"Users","description":"List of users"}},"type":"object","required":["connected"],"title":"Microsoft365UsersResponse","description":"Response with list of Microsoft 365 users"},"app__integrations__schemas__Microsoft365User":{"properties":{"id":{"type":"string","title":"Id"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"user_principal_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Principal Name"},"mail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mail"},"job_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Title"}},"type":"object","required":["id"],"title":"Microsoft365User","description":"Microsoft 365 user"},"app__integrations__schemas__Microsoft365UsersResponse":{"properties":{"connected":{"type":"boolean","title":"Connected"},"users":{"items":{"$ref":"#/components/schemas/app__integrations__schemas__Microsoft365User"},"type":"array","title":"Users","default":[]}},"type":"object","required":["connected"],"title":"Microsoft365UsersResponse","description":"Response containing list of Microsoft 365 users"},"app__integrations__zapier_schemas__ZapierStatusResponse":{"properties":{"connected":{"type":"boolean","title":"Connected"},"connected_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connected At"}},"type":"object","required":["connected"],"title":"ZapierStatusResponse","description":"Drives the Zapier tile's connected badge."}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}