{"components":{"parameters":{},"schemas":{"AccountServiceUnavailable":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"},"AddWatchedAgentRequest":{"properties":{"agentId":{"description":"Agent id to watch.","minLength":1,"type":"string"}},"required":["agentId"],"type":"object"},"AddWatchedAreaRequest":{"properties":{"lat":{"description":"Center latitude (point + radius).","maximum":90,"minimum":-90,"type":"number"},"lon":{"description":"Center longitude.","maximum":180,"minimum":-180,"type":"number"},"maxLat":{"description":"Box north edge.","maximum":90,"minimum":-90,"type":"number"},"maxLon":{"description":"Box east edge.","maximum":180,"minimum":-180,"type":"number"},"minLat":{"description":"Box south edge.","maximum":90,"minimum":-90,"type":"number"},"minLon":{"description":"Box west edge.","maximum":180,"minimum":-180,"type":"number"},"radius":{"description":"Radius around the center point.","example":10,"exclusiveMinimum":true,"minimum":0,"type":"number"},"state":{"description":"2-letter state. Ignored for zip + geo areas.","example":"CA","type":"string"},"type":{"description":"Named area (city/county/zip) or geo area (bbox = bounding box, radius = point + radius).","enum":["city","county","zip","bbox","radius"],"type":"string"},"unit":{"description":"Radius unit (default mi).","enum":["mi","km","m"],"example":"mi","type":"string"},"value":{"description":"City / county name, or 5-digit zip. Required for named areas.","example":"Los Angeles","type":"string"}},"required":["type"],"type":"object"},"AddWatchedDocumentRequest":{"properties":{"documentId":{"description":"The document id (mm_property_id / mm_loan_id / mm_sale_id).","minLength":1,"type":"string"},"documentType":{"description":"The kind of document to watch.","enum":["sale","property","loan"],"example":"property","type":"string"},"rules":{"description":"One or more rules; each fires as one alert.","items":{"properties":{"match":{"description":"How predicates combine: all (AND, default) or any (OR).","enum":["all","any"],"example":"all","type":"string"},"predicates":{"description":"One or more conditions; combined per match.","items":{"properties":{"field":{"description":"Catalog field alias (e.g. avm, current_ltv, loan_type).","example":"current_ltv","type":"string"},"op":{"description":"Comparison / change / status / guard operator.","enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"example":"lte","type":"string"},"stringValue":{"description":"Target keyword for changed_to / eq / not_eq guard.","type":"string"},"stringValues":{"description":"Keyword set for the in guard (1–20).","items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"description":"Threshold, or change amount (percent for pct_change_gte).","example":0.8,"type":"number"},"value2":{"description":"Upper bound for between.","type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"minItems":1,"type":"array"}},"required":["documentType","documentId","rules"],"type":"object"},"AdminAlertConditionsResponse":{"properties":{"data":{"properties":{"conditions":{"$ref":"#/components/schemas/AlertConditions"},"email":{"type":"string"},"emailEnabled":{"deprecated":true,"description":"Deprecated and ignored: accepted for compatibility, but not stored and no longer controls delivery (the response always reports every flag off). Email and in-app channel preferences for alerts live in Notifications settings.","properties":{"agent_sale_closed":{"type":"boolean"},"area_new_listing":{"type":"boolean"},"borrower_listed":{"type":"boolean"},"epo_risk":{"type":"boolean"},"rate_term_refi_area":{"type":"boolean"},"watched_agent_pending":{"type":"boolean"},"watched_loan":{"type":"boolean"},"watched_property":{"type":"boolean"},"watched_sale":{"type":"boolean"}},"required":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan"],"type":"object"},"enabled":{"$ref":"#/components/schemas/AlertEnabled"},"name":{"type":"string"},"nmlsId":{"type":"string"},"orgId":{"type":"string"},"updatedAt":{"type":"string"},"userId":{"type":"string"}},"required":["userId","orgId","nmlsId","email","name","enabled","emailEnabled","conditions","updatedAt"],"type":"object"}},"required":["data"],"type":"object"},"AdminAlertDigestItem":{"allOf":[{"$ref":"#/components/schemas/AlertDigestItem"},{"properties":{"correlationId":{"description":"The detector run that produced this digest (trace to /runs).","type":"string"},"userId":{"type":"string"}},"required":["userId"],"type":"object"}]},"AdminAlertDigestResponse":{"properties":{"cursor":{"type":"string"},"items":{"items":{"$ref":"#/components/schemas/AdminAlertDigestItem"},"type":"array"}},"required":["items"],"type":"object"},"AdminAlertEmailTemplatePreviewRequest":{"properties":{"kinds":{"description":"The alert kinds to sample (and validate item tokens against). Default: the recipe's kinds, else every kind.","items":{"enum":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan","book_property","book_loan","area_property"],"type":"string"},"type":"array"},"recipeId":{"description":"Preview under this recipe (its copy, family and kinds). Omitted: a neutral stand-in recipe.","type":"string"},"template":{"$ref":"#/components/schemas/AlertRecipeEmailTemplate"},"userId":{"description":"Sample from this user's recent alerts (and greet them by name); a `u-` recipeId is looked up among this user's recipes. Omitted: static samples.","minLength":1,"type":"string"}},"required":["template"],"type":"object"},"AdminAlertLogItem":{"allOf":[{"$ref":"#/components/schemas/AlertLogItem"},{"properties":{"correlationId":{"description":"The detector run that produced this alert (trace to /runs).","type":"string"},"userId":{"type":"string"},"via":{"$ref":"#/components/schemas/AdminAlertVia"}},"required":["userId"],"type":"object"}]},"AdminAlertLogResponse":{"properties":{"cursor":{"type":"string"},"items":{"items":{"$ref":"#/components/schemas/AdminAlertLogItem"},"type":"array"}},"required":["items"],"type":"object"},"AdminAlertRawResponse":{"properties":{"data":{"additionalProperties":{"nullable":true},"type":"object"}},"required":["data"],"type":"object"},"AdminAlertRecipe":{"properties":{"category":{"maxLength":32,"minLength":1,"type":"string"},"copy":{"properties":{"headline":{"maxLength":200,"minLength":1,"type":"string"},"intro":{"maxLength":1000,"type":"string"},"plural":{"maxLength":40,"minLength":1,"type":"string"},"subject":{"maxLength":200,"minLength":1,"type":"string"}},"required":["subject","headline","intro","plural"],"type":"object"},"createdAt":{"type":"string"},"createdBy":{"type":"string"},"description":{"maxLength":500,"type":"string"},"email":{"$ref":"#/components/schemas/AlertRecipeEmailTemplate"},"family":{"enum":["past-clients","agent-partners","farm-area","watch-record"],"type":"string"},"featured":{"type":"boolean"},"grants":{"properties":{"agent":{"items":{"enum":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan","book_property","book_loan","area_property"],"type":"string"},"type":"array"},"area":{"items":{"enum":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan","book_property","book_loan","area_property"],"type":"string"},"type":"array"},"areaRules":{"properties":{"property":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"}},"type":"object"},"book":{"properties":{"loan":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"},"property":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"}},"type":"object"},"document":{"properties":{"loan":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"},"property":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"},"sale":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"}},"type":"object"},"nmls":{"items":{"enum":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan","book_property","book_loan","area_property"],"type":"string"},"type":"array"}},"type":"object"},"howItWorks":{"maxLength":2000,"type":"string"},"icon":{"type":"string"},"id":{"type":"string"},"inputs":{"items":{"properties":{"documentType":{"enum":["sale","property","loan"],"type":"string"},"help":{"maxLength":400,"type":"string"},"label":{"maxLength":80,"type":"string"},"max":{"minimum":1,"type":"integer"},"min":{"minimum":0,"type":"integer"},"required":{"type":"boolean"},"type":{"enum":["nmls","agent","area","document"],"type":"string"}},"required":["type","required"],"type":"object"},"maxItems":4,"type":"array"},"maxItemsPerRun":{"maximum":100,"minimum":1,"type":"integer"},"sortOrder":{"maximum":999999,"minimum":0,"type":"integer"},"status":{"enum":["draft","published","archived"],"type":"string"},"subscribers":{"description":"List only: users with a subscription carrying this recipe (kinds on).","type":"integer"},"title":{"maxLength":80,"minLength":1,"type":"string"},"updatedAt":{"type":"string"},"updatedBy":{"type":"string"},"version":{"minimum":1,"type":"integer"}},"required":["id","title","description","icon","category","family","grants","inputs","copy","featured","sortOrder","status","version","createdBy","createdAt","updatedBy","updatedAt"],"type":"object"},"AdminAlertRecipeResponse":{"properties":{"data":{"$ref":"#/components/schemas/AdminAlertRecipe"}},"required":["data"],"type":"object"},"AdminAlertRecipeStatsResponse":{"properties":{"data":{"properties":{"alertsLast30d":{"description":"Alerts fired in the last 30 days whose grant came from this recipe (LOG `via.recipeIds`), across its subscribers.","type":"integer"},"lastFiredAt":{"description":"Newest such alert (ISO) in the last 30 days.","type":"string"},"subscribers":{"description":"Users with a subscription carrying the recipe (kinds on).","type":"integer"}},"required":["subscribers","alertsLast30d"],"type":"object"}},"required":["data"],"type":"object"},"AdminAlertRecipesResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AdminAlertRecipe"},"type":"array"}},"required":["data"],"type":"object"},"AdminAlertRunRecord":{"properties":{"correlationId":{"type":"string"},"dryRun":{"type":"boolean"},"durationMs":{"type":"integer"},"finishedAt":{"type":"string"},"id":{"type":"string"},"perDetector":{"items":{"properties":{"deduped":{"type":"integer"},"matched":{"type":"integer"},"published":{"type":"integer"},"scanned":{"type":"integer"},"type":{"enum":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan","book_property","book_loan","area_property"],"type":"string"},"written":{"type":"integer"}},"required":["type","scanned","matched","deduped","written","published"],"type":"object"},"type":"array"},"startedAt":{"type":"string"},"totals":{"properties":{"matched":{"type":"integer"},"published":{"type":"integer"},"scanned":{"type":"integer"},"written":{"type":"integer"}},"required":["scanned","matched","written","published"],"type":"object"}},"required":["id","correlationId","startedAt","finishedAt","durationMs","dryRun","perDetector","totals"],"type":"object"},"AdminAlertRunResponse":{"properties":{"data":{"$ref":"#/components/schemas/AdminAlertRunRecord"}},"required":["data"],"type":"object"},"AdminAlertRunsResponse":{"properties":{"cursor":{"type":"string"},"items":{"items":{"$ref":"#/components/schemas/AdminAlertRunRecord"},"type":"array"}},"required":["items"],"type":"object"},"AdminAlertUserRecipe":{"properties":{"alertsLast30d":{"description":"Alerts its grant fired for the owner in the last 30 days (LOG `via.recipeIds`).","type":"integer"},"category":{"type":"string"},"copy":{"properties":{"headline":{"maxLength":200,"minLength":1,"type":"string"},"intro":{"maxLength":1000,"type":"string"},"plural":{"maxLength":40,"minLength":1,"type":"string"},"subject":{"maxLength":200,"minLength":1,"type":"string"}},"required":["subject","headline","intro","plural"],"type":"object"},"createdAt":{"type":"string"},"createdBy":{"type":"string"},"description":{"type":"string"},"email":{"$ref":"#/components/schemas/AlertRecipeEmailTemplate"},"family":{"enum":["past-clients","agent-partners","farm-area","watch-record"],"type":"string"},"grants":{"properties":{"agent":{"items":{"enum":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan","book_property","book_loan","area_property"],"type":"string"},"type":"array"},"area":{"items":{"enum":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan","book_property","book_loan","area_property"],"type":"string"},"type":"array"},"areaRules":{"properties":{"property":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"}},"type":"object"},"book":{"properties":{"loan":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"},"property":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"}},"type":"object"},"document":{"properties":{"loan":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"},"property":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"},"sale":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"}},"type":"object"},"nmls":{"items":{"enum":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan","book_property","book_loan","area_property"],"type":"string"},"type":"array"}},"type":"object"},"icon":{"type":"string"},"id":{"type":"string"},"inputs":{"items":{"properties":{"documentType":{"enum":["sale","property","loan"],"type":"string"},"help":{"maxLength":400,"type":"string"},"label":{"maxLength":80,"type":"string"},"max":{"minimum":1,"type":"integer"},"min":{"minimum":0,"type":"integer"},"required":{"type":"boolean"},"type":{"enum":["nmls","agent","area","document"],"type":"string"}},"required":["type","required"],"type":"object"},"type":"array"},"maxItemsPerRun":{"type":"integer"},"ownerUserId":{"type":"string"},"promotedTo":{"type":"string"},"scope":{"enum":["user"],"type":"string"},"status":{"enum":["active","archived"],"type":"string"},"subscribers":{"description":"1 when the owner is subscribed to it, else 0.","type":"integer"},"title":{"type":"string"},"updatedAt":{"type":"string"},"updatedBy":{"type":"string"},"version":{"minimum":1,"type":"integer"}},"required":["id","ownerUserId","scope","title","description","icon","category","family","grants","inputs","copy","maxItemsPerRun","status","version","createdBy","createdAt","updatedBy","updatedAt","subscribers","alertsLast30d"],"type":"object"},"AdminAlertUserRecipesResponse":{"properties":{"cursor":{"type":"string"},"items":{"items":{"$ref":"#/components/schemas/AdminAlertUserRecipe"},"type":"array"}},"required":["items"],"type":"object"},"AdminAlertVia":{"description":"Why the alert fired: the matched subject, the granting recipes and the match source. Absent on rows written before it existed.","properties":{"matchSource":{"description":"Which match source routed the alert: `subscriptions` for every alert fired since the legacy source was retired; `legacy` only on older rows.","enum":["legacy","subscriptions"],"type":"string"},"parentKey":{"description":"When the match went through a derived child (an auto agent, a borrower property, a manual agent's VRE), the owning subscription's subject key.","type":"string"},"recipeIds":{"description":"The recipes whose grants enabled this alert type on the matched subscription (empty on alerts fired by the retired legacy match source).","items":{"type":"string"},"type":"array"},"subjectKey":{"description":"The watched subject key the alert matched.","type":"string"}},"required":["subjectKey","recipeIds","matchSource"],"type":"object"},"AdminApprovedContact":{"properties":{"approvedAt":{"format":"date-time","type":"string"},"approvedBy":{"properties":{"email":{"nullable":true,"type":"string"},"userId":{"type":"string"}},"required":["userId","email"],"type":"object"},"entityId":{"type":"string"},"entityType":{"description":"`lo` (entity id = NMLS id) or `agent` (canonical agent id).","enum":["lo","agent"],"type":"string"},"id":{"type":"string"},"itemIndex":{"nullable":true,"type":"integer"},"kind":{"type":"string"},"label":{"nullable":true,"type":"string"},"platform":{"nullable":true,"type":"string"},"revokeReason":{"nullable":true,"type":"string"},"revokedAt":{"format":"date-time","nullable":true,"type":"string"},"revokedBy":{"nullable":true,"properties":{"userId":{"type":"string"}},"required":["userId"],"type":"object"},"source":{"type":"string"},"submissionId":{"nullable":true,"type":"string"},"value":{"type":"string"}},"required":["id","entityType","entityId","kind","value","label","platform","source","submissionId","itemIndex","approvedBy","approvedAt","revokedAt","revokedBy","revokeReason"],"type":"object"},"AdminApprovedContactList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AdminApprovedContact"},"type":"array"}},"required":["items"],"type":"object"},"AdminApprovedContactRevokeRequest":{"additionalProperties":false,"properties":{"reason":{"maxLength":500,"type":"string"}},"type":"object"},"AdminBulkJob":{"properties":{"bytes":{"type":"number"},"chargedCount":{"type":"number"},"completedAt":{"type":"string"},"creditLedgerId":{"nullable":true,"type":"string"},"creditsCharged":{"type":"number"},"entityType":{"type":"string"},"error":{"type":"string"},"failed":{"type":"number"},"format":{"type":"string"},"fromCache":{"type":"number"},"jobId":{"type":"string"},"jobType":{"enum":["enrichment","bulk-delivery","crm-production-enrich","crm-import"],"type":"string"},"orgId":{"type":"string"},"processed":{"type":"number"},"startedAt":{"type":"string"},"status":{"enum":["queued","running","completed","failed","cancelled"],"type":"string"},"succeeded":{"type":"number"},"total":{"type":"number"},"userId":{"type":"string"}},"required":["jobId","orgId","userId","jobType","status","total","succeeded","failed","fromCache","chargedCount","creditsCharged","creditLedgerId"],"type":"object"},"AdminBulkJobResponse":{"properties":{"job":{"$ref":"#/components/schemas/AdminBulkJob"},"resultsUrl":{"nullable":true,"type":"string"}},"required":["job","resultsUrl"],"type":"object"},"AdminCadLinks":{"properties":{"current":{"nullable":true,"properties":{"companyName":{"nullable":true,"type":"string"},"companyNmlsId":{"nullable":true,"type":"string"},"startDate":{"nullable":true,"type":"string"}},"required":["companyNmlsId","companyName","startDate"],"type":"object"},"explanation":{"properties":{"activeLogic":{"type":"string"},"registrationLink":{"type":"string"},"sponsorshipLink":{"type":"string"}},"required":["sponsorshipLink","registrationLink","activeLogic"],"type":"object"},"indexGaps":{"items":{"type":"string"},"type":"array"},"isWorking":{"nullable":true,"type":"boolean"},"name":{"nullable":true,"type":"string"},"nmlsId":{"type":"string"},"registrations":{"properties":{"active":{"type":"number"},"inactive":{"type":"number"},"rows":{"items":{"properties":{"companyName":{"nullable":true,"type":"string"},"companyNmlsId":{"nullable":true,"type":"string"},"endDate":{"nullable":true,"type":"string"},"isActive":{"type":"boolean"},"licenseType":{"nullable":true,"type":"string"},"locationNmlsId":{"nullable":true,"type":"string"},"regulator":{"nullable":true,"type":"string"},"source":{"enum":["sponsorship","registration",null],"nullable":true,"type":"string"},"startDate":{"nullable":true,"type":"string"}},"required":["source","companyNmlsId","companyName","startDate","endDate","isActive","regulator","licenseType","locationNmlsId"],"type":"object"},"type":"array"},"total":{"type":"number"}},"required":["total","active","inactive","rows"],"type":"object"},"sponsorships":{"properties":{"active":{"type":"number"},"inactive":{"type":"number"},"rows":{"items":{"properties":{"companyName":{"nullable":true,"type":"string"},"companyNmlsId":{"nullable":true,"type":"string"},"endDate":{"nullable":true,"type":"string"},"isActive":{"type":"boolean"},"licenseType":{"nullable":true,"type":"string"},"locationNmlsId":{"nullable":true,"type":"string"},"regulator":{"nullable":true,"type":"string"},"source":{"enum":["sponsorship","registration",null],"nullable":true,"type":"string"},"startDate":{"nullable":true,"type":"string"}},"required":["source","companyNmlsId","companyName","startDate","endDate","isActive","regulator","licenseType","locationNmlsId"],"type":"object"},"type":"array"},"total":{"type":"number"}},"required":["total","active","inactive","rows"],"type":"object"}},"required":["nmlsId","name","isWorking","current","sponsorships","registrations","explanation","indexGaps"],"type":"object"},"AdminContactSubmission":{"properties":{"approved":{"description":"Live (non-revoked) approved values for the same person.","items":{"$ref":"#/components/schemas/AdminApprovedContact"},"type":"array"},"subject":{"$ref":"#/components/schemas/AdminContactSubmissionSubject"},"submission":{"$ref":"#/components/schemas/AdminContactSubmissionDetail"}},"required":["submission","subject","approved"],"type":"object"},"AdminContactSubmissionDetail":{"properties":{"checkedAt":{"format":"date-time","nullable":true,"type":"string"},"createdAt":{"format":"date-time","type":"string"},"decisions":{"properties":{"approved":{"type":"integer"},"rejected":{"type":"integer"},"undecided":{"type":"integer"}},"required":["approved","rejected","undecided"],"type":"object"},"entityId":{"type":"string"},"entityType":{"description":"`lo` (entity id = NMLS id) or `agent` (canonical agent id).","enum":["lo","agent"],"type":"string"},"failureReason":{"nullable":true,"type":"string"},"id":{"type":"string"},"itemCount":{"type":"integer"},"items":{"items":{"properties":{"index":{"type":"integer"},"kind":{"type":"string"},"label":{"nullable":true,"type":"string"},"platform":{"nullable":true,"type":"string"},"result":{"$ref":"#/components/schemas/AdminContactSubmissionItemResult"},"review":{"$ref":"#/components/schemas/AdminContactSubmissionItemDecision"},"value":{"type":"string"}},"required":["index","kind","value","label","platform","result","review"],"type":"object"},"type":"array"},"kinds":{"items":{"type":"string"},"type":"array"},"note":{"nullable":true,"type":"string"},"queueError":{"nullable":true,"type":"string"},"queued":{"type":"boolean"},"reviewedAt":{"format":"date-time","nullable":true,"type":"string"},"status":{"description":"`pending` | `checking` | `checked` | `failed` | `reviewed`.","type":"string"},"submitter":{"properties":{"email":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"nmlsId":{"nullable":true,"type":"string"},"organizationId":{"type":"string"},"selfReported":{"nullable":true,"type":"boolean"},"userId":{"type":"string"}},"required":["userId","organizationId","name","email","nmlsId","selfReported"],"type":"object"},"verificationAttempts":{"type":"integer"}},"required":["id","status","entityType","entityId","submitter","itemCount","kinds","decisions","note","failureReason","createdAt","checkedAt","reviewedAt","items","verificationAttempts","queued","queueError"],"type":"object"},"AdminContactSubmissionItemDecision":{"nullable":true,"properties":{"approvedContactId":{"description":"The `approved_contact` row an approval created or reused; null when rejected.","nullable":true,"type":"string"},"decidedAt":{"format":"date-time","type":"string"},"decision":{"enum":["approved","rejected"],"type":"string"},"index":{"type":"integer"},"note":{"nullable":true,"type":"string"},"reviewerEmail":{"nullable":true,"type":"string"},"reviewerUserId":{"type":"string"}},"required":["index","decision","note","reviewerUserId","reviewerEmail","decidedAt","approvedContactId"],"type":"object"},"AdminContactSubmissionItemResult":{"nullable":true,"properties":{"alreadyOnFile":{"type":"boolean"},"confidence":{"nullable":true,"type":"number"},"detail":{"nullable":true,"type":"string"},"email":{"properties":{"domain":{"enum":["current_company","submitted_company","free_mail","other"],"type":"string"},"mx":{"nullable":true,"type":"boolean"}},"required":["mx","domain"],"type":"object"},"onFile":{"nullable":true,"type":"string"},"status":{"enum":["verified","contradicted","already_on_file","unverified"],"type":"string"}},"required":["status","confidence","detail","alreadyOnFile","onFile"],"type":"object"},"AdminContactSubmissionList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AdminContactSubmissionSummary"},"type":"array"},"nextCursor":{"nullable":true,"type":"string"}},"required":["items","nextCursor"],"type":"object"},"AdminContactSubmissionReviewRequest":{"additionalProperties":false,"properties":{"decisions":{"items":{"additionalProperties":false,"properties":{"decision":{"enum":["approved","rejected"],"type":"string"},"index":{"minimum":0,"type":"integer"},"note":{"maxLength":500,"type":"string"}},"required":["index","decision"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"}},"required":["decisions"],"type":"object"},"AdminContactSubmissionSubject":{"description":"The person as the profile shows them today; null when they no longer resolve.","nullable":true,"properties":{"company":{"nullable":true,"type":"string"},"companyNmlsId":{"nullable":true,"type":"string"},"displayName":{"type":"string"},"onFile":{"properties":{"emails":{"items":{"type":"string"},"type":"array"},"phones":{"items":{"type":"string"},"type":"array"},"profiles":{"items":{"type":"string"},"type":"array"}},"required":["phones","emails","profiles"],"type":"object"}},"required":["displayName","company","companyNmlsId","onFile"],"type":"object"},"AdminContactSubmissionSummary":{"properties":{"checkedAt":{"format":"date-time","nullable":true,"type":"string"},"createdAt":{"format":"date-time","type":"string"},"decisions":{"properties":{"approved":{"type":"integer"},"rejected":{"type":"integer"},"undecided":{"type":"integer"}},"required":["approved","rejected","undecided"],"type":"object"},"entityId":{"type":"string"},"entityType":{"description":"`lo` (entity id = NMLS id) or `agent` (canonical agent id).","enum":["lo","agent"],"type":"string"},"failureReason":{"nullable":true,"type":"string"},"id":{"type":"string"},"itemCount":{"type":"integer"},"kinds":{"items":{"type":"string"},"type":"array"},"note":{"nullable":true,"type":"string"},"reviewedAt":{"format":"date-time","nullable":true,"type":"string"},"status":{"description":"`pending` | `checking` | `checked` | `failed` | `reviewed`.","type":"string"},"submitter":{"properties":{"email":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"nmlsId":{"nullable":true,"type":"string"},"organizationId":{"type":"string"},"selfReported":{"nullable":true,"type":"boolean"},"userId":{"type":"string"}},"required":["userId","organizationId","name","email","nmlsId","selfReported"],"type":"object"}},"required":["id","status","entityType","entityId","submitter","itemCount","kinds","decisions","note","failureReason","createdAt","checkedAt","reviewedAt"],"type":"object"},"AdminCreateAlertRecipeRequest":{"description":"A recipe definition. Created as a draft; publish it to show it to users.","properties":{"category":{"maxLength":32,"minLength":1,"type":"string"},"copy":{"properties":{"headline":{"maxLength":200,"minLength":1,"type":"string"},"intro":{"maxLength":1000,"type":"string"},"plural":{"maxLength":40,"minLength":1,"type":"string"},"subject":{"maxLength":200,"minLength":1,"type":"string"}},"required":["subject","headline","intro","plural"],"type":"object"},"description":{"maxLength":500,"type":"string"},"email":{"$ref":"#/components/schemas/AlertRecipeEmailTemplate"},"family":{"enum":["past-clients","agent-partners","farm-area","watch-record"],"type":"string"},"featured":{"type":"boolean"},"grants":{"properties":{"agent":{"items":{"enum":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan","book_property","book_loan","area_property"],"type":"string"},"type":"array"},"area":{"items":{"enum":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan","book_property","book_loan","area_property"],"type":"string"},"type":"array"},"areaRules":{"properties":{"property":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"}},"type":"object"},"book":{"properties":{"loan":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"},"property":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"}},"type":"object"},"document":{"properties":{"loan":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"},"property":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"},"sale":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"}},"type":"object"},"nmls":{"items":{"enum":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan","book_property","book_loan","area_property"],"type":"string"},"type":"array"}},"type":"object"},"howItWorks":{"maxLength":2000,"type":"string"},"icon":{"description":"hugeicons component name, e.g. `UserSearch01Icon`.","type":"string"},"id":{"description":"Kebab-case slug, at most 48 characters; immutable once created.","example":"listing-watch","type":"string"},"inputs":{"items":{"properties":{"documentType":{"enum":["sale","property","loan"],"type":"string"},"help":{"maxLength":400,"type":"string"},"label":{"maxLength":80,"type":"string"},"max":{"minimum":1,"type":"integer"},"min":{"minimum":0,"type":"integer"},"required":{"type":"boolean"},"type":{"enum":["nmls","agent","area","document"],"type":"string"}},"required":["type","required"],"type":"object"},"maxItems":4,"type":"array"},"maxItemsPerRun":{"maximum":100,"minimum":1,"type":"integer"},"sortOrder":{"maximum":999999,"minimum":0,"type":"integer"},"title":{"maxLength":80,"minLength":1,"type":"string"}},"required":["id","title","description","icon","category","family","grants","inputs","copy","featured","sortOrder"],"type":"object"},"AdminCreateMonitor":{"additionalProperties":false,"properties":{"delivery":{"$ref":"#/components/schemas/MonitorDelivery"},"emailTemplate":{"$ref":"#/components/schemas/MonitorEmailTemplate"},"name":{"maxLength":63,"type":"string"},"notify":{"additionalProperties":false,"properties":{"email":{"type":"boolean"},"inApp":{"type":"boolean"}},"required":["email","inApp"],"type":"object"},"orgId":{"description":"The organization to set it up in. Default: the organization on the user's alert settings.","maxLength":128,"minLength":1,"type":"string"},"rules":{"additionalProperties":false,"properties":{"areaRules":{"additionalProperties":false,"properties":{"property":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"maxItems":10,"type":"array"}},"type":"object"},"book":{"additionalProperties":false,"properties":{"loan":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"maxItems":10,"type":"array"},"property":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"maxItems":10,"type":"array"}},"type":"object"},"thresholds":{"items":{"additionalProperties":false,"properties":{"column":{"pattern":"^[a-z_][a-z0-9_]{0,62}$","type":"string"},"on":{"enum":["threshold"],"type":"string"},"op":{"enum":[">=",">","<=","<"],"type":"string"},"value":{"type":"number"}},"required":["on","column","op","value"],"type":"object"},"maxItems":5,"type":"array"}},"type":"object"},"watch":{"additionalProperties":false,"properties":{"inputs":{"additionalProperties":{"nullable":true},"type":"object"},"options":{"additionalProperties":false,"properties":{"epoThresholdDays":{"maximum":3650,"minimum":1,"type":"integer"},"kinds":{"items":{"enum":["past_client_listed","early_payoff_risk","past_client_home","past_client_loan","agent_pending","agent_sale_closed","new_listing","refi_area","area_home","sale_changed","property_changed","loan_changed"],"type":"string"},"maxItems":12,"type":"array"},"refiMarginPoints":{"maximum":5,"minimum":0,"type":"number"},"refiRateThreshold":{"maximum":10,"minimum":0,"type":"number"}},"type":"object"},"template":{"example":"farm-area","maxLength":48,"pattern":"^[a-z0-9]+(-[a-z0-9]+)*$","type":"string"}},"required":["template","inputs"],"type":"object"}},"required":["watch"],"type":"object"},"AdminCrmApplyMiResult":{"properties":{"data":{"properties":{"applied":{"type":"number"},"results":{"items":{"properties":{"applied":{"type":"number"},"entityId":{"type":"string"},"error":{"enum":["not_found","invalid_phone"],"type":"string"}},"required":["entityId","applied"],"type":"object"},"type":"array"}},"required":["applied","results"],"type":"object"}},"required":["data"],"type":"object"},"AdminCrmLinkResult":{"properties":{"data":{"properties":{"entityType":{"$ref":"#/components/schemas/CrmEntityType"},"linked":{"enum":[true],"type":"boolean"},"previousLink":{"$ref":"#/components/schemas/CrmLink"}},"required":["linked","entityType","previousLink"],"type":"object"}},"required":["data"],"type":"object"},"AdminCrmMatchCandidates":{"properties":{"data":{"items":{"properties":{"company":{"type":"string"},"location":{"type":"string"},"mmaId":{"type":"string"},"name":{"type":"string"},"nmlsId":{"type":"string"},"units":{"type":"number"},"volume":{"type":"number"}},"required":["name"],"type":"object"},"type":"array"}},"required":["data"],"type":"object"},"AdminCrmMiReviewResult":{"properties":{"data":{"properties":{"failedEntityIds":{"items":{"type":"string"},"type":"array"},"mirrorRefreshed":{"type":"number"},"nextCursor":{"nullable":true,"type":"string"},"notFound":{"items":{"type":"string"},"type":"array"},"records":{"items":{"properties":{"checkedAt":{"type":"number"},"entityId":{"type":"string"},"entityType":{"$ref":"#/components/schemas/CrmEntityType"},"inputsChanged":{"type":"boolean"},"name":{"nullable":true,"type":"string"},"status":{"enum":["needs_review","snoozed","up_to_date"],"type":"string"},"updates":{"items":{"properties":{"action":{"enum":["add","overwrite"],"type":"string"},"current":{"nullable":true,"type":"string"},"field":{"type":"string"},"id":{"type":"string"},"incoming":{"type":"string"},"kind":{"type":"string"},"label":{"type":"string"},"linkage":{"properties":{"companyNmlsId":{"type":"string"},"office":{"$ref":"#/components/schemas/CrmOverrideOffice"}},"type":"object"},"previouslyReviewed":{"type":"boolean"},"seenKey":{"type":"string"},"store":{"enum":["override","contact"],"type":"string"}},"required":["id","field","label","store","current","incoming","action","seenKey","previouslyReviewed"],"type":"object"},"type":"array"}},"required":["entityId","entityType","name","status","inputsChanged","updates","checkedAt"],"type":"object"},"type":"array"},"scanned":{"type":"number"},"summary":{"properties":{"failed":{"type":"number"},"needsReview":{"type":"number"},"snoozed":{"type":"number"},"unavailable":{"type":"number"},"upToDate":{"type":"number"}},"required":["needsReview","snoozed","upToDate","unavailable","failed"],"type":"object"}},"required":["records","scanned","summary","failedEntityIds","notFound","mirrorRefreshed","nextCursor"],"type":"object"}},"required":["data"],"type":"object"},"AdminGrantSavedFilterAccessRequest":{"additionalProperties":false,"properties":{"actor":{"description":"Who is acting, as the caller names it (`charles`, an admin user id). Defaults to the authenticated caller. Logged.","maxLength":128,"minLength":1,"type":"string"},"permission":{"allOf":[{"$ref":"#/components/schemas/SavedFilterGrantPermission"},{"description":"`viewer` can see and run the filter; `editor` can also change its name, icon, query and UI state. Neither can delete it or change who it is shared with."}]},"reason":{"description":"Why (ticket / support request id + one line). Logged.","maxLength":500,"minLength":1,"type":"string"},"userId":{"maxLength":128,"minLength":1,"type":"string"}},"required":["userId"],"type":"object"},"AdminHomeValueConsentRow":{"properties":{"actor":{"nullable":true,"type":"string"},"fromState":{"nullable":true,"type":"string"},"id":{"type":"string"},"meta":{"additionalProperties":{"nullable":true},"type":"object"},"occurredAt":{"format":"date-time","type":"string"},"reason":{"nullable":true,"type":"string"},"toState":{"type":"string"}},"required":["id","fromState","toState","reason","actor","occurredAt","meta"],"type":"object"},"AdminHomeValueCycleDetail":{"properties":{"cycle":{"$ref":"#/components/schemas/AdminHomeValueCycleDetailRow"},"enrollment":{"$ref":"#/components/schemas/AdminHomeValueEnrollmentRow"},"holdReason":{"description":"Why a held cycle waits for the loan officer. Null unless the cycle is `pending_approval`.","enum":["value_drop","sold",null],"nullable":true,"type":"string"}},"required":["cycle","enrollment","holdReason"],"type":"object"},"AdminHomeValueCycleDetailRow":{"properties":{"approvedAt":{"format":"date-time","nullable":true,"type":"string"},"attemptCount":{"type":"integer"},"createdAt":{"format":"date-time","type":"string"},"cycleMonth":{"type":"string"},"emailLogId":{"description":"auth's email log row for the send (admin › Email logs). Null until sent, and for cycles sent before email moved to auth.","nullable":true,"type":"string"},"enrollmentId":{"type":"string"},"firstViewedAt":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"string"},"lastAttemptAt":{"format":"date-time","nullable":true,"type":"string"},"lastError":{"description":"Short detail for `lastErrorCode`. Never contains borrower contact details.","nullable":true,"type":"string"},"lastErrorCode":{"description":"Why the last send attempt did not go out: `no_borrower_email`, `lo_not_authorized`, `lo_unverified`, `lo_identity_incomplete`, `auth_check_failed`, `mint_failed`, `resend_rate_limited`, `resend_error`, `email_in_progress`, `email_rejected`, `email_key_conflict`, `email_misconfigured` or `email_auth_failed`. Null after a successful send or before any attempt.","nullable":true,"type":"string"},"organizationId":{"type":"string"},"payload":{"additionalProperties":{"nullable":true},"type":"object"},"payloadVersion":{"type":"integer"},"resendEmailId":{"nullable":true,"type":"string"},"sentAt":{"format":"date-time","nullable":true,"type":"string"},"status":{"enum":["pending_approval","ready","sent","skipped","declined"],"type":"string"}},"required":["id","enrollmentId","organizationId","cycleMonth","status","payloadVersion","resendEmailId","emailLogId","createdAt","approvedAt","sentAt","firstViewedAt","attemptCount","lastAttemptAt","lastErrorCode","lastError","payload"],"type":"object"},"AdminHomeValueCycleList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AdminHomeValueCycleRow"},"type":"array"},"nextCursor":{"nullable":true,"type":"string"}},"required":["items","nextCursor"],"type":"object"},"AdminHomeValueCycleRow":{"properties":{"approvedAt":{"format":"date-time","nullable":true,"type":"string"},"attemptCount":{"type":"integer"},"createdAt":{"format":"date-time","type":"string"},"cycleMonth":{"type":"string"},"emailLogId":{"description":"auth's email log row for the send (admin › Email logs). Null until sent, and for cycles sent before email moved to auth.","nullable":true,"type":"string"},"enrollmentId":{"type":"string"},"firstViewedAt":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"string"},"lastAttemptAt":{"format":"date-time","nullable":true,"type":"string"},"lastError":{"description":"Short detail for `lastErrorCode`. Never contains borrower contact details.","nullable":true,"type":"string"},"lastErrorCode":{"description":"Why the last send attempt did not go out: `no_borrower_email`, `lo_not_authorized`, `lo_unverified`, `lo_identity_incomplete`, `auth_check_failed`, `mint_failed`, `resend_rate_limited`, `resend_error`, `email_in_progress`, `email_rejected`, `email_key_conflict`, `email_misconfigured` or `email_auth_failed`. Null after a successful send or before any attempt.","nullable":true,"type":"string"},"organizationId":{"type":"string"},"payloadVersion":{"type":"integer"},"resendEmailId":{"nullable":true,"type":"string"},"sentAt":{"format":"date-time","nullable":true,"type":"string"},"status":{"enum":["pending_approval","ready","sent","skipped","declined"],"type":"string"}},"required":["id","enrollmentId","organizationId","cycleMonth","status","payloadVersion","resendEmailId","emailLogId","createdAt","approvedAt","sentAt","firstViewedAt","attemptCount","lastAttemptAt","lastErrorCode","lastError"],"type":"object"},"AdminHomeValueEnrollmentDetail":{"properties":{"consentLog":{"items":{"$ref":"#/components/schemas/AdminHomeValueConsentRow"},"type":"array"},"cycles":{"items":{"$ref":"#/components/schemas/AdminHomeValueCycleRow"},"type":"array"},"enrollment":{"$ref":"#/components/schemas/AdminHomeValueEnrollmentDetailRow"},"events":{"items":{"$ref":"#/components/schemas/AdminHomeValueEventRow"},"type":"array"}},"required":["enrollment","cycles","consentLog","events"],"type":"object"},"AdminHomeValueEnrollmentDetailRow":{"properties":{"borrowerEmail":{"nullable":true,"type":"string"},"borrowerEmailMasked":{"description":"First character and domain only, e.g. `p***@example.com`.","nullable":true,"type":"string"},"borrowerFirstName":{"nullable":true,"type":"string"},"cadence":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"id":{"type":"string"},"lastCycle":{"$ref":"#/components/schemas/AdminHomeValueLastCycle"},"loUserId":{"type":"string"},"loanOverrides":{"$ref":"#/components/schemas/HomeValueLoanOverrides"},"mmPropertyId":{"type":"string"},"nextSendAt":{"format":"date-time","nullable":true,"type":"string"},"optInAttemptCount":{"type":"integer"},"optInBatchId":{"nullable":true,"type":"string"},"optInEmailLogId":{"description":"auth's email log row for the last opt-in email sent. Null until one is.","nullable":true,"type":"string"},"optInLastAttemptAt":{"format":"date-time","nullable":true,"type":"string"},"optInLastError":{"nullable":true,"type":"string"},"optInLastErrorCode":{"description":"Why the last send attempt did not go out: `no_borrower_email`, `lo_not_authorized`, `lo_unverified`, `lo_identity_incomplete`, `auth_check_failed`, `mint_failed`, `resend_rate_limited`, `resend_error`, `email_in_progress`, `email_rejected`, `email_key_conflict`, `email_misconfigured` or `email_auth_failed`. Null after a successful send or before any attempt.","nullable":true,"type":"string"},"organizationId":{"type":"string"},"pausedReason":{"enum":["lo_paused",null],"nullable":true,"type":"string"},"propertyOverrides":{"$ref":"#/components/schemas/HomeValuePropertyOverrides"},"refinancedAt":{"format":"date-time","nullable":true,"type":"string"},"removedAt":{"format":"date-time","nullable":true,"type":"string"},"soldDetectedAt":{"format":"date-time","nullable":true,"type":"string"},"status":{"enum":["pending_confirmation","active","paused","unsubscribed","bounced","removed"],"type":"string"},"suppression":{"$ref":"#/components/schemas/HomeValueSuppression"},"valuations":{"$ref":"#/components/schemas/HomeValueValuations"}},"required":["id","organizationId","loUserId","mmPropertyId","borrowerFirstName","borrowerEmailMasked","status","pausedReason","nextSendAt","createdAt","removedAt","refinancedAt","soldDetectedAt","lastCycle","borrowerEmail","loanOverrides","propertyOverrides","valuations","optInBatchId","cadence","suppression","optInAttemptCount","optInLastAttemptAt","optInLastErrorCode","optInLastError","optInEmailLogId"],"type":"object"},"AdminHomeValueEnrollmentList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AdminHomeValueEnrollmentRow"},"type":"array"},"nextCursor":{"nullable":true,"type":"string"}},"required":["items","nextCursor"],"type":"object"},"AdminHomeValueEnrollmentRow":{"properties":{"borrowerEmailMasked":{"description":"First character and domain only, e.g. `p***@example.com`.","nullable":true,"type":"string"},"borrowerFirstName":{"nullable":true,"type":"string"},"createdAt":{"format":"date-time","type":"string"},"id":{"type":"string"},"lastCycle":{"$ref":"#/components/schemas/AdminHomeValueLastCycle"},"loUserId":{"type":"string"},"mmPropertyId":{"type":"string"},"nextSendAt":{"format":"date-time","nullable":true,"type":"string"},"organizationId":{"type":"string"},"pausedReason":{"enum":["lo_paused",null],"nullable":true,"type":"string"},"refinancedAt":{"format":"date-time","nullable":true,"type":"string"},"removedAt":{"format":"date-time","nullable":true,"type":"string"},"soldDetectedAt":{"format":"date-time","nullable":true,"type":"string"},"status":{"enum":["pending_confirmation","active","paused","unsubscribed","bounced","removed"],"type":"string"}},"required":["id","organizationId","loUserId","mmPropertyId","borrowerFirstName","borrowerEmailMasked","status","pausedReason","nextSendAt","createdAt","removedAt","refinancedAt","soldDetectedAt","lastCycle"],"type":"object"},"AdminHomeValueEventRow":{"properties":{"ctaId":{"nullable":true,"type":"string"},"ctaKind":{"nullable":true,"type":"string"},"cycleId":{"type":"string"},"eventType":{"type":"string"},"geoCity":{"nullable":true,"type":"string"},"geoRegion":{"nullable":true,"type":"string"},"id":{"type":"string"},"occurredAt":{"format":"date-time","type":"string"}},"required":["id","cycleId","eventType","occurredAt","ctaId","ctaKind","geoCity","geoRegion"],"type":"object"},"AdminHomeValueLastCycle":{"nullable":true,"properties":{"cycleMonth":{"type":"string"},"id":{"type":"string"},"lastErrorCode":{"description":"Why the last send attempt did not go out: `no_borrower_email`, `lo_not_authorized`, `lo_unverified`, `lo_identity_incomplete`, `auth_check_failed`, `mint_failed`, `resend_rate_limited`, `resend_error`, `email_in_progress`, `email_rejected`, `email_key_conflict`, `email_misconfigured` or `email_auth_failed`. Null after a successful send or before any attempt.","nullable":true,"type":"string"},"sentAt":{"format":"date-time","nullable":true,"type":"string"},"status":{"enum":["pending_approval","ready","sent","skipped","declined"],"type":"string"}},"required":["id","cycleMonth","status","sentAt","lastErrorCode"],"type":"object"},"AdminHomeValueLo":{"properties":{"enrollmentsByStatus":{"additionalProperties":{"type":"integer"},"description":"Count per status. Statuses with no rows are omitted.","type":"object"},"loUserId":{"type":"string"},"onboarding":{"nullable":true,"properties":{"completed":{"type":"boolean"},"completedAt":{"format":"date-time","nullable":true,"type":"string"},"disclosuresAckAt":{"format":"date-time","nullable":true,"type":"string"},"disclosuresVersion":{"nullable":true,"type":"string"}},"required":["completed","completedAt","disclosuresAckAt","disclosuresVersion"],"type":"object"},"optouts":{"description":"Borrowers who unsubscribed from this loan officer.","type":"integer"},"pendingApproval":{"items":{"$ref":"#/components/schemas/AdminHomeValueCycleRow"},"type":"array"}},"required":["loUserId","onboarding","enrollmentsByStatus","pendingApproval","optouts"],"type":"object"},"AdminHomeValueOverview":{"properties":{"cycles":{"properties":{"byStatus":{"additionalProperties":{"type":"integer"},"description":"Count per status. Statuses with no rows are omitted.","type":"object"},"month":{"description":"Current month, `YYYY-MM` (UTC).","type":"string"}},"required":["month","byStatus"],"type":"object"},"due":{"properties":{"oldestNextSendAt":{"description":"The earliest such next send time.","format":"date-time","nullable":true,"type":"string"},"overdue":{"description":"Active enrollments whose next send time has passed and that the scheduler has not yet picked up.","type":"integer"}},"required":["overdue","oldestNextSendAt"],"type":"object"},"engagement30d":{"properties":{"bounced":{"type":"integer"},"clicked":{"type":"integer"},"complained":{"type":"integer"},"delivered":{"type":"integer"},"opened":{"type":"integer"},"sent":{"type":"integer"},"views":{"type":"integer"}},"required":["sent","delivered","bounced","complained","opened","clicked","views"],"type":"object"},"enrollments":{"properties":{"byStatus":{"additionalProperties":{"type":"integer"},"description":"Count per status. Statuses with no rows are omitted.","type":"object"}},"required":["byStatus"],"type":"object"},"generatedAt":{"format":"date-time","type":"string"},"pendingApproval":{"properties":{"count":{"type":"integer"},"oldestAt":{"description":"Creation time of the oldest held cycle.","format":"date-time","nullable":true,"type":"string"}},"required":["count","oldestAt"],"type":"object"},"stuck":{"properties":{"oldestReadyAt":{"description":"Creation time of the oldest `ready` cycle.","format":"date-time","nullable":true,"type":"string"},"readyOver24h":{"type":"integer"}},"required":["readyOver24h","oldestReadyAt"],"type":"object"}},"required":["enrollments","cycles","stuck","pendingApproval","due","engagement30d","generatedAt"],"type":"object"},"AdminLoEnrichedArrays":{"properties":{"LoDirectPhones":{"items":{"properties":{"Confidence":{"type":"number"},"Counter":{"type":"number"},"EmployerState":{"enum":["current","old","unknown"],"type":"string"},"LastRunId":{"type":"string"},"LastSeenDate":{"description":"Epoch ms of the latest sighting.","type":"number"},"LastSource":{"type":"string"},"MemberDirectPhone":{"type":"string"},"OldestSeenDate":{"description":"Epoch ms of the first sighting.","type":"number"},"OriginalSource":{"type":"string"},"SourceUrl":{"type":"string"},"TypeName":{"nullable":true,"type":"string"}},"required":["TypeName","Confidence","SourceUrl","OriginalSource","LastSource","Counter","OldestSeenDate","LastSeenDate","LastRunId","MemberDirectPhone","EmployerState"],"type":"object"},"type":"array"},"LoEmails":{"items":{"properties":{"Confidence":{"type":"number"},"Counter":{"type":"number"},"EmailType":{"type":"string"},"EmployerState":{"enum":["current","old","unknown"],"type":"string"},"LastRunId":{"type":"string"},"LastSeenDate":{"description":"Epoch ms of the latest sighting.","type":"number"},"LastSource":{"type":"string"},"MemberEmail":{"type":"string"},"OldestSeenDate":{"description":"Epoch ms of the first sighting.","type":"number"},"OriginalSource":{"type":"string"},"SourceUrl":{"type":"string"},"TypeName":{"nullable":true,"type":"string"}},"required":["TypeName","Confidence","SourceUrl","OriginalSource","LastSource","Counter","OldestSeenDate","LastSeenDate","LastRunId","MemberEmail","EmailType","EmployerState"],"type":"object"},"type":"array"},"LoLanguages":{"items":{"properties":{"Confidence":{"type":"number"},"Counter":{"type":"number"},"Evidence":{"type":"string"},"LastRunId":{"type":"string"},"LastSeenDate":{"description":"Epoch ms of the latest sighting.","type":"number"},"LastSource":{"type":"string"},"MemberLanguage":{"type":"string"},"OldestSeenDate":{"description":"Epoch ms of the first sighting.","type":"number"},"OriginalSource":{"type":"string"},"Proficiency":{"nullable":true,"type":"string"},"SourceUrl":{"type":"string"},"TypeName":{"nullable":true,"type":"string"}},"required":["TypeName","Confidence","SourceUrl","OriginalSource","LastSource","Counter","OldestSeenDate","LastSeenDate","LastRunId","MemberLanguage","Evidence","Proficiency"],"type":"object"},"type":"array"},"LoMobilePhones":{"items":{"properties":{"Confidence":{"type":"number"},"Counter":{"type":"number"},"EmployerState":{"enum":["current","old","unknown"],"type":"string"},"LastRunId":{"type":"string"},"LastSeenDate":{"description":"Epoch ms of the latest sighting.","type":"number"},"LastSource":{"type":"string"},"MemberMobilePhone":{"type":"string"},"OldestSeenDate":{"description":"Epoch ms of the first sighting.","type":"number"},"OriginalSource":{"type":"string"},"SourceUrl":{"type":"string"},"TypeName":{"nullable":true,"type":"string"}},"required":["TypeName","Confidence","SourceUrl","OriginalSource","LastSource","Counter","OldestSeenDate","LastSeenDate","LastRunId","MemberMobilePhone","EmployerState"],"type":"object"},"type":"array"},"LoOfficePhones":{"items":{"properties":{"Confidence":{"type":"number"},"Counter":{"type":"number"},"EmployerState":{"enum":["current","old","unknown"],"type":"string"},"LastRunId":{"type":"string"},"LastSeenDate":{"description":"Epoch ms of the latest sighting.","type":"number"},"LastSource":{"type":"string"},"MemberOfficePhone":{"type":"string"},"MemberOfficePhoneExt":{"nullable":true,"type":"string"},"OldestSeenDate":{"description":"Epoch ms of the first sighting.","type":"number"},"OriginalSource":{"type":"string"},"SourceUrl":{"type":"string"},"TollFree":{"type":"boolean"},"TypeName":{"nullable":true,"type":"string"}},"required":["TypeName","Confidence","SourceUrl","OriginalSource","LastSource","Counter","OldestSeenDate","LastSeenDate","LastRunId","MemberOfficePhone","MemberOfficePhoneExt","TollFree","EmployerState"],"type":"object"},"type":"array"},"LoSocialMedia":{"items":{"properties":{"Confidence":{"type":"number"},"Counter":{"type":"number"},"EmployerState":{"enum":["current","old","unknown"],"type":"string"},"LastRunId":{"type":"string"},"LastSeenDate":{"description":"Epoch ms of the latest sighting.","type":"number"},"LastSource":{"type":"string"},"OldestSeenDate":{"description":"Epoch ms of the first sighting.","type":"number"},"OriginalSource":{"type":"string"},"SocialMediaType":{"type":"string"},"SocialMediaUrlOrId":{"type":"string"},"SourceUrl":{"type":"string"},"TypeName":{"nullable":true,"type":"string"}},"required":["TypeName","Confidence","SourceUrl","OriginalSource","LastSource","Counter","OldestSeenDate","LastSeenDate","LastRunId","SocialMediaUrlOrId","SocialMediaType","EmployerState"],"type":"object"},"type":"array"},"LoWebsites":{"items":{"properties":{"Confidence":{"type":"number"},"Counter":{"type":"number"},"EmployerState":{"enum":["current","old","unknown"],"type":"string"},"LastRunId":{"type":"string"},"LastSeenDate":{"description":"Epoch ms of the latest sighting.","type":"number"},"LastSource":{"type":"string"},"OldestSeenDate":{"description":"Epoch ms of the first sighting.","type":"number"},"OriginalSource":{"type":"string"},"SourceUrl":{"type":"string"},"TypeName":{"nullable":true,"type":"string"},"WebsiteType":{"type":"string"},"WebsiteUrl":{"type":"string"}},"required":["TypeName","Confidence","SourceUrl","OriginalSource","LastSource","Counter","OldestSeenDate","LastSeenDate","LastRunId","WebsiteUrl","WebsiteType","EmployerState"],"type":"object"},"type":"array"}},"required":["LoEmails","LoMobilePhones","LoDirectPhones","LoOfficePhones","LoSocialMedia","LoWebsites","LoLanguages"],"type":"object"},"AdminLoEnrichedContact":{"properties":{"companyName":{"nullable":true,"type":"string"},"companyNmlsId":{"description":"Employer at the last attempt — how a move is detected.","nullable":true,"type":"string"},"counts":{"properties":{"LoDirectPhones":{"properties":{"current":{"description":"Entries not relabelled `old` (the LO's current employer).","type":"integer"},"total":{"type":"integer"}},"required":["current","total"],"type":"object"},"LoEmails":{"properties":{"current":{"description":"Entries not relabelled `old` (the LO's current employer).","type":"integer"},"total":{"type":"integer"}},"required":["current","total"],"type":"object"},"LoLanguages":{"properties":{"current":{"description":"Entries not relabelled `old` (the LO's current employer).","type":"integer"},"total":{"type":"integer"}},"required":["current","total"],"type":"object"},"LoMobilePhones":{"properties":{"current":{"description":"Entries not relabelled `old` (the LO's current employer).","type":"integer"},"total":{"type":"integer"}},"required":["current","total"],"type":"object"},"LoOfficePhones":{"properties":{"current":{"description":"Entries not relabelled `old` (the LO's current employer).","type":"integer"},"total":{"type":"integer"}},"required":["current","total"],"type":"object"},"LoSocialMedia":{"properties":{"current":{"description":"Entries not relabelled `old` (the LO's current employer).","type":"integer"},"total":{"type":"integer"}},"required":["current","total"],"type":"object"},"LoWebsites":{"properties":{"current":{"description":"Entries not relabelled `old` (the LO's current employer).","type":"integer"},"total":{"type":"integer"}},"required":["current","total"],"type":"object"}},"required":["LoEmails","LoMobilePhones","LoDirectPhones","LoOfficePhones","LoSocialMedia","LoWebsites","LoLanguages"],"type":"object"},"firstEnrichedAt":{"nullable":true,"type":"string"},"lastEnrichedAt":{"description":"Last ATTEMPT; the record exists even when nothing was found.","nullable":true,"type":"string"},"lastOutcome":{"nullable":true,"properties":{"added":{"type":"number"},"credits":{"type":"number"}},"required":["added","credits"],"type":"object"},"lastRunId":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"nmlsId":{"type":"string"}},"required":["nmlsId","name","companyName","companyNmlsId","firstEnrichedAt","lastEnrichedAt","lastRunId","lastOutcome","counts"],"type":"object"},"AdminLoEnrichedContactDetail":{"properties":{"arrays":{"$ref":"#/components/schemas/AdminLoEnrichedArrays"},"employers":{"items":{"properties":{"companyNmlsId":{"nullable":true,"type":"string"},"firstSeenAt":{"nullable":true,"type":"string"},"label":{"enum":["current","old"],"type":"string"},"lastRunId":{"nullable":true,"type":"string"},"lastSeenAt":{"nullable":true,"type":"string"},"values":{"properties":{"LoDirectPhones":{"items":{"properties":{"Confidence":{"type":"number"},"Counter":{"type":"number"},"EmployerState":{"enum":["current","old","unknown"],"type":"string"},"LastRunId":{"type":"string"},"LastSeenDate":{"description":"Epoch ms of the latest sighting.","type":"number"},"LastSource":{"type":"string"},"MemberDirectPhone":{"type":"string"},"OldestSeenDate":{"description":"Epoch ms of the first sighting.","type":"number"},"OriginalSource":{"type":"string"},"SourceUrl":{"type":"string"},"TypeName":{"nullable":true,"type":"string"}},"required":["TypeName","Confidence","SourceUrl","OriginalSource","LastSource","Counter","OldestSeenDate","LastSeenDate","LastRunId","MemberDirectPhone","EmployerState"],"type":"object"},"type":"array"},"LoEmails":{"items":{"properties":{"Confidence":{"type":"number"},"Counter":{"type":"number"},"EmailType":{"type":"string"},"EmployerState":{"enum":["current","old","unknown"],"type":"string"},"LastRunId":{"type":"string"},"LastSeenDate":{"description":"Epoch ms of the latest sighting.","type":"number"},"LastSource":{"type":"string"},"MemberEmail":{"type":"string"},"OldestSeenDate":{"description":"Epoch ms of the first sighting.","type":"number"},"OriginalSource":{"type":"string"},"SourceUrl":{"type":"string"},"TypeName":{"nullable":true,"type":"string"}},"required":["TypeName","Confidence","SourceUrl","OriginalSource","LastSource","Counter","OldestSeenDate","LastSeenDate","LastRunId","MemberEmail","EmailType","EmployerState"],"type":"object"},"type":"array"},"LoLanguages":{"items":{"properties":{"Confidence":{"type":"number"},"Counter":{"type":"number"},"Evidence":{"type":"string"},"LastRunId":{"type":"string"},"LastSeenDate":{"description":"Epoch ms of the latest sighting.","type":"number"},"LastSource":{"type":"string"},"MemberLanguage":{"type":"string"},"OldestSeenDate":{"description":"Epoch ms of the first sighting.","type":"number"},"OriginalSource":{"type":"string"},"Proficiency":{"nullable":true,"type":"string"},"SourceUrl":{"type":"string"},"TypeName":{"nullable":true,"type":"string"}},"required":["TypeName","Confidence","SourceUrl","OriginalSource","LastSource","Counter","OldestSeenDate","LastSeenDate","LastRunId","MemberLanguage","Evidence","Proficiency"],"type":"object"},"type":"array"},"LoMobilePhones":{"items":{"properties":{"Confidence":{"type":"number"},"Counter":{"type":"number"},"EmployerState":{"enum":["current","old","unknown"],"type":"string"},"LastRunId":{"type":"string"},"LastSeenDate":{"description":"Epoch ms of the latest sighting.","type":"number"},"LastSource":{"type":"string"},"MemberMobilePhone":{"type":"string"},"OldestSeenDate":{"description":"Epoch ms of the first sighting.","type":"number"},"OriginalSource":{"type":"string"},"SourceUrl":{"type":"string"},"TypeName":{"nullable":true,"type":"string"}},"required":["TypeName","Confidence","SourceUrl","OriginalSource","LastSource","Counter","OldestSeenDate","LastSeenDate","LastRunId","MemberMobilePhone","EmployerState"],"type":"object"},"type":"array"},"LoOfficePhones":{"items":{"properties":{"Confidence":{"type":"number"},"Counter":{"type":"number"},"EmployerState":{"enum":["current","old","unknown"],"type":"string"},"LastRunId":{"type":"string"},"LastSeenDate":{"description":"Epoch ms of the latest sighting.","type":"number"},"LastSource":{"type":"string"},"MemberOfficePhone":{"type":"string"},"MemberOfficePhoneExt":{"nullable":true,"type":"string"},"OldestSeenDate":{"description":"Epoch ms of the first sighting.","type":"number"},"OriginalSource":{"type":"string"},"SourceUrl":{"type":"string"},"TollFree":{"type":"boolean"},"TypeName":{"nullable":true,"type":"string"}},"required":["TypeName","Confidence","SourceUrl","OriginalSource","LastSource","Counter","OldestSeenDate","LastSeenDate","LastRunId","MemberOfficePhone","MemberOfficePhoneExt","TollFree","EmployerState"],"type":"object"},"type":"array"},"LoSocialMedia":{"items":{"properties":{"Confidence":{"type":"number"},"Counter":{"type":"number"},"EmployerState":{"enum":["current","old","unknown"],"type":"string"},"LastRunId":{"type":"string"},"LastSeenDate":{"description":"Epoch ms of the latest sighting.","type":"number"},"LastSource":{"type":"string"},"OldestSeenDate":{"description":"Epoch ms of the first sighting.","type":"number"},"OriginalSource":{"type":"string"},"SocialMediaType":{"type":"string"},"SocialMediaUrlOrId":{"type":"string"},"SourceUrl":{"type":"string"},"TypeName":{"nullable":true,"type":"string"}},"required":["TypeName","Confidence","SourceUrl","OriginalSource","LastSource","Counter","OldestSeenDate","LastSeenDate","LastRunId","SocialMediaUrlOrId","SocialMediaType","EmployerState"],"type":"object"},"type":"array"},"LoWebsites":{"items":{"properties":{"Confidence":{"type":"number"},"Counter":{"type":"number"},"EmployerState":{"enum":["current","old","unknown"],"type":"string"},"LastRunId":{"type":"string"},"LastSeenDate":{"description":"Epoch ms of the latest sighting.","type":"number"},"LastSource":{"type":"string"},"OldestSeenDate":{"description":"Epoch ms of the first sighting.","type":"number"},"OriginalSource":{"type":"string"},"SourceUrl":{"type":"string"},"TypeName":{"nullable":true,"type":"string"},"WebsiteType":{"type":"string"},"WebsiteUrl":{"type":"string"}},"required":["TypeName","Confidence","SourceUrl","OriginalSource","LastSource","Counter","OldestSeenDate","LastSeenDate","LastRunId","WebsiteUrl","WebsiteType","EmployerState"],"type":"object"},"type":"array"}},"type":"object"}},"required":["companyNmlsId","label","firstSeenAt","lastSeenAt","lastRunId","values"],"type":"object"},"type":"array"},"profile":{"description":"The one-time profile lookup. The provider's person record is kept server-side and never returned.","nullable":true,"properties":{"claimedAt":{"nullable":true,"type":"string"},"credits":{"nullable":true,"type":"number"},"error":{"nullable":true,"type":"string"},"fetchedAt":{"nullable":true,"type":"string"},"linkedinUrl":{"nullable":true,"type":"string"},"matched":{"nullable":true,"type":"boolean"},"provider":{"nullable":true,"type":"string"},"runId":{"nullable":true,"type":"string"}},"required":["provider","linkedinUrl","matched","credits","claimedAt","fetchedAt","runId","error"],"type":"object"},"summary":{"$ref":"#/components/schemas/AdminLoEnrichedContact"}},"required":["summary","arrays","employers","profile"],"type":"object"},"AdminLoEnrichedContactsPage":{"properties":{"cursor":{"type":"string"},"items":{"items":{"$ref":"#/components/schemas/AdminLoEnrichedContact"},"type":"array"}},"required":["items"],"type":"object"},"AdminLoEnrichmentBalance":{"properties":{"remainingCredits":{"type":"number"}},"required":["remainingCredits"],"type":"object"},"AdminLoEnrichmentLaunch":{"properties":{"runId":{"type":"string"},"status":{"enum":["queued"],"type":"string"},"taskId":{"type":"string"}},"required":["runId","taskId","status"],"type":"object"},"AdminLoEnrichmentRunRequest":{"properties":{"cohort":{"description":"`band` (the backfill: every ACTIVE LO with `minVolume` ≤ volume < `maxVolume`, biggest producers first; `minVolume` at least 250,000), `changes` (every LO whose sponsorship or registration began within `moverDays`, at any volume, not yet enriched since), `stratified` (a sample across volume tiers), `tier` (a sample of one tier), `movers` (company → company moves above `minVolume`), or explicit `nmlsIds`. Default `stratified`.","enum":["stratified","tier","movers","nmls_ids","band","changes"],"type":"string"},"concurrency":{"description":"Parallel LOs. Default 8.","type":"integer"},"creditBudget":{"description":"HARD stop, in Firecrawl credits. The run aborts if the account holds less.","example":30000,"type":"integer"},"dryRun":{"description":"Cohort + credit estimate only — no scraping, no writes.","type":"boolean"},"languageSearch":{"description":"One TinyFish search per LO aimed at language statements (snippets only). Default true.","type":"boolean"},"maxVolume":{"description":"`band` only: period volume below this (exclusive). Omit for no ceiling.","type":"number"},"minVolume":{"description":"Period volume floor. Default 1,000,000. A `band` cannot start below 250,000.","type":"number"},"moverDays":{"description":"`movers` / `changes` window in days. Default 120.","type":"integer"},"nmlsIds":{"description":"Required for `cohort: nmls_ids`.","items":{"type":"string"},"type":"array"},"period":{"description":"Production period. Default `last_14_months`.","type":"string"},"profileLookup":{"description":"Last step of the language waterfall: when pages, snippets and the TinyFish language search found no language, one FullEnrich lookup on the LO's LinkedIn URL (match ≥ 80). 5 credits per match, never repeated for an LO. Default true.","type":"boolean"},"seed":{"description":"Sampling seed. Default: derived from the run id.","type":"integer"},"sitemapMin":{"description":"Min cohort LOs per company for the sitemap route. Default 8.","type":"integer"},"size":{"description":"LOs to enrich.","example":10000,"type":"integer"},"skipRecentDays":{"description":"Skip LOs attempted in the last N days, found anything or not. Default 30; for a `band` backfill set it past the backfill's length (e.g. 365) so repeat runs continue where the last stopped. Ignored by `changes`.","type":"integer"},"socialFallback":{"description":"When Firecrawl finds no LinkedIn / Instagram / Facebook / X profile, run one TinyFish search to fill the missing platforms. Default true.","type":"boolean"},"tier":{"description":"Required for `cohort: tier`. T1 $1–5M · T2 $5–20M · T3 $20–50M · T4 $50M+.","enum":["T1","T2","T3","T4"],"type":"string"},"writePhones":{"description":"Write phones to the contact record. Default false until phone precision is re-verified.","type":"boolean"}},"required":["size","creditBudget"],"type":"object"},"AdminMonitorList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/TemplateMonitor"},"type":"array"}},"required":["data"],"type":"object"},"AdminMonitorTemplate":{"properties":{"catchUpDays":{"description":"Days back the first check counts as new (90 by default).","maximum":365,"minimum":0,"type":"integer"},"category":{"maxLength":32,"minLength":1,"type":"string"},"copy":{"properties":{"headline":{"maxLength":200,"minLength":1,"type":"string"},"intro":{"maxLength":1000,"type":"string"},"plural":{"maxLength":40,"minLength":1,"type":"string"},"subject":{"maxLength":200,"minLength":1,"type":"string"}},"required":["subject","headline","intro","plural"],"type":"object"},"createdAt":{"type":"string"},"createdBy":{"type":"string"},"description":{"maxLength":500,"type":"string"},"email":{"$ref":"#/components/schemas/AlertRecipeEmailTemplate"},"family":{"enum":["past-clients","agent-partners","farm-area","watch-record"],"type":"string"},"featured":{"type":"boolean"},"grants":{"properties":{"agent":{"items":{"enum":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan","book_property","book_loan","area_property"],"type":"string"},"type":"array"},"area":{"items":{"enum":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan","book_property","book_loan","area_property"],"type":"string"},"type":"array"},"areaRules":{"properties":{"property":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"}},"type":"object"},"book":{"properties":{"loan":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"},"property":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"}},"type":"object"},"document":{"properties":{"loan":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"},"property":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"},"sale":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"}},"type":"object"},"nmls":{"items":{"enum":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan","book_property","book_loan","area_property"],"type":"string"},"type":"array"}},"type":"object"},"howItWorks":{"maxLength":2000,"type":"string"},"icon":{"type":"string"},"id":{"type":"string"},"inputs":{"items":{"properties":{"documentType":{"enum":["sale","property","loan"],"type":"string"},"help":{"maxLength":400,"type":"string"},"label":{"maxLength":80,"type":"string"},"max":{"minimum":1,"type":"integer"},"min":{"minimum":0,"type":"integer"},"required":{"type":"boolean"},"type":{"enum":["nmls","agent","area","document"],"type":"string"}},"required":["type","required"],"type":"object"},"maxItems":4,"type":"array"},"maxItemsPerRun":{"maximum":100,"minimum":1,"type":"integer"},"sortOrder":{"maximum":999999,"minimum":0,"type":"integer"},"status":{"enum":["draft","published","archived"],"type":"string"},"title":{"maxLength":80,"minLength":1,"type":"string"},"updatedAt":{"type":"string"},"updatedBy":{"type":"string"},"version":{"minimum":0,"type":"integer"}},"required":["id","title","description","icon","category","family","grants","inputs","copy","featured","sortOrder","status","version","createdBy","createdAt","updatedBy","updatedAt","catchUpDays"],"type":"object"},"AdminMonitorTemplateList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AdminMonitorTemplate"},"type":"array"}},"required":["data"],"type":"object"},"AdminMonitorTemplateRequest":{"properties":{"catchUpDays":{"description":"Days back the first check counts as new (90 by default).","maximum":365,"minimum":0,"type":"integer"},"category":{"maxLength":32,"minLength":1,"type":"string"},"copy":{"properties":{"headline":{"maxLength":200,"minLength":1,"type":"string"},"intro":{"maxLength":1000,"type":"string"},"plural":{"maxLength":40,"minLength":1,"type":"string"},"subject":{"maxLength":200,"minLength":1,"type":"string"}},"required":["subject","headline","intro","plural"],"type":"object"},"description":{"maxLength":500,"type":"string"},"email":{"$ref":"#/components/schemas/AlertRecipeEmailTemplate"},"family":{"enum":["past-clients","agent-partners","farm-area","watch-record"],"type":"string"},"featured":{"type":"boolean"},"grants":{"properties":{"agent":{"items":{"enum":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan","book_property","book_loan","area_property"],"type":"string"},"type":"array"},"area":{"items":{"enum":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan","book_property","book_loan","area_property"],"type":"string"},"type":"array"},"areaRules":{"properties":{"property":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"}},"type":"object"},"book":{"properties":{"loan":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"},"property":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"}},"type":"object"},"document":{"properties":{"loan":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"},"property":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"},"sale":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"}},"type":"object"},"nmls":{"items":{"enum":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan","book_property","book_loan","area_property"],"type":"string"},"type":"array"}},"type":"object"},"howItWorks":{"maxLength":2000,"type":"string"},"icon":{"type":"string"},"id":{"type":"string"},"inputs":{"items":{"properties":{"documentType":{"enum":["sale","property","loan"],"type":"string"},"help":{"maxLength":400,"type":"string"},"label":{"maxLength":80,"type":"string"},"max":{"minimum":1,"type":"integer"},"min":{"minimum":0,"type":"integer"},"required":{"type":"boolean"},"type":{"enum":["nmls","agent","area","document"],"type":"string"}},"required":["type","required"],"type":"object"},"maxItems":4,"type":"array"},"maxItemsPerRun":{"maximum":100,"minimum":1,"type":"integer"},"sortOrder":{"maximum":999999,"minimum":0,"type":"integer"},"title":{"maxLength":80,"minLength":1,"type":"string"},"version":{"description":"The version you read (0 for a seeded template never edited); omit to create.","minimum":0,"type":"integer"}},"required":["id","title","description","icon","category","family","grants","inputs","copy","featured","sortOrder","catchUpDays"],"type":"object"},"AdminMonitorTemplateResponse":{"properties":{"data":{"$ref":"#/components/schemas/AdminMonitorTemplate"}},"required":["data"],"type":"object"},"AdminPreviewAlertRecipeRequest":{"properties":{"inputs":{"$ref":"#/components/schemas/AlertRecipeInputs"},"userId":{"description":"Whose saved setup to replay with the recipe overlaid.","minLength":1,"type":"string"}},"required":["userId"],"type":"object"},"AdminPreviewMonitor":{"additionalProperties":false,"properties":{"orgId":{"description":"The organization to set it up in. Default: the organization on the user's alert settings.","maxLength":128,"minLength":1,"type":"string"},"rules":{"additionalProperties":false,"properties":{"areaRules":{"additionalProperties":false,"properties":{"property":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"maxItems":10,"type":"array"}},"type":"object"},"book":{"additionalProperties":false,"properties":{"loan":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"maxItems":10,"type":"array"},"property":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"maxItems":10,"type":"array"}},"type":"object"},"thresholds":{"items":{"additionalProperties":false,"properties":{"column":{"pattern":"^[a-z_][a-z0-9_]{0,62}$","type":"string"},"on":{"enum":["threshold"],"type":"string"},"op":{"enum":[">=",">","<=","<"],"type":"string"},"value":{"type":"number"}},"required":["on","column","op","value"],"type":"object"},"maxItems":5,"type":"array"}},"type":"object"},"watch":{"additionalProperties":false,"properties":{"inputs":{"additionalProperties":{"nullable":true},"type":"object"},"options":{"additionalProperties":false,"properties":{"epoThresholdDays":{"maximum":3650,"minimum":1,"type":"integer"},"kinds":{"items":{"enum":["past_client_listed","early_payoff_risk","past_client_home","past_client_loan","agent_pending","agent_sale_closed","new_listing","refi_area","area_home","sale_changed","property_changed","loan_changed"],"type":"string"},"maxItems":12,"type":"array"},"refiMarginPoints":{"maximum":5,"minimum":0,"type":"number"},"refiRateThreshold":{"maximum":10,"minimum":0,"type":"number"}},"type":"object"},"template":{"example":"farm-area","maxLength":48,"pattern":"^[a-z0-9]+(-[a-z0-9]+)*$","type":"string"}},"required":["template","inputs"],"type":"object"}},"required":["watch"],"type":"object"},"AdminPromoteUserRecipeRequest":{"properties":{"id":{"description":"The new global recipe's id (kebab-case slug ≤ 48, not `u-…`).","example":"listing-watch","type":"string"}},"required":["id"],"type":"object"},"AdminPromoteUserRecipeResponse":{"properties":{"data":{"properties":{"markerWritten":{"description":"Whether `promotedTo` was recorded on the user recipe. false when the owner edited it concurrently (the draft exists either way; `userRecipe` is then the current row, without the marker).","type":"boolean"},"recipe":{"$ref":"#/components/schemas/AdminAlertRecipe"},"userRecipe":{"$ref":"#/components/schemas/AlertUserRecipe"}},"required":["recipe","userRecipe","markerWritten"],"type":"object"}},"required":["data"],"type":"object"},"AdminPushAlertRequest":{"properties":{"dedupeKey":{"description":"Dedup key; generated server-side when omitted.","type":"string"},"orgId":{"description":"Workspace id so the push also lands in the org feed.","type":"string"},"payload":{"additionalProperties":{"nullable":true},"description":"Human description + optional link + fields.","properties":{"description":{"type":"string"},"url":{"type":"string"}},"required":["description"],"type":"object"},"type":{"description":"One of the six alert types.","enum":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan","book_property","book_loan","area_property"],"type":"string"}},"required":["type","payload"],"type":"object"},"AdminPushAlertResponse":{"properties":{"data":{"properties":{"dedupeKey":{"type":"string"},"written":{"type":"boolean"}},"required":["written","dedupeKey"],"type":"object"}},"required":["data"],"type":"object"},"AdminReplaceAlertRecipeRequest":{"description":"The full definition (everything but `id`); status is kept.","properties":{"category":{"maxLength":32,"minLength":1,"type":"string"},"copy":{"properties":{"headline":{"maxLength":200,"minLength":1,"type":"string"},"intro":{"maxLength":1000,"type":"string"},"plural":{"maxLength":40,"minLength":1,"type":"string"},"subject":{"maxLength":200,"minLength":1,"type":"string"}},"required":["subject","headline","intro","plural"],"type":"object"},"description":{"maxLength":500,"type":"string"},"email":{"$ref":"#/components/schemas/AlertRecipeEmailTemplate"},"family":{"enum":["past-clients","agent-partners","farm-area","watch-record"],"type":"string"},"featured":{"type":"boolean"},"grants":{"properties":{"agent":{"items":{"enum":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan","book_property","book_loan","area_property"],"type":"string"},"type":"array"},"area":{"items":{"enum":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan","book_property","book_loan","area_property"],"type":"string"},"type":"array"},"areaRules":{"properties":{"property":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"}},"type":"object"},"book":{"properties":{"loan":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"},"property":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"}},"type":"object"},"document":{"properties":{"loan":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"},"property":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"},"sale":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"}},"type":"object"},"nmls":{"items":{"enum":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan","book_property","book_loan","area_property"],"type":"string"},"type":"array"}},"type":"object"},"howItWorks":{"maxLength":2000,"type":"string"},"icon":{"type":"string"},"inputs":{"items":{"properties":{"documentType":{"enum":["sale","property","loan"],"type":"string"},"help":{"maxLength":400,"type":"string"},"label":{"maxLength":80,"type":"string"},"max":{"minimum":1,"type":"integer"},"min":{"minimum":0,"type":"integer"},"required":{"type":"boolean"},"type":{"enum":["nmls","agent","area","document"],"type":"string"}},"required":["type","required"],"type":"object"},"maxItems":4,"type":"array"},"maxItemsPerRun":{"maximum":100,"minimum":1,"type":"integer"},"sortOrder":{"maximum":999999,"minimum":0,"type":"integer"},"title":{"maxLength":80,"minLength":1,"type":"string"},"version":{"description":"The version you edited; a stale one answers 409 `version_conflict`.","minimum":1,"type":"integer"}},"required":["title","description","icon","category","family","grants","inputs","copy","featured","sortOrder"],"type":"object"},"AdminResyncAlertRecipeRequest":{"properties":{"rules":{"description":"Also overwrite the rules on record subscriptions carrying the recipe with its current rule templates (replaces rules users entered). Default false: only the granted kinds are rewritten.","type":"boolean"}},"type":"object"},"AdminResyncAlertRecipeResponse":{"properties":{"data":{"properties":{"deleted":{"description":"NMLS subscriptions left with nothing and removed.","type":"integer"},"matched":{"description":"Subscriptions carrying the recipe's grant.","type":"integer"},"revoked":{"description":"Grants dropped because the recipe no longer covers the subject type.","type":"integer"},"scanned":{"description":"Subscriptions read (all users).","type":"integer"},"unchanged":{"type":"integer"},"updated":{"description":"Grants (or rules) rewritten.","type":"integer"}},"required":["scanned","matched","updated","unchanged","revoked","deleted"],"type":"object"}},"required":["data"],"type":"object"},"AdminRevokeSavedFilterAccessRequest":{"additionalProperties":false,"properties":{"actor":{"description":"Who is acting, as the caller names it (`charles`, an admin user id). Defaults to the authenticated caller. Logged.","maxLength":128,"minLength":1,"type":"string"},"reason":{"description":"Why (ticket / support request id + one line). Logged.","maxLength":500,"minLength":1,"type":"string"},"userId":{"maxLength":128,"minLength":1,"type":"string"}},"required":["userId"],"type":"object"},"AdminSavedFilter":{"properties":{"createdAt":{"format":"date-time","type":"string"},"fidelity":{"description":"How much of the UI state `query` captures: `exact`; `partial` (see `unmapped`); `ui_only` — no runnable query. Defaults from whether `query` is present.","enum":["exact","partial","ui_only"],"type":"string"},"icon":{"$ref":"#/components/schemas/SavedFilterIcon"},"id":{"type":"string"},"kind":{"description":"`filter` (default) — a saved search; `view` — a saved CRM table layout (columns / order) kept in `uiState`. Views never carry a `query` and have their own 25-per-target quota. Fixed at create.","enum":["filter","view"],"type":"string"},"lastUsedAt":{"format":"date-time","nullable":true,"type":"string"},"name":{"type":"string"},"orgWidePermission":{"$ref":"#/components/schemas/SavedFilterGrantPermission"},"organizationId":{"type":"string"},"ownerUserId":{"type":"string"},"query":{"additionalProperties":{"nullable":true},"nullable":true,"type":"object"},"shareCount":{"description":"Per-user shares (the workspace-wide grant not counted).","type":"integer"},"stale":{"description":"The stored `query` no longer validates against its operation.","type":"boolean"},"target":{"description":"Which list the filter runs against. Market targets run against that entity's list operation (see `operationId`, e.g. listOriginators); `crm_people` / `crm_companies` are UI-only (filtered client-side).","enum":["originators","agents","companies","branches","offices","loans","properties","sales","crm_people","crm_companies"],"type":"string"},"updatedAt":{"format":"date-time","type":"string"},"useCount":{"type":"integer"},"visibility":{"$ref":"#/components/schemas/SavedFilterVisibility"}},"required":["id","organizationId","ownerUserId","name","icon","target","kind","visibility","orgWidePermission","shareCount","useCount","lastUsedAt","fidelity","stale","query","createdAt","updatedAt"],"type":"object"},"AdminSavedFilterDetail":{"allOf":[{"$ref":"#/components/schemas/AdminSavedFilter"},{"properties":{"shares":{"items":{"$ref":"#/components/schemas/AdminSavedFilterShare"},"type":"array"}},"required":["shares"],"type":"object"}]},"AdminSavedFilterDetailResult":{"properties":{"data":{"$ref":"#/components/schemas/AdminSavedFilterDetail"}},"required":["data"],"type":"object"},"AdminSavedFilterError":{"properties":{"code":{"description":"`NOT_ORG_MEMBER` (400): the user is not a member of the filter's workspace.","type":"string"},"error":{"type":"string"}},"required":["error"],"type":"object"},"AdminSavedFilterList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AdminSavedFilter"},"type":"array"},"pagination":{"properties":{"nextCursor":{"nullable":true,"type":"string"}},"required":["nextCursor"],"type":"object"}},"required":["data","pagination"],"type":"object"},"AdminSavedFilterShare":{"properties":{"createdAt":{"format":"date-time","type":"string"},"id":{"type":"string"},"permission":{"enum":["owner","editor","viewer"],"type":"string"},"userId":{"type":"string"}},"required":["id","userId","permission","createdAt"],"type":"object"},"AdminSavedFilterStats":{"properties":{"data":{"properties":{"byTarget":{"additionalProperties":{"type":"integer"},"type":"object"},"byVisibility":{"properties":{"organization":{"type":"integer"},"private":{"type":"integer"},"shared":{"type":"integer"}},"required":["private","organization","shared"],"type":"object"},"total":{"type":"integer"},"totalUses":{"type":"integer"},"withUsesLast30Days":{"type":"integer"}},"required":["total","byVisibility","byTarget","withUsesLast30Days","totalUses"],"type":"object"}},"required":["data"],"type":"object"},"AdminSignalsRunLaunch":{"properties":{"taskArn":{"type":"string"}},"required":["taskArn"],"type":"object"},"AdminSignalsRunRequest":{"additionalProperties":false,"properties":{"dryRun":{"description":"Train and score, and report the gate result on Job Runs, without writing scores or promoting a model. Default false.","type":"boolean"},"retrain":{"description":"Retrain the model before scoring, even if the current one is still within its retrain window. Default false.","type":"boolean"},"signal":{"description":"Which signal to run.","enum":["lo-move","client-retention","agent-pulse"],"type":"string"}},"required":["signal"],"type":"object"},"AdminSignalsStatus":{"properties":{"signals":{"items":{"properties":{"calibrationReliable":{"description":"False when `score` is not calibrated, so it should be read only as a priority (public copy words every signal's score as a priority).","nullable":true,"type":"boolean"},"gatePassed":{"nullable":true,"type":"boolean"},"metrics":{"properties":{"auc":{"nullable":true,"type":"number"},"baselineAuc":{"nullable":true,"type":"number"},"controlAuc":{"nullable":true,"type":"number"}},"required":["auc","baselineAuc","controlAuc"],"type":"object"},"modelVersion":{"nullable":true,"type":"string"},"rowsWritten":{"nullable":true,"type":"number"},"runId":{"nullable":true,"type":"string"},"scoredAt":{"nullable":true,"type":"string"},"signal":{"enum":["lo-move","client-retention","agent-pulse"],"type":"string"},"trainedAt":{"nullable":true,"type":"string"}},"required":["signal","runId","modelVersion","trainedAt","scoredAt","rowsWritten","gatePassed","calibrationReliable","metrics"],"type":"object"},"type":"array"}},"required":["signals"],"type":"object"},"AdminStudioChangePublishedOrgsRequest":{"additionalProperties":false,"properties":{"add":{"description":"Organizations to share it with.","example":["org_abc123"],"items":{"pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$","type":"string"},"maxItems":200,"type":"array"},"note":{"description":"Why, for the audit trail.","maxLength":500,"type":"string"},"remove":{"description":"Organizations to take it from. Copies they already made stay theirs.","example":["org_abc123"],"items":{"pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$","type":"string"},"maxItems":200,"type":"array"}},"type":"object"},"AdminStudioError":{"properties":{"code":{"description":"`studio_unavailable` — the Studio service is not answering (or has not been deployed with the admin view yet). `model_not_found`.","type":"string"},"error":{"type":"string"}},"required":["error"],"type":"object"},"AdminStudioHealth":{"properties":{"crm":{"properties":{"configured":{"type":"boolean"}},"required":["configured"],"type":"object"},"generatedAt":{"type":"string"},"load":{"description":"Questions and job runs in progress, and engines open, on the task that answered.","properties":{"engines":{"type":"number"},"jobs":{"type":"number"},"questions":{"type":"number"}},"required":["questions","jobs","engines"],"type":"object"},"mirror":{"description":"The local copy of the market tables on that task: states ready out of states. Null when it has none.","nullable":true,"properties":{"bytes":{"type":"number"},"failed":{"type":"number"},"paused":{"type":"boolean"},"queued":{"type":"number"},"ready":{"type":"number"},"states":{"type":"number"}},"required":["states","ready","queued","failed","bytes","paused"],"type":"object"},"organizations":{"type":"number"},"owed":{"properties":{"oldestFinishedAt":{"nullable":true,"type":"string"},"questions":{"type":"number"},"runs":{"type":"number"}},"required":["runs","questions","oldestFinishedAt"],"type":"object"},"published":{"description":"Tables ModelMatch publishes for every workspace (`mm_*`): how many, and the latest refresh. Null when publishing is off; absent from a service that predates it.","nullable":true,"properties":{"lastRefreshedAt":{"nullable":true,"type":"string"},"tables":{"type":"number"}},"required":["tables","lastRefreshedAt"],"type":"object"},"sweep":{"description":"The latest scheduled sweep that task ran; null when it has not run one since it started.","nullable":true,"properties":{"due":{"type":"number"},"failed":{"type":"number"},"finishedAt":{"nullable":true,"type":"string"},"orgs":{"type":"number"},"skipped":{"type":"number"},"startedAt":{"type":"string"},"succeeded":{"type":"number"}},"required":["startedAt","finishedAt","orgs","due","succeeded","failed","skipped"],"type":"object"}},"required":["generatedAt","load","sweep","mirror","crm","owed","organizations"],"type":"object"},"AdminStudioHealthResult":{"properties":{"data":{"$ref":"#/components/schemas/AdminStudioHealth"}},"required":["data"],"type":"object"},"AdminStudioJob":{"properties":{"alertRules":{"type":"number"},"createdAt":{"type":"string"},"createdBy":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"lastRun":{"nullable":true,"properties":{"alertsFired":{"type":"number"},"elapsedMs":{"nullable":true,"type":"number"},"error":{"nullable":true,"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"finishedAt":{"nullable":true,"type":"string"},"rowCount":{"nullable":true,"type":"number"},"runId":{"type":"string"},"startedAt":{"type":"string"},"status":{"enum":["running","succeeded","failed"],"type":"string"},"trigger":{"enum":["manual","schedule"],"type":"string"}},"required":["runId","trigger","status","startedAt","finishedAt","elapsedMs","rowCount","alertsFired","error"],"type":"object"},"name":{"type":"string"},"nextRunAt":{"nullable":true,"type":"string"},"organizationId":{"type":"string"},"runs":{"description":"Run records kept for the job (the latest few).","type":"number"},"schedule":{"enum":["manual","daily","weekly"],"type":"string"},"updatedAt":{"type":"string"}},"required":["organizationId","name","description","schedule","alertRules","createdBy","createdAt","updatedAt","nextRunAt","runs","lastRun"],"type":"object"},"AdminStudioJobList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AdminStudioJob"},"type":"array"},"pagination":{"properties":{"nextCursor":{"nullable":true,"type":"string"}},"required":["nextCursor"],"type":"object"}},"required":["data","pagination"],"type":"object"},"AdminStudioModel":{"properties":{"awaitingCharge":{"description":"A run finished and its scores are held until it is charged.","type":"boolean"},"billable":{"description":"False: its runs are not charged (a first-party creator).","type":"boolean"},"createdAt":{"type":"string"},"createdBy":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"error":{"nullable":true,"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"headline":{"description":"The report card's one-sentence headline.","nullable":true,"type":"string"},"horizonMonths":{"nullable":true,"type":"number"},"lift":{"description":"Of every 100 in the top 10% (and top 1%) of the list, how many had the outcome in testing — for the model, at random, and for the best single data point.","nullable":true,"properties":{"top10BestRulePer100":{"nullable":true,"type":"number"},"top10ModelPer100":{"nullable":true,"type":"number"},"top10RandomPer100":{"nullable":true,"type":"number"},"top1ModelPer100":{"nullable":true,"type":"number"}},"required":["top10ModelPer100","top10RandomPer100","top10BestRulePer100","top1ModelPer100"],"type":"object"},"name":{"type":"string"},"nextRunAt":{"nullable":true,"type":"string"},"organizationId":{"type":"string"},"outcome":{"description":"What it predicts: a market outcome id, or null when the outcomes are the organization's own.","nullable":true,"type":"string"},"population":{"nullable":true,"type":"string"},"running":{"nullable":true,"properties":{"kind":{"enum":["train","score"],"type":"string"},"startedAt":{"type":"string"}},"required":["kind","startedAt"],"type":"object"},"schedule":{"type":"string"},"scores":{"nullable":true,"properties":{"asOf":{"type":"string"},"refreshedAt":{"type":"string"},"rows":{"type":"number"}},"required":["rows","asOf","refreshedAt"],"type":"object"},"state":{"nullable":true,"type":"string"},"status":{"enum":["training","ready","refused","failed"],"type":"string"},"table":{"type":"string"},"updatedAt":{"type":"string"},"version":{"type":"number"}},"required":["organizationId","name","table","status","version","description","outcome","horizonMonths","population","state","schedule","createdBy","createdAt","updatedAt","nextRunAt","billable","running","awaitingCharge","scores","headline","lift","error"],"type":"object"},"AdminStudioModelDetail":{"properties":{"data":{"properties":{"model":{"$ref":"#/components/schemas/StudioModel"},"organizationId":{"type":"string"}},"required":["organizationId","model"],"type":"object"}},"required":["data"],"type":"object"},"AdminStudioModelList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AdminStudioModel"},"type":"array"},"pagination":{"properties":{"nextCursor":{"nullable":true,"type":"string"}},"required":["nextCursor"],"type":"object"}},"required":["data","pagination"],"type":"object"},"AdminStudioOrganization":{"properties":{"active":{"description":"A run, an upload or a training is in progress.","type":"boolean"},"jobs":{"type":"number"},"lastActivityAt":{"nullable":true,"type":"string"},"models":{"type":"number"},"modelsReady":{"description":"Models that have published scores.","type":"number"},"organizationId":{"type":"string"},"owedQuestions":{"description":"Background questions that have not been charged yet.","type":"number"},"owedRuns":{"description":"Finished job and model runs that have not been charged yet (the hourly scheduler collects them).","type":"number"},"questions30d":{"type":"number"},"questions7d":{"type":"number"},"uploads":{"type":"number"}},"required":["organizationId","jobs","uploads","models","modelsReady","questions7d","questions30d","lastActivityAt","owedRuns","owedQuestions","active"],"type":"object"},"AdminStudioOrganizationList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AdminStudioOrganization"},"type":"array"},"pagination":{"properties":{"nextCursor":{"nullable":true,"type":"string"}},"required":["nextCursor"],"type":"object"}},"required":["data","pagination"],"type":"object"},"AdminStudioProgramDetail":{"properties":{"data":{"properties":{"description":{"type":"string"},"lastRun":{"$ref":"#/components/schemas/AdminStudioProgramRun"},"name":{"type":"string"},"options":{"description":"The program's named switches. A run takes these and nothing else — never SQL.","items":{"properties":{"default":{"nullable":true},"description":{"type":"string"},"name":{"type":"string"}},"required":["name","description"],"type":"object"},"type":"array"},"runnable":{"description":"False: heavy runs cannot be started in this environment.","type":"boolean"},"runs":{"description":"Newest first.","items":{"$ref":"#/components/schemas/AdminStudioProgramRun"},"type":"array"},"schedule":{"nullable":true,"properties":{"nextRunAt":{"nullable":true,"type":"string"},"options":{"additionalProperties":{"nullable":true},"type":"object"},"schedule":{"enum":["manual","weekly","monthly"],"type":"string"},"setAt":{"type":"string"},"setBy":{"type":"string"}},"required":["schedule","options","nextRunAt","setBy","setAt"],"type":"object"},"tables":{"items":{"properties":{"description":{"type":"string"},"published":{"type":"boolean"},"table":{"type":"string"}},"required":["table","description","published"],"type":"object"},"type":"array"},"title":{"type":"string"}},"required":["name","title","description","tables","options","schedule","runnable","lastRun","runs"],"type":"object"}},"required":["data"],"type":"object"},"AdminStudioProgramRun":{"nullable":true,"properties":{"asOf":{"type":"string"},"dataThrough":{"nullable":true,"type":"string"},"elapsedMs":{"nullable":true,"type":"number"},"error":{"nullable":true,"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"finishedAt":{"nullable":true,"type":"string"},"options":{"additionalProperties":{"nullable":true},"type":"object"},"partialStates":{"description":"Null when the run read every state; else the state codes it read.","items":{"type":"string"},"nullable":true,"type":"array"},"progress":{"nullable":true,"properties":{"done":{"type":"number"},"step":{"type":"string"},"total":{"type":"number"}},"required":["step"],"type":"object"},"publish":{"description":"Publish the tables as soon as the run succeeds.","type":"boolean"},"publishRefused":{"description":"Why a finished run that asked to be published was not. The published version stays.","nullable":true,"type":"string"},"published":{"nullable":true,"properties":{"at":{"type":"string"},"by":{"type":"string"}},"required":["at","by"],"type":"object"},"runId":{"type":"string"},"startedAt":{"type":"string"},"startedBy":{"type":"string"},"state":{"enum":["running","succeeded","failed"],"type":"string"},"steps":{"items":{"properties":{"ms":{"type":"number"},"name":{"type":"string"}},"required":["name","ms"],"type":"object"},"type":"array"},"tables":{"items":{"properties":{"rowCount":{"type":"number"},"table":{"type":"string"}},"required":["table","rowCount"],"type":"object"},"type":"array"}},"required":["runId","state","startedAt","startedBy","finishedAt","elapsedMs","asOf","options","publish","progress","tables","dataThrough","partialStates","steps","error","published","publishRefused"],"type":"object"},"AdminStudioProgramRunStarted":{"properties":{"data":{"$ref":"#/components/schemas/AdminStudioProgramRun"}},"required":["data"],"type":"object"},"AdminStudioProgramSchedule":{"properties":{"data":{"properties":{"nextRunAt":{"nullable":true,"type":"string"},"options":{"additionalProperties":{"nullable":true},"type":"object"},"schedule":{"enum":["manual","weekly","monthly"],"type":"string"},"setAt":{"type":"string"},"setBy":{"type":"string"}},"required":["schedule","options","nextRunAt","setBy","setAt"],"type":"object"}},"required":["data"],"type":"object"},"AdminStudioProgramScheduleRequest":{"additionalProperties":false,"properties":{"options":{"additionalProperties":{"nullable":true},"description":"The program's switches, by name. Omitted ones take their documented default; an unknown one is refused.","example":{"countLeaseClosingsAsSold":true},"type":"object"},"schedule":{"enum":["manual","weekly","monthly"],"type":"string"}},"required":["schedule"],"type":"object"},"AdminStudioPrograms":{"properties":{"data":{"items":{"properties":{"description":{"type":"string"},"lastRun":{"$ref":"#/components/schemas/AdminStudioProgramRun"},"name":{"type":"string"},"options":{"description":"The program's named switches. A run takes these and nothing else — never SQL.","items":{"properties":{"default":{"nullable":true},"description":{"type":"string"},"name":{"type":"string"}},"required":["name","description"],"type":"object"},"type":"array"},"runnable":{"description":"False: heavy runs cannot be started in this environment.","type":"boolean"},"schedule":{"nullable":true,"properties":{"nextRunAt":{"nullable":true,"type":"string"},"options":{"additionalProperties":{"nullable":true},"type":"object"},"schedule":{"enum":["manual","weekly","monthly"],"type":"string"},"setAt":{"type":"string"},"setBy":{"type":"string"}},"required":["schedule","options","nextRunAt","setBy","setAt"],"type":"object"},"tables":{"items":{"properties":{"description":{"type":"string"},"published":{"type":"boolean"},"table":{"type":"string"}},"required":["table","description","published"],"type":"object"},"type":"array"},"title":{"type":"string"}},"required":["name","title","description","tables","options","schedule","runnable","lastRun"],"type":"object"},"type":"array"}},"required":["data"],"type":"object"},"AdminStudioPublishJobRequest":{"additionalProperties":false,"properties":{"allowShapeChange":{"description":"Let this version drop or retype columns of the published one. Customers' saved questions may read them: default false.","type":"boolean"},"audience":{"allOf":[{"$ref":"#/components/schemas/AdminStudioPublishedAudience"},{"description":"Who sees it. Left out: a replace keeps the audience the table has; a first publish is for every organization."}]},"columns":{"additionalProperties":{"maxLength":500,"minLength":1,"type":"string"},"description":"One plain-language line per column. Every column needs one; a column the published version already describes keeps its description.","example":{"companyNmlsId":"The company's NMLS id."},"type":"object"},"description":{"description":"What one row is and what the table answers, in plain language: every organization reads it. Required the first time, unless the job has a description.","maxLength":1000,"minLength":1,"type":"string"},"note":{"description":"Why, for the audit trail.","maxLength":500,"type":"string"},"notes":{"description":"What to know before writing SQL against it: join keys, traps.","items":{"maxLength":1000,"type":"string"},"maxItems":10,"type":"array"}},"type":"object"},"AdminStudioPublishRunRequest":{"additionalProperties":false,"properties":{"allowShapeChange":{"description":"Let this version drop or retype columns of the published one. Customers' saved questions may read them: default false.","type":"boolean"},"audience":{"allOf":[{"$ref":"#/components/schemas/AdminStudioPublishedAudience"},{"description":"Who sees it. Left out: a replace keeps the audience the table has; a first publish is for every organization."}]},"note":{"description":"Why, for the audit trail.","maxLength":500,"type":"string"}},"type":"object"},"AdminStudioPublishSystemModelRequest":{"additionalProperties":false,"properties":{"audience":{"allOf":[{"$ref":"#/components/schemas/AdminStudioPublishedAudience"},{"description":"Who sees it. Left out: a replace keeps the audience the table has; a first publish is for every organization."}]},"description":{"description":"What every organization reads about the table. Default: the model's own description.","maxLength":1000,"type":"string"},"note":{"description":"Why, for the audit trail.","maxLength":500,"type":"string"}},"type":"object"},"AdminStudioPublishedAudience":{"anyOf":[{"enum":["public"],"type":"string"},{"additionalProperties":false,"properties":{"allowCopy":{"description":"False: they may query it and read its card, but not copy it (`copyFromPublished`, `basedOnPublished`). Default true.","type":"boolean"},"orgs":{"description":"Organization ids (at most 200).","example":["org_abc123"],"items":{"pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$","type":"string"},"maxItems":200,"type":"array"}},"required":["orgs"],"type":"object"}],"default":"public","description":"Who sees the table: `\"public\"` (every organization, the default) or `{ orgs, allowCopy? }` — only those organizations. Every other organization is answered exactly as for a name that was never published (not found, never forbidden). `orgs: []` is shared with nobody; it never falls back to public."},"AdminStudioPublishedAudit":{"properties":{"data":{"items":{"properties":{"action":{"description":"`share`: only who sees the table changed (`audience`, `previousAudience`).","enum":["publish","replace","unpublish","share"],"type":"string"},"actor":{"description":"The platform admin (user id) who did it, or `system:refresh` / `system:schedule`.","type":"string"},"at":{"type":"string"},"audience":{"$ref":"#/components/schemas/AdminStudioPublishedAudience"},"id":{"type":"string"},"note":{"type":"string"},"previousAudience":{"$ref":"#/components/schemas/AdminStudioPublishedAudience"},"previousRunId":{"type":"string"},"rowCount":{"type":"number"},"runId":{"type":"string"},"source":{"properties":{"kind":{"description":"What produced the rows: a system job, a program in the repo, or a model trained in the system space.","enum":["job","program","model"],"type":"string"},"name":{"type":"string"},"options":{"additionalProperties":{"nullable":true},"description":"A program's switches, as the published run used them.","type":"object"}},"required":["kind","name"],"type":"object"},"table":{"type":"string"}},"required":["id","at","actor","action","table"],"type":"object"},"type":"array"}},"required":["data"],"type":"object"},"AdminStudioPublishedRunResult":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AdminStudioPublishedTable"},"type":"array"}},"required":["data"],"type":"object"},"AdminStudioPublishedTable":{"properties":{"asOf":{"description":"The day the rows are as of, when the run has one.","nullable":true,"type":"string"},"audience":{"$ref":"#/components/schemas/AdminStudioPublishedAudience"},"columns":{"items":{"properties":{"description":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type","description"],"type":"object"},"type":"array"},"description":{"type":"string"},"keys":{"items":{"type":"string"},"type":"array"},"maintainedBy":{"example":"ModelMatch","type":"string"},"notes":{"items":{"type":"string"},"type":"array"},"previous":{"description":"The version before this one, which every organization can query as `<table>__previous`. Null until the table has been replaced once.","nullable":true,"properties":{"refreshedAt":{"type":"string"},"rowCount":{"type":"number"},"runId":{"type":"string"},"table":{"type":"string"}},"required":["table","runId","rowCount","refreshedAt"],"type":"object"},"publishedAt":{"type":"string"},"publishedBy":{"description":"The platform admin (user id) who published this version; `system:refresh` or `system:schedule` for a scheduled refresh.","type":"string"},"refreshedAt":{"description":"When that run's rows were computed (ISO 8601).","type":"string"},"rowCount":{"type":"number"},"runId":{"description":"The run readers see now.","type":"string"},"source":{"properties":{"kind":{"description":"What produced the rows: a system job, a program in the repo, or a model trained in the system space.","enum":["job","program","model"],"type":"string"},"name":{"type":"string"},"options":{"additionalProperties":{"nullable":true},"description":"A program's switches, as the published run used them.","type":"object"}},"required":["kind","name"],"type":"object"},"table":{"description":"The name every organization queries it by.","example":"mm_retention","type":"string"}},"required":["table","maintainedBy","description","notes","columns","keys","rowCount","runId","refreshedAt","asOf","previous","source","publishedAt","publishedBy"],"type":"object"},"AdminStudioPublishedTableResult":{"properties":{"data":{"$ref":"#/components/schemas/AdminStudioPublishedTable"}},"required":["data"],"type":"object"},"AdminStudioPublishedTables":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AdminStudioPublishedTable"},"type":"array"}},"required":["data"],"type":"object"},"AdminStudioQuestion":{"properties":{"at":{"type":"string"},"billable":{"description":"False: the caller was not metered.","type":"boolean"},"finished":{"description":"How a background question ended.","properties":{"code":{"type":"string"},"ms":{"type":"number"},"status":{"type":"string"}},"required":["status","ms"],"type":"object"},"ms":{"type":"number"},"organizationId":{"type":"string"},"outcome":{"description":"`answered`, `background` (it carried on past the request; see `finished`), or the code it was refused with (`timeout`, `query_failed`, `busy`, …).","type":"string"},"queryId":{"type":"string"},"rows":{"type":"number"},"servedFrom":{"description":"`mirror` (local disk), `storage`, or `mixed`. Absent when the service has no mirror.","type":"string"},"statementMs":{"type":"number"},"states":{"description":"States the question named.","items":{"type":"string"},"type":"array"},"tables":{"items":{"type":"string"},"type":"array"},"userId":{"nullable":true,"type":"string"}},"required":["organizationId","at","userId","outcome","ms"],"type":"object"},"AdminStudioQuestionList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AdminStudioQuestion"},"type":"array"},"pagination":{"properties":{"nextCursor":{"nullable":true,"type":"string"}},"required":["nextCursor"],"type":"object"}},"required":["data","pagination"],"type":"object"},"AdminStudioRetrainSystemModelRequest":{"additionalProperties":false,"properties":{"scoresOnly":{"description":"True: only score again as of today with the trained version. Default false: train again on the latest data, with a fresh report card.","type":"boolean"}},"type":"object"},"AdminStudioSetPublishedAudienceRequest":{"additionalProperties":false,"properties":{"audience":{"$ref":"#/components/schemas/AdminStudioPublishedAudience"},"note":{"description":"Why, for the audit trail.","maxLength":500,"type":"string"}},"required":["audience"],"type":"object"},"AdminStudioStartProgramRequest":{"additionalProperties":false,"properties":{"options":{"additionalProperties":{"nullable":true},"description":"The program's switches, by name. Omitted ones take their documented default; an unknown one is refused.","example":{"countLeaseClosingsAsSold":true},"type":"object"},"publish":{"description":"Default true: the tables replace the published ones as soon as the run succeeds. False: a draft run, published later with `adminPublishStudioProgramRun`.","type":"boolean"}},"type":"object"},"AdminStudioSystemJob":{"properties":{"job":{"$ref":"#/components/schemas/StudioJob"},"published":{"allOf":[{"$ref":"#/components/schemas/AdminStudioPublishedTable"},{"description":"Null: a draft — its result is visible to platform admins only.","nullable":true}]},"publishedTable":{"description":"The table the job is, or would be, published as.","type":"string"}},"required":["job","publishedTable","published"],"type":"object"},"AdminStudioSystemJobDeleted":{"properties":{"data":{"properties":{"deleted":{"enum":[true],"type":"boolean"},"name":{"type":"string"}},"required":["deleted","name"],"type":"object"}},"required":["data"],"type":"object"},"AdminStudioSystemJobDetail":{"properties":{"data":{"properties":{"alerts":{"description":"Alert rules that matched on the latest successful run.","items":{"properties":{"events":{"items":{"properties":{"key":{"additionalProperties":{"nullable":true},"type":"object"},"previous":{"additionalProperties":{"nullable":true},"type":"object"},"row":{"additionalProperties":{"nullable":true},"type":"object"},"rule":{"type":"string"}},"required":["rule","key","row"],"type":"object"},"type":"array"},"rule":{"properties":{"column":{"description":"For `threshold`: a numeric column of the result.","type":"string"},"on":{"description":"`rows_added`: a key new since the previous run. `rows_removed`: a key gone since. `threshold`: `column` `op` `value` holds for a key now and did not before.","enum":["rows_added","rows_removed","threshold"],"type":"string"},"op":{"description":"For `threshold`: the comparison.","enum":[">=",">","<=","<"],"type":"string"},"value":{"description":"For `threshold`: the value to compare with.","type":"number"}},"required":["on"],"type":"object"},"total":{"description":"Rows the rule matched.","type":"number"}},"required":["rule","total","events"],"type":"object"},"type":"array"},"changes":{"description":"What changed in the latest successful run since the one before it. Null when there is no previous run or the job has no keys.","nullable":true,"properties":{"added":{"type":"number"},"changed":{"type":"number"},"keys":{"items":{"type":"string"},"type":"array"},"removed":{"type":"number"},"samples":{"properties":{"added":{"items":{"additionalProperties":{"nullable":true},"type":"object"},"type":"array"},"changed":{"items":{"properties":{"after":{"additionalProperties":{"nullable":true},"type":"object"},"before":{"additionalProperties":{"nullable":true},"type":"object"}},"required":["before","after"],"type":"object"},"type":"array"},"removed":{"items":{"additionalProperties":{"nullable":true},"type":"object"},"type":"array"}},"required":["added","removed","changed"],"type":"object"},"unchanged":{"type":"number"}},"required":["keys","added","removed","changed","unchanged","samples"],"type":"object"},"job":{"$ref":"#/components/schemas/StudioJob"},"published":{"allOf":[{"$ref":"#/components/schemas/AdminStudioPublishedTable"},{"description":"Null: a draft — its result is visible to platform admins only.","nullable":true}]},"publishedTable":{"description":"The table the job is, or would be, published as.","type":"string"},"result":{"description":"Where the job's rows are: query `table` like any other table. Null until the first successful run.","nullable":true,"properties":{"previousTable":{"nullable":true,"type":"string"},"table":{"type":"string"}},"required":["table","previousTable"],"type":"object"},"runs":{"description":"Newest first.","items":{"$ref":"#/components/schemas/StudioJobRun"},"type":"array"}},"required":["job","publishedTable","published","runs","changes","alerts","result"],"type":"object"}},"required":["data"],"type":"object"},"AdminStudioSystemJobRun":{"properties":{"data":{"properties":{"run":{"$ref":"#/components/schemas/StudioJobRun"},"status":{"enum":["succeeded","running"],"type":"string"}},"required":["status","run"],"type":"object"}},"required":["data"],"type":"object"},"AdminStudioSystemJobSaved":{"properties":{"data":{"$ref":"#/components/schemas/AdminStudioSystemJob"}},"required":["data"],"type":"object"},"AdminStudioSystemJobs":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AdminStudioSystemJob"},"type":"array"}},"required":["data"],"type":"object"},"AdminStudioSystemModel":{"description":"A system model: `published` is null while it is a draft, whose scores and card only platform admins can see.","properties":{"model":{"$ref":"#/components/schemas/StudioModel"},"published":{"allOf":[{"$ref":"#/components/schemas/AdminStudioPublishedTable"},{"nullable":true}]},"publishedTable":{"description":"The table it is, or would be, published as.","example":"mm_model_refi_watch","type":"string"}},"required":["model","publishedTable","published"],"type":"object"},"AdminStudioSystemModelResult":{"properties":{"data":{"$ref":"#/components/schemas/AdminStudioSystemModel"}},"required":["data"],"type":"object"},"AdminStudioSystemModels":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AdminStudioSystemModel"},"type":"array"}},"required":["data"],"type":"object"},"AdminStudioSystemQueryRequest":{"additionalProperties":false,"properties":{"limit":{"maximum":1000,"minimum":1,"type":"integer"},"sql":{"description":"One read-only SELECT, answered in the system space: drafts are tables here.","maxLength":20000,"minLength":1,"type":"string"}},"required":["sql"],"type":"object"},"AdminStudioUnpublishRequest":{"additionalProperties":false,"properties":{"note":{"description":"Why, for the audit trail.","maxLength":500,"type":"string"}},"type":"object"},"AdminStudioUnpublished":{"properties":{"data":{"properties":{"table":{"type":"string"},"unpublished":{"enum":[true],"type":"boolean"}},"required":["unpublished","table"],"type":"object"}},"required":["data"],"type":"object"},"AdminStudioUpload":{"properties":{"bytes":{"nullable":true,"type":"number"},"columns":{"description":"How many columns the table has. Never which.","type":"number"},"createdAt":{"type":"string"},"error":{"nullable":true,"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"filename":{"type":"string"},"format":{"nullable":true,"type":"string"},"name":{"type":"string"},"organizationId":{"type":"string"},"rowCount":{"nullable":true,"type":"number"},"status":{"enum":["pending","ingesting","ready","failed"],"type":"string"},"table":{"type":"string"},"uploadedAt":{"nullable":true,"type":"string"},"uploadedBy":{"nullable":true,"type":"string"},"warnings":{"description":"How many warnings the file raised. Never their text.","type":"number"}},"required":["organizationId","name","table","status","filename","format","uploadedBy","createdAt","uploadedAt","rowCount","bytes","columns","warnings","error"],"type":"object"},"AdminStudioUploadList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AdminStudioUpload"},"type":"array"},"pagination":{"properties":{"nextCursor":{"nullable":true,"type":"string"}},"required":["nextCursor"],"type":"object"}},"required":["data","pagination"],"type":"object"},"AdminTransactionFlag":{"properties":{"createdAt":{"format":"date-time","type":"string"},"details":{"nullable":true,"type":"string"},"id":{"type":"string"},"profile":{"nullable":true,"properties":{"id":{"type":"string"},"type":{"enum":["agent","loan-officer","company"],"type":"string"},"url":{"nullable":true,"type":"string"}},"required":["type","id","url"],"type":"object"},"property":{"properties":{"address":{"type":"string"},"mmPropertyId":{"type":"string"}},"required":["mmPropertyId","address"],"type":"object"},"publishError":{"nullable":true,"type":"string"},"published":{"description":"Whether the `transaction.flag.submitted` event went out.","type":"boolean"},"reason":{"enum":["wrong-loan-amount","wrong-lo-or-company","wrong-property-details","duplicate","missing-details","missing-transaction","other"],"type":"string"},"reporter":{"properties":{"email":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"organizationId":{"type":"string"},"userId":{"type":"string"}},"required":["userId","organizationId","name","email"],"type":"object"},"resolution":{"description":"Empty (all null) while `open`.","properties":{"note":{"nullable":true,"type":"string"},"resolvedAt":{"format":"date-time","nullable":true,"type":"string"},"resolvedByUserId":{"nullable":true,"type":"string"}},"required":["note","resolvedByUserId","resolvedAt"],"type":"object"},"status":{"enum":["open","resolved","dismissed"],"type":"string"},"transaction":{"properties":{"eventDate":{"type":"string"},"eventId":{"type":"string"},"eventType":{"enum":["listing","sold","mortgage"],"type":"string"},"summary":{"type":"string"}},"required":["eventId","eventType","eventDate","summary"],"type":"object"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","status","property","transaction","reason","details","profile","reporter","resolution","published","publishError","createdAt","updatedAt"],"type":"object"},"AdminTransactionFlagList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AdminTransactionFlag"},"type":"array"},"nextCursor":{"nullable":true,"type":"string"}},"required":["items","nextCursor"],"type":"object"},"AdminTransactionFlagResolveRequest":{"additionalProperties":false,"properties":{"note":{"maxLength":1000,"type":"string"},"status":{"enum":["resolved","dismissed"],"type":"string"}},"required":["status"],"type":"object"},"AdminUpdateAlertConditionsRequest":{"properties":{"conditions":{"$ref":"#/components/schemas/AlertConditions"},"email":{"type":"string"},"emailEnabled":{"deprecated":true,"description":"Deprecated and ignored: accepted for compatibility, but not stored and no longer controls delivery (the response always reports every flag off). Email and in-app channel preferences for alerts live in Notifications settings.","properties":{"agent_sale_closed":{"type":"boolean"},"area_new_listing":{"type":"boolean"},"borrower_listed":{"type":"boolean"},"epo_risk":{"type":"boolean"},"rate_term_refi_area":{"type":"boolean"},"watched_agent_pending":{"type":"boolean"},"watched_loan":{"type":"boolean"},"watched_property":{"type":"boolean"},"watched_sale":{"type":"boolean"}},"type":"object"},"enabled":{"properties":{"agent_sale_closed":{"type":"boolean"},"area_new_listing":{"type":"boolean"},"borrower_listed":{"type":"boolean"},"epo_risk":{"type":"boolean"},"rate_term_refi_area":{"type":"boolean"},"watched_agent_pending":{"type":"boolean"},"watched_loan":{"type":"boolean"},"watched_property":{"type":"boolean"},"watched_sale":{"type":"boolean"}},"type":"object"},"name":{"type":"string"},"nmlsId":{"type":"string"},"orgId":{"description":"Workspace id stamped on the config (admin supplies it). Required — alerts are org-scoped, so a config can't exist without a workspace.","minLength":1,"type":"string"}},"required":["orgId"],"type":"object"},"AdminUpdateSavedFilterRequest":{"additionalProperties":false,"properties":{"actor":{"description":"Who is acting, as the caller names it (`charles`, an admin user id). Defaults to the authenticated caller. Logged.","maxLength":128,"minLength":1,"type":"string"},"icon":{"$ref":"#/components/schemas/SavedFilterIcon"},"name":{"maxLength":100,"minLength":1,"type":"string"},"orgWidePermission":{"allOf":[{"$ref":"#/components/schemas/SavedFilterGrantPermission"},{"description":"The whole workspace's role; also sets `visibility: organization`."}]},"ownerUserId":{"description":"Transfer ownership to another member of the filter's workspace (400 `NOT_ORG_MEMBER` otherwise). The new owner's own share, if any, is removed; the transfer does not count against their quota.","maxLength":128,"minLength":1,"type":"string"},"reason":{"description":"Why (ticket / support request id + one line). Logged.","maxLength":500,"minLength":1,"type":"string"},"visibility":{"allOf":[{"$ref":"#/components/schemas/SavedFilterVisibility"},{"description":"`private` removes every share; `shared` removes the workspace-wide grant."}]}},"type":"object"},"AgentAka":{"properties":{"lastTransactionDate":{"nullable":true,"type":"string"},"name":{"type":"string"},"transactions":{"nullable":true,"type":"number"}},"required":["name","transactions","lastTransactionDate"],"type":"object"},"AgentChartMeasure":{"default":"units","description":"Which metric each bar reports, AND what the bars are ranked by — the list is ordered by the measure you ask for, descending. Defaults to `units`, so an unqualified \"top originators\" means the busiest; pass `volume` for the biggest by dollars, or an average to rank by that average. Two things to know about the averages specifically. Buckets built from fewer than 5 documents are dropped from an average chart entirely, because a mean says nothing about how many transactions produced it and a single-transaction bucket would otherwise outrank real ones; no floor is applied to `units` or `volume`, where a lone large transaction is a legitimate top bar. And ranking a bucket list by a sub-aggregated average is approximate in the search engine — each shard contributes its own local top-N before they are merged — so treat the ordering of an average chart as indicative near the boundary rather than exact. Every bucket publishes its own `count`, so the sample size behind a value is never implicit.","enum":["volume","units","avgSalePrice"],"type":"string"},"AgentChartRequest":{"additionalProperties":false,"properties":{"id":{"type":"string"},"ids":{"items":{"type":"string"},"type":"array"},"measure":{"$ref":"#/components/schemas/AgentChartMeasure"},"period":{"$ref":"#/components/schemas/Period"},"slice":{"$ref":"#/components/schemas/AgentChartSlice"}},"required":["slice"],"type":"object"},"AgentChartSlice":{"enum":["city","county","state","zip"],"type":"string"},"AgentContactEntry":{"properties":{"lastTransactionDate":{"nullable":true,"type":"string"},"transactions":{"nullable":true,"type":"number"},"type":{"enum":["email","mobile","direct","office"],"type":"string"},"value":{"type":"string"}},"required":["value","type","transactions","lastTransactionDate"],"type":"object"},"AgentContacts":{"properties":{"emails":{"items":{"type":"string"},"type":"array"},"phones":{"items":{"properties":{"number":{"type":"string"},"type":{"enum":["mobile","direct","office"],"type":"string"}},"required":["number","type"],"type":"object"},"type":"array"},"socialLinks":{"items":{"type":"string"},"type":"array"},"website":{"nullable":true,"type":"string"}},"required":["emails","phones","website","socialLinks"],"type":"object"},"AgentCountyFilterValue":{"anyOf":[{"pattern":"^\\d{5}$","type":"string"},{"description":"Match any of several counties","items":{"pattern":"^\\d{5}$","type":"string"},"type":"array"},{"nullable":true}],"description":"County, keyed by 5-digit county FIPS code (e.g. `06037` = Los Angeles, CA; `04013` = Maricopa, AZ). By default matches agents who closed transactions in this county (production alone — unlike `city`/`state`/`zip`, which an office address also satisfies); with `locationSource: \"office\"` it matches agents whose CURRENT office lies inside the county boundary. A county NAME is REJECTED with a 400 naming the expected format; resolve the name to its FIPS code first (via instantSearch), or use `city`/`state`, which do accept names. Location dimensions AND with each other, so `county` + `state` returns only agents matching both."},"AgentCrmListFilter":{"additionalProperties":false,"description":"Scope the result to the caller's CRM. Resolved against the caller's ACTIVE WORKSPACE at query time — list membership is read server-side, so the request never carries member ids. Only real-estate-agent members count; loan officers and manual (unlinked) records on the same list are ignored. `mode: \"in\"` with no matching members returns an empty page (not an unfiltered one). Errors: 400 `crm_list_requires_workspace` when the caller has no active workspace (API-key / OAuth callers must select an organization), 403 / 404 when a named list is not visible to the caller or does not exist, and 400 `crm_list_too_large` when the selected lists hold more than 50,000 agents in total — narrow the selection rather than get a silently partial answer.","properties":{"lists":{"anyOf":[{"description":"Every list in the caller's workspace that the caller can see (own, org-wide, or shared with them) and that holds this kind of record — People lists for originators and agents, Company lists for companies.","enum":["any"],"type":"string"},{"description":"Specific CRM list ids (1–50).","items":{"minLength":1,"type":"string"},"maxItems":50,"minItems":1,"type":"array"}],"description":"Which lists: `\"any\"` for every People list the caller can see, or an array of list ids. Membership is the UNION across the selected lists."},"mode":{"description":"`in` — only agents who are a member of the selected list(s). `notIn` — exclude every agent who is a member of the selected list(s); everyone else passes, including agents on none of your lists.","enum":["in","notIn"],"type":"string"}},"required":["mode","lists"],"type":"object"},"AgentDealFilters":{"additionalProperties":false,"description":"Deal filters beyond the sale `flatFilters`. Loan-side keys (`financed`, `loan`) and the loan / party sorts consider the newest 10,000 matching sales; `truncated` says when more matched.","properties":{"coListAgentName":{"description":"Co-listing agent name: every word must start a word of the name the MLS recorded.","maxLength":100,"minLength":1,"type":"string"},"financed":{"description":"`true`: deals with a purchase loan on file; `false`: none on file (cash, or not yet recorded).","type":"boolean"},"hasBuilder":{"description":"`true`: new construction — the sale or its purchase loan names a builder (or a builder seller).","type":"boolean"},"loan":{"$ref":"#/components/schemas/AgentSaleLoanFilters"},"search":{"description":"Address search: every word must start a word of the street line, city or ZIP (\"12 oak\" → 1200 Oakmont Dr).","maxLength":100,"minLength":1,"type":"string"},"statusDate":{"allOf":[{"$ref":"#/components/schemas/DateFilterValue"},{"description":"MLS status-change date range. With `mlsStatus: \"ACT\"`, `{gte}` keeps listings still active recently."}]}},"type":"object"},"AgentDetail":{"allOf":[{"$ref":"#/components/schemas/AgentSummary"},{"properties":{"akas":{"description":"Name variations recorded on past transactions.","items":{"$ref":"#/components/schemas/AgentAka"},"type":"array"},"contactHistory":{"description":"Every email and phone on the record with how often and how recently it was seen (`contacts` without the counters).","items":{"$ref":"#/components/schemas/AgentContactEntry"},"type":"array"},"contacts":{"$ref":"#/components/schemas/AgentContacts"},"licenses":{"items":{"$ref":"#/components/schemas/AgentLicense"},"nullable":true,"type":"array"},"linkedProfileCount":{"description":"Total consolidated records for this agent, before the 20-entry cap applied to `linkedProfiles`.","nullable":true,"type":"number"},"linkedProfiles":{"description":"Additional records consolidated into this agent — the SAME person as captured by different data sources, not teammates or a team roster. Useful for the alternate contact details and the transaction window each record carries. Ordered by transaction count, highest first, and capped at 20 entries; `linkedProfileCount` is the uncapped total.","items":{"$ref":"#/components/schemas/AgentLinkedProfile"},"nullable":true,"type":"array"},"offices":{"items":{"$ref":"#/components/schemas/AgentOfficeEntry"},"type":"array"},"scored":{"nullable":true}},"type":"object"}]},"AgentDetailResponse":{"properties":{"data":{"$ref":"#/components/schemas/AgentDetail"}},"required":["data"],"type":"object"},"AgentEmailFilterValue":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"nullable":true}],"description":"Email address, matched EXACTLY (case and surrounding whitespace normalized). Matches the agent's current email OR any email in their contact history, so an agent is found by an address they used on past transactions. An array matches any."},"AgentField":{"enum":["office","city","state","zip","volume","units","avgSalePrice","buyerVolume","buyerUnits","sellerVolume","sellerUnits","dualVolume","dualUnits","name","firstName","lastName","email","producersOnly","mortgagedBuyerVolume","mortgagedBuyerUnits","mortgagedSellerVolume","mortgagedSellerUnits","mortgagedDualVolume","mortgagedDualUnits","avgMortgagedLoanAmount","totalOriginatorsWorkedWith","totalCompaniesWorkedWith","totalLendersWorkedWith"],"type":"string"},"AgentFootprintFilter":{"additionalProperties":false,"properties":{"avgLoanAmount":{"allOf":[{"$ref":"#/components/schemas/FootprintRange"},{"description":"Mean loan size financed by this lender on the agent's deals."}]},"dimension":{"description":"Which footprint to address. Only `lender` is available for agents — it is inferred from a `lender` key, so you rarely pass this. Name it to ask the ANY-lender question (`{dimension:'lender', volume:{gte:10000000}}` = 'some single lender financed $10M of their sales'). A geographic dimension is a 400 naming the per-agent markets endpoint, which live-aggregates that answer.","enum":["zip","city","county","state","lender"],"type":"string"},"lender":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}],"description":"Financing lender, as an id from `listLenders` or `instantSearch`. Lender names are stored in a normalized dictionary form, so a typed name does not match — resolve it first. Several values UNION."},"not":{"description":"Invert the whole entry: match agents with NO lender relationship matching it.","type":"boolean"},"product":{"$ref":"#/components/schemas/FootprintProductFilter"},"units":{"allOf":[{"$ref":"#/components/schemas/FootprintRange"},{"description":"Count of the agent's transactions financed by this lender during the selected period."}]},"volume":{"$ref":"#/components/schemas/FootprintRange"}},"type":"object"},"AgentLicense":{"properties":{"expirationDate":{"nullable":true,"type":"string"},"number":{"nullable":true,"type":"string"},"state":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"}},"type":"object"},"AgentLicenseFilterValue":{"anyOf":[{"type":"string"},{"description":"Match any of several licenses","items":{"type":"string"},"type":"array"},{"nullable":true}],"description":"Real-estate license number, matched EXACTLY. Case and surrounding whitespace are normalized, so `EB00084246`, `eb00084246` and `\" eb00084246 \"` all behave identically — paste straight from a spreadsheet or PDF. Punctuation is NOT normalized: `52219-90` and `5221990` are treated as different licenses, because separator-insensitive matching merges distinct agents. Matches against EVERY license on the agent's record, not just the one shown as `licenseNumber` on the response row — an agent licensed in two states is found by either. Fuzzy `{match}` is rejected with a 400: a near-miss on a license number is a different person, not a typo to forgive. Present on roughly 49% of agents; the rest carry no license at all and cannot be matched by this filter."},"AgentLinkedProfile":{"properties":{"email":{"nullable":true,"type":"string"},"firstTransactionDate":{"nullable":true,"type":"string"},"lastTransactionDate":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"officePhone":{"nullable":true,"type":"string"},"phone":{"nullable":true,"type":"string"},"transactions":{"description":"Transactions observed on this record.","nullable":true,"type":"number"}},"type":"object"},"AgentListRequest":{"additionalProperties":false,"properties":{"advancedFilters":{"$ref":"#/components/schemas/FilterNode"},"crmList":{"$ref":"#/components/schemas/AgentCrmListFilter"},"excludeOfficeGroups":{"description":"Drop these brand groups (same gate).","items":{"enum":["compass_legacy","anywhere","franchise","others"],"type":"string"},"maxItems":4,"minItems":1,"type":"array","x-mm-entitlement":"rocket-filter"},"filters":{"$ref":"#/components/schemas/FilterNode"},"flatFilters":{"additionalProperties":false,"properties":{"activeListings":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Current active listings (not period-scoped). `{gte: 1}` = has listings."}]},"avgMortgagedLoanAmount":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean loan size across the agent's financed deals — the price band their buyers actually borrow in."}]},"avgSalePrice":{"$ref":"#/components/schemas/NumericFilterValue"},"buyerUnits":{"$ref":"#/components/schemas/NumericFilterValue"},"buyerVolume":{"$ref":"#/components/schemas/NumericFilterValue"},"city":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"City — matches across ALL of an agent's location signals (listed city, office address, AND transaction/production markets), OR'd together. An agent can match this city while their row's displayed `city`/`state` (their primary market) is elsewhere. Cities in several states: write each as `\"City, ST\"` (`[\"Springfield, IL\", \"Austin, TX\"]`) — each binds to its own state; a bare name plus a `state` list cross-pairs."}]},"county":{"$ref":"#/components/schemas/AgentCountyFilterValue"},"currentOffice":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Brokerage/office name(s), OR'd: each a case-insensitive whole-word phrase (`\"compass\"` matches \"Compass RE\", not \"Encompass\"); end with `*` for a prefix (`\"washington fine*\"`); names with punctuation (`\"@properties\"`) match as a substring. `{match}` is a fuzzy single-name match. Matches only the agent's CURRENT office; `office` takes the same values and matches ANY office on record."}]},"currentOfficeKey":{"anyOf":[{"minLength":1,"type":"string"},{"items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"}],"description":"Office roster: agents whose CURRENT office is this office id (the `id` from `listOffices` / `instantSearch`, raw or encoded). Several ids OR."},"dualUnits":{"$ref":"#/components/schemas/NumericFilterValue"},"dualVolume":{"$ref":"#/components/schemas/NumericFilterValue"},"email":{"$ref":"#/components/schemas/AgentEmailFilterValue"},"excludeCurrentOffice":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Drop agents whose CURRENT office matches these names."}]},"excludeOffice":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Drop agents with ANY office matching these names (same grammar as `office`)."}]},"firstName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"deprecated":true,"description":"Deprecated: the fuzzy name filters can return the wrong agent. Resolve the agent via instantSearch (POST /v1/instant-search) and pass the returned `id` to the `id` filter for an exact match."}]},"geoPoint":{"$ref":"#/components/schemas/GeoFilterValue"},"hasEmail":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Whether the row's `email` is populated."}]},"hasPhone":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Whether the row's `phone` is populated."}]},"id":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exact agent id — the `id` returned by instantSearch (same value as `modelMatchId`). Resolves the agent by its canonical ModelMatch id or any since-merged legacy id. Preferred over the fuzzy `name` filter."}]},"lastName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"deprecated":true,"description":"Deprecated: the fuzzy name filters can return the wrong agent. Resolve the agent via instantSearch (POST /v1/instant-search) and pass the returned `id` to the `id` filter for an exact match."}]},"lastTransactionDate":{"allOf":[{"$ref":"#/components/schemas/DateFilterValue"},{"description":"Date of the agent's newest deal inside the selected period — \"recently active\". `{gte: \"2026-07-01\"}`. Only producing agents carry it."}]},"licenseNumber":{"$ref":"#/components/schemas/AgentLicenseFilterValue"},"licensedSinceDate":{"allOf":[{"$ref":"#/components/schemas/DateFilterValue"},{"description":"Original issue date of a real-estate license on the record (any license) — \"new agents\": `{gte: \"2025-10-01\"}`. Lifetime, not period-scoped; on ~26% of agents."}]},"mode":{"enum":["and","or"],"type":"string"},"modelMatchId":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Alias of `id` — the agent's ModelMatch id. Exact match (canonical or since-merged legacy id)."}]},"mortgagedBuyerUnits":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Count of the agent's buyer-side deals that were financed — the sharpest 'how many mortgage introductions can this agent make' number on the record."}]},"mortgagedBuyerVolume":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Dollar volume of the agent's BUYER-side deals that were financed. Measured independently of `buyerVolume`, not carved out of it, so it is not guaranteed to be smaller."}]},"mortgagedDualUnits":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Count of the agent's dual-agency deals that were financed."}]},"mortgagedDualVolume":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Dollar volume of the agent's dual-agency deals that were financed."}]},"mortgagedSellerUnits":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Count of the agent's seller-side (listing) deals whose buyer financed."}]},"mortgagedSellerVolume":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Dollar volume of the agent's SELLER-side (listing) deals whose buyer financed."}]},"name":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"deprecated":true,"description":"Deprecated: the fuzzy name filters can return the wrong agent. Resolve the agent via instantSearch (POST /v1/instant-search) and pass the returned `id` to the `id` filter for an exact match."}]},"namePrefix":{"description":"Prefix name search: every word must start a word of the name (\"jen ro\" → Jennifer Rodriguez). No fuzzy/nickname matching; relevance-ranked unless `sort` is set. Max 100 chars / 6 words (emails, URLs, phones ignored), else 400.","minLength":1,"type":"string"},"office":{"$ref":"#/components/schemas/TextFilterValue"},"percentUnitsMortgaged":{"anyOf":[{"type":"number"},{"description":"Match any value","items":{"type":"number"},"type":"array"},{"description":"Numeric range. Excludes null/missing-field docs by default; add `includeNulls: true` to keep them.","properties":{"gt":{"type":"number"},"gte":{"type":"number"},"includeNulls":{"description":"Also keep docs where the field is null/missing (a range filter drops them by default). Requires at least one of gte/lte/gt/lt.","type":"boolean"},"lt":{"type":"number"},"lte":{"type":"number"}},"type":"object"},{"nullable":true}],"description":"Share of the agent's TRANSACTIONS that were financed with a mortgage, as a 0–100 percent — the by-count twin of `percentVolumeMortgaged`, and the better one when deal size varies wildly. Same 0–100 clamp."},"percentVolumeMortgaged":{"anyOf":[{"type":"number"},{"description":"Match any value","items":{"type":"number"},"type":"array"},{"description":"Numeric range. Excludes null/missing-field docs by default; add `includeNulls: true` to keep them.","properties":{"gt":{"type":"number"},"gte":{"type":"number"},"includeNulls":{"description":"Also keep docs where the field is null/missing (a range filter drops them by default). Requires at least one of gte/lte/gt/lt.","type":"boolean"},"lt":{"type":"number"},"lte":{"type":"number"}},"type":"object"},{"nullable":true}],"description":"Share of the agent's sale volume that was financed with a mortgage, as a 0–100 percent. `{gte:80}` = 'almost everything they sell is financed' (211,079 agents over the last 12 months); `{lte:20}` finds cash-heavy books. Values are clamped at 100 — a small number of records carry a computed percent above 100, and they are treated as fully financed rather than silently kept or dropped. Bounds outside 0–100 are rejected."},"phone":{"$ref":"#/components/schemas/AgentPhoneFilterValue"},"producersOnly":{"$ref":"#/components/schemas/BooleanFilterValue"},"sellerUnits":{"$ref":"#/components/schemas/NumericFilterValue"},"sellerVolume":{"$ref":"#/components/schemas/NumericFilterValue"},"state":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"State — matches across ALL of an agent's location signals (listed state, office address, AND transaction/production markets), OR'd together. So an agent whose office is in another state still matches if they closed transactions here."}]},"totalCompaniesWorkedWith":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"How many distinct mortgage COMPANIES financed this agent's deals in the selected period."}]},"totalLendersWorkedWith":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"How many distinct LENDERS financed this agent's deals in the selected period."}]},"totalOriginatorsWorkedWith":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"How many DISTINCT loan officers financed this agent's deals in the selected period. `{lte:1}` finds agents with a single LO relationship — the displacement target; `{gte:5}` finds agents who spread their referrals around. Same number shown on the response row."}]},"units":{"$ref":"#/components/schemas/NumericFilterValue"},"volume":{"$ref":"#/components/schemas/NumericFilterValue"},"zip":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"ZIP — matches across ALL of an agent's location signals, OR'd together: an office postal code, OR a ZIP they actually closed transactions in (their production market). So an agent whose office is elsewhere still matches if they sold here, and the `zip` shown on their row (their primary market) can differ from the one you searched. Supply the 5-digit form; ZIP+4 input is reduced to its 5-digit prefix. Canonical key; `zipCode` is an accepted alias."}]},"zipCode":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Alias of `zip` — identical behavior. Kept so the `zipCode` spelling used by loans/sales works here too."}]}},"type":"object"},"footprint":{"anyOf":[{"$ref":"#/components/schemas/AgentFootprintFilter"},{"items":{"$ref":"#/components/schemas/AgentFootprintFilter"},"type":"array"}],"description":"Scoped lender filter(s). Each entry names ONE financing relationship and the metric bounds that must hold INSIDE it — `{lender:'<id>', volume:{gte:10000000}}` means '$10M of their sales were financed by that lender', not '$10M of sales and one deal with them'. Several entries AND together. Geographic market filters are not available here: use `POST /v1/agents/{id}/markets` (live-aggregated) for an agent's geography."},"include":{"description":"Opt-in row blocks.","items":{"enum":["contacts","offices","loanMix"],"type":"string"},"type":"array"},"lenderFilters":{"items":{"$ref":"#/components/schemas/LenderFilterEntry"},"type":"array"},"lenderMatchMode":{"$ref":"#/components/schemas/LenderMatchMode"},"locationSource":{"$ref":"#/components/schemas/AgentLocationSource"},"losOnMyTeam":{"$ref":"#/components/schemas/AgentLosOnMyTeamFilter"},"near":{"$ref":"#/components/schemas/AgentNearFilter"},"officeGroups":{"description":"Current office in any of these brand groups. Needs the `rocket-filter` entitlement (else 403).","items":{"enum":["compass_legacy","anywhere","franchise","others"],"type":"string"},"maxItems":4,"minItems":1,"type":"array","x-mm-entitlement":"rocket-filter"},"pagination":{"$ref":"#/components/schemas/Pagination"},"period":{"$ref":"#/components/schemas/Period"},"productMix":{"$ref":"#/components/schemas/AgentProductMixFilter"},"sideDominance":{"$ref":"#/components/schemas/AgentSideDominance"},"sort":{"description":"`city`, `state`, `zip` and `office` order by the agent's CURRENT office — the same office each row shows. Agents with no current-office address sort last in both directions, including agents whose `state` comes only from their license record. The `city`/`state`/`zip` FILTERS are broader: they match any office or any sale location.","items":{"properties":{"field":{"$ref":"#/components/schemas/AgentField"},"order":{"$ref":"#/components/schemas/SortOrder"}},"required":["field"],"type":"object"},"type":"array"}},"type":"object"},"AgentListResponse":{"properties":{"cursor":{"type":"string"},"data":{"items":{"$ref":"#/components/schemas/AgentListRow"},"type":"array"},"locationNormalizations":{"description":"How each location filter value resolved. Present when a `city`/`county`/`state`/`zip` filter was supplied.","items":{"$ref":"#/components/schemas/LocationNormalization"},"type":"array"},"total":{"type":"number"}},"required":["data","total"],"type":"object"},"AgentListRow":{"properties":{"avgSoldPrice":{"nullable":true,"type":"number"},"buyerUnits":{"nullable":true,"type":"number"},"buyerVolume":{"nullable":true,"type":"number"},"city":{"nullable":true,"type":"string"},"contacts":{"$ref":"#/components/schemas/AgentContacts"},"dualUnits":{"nullable":true,"type":"number"},"dualVolume":{"nullable":true,"type":"number"},"email":{"nullable":true,"type":"string"},"firstName":{"nullable":true,"type":"string"},"fullName":{"nullable":true,"type":"string"},"id":{"description":"Document ID","type":"string"},"lastName":{"nullable":true,"type":"string"},"licenseNumber":{"nullable":true,"type":"string"},"loanMix":{"items":{"$ref":"#/components/schemas/AgentLoanMixEntry"},"type":"array"},"modelMatchId":{"nullable":true,"type":"string"},"office":{"nullable":true,"type":"string"},"offices":{"items":{"$ref":"#/components/schemas/AgentOfficeEntry"},"type":"array"},"phone":{"nullable":true,"type":"string"},"sellerUnits":{"nullable":true,"type":"number"},"sellerVolume":{"nullable":true,"type":"number"},"state":{"nullable":true,"type":"string"},"totalCompaniesWorkedWith":{"nullable":true,"type":"number"},"totalLendersWorkedWith":{"nullable":true,"type":"number"},"totalOriginatorsWorkedWith":{"nullable":true,"type":"number"},"units":{"nullable":true,"type":"number"},"volume":{"nullable":true,"type":"number"},"zip":{"nullable":true,"type":"string"}},"required":["id"],"type":"object"},"AgentLoanMixEntry":{"properties":{"key":{"type":"string"},"volume":{"type":"number"}},"required":["key","volume"],"type":"object"},"AgentLoanMixRequest":{"additionalProperties":false,"properties":{"advancedFilters":{"$ref":"#/components/schemas/FilterNode"},"filters":{"$ref":"#/components/schemas/FilterNode"},"flatFilters":{"additionalProperties":false,"properties":{"borrowerStatus":{"$ref":"#/components/schemas/LoanBorrowerStatusFilterValue"},"broker":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Broker shop NMLS id (digits only). A broker is a company — resolve a broker name to its NMLS id via instantSearch (or listCompanies)."}]},"buyerEntityType":{"$ref":"#/components/schemas/BooleanFilterValue"},"city":{"$ref":"#/components/schemas/TextFilterValue"},"conforming":{"$ref":"#/components/schemas/BooleanFilterValue"},"county":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"County name (e.g. \"Broward\") or 5-digit FIPS code. Names resolve to FIPS server-side; include a `state` filter to disambiguate."}]},"currentBalance":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Estimated remaining principal balance (~19% populated). Approximate current equity as `homeValue` (AVM) minus this."}]},"employer":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Employer/company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"equity":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Point-in-time equity recorded on the loan (sparse, ~10%). NOT a live current-equity figure. For HELOC/cash-out targeting on up-to-date equity, use properties search (listProperties) instead — its equity is far better populated and current."}]},"excludeBroker":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans brokered by this broker-shop NMLS id (digits only) — the inverse of `broker`."}]},"excludeCity":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this city — the inverse of `city`."}]},"excludeLender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans from this lender ID (\"everyone but X\") — the inverse of `lender`, same id contract (resolve via instantSearch/listLenders). Loans with no lender stay in the results."}]},"excludeLoanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans funded by this company NMLS id (digits only) — the inverse of `loanCompany`."}]},"excludeLoanType":{"$ref":"#/components/schemas/LoanTypeExcludeFilterValue"},"excludeOriginator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans with this originator NMLS id (digits only) — the inverse of `originator`. Common for 'everyone but my own shop' lists."}]},"excludeState":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this state (2-letter code, e.g. \"CA\") — the inverse of `state`. For \"everywhere but this state\" lists."}]},"excludeTransactionType":{"$ref":"#/components/schemas/LoanTransactionTypeExcludeFilterValue"},"excludeZipCode":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this ZIP code — the inverse of `zipCode`."}]},"fips":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exact 5-digit county FIPS code (no name resolution) — the code-only escape hatch alongside `county`."}]},"geoPoint":{"$ref":"#/components/schemas/GeoFilterValue"},"homeValue":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"AVM (automated valuation) at the linked property (~26%, MLS-linked). Pair with `currentBalance` to approximate current equity."}]},"includeUnknownOriginator":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Include loans that have no originator NMLS id. Omitted/false (default): such loans are excluded — the vast majority are pre-2016 public records with no linkable originator. true: include them. Note that the default scopes results to loans with a known originator (~2016+ recordings)."}]},"interestRate":{"$ref":"#/components/schemas/NumericFilterValue"},"lender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender ID — the normalized lender-dictionary key, NOT a fuzzy name match. Resolve a lender via instantSearch (or listLenders) and pass the `id` it returns (e.g. \"mortgage_rocket\" or \"mortgage rocket\"). Underscores and letter case are normalized, so either id surface works. A stored normalized lender name (what the `slice: \"lender\"` chart buckets emit) is also accepted, so a chart bucket key filters directly. A value that is neither returns 400 rather than silently matching nothing — to search by lender NAME, use `lenderName`."}]},"lenderName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender name as recorded on the loan document — fuzzy, all-terms match (e.g. \"Fifth Third\"). The name counterpart to the exact-id `lender` filter; use `lender` when you have a resolved id, and this when you only have a name."}]},"loanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Funding/loan company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"loanType":{"$ref":"#/components/schemas/LoanTypeFilterValue"},"ltvAtOrigination":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Loan-to-value at ORIGINATION (sparse), as a PERCENT on a 0-100 scale (`80` = 80% LTV; values above 100 are real underwater loans). This is not a current LTV — there is no stored current-LTV field on loans."}]},"mode":{"enum":["and","or"],"type":"string"},"mortgageAmount":{"$ref":"#/components/schemas/NumericFilterValue"},"mortgageDate":{"$ref":"#/components/schemas/DateFilterValue"},"originator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Loan originator NMLS id (digits only). To search by name use `originatorName`, or resolve a name to its id via instantSearch."}]},"originatorName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"deprecated":true,"description":"DEPRECATED — fuzzy name matching is unreliable (same originator can return wildly different counts by name string). Resolve the loan officer via instantSearch and filter by `originator` (exact NMLS id) instead. Still functional for now."}]},"propertyId":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Parcel id — returns every loan recorded against one property. Pass the same string this endpoint returns as `mmPropertyId` on a loan row, or the `mmPropertyId` of a property record.\n\nThis is the parcel's FULL recorded loan history, which is deliberately wider than the loans embedded on a property record: that embed is a snapshot of what is still owed (up to five currently-active loans), so paid-off mortgages are absent from it and present here.\n\nMulti-unit caveat: loans carry a unit-blind parcel id, so for one unit of a multi-unit building this selects every unit in the building, not that unit alone."}]},"saleDate":{"$ref":"#/components/schemas/DateFilterValue"},"salePrice":{"$ref":"#/components/schemas/NumericFilterValue"},"state":{"$ref":"#/components/schemas/TextFilterValue"},"transactionType":{"$ref":"#/components/schemas/LoanTransactionTypeFilterValue"},"zip":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Alias of `zipCode` — same ZIP filter, accepted for cross-entity key parity."}]},"zipCode":{"$ref":"#/components/schemas/TextFilterValue"}},"type":"object"},"period":{"$ref":"#/components/schemas/DatedPeriod"}},"type":"object"},"AgentLoanMixResponse":{"description":"`buyer` + `listing` = `any` (dual deals are counted on `buyer`).","properties":{"any":{"$ref":"#/components/schemas/AgentLoanMixSide"},"buyer":{"$ref":"#/components/schemas/AgentLoanMixSide"},"listing":{"$ref":"#/components/schemas/AgentLoanMixSide"}},"required":["any","buyer","listing"],"type":"object"},"AgentLoanMixSide":{"properties":{"loanTypes":{"description":"Loan-type mix of `units`, most deals first. Deals with no recorded loan type are absent, so the rows can sum to less than `units`.","items":{"$ref":"#/components/schemas/AgentLoanMixType"},"type":"array"},"tpoUnits":{"description":"Of `units`, deals originated through a mortgage broker (a broker NMLS id on the loan) — third-party origination. TPO share = `tpoUnits / units`.","type":"number"},"tpoVolume":{"description":"Loan amount of the TPO deals.","type":"number"},"units":{"description":"Financed deals (recorded loans) on this side in the window.","type":"number"},"volume":{"description":"Total loan amount of those deals (out-of-range fill amounts excluded).","type":"number"}},"required":["units","volume","tpoUnits","tpoVolume","loanTypes"],"type":"object"},"AgentLoanMixType":{"properties":{"label":{"description":"Loan type (e.g. `conventional`, `fha`, `va`)","type":"string"},"units":{"type":"number"},"volume":{"type":"number"}},"required":["label","units","volume"],"type":"object"},"AgentLoansBreakdownRequest":{"additionalProperties":false,"properties":{"advancedFilters":{"$ref":"#/components/schemas/FilterNode"},"filters":{"$ref":"#/components/schemas/FilterNode"},"flatFilters":{"additionalProperties":false,"properties":{"borrowerStatus":{"$ref":"#/components/schemas/LoanBorrowerStatusFilterValue"},"broker":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Broker shop NMLS id (digits only). A broker is a company — resolve a broker name to its NMLS id via instantSearch (or listCompanies)."}]},"buyerEntityType":{"$ref":"#/components/schemas/BooleanFilterValue"},"city":{"$ref":"#/components/schemas/TextFilterValue"},"conforming":{"$ref":"#/components/schemas/BooleanFilterValue"},"county":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"County name (e.g. \"Broward\") or 5-digit FIPS code. Names resolve to FIPS server-side; include a `state` filter to disambiguate."}]},"currentBalance":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Estimated remaining principal balance (~19% populated). Approximate current equity as `homeValue` (AVM) minus this."}]},"employer":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Employer/company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"equity":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Point-in-time equity recorded on the loan (sparse, ~10%). NOT a live current-equity figure. For HELOC/cash-out targeting on up-to-date equity, use properties search (listProperties) instead — its equity is far better populated and current."}]},"excludeBroker":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans brokered by this broker-shop NMLS id (digits only) — the inverse of `broker`."}]},"excludeCity":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this city — the inverse of `city`."}]},"excludeLender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans from this lender ID (\"everyone but X\") — the inverse of `lender`, same id contract (resolve via instantSearch/listLenders). Loans with no lender stay in the results."}]},"excludeLoanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans funded by this company NMLS id (digits only) — the inverse of `loanCompany`."}]},"excludeLoanType":{"$ref":"#/components/schemas/LoanTypeExcludeFilterValue"},"excludeOriginator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans with this originator NMLS id (digits only) — the inverse of `originator`. Common for 'everyone but my own shop' lists."}]},"excludeState":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this state (2-letter code, e.g. \"CA\") — the inverse of `state`. For \"everywhere but this state\" lists."}]},"excludeTransactionType":{"$ref":"#/components/schemas/LoanTransactionTypeExcludeFilterValue"},"excludeZipCode":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this ZIP code — the inverse of `zipCode`."}]},"fips":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exact 5-digit county FIPS code (no name resolution) — the code-only escape hatch alongside `county`."}]},"geoPoint":{"$ref":"#/components/schemas/GeoFilterValue"},"homeValue":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"AVM (automated valuation) at the linked property (~26%, MLS-linked). Pair with `currentBalance` to approximate current equity."}]},"includeUnknownOriginator":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Include loans that have no originator NMLS id. Omitted/false (default): such loans are excluded — the vast majority are pre-2016 public records with no linkable originator. true: include them. Note that the default scopes results to loans with a known originator (~2016+ recordings)."}]},"interestRate":{"$ref":"#/components/schemas/NumericFilterValue"},"lender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender ID — the normalized lender-dictionary key, NOT a fuzzy name match. Resolve a lender via instantSearch (or listLenders) and pass the `id` it returns (e.g. \"mortgage_rocket\" or \"mortgage rocket\"). Underscores and letter case are normalized, so either id surface works. A stored normalized lender name (what the `slice: \"lender\"` chart buckets emit) is also accepted, so a chart bucket key filters directly. A value that is neither returns 400 rather than silently matching nothing — to search by lender NAME, use `lenderName`."}]},"lenderName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender name as recorded on the loan document — fuzzy, all-terms match (e.g. \"Fifth Third\"). The name counterpart to the exact-id `lender` filter; use `lender` when you have a resolved id, and this when you only have a name."}]},"loanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Funding/loan company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"loanType":{"$ref":"#/components/schemas/LoanTypeFilterValue"},"ltvAtOrigination":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Loan-to-value at ORIGINATION (sparse), as a PERCENT on a 0-100 scale (`80` = 80% LTV; values above 100 are real underwater loans). This is not a current LTV — there is no stored current-LTV field on loans."}]},"mode":{"enum":["and","or"],"type":"string"},"mortgageAmount":{"$ref":"#/components/schemas/NumericFilterValue"},"mortgageDate":{"$ref":"#/components/schemas/DateFilterValue"},"originator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Loan originator NMLS id (digits only). To search by name use `originatorName`, or resolve a name to its id via instantSearch."}]},"originatorName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"deprecated":true,"description":"DEPRECATED — fuzzy name matching is unreliable (same originator can return wildly different counts by name string). Resolve the loan officer via instantSearch and filter by `originator` (exact NMLS id) instead. Still functional for now."}]},"propertyId":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Parcel id — returns every loan recorded against one property. Pass the same string this endpoint returns as `mmPropertyId` on a loan row, or the `mmPropertyId` of a property record.\n\nThis is the parcel's FULL recorded loan history, which is deliberately wider than the loans embedded on a property record: that embed is a snapshot of what is still owed (up to five currently-active loans), so paid-off mortgages are absent from it and present here.\n\nMulti-unit caveat: loans carry a unit-blind parcel id, so for one unit of a multi-unit building this selects every unit in the building, not that unit alone."}]},"saleDate":{"$ref":"#/components/schemas/DateFilterValue"},"salePrice":{"$ref":"#/components/schemas/NumericFilterValue"},"state":{"$ref":"#/components/schemas/TextFilterValue"},"transactionType":{"$ref":"#/components/schemas/LoanTransactionTypeFilterValue"},"zip":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Alias of `zipCode` — same ZIP filter, accepted for cross-entity key parity."}]},"zipCode":{"$ref":"#/components/schemas/TextFilterValue"}},"type":"object"},"pagination":{"$ref":"#/components/schemas/Pagination"},"period":{"$ref":"#/components/schemas/DatedPeriod"},"side":{"$ref":"#/components/schemas/AgentSide"},"sort":{"$ref":"#/components/schemas/BreakdownSort"}},"type":"object"},"AgentLocationSource":{"description":"Which location signal `city`/`state`/`zip`/`county`, `geoPoint` and `near` match. `any` (default) = an office OR a market they transacted in (`geoPoint`: any office on record); `office` = their CURRENT office (a bare `state` also matches the state on their member record; `county` = the office inside the county boundary); `production` = transaction markets only.","enum":["any","office","production"],"type":"string"},"AgentLosOnMyTeamFilter":{"additionalProperties":false,"description":"Relationship with loan officers at the CALLER's company, resolved server-side from the caller's profile NMLS id and that LO's current employer; the caller's own deals never count. 400 `los_on_my_team_requires_company` when the caller has no NMLS id on their profile or it resolves to no company.","properties":{"minUnits":{"description":"Buyer-side deals with ONE colleague that count as a relationship (default 1). Under `doesNotWorkWith`, agents below it still pass.","maximum":100,"minimum":1,"type":"integer"},"relationship":{"description":"`worksWith` — the agent's buyers were financed by loan officers at the caller's company; `doesNotWorkWith` — no such relationship (prospects).","enum":["worksWith","doesNotWorkWith"],"type":"string"}},"required":["relationship"],"type":"object"},"AgentMarket":{"properties":{"avgSalePrice":{"description":"`volume ÷ units` — the mean priced sale in this market.","nullable":true,"type":"number"},"shareOfScope":{"description":"This market's share of the agent's volume ACROSS THE SCOPE REQUESTED, 0–100. It sums to 100 over the whole scope, so a page truncated by `limit` sums to less than 100 by exactly the share left out — the shares do not re-normalize to the page, because a number that moved every time you changed the page size would not be a share of anything stable. It is NOT this agent's share of the market itself, and it is not comparable across agents.","nullable":true,"type":"number"},"transactions":{"description":"Transaction records matched in this market. NOT every one of them carries a price — compare with `units`.","type":"number"},"units":{"description":"Priced transaction records — the ones that contributed to `volume`, and the divisor behind `avgSalePrice`. Typically about half of `transactions`.","nullable":true,"type":"number"},"volume":{"description":"Total sale price across the priced records.","nullable":true,"type":"number"},"zipCode":{"description":"The ZIP code this market is keyed by.","nullable":true,"type":"string"}},"required":["zipCode","transactions","units","volume","avgSalePrice","shareOfScope"],"type":"object"},"AgentMarketsCommunityLending":{"description":"The Community Lending mix of this footprint: the neighborhood characteristics of where the production landed, as percentages on a 0-100 scale. Null when nothing in scope resolved to a neighborhood — an absent block, never a row of zeroes, because 'no data' and '0%' are different answers. Read `basis` before comparing two responses. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"properties":{"affordableHousingTractPct":{"description":"Share of production, 0-100, in neighborhoods carrying an affordable-housing designation. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"basis":{"description":"Which measurement produced this block, and they are NOT the same number. `entityRollup` is the neighborhood mix of the entity's own production over the whole period — the default. `marketsInScope` is the neighborhood profile of the markets the request selected, weighted by the entity's production in each, and is what any ZIP, date or filter scope returns, because a whole-period rollup cannot be re-cut to a narrower question.","enum":["entityRollup","marketsInScope"],"type":"string"},"coveredProductionPct":{"description":"`marketsInScope` only — what share of the weighted production, 0-100, sits in a market that resolved to neighborhood data. Below 100 means the mix describes part of the footprint, not all of it.","nullable":true,"type":"number"},"difficultDevelopmentAreaPct":{"description":"Share of production, 0-100, in designated difficult development areas. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"distressedTractPct":{"description":"Share of production, 0-100, in distressed or underserved nonmetropolitan middle-income neighborhoods. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"floodHazardTractPct":{"description":"Share of production, 0-100, in neighborhoods inside a special flood hazard area. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"incomeLevelMix":{"description":"`marketsInScope` only — the full relative-income distribution of the neighborhoods, 0-100, summing to about 100. Null on `entityRollup`, which stores the predominant band but no distribution; publishing one derived from a single label would be a histogram nobody measured. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"properties":{"low":{"nullable":true,"type":"number"},"middle":{"nullable":true,"type":"number"},"moderate":{"nullable":true,"type":"number"},"upper":{"nullable":true,"type":"number"}},"required":["low","moderate","middle","upper"],"type":"object"},"loansWithCommunityData":{"description":"`entityRollup` only — how many of the entity's transactions in the period resolved to a neighborhood. This is the denominator every share below is a share OF, so read it first: a 100% share over three transactions is not a footprint.","nullable":true,"type":"number"},"lowModIncomeTractPct":{"description":"Share of production, 0-100, in low- or moderate-income neighborhoods. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"majorityMinorityTractPct":{"description":"Share of production, 0-100, in majority-minority neighborhoods. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"marketsInScope":{"description":"`marketsInScope` only — ZIP markets the mix considered, including any that carried no neighborhood data.","nullable":true,"type":"number"},"marketsWithCommunityData":{"description":"`marketsInScope` only — ZIP markets that resolved to neighborhood data.","nullable":true,"type":"number"},"opportunityZonePct":{"description":"Share of production, 0-100, in designated Opportunity Zones. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"predominantIncomeLevel":{"description":"The most common relative-income classification of the neighborhoods, on the standard four-band scale. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","enum":["low","moderate","middle","upper",null],"nullable":true,"type":"string"},"ruralTractPct":{"description":"Share of production, 0-100, in neighborhoods classified rural. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"usdaEligibleTractPct":{"description":"Share of production, 0-100, in neighborhoods eligible for USDA rural housing programs. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"}},"required":["basis","loansWithCommunityData","marketsWithCommunityData","marketsInScope","coveredProductionPct","predominantIncomeLevel","incomeLevelMix","lowModIncomeTractPct","majorityMinorityTractPct","ruralTractPct","opportunityZonePct","affordableHousingTractPct","distressedTractPct","usdaEligibleTractPct","floodHazardTractPct","difficultDevelopmentAreaPct"],"type":"object"},"AgentMarketsDateRange":{"additionalProperties":false,"description":"Narrow the footprint to transactions inside this window. Omit for the agent's whole recorded history.","properties":{"from":{"description":"Inclusive lower bound on the transaction date.","example":"2024-01-01","pattern":"^\\d{4}(-\\d{2}(-\\d{2})?)?$","type":"string"},"to":{"description":"Inclusive upper bound on the transaction date.","example":"2025-12-31","pattern":"^\\d{4}(-\\d{2}(-\\d{2})?)?$","type":"string"}},"type":"object"},"AgentMarketsReach":{"properties":{"presentInScope":{"description":"Whether this agent is present in the requested ZIP scope at all — by office location OR by any transaction on record. Null when no scope was requested. `true` with an empty `markets` array means the agent works that market but has no priced transaction there in the window, which is a different answer from `false`.","nullable":true,"type":"boolean"},"transactedInScope":{"description":"Whether the scope produced any market with recorded transactions. Null when no scope was requested.","nullable":true,"type":"boolean"},"zipCodesRequested":{"description":"The normalized ZIP scope actually applied, or null when the caller asked for the whole footprint.","items":{"type":"string"},"nullable":true,"type":"array"}},"required":["zipCodesRequested","presentInScope","transactedInScope"],"type":"object"},"AgentMarketsRequest":{"additionalProperties":false,"properties":{"dateRange":{"$ref":"#/components/schemas/AgentMarketsDateRange"},"limit":{"description":"How many markets to return, ranked by volume descending (default 50). The summary is computed over the whole footprint BEFORE this truncation, so changing it never moves the totals or the average.","maximum":500,"minimum":1,"type":"integer"},"zipCodes":{"description":"Narrow the footprint to these ZIP codes. 1–5 digits; a value that is not a ZIP is a 400 naming it, never a silently narrower result. Leading zeros may be omitted (`1001` resolves to `01001`).","example":["77316","77578"],"items":{"type":"string"},"maxItems":200,"minItems":1,"type":"array"}},"type":"object"},"AgentMarketsResponse":{"properties":{"data":{"properties":{"agentId":{"description":"The canonical agent id these markets were computed for. May differ from the id sent if that id was a pre-merge one.","type":"string"},"basis":{"description":"This is a REACH view. An agent belongs to every market they touch, so agent counts across markets over-sum and cannot be turned into a market share. See `notes`.","enum":["reach"],"type":"string"},"markets":{"items":{"$ref":"#/components/schemas/AgentMarket"},"type":"array"},"notes":{"description":"Plain-language caveats that apply to every figure above.","items":{"type":"string"},"type":"array"},"reach":{"$ref":"#/components/schemas/AgentMarketsReach"},"source":{"$ref":"#/components/schemas/AgentMarketsSource"},"summary":{"$ref":"#/components/schemas/AgentMarketsSummary"}},"required":["agentId","basis","markets","summary","reach","source","notes"],"type":"object"}},"required":["data"],"type":"object"},"AgentMarketsSource":{"properties":{"mode":{"enum":["live"],"type":"string"},"reasons":{"description":"Why the figures were computed live from transaction records rather than read from a stored rollup.","items":{"type":"string"},"type":"array"}},"required":["mode","reasons"],"type":"object"},"AgentMarketsSummary":{"properties":{"avgSalePrice":{"description":"Volume-weighted mean priced sale across the footprint. Equal to `volume ÷ units`; NOT the average of the per-market averages, which drifts with market size.","nullable":true,"type":"number"},"communityLending":{"$ref":"#/components/schemas/AgentMarketsCommunityLending"},"marketCount":{"description":"How many placed markets contributed to this summary — the whole footprint inside the considered set, not the number of rows returned.","type":"number"},"shareOfBook":{"description":"Always null on this surface. A share of an agent's whole book would need a per-agent total to divide by, and the transaction records carry none — publishing a partial sum as a total is the error this field exists to refuse.","nullable":true},"transactions":{"type":"number"},"units":{"nullable":true,"type":"number"},"unresolved":{"$ref":"#/components/schemas/AgentMarketsUnresolved"},"volume":{"nullable":true,"type":"number"}},"required":["marketCount","transactions","units","volume","avgSalePrice","shareOfBook","unresolved","communityLending"],"type":"object"},"AgentMarketsUnresolved":{"description":"Transactions whose market could not be placed. Held OUT of the summary and every ranking, and reported here so the coverage is stated rather than hidden.","properties":{"transactions":{"type":"number"},"units":{"nullable":true,"type":"number"},"volume":{"nullable":true,"type":"number"}},"required":["transactions","units","volume"],"type":"object"},"AgentMortgagedTimeSeriesRequest":{"additionalProperties":false,"properties":{"advancedFilters":{"$ref":"#/components/schemas/FilterNode"},"bySide":{"description":"Also return the `buyer` and `listing` views under `bySide`, computed in the same query — each identical to calling again with that `side`. Use instead of one call per side. `pagination.cursor` pages every view in step (each view's own `cursor` is absent once it ends).","type":"boolean"},"filters":{"$ref":"#/components/schemas/FilterNode"},"flatFilters":{"additionalProperties":false,"properties":{"borrowerStatus":{"$ref":"#/components/schemas/LoanBorrowerStatusFilterValue"},"broker":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Broker shop NMLS id (digits only). A broker is a company — resolve a broker name to its NMLS id via instantSearch (or listCompanies)."}]},"buyerEntityType":{"$ref":"#/components/schemas/BooleanFilterValue"},"city":{"$ref":"#/components/schemas/TextFilterValue"},"conforming":{"$ref":"#/components/schemas/BooleanFilterValue"},"county":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"County name (e.g. \"Broward\") or 5-digit FIPS code. Names resolve to FIPS server-side; include a `state` filter to disambiguate."}]},"currentBalance":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Estimated remaining principal balance (~19% populated). Approximate current equity as `homeValue` (AVM) minus this."}]},"employer":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Employer/company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"equity":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Point-in-time equity recorded on the loan (sparse, ~10%). NOT a live current-equity figure. For HELOC/cash-out targeting on up-to-date equity, use properties search (listProperties) instead — its equity is far better populated and current."}]},"excludeBroker":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans brokered by this broker-shop NMLS id (digits only) — the inverse of `broker`."}]},"excludeCity":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this city — the inverse of `city`."}]},"excludeLender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans from this lender ID (\"everyone but X\") — the inverse of `lender`, same id contract (resolve via instantSearch/listLenders). Loans with no lender stay in the results."}]},"excludeLoanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans funded by this company NMLS id (digits only) — the inverse of `loanCompany`."}]},"excludeLoanType":{"$ref":"#/components/schemas/LoanTypeExcludeFilterValue"},"excludeOriginator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans with this originator NMLS id (digits only) — the inverse of `originator`. Common for 'everyone but my own shop' lists."}]},"excludeState":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this state (2-letter code, e.g. \"CA\") — the inverse of `state`. For \"everywhere but this state\" lists."}]},"excludeTransactionType":{"$ref":"#/components/schemas/LoanTransactionTypeExcludeFilterValue"},"excludeZipCode":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this ZIP code — the inverse of `zipCode`."}]},"fips":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exact 5-digit county FIPS code (no name resolution) — the code-only escape hatch alongside `county`."}]},"geoPoint":{"$ref":"#/components/schemas/GeoFilterValue"},"homeValue":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"AVM (automated valuation) at the linked property (~26%, MLS-linked). Pair with `currentBalance` to approximate current equity."}]},"includeUnknownOriginator":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Include loans that have no originator NMLS id. Omitted/false (default): such loans are excluded — the vast majority are pre-2016 public records with no linkable originator. true: include them. Note that the default scopes results to loans with a known originator (~2016+ recordings)."}]},"interestRate":{"$ref":"#/components/schemas/NumericFilterValue"},"lender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender ID — the normalized lender-dictionary key, NOT a fuzzy name match. Resolve a lender via instantSearch (or listLenders) and pass the `id` it returns (e.g. \"mortgage_rocket\" or \"mortgage rocket\"). Underscores and letter case are normalized, so either id surface works. A stored normalized lender name (what the `slice: \"lender\"` chart buckets emit) is also accepted, so a chart bucket key filters directly. A value that is neither returns 400 rather than silently matching nothing — to search by lender NAME, use `lenderName`."}]},"lenderName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender name as recorded on the loan document — fuzzy, all-terms match (e.g. \"Fifth Third\"). The name counterpart to the exact-id `lender` filter; use `lender` when you have a resolved id, and this when you only have a name."}]},"loanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Funding/loan company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"loanType":{"$ref":"#/components/schemas/LoanTypeFilterValue"},"ltvAtOrigination":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Loan-to-value at ORIGINATION (sparse), as a PERCENT on a 0-100 scale (`80` = 80% LTV; values above 100 are real underwater loans). This is not a current LTV — there is no stored current-LTV field on loans."}]},"mode":{"enum":["and","or"],"type":"string"},"mortgageAmount":{"$ref":"#/components/schemas/NumericFilterValue"},"mortgageDate":{"$ref":"#/components/schemas/DateFilterValue"},"originator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Loan originator NMLS id (digits only). To search by name use `originatorName`, or resolve a name to its id via instantSearch."}]},"originatorName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"deprecated":true,"description":"DEPRECATED — fuzzy name matching is unreliable (same originator can return wildly different counts by name string). Resolve the loan officer via instantSearch and filter by `originator` (exact NMLS id) instead. Still functional for now."}]},"propertyId":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Parcel id — returns every loan recorded against one property. Pass the same string this endpoint returns as `mmPropertyId` on a loan row, or the `mmPropertyId` of a property record.\n\nThis is the parcel's FULL recorded loan history, which is deliberately wider than the loans embedded on a property record: that embed is a snapshot of what is still owed (up to five currently-active loans), so paid-off mortgages are absent from it and present here.\n\nMulti-unit caveat: loans carry a unit-blind parcel id, so for one unit of a multi-unit building this selects every unit in the building, not that unit alone."}]},"saleDate":{"$ref":"#/components/schemas/DateFilterValue"},"salePrice":{"$ref":"#/components/schemas/NumericFilterValue"},"state":{"$ref":"#/components/schemas/TextFilterValue"},"transactionType":{"$ref":"#/components/schemas/LoanTransactionTypeFilterValue"},"zip":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Alias of `zipCode` — same ZIP filter, accepted for cross-entity key parity."}]},"zipCode":{"$ref":"#/components/schemas/TextFilterValue"}},"type":"object"},"interval":{"$ref":"#/components/schemas/Interval"},"period":{"$ref":"#/components/schemas/DatedPeriod"},"side":{"$ref":"#/components/schemas/AgentSide"}},"type":"object"},"AgentMortgagedTimeSeriesResponse":{"properties":{"bySide":{"description":"Present when the request set `bySide`: the `buyer` and `listing` views of this response.","properties":{"buyer":{"$ref":"#/components/schemas/SimpleTimeSeriesResponse"},"listing":{"$ref":"#/components/schemas/SimpleTimeSeriesResponse"}},"required":["buyer","listing"],"type":"object"},"completeness":{"$ref":"#/components/schemas/AnalyticsCompleteness"},"current":{"items":{"$ref":"#/components/schemas/SimpleTimeSeriesBucket"},"type":"array"},"measure":{"description":"Echo of the measure `measureValue` reports, so a caller never has to infer which metric it is plotting.","type":"string"},"previous":{"items":{"$ref":"#/components/schemas/SimpleTimeSeriesBucket"},"nullable":true,"type":"array"}},"required":["measure","current","previous"],"type":"object"},"AgentNearEntry":{"additionalProperties":false,"properties":{"city":{"minLength":1,"type":"string"},"lat":{"maximum":90,"minimum":-90,"type":"number"},"lon":{"maximum":180,"minimum":-180,"type":"number"},"radius":{"example":"25mi","minLength":1,"type":"string"},"state":{"minLength":1,"type":"string"}},"required":["lat","lon","radius"],"type":"object"},"AgentNearFilter":{"description":"Radius search, entries OR'd, on the `locationSource` points (current office / transactions / either). With `city`+`state` an entry also matches addresses in that city beyond the radius.","items":{"$ref":"#/components/schemas/AgentNearEntry"},"maxItems":50,"minItems":1,"type":"array"},"AgentOfficeEntry":{"properties":{"city":{"nullable":true,"type":"string"},"key":{"nullable":true,"type":"string"},"lastTransactionDate":{"nullable":true,"type":"string"},"lat":{"nullable":true,"type":"number"},"lon":{"nullable":true,"type":"number"},"name":{"nullable":true,"type":"string"},"state":{"nullable":true,"type":"string"},"street":{"nullable":true,"type":"string"},"transactions":{"nullable":true,"type":"number"},"zip":{"nullable":true,"type":"string"}},"required":["key","name","street","city","state","zip","lat","lon","lastTransactionDate","transactions"],"type":"object"},"AgentOfficeGroup":{"properties":{"entries":{"items":{"$ref":"#/components/schemas/AgentOfficeGroupEntry"},"type":"array"},"key":{"type":"string"},"label":{"type":"string"}},"required":["key","label","entries"],"type":"object"},"AgentOfficeGroupEntry":{"properties":{"displayName":{"type":"string"},"matchType":{"enum":["contains","prefix","all_words"],"type":"string"},"name":{"type":"string"}},"required":["name","displayName","matchType"],"type":"object"},"AgentPhoneFilterValue":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"minItems":1,"type":"array"},{"nullable":true}],"description":"US phone number, any formatting (`(512) 555-0100`, `512.555.0100`, `+1 5125550100`) — reduced to its 10 digits. Matches the agent's current direct phone OR any phone in their contact history; office/brokerage lines are not searched. Anything that is not a 10-digit US number is a 400. An array matches any."},"AgentProductMixEntry":{"additionalProperties":false,"properties":{"minShare":{"description":"Minimum financed volume of this product through ONE mortgage company, as a percent of the agent's period sale volume. Omit for 'any deal financed with this product'.","minimum":0,"type":"number"},"product":{"description":"Loan product (case-insensitive). `government` = FHA, VA or USDA.","enum":["conventional","fha","va","usda","government","he","heloc","commercial","building","reverse"],"type":"string"}},"required":["product"],"type":"object"},"AgentProductMixFilter":{"description":"Agents whose buyers financed with these loan products in the selected period, ANDed: `[{product: \"fha\"}, {product: \"va\", minShare: 10}]`. Not a whole-book share — the index stores product mix per mortgage company only.","items":{"$ref":"#/components/schemas/AgentProductMixEntry"},"maxItems":10,"minItems":1,"type":"array"},"AgentPropertiesResponse":{"properties":{"cursor":{"type":"string"},"data":{"items":{"$ref":"#/components/schemas/AgentPropertySummary"},"type":"array"},"total":{"type":"number"},"truncated":{"description":"`true` when more than 10,000 sales matched and a loan-side filter or a loan / party sort considered only the newest 10,000","type":"boolean"}},"required":["data","total"],"type":"object"},"AgentPropertySummary":{"properties":{"address":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"date":{"nullable":true,"type":"string"},"id":{"type":"string"},"mmPropertyId":{"nullable":true,"type":"string"},"price":{"nullable":true,"type":"number"},"propertyType":{"nullable":true,"type":"string"},"state":{"nullable":true,"type":"string"},"zip":{"nullable":true,"type":"string"}},"required":["id"],"type":"object"},"AgentPulseSignal":{"properties":{"agentId":{"description":"Agent id. Pass it to the agent routes only when `agentLinked` is true.","type":"string"},"agentLinked":{"description":"Whether this agent has an agent profile. When false, `agentId` identifies the agent within this list only and cannot be looked up.","type":"boolean"},"agentName":{"nullable":true,"type":"string"},"percentile":{"description":"Priority percentile, 0–100: where this priority score sits among everyone scored nationally for this signal (all scored loan officers, past clients, or agent relationships). 100 = highest priority. On the state list it is still the national percentile, not a within-state one.","type":"number"},"rank":{"description":"1 = highest priority.","type":"integer"},"reasons":{"description":"Up to three plain-language reasons this row is a priority.","items":{"type":"string"},"type":"array"},"score":{"description":"Priority score (0–1) for this loan officer to work this buyer's agent relationship toward another closed deal in the next six months; higher is higher priority.","type":"number"},"scoredAt":{"description":"When this score was computed (ISO 8601).","type":"string"}},"required":["rank","agentId","agentName","agentLinked","score","percentile","reasons","scoredAt"],"type":"object"},"AgentPulseSignalList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AgentPulseSignal"},"type":"array"}},"required":["data"],"type":"object"},"AgentRelationRequest":{"additionalProperties":false,"properties":{"advancedFilters":{"$ref":"#/components/schemas/FilterNode"},"dealFilters":{"$ref":"#/components/schemas/AgentDealFilters"},"filters":{"$ref":"#/components/schemas/FilterNode"},"flatFilters":{"$ref":"#/components/schemas/SaleFlatFilters"},"pagination":{"$ref":"#/components/schemas/Pagination"},"period":{"$ref":"#/components/schemas/Period"},"side":{"$ref":"#/components/schemas/AgentSide"},"sort":{"items":{"properties":{"field":{"type":"string"},"order":{"$ref":"#/components/schemas/SortOrder"}},"required":["field"],"type":"object"},"type":"array"}},"type":"object"},"AgentSaleLoanFilters":{"additionalProperties":false,"description":"Filters on the sale's purchase loan (the row's `loan`), with the `/v1/loans` filter semantics. Any key here keeps only financed deals whose purchase loan matches.","properties":{"broker":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Broker shop NMLS id (digits only). A broker is a company — resolve a broker name to its NMLS id via instantSearch (or listCompanies)."}]},"conforming":{"$ref":"#/components/schemas/BooleanFilterValue"},"employer":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Employer/company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"interestRate":{"$ref":"#/components/schemas/NumericFilterValue"},"lender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender ID — the normalized lender-dictionary key, NOT a fuzzy name match. Resolve a lender via instantSearch (or listLenders) and pass the `id` it returns (e.g. \"mortgage_rocket\" or \"mortgage rocket\"). Underscores and letter case are normalized, so either id surface works. A stored normalized lender name (what the `slice: \"lender\"` chart buckets emit) is also accepted, so a chart bucket key filters directly. A value that is neither returns 400 rather than silently matching nothing — to search by lender NAME, use `lenderName`."}]},"lenderName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender name as recorded on the loan document — fuzzy, all-terms match (e.g. \"Fifth Third\"). The name counterpart to the exact-id `lender` filter; use `lender` when you have a resolved id, and this when you only have a name."}]},"loanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Funding/loan company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"loanType":{"$ref":"#/components/schemas/LoanTypeFilterValue"},"mortgageAmount":{"$ref":"#/components/schemas/NumericFilterValue"},"originator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Loan originator NMLS id (digits only). To search by name use `originatorName`, or resolve a name to its id via instantSearch."}]},"transactionType":{"$ref":"#/components/schemas/LoanTransactionTypeFilterValue"}},"type":"object"},"AgentSaleSummary":{"properties":{"address":{"description":"Full street line — number, directionals, street name, suffix and unit (`123 w 4th st`), lowercase","nullable":true,"type":"string"},"builderName":{"description":"Builder, on a new-construction sale","nullable":true,"type":"string"},"buyer1FirstMiddle":{"description":"First buyer's first + middle name (an entity's whole name, with no last).","nullable":true,"type":"string"},"buyer1Last":{"description":"First buyer's last name.","nullable":true,"type":"string"},"buyer2FirstMiddle":{"description":"Second buyer's first + middle name.","nullable":true,"type":"string"},"buyer2Last":{"description":"Second buyer's last name.","nullable":true,"type":"string"},"buyerName":{"description":"First buyer named on the sale — from the purchase loan's document when the MLS record names none; `null` on most cash deals","nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"coListAgentId":{"description":"Co-listing agent's id (`GET /v1/agents/{id}`), when the sale's agent key resolves to one agent","nullable":true,"type":"string"},"coListAgentName":{"description":"Co-listing agent's name — the agent record's (lowercase) when `coListAgentId` resolved from the MLS keys, else as the MLS recorded it; lowercase","nullable":true,"type":"string"},"date":{"nullable":true,"type":"string"},"id":{"type":"string"},"listAgentId":{"description":"Listing agent's id (`GET /v1/agents/{id}`), when the sale's agent key resolves to one agent","nullable":true,"type":"string"},"listAgentName":{"nullable":true,"type":"string"},"listDate":{"description":"MLS listing date (`YYYY-MM-DD`); days on market = `date` − `listDate`","nullable":true,"type":"string"},"listOfficeName":{"description":"Listing agent's brokerage (office), as the MLS recorded it; `null` when not on file","nullable":true,"type":"string"},"listPrice":{"description":"Last MLS list price","nullable":true,"type":"number"},"loan":{"description":"The purchase loan recorded against this sale (matched on the sale id), or `null` when none is recorded — a cash deal, or a loan not yet on file.","nullable":true,"properties":{"amount":{"nullable":true,"type":"number"},"brokerName":{"description":"Mortgage broker as written on the loan document, when the loan was third-party originated","nullable":true,"type":"string"},"brokerNmlsId":{"description":"Mortgage broker NMLS id when the loan was third-party originated","nullable":true,"type":"string"},"companyName":{"description":"Mortgage company the loan was written under","nullable":true,"type":"string"},"companyNmlsId":{"nullable":true,"type":"string"},"employerName":{"description":"Employer at the time of the loan (the LO's company then), as recorded. Not `companyName`, the funding company on the document.","nullable":true,"type":"string"},"employerNmlsId":{"description":"NMLS id of `employerName`.","nullable":true,"type":"string"},"id":{"description":"Loan id (`GET /v1/loans/{id}`)","type":"string"},"interestRate":{"description":"Note rate in percent (e.g. `6.25`), recorded or modeled; `null` when not on file","nullable":true,"type":"number"},"lenderId":{"description":"Normalized lender key — the value the `lender` filter accepts","nullable":true,"type":"string"},"lenderName":{"description":"Lender as written on the loan document","nullable":true,"type":"string"},"loanType":{"description":"e.g. `conventional`, `fha`, `va`","nullable":true,"type":"string"},"originatorName":{"nullable":true,"type":"string"},"originatorNmlsId":{"nullable":true,"type":"string"},"titleCompany":{"nullable":true,"type":"string"},"transactionType":{"description":"e.g. `purchase`, `refinance`","nullable":true,"type":"string"}},"required":["id","amount","loanType","transactionType","lenderName","lenderId","originatorName","originatorNmlsId","companyName","companyNmlsId","brokerNmlsId","titleCompany"],"type":"object"},"mmPropertyId":{"description":"The property's id (`GET /v1/properties/{id}`)","nullable":true,"type":"string"},"price":{"nullable":true,"type":"number"},"seller1FirstMiddle":{"description":"First seller's first + middle name.","nullable":true,"type":"string"},"seller1Last":{"description":"First seller's last name.","nullable":true,"type":"string"},"seller2FirstMiddle":{"description":"Second seller's first + middle name.","nullable":true,"type":"string"},"seller2Last":{"description":"Second seller's last name.","nullable":true,"type":"string"},"sellerName":{"description":"First seller named on the sale — from the purchase loan's document when the MLS record names none","nullable":true,"type":"string"},"side":{"description":"Which side of this deal the agent was on: `buyer`, `listing`, or `dual` (both). `null` when the sale names the agent under an id this API cannot place on a side.","enum":["buyer","listing","dual",null],"nullable":true,"type":"string"},"soldAgentId":{"description":"Buyer's (selling) agent's id (`GET /v1/agents/{id}`), when the sale's agent key resolves to one agent","nullable":true,"type":"string"},"soldAgentName":{"nullable":true,"type":"string"},"state":{"nullable":true,"type":"string"},"txType":{"description":"Property type for the transacted property (e.g. `Residential`, `Condominium`) — the same value `/v1/sales` returns as `propertyType`. Named `txType` for backwards compatibility. Present on roughly 19% of sales; the rest carry no MLS listing type and read `null`.","nullable":true,"type":"string"},"zip":{"nullable":true,"type":"string"}},"required":["id"],"type":"object"},"AgentSalesBreakdownRequest":{"additionalProperties":false,"properties":{"advancedFilters":{"$ref":"#/components/schemas/FilterNode"},"bySide":{"description":"Also return the `buyer` and `listing` views under `bySide`, computed in the same query — each identical to calling again with that `side`. Use instead of one call per side. `pagination.cursor` pages every view in step (each view's own `cursor` is absent once it ends).","type":"boolean"},"filters":{"$ref":"#/components/schemas/FilterNode"},"flatFilters":{"additionalProperties":false,"properties":{"borrowerStatus":{"$ref":"#/components/schemas/LoanBorrowerStatusFilterValue"},"broker":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Broker shop NMLS id (digits only). A broker is a company — resolve a broker name to its NMLS id via instantSearch (or listCompanies)."}]},"buyerEntityType":{"$ref":"#/components/schemas/BooleanFilterValue"},"city":{"$ref":"#/components/schemas/TextFilterValue"},"conforming":{"$ref":"#/components/schemas/BooleanFilterValue"},"county":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"County name (e.g. \"Broward\") or 5-digit FIPS code. Names resolve to FIPS server-side; include a `state` filter to disambiguate."}]},"currentBalance":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Estimated remaining principal balance (~19% populated). Approximate current equity as `homeValue` (AVM) minus this."}]},"employer":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Employer/company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"equity":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Point-in-time equity recorded on the loan (sparse, ~10%). NOT a live current-equity figure. For HELOC/cash-out targeting on up-to-date equity, use properties search (listProperties) instead — its equity is far better populated and current."}]},"excludeBroker":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans brokered by this broker-shop NMLS id (digits only) — the inverse of `broker`."}]},"excludeCity":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this city — the inverse of `city`."}]},"excludeLender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans from this lender ID (\"everyone but X\") — the inverse of `lender`, same id contract (resolve via instantSearch/listLenders). Loans with no lender stay in the results."}]},"excludeLoanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans funded by this company NMLS id (digits only) — the inverse of `loanCompany`."}]},"excludeLoanType":{"$ref":"#/components/schemas/LoanTypeExcludeFilterValue"},"excludeOriginator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans with this originator NMLS id (digits only) — the inverse of `originator`. Common for 'everyone but my own shop' lists."}]},"excludeState":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this state (2-letter code, e.g. \"CA\") — the inverse of `state`. For \"everywhere but this state\" lists."}]},"excludeTransactionType":{"$ref":"#/components/schemas/LoanTransactionTypeExcludeFilterValue"},"excludeZipCode":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this ZIP code — the inverse of `zipCode`."}]},"fips":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exact 5-digit county FIPS code (no name resolution) — the code-only escape hatch alongside `county`."}]},"geoPoint":{"$ref":"#/components/schemas/GeoFilterValue"},"homeValue":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"AVM (automated valuation) at the linked property (~26%, MLS-linked). Pair with `currentBalance` to approximate current equity."}]},"includeUnknownOriginator":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Include loans that have no originator NMLS id. Omitted/false (default): such loans are excluded — the vast majority are pre-2016 public records with no linkable originator. true: include them. Note that the default scopes results to loans with a known originator (~2016+ recordings)."}]},"interestRate":{"$ref":"#/components/schemas/NumericFilterValue"},"lender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender ID — the normalized lender-dictionary key, NOT a fuzzy name match. Resolve a lender via instantSearch (or listLenders) and pass the `id` it returns (e.g. \"mortgage_rocket\" or \"mortgage rocket\"). Underscores and letter case are normalized, so either id surface works. A stored normalized lender name (what the `slice: \"lender\"` chart buckets emit) is also accepted, so a chart bucket key filters directly. A value that is neither returns 400 rather than silently matching nothing — to search by lender NAME, use `lenderName`."}]},"lenderName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender name as recorded on the loan document — fuzzy, all-terms match (e.g. \"Fifth Third\"). The name counterpart to the exact-id `lender` filter; use `lender` when you have a resolved id, and this when you only have a name."}]},"loanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Funding/loan company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"loanType":{"$ref":"#/components/schemas/LoanTypeFilterValue"},"ltvAtOrigination":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Loan-to-value at ORIGINATION (sparse), as a PERCENT on a 0-100 scale (`80` = 80% LTV; values above 100 are real underwater loans). This is not a current LTV — there is no stored current-LTV field on loans."}]},"mode":{"enum":["and","or"],"type":"string"},"mortgageAmount":{"$ref":"#/components/schemas/NumericFilterValue"},"mortgageDate":{"$ref":"#/components/schemas/DateFilterValue"},"originator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Loan originator NMLS id (digits only). To search by name use `originatorName`, or resolve a name to its id via instantSearch."}]},"originatorName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"deprecated":true,"description":"DEPRECATED — fuzzy name matching is unreliable (same originator can return wildly different counts by name string). Resolve the loan officer via instantSearch and filter by `originator` (exact NMLS id) instead. Still functional for now."}]},"propertyId":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Parcel id — returns every loan recorded against one property. Pass the same string this endpoint returns as `mmPropertyId` on a loan row, or the `mmPropertyId` of a property record.\n\nThis is the parcel's FULL recorded loan history, which is deliberately wider than the loans embedded on a property record: that embed is a snapshot of what is still owed (up to five currently-active loans), so paid-off mortgages are absent from it and present here.\n\nMulti-unit caveat: loans carry a unit-blind parcel id, so for one unit of a multi-unit building this selects every unit in the building, not that unit alone."}]},"saleDate":{"$ref":"#/components/schemas/DateFilterValue"},"salePrice":{"$ref":"#/components/schemas/NumericFilterValue"},"state":{"$ref":"#/components/schemas/TextFilterValue"},"transactionType":{"$ref":"#/components/schemas/LoanTransactionTypeFilterValue"},"zip":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Alias of `zipCode` — same ZIP filter, accepted for cross-entity key parity."}]},"zipCode":{"$ref":"#/components/schemas/TextFilterValue"}},"type":"object"},"pagination":{"$ref":"#/components/schemas/Pagination"},"period":{"$ref":"#/components/schemas/DatedPeriod"},"side":{"$ref":"#/components/schemas/AgentSide"},"sort":{"$ref":"#/components/schemas/BreakdownSort"}},"type":"object"},"AgentSalesResponse":{"properties":{"cursor":{"type":"string"},"data":{"items":{"$ref":"#/components/schemas/AgentSaleSummary"},"type":"array"},"total":{"type":"number"},"truncated":{"description":"`true` when more than 10,000 sales matched and a loan-side filter or a loan / party sort considered only the newest 10,000","type":"boolean"}},"required":["data","total"],"type":"object"},"AgentScoredBreakdownRequest":{"properties":{"bySide":{"description":"Also return the `buyer` and `listing` views under `bySide`, computed in the same query — each identical to calling again with that `side`. Use instead of one call per side. `pagination.cursor` pages every view in step (each view's own `cursor` is absent once it ends).","type":"boolean"},"period":{"$ref":"#/components/schemas/Period"},"side":{"$ref":"#/components/schemas/AgentSide"},"sort":{"$ref":"#/components/schemas/BreakdownSort"}},"type":"object"},"AgentSide":{"description":"Which side of the deal the agent was on. `buyer`: the agent represented the buyer — deals where the agent was on BOTH sides (dual) count here. `listing`: the agent represented the seller only (duals are already in `buyer`). `any` (default): either side, each deal once. `buyer` + `listing` = `any`.","enum":["any","buyer","listing"],"type":"string"},"AgentSideDominance":{"description":"Which side the agent mostly represents in the selected period, OR'd: `buyer` = more buyer-side than seller-side deals, `seller` = the reverse (a tie is neither), `dual` = at least one dual-agency deal.","items":{"enum":["buyer","seller","dual"],"type":"string"},"minItems":1,"type":"array"},"AgentSidedBreakdownResponse":{"properties":{"bySide":{"description":"Present when the request set `bySide`: the `buyer` and `listing` views of this response.","properties":{"buyer":{"$ref":"#/components/schemas/BreakdownResponse"},"listing":{"$ref":"#/components/schemas/BreakdownResponse"}},"required":["buyer","listing"],"type":"object"},"cursor":{"description":"Opaque cursor for the next page; absent when this is the last page.","type":"string"},"data":{"items":{"$ref":"#/components/schemas/BreakdownItem"},"type":"array"},"total":{"description":"Number of buckets returned","type":"number"},"totals":{"description":"Grand totals across all data","properties":{"excluded":{"description":"Documents the volume guard excluded across the whole scope — the grand-total counterpart of a bucket's `excluded`, and the same figure `/analytics/summary` reports as `current.excluded.volume` for an equivalent query. Absent when the money column is unguarded.","type":"number"},"units":{"type":"number"},"volume":{"type":"number"},"volumePlausible":{"description":"False when `volume` is a pre-summed figure this API can show is impossible — e.g. an average sale price per unit far outside any real market, or buyer-side and seller-side averages that contradict each other. `pctVolume` on every item is that figure's quotient, so when this is false those percentages are unusable and should not be rendered as shares. A MAGNITUDE check only: true means \"not obviously impossible\", NOT \"verified\". Absent on surfaces that aggregate documents live, where no such figure is read.","type":"boolean"}},"required":["units","volume"],"type":"object"},"truncated":{"description":"True when more buckets exist beyond this page. Page through with `cursor`, or sort by `label` to enumerate the full key space.","type":"boolean"}},"required":["data","total"],"type":"object"},"AgentSummary":{"properties":{"avgSoldPrice":{"nullable":true,"type":"number"},"buyerUnits":{"nullable":true,"type":"number"},"buyerVolume":{"nullable":true,"type":"number"},"city":{"nullable":true,"type":"string"},"dualUnits":{"nullable":true,"type":"number"},"dualVolume":{"nullable":true,"type":"number"},"email":{"nullable":true,"type":"string"},"firstName":{"nullable":true,"type":"string"},"fullName":{"nullable":true,"type":"string"},"id":{"description":"Document ID","type":"string"},"lastName":{"nullable":true,"type":"string"},"licenseNumber":{"nullable":true,"type":"string"},"modelMatchId":{"nullable":true,"type":"string"},"office":{"nullable":true,"type":"string"},"phone":{"nullable":true,"type":"string"},"sellerUnits":{"nullable":true,"type":"number"},"sellerVolume":{"nullable":true,"type":"number"},"state":{"nullable":true,"type":"string"},"totalCompaniesWorkedWith":{"nullable":true,"type":"number"},"totalLendersWorkedWith":{"nullable":true,"type":"number"},"totalOriginatorsWorkedWith":{"nullable":true,"type":"number"},"units":{"nullable":true,"type":"number"},"volume":{"nullable":true,"type":"number"},"zip":{"nullable":true,"type":"string"}},"required":["id"],"type":"object"},"AgentSummaryRequest":{"additionalProperties":false,"properties":{"id":{"type":"string"},"ids":{"items":{"type":"string"},"type":"array"},"period":{"$ref":"#/components/schemas/Period"}},"type":"object"},"AgentTimeSeriesRequest":{"additionalProperties":false,"properties":{"id":{"type":"string"},"ids":{"items":{"type":"string"},"type":"array"},"interval":{"$ref":"#/components/schemas/Interval"},"period":{"$ref":"#/components/schemas/Period"}},"type":"object"},"AgentTitleCompanyTimeSeriesRequest":{"additionalProperties":false,"properties":{"advancedFilters":{"$ref":"#/components/schemas/FilterNode"},"filters":{"$ref":"#/components/schemas/FilterNode"},"flatFilters":{"additionalProperties":false,"properties":{"borrowerStatus":{"$ref":"#/components/schemas/LoanBorrowerStatusFilterValue"},"broker":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Broker shop NMLS id (digits only). A broker is a company — resolve a broker name to its NMLS id via instantSearch (or listCompanies)."}]},"buyerEntityType":{"$ref":"#/components/schemas/BooleanFilterValue"},"city":{"$ref":"#/components/schemas/TextFilterValue"},"conforming":{"$ref":"#/components/schemas/BooleanFilterValue"},"county":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"County name (e.g. \"Broward\") or 5-digit FIPS code. Names resolve to FIPS server-side; include a `state` filter to disambiguate."}]},"currentBalance":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Estimated remaining principal balance (~19% populated). Approximate current equity as `homeValue` (AVM) minus this."}]},"employer":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Employer/company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"equity":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Point-in-time equity recorded on the loan (sparse, ~10%). NOT a live current-equity figure. For HELOC/cash-out targeting on up-to-date equity, use properties search (listProperties) instead — its equity is far better populated and current."}]},"excludeBroker":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans brokered by this broker-shop NMLS id (digits only) — the inverse of `broker`."}]},"excludeCity":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this city — the inverse of `city`."}]},"excludeLender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans from this lender ID (\"everyone but X\") — the inverse of `lender`, same id contract (resolve via instantSearch/listLenders). Loans with no lender stay in the results."}]},"excludeLoanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans funded by this company NMLS id (digits only) — the inverse of `loanCompany`."}]},"excludeLoanType":{"$ref":"#/components/schemas/LoanTypeExcludeFilterValue"},"excludeOriginator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans with this originator NMLS id (digits only) — the inverse of `originator`. Common for 'everyone but my own shop' lists."}]},"excludeState":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this state (2-letter code, e.g. \"CA\") — the inverse of `state`. For \"everywhere but this state\" lists."}]},"excludeTransactionType":{"$ref":"#/components/schemas/LoanTransactionTypeExcludeFilterValue"},"excludeZipCode":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this ZIP code — the inverse of `zipCode`."}]},"fips":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exact 5-digit county FIPS code (no name resolution) — the code-only escape hatch alongside `county`."}]},"geoPoint":{"$ref":"#/components/schemas/GeoFilterValue"},"homeValue":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"AVM (automated valuation) at the linked property (~26%, MLS-linked). Pair with `currentBalance` to approximate current equity."}]},"includeUnknownOriginator":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Include loans that have no originator NMLS id. Omitted/false (default): such loans are excluded — the vast majority are pre-2016 public records with no linkable originator. true: include them. Note that the default scopes results to loans with a known originator (~2016+ recordings)."}]},"interestRate":{"$ref":"#/components/schemas/NumericFilterValue"},"lender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender ID — the normalized lender-dictionary key, NOT a fuzzy name match. Resolve a lender via instantSearch (or listLenders) and pass the `id` it returns (e.g. \"mortgage_rocket\" or \"mortgage rocket\"). Underscores and letter case are normalized, so either id surface works. A stored normalized lender name (what the `slice: \"lender\"` chart buckets emit) is also accepted, so a chart bucket key filters directly. A value that is neither returns 400 rather than silently matching nothing — to search by lender NAME, use `lenderName`."}]},"lenderName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender name as recorded on the loan document — fuzzy, all-terms match (e.g. \"Fifth Third\"). The name counterpart to the exact-id `lender` filter; use `lender` when you have a resolved id, and this when you only have a name."}]},"loanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Funding/loan company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"loanType":{"$ref":"#/components/schemas/LoanTypeFilterValue"},"ltvAtOrigination":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Loan-to-value at ORIGINATION (sparse), as a PERCENT on a 0-100 scale (`80` = 80% LTV; values above 100 are real underwater loans). This is not a current LTV — there is no stored current-LTV field on loans."}]},"mode":{"enum":["and","or"],"type":"string"},"mortgageAmount":{"$ref":"#/components/schemas/NumericFilterValue"},"mortgageDate":{"$ref":"#/components/schemas/DateFilterValue"},"originator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Loan originator NMLS id (digits only). To search by name use `originatorName`, or resolve a name to its id via instantSearch."}]},"originatorName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"deprecated":true,"description":"DEPRECATED — fuzzy name matching is unreliable (same originator can return wildly different counts by name string). Resolve the loan officer via instantSearch and filter by `originator` (exact NMLS id) instead. Still functional for now."}]},"propertyId":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Parcel id — returns every loan recorded against one property. Pass the same string this endpoint returns as `mmPropertyId` on a loan row, or the `mmPropertyId` of a property record.\n\nThis is the parcel's FULL recorded loan history, which is deliberately wider than the loans embedded on a property record: that embed is a snapshot of what is still owed (up to five currently-active loans), so paid-off mortgages are absent from it and present here.\n\nMulti-unit caveat: loans carry a unit-blind parcel id, so for one unit of a multi-unit building this selects every unit in the building, not that unit alone."}]},"saleDate":{"$ref":"#/components/schemas/DateFilterValue"},"salePrice":{"$ref":"#/components/schemas/NumericFilterValue"},"state":{"$ref":"#/components/schemas/TextFilterValue"},"transactionType":{"$ref":"#/components/schemas/LoanTransactionTypeFilterValue"},"zip":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Alias of `zipCode` — same ZIP filter, accepted for cross-entity key parity."}]},"zipCode":{"$ref":"#/components/schemas/TextFilterValue"}},"type":"object"},"interval":{"$ref":"#/components/schemas/Interval"},"measure":{"$ref":"#/components/schemas/Measure"},"period":{"$ref":"#/components/schemas/DatedPeriod"},"side":{"$ref":"#/components/schemas/AgentSide"}},"type":"object"},"AlertConditions":{"properties":{"epoThresholdDays":{"description":"Max days since loan close for an early-payoff alert.","example":180,"type":"integer"},"refiRateThreshold":{"description":"Minimum loan rate (%) before a refi-risk alert fires.","example":7,"type":"number"}},"type":"object"},"AlertConditionsResponse":{"properties":{"data":{"properties":{"conditions":{"$ref":"#/components/schemas/AlertConditions"},"emailEnabled":{"deprecated":true,"description":"Deprecated and ignored: accepted for compatibility, but not stored and no longer controls delivery (the response always reports every flag off). Email and in-app channel preferences for alerts live in Notifications settings.","properties":{"agent_sale_closed":{"type":"boolean"},"area_new_listing":{"type":"boolean"},"borrower_listed":{"type":"boolean"},"epo_risk":{"type":"boolean"},"rate_term_refi_area":{"type":"boolean"},"watched_agent_pending":{"type":"boolean"},"watched_loan":{"type":"boolean"},"watched_property":{"type":"boolean"},"watched_sale":{"type":"boolean"}},"required":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan"],"type":"object"},"enabled":{"$ref":"#/components/schemas/AlertEnabled"}},"required":["enabled","emailEnabled","conditions"],"type":"object"}},"required":["data"],"type":"object"},"AlertDecision":{"properties":{"correlationId":{"type":"string"},"dedupeKey":{"type":"string"},"orgId":{"type":"string"},"payload":{"additionalProperties":{"nullable":true},"properties":{"description":{"type":"string"},"url":{"type":"string"}},"required":["description"],"type":"object"},"triggeredAt":{"type":"string"},"type":{"enum":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan","book_property","book_loan","area_property"],"type":"string"},"userId":{"type":"string"}},"required":["userId","type","dedupeKey","payload","triggeredAt"],"type":"object"},"AlertDetectorStatusResponse":{"properties":{"data":{"properties":{"running":{"type":"boolean"},"tasks":{"items":{"properties":{"arn":{"type":"string"},"startedAt":{"type":"string"},"status":{"type":"string"},"stoppedReason":{"type":"string"}},"required":["arn","status"],"type":"object"},"type":"array"}},"required":["running","tasks"],"type":"object"}},"required":["data"],"type":"object"},"AlertDigestItem":{"properties":{"count":{"description":"Total alerts rolled into this digest.","type":"integer"},"id":{"description":"Opaque digest id for mark-read.","type":"string"},"ids":{"description":"The individual alert ids — resolve full detail via the feed.","items":{"type":"string"},"type":"array"},"preview":{"description":"First few human-formatted preview lines.","items":{"type":"string"},"type":"array"},"readAt":{"type":"string"},"triggeredAt":{"type":"string"},"type":{"enum":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan","book_property","book_loan","area_property"],"type":"string"}},"required":["id","type","count","ids","preview","triggeredAt"],"type":"object"},"AlertDigestResponse":{"properties":{"cursor":{"type":"string"},"data":{"items":{"$ref":"#/components/schemas/AlertDigestItem"},"type":"array"}},"required":["data"],"type":"object"},"AlertEmailTemplatePreviewRequest":{"properties":{"kinds":{"description":"The alert kinds to sample (and validate item tokens against). Default: the recipe's kinds, else every kind.","items":{"enum":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan","book_property","book_loan","area_property"],"type":"string"},"type":"array"},"recipeId":{"description":"Preview under this recipe (its copy, family and kinds). Omitted: a neutral stand-in recipe.","type":"string"},"template":{"$ref":"#/components/schemas/AlertRecipeEmailTemplate"}},"required":["template"],"type":"object"},"AlertEmailTemplatePreviewResponse":{"properties":{"ok":{"enum":[true],"type":"boolean"},"props":{"$ref":"#/components/schemas/AlertRecipeDigestProps"},"subjectPreview":{"description":"The email subject with the sample count filled in.","type":"string"}},"required":["ok","subjectPreview","props"],"type":"object"},"AlertEmailTokensResponse":{"properties":{"byKind":{"description":"Item tokens per alert kind, usable inside an `items` block. A token offered by ANY of a recipe's kinds is allowed; an item without a value drops that line.","properties":{"agent_sale_closed":{"items":{"properties":{"example":{"description":"A formatted sample value.","type":"string"},"label":{"type":"string"},"token":{"description":"Use as `{token}`.","example":"price","type":"string"}},"required":["token","label","example"],"type":"object"},"type":"array"},"area_new_listing":{"items":{"properties":{"example":{"description":"A formatted sample value.","type":"string"},"label":{"type":"string"},"token":{"description":"Use as `{token}`.","example":"price","type":"string"}},"required":["token","label","example"],"type":"object"},"type":"array"},"area_property":{"items":{"properties":{"example":{"description":"A formatted sample value.","type":"string"},"label":{"type":"string"},"token":{"description":"Use as `{token}`.","example":"price","type":"string"}},"required":["token","label","example"],"type":"object"},"type":"array"},"book_loan":{"items":{"properties":{"example":{"description":"A formatted sample value.","type":"string"},"label":{"type":"string"},"token":{"description":"Use as `{token}`.","example":"price","type":"string"}},"required":["token","label","example"],"type":"object"},"type":"array"},"book_property":{"items":{"properties":{"example":{"description":"A formatted sample value.","type":"string"},"label":{"type":"string"},"token":{"description":"Use as `{token}`.","example":"price","type":"string"}},"required":["token","label","example"],"type":"object"},"type":"array"},"borrower_listed":{"items":{"properties":{"example":{"description":"A formatted sample value.","type":"string"},"label":{"type":"string"},"token":{"description":"Use as `{token}`.","example":"price","type":"string"}},"required":["token","label","example"],"type":"object"},"type":"array"},"epo_risk":{"items":{"properties":{"example":{"description":"A formatted sample value.","type":"string"},"label":{"type":"string"},"token":{"description":"Use as `{token}`.","example":"price","type":"string"}},"required":["token","label","example"],"type":"object"},"type":"array"},"rate_term_refi_area":{"items":{"properties":{"example":{"description":"A formatted sample value.","type":"string"},"label":{"type":"string"},"token":{"description":"Use as `{token}`.","example":"price","type":"string"}},"required":["token","label","example"],"type":"object"},"type":"array"},"watched_agent_pending":{"items":{"properties":{"example":{"description":"A formatted sample value.","type":"string"},"label":{"type":"string"},"token":{"description":"Use as `{token}`.","example":"price","type":"string"}},"required":["token","label","example"],"type":"object"},"type":"array"},"watched_loan":{"items":{"properties":{"example":{"description":"A formatted sample value.","type":"string"},"label":{"type":"string"},"token":{"description":"Use as `{token}`.","example":"price","type":"string"}},"required":["token","label","example"],"type":"object"},"type":"array"},"watched_property":{"items":{"properties":{"example":{"description":"A formatted sample value.","type":"string"},"label":{"type":"string"},"token":{"description":"Use as `{token}`.","example":"price","type":"string"}},"required":["token","label","example"],"type":"object"},"type":"array"},"watched_sale":{"items":{"properties":{"example":{"description":"A formatted sample value.","type":"string"},"label":{"type":"string"},"token":{"description":"Use as `{token}`.","example":"price","type":"string"}},"required":["token","label","example"],"type":"object"},"type":"array"}},"required":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan","book_property","book_loan","area_property"],"type":"object"},"run":{"description":"Tokens usable anywhere: count, recipe, appUrl, date, firstName.","items":{"type":"string"},"type":"array"}},"required":["run","byKind"],"type":"object"},"AlertEnabled":{"properties":{"agent_sale_closed":{"type":"boolean"},"area_new_listing":{"type":"boolean"},"borrower_listed":{"type":"boolean"},"epo_risk":{"type":"boolean"},"rate_term_refi_area":{"type":"boolean"},"watched_agent_pending":{"type":"boolean"},"watched_loan":{"type":"boolean"},"watched_property":{"type":"boolean"},"watched_sale":{"type":"boolean"}},"required":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan"],"type":"object"},"AlertLogItem":{"properties":{"id":{"description":"Opaque id for mark-read.","type":"string"},"payload":{"additionalProperties":{"nullable":true},"description":"Human description + optional deep link + typed fields.","properties":{"description":{"type":"string"},"url":{"type":"string"}},"required":["description"],"type":"object"},"readAt":{"type":"string"},"triggeredAt":{"type":"string"},"type":{"enum":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan","book_property","book_loan","area_property"],"type":"string"}},"required":["id","type","payload","triggeredAt"],"type":"object"},"AlertLogResponse":{"properties":{"cursor":{"type":"string"},"data":{"items":{"$ref":"#/components/schemas/AlertLogItem"},"type":"array"}},"required":["data"],"type":"object"},"AlertMyRecipeDefinition":{"description":"Your own alert recipe. The server derives its family, default inputs and digest copy.","properties":{"description":{"description":"What it watches for (also the digest intro).","maxLength":240,"type":"string"},"email":{"$ref":"#/components/schemas/AlertRecipeEmailTemplate"},"grants":{"description":"The alert kinds per subject type (`nmls`, `agent`, `area`, or `document` rule templates). Every kind must belong to ONE notification family (else 400 `family_mismatch`).","properties":{"agent":{"items":{"enum":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan","book_property","book_loan","area_property"],"type":"string"},"type":"array"},"area":{"items":{"enum":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan","book_property","book_loan","area_property"],"type":"string"},"type":"array"},"areaRules":{"properties":{"property":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"}},"type":"object"},"book":{"properties":{"loan":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"},"property":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"}},"type":"object"},"document":{"properties":{"loan":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"},"property":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"},"sale":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"}},"type":"object"},"nmls":{"items":{"enum":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan","book_property","book_loan","area_property"],"type":"string"},"type":"array"}},"type":"object"},"icon":{"description":"One of: Agreement02Icon, Alert02Icon, AnalyticsUpIcon, Award01Icon, BankIcon, BinocularsIcon, Bookmark02Icon, Briefcase01Icon, Building03Icon, Building06Icon, Calendar03Icon, Call02Icon, Certificate01Icon, ChartIncreaseIcon, ChartLineData01Icon, Clock01Icon, Coins01Icon, Crown02Icon, DollarCircleIcon, Exchange01Icon, File01Icon, FileValidationIcon, Fire02Icon, Flag02Icon, FlashIcon, Globe02Icon, Home01Icon, House03Icon, Idea01Icon, Invoice01Icon, Key01Icon, Location01Icon, Mail01Icon, MapPinIcon, MapsLocation01Icon, Megaphone01Icon, Money03Icon, MoneyBag02Icon, MoneyExchange01Icon, MoneyReceive02Icon, Notification03Icon, PercentCircleIcon, Radar01Icon, RealEstate01Icon, RealEstate02Icon, RefreshIcon, Rocket01Icon, RouteIcon, SaleTag02Icon, Search01Icon, Shield01Icon, SparklesIcon, StarIcon, Store01Icon, Target02Icon, TradeUpIcon, UserCheck01Icon, UserGroupIcon, UserLove01Icon, UserMultiple02Icon, UserMultipleIcon, UserSearch01Icon, UserStar01Icon, ViewIcon, Wallet01Icon. Default Notification03Icon.","type":"string"},"inputs":{"description":"What subscribing asks for. Omitted: one required input per subject type the grants use (an NMLS id comes from your alert settings).","items":{"properties":{"documentType":{"enum":["sale","property","loan"],"type":"string"},"help":{"maxLength":400,"type":"string"},"label":{"maxLength":80,"type":"string"},"max":{"minimum":1,"type":"integer"},"min":{"minimum":0,"type":"integer"},"required":{"type":"boolean"},"type":{"enum":["nmls","agent","area","document"],"type":"string"}},"required":["type","required"],"type":"object"},"maxItems":4,"type":"array"},"title":{"description":"The alert's name (also its digest subject / headline).","maxLength":60,"minLength":1,"type":"string"}},"required":["title","grants"],"type":"object"},"AlertMyRecipePreviewRequest":{"properties":{"definition":{"$ref":"#/components/schemas/AlertMyRecipeDefinition"},"inputs":{"allOf":[{"$ref":"#/components/schemas/AlertRecipeInputs"},{"description":"Inputs to preview with (as the subscribe body)."}]}},"required":["definition"],"type":"object"},"AlertMyRecipeUpdate":{"properties":{"description":{"description":"What it watches for (also the digest intro).","maxLength":240,"type":"string"},"email":{"$ref":"#/components/schemas/AlertRecipeEmailTemplate"},"grants":{"description":"The alert kinds per subject type (`nmls`, `agent`, `area`, or `document` rule templates). Every kind must belong to ONE notification family (else 400 `family_mismatch`).","properties":{"agent":{"items":{"enum":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan","book_property","book_loan","area_property"],"type":"string"},"type":"array"},"area":{"items":{"enum":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan","book_property","book_loan","area_property"],"type":"string"},"type":"array"},"areaRules":{"properties":{"property":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"}},"type":"object"},"book":{"properties":{"loan":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"},"property":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"}},"type":"object"},"document":{"properties":{"loan":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"},"property":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"},"sale":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"}},"type":"object"},"nmls":{"items":{"enum":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan","book_property","book_loan","area_property"],"type":"string"},"type":"array"}},"type":"object"},"icon":{"description":"One of: Agreement02Icon, Alert02Icon, AnalyticsUpIcon, Award01Icon, BankIcon, BinocularsIcon, Bookmark02Icon, Briefcase01Icon, Building03Icon, Building06Icon, Calendar03Icon, Call02Icon, Certificate01Icon, ChartIncreaseIcon, ChartLineData01Icon, Clock01Icon, Coins01Icon, Crown02Icon, DollarCircleIcon, Exchange01Icon, File01Icon, FileValidationIcon, Fire02Icon, Flag02Icon, FlashIcon, Globe02Icon, Home01Icon, House03Icon, Idea01Icon, Invoice01Icon, Key01Icon, Location01Icon, Mail01Icon, MapPinIcon, MapsLocation01Icon, Megaphone01Icon, Money03Icon, MoneyBag02Icon, MoneyExchange01Icon, MoneyReceive02Icon, Notification03Icon, PercentCircleIcon, Radar01Icon, RealEstate01Icon, RealEstate02Icon, RefreshIcon, Rocket01Icon, RouteIcon, SaleTag02Icon, Search01Icon, Shield01Icon, SparklesIcon, StarIcon, Store01Icon, Target02Icon, TradeUpIcon, UserCheck01Icon, UserGroupIcon, UserLove01Icon, UserMultiple02Icon, UserMultipleIcon, UserSearch01Icon, UserStar01Icon, ViewIcon, Wallet01Icon. Default Notification03Icon.","type":"string"},"inputs":{"description":"What subscribing asks for. Omitted: one required input per subject type the grants use (an NMLS id comes from your alert settings).","items":{"properties":{"documentType":{"enum":["sale","property","loan"],"type":"string"},"help":{"maxLength":400,"type":"string"},"label":{"maxLength":80,"type":"string"},"max":{"minimum":1,"type":"integer"},"min":{"minimum":0,"type":"integer"},"required":{"type":"boolean"},"type":{"enum":["nmls","agent","area","document"],"type":"string"}},"required":["type","required"],"type":"object"},"maxItems":4,"type":"array"},"title":{"description":"The alert's name (also its digest subject / headline).","maxLength":60,"minLength":1,"type":"string"},"version":{"description":"The version you edited; a stale one answers 409 `version_conflict`.","minimum":1,"type":"integer"}},"required":["title","grants"],"type":"object"},"AlertRecipe":{"properties":{"category":{"type":"string"},"description":{"type":"string"},"family":{"description":"Notification family (selects the email template).","enum":["past-clients","agent-partners","farm-area","watch-record"],"type":"string"},"featured":{"type":"boolean"},"hasEmailTemplate":{"description":"Whether the recipe sends a custom email template (else the built-in email).","type":"boolean"},"howItWorks":{"type":"string"},"icon":{"description":"hugeicons component name; render with a fallback.","example":"UserGroupIcon","type":"string"},"id":{"type":"string"},"inputs":{"items":{"$ref":"#/components/schemas/AlertRecipeInputSpec"},"type":"array"},"inputsSchema":{"additionalProperties":{"nullable":true},"description":"JSON Schema of the inputs the recipe needs to subscribe.","type":"object"},"label":{"description":"Same as `title` (kept for compatibility).","type":"string"},"scope":{"description":"`global`: a Model Match recipe; `mine`: one of your own recipes (id `u-…`).","enum":["global","mine"],"type":"string"},"sortOrder":{"type":"integer"},"subscribed":{"description":"Whether you are subscribed: at least one of your subscriptions carries this recipe.","type":"boolean"},"title":{"type":"string"},"types":{"description":"The alert triggers this recipe turns on.","items":{"enum":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan","book_property","book_loan","area_property"],"type":"string"},"type":"array"}},"required":["id","title","label","description","icon","category","family","types","inputs","inputsSchema","featured","sortOrder","hasEmailTemplate","subscribed","scope"],"type":"object"},"AlertRecipeDigestProps":{"description":"The notification props a run dispatches for one recipe (v3) — what the email renders from.","properties":{"appUrl":{"type":"string"},"count":{"type":"integer"},"date":{"description":"Run date, e.g. `Oct 5`.","type":"string"},"family":{"enum":["past-clients","agent-partners","farm-area","watch-record"],"type":"string"},"firstName":{"type":"string"},"propsVersion":{"enum":[3],"type":"number"},"recipe":{"properties":{"email":{"$ref":"#/components/schemas/AlertRecipeEmailTemplate"},"headline":{"type":"string"},"icon":{"type":"string"},"id":{"type":"string"},"intro":{"type":"string"},"plural":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"}},"required":["id","title","icon","headline","intro","plural","subject"],"type":"object"},"runId":{"type":"string"},"sections":{"items":{"properties":{"count":{"type":"integer"},"items":{"items":{"properties":{"alertId":{"type":"string"},"fields":{"additionalProperties":{"type":"string"},"description":"The formatted item tokens (only non-empty values).","type":"object"},"kind":{"enum":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan","book_property","book_loan","area_property"],"type":"string"},"summary":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"}},"required":["alertId","title","kind","fields"],"type":"object"},"type":"array"},"label":{"type":"string"},"type":{"enum":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan","book_property","book_loan","area_property"],"type":"string"}},"required":["type","label","count","items"],"type":"object"},"type":"array"},"triggeredAt":{"type":"string"}},"required":["propsVersion","recipe","family","runId","triggeredAt","count","sections","appUrl","date"],"type":"object"},"AlertRecipeEmailBlock":{"properties":{"columns":{"description":"items, table layout only: 1–5 columns (`value` is a token template).","items":{"properties":{"label":{"type":"string"},"value":{"type":"string"}},"required":["label","value"],"type":"object"},"type":"array"},"href":{"description":"button: `{appUrl}` (the alerts page).","type":"string"},"label":{"description":"button: the label (≤40).","type":"string"},"layout":{"description":"items: cards | list | table.","type":"string"},"link":{"description":"items: `{url}` (default — each entry links) or `none`.","type":"string"},"max":{"description":"items: how many to show, 1–25 (default 10).","type":"integer"},"meta":{"description":"items: up to 4 detail lines; a line whose token has no value for an entry is dropped.","items":{"type":"string"},"type":"array"},"text":{"description":"heading / text / callout: the copy (tokens allowed).","type":"string"},"title":{"description":"items: each entry's title line (item tokens allowed).","type":"string"},"tone":{"description":"callout: info | success | warning.","type":"string"},"type":{"description":"heading (`text` ≤120) · text (`text` ≤600; newlines become line breaks) · callout (`tone` info|success|warning + `text` ≤300) · items (one entry per alert: `layout` cards|list|table, `title`, optional `meta` lines, `columns` for table, `max`, `link`) · button (`label` ≤40 + `href` `{appUrl}`) · divider.","enum":["heading","text","callout","items","button","divider"],"type":"string"}},"required":["type"],"type":"object"},"AlertRecipeEmailTemplate":{"description":"The recipe's email, as blocks. Plain text only. Tokens: `{count}`, `{recipe}`, `{appUrl}`, `{date}`, `{firstName}` anywhere; `{one|many}` (resolved by count) in heading / text / callout; item tokens (GET /alerts/email-tokens, per alert kind) inside an items block. Serialized size ≤ 8 KB.","properties":{"blocks":{"description":"1–20 blocks, rendered top to bottom.","items":{"$ref":"#/components/schemas/AlertRecipeEmailBlock"},"type":"array"},"version":{"description":"Template format version.","enum":[1],"type":"number"}},"required":["version","blocks"],"type":"object"},"AlertRecipeError":{"properties":{"code":{"description":"Machine-readable reason (absent on a generic validation error).","enum":["unknown_recipe","recipe_archived","invalid_recipe","invalid_recipe_id","invalid_icon","invalid_kind","kind_not_allowed_for_subject","unknown_field","invalid_rule","rule_edge_op_on_event_kind","rule_op_not_supported_for_area","grants_empty","family_mismatch","inputs_mismatch","invalid_inputs","rules_required","recipe_exists","recipe_in_use","version_conflict","recipe_limit","no_org","invalid_title","invalid_email_template"],"type":"string"},"details":{"description":"`invalid_email_template`: every problem found (fix them all in one go).","items":{"properties":{"path":{"description":"Where, e.g. `email.blocks.2.meta.0`.","type":"string"},"reason":{"type":"string"}},"required":["path","reason"],"type":"object"},"type":"array"},"error":{"description":"Error message","type":"string"}},"required":["error"],"type":"object"},"AlertRecipeInputSpec":{"description":"One input the subscribe form asks for. `type` maps to body fields: nmls → nmlsId, agent → agents, area → areas, document → documentType + documentId + rules.","properties":{"documentType":{"enum":["sale","property","loan"],"type":"string"},"help":{"maxLength":400,"type":"string"},"label":{"maxLength":80,"type":"string"},"max":{"minimum":1,"type":"integer"},"min":{"minimum":0,"type":"integer"},"required":{"type":"boolean"},"type":{"enum":["nmls","agent","area","document"],"type":"string"}},"required":["type","required"],"type":"object"},"AlertRecipeInputs":{"properties":{"agents":{"description":"Recipes with an `agent` input: the agents.","items":{"properties":{"agentMmaId":{"description":"Agent id.","minLength":1,"type":"string"}},"required":["agentMmaId"],"type":"object"},"maxItems":50,"type":"array"},"areas":{"description":"Recipes with an `area` input: the areas.","items":{"$ref":"#/components/schemas/AddWatchedAreaRequest"},"maxItems":25,"type":"array"},"documentId":{"description":"Recipes with a `document` input: the record id.","minLength":1,"type":"string"},"documentType":{"description":"Recipes with a `document` input: the record type.","enum":["sale","property","loan"],"example":"property","type":"string"},"nmlsId":{"description":"Recipes with an `nmls` input: the loan officer's NMLS id.","type":"string"},"rules":{"description":"Recipes with a `document` input: what change to watch for. Empty or omitted applies the recipe's rule templates for the record type.","items":{"properties":{"match":{"description":"How predicates combine: all (AND, default) or any (OR).","enum":["all","any"],"example":"all","type":"string"},"predicates":{"description":"One or more conditions; combined per match.","items":{"properties":{"field":{"description":"Catalog field alias (e.g. avm, current_ltv, loan_type).","example":"current_ltv","type":"string"},"op":{"description":"Comparison / change / status / guard operator.","enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"example":"lte","type":"string"},"stringValue":{"description":"Target keyword for changed_to / eq / not_eq guard.","type":"string"},"stringValues":{"description":"Keyword set for the in guard (1–20).","items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"description":"Threshold, or change amount (percent for pct_change_gte).","example":0.8,"type":"number"},"value2":{"description":"Upper bound for between.","type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"}},"type":"object"},"AlertRecipePreviewResponse":{"properties":{"data":{"properties":{"byType":{"additionalProperties":{"type":"integer"},"description":"Count per alert trigger.","type":"object"},"count":{"description":"Alerts the recipe would have fired in the window.","type":"integer"},"sample":{"description":"The newest few, as digest lines.","items":{"properties":{"description":{"type":"string"},"title":{"type":"string"},"triggeredAt":{"type":"string"},"type":{"enum":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan","book_property","book_loan","area_property"],"type":"string"}},"required":["type","title","description","triggeredAt"],"type":"object"},"type":"array"},"since":{"description":"Window start (ISO).","type":"string"}},"required":["count","byType","sample","since"],"type":"object"}},"required":["data"],"type":"object"},"AlertRecipeResponse":{"properties":{"data":{"$ref":"#/components/schemas/AlertRecipe"}},"required":["data"],"type":"object"},"AlertRecipesResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AlertRecipe"},"type":"array"}},"required":["data"],"type":"object"},"AlertSubscription":{"properties":{"createdAt":{"type":"string"},"display":{"$ref":"#/components/schemas/AlertSubscriptionDisplay"},"expiresAt":{"description":"When the subscription stops firing (ISO 8601).","type":"string"},"grants":{"items":{"$ref":"#/components/schemas/AlertSubscriptionGrant"},"type":"array"},"id":{"description":"Opaque subscription id.","type":"string"},"kinds":{"description":"The alert kinds that fire on this subject (empty = paused).","items":{"enum":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan","book_property","book_loan","area_property"],"type":"string"},"type":"array"},"rules":{"items":{"$ref":"#/components/schemas/WatchedDocumentRule"},"type":"array"},"subjectType":{"enum":["agent","area","nmls","property","loan","sale","company","filter"],"type":"string"},"updatedAt":{"type":"string"}},"required":["id","subjectType","display","kinds","grants","createdAt","updatedAt"],"type":"object"},"AlertSubscriptionDisplay":{"description":"What the subscription watches, for display.","properties":{"agentMmaId":{"type":"string"},"areaType":{"enum":["city","county","zip","bbox","radius"],"type":"string"},"documentId":{"type":"string"},"documentType":{"enum":["sale","property","loan"],"type":"string"},"lat":{"type":"number"},"lon":{"type":"number"},"maxLat":{"type":"number"},"maxLon":{"type":"number"},"minLat":{"type":"number"},"minLon":{"type":"number"},"name":{"type":"string"},"nmlsId":{"type":"string"},"radiusMeters":{"type":"number"},"state":{"type":"string"},"value":{"type":"string"}},"type":"object"},"AlertSubscriptionError":{"properties":{"code":{"description":"Machine-readable reason (absent on a generic validation error).","enum":["invalid_kind","kind_not_allowed_for_subject","subject_type_not_supported","rules_required","rule_edge_op_on_event_kind","unknown_field","invalid_rule","invalid_area","invalid_subject","invalid_subscription_id","nmls_mismatch"],"type":"string"},"error":{"description":"Error message","type":"string"}},"required":["error"],"type":"object"},"AlertSubscriptionGrant":{"properties":{"addedAt":{"type":"string"},"addedBy":{"description":"Who set the grant up on the user's behalf (`admin:{userId}`); absent when the user did.","type":"string"},"kinds":{"items":{"enum":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan","book_property","book_loan","area_property"],"type":"string"},"type":"array"},"recipeId":{"description":"Why the kinds are on: a recipe id (see GET /alerts/recipes), `custom` (set directly), or `migration`.","type":"string"}},"required":["recipeId","kinds","addedAt"],"type":"object"},"AlertSubscriptionResponse":{"properties":{"data":{"$ref":"#/components/schemas/AlertSubscription"}},"required":["data"],"type":"object"},"AlertSubscriptionSubject":{"properties":{"agentMmaId":{"description":"agent: the agent id.","minLength":1,"type":"string"},"area":{"description":"Area subject: the same body as POST /watched-areas.","properties":{"lat":{"description":"Center latitude (point + radius).","maximum":90,"minimum":-90,"type":"number"},"lon":{"description":"Center longitude.","maximum":180,"minimum":-180,"type":"number"},"maxLat":{"description":"Box north edge.","maximum":90,"minimum":-90,"type":"number"},"maxLon":{"description":"Box east edge.","maximum":180,"minimum":-180,"type":"number"},"minLat":{"description":"Box south edge.","maximum":90,"minimum":-90,"type":"number"},"minLon":{"description":"Box west edge.","maximum":180,"minimum":-180,"type":"number"},"radius":{"description":"Radius around the center point.","example":10,"exclusiveMinimum":true,"minimum":0,"type":"number"},"state":{"description":"2-letter state. Ignored for zip + geo areas.","example":"CA","type":"string"},"type":{"description":"Named area (city/county/zip) or geo area (bbox = bounding box, radius = point + radius).","enum":["city","county","zip","bbox","radius"],"type":"string"},"unit":{"description":"Radius unit (default mi).","enum":["mi","km","m"],"example":"mi","type":"string"},"value":{"description":"City / county name, or 5-digit zip. Required for named areas.","example":"Los Angeles","type":"string"}},"required":["type"],"type":"object"},"documentId":{"description":"sale / property / loan: the record id.","minLength":1,"type":"string"},"nmlsId":{"description":"nmls: your NMLS id.","minLength":1,"type":"string"},"type":{"description":"agent, area, nmls (your own NMLS id), sale, property or loan. company and filter are reserved.","enum":["agent","area","nmls","property","loan","sale","company","filter"],"type":"string"}},"required":["type"],"type":"object"},"AlertSubscriptionsResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AlertSubscription"},"type":"array"}},"required":["data"],"type":"object"},"AlertUserRecipe":{"properties":{"category":{"type":"string"},"copy":{"properties":{"headline":{"maxLength":200,"minLength":1,"type":"string"},"intro":{"maxLength":1000,"type":"string"},"plural":{"maxLength":40,"minLength":1,"type":"string"},"subject":{"maxLength":200,"minLength":1,"type":"string"}},"required":["subject","headline","intro","plural"],"type":"object"},"createdAt":{"type":"string"},"createdBy":{"type":"string"},"description":{"type":"string"},"email":{"$ref":"#/components/schemas/AlertRecipeEmailTemplate"},"family":{"enum":["past-clients","agent-partners","farm-area","watch-record"],"type":"string"},"grants":{"properties":{"agent":{"items":{"enum":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan","book_property","book_loan","area_property"],"type":"string"},"type":"array"},"area":{"items":{"enum":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan","book_property","book_loan","area_property"],"type":"string"},"type":"array"},"areaRules":{"properties":{"property":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"}},"type":"object"},"book":{"properties":{"loan":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"},"property":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"}},"type":"object"},"document":{"properties":{"loan":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"},"property":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"},"sale":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"}},"type":"object"},"nmls":{"items":{"enum":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan","book_property","book_loan","area_property"],"type":"string"},"type":"array"}},"type":"object"},"icon":{"type":"string"},"id":{"type":"string"},"inputs":{"items":{"properties":{"documentType":{"enum":["sale","property","loan"],"type":"string"},"help":{"maxLength":400,"type":"string"},"label":{"maxLength":80,"type":"string"},"max":{"minimum":1,"type":"integer"},"min":{"minimum":0,"type":"integer"},"required":{"type":"boolean"},"type":{"enum":["nmls","agent","area","document"],"type":"string"}},"required":["type","required"],"type":"object"},"type":"array"},"maxItemsPerRun":{"type":"integer"},"ownerUserId":{"type":"string"},"promotedTo":{"description":"The global recipe id this was promoted to.","type":"string"},"scope":{"enum":["user"],"type":"string"},"status":{"enum":["active","archived"],"type":"string"},"subscribed":{"description":"Lists only: whether the owner is subscribed (a subscription carries it).","type":"boolean"},"title":{"type":"string"},"updatedAt":{"type":"string"},"updatedBy":{"type":"string"},"version":{"minimum":1,"type":"integer"}},"required":["id","ownerUserId","scope","title","description","icon","category","family","grants","inputs","copy","maxItemsPerRun","status","version","createdBy","createdAt","updatedBy","updatedAt"],"type":"object"},"AlertUserRecipeResponse":{"properties":{"data":{"$ref":"#/components/schemas/AlertUserRecipe"}},"required":["data"],"type":"object"},"AlertUserRecipesResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AlertUserRecipe"},"type":"array"}},"required":["data"],"type":"object"},"AlertsOkResponse":{"properties":{"data":{"properties":{"ok":{"type":"boolean"}},"required":["ok"],"type":"object"}},"required":["data"],"type":"object"},"AnalyticsCompleteness":{"description":"Data-completeness watermark for this response. Present only when it could be measured; absence means it was not measured, NOT that the data is complete.","properties":{"through":{"description":"The last calendar date (`YYYY-MM-DD`) this query's matching records actually reach. Records arrive after the events they describe, so a period ending today is normally backed by data ending days or weeks earlier, and any bucket extending past this date is built from a partial period. Measured from THIS query's own matched set, not a global figure: the delay varies by geography and moves over time, so two requests with different filters can legitimately report different dates.","format":"date","type":"string"}},"required":["through"],"type":"object"},"AndFilter":{"properties":{"children":{"description":"Array of filter expressions (AND)","items":{"$ref":"#/components/schemas/FilterNode"},"type":"array"},"type":{"enum":["and"],"type":"string"}},"required":["type","children"],"type":"object"},"BooleanFilterValue":{"nullable":true,"type":"boolean"},"BranchChartRequest":{"additionalProperties":false,"properties":{"advancedFilters":{"$ref":"#/components/schemas/FilterNode"},"filters":{"$ref":"#/components/schemas/FilterNode"},"flatFilters":{"additionalProperties":false,"properties":{"borrowerStatus":{"$ref":"#/components/schemas/LoanBorrowerStatusFilterValue"},"broker":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Broker shop NMLS id (digits only). A broker is a company — resolve a broker name to its NMLS id via instantSearch (or listCompanies)."}]},"buyerEntityType":{"$ref":"#/components/schemas/BooleanFilterValue"},"city":{"$ref":"#/components/schemas/TextFilterValue"},"conforming":{"$ref":"#/components/schemas/BooleanFilterValue"},"county":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"County name (e.g. \"Broward\") or 5-digit FIPS code. Names resolve to FIPS server-side; include a `state` filter to disambiguate."}]},"currentBalance":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Estimated remaining principal balance (~19% populated). Approximate current equity as `homeValue` (AVM) minus this."}]},"employer":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Employer/company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"equity":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Point-in-time equity recorded on the loan (sparse, ~10%). NOT a live current-equity figure. For HELOC/cash-out targeting on up-to-date equity, use properties search (listProperties) instead — its equity is far better populated and current."}]},"excludeBroker":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans brokered by this broker-shop NMLS id (digits only) — the inverse of `broker`."}]},"excludeCity":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this city — the inverse of `city`."}]},"excludeLender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans from this lender ID (\"everyone but X\") — the inverse of `lender`, same id contract (resolve via instantSearch/listLenders). Loans with no lender stay in the results."}]},"excludeLoanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans funded by this company NMLS id (digits only) — the inverse of `loanCompany`."}]},"excludeLoanType":{"$ref":"#/components/schemas/LoanTypeExcludeFilterValue"},"excludeOriginator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans with this originator NMLS id (digits only) — the inverse of `originator`. Common for 'everyone but my own shop' lists."}]},"excludeState":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this state (2-letter code, e.g. \"CA\") — the inverse of `state`. For \"everywhere but this state\" lists."}]},"excludeTransactionType":{"$ref":"#/components/schemas/LoanTransactionTypeExcludeFilterValue"},"excludeZipCode":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this ZIP code — the inverse of `zipCode`."}]},"fips":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exact 5-digit county FIPS code (no name resolution) — the code-only escape hatch alongside `county`."}]},"geoPoint":{"$ref":"#/components/schemas/GeoFilterValue"},"homeValue":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"AVM (automated valuation) at the linked property (~26%, MLS-linked). Pair with `currentBalance` to approximate current equity."}]},"includeUnknownOriginator":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Include loans that have no originator NMLS id. Omitted/false (default): such loans are excluded — the vast majority are pre-2016 public records with no linkable originator. true: include them. Note that the default scopes results to loans with a known originator (~2016+ recordings)."}]},"interestRate":{"$ref":"#/components/schemas/NumericFilterValue"},"lender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender ID — the normalized lender-dictionary key, NOT a fuzzy name match. Resolve a lender via instantSearch (or listLenders) and pass the `id` it returns (e.g. \"mortgage_rocket\" or \"mortgage rocket\"). Underscores and letter case are normalized, so either id surface works. A stored normalized lender name (what the `slice: \"lender\"` chart buckets emit) is also accepted, so a chart bucket key filters directly. A value that is neither returns 400 rather than silently matching nothing — to search by lender NAME, use `lenderName`."}]},"lenderName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender name as recorded on the loan document — fuzzy, all-terms match (e.g. \"Fifth Third\"). The name counterpart to the exact-id `lender` filter; use `lender` when you have a resolved id, and this when you only have a name."}]},"loanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Funding/loan company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"loanType":{"$ref":"#/components/schemas/LoanTypeFilterValue"},"ltvAtOrigination":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Loan-to-value at ORIGINATION (sparse), as a PERCENT on a 0-100 scale (`80` = 80% LTV; values above 100 are real underwater loans). This is not a current LTV — there is no stored current-LTV field on loans."}]},"mode":{"enum":["and","or"],"type":"string"},"mortgageAmount":{"$ref":"#/components/schemas/NumericFilterValue"},"mortgageDate":{"$ref":"#/components/schemas/DateFilterValue"},"originator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Loan originator NMLS id (digits only). To search by name use `originatorName`, or resolve a name to its id via instantSearch."}]},"originatorName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"deprecated":true,"description":"DEPRECATED — fuzzy name matching is unreliable (same originator can return wildly different counts by name string). Resolve the loan officer via instantSearch and filter by `originator` (exact NMLS id) instead. Still functional for now."}]},"propertyId":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Parcel id — returns every loan recorded against one property. Pass the same string this endpoint returns as `mmPropertyId` on a loan row, or the `mmPropertyId` of a property record.\n\nThis is the parcel's FULL recorded loan history, which is deliberately wider than the loans embedded on a property record: that embed is a snapshot of what is still owed (up to five currently-active loans), so paid-off mortgages are absent from it and present here.\n\nMulti-unit caveat: loans carry a unit-blind parcel id, so for one unit of a multi-unit building this selects every unit in the building, not that unit alone."}]},"saleDate":{"$ref":"#/components/schemas/DateFilterValue"},"salePrice":{"$ref":"#/components/schemas/NumericFilterValue"},"state":{"$ref":"#/components/schemas/TextFilterValue"},"transactionType":{"$ref":"#/components/schemas/LoanTransactionTypeFilterValue"},"zip":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Alias of `zipCode` — same ZIP filter, accepted for cross-entity key parity."}]},"zipCode":{"$ref":"#/components/schemas/TextFilterValue"}},"type":"object"},"measure":{"$ref":"#/components/schemas/ChartMeasure"},"nmlsId":{"description":"Branch NMLS ID","minLength":1,"type":"string"},"period":{"$ref":"#/components/schemas/Period"},"segment":{"allOf":[{"$ref":"#/components/schemas/BranchSlice"},{"description":"Optional second dimension. Each bucket of `slice` then carries `segments`: the same `measure` broken down by this dimension (e.g. `slice: \"loanType\", segment: \"lender\"` is loan type × lender in one call), top 25 per bucket ranked by `measure`, with the remainder counted in `segmentsOmittedCount`. Omit it and the response is the one-dimensional chart, unchanged. Must differ from `slice` (400). Combines with `size` / `after` paging on a party slice: the cursor pages the `slice` ranking and every bucket on each page carries its own segments (e.g. `slice: \"broker\", segment: \"lender\"` walks every broker shop × its lenders)."}]},"slice":{"$ref":"#/components/schemas/BranchSlice"}},"required":["nmlsId","slice"],"type":"object"},"BranchCompanyTypeFilterValue":{"anyOf":[{"description":"One of (case-insensitive): BANK, CU, OTHER","enum":["BANK","CU","OTHER"],"type":"string"},{"description":"Match any of these values","items":{"description":"One of (case-insensitive): BANK, CU, OTHER","enum":["BANK","CU","OTHER"],"type":"string"},"type":"array"},{"description":"Fuzzy text match","properties":{"match":{"type":"string"}},"required":["match"],"type":"object"},{"nullable":true}]},"BranchCrmListFilter":{"additionalProperties":false,"description":"Scope the result to the caller's CRM. Resolved against the caller's ACTIVE WORKSPACE at query time — list membership is read server-side, so the request never carries member ids. Only branch members count; people, companies, offices and manual (unlinked) records on the same list are ignored. `mode: \"in\"` with no matching members returns an empty page (not an unfiltered one). Errors: 400 `crm_list_requires_workspace` when the caller has no active workspace (API-key / OAuth callers must select an organization), 403 / 404 when a named list is not visible to the caller or does not exist, and 400 `crm_list_too_large` when the selected lists hold more than 50,000 branches in total — narrow the selection rather than get a silently partial answer.","properties":{"lists":{"anyOf":[{"description":"Every list in the caller's workspace that the caller can see (own, org-wide, or shared with them) and that holds this kind of record — People lists for originators and agents, Company lists for companies.","enum":["any"],"type":"string"},{"description":"Specific CRM list ids (1–50).","items":{"minLength":1,"type":"string"},"maxItems":50,"minItems":1,"type":"array"}],"description":"Which lists: `\"any\"` for every Company list the caller can see, or an array of list ids. Membership is the UNION across the selected lists."},"mode":{"description":"`in` — only branches who are a member of the selected list(s). `notIn` — exclude every branch who is a member of the selected list(s); everyone else passes, including branches on none of your lists.","enum":["in","notIn"],"type":"string"}},"required":["mode","lists"],"type":"object"},"BranchDetailResponse":{"properties":{"data":{"$ref":"#/components/schemas/BranchSummary"}},"required":["data"],"type":"object"},"BranchField":{"enum":["company","companyName","companyType","name","nmlsId","city","state","zip","zipCode","isAuthorized","volume","units","avgLoanAmount","teamSize","loCount","rosterJoined","rosterLeft","producersOnly","purchaseShare","refinanceShare"],"type":"string"},"BranchFlatFilters":{"additionalProperties":false,"properties":{"affordableHousingTractCount":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Number of the entity's loans in qualified affordable-housing tracts. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"affordableHousingTractPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Share of the entity's tract-resolved loans in qualified census tracts for affordable-housing programs, 0-100 (`{gte:25}` = 27,209 originators). Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgAsianPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean Asian (non-Hispanic) share of the population in the tracts the entity lent in, 0-100. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgBlackPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean Black (non-Hispanic) share of the population in the tracts the entity lent in, 0-100. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgDenialRate":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean share of mortgage applications denied in the tracts the entity lent in, 0-100. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgFamilyIncome":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean median family income of the tracts the entity lent in, in whole dollars. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgHispanicPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean Hispanic or Latino share of the population in the tracts the entity lent in, 0-100. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgHomeValue":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean median home value across the tracts the entity lent in, in whole dollars. A neighborhood statistic — not the entity's average loan size, which is `avgLoanAmount`. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgHomeownershipRate":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean owner-occupied share of housing units in the tracts the entity lent in, 0-100. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgHouseholdIncome":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean median household income of the tracts the entity lent in, in whole dollars (e.g. `{lte:60000}`). Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgIncomeVsMetroPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean tract income relative to its metro area, where `100` is parity — `{lt:80}` is the CRA low/moderate band, and values legitimately exceed 100 (observed up to 412). NOT a 0-100 share. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgLoanAmount":{"$ref":"#/components/schemas/NumericFilterValue"},"avgLowModHouseholdPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean HUD block-group low/moderate-income HOUSEHOLD share across the tracts the entity lent in, 0-100. A finer-grained measure than `lowModIncomeTractPct`, which counts whole tracts — not a duplicate of it. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgMedianAge":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean median age of the population in the tracts the entity lent in, in years. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgMilesToCollege":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean straight-line distance to the nearest college, in miles. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgMilesToSchool":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean straight-line distance from the properties the entity lent on to the nearest school, in miles. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgMilesToWorship":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean straight-line distance to the nearest place of worship, in miles. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgMinorityPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean non-white share of the population in the tracts the entity lent in, 0-100 (`{gte:50}` = 63,370 originators). `majorityMinorityTractPct` is the per-tract-threshold form of the same question. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgPopulation":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean population of the tracts the entity lent in. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgPovertyRate":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean share of the population below the poverty line in the tracts the entity lent in, 0-100. Pass whole percents — `{gte:0.2}` means 0.2%. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgTractApplications":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean number of mortgage applications reported in the tracts the entity lent in, over the year. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgTractLoanVolume":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean mortgage dollar volume reported in the tracts the entity lent in, over the year. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgTractOriginations":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean number of mortgage originations reported in the tracts the entity lent in, over the year. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgWhiteNonHispanicPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean White (non-Hispanic) share of the population in the tracts the entity lent in, 0-100. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"city":{"$ref":"#/components/schemas/TextFilterValue"},"company":{"$ref":"#/components/schemas/TextFilterValue"},"companyName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"deprecated":true,"description":"DEPRECATED — fuzzy company-name matching is unreliable (partial names silently return 0). Resolve via instantSearch and filter by `company` (exact company NMLS id) instead. Still functional for now."}]},"companyType":{"$ref":"#/components/schemas/BranchCompanyTypeFilterValue"},"county":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Branch address COUNTY: a name (`Travis`, with `state` when ambiguous), a 5-digit FIPS (`48453`) or a dictionary county id; an array matches any. Matches when the branch's geocoded address lies inside the county boundary (no geocode = no match). Unknown county = 400."}]},"difficultDevelopmentAreaCount":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Number of the entity's loans in HUD-designated difficult development areas. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"difficultDevelopmentAreaPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Share of the entity's tract-resolved loans in HUD-designated difficult development areas, 0-100 (`{gte:25}` = 93,397 originators). Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"distressedTractCount":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Number of the entity's loans in distressed-or-underserved tracts. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"distressedTractPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Share of the entity's tract-resolved loans in distressed-or-underserved nonmetropolitan middle-income tracts, 0-100 (`{gte:25}` = 11,773 originators). Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"floodHazardTractCount":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Number of the entity's loans in a FEMA special flood hazard area. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"floodHazardTractPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Share of the entity's tract-resolved loans in a FEMA special flood hazard area, 0-100 (`{gte:25}` = 5,212 originators). `predominantFloodZone` gives the specific zone code. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"geoPoint":{"$ref":"#/components/schemas/GeoFilterValue"},"isAuthorized":{"$ref":"#/components/schemas/TextFilterValue"},"licensedState":{"$ref":"#/components/schemas/TextFilterValue"},"loCount":{"$ref":"#/components/schemas/NumericFilterValue"},"loanType":{"$ref":"#/components/schemas/OriginatorLoanTypeFilterValue"},"loansWithCommunityData":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"How many of the entity's loans in the selected period resolved to a neighborhood — the DENOMINATOR every Community Lending share is taken over. Pair it with a share filter (`{gte:25}`, 60,399 originators) so a 100% share off two loans does not read as a 100% share off two hundred. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"lowModIncomeTractCount":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Number of the entity's loans that landed in a low- or moderate-income tract, as a count rather than a share. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"lowModIncomeTractPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Share of the entity's tract-resolved loans that landed in a low- or moderate-income tract under the Community Reinvestment Act, 0-100. `{gte:50}` = 'at least half their book is LMI' (36,977 originators, 655 companies, 648 branches). Pass whole percents — `{gte:0.5}` means half of one percent and matches nearly everyone. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"majorityMinorityTractCount":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Number of the entity's loans in majority-minority tracts. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"majorityMinorityTractPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Share of the entity's tract-resolved loans in majority-minority tracts, 0-100 (`{gte:50}` = 65,654 originators). Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"mode":{"enum":["and","or"],"type":"string"},"msa":{"$ref":"#/components/schemas/BranchMsaFilterValue"},"name":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"deprecated":true,"description":"DEPRECATED — matches the branch's FULL name exactly (e.g. `Movement Mortgage, LLC, Providence, RI Branch`); a partial name will not match. Use `namePrefix` for partial names, or `nmlsId` (exact branch NMLS id)."}]},"namePrefix":{"description":"Prefix name search: every word must start a word of the name (\"movement prov\" → Movement Mortgage, LLC, Providence, RI Branch; digits = branch NMLS id). No fuzzy/nickname matching; relevance-ranked unless `sort` is set. Max 100 chars / 6 words (emails, URLs, phones ignored), else 400.","minLength":1,"type":"string"},"nmlsId":{"$ref":"#/components/schemas/TextFilterValue"},"opportunityZoneCount":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Number of the entity's loans in Opportunity Zone tracts. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"opportunityZonePct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Share of the entity's tract-resolved loans in federally designated Opportunity Zone tracts, 0-100 (`{gte:10}` = 33,520 originators — this is a small-share filter, a 50% floor finds almost nobody). Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"predominantFloodZone":{"$ref":"#/components/schemas/EntityPredominantFloodZoneFilterValue"},"predominantIncomeLevel":{"$ref":"#/components/schemas/EntityPredominantIncomeLevelFilterValue"},"producersOnly":{"$ref":"#/components/schemas/BooleanFilterValue"},"region":{"$ref":"#/components/schemas/BranchRegionFilterValue"},"rosterJoined":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Bound the number of loan officers who joined the branch during the selected period — individuals whose sponsorship with the branch began inside the window. IMPORTANT — this counts LICENSING EVENTS, not confirmed employer moves. A loan officer holds a separate license record for every state they are sponsored in, and this counts each individual whose sponsorship began or ended inside the window, so a single added or lapsed state license registers as an arrival or a departure even when the person's employment did not change. Measured on large lenders: 13-24% of a 12-month `rosterLeft` are still sponsored by the same employer today, and 33-50% of a 12-month `rosterJoined` were already sponsored by it before the window began. Treat both as directional indicators of movement, not as headcounts. `rosterJoined` and `rosterLeft` are measured from the same source on the same window basis, so unlike the retired `loLoss` — which had no arrivals figure computed the same way — the two can legitimately be combined into a churn rate. Both also grow with the window, so a longer period reports more than a shorter one and the periods are comparable in that direction."}]},"rosterLeft":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Bound the number of loan officers who left the branch during the selected period — individuals whose sponsorship with the branch ended inside the window. IMPORTANT — this counts LICENSING EVENTS, not confirmed employer moves. A loan officer holds a separate license record for every state they are sponsored in, and this counts each individual whose sponsorship began or ended inside the window, so a single added or lapsed state license registers as an arrival or a departure even when the person's employment did not change. Measured on large lenders: 13-24% of a 12-month `rosterLeft` are still sponsored by the same employer today, and 33-50% of a 12-month `rosterJoined` were already sponsored by it before the window began. Treat both as directional indicators of movement, not as headcounts. `rosterJoined` and `rosterLeft` are measured from the same source on the same window basis, so unlike the retired `loLoss` — which had no arrivals figure computed the same way — the two can legitimately be combined into a churn rate. Both also grow with the window, so a longer period reports more than a shorter one and the periods are comparable in that direction."}]},"ruralGradient":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean remoteness of the tracts the entity lent in, on an ORDINAL 1-10 scale (1 = metropolitan core, 10 = most remote). This is a code, not a percent — `{gte:7}` selects the deepest-rural books (8,886 originators). Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"ruralTractCount":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Number of the entity's loans in rural tracts. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"ruralTractPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Share of the entity's tract-resolved loans in rural tracts, 0-100 (`{gte:50}` = 24,006 originators). `ruralGradient` is the finer, ordinal form. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"state":{"$ref":"#/components/schemas/TextFilterValue"},"teamSize":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Bound the number of loan officers currently attributed to the branch. IMPORTANT — this is a CURRENT headcount snapshot, not a per-period measure. The same value is copied into effectively every period, so subtracting one period's `teamSize` from another's does not measure growth or attrition: it is zero for all but a handful of branches, and on those few it reflects a data artifact rather than a real change. Filtering and sorting on it likewise ignore the selected period. For headcount movement over a window, use `rosterJoined` / `rosterLeft`, which are genuinely per-period."}]},"transactionType":{"$ref":"#/components/schemas/OriginatorTransactionTypeFilterValue"},"units":{"$ref":"#/components/schemas/NumericFilterValue"},"usdaEligibleTractCount":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Number of the entity's loans in USDA-eligible tracts. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"usdaEligibleTractPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Share of the entity's tract-resolved loans in tracts eligible for USDA rural housing programs, 0-100 (`{gte:50}` = 90,392 originators). Broader than `ruralTractPct` — eligibility reaches well past what is classified rural. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"volume":{"$ref":"#/components/schemas/NumericFilterValue"},"zip":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"ZIP code. Canonical key (matches the `zip` field on the response DTO); `zipCode` is a cross-entity alias kept for parity with loans/sales."}]},"zipCode":{"$ref":"#/components/schemas/TextFilterValue"}},"type":"object"},"BranchLicense":{"properties":{"authorizedSince":{"description":"Start of the license's current authorized period (YYYY-MM-DD). Null when the license is not currently authorized.","nullable":true,"type":"string"},"isAuthorized":{"nullable":true,"type":"boolean"},"issueDate":{"description":"Date the license was originally issued (YYYY-MM-DD).","nullable":true,"type":"string"},"licenseId":{"nullable":true,"type":"string"},"licenseNumber":{"nullable":true,"type":"string"},"licenseType":{"nullable":true,"type":"string"},"regulator":{"description":"Issuing state regulator.","nullable":true,"type":"string"},"status":{"description":"Current license status, e.g. \"Approved\", \"Voluntary Surrender\", \"Expired\".","nullable":true,"type":"string"},"statusDate":{"description":"Date the license entered its current `status` (YYYY-MM-DD).","nullable":true,"type":"string"}},"required":["licenseId","regulator","licenseNumber","licenseType","issueDate","status","statusDate","isAuthorized","authorizedSince"],"type":"object"},"BranchListRequest":{"additionalProperties":false,"properties":{"advancedFilters":{"$ref":"#/components/schemas/FilterNode"},"crmList":{"$ref":"#/components/schemas/BranchCrmListFilter"},"filters":{"$ref":"#/components/schemas/FilterNode"},"flatFilters":{"$ref":"#/components/schemas/BranchFlatFilters"},"lenderFilters":{"items":{"$ref":"#/components/schemas/LenderFilterEntry"},"type":"array"},"lenderMatchMode":{"$ref":"#/components/schemas/LenderMatchMode"},"licensedSince":{"description":"Bound the date the branch was FIRST licensed — the earliest `issueDate` across its `licenses[]` (YYYY-MM-DD, inclusive). `{gte: \"2026-07-01\"}` = branches whose every license was issued on or after July 1, 2026, i.e. new branches; an established branch that added a state recently does NOT match. Branches with no license dates on file never match. Always ANDed with the other filters. A range matching more than 5,000 branches is rejected with a 400.","properties":{"gte":{"format":"date","type":"string"},"lte":{"format":"date","type":"string"}},"type":"object"},"managerName":{"description":"Branch manager name. Matches ALL the words supplied, fuzzily, against the names of the branch's licensed managers. Always ANDed with the other filters. A name matching more than 5,000 branches is rejected with a 400.","minLength":1,"type":"string"},"pagination":{"$ref":"#/components/schemas/Pagination"},"period":{"allOf":[{"$ref":"#/components/schemas/Period"},{"description":"Period for branch production metrics (default: last12Months). Applies to `volume`, `units`, `avgLoanAmount`, `rosterJoined`, `rosterLeft` and the loan/transaction-type mix. It does NOT apply to `teamSize`, which is a current snapshot and reads the same on every period."}]},"productMix":{"$ref":"#/components/schemas/BranchProductMixFilter"},"sort":{"items":{"properties":{"field":{"$ref":"#/components/schemas/BranchField"},"order":{"$ref":"#/components/schemas/SortOrder"}},"required":["field"],"type":"object"},"type":"array"},"transactionMix":{"$ref":"#/components/schemas/BranchTransactionMixFilter"}},"type":"object"},"BranchListResponse":{"properties":{"cursor":{"type":"string"},"data":{"items":{"$ref":"#/components/schemas/BranchSummary"},"type":"array"},"locationNormalizations":{"description":"How each location filter value resolved. Present when a `city`/`county`/`state`/`zip` filter was supplied.","items":{"$ref":"#/components/schemas/LocationNormalization"},"type":"array"},"total":{"type":"number"}},"required":["data","total"],"type":"object"},"BranchManager":{"properties":{"name":{"nullable":true,"type":"string"},"nmlsId":{"nullable":true,"type":"string"}},"type":"object"},"BranchMsaFilterValue":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"maxItems":50,"minItems":1,"type":"array"},{"nullable":true}],"description":"Branch address METRO (MSA / CBSA): 5-digit CBSA code (`12420`) or metro name (`Austin Metro`); an array matches any. The address point inside any member county. Unknown/ambiguous = 400 naming candidates."},"BranchProductMixFilter":{"description":"Loan-product share / volume bands for the selected period, ANDed: `[{product:\"fha\", minShare:30}]` = FHA is at least 30% of the branch's period volume; `[{product:\"va\", volume:{gte:5000000}}]` = at least $5M of VA. `products` lets ANY of several types satisfy one entry. Whole-book figures across all markets.","items":{"additionalProperties":false,"properties":{"basis":{"description":"`volume` (default) or `units` (loan count).","enum":["volume","units"],"type":"string"},"maxShare":{"description":"Upper bound, 0–100 percent. No bucket = 0% (passes).","maximum":100,"minimum":0,"type":"number"},"minShare":{"description":"Lower bound, 0–100 percent of the period book.","maximum":100,"minimum":0,"type":"number"},"product":{"description":"The loan product. Send this OR `products`, not both.","enum":["conventional","fha","va","he","heloc","building","commercial","stand_alone_refi","closed_end","reverse","usda","stand_alone_second","aggregate","seller_take_back","sba_participation_trust_deed","balloon","opened_end","assumption","negative_amortization","land_contract","trade","modification","unknown"],"type":"string"},"products":{"description":"Several products, ANY of which may satisfy the bounds on its own (each type's share is read separately, never summed): `{products:[\"fha\",\"va\",\"usda\"], minShare:30}` = FHA, VA or USDA is on its own at least 30% of the book. Send this OR `product`.","items":{"enum":["conventional","fha","va","he","heloc","building","commercial","stand_alone_refi","closed_end","reverse","usda","stand_alone_second","aggregate","seller_take_back","sba_participation_trust_deed","balloon","opened_end","assumption","negative_amortization","land_contract","trade","modification","unknown"],"type":"string"},"maxItems":10,"minItems":1,"type":"array"},"volume":{"additionalProperties":false,"description":"Dollar volume of THIS type in the period, `{gte, lte}` — e.g. `{gte: 5000000}` = at least $5M of FHA. Evaluated inside the same type bucket as the share bounds; a branch with no loans of the type does not match.","properties":{"gte":{"minimum":0,"type":"number"},"lte":{"minimum":0,"type":"number"}},"type":"object"}},"type":"object"},"maxItems":10,"minItems":1,"type":"array"},"BranchRegionFilterValue":{"anyOf":[{"enum":["northeast","northeast-division-1","northeast-division-2","midwest","midwest-division-3","midwest-division-4","south","south-division-5","south-division-6","south-division-7","west","west-division-8","west-division-9"],"type":"string"},{"items":{"enum":["northeast","northeast-division-1","northeast-division-2","midwest","midwest-division-3","midwest-division-4","south","south-division-5","south-division-6","south-division-7","west","west-division-8","west-division-9"],"type":"string"},"maxItems":50,"minItems":1,"type":"array"},{"nullable":true}],"description":"Branch address CENSUS REGION / DIVISION (`<region>-division-<n>`, 1–9) — branches in ANY state of it. An array matches any."},"BranchRosterContact":{"nullable":true,"properties":{"cellPhone":{"nullable":true,"type":"string"},"employerAddress":{"nullable":true,"type":"string"},"employerCity":{"nullable":true,"type":"string"},"employerCompany":{"nullable":true,"type":"string"},"employerCompanyId":{"nullable":true,"type":"string"},"employerState":{"nullable":true,"type":"string"},"employerType":{"nullable":true,"type":"string"},"employerWebsite":{"nullable":true,"type":"string"},"employerZip":{"nullable":true,"type":"string"},"facebook":{"nullable":true,"type":"string"},"linkedin":{"nullable":true,"type":"string"},"officePhone":{"nullable":true,"type":"string"},"officePhoneExt":{"nullable":true,"type":"string"},"personalEmail":{"nullable":true,"type":"string"},"twitter":{"nullable":true,"type":"string"},"website":{"nullable":true,"type":"string"},"workEmail":{"nullable":true,"type":"string"}},"type":"object"},"BranchRosterMember":{"properties":{"city":{"nullable":true,"type":"string"},"companyName":{"nullable":true,"type":"string"},"companyNmlsId":{"description":"Current employer (active sponsorship first, then active registration).","nullable":true,"type":"string"},"companyStartDate":{"nullable":true,"type":"string"},"contact":{"$ref":"#/components/schemas/BranchRosterContact"},"firstName":{"nullable":true,"type":"string"},"id":{"type":"string"},"isBranchManager":{"description":"Manages ANY branch.","nullable":true,"type":"boolean"},"isWorking":{"nullable":true,"type":"boolean"},"lastName":{"nullable":true,"type":"string"},"managesThisBranch":{"description":"Listed as a manager of THIS branch.","type":"boolean"},"name":{"nullable":true,"type":"string"},"nmlsId":{"nullable":true,"type":"string"},"state":{"nullable":true,"type":"string"},"tenureMonths":{"description":"Whole months at the current company, as of the weekly refresh.","nullable":true,"type":"number"},"yearsInIndustry":{"nullable":true,"type":"number"}},"required":["id","managesThisBranch"],"type":"object"},"BranchRosterRequest":{"additionalProperties":false,"properties":{"flatFilters":{"additionalProperties":false,"properties":{"isBranchManager":{"$ref":"#/components/schemas/BooleanFilterValue"},"name":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Loan officer name. Matches ALL the words supplied, fuzzily. Scoped to this branch's roster."}]},"tenureMonths":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Whole months at the loan officer's current company."}]},"yearsInIndustry":{"$ref":"#/components/schemas/NumericFilterValue"}},"type":"object"},"pagination":{"$ref":"#/components/schemas/Pagination"},"sort":{"items":{"properties":{"field":{"$ref":"#/components/schemas/BranchRosterSortField"},"order":{"$ref":"#/components/schemas/SortOrder"}},"required":["field"],"type":"object"},"type":"array"}},"type":"object"},"BranchRosterResponse":{"properties":{"cursor":{"type":"string"},"data":{"items":{"$ref":"#/components/schemas/BranchRosterMember"},"type":"array"},"total":{"type":"number"}},"required":["data","total"],"type":"object"},"BranchRosterSortField":{"enum":["name","tenureMonths","yearsInIndustry","state","city"],"type":"string"},"BranchSegment":{"description":"Dimension to group by. Most are the loan's own field (`loanType`, `transactionType`, `state`, …). `lender` groups on the normalized lender (label = display name, `id` = filter key). `propertyType` is the recorder's land-use code of the collateral (`SFR` single-family, `PUD` planned unit development, `CND` condo, `RES` residential-other, `MFD` multi-family dwelling, `2ND` second home, `MFG` manufactured, `TWN` townhouse, `LAN` land, `COM` commercial, …); loans with no code are not grouped (≈20% of recent loans). `conforming` splits on the conforming-loan-limit flag: `conforming` vs `nonConforming` (above the county conforming limit — i.e. jumbo, not Non-QM), raw `true`/`false` on `id`. Time-series only: `titleCompany` groups on the title company named on the deed, with spellings of one company merged per bucket (`label` = most-used spelling across the response, `id` = normalized name — match on `id`) and \"none available\"-style placeholders excluded.","enum":["transactionType","loanType","city","county","state","zip","lender","propertyType","conforming","titleCompany"],"type":"string"},"BranchSlice":{"description":"Dimension to group by. Most are the loan's own field (`loanType`, `transactionType`, `state`, …). `lender` groups on the normalized lender (label = display name, `id` = filter key). `propertyType` is the recorder's land-use code of the collateral (`SFR` single-family, `PUD` planned unit development, `CND` condo, `RES` residential-other, `MFD` multi-family dwelling, `2ND` second home, `MFG` manufactured, `TWN` townhouse, `LAN` land, `COM` commercial, …); loans with no code are not grouped (≈20% of recent loans). `conforming` splits on the conforming-loan-limit flag: `conforming` vs `nonConforming` (above the county conforming limit — i.e. jumbo, not Non-QM), raw `true`/`false` on `id`.","enum":["transactionType","loanType","city","county","state","zip","lender","propertyType","conforming"],"type":"string"},"BranchStatsResponse":{"properties":{"data":{"properties":{"avgLoCount":{"description":"Mean current roster size (`loCount`) across matching branches; `null` when none carry one. A snapshot — does not vary by period.","nullable":true,"type":"number"},"branches":{"description":"Branches matching the request — equals `countBranches.total`.","type":"integer"},"producingBranches":{"description":"Matching branches with at least one loan (units > 0) in the period.","type":"integer"},"topUnits":{"description":"Units of the 3 highest-unit matching branches, descending. Divide their sum by `totalUnits` for top-3 concentration.","items":{"type":"number"},"type":"array"},"totalUnits":{"description":"Sum of the period's branch-level units.","type":"number"}},"required":["branches","producingBranches","avgLoCount","totalUnits","topUnits"],"type":"object"}},"required":["data"],"type":"object"},"BranchSummary":{"properties":{"avgLoanAmount":{"nullable":true,"type":"number"},"city":{"nullable":true,"type":"string"},"communityLending":{"$ref":"#/components/schemas/EntityCommunityLending"},"companyName":{"nullable":true,"type":"string"},"companyNmlsId":{"nullable":true,"type":"string"},"companyType":{"nullable":true,"type":"string"},"coordinates":{"nullable":true,"properties":{"lat":{"type":"number"},"lon":{"type":"number"}},"required":["lat","lon"],"type":"object"},"id":{"type":"string"},"isAuthorized":{"nullable":true,"type":"boolean"},"licensedStates":{"description":"Licensed states (populated on the detail route only)","items":{"type":"string"},"nullable":true,"type":"array"},"licenses":{"description":"Every NMLS license / registration on file for the branch, authorized or not. A current snapshot (refreshed weekly), not period-scoped. Null when the branch's licenses are not on file.","items":{"$ref":"#/components/schemas/BranchLicense"},"nullable":true,"type":"array"},"loCount":{"nullable":true,"type":"number"},"managerCount":{"nullable":true,"type":"number"},"managers":{"description":"Branch managers. List rows carry NMLS ids only; the detail route adds manager names.","items":{"$ref":"#/components/schemas/BranchManager"},"nullable":true,"type":"array"},"name":{"nullable":true,"type":"string"},"nmlsId":{"nullable":true,"type":"string"},"purchasePct":{"nullable":true,"type":"number"},"purchaseShare":{"description":"Purchase share (0–100) of the period's loan COUNT — what `sort: purchaseShare` orders by. `null` = none (sorts as 0).","nullable":true,"type":"number"},"refinancePct":{"nullable":true,"type":"number"},"refinanceShare":{"description":"Refinance share (0–100) of the period's loan COUNT — what `sort: refinanceShare` orders by. `null` = none (sorts as 0).","nullable":true,"type":"number"},"rosterCount":{"description":"Loan officers on this branch's CURRENT licensing roster: registered to this branch location AND holding an active sponsorship or registration. A current snapshot (refreshed weekly), not period-scoped. Null when the roster is not on file. List rows also carry manager NAMES from the same lookup. See POST /v1/branches/{nmlsId}/roster for the people.","nullable":true,"type":"number"},"rosterJoined":{"description":"Loan officers who joined the branch during the selected period — individuals whose sponsorship with the branch began inside the window. IMPORTANT — this counts LICENSING EVENTS, not confirmed employer moves. A loan officer holds a separate license record for every state they are sponsored in, and this counts each individual whose sponsorship began or ended inside the window, so a single added or lapsed state license registers as an arrival or a departure even when the person's employment did not change. Measured on large lenders: 13-24% of a 12-month `rosterLeft` are still sponsored by the same employer today, and 33-50% of a 12-month `rosterJoined` were already sponsored by it before the window began. Treat both as directional indicators of movement, not as headcounts. `rosterJoined` and `rosterLeft` are measured from the same source on the same window basis, so unlike the retired `loLoss` — which had no arrivals figure computed the same way — the two can legitimately be combined into a churn rate. Both also grow with the window, so a longer period reports more than a shorter one and the periods are comparable in that direction.","nullable":true,"type":"number"},"rosterLeft":{"description":"Loan officers who left the branch during the selected period — individuals whose sponsorship with the branch ended inside the window. IMPORTANT — this counts LICENSING EVENTS, not confirmed employer moves. A loan officer holds a separate license record for every state they are sponsored in, and this counts each individual whose sponsorship began or ended inside the window, so a single added or lapsed state license registers as an arrival or a departure even when the person's employment did not change. Measured on large lenders: 13-24% of a 12-month `rosterLeft` are still sponsored by the same employer today, and 33-50% of a 12-month `rosterJoined` were already sponsored by it before the window began. Treat both as directional indicators of movement, not as headcounts. `rosterJoined` and `rosterLeft` are measured from the same source on the same window basis, so unlike the retired `loLoss` — which had no arrivals figure computed the same way — the two can legitimately be combined into a churn rate. Both also grow with the window, so a longer period reports more than a shorter one and the periods are comparable in that direction.","nullable":true,"type":"number"},"state":{"nullable":true,"type":"string"},"street":{"nullable":true,"type":"string"},"teamSize":{"description":"Loan officers currently attributed to this branch. IMPORTANT — this is a CURRENT headcount snapshot, not a per-period measure. The same value is copied into effectively every period, so subtracting one period's `teamSize` from another's does not measure growth or attrition: it is zero for all but a handful of branches, and on those few it reflects a data artifact rather than a real change. Filtering and sorting on it likewise ignore the selected period. For headcount movement over a window, use `rosterJoined` / `rosterLeft`, which are genuinely per-period.","nullable":true,"type":"number"},"tradenames":{"items":{"type":"string"},"nullable":true,"type":"array"},"units":{"description":"Branch-level loan units for the selected period","nullable":true,"type":"number"},"volume":{"description":"Branch-level loan volume for the selected period","nullable":true,"type":"number"},"zip":{"nullable":true,"type":"string"}},"required":["id"],"type":"object"},"BranchSummaryRequest":{"additionalProperties":false,"properties":{"advancedFilters":{"$ref":"#/components/schemas/FilterNode"},"filters":{"$ref":"#/components/schemas/FilterNode"},"flatFilters":{"additionalProperties":false,"properties":{"borrowerStatus":{"$ref":"#/components/schemas/LoanBorrowerStatusFilterValue"},"broker":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Broker shop NMLS id (digits only). A broker is a company — resolve a broker name to its NMLS id via instantSearch (or listCompanies)."}]},"buyerEntityType":{"$ref":"#/components/schemas/BooleanFilterValue"},"city":{"$ref":"#/components/schemas/TextFilterValue"},"conforming":{"$ref":"#/components/schemas/BooleanFilterValue"},"county":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"County name (e.g. \"Broward\") or 5-digit FIPS code. Names resolve to FIPS server-side; include a `state` filter to disambiguate."}]},"currentBalance":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Estimated remaining principal balance (~19% populated). Approximate current equity as `homeValue` (AVM) minus this."}]},"employer":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Employer/company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"equity":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Point-in-time equity recorded on the loan (sparse, ~10%). NOT a live current-equity figure. For HELOC/cash-out targeting on up-to-date equity, use properties search (listProperties) instead — its equity is far better populated and current."}]},"excludeBroker":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans brokered by this broker-shop NMLS id (digits only) — the inverse of `broker`."}]},"excludeCity":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this city — the inverse of `city`."}]},"excludeLender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans from this lender ID (\"everyone but X\") — the inverse of `lender`, same id contract (resolve via instantSearch/listLenders). Loans with no lender stay in the results."}]},"excludeLoanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans funded by this company NMLS id (digits only) — the inverse of `loanCompany`."}]},"excludeLoanType":{"$ref":"#/components/schemas/LoanTypeExcludeFilterValue"},"excludeOriginator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans with this originator NMLS id (digits only) — the inverse of `originator`. Common for 'everyone but my own shop' lists."}]},"excludeState":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this state (2-letter code, e.g. \"CA\") — the inverse of `state`. For \"everywhere but this state\" lists."}]},"excludeTransactionType":{"$ref":"#/components/schemas/LoanTransactionTypeExcludeFilterValue"},"excludeZipCode":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this ZIP code — the inverse of `zipCode`."}]},"fips":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exact 5-digit county FIPS code (no name resolution) — the code-only escape hatch alongside `county`."}]},"geoPoint":{"$ref":"#/components/schemas/GeoFilterValue"},"homeValue":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"AVM (automated valuation) at the linked property (~26%, MLS-linked). Pair with `currentBalance` to approximate current equity."}]},"includeUnknownOriginator":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Include loans that have no originator NMLS id. Omitted/false (default): such loans are excluded — the vast majority are pre-2016 public records with no linkable originator. true: include them. Note that the default scopes results to loans with a known originator (~2016+ recordings)."}]},"interestRate":{"$ref":"#/components/schemas/NumericFilterValue"},"lender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender ID — the normalized lender-dictionary key, NOT a fuzzy name match. Resolve a lender via instantSearch (or listLenders) and pass the `id` it returns (e.g. \"mortgage_rocket\" or \"mortgage rocket\"). Underscores and letter case are normalized, so either id surface works. A stored normalized lender name (what the `slice: \"lender\"` chart buckets emit) is also accepted, so a chart bucket key filters directly. A value that is neither returns 400 rather than silently matching nothing — to search by lender NAME, use `lenderName`."}]},"lenderName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender name as recorded on the loan document — fuzzy, all-terms match (e.g. \"Fifth Third\"). The name counterpart to the exact-id `lender` filter; use `lender` when you have a resolved id, and this when you only have a name."}]},"loanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Funding/loan company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"loanType":{"$ref":"#/components/schemas/LoanTypeFilterValue"},"ltvAtOrigination":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Loan-to-value at ORIGINATION (sparse), as a PERCENT on a 0-100 scale (`80` = 80% LTV; values above 100 are real underwater loans). This is not a current LTV — there is no stored current-LTV field on loans."}]},"mode":{"enum":["and","or"],"type":"string"},"mortgageAmount":{"$ref":"#/components/schemas/NumericFilterValue"},"mortgageDate":{"$ref":"#/components/schemas/DateFilterValue"},"originator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Loan originator NMLS id (digits only). To search by name use `originatorName`, or resolve a name to its id via instantSearch."}]},"originatorName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"deprecated":true,"description":"DEPRECATED — fuzzy name matching is unreliable (same originator can return wildly different counts by name string). Resolve the loan officer via instantSearch and filter by `originator` (exact NMLS id) instead. Still functional for now."}]},"propertyId":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Parcel id — returns every loan recorded against one property. Pass the same string this endpoint returns as `mmPropertyId` on a loan row, or the `mmPropertyId` of a property record.\n\nThis is the parcel's FULL recorded loan history, which is deliberately wider than the loans embedded on a property record: that embed is a snapshot of what is still owed (up to five currently-active loans), so paid-off mortgages are absent from it and present here.\n\nMulti-unit caveat: loans carry a unit-blind parcel id, so for one unit of a multi-unit building this selects every unit in the building, not that unit alone."}]},"saleDate":{"$ref":"#/components/schemas/DateFilterValue"},"salePrice":{"$ref":"#/components/schemas/NumericFilterValue"},"state":{"$ref":"#/components/schemas/TextFilterValue"},"transactionType":{"$ref":"#/components/schemas/LoanTransactionTypeFilterValue"},"zip":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Alias of `zipCode` — same ZIP filter, accepted for cross-entity key parity."}]},"zipCode":{"$ref":"#/components/schemas/TextFilterValue"}},"type":"object"},"nmlsId":{"description":"Branch NMLS ID","minLength":1,"type":"string"},"period":{"$ref":"#/components/schemas/Period"}},"required":["nmlsId"],"type":"object"},"BranchTimeSeriesRequest":{"additionalProperties":false,"properties":{"advancedFilters":{"$ref":"#/components/schemas/FilterNode"},"filters":{"$ref":"#/components/schemas/FilterNode"},"flatFilters":{"additionalProperties":false,"properties":{"borrowerStatus":{"$ref":"#/components/schemas/LoanBorrowerStatusFilterValue"},"broker":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Broker shop NMLS id (digits only). A broker is a company — resolve a broker name to its NMLS id via instantSearch (or listCompanies)."}]},"buyerEntityType":{"$ref":"#/components/schemas/BooleanFilterValue"},"city":{"$ref":"#/components/schemas/TextFilterValue"},"conforming":{"$ref":"#/components/schemas/BooleanFilterValue"},"county":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"County name (e.g. \"Broward\") or 5-digit FIPS code. Names resolve to FIPS server-side; include a `state` filter to disambiguate."}]},"currentBalance":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Estimated remaining principal balance (~19% populated). Approximate current equity as `homeValue` (AVM) minus this."}]},"employer":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Employer/company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"equity":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Point-in-time equity recorded on the loan (sparse, ~10%). NOT a live current-equity figure. For HELOC/cash-out targeting on up-to-date equity, use properties search (listProperties) instead — its equity is far better populated and current."}]},"excludeBroker":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans brokered by this broker-shop NMLS id (digits only) — the inverse of `broker`."}]},"excludeCity":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this city — the inverse of `city`."}]},"excludeLender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans from this lender ID (\"everyone but X\") — the inverse of `lender`, same id contract (resolve via instantSearch/listLenders). Loans with no lender stay in the results."}]},"excludeLoanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans funded by this company NMLS id (digits only) — the inverse of `loanCompany`."}]},"excludeLoanType":{"$ref":"#/components/schemas/LoanTypeExcludeFilterValue"},"excludeOriginator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans with this originator NMLS id (digits only) — the inverse of `originator`. Common for 'everyone but my own shop' lists."}]},"excludeState":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this state (2-letter code, e.g. \"CA\") — the inverse of `state`. For \"everywhere but this state\" lists."}]},"excludeTransactionType":{"$ref":"#/components/schemas/LoanTransactionTypeExcludeFilterValue"},"excludeZipCode":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this ZIP code — the inverse of `zipCode`."}]},"fips":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exact 5-digit county FIPS code (no name resolution) — the code-only escape hatch alongside `county`."}]},"geoPoint":{"$ref":"#/components/schemas/GeoFilterValue"},"homeValue":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"AVM (automated valuation) at the linked property (~26%, MLS-linked). Pair with `currentBalance` to approximate current equity."}]},"includeUnknownOriginator":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Include loans that have no originator NMLS id. Omitted/false (default): such loans are excluded — the vast majority are pre-2016 public records with no linkable originator. true: include them. Note that the default scopes results to loans with a known originator (~2016+ recordings)."}]},"interestRate":{"$ref":"#/components/schemas/NumericFilterValue"},"lender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender ID — the normalized lender-dictionary key, NOT a fuzzy name match. Resolve a lender via instantSearch (or listLenders) and pass the `id` it returns (e.g. \"mortgage_rocket\" or \"mortgage rocket\"). Underscores and letter case are normalized, so either id surface works. A stored normalized lender name (what the `slice: \"lender\"` chart buckets emit) is also accepted, so a chart bucket key filters directly. A value that is neither returns 400 rather than silently matching nothing — to search by lender NAME, use `lenderName`."}]},"lenderName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender name as recorded on the loan document — fuzzy, all-terms match (e.g. \"Fifth Third\"). The name counterpart to the exact-id `lender` filter; use `lender` when you have a resolved id, and this when you only have a name."}]},"loanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Funding/loan company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"loanType":{"$ref":"#/components/schemas/LoanTypeFilterValue"},"ltvAtOrigination":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Loan-to-value at ORIGINATION (sparse), as a PERCENT on a 0-100 scale (`80` = 80% LTV; values above 100 are real underwater loans). This is not a current LTV — there is no stored current-LTV field on loans."}]},"mode":{"enum":["and","or"],"type":"string"},"mortgageAmount":{"$ref":"#/components/schemas/NumericFilterValue"},"mortgageDate":{"$ref":"#/components/schemas/DateFilterValue"},"originator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Loan originator NMLS id (digits only). To search by name use `originatorName`, or resolve a name to its id via instantSearch."}]},"originatorName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"deprecated":true,"description":"DEPRECATED — fuzzy name matching is unreliable (same originator can return wildly different counts by name string). Resolve the loan officer via instantSearch and filter by `originator` (exact NMLS id) instead. Still functional for now."}]},"propertyId":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Parcel id — returns every loan recorded against one property. Pass the same string this endpoint returns as `mmPropertyId` on a loan row, or the `mmPropertyId` of a property record.\n\nThis is the parcel's FULL recorded loan history, which is deliberately wider than the loans embedded on a property record: that embed is a snapshot of what is still owed (up to five currently-active loans), so paid-off mortgages are absent from it and present here.\n\nMulti-unit caveat: loans carry a unit-blind parcel id, so for one unit of a multi-unit building this selects every unit in the building, not that unit alone."}]},"saleDate":{"$ref":"#/components/schemas/DateFilterValue"},"salePrice":{"$ref":"#/components/schemas/NumericFilterValue"},"state":{"$ref":"#/components/schemas/TextFilterValue"},"transactionType":{"$ref":"#/components/schemas/LoanTransactionTypeFilterValue"},"zip":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Alias of `zipCode` — same ZIP filter, accepted for cross-entity key parity."}]},"zipCode":{"$ref":"#/components/schemas/TextFilterValue"}},"type":"object"},"interval":{"$ref":"#/components/schemas/Interval"},"measure":{"$ref":"#/components/schemas/Measure"},"nmlsId":{"description":"Branch NMLS ID","minLength":1,"type":"string"},"period":{"$ref":"#/components/schemas/Period"},"segment":{"$ref":"#/components/schemas/BranchSegment"}},"required":["nmlsId"],"type":"object"},"BranchTransactionMixFilter":{"description":"Transaction-type share bands for the selected period, ANDed: `[{transactionType:\"purchase\", minShare:60}]` = purchases are at least 60% of the branch's period volume.","items":{"additionalProperties":false,"properties":{"basis":{"description":"`volume` (default) or `units` (loan count).","enum":["volume","units"],"type":"string"},"maxShare":{"description":"Upper bound, 0–100 percent. No bucket = 0% (passes).","maximum":100,"minimum":0,"type":"number"},"minShare":{"description":"Lower bound, 0–100 percent of the period book.","maximum":100,"minimum":0,"type":"number"},"transactionType":{"enum":["purchase","refinance","construction","equity","UNKNOWN"],"type":"string"},"volume":{"additionalProperties":false,"description":"Dollar volume of THIS type in the period, `{gte, lte}` — e.g. `{gte: 5000000}` = at least $5M of FHA. Evaluated inside the same type bucket as the share bounds; a branch with no loans of the type does not match.","properties":{"gte":{"minimum":0,"type":"number"},"lte":{"minimum":0,"type":"number"}},"type":"object"}},"required":["transactionType"],"type":"object"},"maxItems":10,"minItems":1,"type":"array"},"BreakdownItem":{"properties":{"company":{"description":"Agent and company `originators` only: the LO's employer per NMLS licensing (on agents, as of the agent profile's last refresh) — not necessarily the company on the loans, and it can trail a very recent move (`GET /v1/originators/{nmlsId}` is always current). Absent on every other breakdown; `null` leaves when no sponsorship was on file.","properties":{"name":{"nullable":true,"type":"string"},"nmlsId":{"nullable":true,"type":"string"}},"required":["name","nmlsId"],"type":"object"},"contact":{"description":"`originatorAgents` only: the agent's email and direct phone — the same `email` / `phone` `GET /v1/agents/{id}` and the agents list report. Each leaf is `null` when the agent's record has none; `null` when the agent `id` matches no record. Absent on rows without an agent `id` and on every other breakdown.","nullable":true,"properties":{"email":{"nullable":true,"type":"string"},"phone":{"nullable":true,"type":"string"}},"required":["email","phone"],"type":"object"},"excluded":{"description":"How many of this bucket's documents the volume guard excluded — documents that carry the money field but whose value is an out-of-range fill. Compare against `units` to see what share of the bucket `volume` was actually computed over: a bucket can show many units and still sum a small fraction of them. Absent when the entity's money column is unguarded (the sales-backed agent breakdowns), where nothing can be excluded.","type":"number"},"id":{"description":"Machine value behind `label` for breakdowns whose bucket key is an id rather than a name (`lenders`, where `label` is the dictionary display name and `id` is the normalized lender key — pass `id`, not `label`, back as a `lender` filter value; agent `originators`, where `id` is the LO's NMLS id; `originatorAgents`, where `id` is the agent id most often recorded under that name; `titleCompanies`, where `id` is the normalized name the spellings were merged under). Absent on name-keyed breakdowns, where `label` is already the machine value.","type":"string"},"label":{"description":"Bucket label/key","type":"string"},"name":{"description":"Human-readable name for the bucket when `label` is an entity id (e.g. a broker NMLS id resolved to its company name). Absent when unresolved or not an id-keyed breakdown.","type":"string"},"office":{"description":"`originatorAgents` only: the agent's brokerage office — the same office `GET /v1/agents/{id}` and the agents list report as `office`, picked from the offices on the agent's profile by recency and frequency, so it can trail a very recent move and is not necessarily the office on these loans. `id` is the office id (pass it to `GET /v1/offices/{id}`); `null` when the office has none. `null` when the agent has no named office on file; absent on rows without an agent `id` and on every other breakdown.","nullable":true,"properties":{"id":{"nullable":true,"type":"string"},"name":{"type":"string"}},"required":["name","id"],"type":"object"},"pctUnits":{"description":"Percentage of total units","type":"number"},"pctVolume":{"description":"Percentage of total volume","type":"number"},"units":{"description":"Number of transactions","type":"number"},"volume":{"description":"Total dollar volume","type":"number"}},"required":["label","units","volume","pctUnits","pctVolume"],"type":"object"},"BreakdownRequest":{"additionalProperties":false,"properties":{"advancedFilters":{"$ref":"#/components/schemas/FilterNode"},"filters":{"$ref":"#/components/schemas/FilterNode"},"flatFilters":{"additionalProperties":false,"properties":{"borrowerStatus":{"$ref":"#/components/schemas/LoanBorrowerStatusFilterValue"},"broker":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Broker shop NMLS id (digits only). A broker is a company — resolve a broker name to its NMLS id via instantSearch (or listCompanies)."}]},"buyerEntityType":{"$ref":"#/components/schemas/BooleanFilterValue"},"city":{"$ref":"#/components/schemas/TextFilterValue"},"conforming":{"$ref":"#/components/schemas/BooleanFilterValue"},"county":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"County name (e.g. \"Broward\") or 5-digit FIPS code. Names resolve to FIPS server-side; include a `state` filter to disambiguate."}]},"currentBalance":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Estimated remaining principal balance (~19% populated). Approximate current equity as `homeValue` (AVM) minus this."}]},"employer":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Employer/company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"equity":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Point-in-time equity recorded on the loan (sparse, ~10%). NOT a live current-equity figure. For HELOC/cash-out targeting on up-to-date equity, use properties search (listProperties) instead — its equity is far better populated and current."}]},"excludeBroker":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans brokered by this broker-shop NMLS id (digits only) — the inverse of `broker`."}]},"excludeCity":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this city — the inverse of `city`."}]},"excludeLender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans from this lender ID (\"everyone but X\") — the inverse of `lender`, same id contract (resolve via instantSearch/listLenders). Loans with no lender stay in the results."}]},"excludeLoanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans funded by this company NMLS id (digits only) — the inverse of `loanCompany`."}]},"excludeLoanType":{"$ref":"#/components/schemas/LoanTypeExcludeFilterValue"},"excludeOriginator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans with this originator NMLS id (digits only) — the inverse of `originator`. Common for 'everyone but my own shop' lists."}]},"excludeState":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this state (2-letter code, e.g. \"CA\") — the inverse of `state`. For \"everywhere but this state\" lists."}]},"excludeTransactionType":{"$ref":"#/components/schemas/LoanTransactionTypeExcludeFilterValue"},"excludeZipCode":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this ZIP code — the inverse of `zipCode`."}]},"fips":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exact 5-digit county FIPS code (no name resolution) — the code-only escape hatch alongside `county`."}]},"geoPoint":{"$ref":"#/components/schemas/GeoFilterValue"},"homeValue":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"AVM (automated valuation) at the linked property (~26%, MLS-linked). Pair with `currentBalance` to approximate current equity."}]},"includeUnknownOriginator":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Include loans that have no originator NMLS id. Omitted/false (default): such loans are excluded — the vast majority are pre-2016 public records with no linkable originator. true: include them. Note that the default scopes results to loans with a known originator (~2016+ recordings)."}]},"interestRate":{"$ref":"#/components/schemas/NumericFilterValue"},"lender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender ID — the normalized lender-dictionary key, NOT a fuzzy name match. Resolve a lender via instantSearch (or listLenders) and pass the `id` it returns (e.g. \"mortgage_rocket\" or \"mortgage rocket\"). Underscores and letter case are normalized, so either id surface works. A stored normalized lender name (what the `slice: \"lender\"` chart buckets emit) is also accepted, so a chart bucket key filters directly. A value that is neither returns 400 rather than silently matching nothing — to search by lender NAME, use `lenderName`."}]},"lenderName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender name as recorded on the loan document — fuzzy, all-terms match (e.g. \"Fifth Third\"). The name counterpart to the exact-id `lender` filter; use `lender` when you have a resolved id, and this when you only have a name."}]},"loanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Funding/loan company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"loanType":{"$ref":"#/components/schemas/LoanTypeFilterValue"},"ltvAtOrigination":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Loan-to-value at ORIGINATION (sparse), as a PERCENT on a 0-100 scale (`80` = 80% LTV; values above 100 are real underwater loans). This is not a current LTV — there is no stored current-LTV field on loans."}]},"mode":{"enum":["and","or"],"type":"string"},"mortgageAmount":{"$ref":"#/components/schemas/NumericFilterValue"},"mortgageDate":{"$ref":"#/components/schemas/DateFilterValue"},"originator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Loan originator NMLS id (digits only). To search by name use `originatorName`, or resolve a name to its id via instantSearch."}]},"originatorName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"deprecated":true,"description":"DEPRECATED — fuzzy name matching is unreliable (same originator can return wildly different counts by name string). Resolve the loan officer via instantSearch and filter by `originator` (exact NMLS id) instead. Still functional for now."}]},"propertyId":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Parcel id — returns every loan recorded against one property. Pass the same string this endpoint returns as `mmPropertyId` on a loan row, or the `mmPropertyId` of a property record.\n\nThis is the parcel's FULL recorded loan history, which is deliberately wider than the loans embedded on a property record: that embed is a snapshot of what is still owed (up to five currently-active loans), so paid-off mortgages are absent from it and present here.\n\nMulti-unit caveat: loans carry a unit-blind parcel id, so for one unit of a multi-unit building this selects every unit in the building, not that unit alone."}]},"saleDate":{"$ref":"#/components/schemas/DateFilterValue"},"salePrice":{"$ref":"#/components/schemas/NumericFilterValue"},"state":{"$ref":"#/components/schemas/TextFilterValue"},"transactionType":{"$ref":"#/components/schemas/LoanTransactionTypeFilterValue"},"zip":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Alias of `zipCode` — same ZIP filter, accepted for cross-entity key parity."}]},"zipCode":{"$ref":"#/components/schemas/TextFilterValue"}},"type":"object"},"pagination":{"$ref":"#/components/schemas/Pagination"},"period":{"$ref":"#/components/schemas/DatedPeriod"},"sort":{"$ref":"#/components/schemas/BreakdownSort"}},"type":"object"},"BreakdownResponse":{"properties":{"cursor":{"description":"Opaque cursor for the next page; absent when this is the last page.","type":"string"},"data":{"items":{"$ref":"#/components/schemas/BreakdownItem"},"type":"array"},"total":{"description":"Number of buckets returned","type":"number"},"totals":{"description":"Grand totals across all data","properties":{"excluded":{"description":"Documents the volume guard excluded across the whole scope — the grand-total counterpart of a bucket's `excluded`, and the same figure `/analytics/summary` reports as `current.excluded.volume` for an equivalent query. Absent when the money column is unguarded.","type":"number"},"units":{"type":"number"},"volume":{"type":"number"},"volumePlausible":{"description":"False when `volume` is a pre-summed figure this API can show is impossible — e.g. an average sale price per unit far outside any real market, or buyer-side and seller-side averages that contradict each other. `pctVolume` on every item is that figure's quotient, so when this is false those percentages are unusable and should not be rendered as shares. A MAGNITUDE check only: true means \"not obviously impossible\", NOT \"verified\". Absent on surfaces that aggregate documents live, where no such figure is read.","type":"boolean"}},"required":["units","volume"],"type":"object"},"truncated":{"description":"True when more buckets exist beyond this page. Page through with `cursor`, or sort by `label` to enumerate the full key space.","type":"boolean"}},"required":["data","total"],"type":"object"},"BreakdownSort":{"items":{"properties":{"field":{"description":"One of (case-insensitive): volume, units, label, pctVolume, pctUnits, name","enum":["volume","units","label","pctVolume","pctUnits","name"],"type":"string"},"order":{"$ref":"#/components/schemas/SortOrder"}},"required":["field"],"type":"object"},"type":"array"},"BulkDeliveryBilling":{"description":"`credits` = billed at 1 credit per delivered row. `none` = not billed (deliveries submitted from the ModelMatch web app).","enum":["credits","none"],"type":"string"},"BulkDeliveryColumn":{"additionalProperties":false,"properties":{"field":{"anyOf":[{"minLength":1,"type":"string"},{"items":{"minLength":1,"type":"string"},"maxItems":10,"minItems":1,"type":"array"}],"description":"The response DTO field this column reads — the same names `fields` takes, dotted into nested objects (`contact.linkedin`) — or a list of them, taking the first non-empty value (`[\"contact.personalEmail\", \"contact.workEmail\", \"email\"]`).","example":"volume"},"format":{"description":"`currency`, `number` and `percentWhole` round the value to a whole number (in both `csv` and `xlsx`) and, in `xlsx`, display it as `$1,234,567`, `1,234` or `62%`. `percentWhole` expects a value that is already 0–100 (it is written as `62` in `csv`; in `xlsx` the cell holds `0.62` under the standard percent format, so it displays `62%` in every spreadsheet app and calculates as a percent). `text` writes an `xlsx` text cell. `titleCase` (`dina verteramo` → `Dina Verteramo`), `lowercase`, and `phone` (US 10-digit numbers as `(469) 907-7475`; anything else as stored) reshape the text and write a text cell. Omit for the value as-is.","enum":["currency","number","percentWhole","text","titleCase","lowercase","phone"],"type":"string"},"label":{"description":"Header for the column.","example":"Total Volume","maxLength":255,"minLength":1,"type":"string"},"valueMap":{"additionalProperties":{"type":"string"},"description":"Display text per value, keyed by the value as a string (`{ \"true\": \"Branch Manager\", \"false\": \"Originator\" }`, `{ \"BANK\": \"Bank\" }`). The key `\"null\"` matches an empty value. Unmatched values are written unchanged.","type":"object"}},"required":["field","label"],"type":"object"},"BulkDeliveryColumnsError":{"description":"The `columns` request was refused: `columns_with_fields`, `columns_with_destination`, `columns_format_unsupported` (needs `csv` or `xlsx`), or `unknown_column_field`.","properties":{"error":{"enum":["columns_with_fields","columns_with_destination","columns_format_unsupported","unknown_column_field"],"type":"string"},"message":{"type":"string"}},"required":["error","message"],"type":"object"},"BulkDeliveryDestination":{"description":"Where the finished delivery goes. Omit for the default — a file you download from the status endpoint. `push-target`: when the job completes, the rows are handed to the named push target, which sends them to its configured HTTPS destination using its own field mapping and signing. The target is checked at submit (it must exist, be enabled, accept this entity, and be usable by you on your plan) — a failed check rejects the submit with the push target's error `code`. `format` is ignored (the handoff is always gzipped NDJSON), and when the target's mapping reads only some fields, only those fields (plus `id`) are delivered. Row limits, entitlements, `limit`, and billing (1 credit / row) are unchanged, except that deliveries submitted from the ModelMatch web app are not billed. Poll the job for `pushBatchId`; a handoff that cannot be completed fails the job with error `push_handoff_failed` and is not billed.","properties":{"targetId":{"description":"Id of a push target configured on the active workspace (or your own member push targets).","minLength":1,"type":"string"},"type":{"enum":["push-target"],"type":"string"}},"required":["type","targetId"],"type":"object"},"BulkDeliveryForbidden":{"properties":{"entitlementKey":{"description":"Entitlement that would lift the cap. Contact support to request a limit increase.","type":"string"},"error":{"enum":["entitlement_missing"],"type":"string"},"estimatedTotal":{"description":"Rows the query matched — what pushed it over `maxRows`.","minimum":0,"type":"integer"},"maxRows":{"description":"Row ceiling that applied to this request, i.e. the deliverable limit without the entitlement.","exclusiveMinimum":true,"minimum":0,"type":"integer"},"message":{"type":"string"}},"required":["error","entitlementKey","estimatedTotal","maxRows","message"],"type":"object"},"BulkDeliveryFormat":{"description":"Output file format for the delivered dataset. Every format contains the same rows — the entity's list/summary DTO (e.g. `LoanSummary`), one record per row. `ndjson`: gzipped newline-delimited JSON (`application/x-ndjson`, `.ndjson.gz`). `json`: a single JSON array (`application/json`, `.json`). `csv`: RFC 4180 (`text/csv`, `.csv`). `parquet`: typed columnar Apache Parquet — scalar fields keep their DTO types, nested fields are JSON-encoded strings (`application/vnd.apache.parquet`, `.parquet`). `xlsx`: a single-sheet Excel workbook with a bold, frozen header row — numbers are numeric cells, everything else (ids, zips, phones) text cells (`.xlsx`). Pair with `columns` for labelled headers and number formats. Required on submit unless `destination` is a push target, which always delivers gzipped NDJSON (a missing `format` on a file delivery is a 400 `format_required`).","enum":["ndjson","json","csv","parquet","xlsx"],"example":"parquet","type":"string"},"BulkDeliveryInsufficientCredits":{"properties":{"balance":{"description":"Remaining credit balance the charge saw.","type":"number"},"cost":{"description":"Credits the request asked for.","type":"number"},"error":{"enum":["payment_required"],"type":"string"},"message":{"description":"Human-readable explanation of the decline.","type":"string"},"reason":{"description":"Why the charge was declined, when known: `out_of_credits` (balance empty) vs. `limit_reached` (a spend cap was hit).","enum":["out_of_credits","limit_reached"],"type":"string"}},"required":["error","balance","cost"],"type":"object"},"BulkDeliveryInsufficientScope":{"properties":{"error":{"enum":["insufficient_scope"],"type":"string"},"message":{"type":"string"},"requiredScope":{"enum":["push-targets:send"],"type":"string"}},"required":["error","requiredScope","message"],"type":"object"},"BulkDeliveryPreflightExceeded":{"properties":{"error":{"enum":["delivery_exceeds_max_rows"],"type":"string"},"estimatedTotal":{"minimum":0,"type":"integer"},"maxRows":{"exclusiveMinimum":true,"minimum":0,"type":"integer"}},"required":["error","estimatedTotal","maxRows"],"type":"object"},"BulkDeliveryPushTargetError":{"description":"The push-target destination was refused: `TARGET_NOT_FOUND` (404), `FORBIDDEN` (403), `PLAN_REQUIRED` (402), `TARGET_DISABLED` (409), `ENTITY_MISMATCH` (400).","properties":{"code":{"enum":["TARGET_NOT_FOUND","FORBIDDEN","PLAN_REQUIRED","TARGET_DISABLED","ENTITY_MISMATCH"],"type":"string"},"error":{"enum":["TARGET_NOT_FOUND","FORBIDDEN","PLAN_REQUIRED","TARGET_DISABLED","ENTITY_MISMATCH"],"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"type":"object"},"BulkDeliveryStatusResponse":{"properties":{"billing":{"$ref":"#/components/schemas/BulkDeliveryBilling"},"billingReason":{"description":"Why `billing` is `none`: `first_party_push_target` = a push-target delivery submitted from the ModelMatch web app; `first_party_download` = a file delivery submitted from the ModelMatch web app.","enum":["first_party_push_target","first_party_download"],"type":"string"},"billingStatus":{"description":"Outcome of the job's single debit, taken before anything is delivered: `charged`, `capped` (balance / spend cap / daily cap declined it — the job fails `insufficient_credits`), `billing_error` (the debit could not be made — the job fails `billing_unavailable`), or `none` (nothing to bill: free delivery or zero rows). Absent until billing has run, and on older jobs.","enum":["charged","capped","billing_error","none"],"type":"string"},"bytes":{"minimum":0,"type":"integer"},"chargedCount":{"description":"Delivered-row count that was billed.","minimum":0,"type":"integer"},"completedAt":{"type":"string"},"creditLedgerId":{"description":"Credit-ledger entry id for this job's debit. Absent if billing didn't land.","type":"string"},"creditsCharged":{"description":"Credits ACTUALLY debited for this job (1 credit / row) — `0` when the debit was declined or failed; read `billingStatus` for why. Absent until billing has run.","minimum":0,"type":"number"},"destination":{"$ref":"#/components/schemas/BulkDeliveryDestination"},"downloadUrl":{"description":"Stable, shareable download link for the completed dataset. Forces a file download (with a friendly filename) and stays valid for 7 days after completion. Present once `status` is `completed`. This is the link to hand to a user or send by email.","type":"string"},"entityType":{"type":"string"},"error":{"description":"Why the job failed. `insufficient_credits` = the charge was declined (balance, spend cap or daily cap), nothing delivered. `billing_unavailable` = the charge could not be made, nothing delivered — retry. `push_handoff_failed` = the rows were exported and charged but could not be handed to the push target (see `billingStatus`).","type":"string"},"estimatedTotal":{"minimum":0,"type":"integer"},"format":{"$ref":"#/components/schemas/BulkDeliveryFormat"},"jobId":{"type":"string"},"processed":{"minimum":0,"type":"integer"},"pushBatchId":{"description":"Push-target deliveries only: the batch the push target is sending, set once the completed file was handed off. Per-record send progress is tracked by the push target, not this job.","type":"string"},"resultsUrl":{"description":"Direct download URL for the completed dataset. Long-lived per request but changes on each poll; prefer `downloadUrl` for a stable link to share.","type":"string"},"startedAt":{"type":"string"},"status":{"enum":["queued","running","completed","failed","cancelled"],"type":"string"}},"required":["jobId","status"],"type":"object"},"BulkDeliverySubmitResponse":{"properties":{"billing":{"$ref":"#/components/schemas/BulkDeliveryBilling"},"destination":{"$ref":"#/components/schemas/BulkDeliveryDestination"},"entityType":{"type":"string"},"estimatedTotal":{"minimum":0,"type":"integer"},"format":{"$ref":"#/components/schemas/BulkDeliveryFormat"},"jobId":{"type":"string"},"maxRows":{"exclusiveMinimum":true,"minimum":0,"type":"integer"},"status":{"enum":["queued"],"type":"string"}},"required":["jobId","status","entityType","format","estimatedTotal","maxRows"],"type":"object"},"CacheScope":{"description":"Which row kind(s) to scan. Default `both`.","enum":["internal","member","both"],"type":"string"},"ChartBucket":{"properties":{"count":{"description":"How many documents this bucket was built from — the denominator behind `value`, published whatever the measure. It is the sample size of an average, the transaction count behind a `volume` sum, and (for `measure: \"units\"`) `value` itself. Present on every bucket. Distinct from `excluded`, which reports how many of these documents a guarded measure's sentinel filter then dropped: a bucket can look well-populated here and still average over far fewer.","type":"number"},"excluded":{"description":"How many of this bucket's documents the measure's sentinel guard excluded — documents that carry the field but whose value is an out-of-range fill. Additive and optional: absent when the measure is unguarded (a document count, or a field with no fill values). Present per BUCKET because exclusion is not uniform — one period or slice can be almost entirely fill values while its neighbors are clean, and a single response-level total would hide exactly that.","type":"number"},"id":{"description":"Machine value behind `label` when the bucket key is not itself the label. `lender`: `label` is the dictionary display name and `id` the normalized lender key — pass `id`, not `label`, back as a `lender` filter value. `conforming`: `label` is `conforming` / `nonConforming` and `id` the raw `true` / `false` flag. `titleCompany` (time-series segment): `label` is the most-used spelling and `id` the normalized name every spelling was merged under — match segments across buckets on `id`. Absent on slices whose `label` is already the machine value.","type":"string"},"label":{"type":"string"},"segments":{"description":"Present only when the request named a `segment`: this bucket broken down by that second dimension, ranked by the same `measure` and capped at 25 per bucket (the rest is counted in `segmentsOmittedCount`). Documents with no value for the segment are not grouped and appear nowhere here, so segment `count`s sum to at most the bucket's `count`.","items":{"$ref":"#/components/schemas/ChartSegment"},"type":"array"},"segmentsOmittedCount":{"description":"Present only with `segments`: documents in this bucket whose segment value fell past the 25-per-bucket cap. A document COUNT, never a dollar figure. `0` means `segments` is the complete breakdown of every document that carries a segment value.","type":"number"},"unattributed":{"description":"Present and `true` on at most one bucket, which is NOT a real category: it collects the documents this breakdown could not attribute to any value of the slice, and its `label` (`\"(unknown)\"`) is prose, not an identifier. Filter on THIS field, never on the label — a consumer plotting a map or joining the label to a real code must drop this row. It is always the LAST element of `data`, appended after ranking rather than placed by value, so it is the one bucket that does not obey the ordering `measure` describes. It exists so the bars account for the same population the summary reports: a document whose slice field holds no indexed term is absent from a terms breakdown entirely rather than forming a small bucket, so without it a chart silently omits part of its own corpus. That reconciliation is exact for `units`; on an average it is not, because buckets under the five-document floor are dropped and a slice with more than 200 distinct values still truncates — neither loss is collected in this row (the truncated tail is reported response-wide as `omittedCount`; the floor is reported nowhere). Absent when there is nothing unattributed, never `false` and never a zero-valued row.","enum":[true],"type":"boolean"},"value":{"type":"number"}},"required":["label","value","count"],"type":"object"},"ChartMeasure":{"default":"units","description":"Which metric each bar reports, AND what the bars are ranked by — the list is ordered by the measure you ask for, descending. Defaults to `units`, so an unqualified \"top originators\" means the busiest; pass `volume` for the biggest by dollars, or an average to rank by that average. Two things to know about the averages specifically. Buckets built from fewer than 5 documents are dropped from an average chart entirely, because a mean says nothing about how many transactions produced it and a single-transaction bucket would otherwise outrank real ones; no floor is applied to `units` or `volume`, where a lone large transaction is a legitimate top bar. And ranking a bucket list by a sub-aggregated average is approximate in the search engine — each shard contributes its own local top-N before they are merged — so treat the ordering of an average chart as indicative near the boundary rather than exact. Every bucket publishes its own `count`, so the sample size behind a value is never implicit.","enum":["volume","units","avgSalePrice","avgListPrice"],"type":"string"},"ChartResponse":{"properties":{"completeness":{"$ref":"#/components/schemas/AnalyticsCompleteness"},"data":{"items":{"$ref":"#/components/schemas/ChartBucket"},"type":"array"},"measure":{"type":"string"},"nextCursor":{"description":"Paged party slices only (a chart request that passed `size` or `after` with `slice` `originator` / `broker` / `loanCompany`). Opaque cursor for the next page of the ranking — send it back as `after` with the same body. Absent on the last page.","type":"string"},"omittedCount":{"description":"How many documents fell outside the bars — the size of the dropped tail, not its value. A chart groups by a capped number of distinct values, so a slice with more of them than the cap returns its largest groups and drops the rest; `zip`, `city`, `lender` and `originator` are the ones that reach it. It is the documents in the groups past the size cap, and only those: documents excluded from the slice by its empty-value filter, or carrying no value for it at all, are never grouped and are not counted here either. Where the response carries an `unattributed` row that row collects them; elsewhere a small residual against `/analytics/summary` can remain on `city`, `lender`, `originator` and similar, so bars plus this count reconcile with the summary's population exactly only on a slice with no such documents. `0` means the bars ARE the complete set, and the field is absent only where the grouping cannot truncate at all — so `0` and missing are different claims. Unlike a breakdown there is no next page to fetch: narrow the filters or pick a coarser slice. It is a DOCUMENT count and never a dollar or an average — the aggregation reports how many rows it left out, not what they were worth, so a truncated volume chart cannot be completed from this figure. One exception it does not cover: the average measures drop buckets thinner than a minimum sample size, and those are not counted here — compare against the summary when a mean matters.","type":"number"},"segment":{"description":"The second dimension echoed from the request, or `null` for a one-dimensional chart (then no bucket carries `segments`).","nullable":true,"type":"string"},"slice":{"type":"string"},"total":{"description":"Paged party slices only. Distinct bucket keys (e.g. originators) in the filtered population — what a consumer paginates against. A cardinality ESTIMATE (see `totalApproximate`): near-exact below 40,000, approximate above. On an average measure it can exceed the ranked buckets, which drop keys under the 5-document floor. Use `nextCursor`, not `total`, to decide whether another page exists.","type":"integer"},"totalApproximate":{"description":"Present (always `true`) alongside `total`: the total is a cardinality estimate, not an exact count.","type":"boolean"}},"required":["measure","slice","segment","data"],"type":"object"},"ChartSegment":{"properties":{"count":{"description":"Documents in this segment of the parent bucket — the denominator behind `value`, whatever the measure.","type":"number"},"id":{"description":"Machine value behind `label` when the bucket key is not itself the label. `lender`: `label` is the dictionary display name and `id` the normalized lender key — pass `id`, not `label`, back as a `lender` filter value. `conforming`: `label` is `conforming` / `nonConforming` and `id` the raw `true` / `false` flag. `titleCompany` (time-series segment): `label` is the most-used spelling and `id` the normalized name every spelling was merged under — match segments across buckets on `id`. Absent on slices whose `label` is already the machine value.","type":"string"},"label":{"type":"string"},"value":{"description":"The requested `measure` over the documents in BOTH this segment and its parent bucket.","type":"number"}},"required":["label","value","count"],"type":"object"},"ClearAlertHistoryRequest":{"properties":{"detectors":{"description":"Limit the wipe to these alert types; all history when omitted.","items":{"enum":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan","book_property","book_loan","area_property"],"type":"string"},"type":"array"}},"type":"object"},"ClearAlertHistoryResponse":{"properties":{"data":{"properties":{"dedupDeleted":{"type":"integer"},"digestDeleted":{"type":"integer"},"logDeleted":{"type":"integer"}},"required":["dedupDeleted","logDeleted","digestDeleted"],"type":"object"}},"required":["data"],"type":"object"},"ClientRetentionSignal":{"properties":{"address":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"lastLoanDate":{"description":"Date of this loan officer's most recent loan on the property.","nullable":true,"type":"string"},"lastLoanType":{"description":"Type of that loan, e.g. \"FHA\" or \"Home equity\".","nullable":true,"type":"string"},"percentile":{"description":"Priority percentile, 0–100: where this priority score sits among everyone scored nationally for this signal (all scored loan officers, past clients, or agent relationships). 100 = highest priority. On the state list it is still the national percentile, not a within-state one.","type":"number"},"propertyId":{"type":"string"},"rank":{"description":"1 = highest priority.","type":"integer"},"reasons":{"description":"Up to three plain-language reasons this row is a priority.","items":{"type":"string"},"type":"array"},"risk":{"description":"Same value as `score` for this signal: higher means more at risk of taking the next refinance or equity loan elsewhere.","type":"number"},"score":{"description":"Priority score (0–1) for reaching out to this past client before their next refinance or equity loan goes to someone else; higher is higher priority.","type":"number"},"scoredAt":{"description":"When this score was computed (ISO 8601).","type":"string"},"state":{"nullable":true,"type":"string"},"zip":{"nullable":true,"type":"string"}},"required":["rank","propertyId","address","city","state","zip","lastLoanDate","lastLoanType","score","risk","percentile","reasons","scoredAt"],"type":"object"},"ClientRetentionSignalList":{"properties":{"cursor":{"description":"Pass as `cursor` for the next page. Absent on the last page.","type":"string"},"data":{"items":{"$ref":"#/components/schemas/ClientRetentionSignal"},"type":"array"}},"required":["data"],"type":"object"},"CommunityLendingBenchmark":{"description":"Peer rank of an entity's neighborhood lending shares. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"properties":{"lowModIncomeTract":{"properties":{"pct":{"description":"This entity's share, 0-100.","nullable":true,"type":"number"},"peerAvgPct":{"description":"Peer mean share, 0-100. Null with no peers.","nullable":true,"type":"number"},"percentileRank":{"description":"0-100: share of peers with a lower value. Null when this entity has no value or there are no peers.","nullable":true,"type":"number"}},"required":["pct","percentileRank","peerAvgPct"],"type":"object"},"majorityMinorityTract":{"properties":{"pct":{"description":"This entity's share, 0-100.","nullable":true,"type":"number"},"peerAvgPct":{"description":"Peer mean share, 0-100. Null with no peers.","nullable":true,"type":"number"},"percentileRank":{"description":"0-100: share of peers with a lower value. Null when this entity has no value or there are no peers.","nullable":true,"type":"number"}},"required":["pct","percentileRank","peerAvgPct"],"type":"object"},"peerPopulation":{"type":"number"},"states":{"description":"The footprint states peers were drawn from (top by units). Empty = nationwide.","items":{"type":"string"},"type":"array"}},"required":["states","peerPopulation","lowModIncomeTract","majorityMinorityTract"],"type":"object"},"CommunityLendingBenchmarkResponse":{"properties":{"data":{"$ref":"#/components/schemas/CommunityLendingBenchmark"}},"required":["data"],"type":"object"},"CommunityLendingMapPoint":{"properties":{"address":{"nullable":true,"type":"string"},"id":{"type":"string"},"lat":{"type":"number"},"lon":{"type":"number"},"mortgageAmount":{"nullable":true,"type":"number"},"tractGeoId":{"description":"11-digit Census tract GEOID (state + county + tract FIPS) — the join key for a tract boundary layer.","nullable":true,"type":"string"},"transactionDate":{"nullable":true,"type":"string"},"transactionType":{"nullable":true,"type":"string"}},"required":["id","lat","lon","address","mortgageAmount","transactionDate","transactionType","tractGeoId"],"type":"object"},"CommunityLendingMapResponse":{"properties":{"points":{"items":{"$ref":"#/components/schemas/CommunityLendingMapPoint"},"type":"array"},"total":{"description":"Every geocoded loan in scope for the period.","type":"number"},"tractCounts":{"additionalProperties":{"type":"number"},"description":"Plotted loans per tract GEOID. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","type":"object"},"truncated":{"description":"More than 4000 loans matched; the newest are returned.","type":"boolean"}},"required":["points","tractCounts","total","truncated"],"type":"object"},"CompanyActiveListing":{"properties":{"address":{"description":"From the company's loan record on the parcel.","type":"string"},"lender":{"description":"Lender on that loan — still the borrower's latest loan (retained), so the current lender of record.","nullable":true,"type":"string"},"listPrice":{"nullable":true,"type":"number"},"listedDate":{"description":"Date of the newest listing event (UTC).","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"listingStatus":{"description":"The MLS status of the newest listing event (active).","type":"string"},"loanAmount":{"type":"number"},"loanDate":{"description":"Date of the company's latest loan on the parcel.","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"originatorName":{"type":"string"},"originatorNmlsId":{"description":"The LO who wrote the company's latest loan on the parcel — employed by the company on that loan.","type":"string"},"propertyId":{"type":"string"},"writtenAt":{"description":"`view=team` only: the previous employer the LO wrote this loan at. Null on a loan written at the company (and on every `view=company` row).","nullable":true,"type":"string"}},"required":["propertyId","address","listingStatus","listPrice","listedDate","originatorNmlsId","originatorName","loanDate","loanAmount","lender"],"type":"object"},"CompanyActiveListingsResponse":{"properties":{"companyNmlsId":{"type":"string"},"computedAt":{"description":"When the weekly batch checked these listings (ISO-8601). Rows are as of this time, not live.","type":"string"},"cursor":{"description":"Cursor for the next page; absent on the last page.","type":"string"},"data":{"items":{"$ref":"#/components/schemas/CompanyActiveListing"},"type":"array"},"status":{"description":"`timeout`: the listing check did not finish in this run, so the previous run's rows and counts are kept (or none, on a first run).","enum":["ok","timeout"],"type":"string"},"total":{"description":"Rows matching the filter, across all pages.","type":"integer"}},"required":["companyNmlsId","computedAt","status","data","total"],"type":"object"},"CompanyActiveListingsSummary":{"description":"Retained borrowers listed for sale now, on loans by the company's own LOs: the count and top LOs (rows: `GET /companies/{nmlsId}/retention/active-listings`). Same for every window. Null until the weekly batch has checked listings for this company.","nullable":true,"properties":{"computedAt":{"description":"When the listings were checked (ISO-8601) — the run that wrote the rows. Listings are as of this time, not live.","type":"string"},"parcelsChecked":{"description":"Retained parcels whose latest company loan was written by an LO the company employed on it — the population checked for listings.","type":"integer"},"status":{"description":"`timeout`: the listing check did not finish in this run, so the previous run's rows and counts are kept (or none, on a first run).","enum":["ok","timeout"],"type":"string"},"team":{"description":"The current-team view's counts; null until the batch has checked it for this company.","nullable":true,"properties":{"roster":{"description":"Current LOs (active sponsorships) checked.","type":"integer"},"status":{"enum":["ok","timeout"],"type":"string"},"total":{"description":"Rows in `view=team`: listings on loans by the company's current LOs, written at the company or at a previous employer.","type":"integer"},"writtenElsewhere":{"description":"Of those, loans the LOs wrote at a previous employer.","type":"integer"}},"required":["status","total","writtenElsewhere","roster"],"type":"object"},"topOriginators":{"description":"Top 10 LOs by active listings.","items":{"properties":{"count":{"type":"integer"},"name":{"type":"string"},"nmlsId":{"type":"string"}},"required":["nmlsId","name","count"],"type":"object"},"type":"array"},"total":{"description":"Retained borrowers whose home is listed for sale right now, on loans written by the company's own LOs.","type":"integer"}},"required":["computedAt","status","total","parcelsChecked","topOriginators"],"type":"object"},"CompanyBranch":{"properties":{"branchNmlsId":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"companyName":{"nullable":true,"type":"string"},"companyNmlsId":{"nullable":true,"type":"string"},"id":{"type":"string"},"isAuthorized":{"nullable":true,"type":"boolean"},"licensedStates":{"items":{"type":"string"},"nullable":true,"type":"array"},"location":{"nullable":true,"properties":{"lat":{"type":"number"},"lon":{"type":"number"}},"required":["lat","lon"],"type":"object"},"managers":{"nullable":true},"name":{"nullable":true,"type":"string"},"postalCode":{"nullable":true,"type":"string"},"state":{"nullable":true,"type":"string"},"street":{"nullable":true,"type":"string"},"tradeNames":{"items":{"type":"string"},"nullable":true,"type":"array"}},"required":["id"],"type":"object"},"CompanyBranchesRequest":{"additionalProperties":false,"properties":{"advancedFilters":{"$ref":"#/components/schemas/FilterNode"},"filters":{"$ref":"#/components/schemas/FilterNode"},"flatFilters":{"additionalProperties":false,"properties":{"borrowerStatus":{"$ref":"#/components/schemas/LoanBorrowerStatusFilterValue"},"broker":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Broker shop NMLS id (digits only). A broker is a company — resolve a broker name to its NMLS id via instantSearch (or listCompanies)."}]},"buyerEntityType":{"$ref":"#/components/schemas/BooleanFilterValue"},"city":{"$ref":"#/components/schemas/TextFilterValue"},"conforming":{"$ref":"#/components/schemas/BooleanFilterValue"},"county":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"County name (e.g. \"Broward\") or 5-digit FIPS code. Names resolve to FIPS server-side; include a `state` filter to disambiguate."}]},"currentBalance":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Estimated remaining principal balance (~19% populated). Approximate current equity as `homeValue` (AVM) minus this."}]},"employer":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Employer/company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"equity":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Point-in-time equity recorded on the loan (sparse, ~10%). NOT a live current-equity figure. For HELOC/cash-out targeting on up-to-date equity, use properties search (listProperties) instead — its equity is far better populated and current."}]},"excludeBroker":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans brokered by this broker-shop NMLS id (digits only) — the inverse of `broker`."}]},"excludeCity":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this city — the inverse of `city`."}]},"excludeLender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans from this lender ID (\"everyone but X\") — the inverse of `lender`, same id contract (resolve via instantSearch/listLenders). Loans with no lender stay in the results."}]},"excludeLoanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans funded by this company NMLS id (digits only) — the inverse of `loanCompany`."}]},"excludeLoanType":{"$ref":"#/components/schemas/LoanTypeExcludeFilterValue"},"excludeOriginator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans with this originator NMLS id (digits only) — the inverse of `originator`. Common for 'everyone but my own shop' lists."}]},"excludeState":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this state (2-letter code, e.g. \"CA\") — the inverse of `state`. For \"everywhere but this state\" lists."}]},"excludeTransactionType":{"$ref":"#/components/schemas/LoanTransactionTypeExcludeFilterValue"},"excludeZipCode":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this ZIP code — the inverse of `zipCode`."}]},"fips":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exact 5-digit county FIPS code (no name resolution) — the code-only escape hatch alongside `county`."}]},"geoPoint":{"$ref":"#/components/schemas/GeoFilterValue"},"homeValue":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"AVM (automated valuation) at the linked property (~26%, MLS-linked). Pair with `currentBalance` to approximate current equity."}]},"includeUnknownOriginator":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Include loans that have no originator NMLS id. Omitted/false (default): such loans are excluded — the vast majority are pre-2016 public records with no linkable originator. true: include them. Note that the default scopes results to loans with a known originator (~2016+ recordings)."}]},"interestRate":{"$ref":"#/components/schemas/NumericFilterValue"},"lender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender ID — the normalized lender-dictionary key, NOT a fuzzy name match. Resolve a lender via instantSearch (or listLenders) and pass the `id` it returns (e.g. \"mortgage_rocket\" or \"mortgage rocket\"). Underscores and letter case are normalized, so either id surface works. A stored normalized lender name (what the `slice: \"lender\"` chart buckets emit) is also accepted, so a chart bucket key filters directly. A value that is neither returns 400 rather than silently matching nothing — to search by lender NAME, use `lenderName`."}]},"lenderName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender name as recorded on the loan document — fuzzy, all-terms match (e.g. \"Fifth Third\"). The name counterpart to the exact-id `lender` filter; use `lender` when you have a resolved id, and this when you only have a name."}]},"loanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Funding/loan company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"loanType":{"$ref":"#/components/schemas/LoanTypeFilterValue"},"ltvAtOrigination":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Loan-to-value at ORIGINATION (sparse), as a PERCENT on a 0-100 scale (`80` = 80% LTV; values above 100 are real underwater loans). This is not a current LTV — there is no stored current-LTV field on loans."}]},"mode":{"enum":["and","or"],"type":"string"},"mortgageAmount":{"$ref":"#/components/schemas/NumericFilterValue"},"mortgageDate":{"$ref":"#/components/schemas/DateFilterValue"},"name":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Branch office name. Matches ALL the words supplied, fuzzily — so \"Rocket Mortgage\" does not return every branch with \"mortgage\" in its name. Scoped to this company's branches."}]},"originator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Loan originator NMLS id (digits only). To search by name use `originatorName`, or resolve a name to its id via instantSearch."}]},"originatorName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"deprecated":true,"description":"DEPRECATED — fuzzy name matching is unreliable (same originator can return wildly different counts by name string). Resolve the loan officer via instantSearch and filter by `originator` (exact NMLS id) instead. Still functional for now."}]},"propertyId":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Parcel id — returns every loan recorded against one property. Pass the same string this endpoint returns as `mmPropertyId` on a loan row, or the `mmPropertyId` of a property record.\n\nThis is the parcel's FULL recorded loan history, which is deliberately wider than the loans embedded on a property record: that embed is a snapshot of what is still owed (up to five currently-active loans), so paid-off mortgages are absent from it and present here.\n\nMulti-unit caveat: loans carry a unit-blind parcel id, so for one unit of a multi-unit building this selects every unit in the building, not that unit alone."}]},"saleDate":{"$ref":"#/components/schemas/DateFilterValue"},"salePrice":{"$ref":"#/components/schemas/NumericFilterValue"},"state":{"$ref":"#/components/schemas/TextFilterValue"},"transactionType":{"$ref":"#/components/schemas/LoanTransactionTypeFilterValue"},"zip":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Alias of `zipCode` — same ZIP filter, accepted for cross-entity key parity."}]},"zipCode":{"$ref":"#/components/schemas/TextFilterValue"}},"type":"object"},"pagination":{"$ref":"#/components/schemas/Pagination"},"period":{"$ref":"#/components/schemas/Period"},"sort":{"description":"Order the branches. `zip` sorts by the branch postal code (returned as `postalCode`); `nmlsId` by the branch NMLS id (returned as `branchNmlsId`); `rosterCount` by the number of individuals on the branch roster.","items":{"properties":{"field":{"enum":["name","nmlsId","companyName","city","state","zip","isAuthorized","rosterCount"],"type":"string"},"order":{"$ref":"#/components/schemas/SortOrder"}},"required":["field"],"type":"object"},"type":"array"}},"type":"object"},"CompanyBranchesResponse":{"properties":{"cursor":{"type":"string"},"data":{"items":{"$ref":"#/components/schemas/CompanyBranch"},"type":"array"},"locationNormalizations":{"description":"How each location filter value resolved. Present when a `city`/`state`/`zip` filter was supplied.","items":{"$ref":"#/components/schemas/LocationNormalization"},"type":"array"},"total":{"type":"number"}},"required":["data","total"],"type":"object"},"CompanyBreakdownRequest":{"additionalProperties":false,"properties":{"advancedFilters":{"$ref":"#/components/schemas/FilterNode"},"filters":{"$ref":"#/components/schemas/FilterNode"},"flatFilters":{"additionalProperties":false,"properties":{"borrowerStatus":{"$ref":"#/components/schemas/LoanBorrowerStatusFilterValue"},"broker":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Broker shop NMLS id (digits only). A broker is a company — resolve a broker name to its NMLS id via instantSearch (or listCompanies)."}]},"buyerEntityType":{"$ref":"#/components/schemas/BooleanFilterValue"},"city":{"$ref":"#/components/schemas/TextFilterValue"},"conforming":{"$ref":"#/components/schemas/BooleanFilterValue"},"county":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"County name (e.g. \"Broward\") or 5-digit FIPS code. Names resolve to FIPS server-side; include a `state` filter to disambiguate."}]},"currentBalance":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Estimated remaining principal balance (~19% populated). Approximate current equity as `homeValue` (AVM) minus this."}]},"employer":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Employer/company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"equity":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Point-in-time equity recorded on the loan (sparse, ~10%). NOT a live current-equity figure. For HELOC/cash-out targeting on up-to-date equity, use properties search (listProperties) instead — its equity is far better populated and current."}]},"excludeBroker":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans brokered by this broker-shop NMLS id (digits only) — the inverse of `broker`."}]},"excludeCity":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this city — the inverse of `city`."}]},"excludeLender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans from this lender ID (\"everyone but X\") — the inverse of `lender`, same id contract (resolve via instantSearch/listLenders). Loans with no lender stay in the results."}]},"excludeLoanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans funded by this company NMLS id (digits only) — the inverse of `loanCompany`."}]},"excludeLoanType":{"$ref":"#/components/schemas/LoanTypeExcludeFilterValue"},"excludeOriginator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans with this originator NMLS id (digits only) — the inverse of `originator`. Common for 'everyone but my own shop' lists."}]},"excludeState":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this state (2-letter code, e.g. \"CA\") — the inverse of `state`. For \"everywhere but this state\" lists."}]},"excludeTransactionType":{"$ref":"#/components/schemas/LoanTransactionTypeExcludeFilterValue"},"excludeZipCode":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this ZIP code — the inverse of `zipCode`."}]},"fips":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exact 5-digit county FIPS code (no name resolution) — the code-only escape hatch alongside `county`."}]},"geoPoint":{"$ref":"#/components/schemas/GeoFilterValue"},"homeValue":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"AVM (automated valuation) at the linked property (~26%, MLS-linked). Pair with `currentBalance` to approximate current equity."}]},"includeUnknownOriginator":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Include loans that have no originator NMLS id. Omitted/false (default): such loans are excluded — the vast majority are pre-2016 public records with no linkable originator. true: include them. Note that the default scopes results to loans with a known originator (~2016+ recordings)."}]},"interestRate":{"$ref":"#/components/schemas/NumericFilterValue"},"lender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender ID — the normalized lender-dictionary key, NOT a fuzzy name match. Resolve a lender via instantSearch (or listLenders) and pass the `id` it returns (e.g. \"mortgage_rocket\" or \"mortgage rocket\"). Underscores and letter case are normalized, so either id surface works. A stored normalized lender name (what the `slice: \"lender\"` chart buckets emit) is also accepted, so a chart bucket key filters directly. A value that is neither returns 400 rather than silently matching nothing — to search by lender NAME, use `lenderName`."}]},"lenderName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender name as recorded on the loan document — fuzzy, all-terms match (e.g. \"Fifth Third\"). The name counterpart to the exact-id `lender` filter; use `lender` when you have a resolved id, and this when you only have a name."}]},"loanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Funding/loan company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"loanType":{"$ref":"#/components/schemas/LoanTypeFilterValue"},"ltvAtOrigination":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Loan-to-value at ORIGINATION (sparse), as a PERCENT on a 0-100 scale (`80` = 80% LTV; values above 100 are real underwater loans). This is not a current LTV — there is no stored current-LTV field on loans."}]},"mode":{"enum":["and","or"],"type":"string"},"mortgageAmount":{"$ref":"#/components/schemas/NumericFilterValue"},"mortgageDate":{"$ref":"#/components/schemas/DateFilterValue"},"originator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Loan originator NMLS id (digits only). To search by name use `originatorName`, or resolve a name to its id via instantSearch."}]},"originatorName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"deprecated":true,"description":"DEPRECATED — fuzzy name matching is unreliable (same originator can return wildly different counts by name string). Resolve the loan officer via instantSearch and filter by `originator` (exact NMLS id) instead. Still functional for now."}]},"propertyId":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Parcel id — returns every loan recorded against one property. Pass the same string this endpoint returns as `mmPropertyId` on a loan row, or the `mmPropertyId` of a property record.\n\nThis is the parcel's FULL recorded loan history, which is deliberately wider than the loans embedded on a property record: that embed is a snapshot of what is still owed (up to five currently-active loans), so paid-off mortgages are absent from it and present here.\n\nMulti-unit caveat: loans carry a unit-blind parcel id, so for one unit of a multi-unit building this selects every unit in the building, not that unit alone."}]},"saleDate":{"$ref":"#/components/schemas/DateFilterValue"},"salePrice":{"$ref":"#/components/schemas/NumericFilterValue"},"state":{"$ref":"#/components/schemas/TextFilterValue"},"transactionType":{"$ref":"#/components/schemas/LoanTransactionTypeFilterValue"},"zip":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Alias of `zipCode` — same ZIP filter, accepted for cross-entity key parity."}]},"zipCode":{"$ref":"#/components/schemas/TextFilterValue"}},"type":"object"},"pagination":{"$ref":"#/components/schemas/Pagination"},"period":{"$ref":"#/components/schemas/DatedPeriod"},"roleScope":{"$ref":"#/components/schemas/CompanyRoleScope"},"sort":{"$ref":"#/components/schemas/BreakdownSort"}},"type":"object"},"CompanyChartRequest":{"additionalProperties":false,"properties":{"advancedFilters":{"$ref":"#/components/schemas/FilterNode"},"filters":{"$ref":"#/components/schemas/FilterNode"},"flatFilters":{"additionalProperties":false,"properties":{"borrowerStatus":{"$ref":"#/components/schemas/LoanBorrowerStatusFilterValue"},"broker":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Broker shop NMLS id (digits only). A broker is a company — resolve a broker name to its NMLS id via instantSearch (or listCompanies)."}]},"buyerEntityType":{"$ref":"#/components/schemas/BooleanFilterValue"},"city":{"$ref":"#/components/schemas/TextFilterValue"},"conforming":{"$ref":"#/components/schemas/BooleanFilterValue"},"county":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"County name (e.g. \"Broward\") or 5-digit FIPS code. Names resolve to FIPS server-side; include a `state` filter to disambiguate."}]},"currentBalance":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Estimated remaining principal balance (~19% populated). Approximate current equity as `homeValue` (AVM) minus this."}]},"employer":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Employer/company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"equity":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Point-in-time equity recorded on the loan (sparse, ~10%). NOT a live current-equity figure. For HELOC/cash-out targeting on up-to-date equity, use properties search (listProperties) instead — its equity is far better populated and current."}]},"excludeBroker":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans brokered by this broker-shop NMLS id (digits only) — the inverse of `broker`."}]},"excludeCity":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this city — the inverse of `city`."}]},"excludeLender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans from this lender ID (\"everyone but X\") — the inverse of `lender`, same id contract (resolve via instantSearch/listLenders). Loans with no lender stay in the results."}]},"excludeLoanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans funded by this company NMLS id (digits only) — the inverse of `loanCompany`."}]},"excludeLoanType":{"$ref":"#/components/schemas/LoanTypeExcludeFilterValue"},"excludeOriginator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans with this originator NMLS id (digits only) — the inverse of `originator`. Common for 'everyone but my own shop' lists."}]},"excludeState":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this state (2-letter code, e.g. \"CA\") — the inverse of `state`. For \"everywhere but this state\" lists."}]},"excludeTransactionType":{"$ref":"#/components/schemas/LoanTransactionTypeExcludeFilterValue"},"excludeZipCode":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this ZIP code — the inverse of `zipCode`."}]},"fips":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exact 5-digit county FIPS code (no name resolution) — the code-only escape hatch alongside `county`."}]},"geoPoint":{"$ref":"#/components/schemas/GeoFilterValue"},"homeValue":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"AVM (automated valuation) at the linked property (~26%, MLS-linked). Pair with `currentBalance` to approximate current equity."}]},"includeUnknownOriginator":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Include loans that have no originator NMLS id. Omitted/false (default): such loans are excluded — the vast majority are pre-2016 public records with no linkable originator. true: include them. Note that the default scopes results to loans with a known originator (~2016+ recordings)."}]},"interestRate":{"$ref":"#/components/schemas/NumericFilterValue"},"lender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender ID — the normalized lender-dictionary key, NOT a fuzzy name match. Resolve a lender via instantSearch (or listLenders) and pass the `id` it returns (e.g. \"mortgage_rocket\" or \"mortgage rocket\"). Underscores and letter case are normalized, so either id surface works. A stored normalized lender name (what the `slice: \"lender\"` chart buckets emit) is also accepted, so a chart bucket key filters directly. A value that is neither returns 400 rather than silently matching nothing — to search by lender NAME, use `lenderName`."}]},"lenderName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender name as recorded on the loan document — fuzzy, all-terms match (e.g. \"Fifth Third\"). The name counterpart to the exact-id `lender` filter; use `lender` when you have a resolved id, and this when you only have a name."}]},"loanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Funding/loan company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"loanType":{"$ref":"#/components/schemas/LoanTypeFilterValue"},"ltvAtOrigination":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Loan-to-value at ORIGINATION (sparse), as a PERCENT on a 0-100 scale (`80` = 80% LTV; values above 100 are real underwater loans). This is not a current LTV — there is no stored current-LTV field on loans."}]},"mode":{"enum":["and","or"],"type":"string"},"mortgageAmount":{"$ref":"#/components/schemas/NumericFilterValue"},"mortgageDate":{"$ref":"#/components/schemas/DateFilterValue"},"originator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Loan originator NMLS id (digits only). To search by name use `originatorName`, or resolve a name to its id via instantSearch."}]},"originatorName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"deprecated":true,"description":"DEPRECATED — fuzzy name matching is unreliable (same originator can return wildly different counts by name string). Resolve the loan officer via instantSearch and filter by `originator` (exact NMLS id) instead. Still functional for now."}]},"propertyId":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Parcel id — returns every loan recorded against one property. Pass the same string this endpoint returns as `mmPropertyId` on a loan row, or the `mmPropertyId` of a property record.\n\nThis is the parcel's FULL recorded loan history, which is deliberately wider than the loans embedded on a property record: that embed is a snapshot of what is still owed (up to five currently-active loans), so paid-off mortgages are absent from it and present here.\n\nMulti-unit caveat: loans carry a unit-blind parcel id, so for one unit of a multi-unit building this selects every unit in the building, not that unit alone."}]},"saleDate":{"$ref":"#/components/schemas/DateFilterValue"},"salePrice":{"$ref":"#/components/schemas/NumericFilterValue"},"state":{"$ref":"#/components/schemas/TextFilterValue"},"transactionType":{"$ref":"#/components/schemas/LoanTransactionTypeFilterValue"},"zip":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Alias of `zipCode` — same ZIP filter, accepted for cross-entity key parity."}]},"zipCode":{"$ref":"#/components/schemas/TextFilterValue"}},"type":"object"},"measure":{"$ref":"#/components/schemas/ChartMeasure"},"nmlsId":{"type":"string"},"nmlsIds":{"items":{"type":"string"},"type":"array"},"period":{"$ref":"#/components/schemas/Period"},"roleScope":{"$ref":"#/components/schemas/CompanyRoleScope"},"segment":{"allOf":[{"$ref":"#/components/schemas/CompanySlice"},{"description":"Optional second dimension. Each bucket of `slice` then carries `segments`: the same `measure` broken down by this dimension (e.g. `slice: \"loanType\", segment: \"lender\"` is loan type × lender in one call), top 25 per bucket ranked by `measure`, with the remainder counted in `segmentsOmittedCount`. Omit it and the response is the one-dimensional chart, unchanged. Must differ from `slice` (400). Combines with `size` / `after` paging on a party slice: the cursor pages the `slice` ranking and every bucket on each page carries its own segments (e.g. `slice: \"broker\", segment: \"lender\"` walks every broker shop × its lenders)."}]},"slice":{"$ref":"#/components/schemas/CompanySlice"}},"required":["slice"],"type":"object"},"CompanyCrmListFilter":{"additionalProperties":false,"description":"Scope the result to the caller's CRM. Resolved against the caller's ACTIVE WORKSPACE at query time — list membership is read server-side, so the request never carries member ids. Only company members count; people, branches, offices and manual (unlinked) records on the same list are ignored. `mode: \"in\"` with no matching members returns an empty page (not an unfiltered one). Errors: 400 `crm_list_requires_workspace` when the caller has no active workspace (API-key / OAuth callers must select an organization), 403 / 404 when a named list is not visible to the caller or does not exist, and 400 `crm_list_too_large` when the selected lists hold more than 50,000 companies in total — narrow the selection rather than get a silently partial answer.","properties":{"lists":{"anyOf":[{"description":"Every list in the caller's workspace that the caller can see (own, org-wide, or shared with them) and that holds this kind of record — People lists for originators and agents, Company lists for companies.","enum":["any"],"type":"string"},{"description":"Specific CRM list ids (1–50).","items":{"minLength":1,"type":"string"},"maxItems":50,"minItems":1,"type":"array"}],"description":"Which lists: `\"any\"` for every Company list the caller can see, or an array of list ids. Membership is the UNION across the selected lists."},"mode":{"description":"`in` — only companies who are a member of the selected list(s). `notIn` — exclude every company who is a member of the selected list(s); everyone else passes, including companies on none of your lists.","enum":["in","notIn"],"type":"string"}},"required":["mode","lists"],"type":"object"},"CompanyDepartureStatusResponse":{"properties":{"notWorking":{"description":"Exits with no current employer on file today — not re-employed yet, or left the industry. `workingElsewhere` + `notWorking` = `total`.","type":"number"},"total":{"description":"Exits in the window. An exit is a loan officer whose latest record at this company ended inside the window and who holds NO open record there — a complete departure.","type":"number"},"truncated":{"description":"`true` when the company has more than 100,000 loan officers in scope and only the first 100,000 (by NMLS ID) were counted. `false` means every figure covers the full population.","type":"boolean"},"window":{"$ref":"#/components/schemas/EmploymentWindow"},"workingElsewhere":{"description":"Exits whose current employer on file today is another company.","type":"number"}},"required":["window","total","workingElsewhere","notWorking","truncated"],"type":"object"},"CompanyDetail":{"allOf":[{"$ref":"#/components/schemas/CompanySummary"},{"properties":{"builders":{"description":"Top home builders (up to 10) behind the company's period production — the builder of each sold property, ranked by loan count. Spellings of one builder (case, punctuation, legal suffixes, a trailing \"of <State>\", generic words such as Homes, letter typos) are one entry with units summed, named by its most common spelling. Units only (no volume is recorded). Empty when none.","items":{"properties":{"name":{"type":"string"},"units":{"type":"number"}},"required":["name","units"],"type":"object"},"type":"array"},"communityLending":{"$ref":"#/components/schemas/EntityCommunityLending"},"registration":{"$ref":"#/components/schemas/CompanyRegistration"}},"type":"object"}]},"CompanyDetailResponse":{"properties":{"data":{"$ref":"#/components/schemas/CompanyDetail"}},"required":["data"],"type":"object"},"CompanyEarlyExitsResponse":{"properties":{"data":{"description":"Present only with `month`: that cohort's rows.","items":{"$ref":"#/components/schemas/EarlyExitRow"},"type":"array"},"monthlyCohorts":{"items":{"properties":{"attritionRate":{"type":"number"},"earlyDepartures":{"type":"number"},"isIncompleteCohort":{"description":"The month ends inside the trailing `withinDays`, so the cohort has not had the full horizon to exit.","type":"boolean"},"month":{"type":"string"},"newHires":{"type":"number"},"recentStarts":{"type":"number"}},"required":["month","newHires","earlyDepartures","recentStarts","attritionRate","isIncompleteCohort"],"type":"object"},"type":"array"},"summary":{"properties":{"avgDaysBeforeExit":{"type":"number"},"earlyAttritionRate":{"description":"0–100.","type":"number"},"riskLevel":{"enum":["low_sample","critical_attention","attention_needed","review_recommended","worth_reviewing","worth_monitoring","steady_retention","strong_retention","exceptional_retention"],"type":"string"},"totalEarlyDepartures":{"type":"number"},"totalNewHires":{"type":"number"}},"required":["totalNewHires","totalEarlyDepartures","earlyAttritionRate","avgDaysBeforeExit","riskLevel"],"type":"object"},"truncated":{"description":"`true` when the company has more than 100,000 loan officers in scope and only the first 100,000 (by NMLS ID) were counted. `false` means every figure covers the full population.","type":"boolean"},"window":{"$ref":"#/components/schemas/EmploymentWindow"},"withinDays":{"type":"number"}},"required":["window","withinDays","summary","monthlyCohorts","truncated"],"type":"object"},"CompanyEmployeeStatsResponse":{"properties":{"arrived":{"description":"Hires in the window. A hire is a loan officer whose earliest employment record at this company still relevant to the window (open, or ended on/after the window start) starts inside it — so someone who fully left and came back inside the window counts, and an existing employee who adds a state license does not.","properties":{"avgVolume":{"type":"number"},"count":{"type":"number"},"shareOfRoster":{"description":"Hires as a share (0–100) of the current roster.","type":"number"},"topName":{"nullable":true,"type":"string"},"topNmlsId":{"nullable":true,"type":"string"},"topVolume":{"type":"number"},"totalUnits":{"type":"number"},"totalVolume":{"type":"number"}},"required":["count","totalVolume","totalUnits","avgVolume","topNmlsId","topName","topVolume","shareOfRoster"],"type":"object"},"current":{"description":"The current roster (open employment record today). Production is each loan officer's `period` production across ALL employers.","properties":{"avgUnitsPerLO":{"type":"number"},"avgVolumePerLO":{"type":"number"},"nonProducingCount":{"type":"number"},"producingCount":{"type":"number"},"tiers":{"description":"The current roster bucketed by units closed in `period`: none (0), low (1–24), mid (25–99), top (100+).","items":{"$ref":"#/components/schemas/RosterProductionTier"},"type":"array"},"topConcentrationPct":{"description":"Share (0–100) of roster volume produced by its top 10%.","type":"number"},"totalCount":{"type":"number"},"totalUnits":{"type":"number"},"totalVolume":{"type":"number"}},"required":["totalCount","producingCount","nonProducingCount","totalVolume","totalUnits","avgVolumePerLO","avgUnitsPerLO","topConcentrationPct","tiers"],"type":"object"},"departed":{"description":"Exits in the window. An exit is a loan officer whose latest record at this company ended inside the window and who holds NO open record there — a complete departure.","properties":{"avgVolume":{"type":"number"},"count":{"type":"number"},"topName":{"nullable":true,"type":"string"},"topNmlsId":{"nullable":true,"type":"string"},"topVolume":{"type":"number"},"totalUnits":{"type":"number"},"totalVolume":{"type":"number"}},"required":["count","totalVolume","totalUnits","avgVolume","topNmlsId","topName","topVolume"],"type":"object"},"truncated":{"description":"`true` when the company has more than 100,000 loan officers in scope and only the first 100,000 (by NMLS ID) were counted. `false` means every figure covers the full population.","type":"boolean"},"window":{"$ref":"#/components/schemas/EmploymentWindow"}},"required":["window","current","arrived","departed","truncated"],"type":"object"},"CompanyEmploymentResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/CompanyEmploymentRow"},"type":"array"},"limit":{"type":"number"},"page":{"type":"number"},"total":{"type":"number"},"totalPages":{"type":"number"},"truncated":{"description":"`true` when the company has more than 100,000 loan officers in scope and only the first 100,000 (by NMLS ID) were counted. `false` means every figure covers the full population.","type":"boolean"},"window":{"$ref":"#/components/schemas/EmploymentWindow"}},"required":["data","total","page","limit","totalPages","window","truncated"],"type":"object"},"CompanyEmploymentRow":{"properties":{"branchLocation":{"$ref":"#/components/schemas/EmploymentBranchLocation"},"city":{"nullable":true,"type":"string"},"companyUnits":{"description":"Loans the loan officer closed while employed here, recorded inside the window. 0 when none.","type":"number"},"companyVolume":{"description":"Dollar volume the loan officer closed WHILE EMPLOYED HERE (employer at time of loan = this company), recorded inside the window. 0 when none.","type":"number"},"contact":{"$ref":"#/components/schemas/EmploymentContact"},"currentCompanyName":{"nullable":true,"type":"string"},"currentCompanyNmlsId":{"nullable":true,"type":"string"},"entered":{"description":"Hired inside the window.","type":"boolean"},"exitDate":{"description":"Complete-departure date; null while still employed.","nullable":true,"type":"string"},"exited":{"description":"Completely departed inside the window.","type":"boolean"},"isActive":{"description":"Holds an open employment record at this company (under `asOf`: a record covering that date).","type":"boolean"},"isBranchManager":{"nullable":true,"type":"boolean"},"name":{"nullable":true,"type":"string"},"nmlsId":{"type":"string"},"previousEmployer":{"description":"The employer whose record ended most recently on or before this loan officer's start here (the same rule `talent-flow` attributes hires by). Both null when none is on file.","properties":{"name":{"nullable":true,"type":"string"},"nmlsId":{"nullable":true,"type":"string"}},"required":["nmlsId","name"],"type":"object"},"startDate":{"description":"For current employees, the start of the earliest OPEN record here (current tenure); otherwise the earliest record relevant to the window.","nullable":true,"type":"string"},"state":{"nullable":true,"type":"string"},"units":{"nullable":true,"type":"number"},"volume":{"description":"The loan officer's production in `period`, across ALL employers (not only this company). Null when they have no production profile.","nullable":true,"type":"number"}},"required":["nmlsId","name","isActive","entered","exited","startDate","exitDate","isBranchManager","branchLocation","currentCompanyNmlsId","currentCompanyName","city","state","volume","units","companyVolume","companyUnits","previousEmployer","contact"],"type":"object"},"CompanyFootprintFilter":{"additionalProperties":false,"properties":{"avgLoanAmount":{"allOf":[{"$ref":"#/components/schemas/FootprintRange"},{"description":"Mean loan size funded by this lender."}]},"dimension":{"description":"Which footprint to address. Only `lender` is available for companies — it is inferred from a `lender` key, so you rarely pass this. Name it to ask the ANY-lender question (`{dimension:'lender', volume:{gte:50000000}}` = 'some single lender they sent $50M to'). A geographic dimension is a 400 naming the per-company markets endpoint, which live-aggregates that answer.","enum":["zip","city","county","state","lender"],"type":"string"},"lender":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}],"description":"Funding lender, as an id from `listLenders` or `instantSearch`. Lender names are stored in a normalized dictionary form, so a typed name does not match — resolve it first. Several values UNION."},"not":{"description":"Invert the whole entry: match companies with NO lender relationship matching it (e.g. 'does not send loans to this lender').","type":"boolean"},"product":{"allOf":[{"$ref":"#/components/schemas/FootprintProductFilter"},{"description":"Correlate a product INSIDE this lender relationship — '$1M of FHA through this lender'."}]},"shareOfVolume":{"allOf":[{"$ref":"#/components/schemas/FootprintRange"},{"description":"This lender's share of the company's total volume for the period, as a 0–100 PERCENT (not a 0–1 fraction). `{gte:50}` = 'at least half their book goes through this lender'."}]},"units":{"allOf":[{"$ref":"#/components/schemas/FootprintRange"},{"description":"Loan count funded by this lender during the selected period."}]},"volume":{"allOf":[{"$ref":"#/components/schemas/FootprintRange"},{"description":"Dollar volume funded BY this lender during the selected period — evaluated inside the lender's own bucket, not against the company's total."}]}},"type":"object"},"CompanyHeadcountResponse":{"properties":{"series":{"description":"Monthly headcount, ending at the last COMPLETE month (the in-progress month always undercounts) and trimmed of trailing months with no movement yet. Counts PEOPLE, not license records: a loan officer licensed in many states counts once, and adding or dropping a state license is not a hire or an exit.","items":{"$ref":"#/components/schemas/HeadcountPoint"},"type":"array"},"summary":{"properties":{"change1y":{"description":"Hires minus exits over the last 365 days.","type":"number"},"change30d":{"description":"Hires minus exits over the last 30 days.","type":"number"},"change90d":{"description":"Hires minus exits over the last 90 days.","type":"number"},"current":{"description":"Loan officers holding an open employment record here today.","type":"number"},"entered":{"description":"Hires in the window. A hire is a loan officer whose earliest employment record at this company still relevant to the window (open, or ended on/after the window start) starts inside it — so someone who fully left and came back inside the window counts, and an existing employee who adds a state license does not.","type":"number"},"exited":{"description":"Exits in the window. An exit is a loan officer whose latest record at this company ended inside the window and who holds NO open record there — a complete departure.","type":"number"},"net":{"type":"number"}},"required":["current","change30d","change90d","change1y","entered","exited","net"],"type":"object"},"truncated":{"description":"`true` when the company has more than 100,000 loan officers in scope and only the first 100,000 (by NMLS ID) were counted. `false` means every figure covers the full population.","type":"boolean"},"window":{"$ref":"#/components/schemas/EmploymentWindow"}},"required":["window","series","summary","truncated"],"type":"object"},"CompanyLicense":{"properties":{"isAuthorized":{"nullable":true,"type":"boolean"},"issueDate":{"nullable":true,"type":"string"},"licenseId":{"nullable":true,"type":"string"},"licenseNumber":{"nullable":true,"type":"string"},"licenseType":{"nullable":true,"type":"string"},"regulator":{"description":"Issuing regulator — \"<State>\" or \"<State> - <Agency>\"; not a clean state code.","nullable":true,"type":"string"},"renewedThrough":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"statusDate":{"nullable":true,"type":"string"}},"required":["licenseId","regulator","licenseNumber","licenseType","issueDate","status","statusDate","isAuthorized","renewedThrough"],"type":"object"},"CompanyLikelyToSell":{"properties":{"address":{"description":"From the company's loan record on the parcel.","type":"string"},"lender":{"description":"Current lender of record: the lender on that loan, which is still the borrower's latest (retained).","nullable":true,"type":"string"},"loanAmount":{"description":"Original amount of that loan.","type":"number"},"loanDate":{"description":"Date of the company's latest loan on the parcel.","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"originatorName":{"type":"string"},"originatorNmlsId":{"description":"The LO who wrote the company's latest loan on the parcel — employed by the company on that loan.","type":"string"},"propensityCategory":{"description":"The score's band label (e.g. `High`).","nullable":true,"type":"string"},"propertyId":{"type":"string"},"salePropensity":{"description":"Likely-to-list score, 0–100: a priority / likelihood ranking (higher = more likely to list soon), not a probability. Every row is 90 or more.","type":"number"},"writtenAt":{"description":"`view=team` only: the previous employer the LO wrote this loan at. Null on a loan written at the company (and on every `view=company` row).","nullable":true,"type":"string"}},"required":["propertyId","address","salePropensity","propensityCategory","originatorNmlsId","originatorName","loanDate","loanAmount","lender"],"type":"object"},"CompanyLikelyToSellResponse":{"properties":{"companyNmlsId":{"type":"string"},"computedAt":{"description":"When the weekly batch checked these borrowers (ISO-8601). Rows are as of this time, not live.","type":"string"},"cursor":{"description":"Cursor for the next page; absent on the last page.","type":"string"},"data":{"items":{"$ref":"#/components/schemas/CompanyLikelyToSell"},"type":"array"},"status":{"description":"`timeout`: the check did not finish in this run, so the previous run's rows and counts are kept (or none, on a first run).","enum":["ok","timeout"],"type":"string"},"total":{"description":"Rows matching the filter, across all pages.","type":"integer"}},"required":["companyNmlsId","computedAt","status","data","total"],"type":"object"},"CompanyLikelyToSellSummary":{"description":"Retained borrowers likely to list their home for sale (likely-to-list score 90+, not listed now), on loans by the company's own LOs: the count and top LOs (rows: `GET /companies/{nmlsId}/retention/likely-to-sell`). Same for every window. Null until the weekly batch has checked this company.","nullable":true,"properties":{"computedAt":{"description":"When the batch checked these borrowers (ISO-8601) — the run that wrote the rows. As of this time, not live.","type":"string"},"parcelsChecked":{"description":"Retained parcels whose latest company loan was written by an LO the company employed on it — the population checked (the same one active listings checks).","type":"integer"},"parcelsScored":{"description":"Of those, parcels with a likely-to-list score on file. A parcel without one is unknown, not unlikely.","type":"integer"},"status":{"description":"`timeout`: the check did not finish in this run, so the previous run's rows and counts are kept (or none, on a first run).","enum":["ok","timeout"],"type":"string"},"team":{"description":"The current-team view's counts; null until the batch has checked it for this company.","nullable":true,"properties":{"roster":{"description":"Current LOs (active sponsorships) checked.","type":"integer"},"status":{"enum":["ok","timeout"],"type":"string"},"total":{"description":"Rows in `view=team`: borrowers likely to list on loans by the company's current LOs, written at the company or at a previous employer.","type":"integer"},"writtenElsewhere":{"description":"Of those, loans the LOs wrote at a previous employer.","type":"integer"}},"required":["status","total","writtenElsewhere","roster"],"type":"object"},"topOriginators":{"description":"Top 10 LOs by borrowers likely to list.","items":{"properties":{"count":{"type":"integer"},"name":{"type":"string"},"nmlsId":{"type":"string"}},"required":["nmlsId","name","count"],"type":"object"},"type":"array"},"total":{"description":"Retained borrowers, on loans written by the company's own LOs, whose home has a likely-to-list score of 90 or more and is not listed for sale or under contract now.","type":"integer"}},"required":["computedAt","status","total","parcelsChecked","parcelsScored","topOriginators"],"type":"object"},"CompanyListRequest":{"additionalProperties":false,"properties":{"advancedFilters":{"$ref":"#/components/schemas/FilterNode"},"crmList":{"$ref":"#/components/schemas/CompanyCrmListFilter"},"excludeBrokerPartners":{"description":"`true`: hide the companies your workspace already partners with — a confidential partner roster your organization supplied to Model Match, attached to the workspace (today: Rocket Pro TPO partners). The roster is never returned; it is applied only as an exclusion. Errors: 400 `partner_set_requires_workspace` when the request has no active workspace, 403 `partner_set_unavailable` when the workspace has no partner roster. `false` or absent: no effect.","type":"boolean"},"filters":{"$ref":"#/components/schemas/FilterNode"},"flatFilters":{"additionalProperties":false,"properties":{"affordableHousingTractCount":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Number of the entity's loans in qualified affordable-housing tracts. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"affordableHousingTractPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Share of the entity's tract-resolved loans in qualified census tracts for affordable-housing programs, 0-100 (`{gte:25}` = 27,209 originators). Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgAsianPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean Asian (non-Hispanic) share of the population in the tracts the entity lent in, 0-100. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgBlackPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean Black (non-Hispanic) share of the population in the tracts the entity lent in, 0-100. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgDenialRate":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean share of mortgage applications denied in the tracts the entity lent in, 0-100. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgFamilyIncome":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean median family income of the tracts the entity lent in, in whole dollars. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgHispanicPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean Hispanic or Latino share of the population in the tracts the entity lent in, 0-100. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgHomeValue":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean median home value across the tracts the entity lent in, in whole dollars. A neighborhood statistic — not the entity's average loan size, which is `avgLoanAmount`. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgHomeownershipRate":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean owner-occupied share of housing units in the tracts the entity lent in, 0-100. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgHouseholdIncome":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean median household income of the tracts the entity lent in, in whole dollars (e.g. `{lte:60000}`). Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgIncomeVsMetroPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean tract income relative to its metro area, where `100` is parity — `{lt:80}` is the CRA low/moderate band, and values legitimately exceed 100 (observed up to 412). NOT a 0-100 share. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgLoanAmount":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Bound the company's mean loan size for the selected period, derived from TOTAL production across ALL markets — NOT scoped to any geographic filter (`city`/`state`/`zip`/`zipCode`/`geoPoint`) in this request. For production INSIDE the geography this request names, read `scopedVolume`/`scopedUnits` on the same row, and sort by them to rank companies by it. There are two ways to get production for a geography: `POST /companies/{nmlsId}/markets` breaks ONE company's production out by market, and `POST /loans/analytics/chart` with `measure: \"volume\"`, `slice: \"loanCompany\"` and a geographic filter answers the reverse — the companies that actually produced in that geography, each with the volume they produced there."}]},"avgLowModHouseholdPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean HUD block-group low/moderate-income HOUSEHOLD share across the tracts the entity lent in, 0-100. A finer-grained measure than `lowModIncomeTractPct`, which counts whole tracts — not a duplicate of it. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgMedianAge":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean median age of the population in the tracts the entity lent in, in years. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgMilesToCollege":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean straight-line distance to the nearest college, in miles. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgMilesToSchool":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean straight-line distance from the properties the entity lent on to the nearest school, in miles. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgMilesToWorship":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean straight-line distance to the nearest place of worship, in miles. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgMinorityPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean non-white share of the population in the tracts the entity lent in, 0-100 (`{gte:50}` = 63,370 originators). `majorityMinorityTractPct` is the per-tract-threshold form of the same question. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgPopulation":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean population of the tracts the entity lent in. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgPovertyRate":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean share of the population below the poverty line in the tracts the entity lent in, 0-100. Pass whole percents — `{gte:0.2}` means 0.2%. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgTractApplications":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean number of mortgage applications reported in the tracts the entity lent in, over the year. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgTractLoanVolume":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean mortgage dollar volume reported in the tracts the entity lent in, over the year. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgTractOriginations":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean number of mortgage originations reported in the tracts the entity lent in, over the year. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgWhiteNonHispanicPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean White (non-Hispanic) share of the population in the tracts the entity lent in, 0-100. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"branchCount":{"$ref":"#/components/schemas/NumericFilterValue"},"city":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Registered business address CITY — where the company is headquartered, NOT where it produced loans. This matches companies whose registered address is in this city; a company headquartered elsewhere is excluded no matter how much it lends here, and a company headquartered here is returned even if it produced nothing here. The row's `volume`/`units`/`avgLoanAmount` remain national totals, so a city filter combined with the default `volume` sort ranks the largest national producers that happen to be headquartered in this city. For production INSIDE the geography this request names, read `scopedVolume`/`scopedUnits` on the same row, and sort by them to rank companies by it. There are two ways to get production for a geography: `POST /companies/{nmlsId}/markets` breaks ONE company's production out by market, and `POST /loans/analytics/chart` with `measure: \"volume\"`, `slice: \"loanCompany\"` and a geographic filter answers the reverse — the companies that actually produced in that geography, each with the volume they produced there."}]},"companyType":{"$ref":"#/components/schemas/CompanyTypeFilterValue"},"county":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Registered business address COUNTY — where the company is headquartered, NOT where it produced loans (same caveats as `state`; under `locationBasis: \"production\"` it selects companies that produced loans in the county instead). Accepts a county name (`Travis`, with a sibling `state` when the name exists in several states), a 5-digit FIPS code (`48453`) or a dictionary county id; an array matches any. The address carries no county of its own, so it matches when the geocoded point of the address lies inside the Census boundary of the county (a company with no geocoded address matches no county). An unrecognized county is a 400. For production INSIDE the geography this request names, read `scopedVolume`/`scopedUnits` on the same row, and sort by them to rank companies by it. There are two ways to get production for a geography: `POST /companies/{nmlsId}/markets` breaks ONE company's production out by market, and `POST /loans/analytics/chart` with `measure: \"volume\"`, `slice: \"loanCompany\"` and a geographic filter answers the reverse — the companies that actually produced in that geography, each with the volume they produced there."}]},"difficultDevelopmentAreaCount":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Number of the entity's loans in HUD-designated difficult development areas. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"difficultDevelopmentAreaPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Share of the entity's tract-resolved loans in HUD-designated difficult development areas, 0-100 (`{gte:25}` = 93,397 originators). Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"distressedTractCount":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Number of the entity's loans in distressed-or-underserved tracts. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"distressedTractPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Share of the entity's tract-resolved loans in distressed-or-underserved nonmetropolitan middle-income tracts, 0-100 (`{gte:25}` = 11,773 originators). Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"floodHazardTractCount":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Number of the entity's loans in a FEMA special flood hazard area. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"floodHazardTractPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Share of the entity's tract-resolved loans in a FEMA special flood hazard area, 0-100 (`{gte:25}` = 5,212 originators). `predominantFloodZone` gives the specific zone code. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"geoPoint":{"allOf":[{"$ref":"#/components/schemas/GeoFilterValue"},{"description":"Radius search around a point, over the company's registered business address — it finds companies HEADQUARTERED within the radius, NOT companies that produced loans there. A company headquartered outside the radius is excluded no matter how much it lends inside it, and one headquartered inside is returned even if it produced nothing there. The row's `volume`/`units`/`avgLoanAmount` remain national totals, so a radius search combined with the default `volume` sort ranks the largest national producers that happen to be headquartered nearby. For production INSIDE the geography this request names, read `scopedVolume`/`scopedUnits` on the same row, and sort by them to rank companies by it. There are two ways to get production for a geography: `POST /companies/{nmlsId}/markets` breaks ONE company's production out by market, and `POST /loans/analytics/chart` with `measure: \"volume\"`, `slice: \"loanCompany\"` and a geographic filter answers the reverse — the companies that actually produced in that geography, each with the volume they produced there."}]},"isBroker":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"`true`: broker shops — non-bank companies that send more of the period's volume to OTHER lenders than they fund themselves. `false`: everyone else. Computed per period from each company's lender mix. Cannot be combined with `mode: \"or\"`."}]},"loCount":{"$ref":"#/components/schemas/NumericFilterValue"},"loanType":{"$ref":"#/components/schemas/OriginatorLoanTypeFilterValue"},"loansWithCommunityData":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"How many of the entity's loans in the selected period resolved to a neighborhood — the DENOMINATOR every Community Lending share is taken over. Pair it with a share filter (`{gte:25}`, 60,399 originators) so a 100% share off two loans does not read as a 100% share off two hundred. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"lowModIncomeTractCount":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Number of the entity's loans that landed in a low- or moderate-income tract, as a count rather than a share. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"lowModIncomeTractPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Share of the entity's tract-resolved loans that landed in a low- or moderate-income tract under the Community Reinvestment Act, 0-100. `{gte:50}` = 'at least half their book is LMI' (36,977 originators, 655 companies, 648 branches). Pass whole percents — `{gte:0.5}` means half of one percent and matches nearly everyone. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"majorityMinorityTractCount":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Number of the entity's loans in majority-minority tracts. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"majorityMinorityTractPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Share of the entity's tract-resolved loans in majority-minority tracts, 0-100 (`{gte:50}` = 65,654 originators). Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"mode":{"enum":["and","or"],"type":"string"},"msa":{"$ref":"#/components/schemas/CompanyMsaFilterValue"},"name":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"deprecated":true,"description":"DEPRECATED — fuzzy name matching is unreliable (name pollution silently returns unrelated companies). Resolve via instantSearch and filter by `nmlsId` (exact NMLS id) instead. Still functional for now."}]},"namePrefix":{"description":"Prefix name search: every word must start a word of the name (\"rock mort\" → Rocket Mortgage). No fuzzy/nickname matching; relevance-ranked unless `sort` is set. Max 100 chars / 6 words (emails, URLs, phones ignored), else 400.","minLength":1,"type":"string"},"nmlsId":{"$ref":"#/components/schemas/TextFilterValue"},"opportunityZoneCount":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Number of the entity's loans in Opportunity Zone tracts. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"opportunityZonePct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Share of the entity's tract-resolved loans in federally designated Opportunity Zone tracts, 0-100 (`{gte:10}` = 33,520 originators — this is a small-share filter, a 50% floor finds almost nobody). Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"predominantFloodZone":{"$ref":"#/components/schemas/EntityPredominantFloodZoneFilterValue"},"predominantIncomeLevel":{"$ref":"#/components/schemas/EntityPredominantIncomeLevelFilterValue"},"producersOnly":{"$ref":"#/components/schemas/BooleanFilterValue"},"region":{"$ref":"#/components/schemas/CompanyRegionFilterValue"},"rosterJoined":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Bound the number of loan officers who joined the company during the selected period — individuals whose sponsorship with the company began inside the window. IMPORTANT — this counts LICENSING EVENTS, not confirmed employer moves. A loan officer holds a separate license record for every state they are sponsored in, and this counts each individual whose sponsorship began or ended inside the window, so a single added or lapsed state license registers as an arrival or a departure even when the person's employment did not change. Measured on large lenders: 13-24% of a 12-month `rosterLeft` are still sponsored by the same employer today, and 33-50% of a 12-month `rosterJoined` were already sponsored by it before the window began. Treat both as directional indicators of movement, not as headcounts. `rosterJoined` and `rosterLeft` are measured from the same source on the same window basis, so unlike the retired `loLoss` — which had no arrivals figure computed the same way — the two can legitimately be combined into a churn rate. Both also grow with the window, so a longer period reports more than a shorter one and the periods are comparable in that direction."}]},"rosterLeft":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Bound the number of loan officers who left the company during the selected period — individuals whose sponsorship with the company ended inside the window. IMPORTANT — this counts LICENSING EVENTS, not confirmed employer moves. A loan officer holds a separate license record for every state they are sponsored in, and this counts each individual whose sponsorship began or ended inside the window, so a single added or lapsed state license registers as an arrival or a departure even when the person's employment did not change. Measured on large lenders: 13-24% of a 12-month `rosterLeft` are still sponsored by the same employer today, and 33-50% of a 12-month `rosterJoined` were already sponsored by it before the window began. Treat both as directional indicators of movement, not as headcounts. `rosterJoined` and `rosterLeft` are measured from the same source on the same window basis, so unlike the retired `loLoss` — which had no arrivals figure computed the same way — the two can legitimately be combined into a churn rate. Both also grow with the window, so a longer period reports more than a shorter one and the periods are comparable in that direction."}]},"ruralGradient":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean remoteness of the tracts the entity lent in, on an ORDINAL 1-10 scale (1 = metropolitan core, 10 = most remote). This is a code, not a percent — `{gte:7}` selects the deepest-rural books (8,886 originators). Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"ruralTractCount":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Number of the entity's loans in rural tracts. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"ruralTractPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Share of the entity's tract-resolved loans in rural tracts, 0-100 (`{gte:50}` = 24,006 originators). `ruralGradient` is the finer, ordinal form. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"state":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Registered business address STATE — where the company is headquartered, NOT where it produced loans. This matches companies whose registered address is in this state; a company headquartered elsewhere is excluded no matter how much it lends here, and a company headquartered here is returned even if it produced nothing here. The row's `volume`/`units`/`avgLoanAmount` remain national totals, so a state filter combined with the default `volume` sort ranks the largest national producers that happen to be headquartered in this state — not the largest producers in it. For production INSIDE the geography this request names, read `scopedVolume`/`scopedUnits` on the same row, and sort by them to rank companies by it. There are two ways to get production for a geography: `POST /companies/{nmlsId}/markets` breaks ONE company's production out by market, and `POST /loans/analytics/chart` with `measure: \"volume\"`, `slice: \"loanCompany\"` and a geographic filter answers the reverse — the companies that actually produced in that geography, each with the volume they produced there."}]},"teamSize":{"$ref":"#/components/schemas/NumericFilterValue"},"transactionType":{"$ref":"#/components/schemas/OriginatorTransactionTypeFilterValue"},"units":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Bound the company's TOTAL loan count for the selected period across ALL markets — the same national total the response `units` returns, NOT scoped to any geographic filter (`city`/`state`/`zip`/`zipCode`/`geoPoint`) in this request, exactly as described on the `volume` filter. For production INSIDE the geography this request names, read `scopedVolume`/`scopedUnits` on the same row, and sort by them to rank companies by it. There are two ways to get production for a geography: `POST /companies/{nmlsId}/markets` breaks ONE company's production out by market, and `POST /loans/analytics/chart` with `measure: \"volume\"`, `slice: \"loanCompany\"` and a geographic filter answers the reverse — the companies that actually produced in that geography, each with the volume they produced there."}]},"usdaEligibleTractCount":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Number of the entity's loans in USDA-eligible tracts. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"usdaEligibleTractPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Share of the entity's tract-resolved loans in tracts eligible for USDA rural housing programs, 0-100 (`{gte:50}` = 90,392 originators). Broader than `ruralTractPct` — eligibility reaches well past what is classified rural. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"volume":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Bound the company's TOTAL dollar production for the selected period across ALL markets — this is the same national total the response `volume` returns, and it is NOT scoped to any geographic filter (`city`/`state`/`zip`/`zipCode`/`geoPoint`) in this request. Combined with one of those filters it means 'national volume at least this large, AND headquartered in that place' — not 'produced this much there'. For production INSIDE the geography this request names, read `scopedVolume`/`scopedUnits` on the same row, and sort by them to rank companies by it. There are two ways to get production for a geography: `POST /companies/{nmlsId}/markets` breaks ONE company's production out by market, and `POST /loans/analytics/chart` with `measure: \"volume\"`, `slice: \"loanCompany\"` and a geographic filter answers the reverse — the companies that actually produced in that geography, each with the volume they produced there."}]},"zip":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Registered business address ZIP code — where the company is headquartered, NOT where it produced loans, with the same caveats as `state` and `city`: a company headquartered elsewhere is excluded however much it lends in this ZIP, and the row's `volume`/`units`/`avgLoanAmount` remain national totals. Canonical key (matches the response DTO); `zipCode` is an alias kept for cross-entity consistency with loans/sales. For production INSIDE the geography this request names, read `scopedVolume`/`scopedUnits` on the same row, and sort by them to rank companies by it. There are two ways to get production for a geography: `POST /companies/{nmlsId}/markets` breaks ONE company's production out by market, and `POST /loans/analytics/chart` with `measure: \"volume\"`, `slice: \"loanCompany\"` and a geographic filter answers the reverse — the companies that actually produced in that geography, each with the volume they produced there."}]},"zipCode":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Alias of `zip`, identical behavior — the registered business address ZIP code, i.e. where the company is headquartered, NOT where it produced loans. The row's `volume`/`units`/`avgLoanAmount` remain national totals. For production INSIDE the geography this request names, read `scopedVolume`/`scopedUnits` on the same row, and sort by them to rank companies by it. There are two ways to get production for a geography: `POST /companies/{nmlsId}/markets` breaks ONE company's production out by market, and `POST /loans/analytics/chart` with `measure: \"volume\"`, `slice: \"loanCompany\"` and a geographic filter answers the reverse — the companies that actually produced in that geography, each with the volume they produced there."}]}},"type":"object"},"footprint":{"anyOf":[{"$ref":"#/components/schemas/CompanyFootprintFilter"},{"items":{"$ref":"#/components/schemas/CompanyFootprintFilter"},"type":"array"}],"description":"Scoped lender filter(s). Each entry names ONE lender relationship and the metric bounds that must hold INSIDE it — `{lender:'<id>', volume:{gte:50000000}}` means '$50M funded by that lender', not '$50M somewhere and one loan with them'. Several entries AND together. Geographic market filters are not available on companies: that rollup is not written for these records, so use `POST /companies/{nmlsId}/markets` (live-aggregated) for a company's geography."},"lenderFilters":{"items":{"$ref":"#/components/schemas/LenderFilterEntry"},"type":"array"},"lenderMatchMode":{"$ref":"#/components/schemas/LenderMatchMode"},"locationBasis":{"description":"What the geographic filters (`city`/`county`/`msa`/`region`/`state`/`zip`/`zipCode`/`geoPoint`) select. `registeredAddress` (the default) matches companies whose REGISTERED BUSINESS ADDRESS is in the place — a company registered elsewhere is excluded no matter how much it lends there. `production` matches companies that PRODUCED loans in the place, whatever address they are registered at, which is usually what a geographic search means. It changes only WHICH companies are returned: every non-geographic filter applies identically either way, `scopedVolume`/`scopedUnits` report in-geography production under both, and `countCompanies` honors this field, so a count and a list built from the same body always describe the same set. Measured on an 8-state Southeast search: under `registeredAddress` the largest actual producer in the region is absent at any depth, because it is registered in Michigan.","enum":["registeredAddress","production"],"type":"string"},"pagination":{"$ref":"#/components/schemas/Pagination"},"period":{"$ref":"#/components/schemas/Period"},"productMix":{"$ref":"#/components/schemas/CompanyProductMixFilter"},"sort":{"items":{"properties":{"field":{"enum":["name","nmlsId","companyType","city","state","zip","volume","units","avgLoanAmount","branchCount","scopedVolume","scopedUnits","teamSize","loCount","rosterJoined","rosterLeft","producersOnly","purchaseShare","refinanceShare"],"type":"string"},"order":{"$ref":"#/components/schemas/SortOrder"}},"required":["field"],"type":"object"},"type":"array"},"transactionMix":{"$ref":"#/components/schemas/CompanyTransactionMixFilter"}},"type":"object"},"CompanyListResponse":{"properties":{"cursor":{"type":"string"},"data":{"items":{"$ref":"#/components/schemas/CompanySummary"},"type":"array"},"locationNormalizations":{"description":"How each location filter value resolved. Present when a `city`/`county`/`state`/`zip` filter was supplied.","items":{"$ref":"#/components/schemas/LocationNormalization"},"type":"array"},"total":{"type":"number"}},"required":["data","total"],"type":"object"},"CompanyLookupRequest":{"additionalProperties":false,"properties":{"activeLoCount":{"additionalProperties":false,"description":"Bound the number of loan officers currently sponsored OR registered with the company (distinct people).","properties":{"gte":{"type":"number"},"lte":{"type":"number"}},"type":"object"},"branchCount":{"additionalProperties":false,"description":"Bound the number of registered branch offices.","properties":{"gte":{"type":"number"},"lte":{"type":"number"}},"type":"object"},"city":{"description":"Registered address city.","type":"string"},"name":{"description":"Company name — all words must match, fuzzily.","maxLength":200,"type":"string"},"nmlsIds":{"description":"Exact NMLS company ids (up to 1000). Every id registered with NMLS is returned, including companies with no production on file.","items":{"type":"string"},"maxItems":1000,"type":"array"},"pagination":{"additionalProperties":false,"description":"`limit` default 100 (max 1000); `offset + limit` may not exceed 10,000.","properties":{"limit":{"maximum":1000,"minimum":1,"type":"integer"},"offset":{"minimum":0,"type":"integer"}},"type":"object"},"regulatorCategory":{"description":"`BANK` (OCC / FDIC, or a Federal Reserve–regulated company whose name contains 'bank'), `CU` (NCUA), `OTHER` (every other company, including every state-licensed non-bank lender). Several values union.","items":{"enum":["BANK","CU","OTHER"],"type":"string"},"type":"array"},"sort":{"description":"Default: name ascending.","items":{"properties":{"field":{"enum":["name","nmlsId","branchCount","activeLoCount","avgTenureMonths"],"type":"string"},"order":{"enum":["asc","desc"],"type":"string"}},"required":["field"],"type":"object"},"type":"array"},"state":{"description":"Registered address state (2-letter code).","type":"string"}},"type":"object"},"CompanyLookupResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/CompanyLookupRow"},"type":"array"},"total":{"type":"number"}},"required":["data","total"],"type":"object"},"CompanyLookupRow":{"properties":{"activeLoCount":{"description":"Distinct loan officers currently sponsored or registered with the company.","nullable":true,"type":"number"},"avgTenureMonths":{"description":"Average months the current loan officers have been at the company, as of the last weekly registry refresh. Null when it has none.","nullable":true,"type":"number"},"branchCount":{"nullable":true,"type":"number"},"businessStructure":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"nmlsId":{"nullable":true,"type":"string"},"primaryFederalRegulator":{"nullable":true,"type":"string"},"registrationStatus":{"nullable":true,"type":"string"},"regulatorCategory":{"enum":["BANK","CU","OTHER",null],"nullable":true,"type":"string"},"state":{"nullable":true,"type":"string"}},"required":["nmlsId","name","city","state","businessStructure","registrationStatus","primaryFederalRegulator","regulatorCategory","branchCount","activeLoCount","avgTenureMonths"],"type":"object"},"CompanyMarketBucket":{"properties":{"avgLoanAmount":{"nullable":true,"type":"number"},"key":{"description":"Join-stable bucket identity — ZIP `\"92683\"`, city `\"orlando|fl\"`, county 5-digit FIPS `\"06037\"`, state `\"CA\"`.","nullable":true,"type":"string"},"name":{"description":"Human label, in the same form the matching `/breakdowns` route publishes: a county reads `Middlesex County (MA)`, a state `MA`, a city `Belmont, MA` (this grain is a city within one state). `key` is the identity; `name` is the only field to display.","nullable":true,"type":"string"},"shareOfBook":{"description":"Share of the entity's whole period volume as pre-stored on the entity record, 0–100. Always null for a company: the pre-aggregated market rollups are not written for companies, so this figure is computed live and has no stored share to report. Use `shareOfScope`, or divide by `totals.volume`.","nullable":true,"type":"number"},"shareOfScope":{"description":"Share of the volume of every market RANKED at this grain, 0–100 — the denominator is the whole footprint the request selected, NOT the page. It therefore sums to 100 only when `limit` covers every bucket; on a shorter page the shortfall is the tail you did not ask for. (Note the scale: 0–100, unlike the Community Lending fractions, which are 0–1.)","nullable":true,"type":"number"},"units":{"nullable":true,"type":"number"},"volume":{"description":"Dollar volume in this market. A ranked top-N figure is a distributed approximation and can understate slightly (measured: 1.2% on one headline market); narrowing the request to this market with `zipCodes` returns the exact figure.","nullable":true,"type":"number"}},"required":["key","name","volume","units","avgLoanAmount","shareOfScope","shareOfBook"],"type":"object"},"CompanyMarketsCommunityLending":{"description":"The Community Lending mix of this footprint: the neighborhood characteristics of where the production landed, as percentages on a 0-100 scale. Null when nothing in scope resolved to a neighborhood — an absent block, never a row of zeroes, because 'no data' and '0%' are different answers. Read `basis` before comparing two responses. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"properties":{"affordableHousingTractPct":{"description":"Share of production, 0-100, in neighborhoods carrying an affordable-housing designation. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"basis":{"description":"Which measurement produced this block, and they are NOT the same number. `entityRollup` is the neighborhood mix of the entity's own production over the whole period — the default. `marketsInScope` is the neighborhood profile of the markets the request selected, weighted by the entity's production in each, and is what any ZIP, date or filter scope returns, because a whole-period rollup cannot be re-cut to a narrower question.","enum":["entityRollup","marketsInScope"],"type":"string"},"coveredProductionPct":{"description":"`marketsInScope` only — what share of the weighted production, 0-100, sits in a market that resolved to neighborhood data. Below 100 means the mix describes part of the footprint, not all of it.","nullable":true,"type":"number"},"difficultDevelopmentAreaPct":{"description":"Share of production, 0-100, in designated difficult development areas. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"distressedTractPct":{"description":"Share of production, 0-100, in distressed or underserved nonmetropolitan middle-income neighborhoods. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"floodHazardTractPct":{"description":"Share of production, 0-100, in neighborhoods inside a special flood hazard area. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"incomeLevelMix":{"description":"`marketsInScope` only — the full relative-income distribution of the neighborhoods, 0-100, summing to about 100. Null on `entityRollup`, which stores the predominant band but no distribution; publishing one derived from a single label would be a histogram nobody measured. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"properties":{"low":{"nullable":true,"type":"number"},"middle":{"nullable":true,"type":"number"},"moderate":{"nullable":true,"type":"number"},"upper":{"nullable":true,"type":"number"}},"required":["low","moderate","middle","upper"],"type":"object"},"loansWithCommunityData":{"description":"`entityRollup` only — how many of the entity's transactions in the period resolved to a neighborhood. This is the denominator every share below is a share OF, so read it first: a 100% share over three transactions is not a footprint.","nullable":true,"type":"number"},"lowModIncomeTractPct":{"description":"Share of production, 0-100, in low- or moderate-income neighborhoods. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"majorityMinorityTractPct":{"description":"Share of production, 0-100, in majority-minority neighborhoods. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"marketsInScope":{"description":"`marketsInScope` only — ZIP markets the mix considered, including any that carried no neighborhood data.","nullable":true,"type":"number"},"marketsWithCommunityData":{"description":"`marketsInScope` only — ZIP markets that resolved to neighborhood data.","nullable":true,"type":"number"},"opportunityZonePct":{"description":"Share of production, 0-100, in designated Opportunity Zones. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"predominantIncomeLevel":{"description":"The most common relative-income classification of the neighborhoods, on the standard four-band scale. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","enum":["low","moderate","middle","upper",null],"nullable":true,"type":"string"},"ruralTractPct":{"description":"Share of production, 0-100, in neighborhoods classified rural. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"usdaEligibleTractPct":{"description":"Share of production, 0-100, in neighborhoods eligible for USDA rural housing programs. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"}},"required":["basis","loansWithCommunityData","marketsWithCommunityData","marketsInScope","coveredProductionPct","predominantIncomeLevel","incomeLevelMix","lowModIncomeTractPct","majorityMinorityTractPct","ruralTractPct","opportunityZonePct","affordableHousingTractPct","distressedTractPct","usdaEligibleTractPct","floodHazardTractPct","difficultDevelopmentAreaPct"],"type":"object"},"CompanyMarketsDateRange":{"description":"Custom window, applied IN ADDITION to `period` (the two intersect). Use it for a window the named periods cannot express.","properties":{"from":{"description":"Inclusive lower bound, `YYYY-MM-DD` (a bare `YYYY` or `YYYY-MM` expands to the start of that period).","example":"2025-01-01","type":"string"},"to":{"description":"Inclusive upper bound, `YYYY-MM-DD` (a bare `YYYY` or `YYYY-MM` expands to the END of that period).","example":"2025-12-31","type":"string"}},"type":"object"},"CompanyMarketsRequest":{"additionalProperties":false,"properties":{"advancedFilters":{"$ref":"#/components/schemas/FilterNode"},"dateRange":{"$ref":"#/components/schemas/CompanyMarketsDateRange"},"filters":{"$ref":"#/components/schemas/FilterNode"},"flatFilters":{"additionalProperties":false,"properties":{"borrowerStatus":{"$ref":"#/components/schemas/LoanBorrowerStatusFilterValue"},"broker":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Broker shop NMLS id (digits only). A broker is a company — resolve a broker name to its NMLS id via instantSearch (or listCompanies)."}]},"buyerEntityType":{"$ref":"#/components/schemas/BooleanFilterValue"},"city":{"$ref":"#/components/schemas/TextFilterValue"},"conforming":{"$ref":"#/components/schemas/BooleanFilterValue"},"county":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"County name (e.g. \"Broward\") or 5-digit FIPS code. Names resolve to FIPS server-side; include a `state` filter to disambiguate."}]},"currentBalance":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Estimated remaining principal balance (~19% populated). Approximate current equity as `homeValue` (AVM) minus this."}]},"employer":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Employer/company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"equity":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Point-in-time equity recorded on the loan (sparse, ~10%). NOT a live current-equity figure. For HELOC/cash-out targeting on up-to-date equity, use properties search (listProperties) instead — its equity is far better populated and current."}]},"excludeBroker":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans brokered by this broker-shop NMLS id (digits only) — the inverse of `broker`."}]},"excludeCity":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this city — the inverse of `city`."}]},"excludeLender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans from this lender ID (\"everyone but X\") — the inverse of `lender`, same id contract (resolve via instantSearch/listLenders). Loans with no lender stay in the results."}]},"excludeLoanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans funded by this company NMLS id (digits only) — the inverse of `loanCompany`."}]},"excludeLoanType":{"$ref":"#/components/schemas/LoanTypeExcludeFilterValue"},"excludeOriginator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans with this originator NMLS id (digits only) — the inverse of `originator`. Common for 'everyone but my own shop' lists."}]},"excludeState":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this state (2-letter code, e.g. \"CA\") — the inverse of `state`. For \"everywhere but this state\" lists."}]},"excludeTransactionType":{"$ref":"#/components/schemas/LoanTransactionTypeExcludeFilterValue"},"excludeZipCode":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this ZIP code — the inverse of `zipCode`."}]},"fips":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exact 5-digit county FIPS code (no name resolution) — the code-only escape hatch alongside `county`."}]},"geoPoint":{"$ref":"#/components/schemas/GeoFilterValue"},"homeValue":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"AVM (automated valuation) at the linked property (~26%, MLS-linked). Pair with `currentBalance` to approximate current equity."}]},"includeUnknownOriginator":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Include loans that have no originator NMLS id. Omitted/false (default): such loans are excluded — the vast majority are pre-2016 public records with no linkable originator. true: include them. Note that the default scopes results to loans with a known originator (~2016+ recordings)."}]},"interestRate":{"$ref":"#/components/schemas/NumericFilterValue"},"lender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender ID — the normalized lender-dictionary key, NOT a fuzzy name match. Resolve a lender via instantSearch (or listLenders) and pass the `id` it returns (e.g. \"mortgage_rocket\" or \"mortgage rocket\"). Underscores and letter case are normalized, so either id surface works. A stored normalized lender name (what the `slice: \"lender\"` chart buckets emit) is also accepted, so a chart bucket key filters directly. A value that is neither returns 400 rather than silently matching nothing — to search by lender NAME, use `lenderName`."}]},"lenderName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender name as recorded on the loan document — fuzzy, all-terms match (e.g. \"Fifth Third\"). The name counterpart to the exact-id `lender` filter; use `lender` when you have a resolved id, and this when you only have a name."}]},"loanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Funding/loan company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"loanType":{"$ref":"#/components/schemas/LoanTypeFilterValue"},"ltvAtOrigination":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Loan-to-value at ORIGINATION (sparse), as a PERCENT on a 0-100 scale (`80` = 80% LTV; values above 100 are real underwater loans). This is not a current LTV — there is no stored current-LTV field on loans."}]},"mode":{"enum":["and","or"],"type":"string"},"mortgageAmount":{"$ref":"#/components/schemas/NumericFilterValue"},"mortgageDate":{"$ref":"#/components/schemas/DateFilterValue"},"originator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Loan originator NMLS id (digits only). To search by name use `originatorName`, or resolve a name to its id via instantSearch."}]},"originatorName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"deprecated":true,"description":"DEPRECATED — fuzzy name matching is unreliable (same originator can return wildly different counts by name string). Resolve the loan officer via instantSearch and filter by `originator` (exact NMLS id) instead. Still functional for now."}]},"propertyId":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Parcel id — returns every loan recorded against one property. Pass the same string this endpoint returns as `mmPropertyId` on a loan row, or the `mmPropertyId` of a property record.\n\nThis is the parcel's FULL recorded loan history, which is deliberately wider than the loans embedded on a property record: that embed is a snapshot of what is still owed (up to five currently-active loans), so paid-off mortgages are absent from it and present here.\n\nMulti-unit caveat: loans carry a unit-blind parcel id, so for one unit of a multi-unit building this selects every unit in the building, not that unit alone."}]},"saleDate":{"$ref":"#/components/schemas/DateFilterValue"},"salePrice":{"$ref":"#/components/schemas/NumericFilterValue"},"state":{"$ref":"#/components/schemas/TextFilterValue"},"transactionType":{"$ref":"#/components/schemas/LoanTransactionTypeFilterValue"},"zip":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Alias of `zipCode` — same ZIP filter, accepted for cross-entity key parity."}]},"zipCode":{"$ref":"#/components/schemas/TextFilterValue"}},"type":"object"},"limit":{"description":"Buckets returned per grain (default 25). The summary is computed BEFORE this slice, so it describes the footprint and not the page.","maximum":200,"minimum":1,"type":"integer"},"period":{"allOf":[{"$ref":"#/components/schemas/Period"},{"description":"Named window over the company's recorded transactions (default `last12Months`)."}]},"zipCodes":{"description":"Narrow the footprint to these ZIP codes. Values are normalized to 5 digits, so a ZIP that lost its leading zero in a spreadsheet (`1001`) still resolves. A value that is not 1–5 digits returns 400 rather than being silently dropped.","example":["92683","92703"],"items":{"type":"string"},"maxItems":200,"type":"array"}},"type":"object"},"CompanyMarketsResponse":{"properties":{"nmlsId":{"type":"string"},"period":{"type":"string"},"rollups":{"properties":{"cities":{"items":{"$ref":"#/components/schemas/CompanyMarketBucket"},"type":"array"},"counties":{"items":{"$ref":"#/components/schemas/CompanyMarketBucket"},"type":"array"},"states":{"items":{"$ref":"#/components/schemas/CompanyMarketBucket"},"type":"array"}},"required":["cities","counties","states"],"type":"object"},"source":{"$ref":"#/components/schemas/CompanyMarketsSource"},"summary":{"$ref":"#/components/schemas/CompanyMarketsSummary"},"totals":{"description":"The whole matched book — every transaction the filters selected, including those that could not be placed in a market. The denominator for `summary.shareOfMatchedVolume`.","properties":{"avgLoanAmount":{"nullable":true,"type":"number"},"excluded":{"description":"Transactions held out of `volume` because their amount is an out-of-range fill rather than a real figure — the second kind of omission this response reports, alongside `summary.unresolved` (production that could not be placed in a market). Compare against `units` to see the share `volume` was computed over: a company whose amounts are mostly unreadable and one that is genuinely small are indistinguishable without it. Absent when the money column is unguarded.","nullable":true,"type":"number"},"units":{"nullable":true,"type":"number"},"volume":{"nullable":true,"type":"number"}},"required":["volume","units","avgLoanAmount"],"type":"object"},"zips":{"items":{"$ref":"#/components/schemas/CompanyMarketBucket"},"type":"array"}},"required":["nmlsId","period","source","summary","zips","rollups","totals"],"type":"object"},"CompanyMarketsSource":{"properties":{"mode":{"description":"Companies are always computed live from the recorded transactions — there is no pre-aggregated market rollup on a company record to read.","enum":["live"],"type":"string"},"reasons":{"description":"Why the live path was selected, in evaluation order (e.g. `coverage-empty`, `zip-scope`, `date-scope`).","items":{"type":"string"},"type":"array"}},"required":["mode","reasons"],"type":"object"},"CompanyMarketsSummary":{"properties":{"avgLoanAmount":{"description":"Units-weighted mean loan size — equal to `volume ÷ units`, NOT the unweighted mean of the per-market averages (which differs by several percent and flips sign with the bucket-size mix).","nullable":true,"type":"number"},"bucketCount":{"type":"number"},"communityLending":{"$ref":"#/components/schemas/CompanyMarketsCommunityLending"},"shareOfBook":{"description":"Always null for a company — see the same field on a bucket.","nullable":true,"type":"number"},"shareOfMatchedVolume":{"description":"What percent of `totals.volume` these ZIP buckets account for, 0–100. Below 100 whenever transactions could not be placed to a ZIP or fall outside the ranked depth — published so a partial sum is never mistaken for a total.","nullable":true,"type":"number"},"units":{"nullable":true,"type":"number"},"unresolved":{"description":"Production the source could not place in a market, held OUT of the blend and reported here rather than ranked alongside real markets.","properties":{"bucketCount":{"type":"number"},"units":{"nullable":true,"type":"number"},"volume":{"nullable":true,"type":"number"}},"required":["bucketCount","volume","units"],"type":"object"},"volume":{"nullable":true,"type":"number"}},"required":["bucketCount","volume","units","avgLoanAmount","shareOfBook","shareOfMatchedVolume","unresolved","communityLending"],"type":"object"},"CompanyMoverProductionResponse":{"properties":{"arrivals":{"description":"Hires in the window. A hire is a loan officer whose earliest employment record at this company still relevant to the window (open, or ended on/after the window start) starts inside it — so someone who fully left and came back inside the window counts, and an existing employee who adds a state license does not.","properties":{"count":{"description":"Loan officers on this side.","type":"number"},"units":{"description":"Loans behind `volume`.","type":"number"},"volume":{"description":"Their combined production across ALL employers, recorded inside the production window.","type":"number"}},"required":["count","volume","units"],"type":"object"},"departures":{"description":"Exits in the window. An exit is a loan officer whose latest record at this company ended inside the window and who holds NO open record there — a complete departure.","properties":{"count":{"description":"Loan officers on this side.","type":"number"},"units":{"description":"Loans behind `volume`.","type":"number"},"volume":{"description":"Their combined production across ALL employers, recorded inside the production window.","type":"number"}},"required":["count","volume","units"],"type":"object"},"productionWindow":{"$ref":"#/components/schemas/EmploymentWindow"},"truncated":{"description":"`true` when the company has more than 100,000 loan officers in scope and only the first 100,000 (by NMLS ID) were counted. `false` means every figure covers the full population.","type":"boolean"},"window":{"$ref":"#/components/schemas/EmploymentWindow"}},"required":["window","productionWindow","arrivals","departures","truncated"],"type":"object"},"CompanyMsaFilterValue":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"maxItems":50,"minItems":1,"type":"array"},{"nullable":true}],"description":"Registered business address METRO AREA (MSA / CBSA) — companies headquartered in ANY county of the metro (the address point inside the boundary of a member county, as for `county`); under `locationBasis: \"production\"`, companies that produced loans in it. 5-digit CBSA code (`12420`) or metro name (`Austin Metro`); an array matches any. Member counties per the OMB July-2023 delineation (Connecticut's pre-2022 counties included; `41860` San Francisco Bay Area is the nine-county Bay Area). Unknown/ambiguous names are a 400 naming candidates."},"CompanyProductMixFilter":{"description":"Loan-product share / volume bands for the selected period, ANDed: `[{product:\"fha\", minShare:30}]` = FHA is at least 30% of the company's period volume; `[{product:\"va\", volume:{gte:5000000}}]` = at least $5M of VA. `products` lets ANY of several types satisfy one entry. Whole-book figures across all markets.","items":{"additionalProperties":false,"properties":{"basis":{"description":"`volume` (default) or `units` (loan count).","enum":["volume","units"],"type":"string"},"maxShare":{"description":"Upper bound, 0–100 percent. No bucket = 0% (passes).","maximum":100,"minimum":0,"type":"number"},"minShare":{"description":"Lower bound, 0–100 percent of the period book.","maximum":100,"minimum":0,"type":"number"},"product":{"description":"The loan product. Send this OR `products`, not both.","enum":["conventional","fha","va","he","heloc","building","commercial","stand_alone_refi","closed_end","reverse","usda","stand_alone_second","aggregate","seller_take_back","sba_participation_trust_deed","balloon","opened_end","assumption","negative_amortization","land_contract","trade","modification","unknown"],"type":"string"},"products":{"description":"Several products, ANY of which may satisfy the bounds on its own (each type's share is read separately, never summed): `{products:[\"fha\",\"va\",\"usda\"], minShare:30}` = FHA, VA or USDA is on its own at least 30% of the book. Send this OR `product`.","items":{"enum":["conventional","fha","va","he","heloc","building","commercial","stand_alone_refi","closed_end","reverse","usda","stand_alone_second","aggregate","seller_take_back","sba_participation_trust_deed","balloon","opened_end","assumption","negative_amortization","land_contract","trade","modification","unknown"],"type":"string"},"maxItems":10,"minItems":1,"type":"array"},"volume":{"additionalProperties":false,"description":"Dollar volume of THIS type in the period, `{gte, lte}` — e.g. `{gte: 5000000}` = at least $5M of FHA. Evaluated inside the same type bucket as the share bounds; a company with no loans of the type does not match.","properties":{"gte":{"minimum":0,"type":"number"},"lte":{"minimum":0,"type":"number"}},"type":"object"}},"type":"object"},"maxItems":10,"minItems":1,"type":"array"},"CompanyRegionFilterValue":{"anyOf":[{"enum":["northeast","northeast-division-1","northeast-division-2","midwest","midwest-division-3","midwest-division-4","south","south-division-5","south-division-6","south-division-7","west","west-division-8","west-division-9"],"type":"string"},{"items":{"enum":["northeast","northeast-division-1","northeast-division-2","midwest","midwest-division-3","midwest-division-4","south","south-division-5","south-division-6","south-division-7","west","west-division-8","west-division-9"],"type":"string"},"maxItems":50,"minItems":1,"type":"array"},{"nullable":true}],"description":"Registered business address CENSUS REGION / DIVISION (`<region>-division-<n>`, Census numbering 1–9) — companies headquartered in ANY state of it; under `locationBasis: \"production\"`, companies that produced loans in it. An array matches any."},"CompanyRegistration":{"nullable":true,"properties":{"activeLoCount":{"nullable":true,"type":"number"},"avgTenureMonths":{"description":"Average months the company's current loan officers have been there (earliest open employment record each), as of the last weekly registry refresh. Divide by 12 for years. Null when it has none.","nullable":true,"type":"number"},"branchCount":{"nullable":true,"type":"number"},"businessStructure":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"dateFormed":{"nullable":true,"type":"string"},"formedIn":{"nullable":true,"type":"string"},"hasAuthorizedLicense":{"description":"At least one of `licenses` is currently authorized. Null when no license rows are on file.","nullable":true,"type":"boolean"},"licensedStates":{"items":{"type":"string"},"nullable":true,"type":"array"},"licenses":{"description":"Every NMLS license / registration row on file for the company, authorized or not.","items":{"$ref":"#/components/schemas/CompanyLicense"},"nullable":true,"type":"array"},"location":{"nullable":true,"properties":{"lat":{"type":"number"},"lon":{"type":"number"}},"required":["lat","lon"],"type":"object"},"postalCode":{"nullable":true,"type":"string"},"primaryFederalRegulator":{"nullable":true,"type":"string"},"registrationStatus":{"nullable":true,"type":"string"},"regulatorCategory":{"description":"`BANK` (OCC / FDIC, or a Federal Reserve–regulated company whose name contains 'bank'), `CU` (NCUA), `OTHER` (every other company).","enum":["BANK","CU","OTHER",null],"nullable":true,"type":"string"},"state":{"nullable":true,"type":"string"},"stockSymbol":{"nullable":true,"type":"string"},"street":{"nullable":true,"type":"string"},"tradeNames":{"items":{"type":"string"},"nullable":true,"type":"array"},"websites":{"items":{"type":"string"},"nullable":true,"type":"array"}},"type":"object"},"CompanyRetentionSnapshot":{"properties":{"activeListings":{"$ref":"#/components/schemas/CompanyActiveListingsSummary"},"book":{"description":"Rows the computation read (sizing / provenance).","properties":{"laterLoans":{"type":"number"},"ownLoans":{"type":"number"},"parcels":{"type":"number"},"sales":{"type":"number"}},"required":["ownLoans","parcels","laterLoans","sales"],"type":"object"},"capturingCompanies":{"description":"Top 10 companies that captured lost borrowers, by volume.","items":{"properties":{"count":{"type":"number"},"lane":{"enum":["own_company","servicer","competitor"],"type":"string"},"name":{"type":"string"},"nmlsId":{"type":"string"},"volume":{"type":"number"}},"required":["nmlsId","name","count","volume","lane"],"type":"object"},"type":"array"},"capturingOriginators":{"description":"Top 10 LOs that captured lost borrowers, by volume.","items":{"properties":{"companyName":{"type":"string"},"count":{"type":"number"},"name":{"type":"string"},"nmlsId":{"type":"string"},"volume":{"type":"number"}},"required":["nmlsId","name","companyName","count","volume"],"type":"object"},"type":"array"},"capturingTotals":{"properties":{"companies":{"properties":{"distinct":{"type":"number"},"loans":{"type":"number"},"volume":{"type":"number"}},"required":["distinct","loans","volume"],"type":"object"},"originators":{"properties":{"distinct":{"type":"number"},"loans":{"type":"number"},"unattributedLoans":{"type":"number"},"volume":{"type":"number"}},"required":["distinct","loans","volume","unattributedLoans"],"type":"object"}},"required":["companies","originators"],"type":"object"},"churnTrend":{"items":{"properties":{"churned":{"type":"number"},"kept":{"type":"number"},"month":{"type":"string"},"retained":{"type":"number"},"secondPositions":{"type":"number"}},"required":["month","churned","retained","secondPositions","kept"],"type":"object"},"type":"array"},"companyName":{"nullable":true,"type":"string"},"companyNmlsId":{"type":"string"},"computedAt":{"description":"When the weekly batch computed this snapshot (ISO-8601).","type":"string"},"lanes":{"description":"Where lost refinances went: the borrower's funding lender (`servicer`) or another company (`competitor`). `own_company` is always 0 at company level (those are kept).","properties":{"competitor":{"properties":{"count":{"type":"number"},"volume":{"type":"number"}},"required":["count","volume"],"type":"object"},"own_company":{"properties":{"count":{"type":"number"},"volume":{"type":"number"}},"required":["count","volume"],"type":"object"},"servicer":{"properties":{"count":{"type":"number"},"volume":{"type":"number"}},"required":["count","volume"],"type":"object"}},"required":["own_company","servicer","competitor"],"type":"object"},"likelyToSell":{"$ref":"#/components/schemas/CompanyLikelyToSellSummary"},"originatorRetention":{"description":"Refinance retention for the company's own loan officers, ranked by borrowers who refinanced at another company (top 10; only LOs with at least 10 refi events in the window).","items":{"properties":{"churnedCount":{"description":"Their borrowers who refinanced at another company.","type":"number"},"churnedVolume":{"type":"number"},"keptCount":{"description":"Their borrowers the company refinanced again (any LO).","type":"number"},"name":{"type":"string"},"nmlsId":{"type":"string"},"refiRetentionRate":{"nullable":true,"type":"number"},"verdict":{"description":"On `refiRetentionRate` (kept ÷ (kept + churned) refi events): `quiet` under 10 events, `holding` ≥ 60%, `leaking` 35–60%, `bleeding` < 35% — the LO tab's thresholds.","enum":["holding","leaking","bleeding","quiet"],"type":"string"}},"required":["nmlsId","name","churnedCount","churnedVolume","keptCount","refiRetentionRate","verdict"],"type":"object"},"type":"array"},"period":{"properties":{"end":{"description":"Last day (UTC, inclusive).","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"start":{"description":"First day (UTC).","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},"required":["start","end"],"type":"object"},"previous":{"description":"The preceding period of equal length (for deltas); null for `allTime`.","nullable":true,"properties":{"period":{"properties":{"end":{"description":"Last day (UTC, inclusive).","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"start":{"description":"First day (UTC).","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},"required":["start","end"],"type":"object"},"summary":{"properties":{"churnRate":{"type":"number"},"churnedCount":{"type":"number"},"daysToRefiPairsUsed":{"type":"number"},"keptRefiCount":{"description":"Same-LO refinances of the LO's own borrowers in the period","type":"number"},"keptRefiVolume":{"type":"number"},"keptSecondCount":{"type":"number"},"medianDaysToRefi":{"nullable":true,"type":"number"},"propertySoldCount":{"type":"number"},"refiRetentionRate":{"description":"kept ÷ (kept + churned) refi events; null with none","nullable":true,"type":"number"},"retainedCount":{"type":"number"},"secondPositionCount":{"type":"number"},"secondPositionVolume":{"type":"number"},"totalBorrowers":{"type":"number"},"unattributedCount":{"type":"number"},"volumeLost":{"type":"number"},"volumeRetained":{"type":"number"}},"required":["totalBorrowers","churnedCount","retainedCount","propertySoldCount","unattributedCount","secondPositionCount","secondPositionVolume","keptRefiCount","keptRefiVolume","keptSecondCount","refiRetentionRate","churnRate","volumeLost","volumeRetained","medianDaysToRefi","daysToRefiPairsUsed"],"type":"object"},"verdict":{"description":"On `refiRetentionRate` (kept ÷ (kept + churned) refi events): `quiet` under 10 events, `holding` ≥ 60%, `leaking` 35–60%, `bleeding` < 35% — the LO tab's thresholds.","enum":["holding","leaking","bleeding","quiet"],"type":"string"}},"required":["period","summary","verdict"],"type":"object"},"schemaVersion":{"type":"integer"},"secondPositionLanes":{"properties":{"competitor":{"properties":{"count":{"type":"number"},"volume":{"type":"number"}},"required":["count","volume"],"type":"object"},"own_company":{"properties":{"count":{"type":"number"},"volume":{"type":"number"}},"required":["count","volume"],"type":"object"},"servicer":{"properties":{"count":{"type":"number"},"volume":{"type":"number"}},"required":["count","volume"],"type":"object"}},"required":["own_company","servicer","competitor"],"type":"object"},"status":{"description":"`truncated`: a loan / sale scan hit its row cap, so counts cover the rows read. `timeout`: the book could not be read within the batch's per-company budget — every count is 0 and means 'not available', not 'none'.","enum":["ok","timeout","truncated"],"type":"string"},"summary":{"description":"Same fields as the LO report. At company level a refinance by ANY LO at the company is kept; only a refinance at another company is churned.","properties":{"churnRate":{"type":"number"},"churnedCount":{"type":"number"},"daysToRefiPairsUsed":{"type":"number"},"keptRefiCount":{"description":"Same-LO refinances of the LO's own borrowers in the period","type":"number"},"keptRefiVolume":{"type":"number"},"keptSecondCount":{"type":"number"},"medianDaysToRefi":{"nullable":true,"type":"number"},"propertySoldCount":{"type":"number"},"refiRetentionRate":{"description":"kept ÷ (kept + churned) refi events; null with none","nullable":true,"type":"number"},"retainedCount":{"type":"number"},"secondPositionCount":{"type":"number"},"secondPositionVolume":{"type":"number"},"totalBorrowers":{"type":"number"},"unattributedCount":{"type":"number"},"volumeLost":{"type":"number"},"volumeRetained":{"type":"number"}},"required":["totalBorrowers","churnedCount","retainedCount","propertySoldCount","unattributedCount","secondPositionCount","secondPositionVolume","keptRefiCount","keptRefiVolume","keptSecondCount","refiRetentionRate","churnRate","volumeLost","volumeRetained","medianDaysToRefi","daysToRefiPairsUsed"],"type":"object"},"timing":{"properties":{"cashOutCount":{"type":"number"},"cashOutShare":{"nullable":true,"type":"number"},"loanTypeChangeCount":{"type":"number"},"medianMonths":{"nullable":true,"type":"number"},"monthsToExit":{"items":{"properties":{"bucket":{"type":"string"},"count":{"type":"number"}},"required":["bucket","count"],"type":"object"},"type":"array"},"rateDeltaMedian":{"nullable":true,"type":"number"},"rateDeltaPairs":{"type":"number"}},"required":["monthsToExit","medianMonths","cashOutCount","cashOutShare","rateDeltaMedian","rateDeltaPairs","loanTypeChangeCount"],"type":"object"},"verdict":{"description":"On `refiRetentionRate` (kept ÷ (kept + churned) refi events): `quiet` under 10 events, `holding` ≥ 60%, `leaking` 35–60%, `bleeding` < 35% — the LO tab's thresholds.","enum":["holding","leaking","bleeding","quiet"],"type":"string"},"window":{"enum":["last12Months","allTime"],"type":"string"}},"required":["schemaVersion","companyNmlsId","companyName","window","period","computedAt","status","summary","verdict","lanes","secondPositionLanes","timing","churnTrend","capturingCompanies","capturingOriginators","capturingTotals","originatorRetention","previous","activeListings","likelyToSell","book"],"type":"object"},"CompanyRoleScope":{"description":"Which of a loan's party roles make it this company's loan. `loanCompany` (default): the company named on the loan document — one company per loan. `all`: the company appears in ANY role — loan-document company, the originating LO's employer at time of loan, the LO's organization, broker, or funding lender; a loan matching several roles counts once. `employer`: the company employed the originating LO when the loan closed. `broker`: the company brokered the loan. `lender`: the company funded the loan. `tpo`: third-party origination — the company is the loan company or lender but did NOT employ the originating LO (the `channel` dimension's `tpo` bucket as a population; `employer` is its `inHouse` counterpart). Use `all` for a broker shop's full production — its loans are often recorded under the funding lender's name, so `loanCompany` undercounts it.","enum":["loanCompany","all","employer","broker","lender","tpo"],"type":"string"},"CompanySegment":{"description":"Dimension to group by. Most are the loan's own field (`loanType`, `transactionType`, `state`, …). `lender` groups on the normalized lender (label = display name, `id` = filter key). `propertyType` is the recorder's land-use code of the collateral (`SFR` single-family, `PUD` planned unit development, `CND` condo, `RES` residential-other, `MFD` multi-family dwelling, `2ND` second home, `MFG` manufactured, `TWN` townhouse, `LAN` land, `COM` commercial, …); loans with no code are not grouped (≈20% of recent loans). `conforming` splits on the conforming-loan-limit flag: `conforming` vs `nonConforming` (above the county conforming limit — i.e. jumbo, not Non-QM), raw `true`/`false` on `id`. Time-series only: `titleCompany` groups on the title company named on the deed, with spellings of one company merged per bucket (`label` = most-used spelling across the response, `id` = normalized name — match on `id`) and \"none available\"-style placeholders excluded. `channel` (companies only) splits the company's loans into `inHouse` — the company employed the originating loan officer — and `tpo` — the company is the loan company or funding lender but did NOT employ the LO (third-party origination). The two never overlap; under `roleScope: \"all\"` they need not sum to the total (broker-only and LO-organization-only matches are in neither). Both buckets are always returned.","enum":["transactionType","loanType","city","county","state","zip","lender","propertyType","conforming","broker","originator","channel","titleCompany"],"type":"string"},"CompanySlice":{"description":"Dimension to group by. Most are the loan's own field (`loanType`, `transactionType`, `state`, …). `lender` groups on the normalized lender (label = display name, `id` = filter key). `propertyType` is the recorder's land-use code of the collateral (`SFR` single-family, `PUD` planned unit development, `CND` condo, `RES` residential-other, `MFD` multi-family dwelling, `2ND` second home, `MFG` manufactured, `TWN` townhouse, `LAN` land, `COM` commercial, …); loans with no code are not grouped (≈20% of recent loans). `conforming` splits on the conforming-loan-limit flag: `conforming` vs `nonConforming` (above the county conforming limit — i.e. jumbo, not Non-QM), raw `true`/`false` on `id`. `channel` (companies only) splits the company's loans into `inHouse` — the company employed the originating loan officer — and `tpo` — the company is the loan company or funding lender but did NOT employ the LO (third-party origination). The two never overlap; under `roleScope: \"all\"` they need not sum to the total (broker-only and LO-organization-only matches are in neither). Both buckets are always returned.","enum":["transactionType","loanType","city","county","state","zip","lender","propertyType","conforming","broker","originator","channel"],"type":"string"},"CompanySponsoredIndividual":{"properties":{"activeLicenseCount":{"nullable":true,"type":"number"},"city":{"nullable":true,"type":"string"},"firstName":{"nullable":true,"type":"string"},"fullName":{"nullable":true,"type":"string"},"hasDisciplinaryAction":{"nullable":true,"type":"boolean"},"id":{"type":"string"},"isActive":{"nullable":true,"type":"boolean"},"isBranchManager":{"nullable":true,"type":"boolean"},"lastName":{"nullable":true,"type":"string"},"licensedStates":{"items":{"type":"string"},"nullable":true,"type":"array"},"nmlsId":{"nullable":true,"type":"string"},"sponsorships":{"nullable":true},"state":{"nullable":true,"type":"string"}},"required":["id"],"type":"object"},"CompanySponsoredIndividualsRequest":{"additionalProperties":false,"properties":{"advancedFilters":{"$ref":"#/components/schemas/FilterNode"},"filters":{"$ref":"#/components/schemas/FilterNode"},"flatFilters":{"additionalProperties":false,"properties":{"borrowerStatus":{"$ref":"#/components/schemas/LoanBorrowerStatusFilterValue"},"broker":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Broker shop NMLS id (digits only). A broker is a company — resolve a broker name to its NMLS id via instantSearch (or listCompanies)."}]},"buyerEntityType":{"$ref":"#/components/schemas/BooleanFilterValue"},"city":{"$ref":"#/components/schemas/TextFilterValue"},"conforming":{"$ref":"#/components/schemas/BooleanFilterValue"},"county":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"County name (e.g. \"Broward\") or 5-digit FIPS code. Names resolve to FIPS server-side; include a `state` filter to disambiguate."}]},"currentBalance":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Estimated remaining principal balance (~19% populated). Approximate current equity as `homeValue` (AVM) minus this."}]},"employer":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Employer/company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"equity":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Point-in-time equity recorded on the loan (sparse, ~10%). NOT a live current-equity figure. For HELOC/cash-out targeting on up-to-date equity, use properties search (listProperties) instead — its equity is far better populated and current."}]},"excludeBroker":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans brokered by this broker-shop NMLS id (digits only) — the inverse of `broker`."}]},"excludeCity":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this city — the inverse of `city`."}]},"excludeLender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans from this lender ID (\"everyone but X\") — the inverse of `lender`, same id contract (resolve via instantSearch/listLenders). Loans with no lender stay in the results."}]},"excludeLoanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans funded by this company NMLS id (digits only) — the inverse of `loanCompany`."}]},"excludeLoanType":{"$ref":"#/components/schemas/LoanTypeExcludeFilterValue"},"excludeOriginator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans with this originator NMLS id (digits only) — the inverse of `originator`. Common for 'everyone but my own shop' lists."}]},"excludeState":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this state (2-letter code, e.g. \"CA\") — the inverse of `state`. For \"everywhere but this state\" lists."}]},"excludeTransactionType":{"$ref":"#/components/schemas/LoanTransactionTypeExcludeFilterValue"},"excludeZipCode":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this ZIP code — the inverse of `zipCode`."}]},"fips":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exact 5-digit county FIPS code (no name resolution) — the code-only escape hatch alongside `county`."}]},"geoPoint":{"$ref":"#/components/schemas/GeoFilterValue"},"homeValue":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"AVM (automated valuation) at the linked property (~26%, MLS-linked). Pair with `currentBalance` to approximate current equity."}]},"includeUnknownOriginator":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Include loans that have no originator NMLS id. Omitted/false (default): such loans are excluded — the vast majority are pre-2016 public records with no linkable originator. true: include them. Note that the default scopes results to loans with a known originator (~2016+ recordings)."}]},"interestRate":{"$ref":"#/components/schemas/NumericFilterValue"},"isActive":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Whether the individual's NMLS registration is currently active. `true` and `false` partition the roster — they sum to the unfiltered total."}]},"lender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender ID — the normalized lender-dictionary key, NOT a fuzzy name match. Resolve a lender via instantSearch (or listLenders) and pass the `id` it returns (e.g. \"mortgage_rocket\" or \"mortgage rocket\"). Underscores and letter case are normalized, so either id surface works. A stored normalized lender name (what the `slice: \"lender\"` chart buckets emit) is also accepted, so a chart bucket key filters directly. A value that is neither returns 400 rather than silently matching nothing — to search by lender NAME, use `lenderName`."}]},"lenderName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender name as recorded on the loan document — fuzzy, all-terms match (e.g. \"Fifth Third\"). The name counterpart to the exact-id `lender` filter; use `lender` when you have a resolved id, and this when you only have a name."}]},"loanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Funding/loan company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"loanType":{"$ref":"#/components/schemas/LoanTypeFilterValue"},"ltvAtOrigination":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Loan-to-value at ORIGINATION (sparse), as a PERCENT on a 0-100 scale (`80` = 80% LTV; values above 100 are real underwater loans). This is not a current LTV — there is no stored current-LTV field on loans."}]},"mode":{"enum":["and","or"],"type":"string"},"mortgageAmount":{"$ref":"#/components/schemas/NumericFilterValue"},"mortgageDate":{"$ref":"#/components/schemas/DateFilterValue"},"name":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Loan officer name. Matches ALL the words supplied, fuzzily, against the individual's full name — so \"John Smith\" does not return every John or every Smith. Scoped to this company's roster."}]},"originator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Loan originator NMLS id (digits only). To search by name use `originatorName`, or resolve a name to its id via instantSearch."}]},"originatorName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"deprecated":true,"description":"DEPRECATED — fuzzy name matching is unreliable (same originator can return wildly different counts by name string). Resolve the loan officer via instantSearch and filter by `originator` (exact NMLS id) instead. Still functional for now."}]},"propertyId":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Parcel id — returns every loan recorded against one property. Pass the same string this endpoint returns as `mmPropertyId` on a loan row, or the `mmPropertyId` of a property record.\n\nThis is the parcel's FULL recorded loan history, which is deliberately wider than the loans embedded on a property record: that embed is a snapshot of what is still owed (up to five currently-active loans), so paid-off mortgages are absent from it and present here.\n\nMulti-unit caveat: loans carry a unit-blind parcel id, so for one unit of a multi-unit building this selects every unit in the building, not that unit alone."}]},"saleDate":{"$ref":"#/components/schemas/DateFilterValue"},"salePrice":{"$ref":"#/components/schemas/NumericFilterValue"},"state":{"$ref":"#/components/schemas/TextFilterValue"},"transactionType":{"$ref":"#/components/schemas/LoanTransactionTypeFilterValue"},"zip":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Alias of `zipCode` — same ZIP filter, accepted for cross-entity key parity."}]},"zipCode":{"$ref":"#/components/schemas/TextFilterValue"}},"type":"object"},"pagination":{"$ref":"#/components/schemas/Pagination"},"period":{"$ref":"#/components/schemas/Period"},"sort":{"description":"Order the roster. `name` sorts by full name. `tenureMonths` and `currentCompanyStartDate` are carried only by individuals CURRENTLY employed by a company (about a third of a typical sponsorship history); everyone else sorts last in both directions. Booleans order `false` before `true` ascending. Location is filterable but not sortable here: about half of all registration records carry no city, state or zip.","items":{"properties":{"field":{"enum":["name","lastName","nmlsId","isActive","hasDisciplinaryAction","isBranchManager","activeLicenseCount","licenseCount","yearsInIndustry","industryStartDate","firstLicensedDate","tenureMonths","currentCompanyStartDate"],"type":"string"},"order":{"$ref":"#/components/schemas/SortOrder"}},"required":["field"],"type":"object"},"type":"array"}},"type":"object"},"CompanySponsoredIndividualsResponse":{"properties":{"cursor":{"type":"string"},"data":{"items":{"$ref":"#/components/schemas/CompanySponsoredIndividual"},"type":"array"},"locationNormalizations":{"description":"How each location filter value resolved. Present when a `city`/`state`/`zip` filter was supplied.","items":{"$ref":"#/components/schemas/LocationNormalization"},"type":"array"},"total":{"type":"number"}},"required":["data","total"],"type":"object"},"CompanySponsorshipMovementRequest":{"properties":{"dateFrom":{"description":"Window start (ISO date, default 12 mo ago)","type":"string"},"dateTo":{"description":"Window end (ISO date, default today)","type":"string"},"direction":{"default":"both","enum":["arrivals","departures","both"],"type":"string"},"size":{"default":25,"description":"Max example individuals per direction (0–500, default 25; a fractional value is rounded down). Affects ONLY the `arrivals`/`departures` row lists — every count and breakdown covers the full population regardless.","maximum":500,"minimum":0,"type":"number"}},"type":"object"},"CompanySponsorshipMovementResponse":{"properties":{"alreadyAtCompany":{"description":"Counted in `summary.arrivals` but NOT a hire: already sponsored by this company before the window and merely added a state license.","type":"number"},"arrivalSources":{"description":"Prior employers of the `fromOtherCompany` group, by distinct individuals, over the FULL population. An attribution, not a partition: an individual who ended sponsorships at two companies inside the window is counted under both, so this may sum above `fromOtherCompany`. Complete unless `arrivalSourcesTruncated` is `true`.","items":{"properties":{"companyName":{"type":"string"},"companyNmlsId":{"nullable":true,"type":"string"},"count":{"type":"number"}},"required":["companyNmlsId","companyName","count"],"type":"object"},"type":"array"},"arrivalSourcesTruncated":{"description":"`true` when more distinct employers matched than `arrivalSources` can hold (1000); the list is then the largest 1000 and no longer accounts for all of `fromOtherCompany`. `false` means the list is complete. The scalar counts are unaffected either way.","type":"boolean"},"arrivals":{"items":{"properties":{"movementKind":{"description":"Which group this arrival falls in — the row-level twin of `fromOtherCompany` / `newToIndustry` / `alreadyAtCompany`. `from_other_company`: moved here from a different employer (named in `previousCompany`). `new_to_industry`: no prior sponsorship at any company. `already_at_company`: already sponsored here before the window and merely added a state license — not a move.","enum":["from_other_company","new_to_industry","already_at_company"],"type":"string"},"name":{"type":"string"},"nmlsId":{"type":"string"},"previousCompany":{"nullable":true,"type":"string"},"previousCompanyNmlsId":{"nullable":true,"type":"string"},"startDate":{"description":"When this individual actually joined — the earliest sponsorship start at this company, not the license row that matched the window.","type":"string"}},"required":["nmlsId","name","startDate","previousCompany","previousCompanyNmlsId","movementKind"],"type":"object"},"type":"array"},"departureDests":{"description":"Onward employers of the `toOtherCompany` group, by distinct individuals, over the FULL population. Same attribution caveat as `arrivalSources`. Complete unless `departureDestsTruncated` is `true`.","items":{"properties":{"companyName":{"type":"string"},"companyNmlsId":{"nullable":true,"type":"string"},"count":{"type":"number"}},"required":["companyNmlsId","companyName","count"],"type":"object"},"type":"array"},"departureDestsTruncated":{"description":"`true` when more distinct employers matched than `departureDests` can hold (1000); the list is then the largest 1000 and no longer accounts for all of `toOtherCompany`. `false` means the list is complete. The scalar counts are unaffected either way.","type":"boolean"},"departures":{"items":{"properties":{"endDate":{"type":"string"},"movementKind":{"description":"Which group this departure falls in — the row-level twin of `toOtherCompany` / `leftIndustry` / `stillAtCompany`. `to_other_company`: moved on to a different employer (named in `nextCompany`). `left_industry`: holds no open sponsorship at any company afterwards. `still_at_company`: still sponsored here; a state license lapsed — not an exit.","enum":["to_other_company","left_industry","still_at_company"],"type":"string"},"name":{"type":"string"},"nextCompany":{"nullable":true,"type":"string"},"nextCompanyNmlsId":{"nullable":true,"type":"string"},"nmlsId":{"type":"string"}},"required":["nmlsId","name","endDate","nextCompany","nextCompanyNmlsId","movementKind"],"type":"object"},"type":"array"},"fromOtherCompany":{"description":"Arrivals who moved from a different employer. `fromOtherCompany + newToIndustry + alreadyAtCompany` equals `summary.arrivals` exactly.","type":"number"},"leftIndustry":{"description":"Departures holding no open sponsorship at any company afterwards.","type":"number"},"newToIndustry":{"description":"Arrivals with no prior sponsorship at any company — genuinely new to the industry.","type":"number"},"stillAtCompany":{"description":"Counted in `summary.departures` but NOT an exit: still holds an open sponsorship with this company; a state license lapsed.","type":"number"},"summary":{"properties":{"arrivals":{"description":"Individuals whose sponsorship with this company began inside the window. Counts LICENSING EVENTS, not confirmed employer moves. A loan officer holds a separate sponsorship record for every state they are licensed in, so an existing team member who adds or lapses one state license registers here even though their employment did not change. The `alreadyAtCompany` / `stillAtCompany` fields report exactly how many of this total that is — subtract them for a move-only figure.","type":"number"},"departures":{"description":"Individuals whose sponsorship with this company ended inside the window. Counts LICENSING EVENTS, not confirmed employer moves. A loan officer holds a separate sponsorship record for every state they are licensed in, so an existing team member who adds or lapses one state license registers here even though their employment did not change. The `alreadyAtCompany` / `stillAtCompany` fields report exactly how many of this total that is — subtract them for a move-only figure.","type":"number"},"netChange":{"type":"number"}},"required":["arrivals","departures","netChange"],"type":"object"},"toOtherCompany":{"description":"Departures who moved to a different employer. `toOtherCompany + leftIndustry + stillAtCompany` equals `summary.departures` exactly.","type":"number"}},"required":["summary","arrivalSources","arrivalSourcesTruncated","departureDests","departureDestsTruncated","fromOtherCompany","toOtherCompany","newToIndustry","leftIndustry","alreadyAtCompany","stillAtCompany","arrivals","departures"],"type":"object"},"CompanySummary":{"properties":{"avgLoanAmount":{"description":"Mean loan size for the selected period, derived from the TOTAL `volume` and `units` across ALL markets — NOT scoped to any geographic filter (`city`/`state`/`zip`/`zipCode`/`geoPoint`) in this request. For production INSIDE the geography this request names, read `scopedVolume`/`scopedUnits` on the same row, and sort by them to rank companies by it. There are two ways to get production for a geography: `POST /companies/{nmlsId}/markets` breaks ONE company's production out by market, and `POST /loans/analytics/chart` with `measure: \"volume\"`, `slice: \"loanCompany\"` and a geographic filter answers the reverse — the companies that actually produced in that geography, each with the volume they produced there.","nullable":true,"type":"number"},"city":{"nullable":true,"type":"string"},"companyType":{"nullable":true,"type":"string"},"id":{"description":"Document ID","type":"string"},"loCount":{"nullable":true,"type":"number"},"name":{"nullable":true,"type":"string"},"nmlsId":{"nullable":true,"type":"string"},"purchaseShare":{"description":"Purchase loans as a 0–100 percent of the company's period loan COUNT — the value `sort: [{field: \"purchaseShare\"}]` orders by. `null` when it made no purchase loans in the period (sorts as 0).","nullable":true,"type":"number"},"refinanceShare":{"description":"Refinance loans as a 0–100 percent of the company's period loan COUNT — the value `sort: [{field: \"refinanceShare\"}]` orders by. `null` when none (sorts as 0).","nullable":true,"type":"number"},"rosterJoined":{"description":"Loan officers who joined the company during the selected period — individuals whose sponsorship with the company began inside the window. IMPORTANT — this counts LICENSING EVENTS, not confirmed employer moves. A loan officer holds a separate license record for every state they are sponsored in, and this counts each individual whose sponsorship began or ended inside the window, so a single added or lapsed state license registers as an arrival or a departure even when the person's employment did not change. Measured on large lenders: 13-24% of a 12-month `rosterLeft` are still sponsored by the same employer today, and 33-50% of a 12-month `rosterJoined` were already sponsored by it before the window began. Treat both as directional indicators of movement, not as headcounts. `rosterJoined` and `rosterLeft` are measured from the same source on the same window basis, so unlike the retired `loLoss` — which had no arrivals figure computed the same way — the two can legitimately be combined into a churn rate. Both also grow with the window, so a longer period reports more than a shorter one and the periods are comparable in that direction.","nullable":true,"type":"number"},"rosterLeft":{"description":"Loan officers who left the company during the selected period — individuals whose sponsorship with the company ended inside the window. IMPORTANT — this counts LICENSING EVENTS, not confirmed employer moves. A loan officer holds a separate license record for every state they are sponsored in, and this counts each individual whose sponsorship began or ended inside the window, so a single added or lapsed state license registers as an arrival or a departure even when the person's employment did not change. Measured on large lenders: 13-24% of a 12-month `rosterLeft` are still sponsored by the same employer today, and 33-50% of a 12-month `rosterJoined` were already sponsored by it before the window began. Treat both as directional indicators of movement, not as headcounts. `rosterJoined` and `rosterLeft` are measured from the same source on the same window basis, so unlike the retired `loLoss` — which had no arrivals figure computed the same way — the two can legitimately be combined into a churn rate. Both also grow with the window, so a longer period reports more than a shorter one and the periods are comparable in that direction.","nullable":true,"type":"number"},"scopedUnits":{"description":"The company's loan count INSIDE the geography this request names, on the same basis as `scopedVolume`. Sortable. When the request names no geography — or names one only inside an `or` group or a negation — the scope is everywhere, and this is identical to the unscoped figure beside it. Reconciles with `POST /companies/{nmlsId}/markets` for the same geography and period: both are computed from the same recorded transactions and neither excludes transactions with no identified loan officer.","nullable":true,"type":"number"},"scopedVolume":{"description":"The company's dollar production INSIDE the geography this request names — what a `city`/`state`/`zip`/`zipCode`/`geoPoint` filter was almost certainly asking for, and what the sibling `volume` is not. Sort by `scopedVolume` to rank companies by it. When the request names no geography — or names one only inside an `or` group or a negation — the scope is everywhere, and this is identical to the unscoped figure beside it. Reconciles with `POST /companies/{nmlsId}/markets` for the same geography and period: both are computed from the same recorded transactions and neither excludes transactions with no identified loan officer.","nullable":true,"type":"number"},"state":{"nullable":true,"type":"string"},"teamSize":{"nullable":true,"type":"number"},"units":{"description":"The company's TOTAL loan count for the selected period across ALL markets — NOT scoped to any geographic filter (`city`/`state`/`zip`/`zipCode`/`geoPoint`) in this request, exactly as described on `volume`. For production INSIDE the geography this request names, read `scopedVolume`/`scopedUnits` on the same row, and sort by them to rank companies by it. There are two ways to get production for a geography: `POST /companies/{nmlsId}/markets` breaks ONE company's production out by market, and `POST /loans/analytics/chart` with `measure: \"volume\"`, `slice: \"loanCompany\"` and a geographic filter answers the reverse — the companies that actually produced in that geography, each with the volume they produced there.","nullable":true,"type":"number"},"volume":{"description":"The company's TOTAL dollar production for the selected period across ALL markets — NOT scoped to any geographic filter (`city`/`state`/`zip`/`zipCode`/`geoPoint`) in this request. Those filters select WHICH companies are returned, by registered business address, and never change WHAT is summed here. Since the list sorts by `volume` descending by default, a geo-filtered search ranks companies by NATIONAL production, so the top row can be many times larger than that company's production inside the filtered area. For production INSIDE the geography this request names, read `scopedVolume`/`scopedUnits` on the same row, and sort by them to rank companies by it. There are two ways to get production for a geography: `POST /companies/{nmlsId}/markets` breaks ONE company's production out by market, and `POST /loans/analytics/chart` with `measure: \"volume\"`, `slice: \"loanCompany\"` and a geographic filter answers the reverse — the companies that actually produced in that geography, each with the volume they produced there.","nullable":true,"type":"number"},"zip":{"nullable":true,"type":"string"}},"required":["id"],"type":"object"},"CompanySummaryRequest":{"additionalProperties":false,"properties":{"advancedFilters":{"$ref":"#/components/schemas/FilterNode"},"filters":{"$ref":"#/components/schemas/FilterNode"},"flatFilters":{"additionalProperties":false,"properties":{"borrowerStatus":{"$ref":"#/components/schemas/LoanBorrowerStatusFilterValue"},"broker":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Broker shop NMLS id (digits only). A broker is a company — resolve a broker name to its NMLS id via instantSearch (or listCompanies)."}]},"buyerEntityType":{"$ref":"#/components/schemas/BooleanFilterValue"},"city":{"$ref":"#/components/schemas/TextFilterValue"},"conforming":{"$ref":"#/components/schemas/BooleanFilterValue"},"county":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"County name (e.g. \"Broward\") or 5-digit FIPS code. Names resolve to FIPS server-side; include a `state` filter to disambiguate."}]},"currentBalance":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Estimated remaining principal balance (~19% populated). Approximate current equity as `homeValue` (AVM) minus this."}]},"employer":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Employer/company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"equity":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Point-in-time equity recorded on the loan (sparse, ~10%). NOT a live current-equity figure. For HELOC/cash-out targeting on up-to-date equity, use properties search (listProperties) instead — its equity is far better populated and current."}]},"excludeBroker":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans brokered by this broker-shop NMLS id (digits only) — the inverse of `broker`."}]},"excludeCity":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this city — the inverse of `city`."}]},"excludeLender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans from this lender ID (\"everyone but X\") — the inverse of `lender`, same id contract (resolve via instantSearch/listLenders). Loans with no lender stay in the results."}]},"excludeLoanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans funded by this company NMLS id (digits only) — the inverse of `loanCompany`."}]},"excludeLoanType":{"$ref":"#/components/schemas/LoanTypeExcludeFilterValue"},"excludeOriginator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans with this originator NMLS id (digits only) — the inverse of `originator`. Common for 'everyone but my own shop' lists."}]},"excludeState":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this state (2-letter code, e.g. \"CA\") — the inverse of `state`. For \"everywhere but this state\" lists."}]},"excludeTransactionType":{"$ref":"#/components/schemas/LoanTransactionTypeExcludeFilterValue"},"excludeZipCode":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this ZIP code — the inverse of `zipCode`."}]},"fips":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exact 5-digit county FIPS code (no name resolution) — the code-only escape hatch alongside `county`."}]},"geoPoint":{"$ref":"#/components/schemas/GeoFilterValue"},"homeValue":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"AVM (automated valuation) at the linked property (~26%, MLS-linked). Pair with `currentBalance` to approximate current equity."}]},"includeUnknownOriginator":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Include loans that have no originator NMLS id. Omitted/false (default): such loans are excluded — the vast majority are pre-2016 public records with no linkable originator. true: include them. Note that the default scopes results to loans with a known originator (~2016+ recordings)."}]},"interestRate":{"$ref":"#/components/schemas/NumericFilterValue"},"lender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender ID — the normalized lender-dictionary key, NOT a fuzzy name match. Resolve a lender via instantSearch (or listLenders) and pass the `id` it returns (e.g. \"mortgage_rocket\" or \"mortgage rocket\"). Underscores and letter case are normalized, so either id surface works. A stored normalized lender name (what the `slice: \"lender\"` chart buckets emit) is also accepted, so a chart bucket key filters directly. A value that is neither returns 400 rather than silently matching nothing — to search by lender NAME, use `lenderName`."}]},"lenderName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender name as recorded on the loan document — fuzzy, all-terms match (e.g. \"Fifth Third\"). The name counterpart to the exact-id `lender` filter; use `lender` when you have a resolved id, and this when you only have a name."}]},"loanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Funding/loan company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"loanType":{"$ref":"#/components/schemas/LoanTypeFilterValue"},"ltvAtOrigination":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Loan-to-value at ORIGINATION (sparse), as a PERCENT on a 0-100 scale (`80` = 80% LTV; values above 100 are real underwater loans). This is not a current LTV — there is no stored current-LTV field on loans."}]},"mode":{"enum":["and","or"],"type":"string"},"mortgageAmount":{"$ref":"#/components/schemas/NumericFilterValue"},"mortgageDate":{"$ref":"#/components/schemas/DateFilterValue"},"originator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Loan originator NMLS id (digits only). To search by name use `originatorName`, or resolve a name to its id via instantSearch."}]},"originatorName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"deprecated":true,"description":"DEPRECATED — fuzzy name matching is unreliable (same originator can return wildly different counts by name string). Resolve the loan officer via instantSearch and filter by `originator` (exact NMLS id) instead. Still functional for now."}]},"propertyId":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Parcel id — returns every loan recorded against one property. Pass the same string this endpoint returns as `mmPropertyId` on a loan row, or the `mmPropertyId` of a property record.\n\nThis is the parcel's FULL recorded loan history, which is deliberately wider than the loans embedded on a property record: that embed is a snapshot of what is still owed (up to five currently-active loans), so paid-off mortgages are absent from it and present here.\n\nMulti-unit caveat: loans carry a unit-blind parcel id, so for one unit of a multi-unit building this selects every unit in the building, not that unit alone."}]},"saleDate":{"$ref":"#/components/schemas/DateFilterValue"},"salePrice":{"$ref":"#/components/schemas/NumericFilterValue"},"state":{"$ref":"#/components/schemas/TextFilterValue"},"transactionType":{"$ref":"#/components/schemas/LoanTransactionTypeFilterValue"},"zip":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Alias of `zipCode` — same ZIP filter, accepted for cross-entity key parity."}]},"zipCode":{"$ref":"#/components/schemas/TextFilterValue"}},"type":"object"},"nmlsId":{"type":"string"},"nmlsIds":{"items":{"type":"string"},"type":"array"},"period":{"$ref":"#/components/schemas/Period"},"roleScope":{"$ref":"#/components/schemas/CompanyRoleScope"}},"type":"object"},"CompanyTalentFlowResponse":{"properties":{"arrivals":{"description":"Where this window's hires came from: each hire's employer whose record ended most recently on or before their start here. A partition — `companies[].count` + `unattributed` = `total`. A hire is a loan officer whose earliest employment record at this company still relevant to the window (open, or ended on/after the window start) starts inside it — so someone who fully left and came back inside the window counts, and an existing employee who adds a state license does not.","properties":{"companies":{"items":{"$ref":"#/components/schemas/TalentFlowCompany"},"type":"array"},"companiesTruncated":{"description":"`true` when more counterparties exist than `limit`; `companies` is then the largest `limit`. `total` and `unattributed` are unaffected.","type":"boolean"},"total":{"type":"number"},"unattributed":{"description":"Hires with no earlier employer on file that ended by their start date — typically new to the industry.","type":"number"},"units":{"description":"Loans behind `volume`.","type":"number"},"volume":{"description":"Every mover on this side's production AT THIS company (employer at time of loan = this company) recorded inside the window — volume gained (arrivals) / lost (departures). Includes unattributed movers.","type":"number"}},"required":["total","unattributed","volume","units","companies","companiesTruncated"],"type":"object"},"boomerangs":{"$ref":"#/components/schemas/TalentFlowBoomerangs"},"departures":{"description":"Where this window's exits went: each exit's earliest employer record starting on or after their departure. A partition, like `arrivals`. An exit is a loan officer whose latest record at this company ended inside the window and who holds NO open record there — a complete departure.","properties":{"companies":{"items":{"$ref":"#/components/schemas/TalentFlowCompany"},"type":"array"},"companiesTruncated":{"description":"`true` when more counterparties exist than `limit`; `companies` is then the largest `limit`. `total` and `unattributed` are unaffected.","type":"boolean"},"total":{"type":"number"},"unattributed":{"description":"Exits with no later employer on file — not re-employed yet, or left the industry.","type":"number"},"units":{"description":"Loans behind `volume`.","type":"number"},"volume":{"description":"Every mover on this side's production AT THIS company (employer at time of loan = this company) recorded inside the window — volume gained (arrivals) / lost (departures). Includes unattributed movers.","type":"number"}},"required":["total","unattributed","volume","units","companies","companiesTruncated"],"type":"object"},"rubberbands":{"$ref":"#/components/schemas/TalentFlowRubberbands"},"truncated":{"description":"`true` when the company has more than 100,000 loan officers in scope and only the first 100,000 (by NMLS ID) were counted. `false` means every figure covers the full population.","type":"boolean"},"window":{"$ref":"#/components/schemas/EmploymentWindow"}},"required":["window","arrivals","departures","boomerangs","rubberbands","truncated"],"type":"object"},"CompanyTimeSeriesRequest":{"additionalProperties":false,"properties":{"advancedFilters":{"$ref":"#/components/schemas/FilterNode"},"filters":{"$ref":"#/components/schemas/FilterNode"},"flatFilters":{"additionalProperties":false,"properties":{"borrowerStatus":{"$ref":"#/components/schemas/LoanBorrowerStatusFilterValue"},"broker":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Broker shop NMLS id (digits only). A broker is a company — resolve a broker name to its NMLS id via instantSearch (or listCompanies)."}]},"buyerEntityType":{"$ref":"#/components/schemas/BooleanFilterValue"},"city":{"$ref":"#/components/schemas/TextFilterValue"},"conforming":{"$ref":"#/components/schemas/BooleanFilterValue"},"county":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"County name (e.g. \"Broward\") or 5-digit FIPS code. Names resolve to FIPS server-side; include a `state` filter to disambiguate."}]},"currentBalance":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Estimated remaining principal balance (~19% populated). Approximate current equity as `homeValue` (AVM) minus this."}]},"employer":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Employer/company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"equity":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Point-in-time equity recorded on the loan (sparse, ~10%). NOT a live current-equity figure. For HELOC/cash-out targeting on up-to-date equity, use properties search (listProperties) instead — its equity is far better populated and current."}]},"excludeBroker":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans brokered by this broker-shop NMLS id (digits only) — the inverse of `broker`."}]},"excludeCity":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this city — the inverse of `city`."}]},"excludeLender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans from this lender ID (\"everyone but X\") — the inverse of `lender`, same id contract (resolve via instantSearch/listLenders). Loans with no lender stay in the results."}]},"excludeLoanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans funded by this company NMLS id (digits only) — the inverse of `loanCompany`."}]},"excludeLoanType":{"$ref":"#/components/schemas/LoanTypeExcludeFilterValue"},"excludeOriginator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans with this originator NMLS id (digits only) — the inverse of `originator`. Common for 'everyone but my own shop' lists."}]},"excludeState":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this state (2-letter code, e.g. \"CA\") — the inverse of `state`. For \"everywhere but this state\" lists."}]},"excludeTransactionType":{"$ref":"#/components/schemas/LoanTransactionTypeExcludeFilterValue"},"excludeZipCode":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this ZIP code — the inverse of `zipCode`."}]},"fips":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exact 5-digit county FIPS code (no name resolution) — the code-only escape hatch alongside `county`."}]},"geoPoint":{"$ref":"#/components/schemas/GeoFilterValue"},"homeValue":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"AVM (automated valuation) at the linked property (~26%, MLS-linked). Pair with `currentBalance` to approximate current equity."}]},"includeUnknownOriginator":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Include loans that have no originator NMLS id. Omitted/false (default): such loans are excluded — the vast majority are pre-2016 public records with no linkable originator. true: include them. Note that the default scopes results to loans with a known originator (~2016+ recordings)."}]},"interestRate":{"$ref":"#/components/schemas/NumericFilterValue"},"lender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender ID — the normalized lender-dictionary key, NOT a fuzzy name match. Resolve a lender via instantSearch (or listLenders) and pass the `id` it returns (e.g. \"mortgage_rocket\" or \"mortgage rocket\"). Underscores and letter case are normalized, so either id surface works. A stored normalized lender name (what the `slice: \"lender\"` chart buckets emit) is also accepted, so a chart bucket key filters directly. A value that is neither returns 400 rather than silently matching nothing — to search by lender NAME, use `lenderName`."}]},"lenderName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender name as recorded on the loan document — fuzzy, all-terms match (e.g. \"Fifth Third\"). The name counterpart to the exact-id `lender` filter; use `lender` when you have a resolved id, and this when you only have a name."}]},"loanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Funding/loan company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"loanType":{"$ref":"#/components/schemas/LoanTypeFilterValue"},"ltvAtOrigination":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Loan-to-value at ORIGINATION (sparse), as a PERCENT on a 0-100 scale (`80` = 80% LTV; values above 100 are real underwater loans). This is not a current LTV — there is no stored current-LTV field on loans."}]},"mode":{"enum":["and","or"],"type":"string"},"mortgageAmount":{"$ref":"#/components/schemas/NumericFilterValue"},"mortgageDate":{"$ref":"#/components/schemas/DateFilterValue"},"originator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Loan originator NMLS id (digits only). To search by name use `originatorName`, or resolve a name to its id via instantSearch."}]},"originatorName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"deprecated":true,"description":"DEPRECATED — fuzzy name matching is unreliable (same originator can return wildly different counts by name string). Resolve the loan officer via instantSearch and filter by `originator` (exact NMLS id) instead. Still functional for now."}]},"propertyId":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Parcel id — returns every loan recorded against one property. Pass the same string this endpoint returns as `mmPropertyId` on a loan row, or the `mmPropertyId` of a property record.\n\nThis is the parcel's FULL recorded loan history, which is deliberately wider than the loans embedded on a property record: that embed is a snapshot of what is still owed (up to five currently-active loans), so paid-off mortgages are absent from it and present here.\n\nMulti-unit caveat: loans carry a unit-blind parcel id, so for one unit of a multi-unit building this selects every unit in the building, not that unit alone."}]},"saleDate":{"$ref":"#/components/schemas/DateFilterValue"},"salePrice":{"$ref":"#/components/schemas/NumericFilterValue"},"state":{"$ref":"#/components/schemas/TextFilterValue"},"transactionType":{"$ref":"#/components/schemas/LoanTransactionTypeFilterValue"},"zip":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Alias of `zipCode` — same ZIP filter, accepted for cross-entity key parity."}]},"zipCode":{"$ref":"#/components/schemas/TextFilterValue"}},"type":"object"},"interval":{"$ref":"#/components/schemas/Interval"},"measure":{"$ref":"#/components/schemas/Measure"},"nmlsId":{"type":"string"},"nmlsIds":{"items":{"type":"string"},"type":"array"},"period":{"$ref":"#/components/schemas/Period"},"roleScope":{"$ref":"#/components/schemas/CompanyRoleScope"},"segment":{"$ref":"#/components/schemas/CompanySegment"}},"type":"object"},"CompanyTransactionMixFilter":{"description":"Transaction-type share bands for the selected period, ANDed: `[{transactionType:\"purchase\", minShare:60}]` = purchases are at least 60% of the company's period volume.","items":{"additionalProperties":false,"properties":{"basis":{"description":"`volume` (default) or `units` (loan count).","enum":["volume","units"],"type":"string"},"maxShare":{"description":"Upper bound, 0–100 percent. No bucket = 0% (passes).","maximum":100,"minimum":0,"type":"number"},"minShare":{"description":"Lower bound, 0–100 percent of the period book.","maximum":100,"minimum":0,"type":"number"},"transactionType":{"enum":["purchase","refinance","construction","equity","UNKNOWN"],"type":"string"},"volume":{"additionalProperties":false,"description":"Dollar volume of THIS type in the period, `{gte, lte}` — e.g. `{gte: 5000000}` = at least $5M of FHA. Evaluated inside the same type bucket as the share bounds; a company with no loans of the type does not match.","properties":{"gte":{"minimum":0,"type":"number"},"lte":{"minimum":0,"type":"number"}},"type":"object"}},"required":["transactionType"],"type":"object"},"maxItems":10,"minItems":1,"type":"array"},"CompanyTypeFilterValue":{"anyOf":[{"description":"One of (case-insensitive): BANK, CU, OTHER","enum":["BANK","CU","OTHER"],"type":"string"},{"description":"Match any of these values","items":{"description":"One of (case-insensitive): BANK, CU, OTHER","enum":["BANK","CU","OTHER"],"type":"string"},"type":"array"},{"description":"Fuzzy text match","properties":{"match":{"type":"string"}},"required":["match"],"type":"object"},{"nullable":true}]},"ContactCardType":{"enum":["lo","agent","cobranded",null],"nullable":true,"type":"string"},"ContactSubmissionAccepted":{"properties":{"data":{"properties":{"id":{"description":"The submission id.","type":"string"}},"required":["id"],"type":"object"}},"required":["data"],"type":"object"},"ContactSubmissionItem":{"oneOf":[{"additionalProperties":false,"properties":{"kind":{"enum":["phone"],"type":"string"},"label":{"enum":["mobile","office","direct"],"type":"string"},"value":{"description":"A US phone number in E.164 form: `+1` followed by exactly 10 digits.","example":"+19497422474","maxLength":16,"type":"string"}},"required":["kind","value"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"enum":["email"],"type":"string"},"label":{"enum":["work","personal"],"type":"string"},"value":{"example":"jane.doe@example.com","maxLength":320,"type":"string"}},"required":["kind","value"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"enum":["profile"],"type":"string"},"value":{"description":"Absolute http(s) URL of the person's profile page, on a public website.","example":"https://linkedin.com/in/jane-doe","maxLength":2048,"type":"string"}},"required":["kind","value"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"enum":["company"],"type":"string"},"value":{"description":"Name of the company the person now works at.","example":"Acme Mortgage","maxLength":640,"type":"string"}},"required":["kind","value"],"type":"object"}]},"CountResponse":{"properties":{"lenderNormalizations":{"description":"How each `lenderName` value resolved against the lender dictionary. Present when a `lenderName` filter was supplied.","items":{"$ref":"#/components/schemas/LenderNormalization"},"type":"array"},"locationNormalizations":{"description":"How each location filter value resolved. Present when a `city`/`county`/`state`/`zip` filter was supplied.","items":{"$ref":"#/components/schemas/LocationNormalization"},"type":"array"},"total":{"description":"Exact count of records matching the filters","example":48213,"minimum":0,"type":"integer"}},"required":["total"],"type":"object"},"CreateAgentContactSubmissionBody":{"additionalProperties":false,"properties":{"entityId":{"description":"The agent's id (a previous id for the same agent is accepted).","example":"mma_123456","maxLength":128,"type":"string"},"items":{"description":"The contact details being submitted, 1 to 10, each value once. At most one `company`.","items":{"$ref":"#/components/schemas/ContactSubmissionItem"},"maxItems":10,"minItems":1,"type":"array"},"note":{"description":"Where the details came from, in the submitter's words (up to 1000 characters). May include a link. Markup and control characters are removed.","example":"Listed on her new company bio page","maxLength":4000,"type":"string"}},"required":["entityId","items"],"type":"object"},"CreateAlertSubscriptionRequest":{"properties":{"expiresAt":{"description":"Stop firing after this instant (ISO 8601).","format":"date-time","type":"string"},"kinds":{"description":"The alert kinds to turn on for this subject (replaces kinds set directly before; kinds granted by a recipe stay). Empty = paused.","items":{"type":"string"},"type":"array"},"rules":{"description":"Rules (required for sale / property / loan subjects; same shape as POST /watched-documents).","items":{"properties":{"match":{"description":"How predicates combine: all (AND, default) or any (OR).","enum":["all","any"],"example":"all","type":"string"},"predicates":{"description":"One or more conditions; combined per match.","items":{"properties":{"field":{"description":"Catalog field alias (e.g. avm, current_ltv, loan_type).","example":"current_ltv","type":"string"},"op":{"description":"Comparison / change / status / guard operator.","enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"example":"lte","type":"string"},"stringValue":{"description":"Target keyword for changed_to / eq / not_eq guard.","type":"string"},"stringValues":{"description":"Keyword set for the in guard (1–20).","items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"description":"Threshold, or change amount (percent for pct_change_gte).","example":0.8,"type":"number"},"value2":{"description":"Upper bound for between.","type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"type":"array"},"subject":{"$ref":"#/components/schemas/AlertSubscriptionSubject"}},"required":["subject","kinds"],"type":"object"},"CreateMonitor":{"anyOf":[{"$ref":"#/components/schemas/CreateTemplateMonitor"},{"$ref":"#/components/schemas/CreateSqlMonitor"}]},"CreateOriginatorContactSubmissionBody":{"additionalProperties":false,"properties":{"entityId":{"description":"The loan officer's NMLS id (digits).","example":"123456","maxLength":128,"type":"string"},"items":{"description":"The contact details being submitted, 1 to 10, each value once. At most one `company`.","items":{"$ref":"#/components/schemas/ContactSubmissionItem"},"maxItems":10,"minItems":1,"type":"array"},"note":{"description":"Where the details came from, in the submitter's words (up to 1000 characters). May include a link. Markup and control characters are removed.","example":"Listed on her new company bio page","maxLength":4000,"type":"string"}},"required":["entityId","items"],"type":"object"},"CreateSavedFilterRequest":{"additionalProperties":false,"properties":{"fidelity":{"description":"How much of the UI state `query` captures: `exact`; `partial` (see `unmapped`); `ui_only` — no runnable query. Defaults from whether `query` is present.","enum":["exact","partial","ui_only"],"type":"string"},"icon":{"$ref":"#/components/schemas/SavedFilterIcon"},"kind":{"description":"`filter` (default) — a saved search; `view` — a saved CRM table layout (columns / order) kept in `uiState`. Views never carry a `query` and have their own 25-per-target quota. Fixed at create.","enum":["filter","view"],"type":"string"},"name":{"maxLength":100,"minLength":1,"type":"string"},"query":{"additionalProperties":{"nullable":true},"description":"The target list operation's request body WITHOUT `pagination` (e.g. `{ flatFilters, filters, sort, period }` for listOriginators). Validated against that operation's schema; unknown filter fields are rejected. Null/omitted for a UI-only filter.","nullable":true,"type":"object"},"target":{"description":"Which list the filter runs against. Market targets run against that entity's list operation (see `operationId`, e.g. listOriginators); `crm_people` / `crm_companies` are UI-only (filtered client-side).","enum":["originators","agents","companies","branches","offices","loans","properties","sales","crm_people","crm_companies"],"type":"string"},"uiState":{"additionalProperties":{"nullable":true},"description":"Opaque client UI state used to restore a filter panel (≤16KB). Not interpreted by the API.","nullable":true,"type":"object"},"uiStateVersion":{"minimum":1,"type":"integer"},"unmapped":{"description":"UI filter keys the client could not express in `query` (set with `fidelity: partial`).","items":{"maxLength":200,"minLength":1,"type":"string"},"maxItems":100,"type":"array"}},"required":["name","target"],"type":"object"},"CreateSavedFilterResult":{"properties":{"data":{"$ref":"#/components/schemas/SavedFilter"}},"required":["data"],"type":"object"},"CreateSqlMonitor":{"additionalProperties":false,"properties":{"description":{"maxLength":500,"type":"string"},"name":{"description":"The job and table name.","maxLength":63,"type":"string"},"notify":{"additionalProperties":false,"properties":{"email":{"type":"boolean"}},"required":["email"],"type":"object"},"rules":{"items":{"additionalProperties":false,"properties":{"column":{"type":"string"},"on":{"description":"`rows_added`: a key new since the previous run. `rows_removed`: a key gone since. `threshold`: `column` `op` `value` holds for a key now and did not before.","enum":["rows_added","rows_removed","threshold"],"type":"string"},"op":{"enum":[">=",">","<=","<"],"type":"string"},"value":{"type":"number"}},"required":["on"],"type":"object"},"maxItems":5,"minItems":1,"type":"array"},"watch":{"additionalProperties":false,"properties":{"keys":{"items":{"minLength":1,"type":"string"},"maxItems":8,"minItems":1,"type":"array"},"schedule":{"enum":["manual","daily","weekly"],"type":"string"},"sql":{"maxLength":20000,"minLength":1,"type":"string"}},"required":["sql","keys","schedule"],"type":"object"}},"required":["watch","name","rules"],"type":"object"},"CreateTemplateMonitor":{"additionalProperties":false,"properties":{"delivery":{"$ref":"#/components/schemas/MonitorDelivery"},"emailTemplate":{"$ref":"#/components/schemas/MonitorEmailTemplate"},"name":{"description":"The table name: lower-case letters, digits and underscores. Default: the template's (`farm_area`), with `_2`, `_3`, … if taken.","maxLength":63,"type":"string"},"notify":{"additionalProperties":false,"properties":{"email":{"type":"boolean"},"inApp":{"type":"boolean"}},"required":["email","inApp"],"type":"object"},"rules":{"additionalProperties":false,"properties":{"areaRules":{"additionalProperties":false,"properties":{"property":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"maxItems":10,"type":"array"}},"type":"object"},"book":{"additionalProperties":false,"properties":{"loan":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"maxItems":10,"type":"array"},"property":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"maxItems":10,"type":"array"}},"type":"object"},"thresholds":{"items":{"additionalProperties":false,"properties":{"column":{"pattern":"^[a-z_][a-z0-9_]{0,62}$","type":"string"},"on":{"enum":["threshold"],"type":"string"},"op":{"enum":[">=",">","<=","<"],"type":"string"},"value":{"type":"number"}},"required":["on","column","op","value"],"type":"object"},"maxItems":5,"type":"array"}},"type":"object"},"watch":{"additionalProperties":false,"properties":{"inputs":{"additionalProperties":{"nullable":true},"type":"object"},"options":{"additionalProperties":false,"properties":{"epoThresholdDays":{"maximum":3650,"minimum":1,"type":"integer"},"kinds":{"items":{"enum":["past_client_listed","early_payoff_risk","past_client_home","past_client_loan","agent_pending","agent_sale_closed","new_listing","refi_area","area_home","sale_changed","property_changed","loan_changed"],"type":"string"},"maxItems":12,"type":"array"},"refiMarginPoints":{"maximum":5,"minimum":0,"type":"number"},"refiRateThreshold":{"maximum":10,"minimum":0,"type":"number"}},"type":"object"},"template":{"example":"farm-area","maxLength":48,"pattern":"^[a-z0-9]+(-[a-z0-9]+)*$","type":"string"}},"required":["template","inputs"],"type":"object"}},"required":["watch"],"type":"object"},"CreateTransactionFlagBody":{"additionalProperties":false,"properties":{"address":{"description":"The property's address as the user saw it.","example":"123 Main St, Austin, TX 78701","maxLength":1000,"type":"string"},"details":{"description":"What is wrong, in the user's words (up to 2000 characters). Markup and control characters are removed.","maxLength":8000,"type":"string"},"eventDate":{"description":"The row's date as shown (ISO date preferred).","example":"2026-04-12","maxLength":80,"type":"string"},"eventId":{"description":"The listing / sale / loan id of the history row being flagged.","example":"loan_abc123","maxLength":256,"minLength":1,"type":"string"},"eventSummary":{"description":"The row's one-line summary as shown.","example":"$450,000 · Conventional · Acme Mortgage","maxLength":1000,"type":"string"},"eventType":{"enum":["listing","sold","mortgage"],"type":"string"},"profile":{"$ref":"#/components/schemas/TransactionFlagProfile"},"reason":{"enum":["wrong-loan-amount","wrong-lo-or-company","wrong-property-details","duplicate","missing-details","missing-transaction","other"],"type":"string"}},"required":["address","eventId","eventType","eventDate","eventSummary","reason"],"type":"object"},"CrmActiveCall":{"nullable":true,"properties":{"entityId":{"type":"string"},"id":{"type":"string"},"organizationId":{"type":"string"},"recordName":{"nullable":true,"type":"string"},"toNumber":{"type":"string"}},"required":["id","organizationId","entityId","toNumber","recordName"],"type":"object"},"CrmActiveCallResult":{"properties":{"data":{"$ref":"#/components/schemas/CrmActiveCall"}},"required":["data"],"type":"object"},"CrmActivityEntry":{"properties":{"actorAgent":{"nullable":true,"type":"string"},"actorChatId":{"nullable":true,"type":"string"},"actorEmail":{"nullable":true,"type":"string"},"actorEngagementId":{"nullable":true,"type":"string"},"actorImage":{"nullable":true,"type":"string"},"actorMode":{"enum":["user","agent","agent_with_user","system",null],"nullable":true,"type":"string"},"actorName":{"nullable":true,"type":"string"},"actorRunId":{"nullable":true,"type":"string"},"actorUserId":{"nullable":true,"type":"string"},"auditRef":{"nullable":true,"type":"string"},"body":{"nullable":true,"type":"string"},"bodyHtml":{"nullable":true,"type":"string"},"createdAt":{"type":"number"},"data":{"nullable":true},"editedAt":{"nullable":true,"type":"number"},"id":{"type":"string"},"kind":{"$ref":"#/components/schemas/CrmActivityKind"},"linkedNotes":{"items":{"$ref":"#/components/schemas/CrmActivityEntry"},"type":"array"},"occurredAt":{"nullable":true,"type":"number"},"parentId":{"nullable":true,"type":"string"},"replies":{"items":{"$ref":"#/components/schemas/CrmActivityEntry"},"type":"array"},"replyCount":{"type":"number"},"subtype":{"type":"string"}},"required":["id","kind","subtype","body","bodyHtml","parentId","actorUserId","actorName","actorEmail","actorImage","createdAt","editedAt","occurredAt"],"type":"object"},"CrmActivityKind":{"enum":["note","system","automated"],"type":"string"},"CrmActivityList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/CrmActivityEntry"},"type":"array"}},"required":["data"],"type":"object"},"CrmActivityReportResult":{"properties":{"data":{"$ref":"#/components/schemas/CrmReportActivity"}},"required":["data"],"type":"object"},"CrmAddContactResult":{"properties":{"data":{"properties":{"id":{"type":"string"}},"required":["id"],"type":"object"}},"required":["data"],"type":"object"},"CrmAddListMemberResult":{"properties":{"data":{"properties":{"added":{"type":"boolean"},"member":{"$ref":"#/components/schemas/CrmListMember"}},"required":["added","member"],"type":"object"}},"required":["data"],"type":"object"},"CrmAddMembersBulkResult":{"properties":{"data":{"properties":{"added":{"type":"number"},"addedEntityIds":{"items":{"type":"string"},"type":"array"},"createdEntityIds":{"items":{"type":"string"},"type":"array"},"enrichJobId":{"type":"string"},"total":{"type":"number"}},"required":["added","total","addedEntityIds","createdEntityIds"],"type":"object"}},"required":["data"],"type":"object"},"CrmAddNoteResult":{"properties":{"data":{"properties":{"id":{"type":"string"},"parentId":{"nullable":true,"type":"string"}},"required":["id","parentId"],"type":"object"}},"required":["data"],"type":"object"},"CrmAddRecordResult":{"properties":{"data":{"properties":{"added":{"type":"boolean"},"member":{"$ref":"#/components/schemas/CrmListMember"}},"required":["added","member"],"type":"object"}},"required":["data"],"type":"object"},"CrmAddRecordsBulkResult":{"properties":{"data":{"properties":{"added":{"type":"number"},"addedEntityIds":{"items":{"type":"string"},"type":"array"},"createdEntityIds":{"items":{"type":"string"},"type":"array"},"enrichJobId":{"type":"string"},"total":{"type":"number"}},"required":["added","total","addedEntityIds","createdEntityIds"],"type":"object"}},"required":["data"],"type":"object"},"CrmApplyListMiUpdatesResult":{"properties":{"data":{"properties":{"applied":{"description":"Fields persisted in total.","type":"number"},"results":{"items":{"properties":{"applied":{"type":"number"},"entityId":{"type":"string"},"error":{"enum":["not_in_list","invalid_phone"],"type":"string"}},"required":["entityId","applied"],"type":"object"},"type":"array"}},"required":["applied","results"],"type":"object"}},"required":["data"],"type":"object"},"CrmApplyMiUpdatesResult":{"properties":{"data":{"properties":{"applied":{"type":"number"}},"required":["applied"],"type":"object"}},"required":["data"],"type":"object"},"CrmApplyTemplateBody":{"properties":{"libraryTemplateId":{"type":"string"},"templateId":{"type":"string"}},"type":"object"},"CrmApplyTemplateResult":{"properties":{"data":{"properties":{"applied":{"items":{"$ref":"#/components/schemas/CrmCustomField"},"type":"array"},"objectTypeMismatch":{"type":"boolean"},"skipped":{"items":{"type":"string"},"type":"array"}},"required":["applied","skipped"],"type":"object"}},"required":["data"],"type":"object"},"CrmCall":{"properties":{"aiActions":{"items":{"$ref":"#/components/schemas/CrmCallAiAction"},"nullable":true,"type":"array"},"aiAnalyzedAt":{"nullable":true,"type":"number"},"aiLabel":{"nullable":true,"type":"string"},"aiSentiment":{"enum":["positive","neutral","negative",null],"nullable":true,"type":"string"},"aiSummary":{"nullable":true,"type":"string"},"answeredBy":{"enum":["human","machine","fax","unknown",null],"nullable":true,"type":"string"},"createdAt":{"type":"number"},"durationSeconds":{"nullable":true,"type":"number"},"endedAt":{"nullable":true,"type":"number"},"endedBy":{"enum":["caller","remote","system",null],"nullable":true,"type":"string"},"entityId":{"type":"string"},"fromNumber":{"type":"string"},"id":{"type":"string"},"organizationId":{"type":"string"},"recordingEnabled":{"type":"boolean"},"recordingSid":{"nullable":true,"type":"string"},"startedAt":{"nullable":true,"type":"number"},"status":{"type":"string"},"toNumber":{"type":"string"},"transcript":{"items":{"$ref":"#/components/schemas/CrmTranscriptSentence"},"nullable":true,"type":"array"},"transcriptSid":{"nullable":true,"type":"string"},"transcriptStatus":{"enum":["pending","processing","completed","failed","absent","voicemail",null],"nullable":true,"type":"string"},"twilioCallSid":{"nullable":true,"type":"string"},"userId":{"type":"string"}},"required":["id","organizationId","entityId","userId","toNumber","fromNumber","twilioCallSid","status","durationSeconds","startedAt","endedAt","endedBy","answeredBy","recordingEnabled","recordingSid","transcriptSid","transcriptStatus","transcript","aiLabel","aiSummary","aiSentiment","aiActions","aiAnalyzedAt","createdAt"],"type":"object"},"CrmCallAiAction":{"properties":{"dueInDays":{"type":"number"},"durationMinutes":{"type":"number"},"startInDays":{"type":"number"},"title":{"type":"string"},"type":{"enum":["task","meeting"],"type":"string"}},"required":["type","title"],"type":"object"},"CrmCallAnalysisResult":{"properties":{"data":{"$ref":"#/components/schemas/CrmCall"}},"required":["data"],"type":"object"},"CrmCallAnalyzeResult":{"properties":{"data":{"$ref":"#/components/schemas/CrmCall"}},"required":["data"],"type":"object"},"CrmCallTranscribeResult":{"properties":{"data":{"$ref":"#/components/schemas/CrmCall"}},"required":["data"],"type":"object"},"CrmCallTranscriptResult":{"properties":{"data":{"$ref":"#/components/schemas/CrmCall"}},"required":["data"],"type":"object"},"CrmCallerId":{"properties":{"createdAt":{"type":"number"},"friendlyName":{"nullable":true,"type":"string"},"id":{"type":"string"},"isDefault":{"type":"boolean"},"phoneNumber":{"type":"string"},"status":{"enum":["pending","verified","failed"],"type":"string"}},"required":["id","phoneNumber","friendlyName","status","isDefault","createdAt"],"type":"object"},"CrmCallerIdActionResult":{"properties":{"data":{"properties":{"callerId":{"allOf":[{"$ref":"#/components/schemas/CrmCallerId"},{"nullable":true}]},"validationCode":{"nullable":true,"type":"string"}},"required":["callerId"],"type":"object"}},"required":["data"],"type":"object"},"CrmCallerIdList":{"properties":{"data":{"properties":{"callerIds":{"items":{"$ref":"#/components/schemas/CrmCallerId"},"type":"array"},"configured":{"type":"boolean"}},"required":["callerIds","configured"],"type":"object"}},"required":["data"],"type":"object"},"CrmContactKind":{"enum":["phone","email","social","address","website","facebook","linkedin","x","zillow","realtor","youtube","instagram"],"type":"string"},"CrmContactMethodsByRecord":{"properties":{"data":{"additionalProperties":{"items":{"$ref":"#/components/schemas/CrmProfileContact"},"type":"array"},"type":"object"}},"required":["data"],"type":"object"},"CrmContactSeed":{"properties":{"isPrimary":{"type":"boolean"},"kind":{"enum":["phone","email","social","address","website","facebook","linkedin","x","zillow","realtor","youtube","instagram"],"type":"string"},"label":{"nullable":true,"type":"string"},"value":{"nullable":true}},"required":["kind"],"type":"object"},"CrmCreateListFieldResult":{"properties":{"data":{"$ref":"#/components/schemas/CrmCustomField"}},"required":["data"],"type":"object"},"CrmCreateObjectFieldResult":{"properties":{"data":{"$ref":"#/components/schemas/CrmCustomField"}},"required":["data"],"type":"object"},"CrmCreateRecordResult":{"properties":{"data":{"properties":{"created":{"type":"boolean"}},"required":["created"],"type":"object"}},"required":["data"],"type":"object"},"CrmCreateTemplateResult":{"properties":{"data":{"$ref":"#/components/schemas/CrmTemplateWithFields"}},"required":["data"],"type":"object"},"CrmCustomField":{"properties":{"config":{"additionalProperties":{"nullable":true},"nullable":true,"type":"object"},"id":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"listId":{"nullable":true,"type":"string"},"objectType":{"$ref":"#/components/schemas/CrmObjectType"},"options":{"items":{"$ref":"#/components/schemas/CrmCustomFieldOption"},"nullable":true,"type":"array"},"scope":{"enum":["object","list"],"type":"string"},"sortOrder":{"type":"number"},"type":{"$ref":"#/components/schemas/CrmCustomFieldType"}},"required":["id","scope","objectType","listId","key","label","type","options","config","sortOrder"],"type":"object"},"CrmCustomFieldList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/CrmCustomField"},"type":"array"}},"required":["data"],"type":"object"},"CrmCustomFieldOption":{"properties":{"color":{"type":"string"},"id":{"type":"string"},"label":{"type":"string"},"outcome":{"description":"Reporting classification (`status` fields only). Absent = in-progress. Seed ids `won`/`lost` classify by convention when absent; `null` explicitly un-classifies them (in-progress).","enum":["won","lost",null],"nullable":true,"type":"string"}},"required":["id","label"],"type":"object"},"CrmCustomFieldType":{"enum":["text","number","currency","date","select","multiselect","url","rating","checkbox","status","tags"],"type":"string"},"CrmCustomValue":{"properties":{"bool":{"nullable":true,"type":"boolean"},"date":{"minimum":0,"nullable":true,"type":"integer"},"multi":{"items":{"type":"string"},"nullable":true,"type":"array"},"num":{"nullable":true,"type":"number"},"text":{"nullable":true,"type":"string"}},"type":"object"},"CrmCustomValueResult":{"properties":{"data":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/CrmCustomValue"},"type":"object"},{"additionalProperties":{"additionalProperties":{"$ref":"#/components/schemas/CrmCustomValue"},"type":"object"},"type":"object"}]}},"required":["data"],"type":"object"},"CrmDeclineMiUpdateResult":{"properties":{"data":{"properties":{"declined":{"items":{"type":"string"},"type":"array"}},"required":["declined"],"type":"object"}},"required":["data"],"type":"object"},"CrmDeleteCallerIdResult":{"properties":{"data":{"properties":{"deleted":{"type":"boolean"}},"required":["deleted"],"type":"object"}},"required":["data"],"type":"object"},"CrmDeleteListFieldResult":{"properties":{"data":{"properties":{"deleted":{"type":"boolean"}},"required":["deleted"],"type":"object"}},"required":["data"],"type":"object"},"CrmDeleteNoteResult":{"properties":{"data":{"properties":{"deleted":{"type":"boolean"}},"required":["deleted"],"type":"object"}},"required":["data"],"type":"object"},"CrmDeleteObjectFieldResult":{"properties":{"data":{"properties":{"deleted":{"type":"boolean"}},"required":["deleted"],"type":"object"}},"required":["data"],"type":"object"},"CrmDeleteRecordResult":{"properties":{"data":{"properties":{"removed":{"type":"boolean"}},"required":["removed"],"type":"object"}},"required":["data"],"type":"object"},"CrmDeleteRecordsResult":{"properties":{"data":{"properties":{"removed":{"items":{"type":"string"},"type":"array"},"skipped":{"items":{"type":"string"},"type":"array"}},"required":["removed","skipped"],"type":"object"}},"required":["data"],"type":"object"},"CrmDeleteTemplateResult":{"properties":{"data":{"properties":{"deleted":{"type":"boolean"}},"required":["deleted"],"type":"object"}},"required":["data"],"type":"object"},"CrmDerivedLocation":{"properties":{"cbsaCode":{"type":"string"},"county":{"type":"string"},"countyFips":{"type":"string"}},"type":"object"},"CrmDescribeOnAddResult":{"properties":{"data":{"properties":{"needsDescriptionEntityIds":{"items":{"type":"string"},"type":"array"}},"required":["needsDescriptionEntityIds"],"type":"object"}},"required":["data"],"type":"object"},"CrmDismissListMiUpdatesResult":{"properties":{"data":{"properties":{"dismissed":{"items":{"type":"string"},"type":"array"},"notInList":{"items":{"type":"string"},"type":"array"}},"required":["dismissed","notInList"],"type":"object"}},"required":["data"],"type":"object"},"CrmDismissMiUpdatesResult":{"properties":{"data":{"properties":{"dismissed":{"type":"boolean"}},"required":["dismissed"],"type":"object"}},"required":["data"],"type":"object"},"CrmDisplay":{"properties":{"branchName":{"type":"string"},"branchNmlsId":{"type":"string"},"cbsaCode":{"type":"string"},"city":{"type":"string"},"companyName":{"type":"string"},"companyNmlsId":{"type":"string"},"contactCheckedAt":{"type":"number"},"county":{"type":"string"},"countyFips":{"type":"string"},"location":{"type":"string"},"name":{"type":"string"},"state":{"type":"string"},"subtitle":{"type":"string"},"units":{"type":"number"},"volume":{"type":"number"},"zip":{"type":"string"}},"required":["name"],"type":"object"},"CrmEditLoggedActivityResult":{"properties":{"data":{"properties":{"updated":{"type":"boolean"}},"required":["updated"],"type":"object"}},"required":["data"],"type":"object"},"CrmEditNoteResult":{"properties":{"data":{"properties":{"entityId":{"nullable":true,"type":"string"},"previousBodyHtml":{"nullable":true,"type":"string"},"updated":{"type":"boolean"}},"required":["updated","entityId","previousBodyHtml"],"type":"object"}},"required":["data"],"type":"object"},"CrmEmailAttachment":{"properties":{"base64":{"type":"string"},"filename":{"type":"string"},"mimeType":{"type":"string"}},"required":["filename","mimeType","base64"],"type":"object"},"CrmEmailRecipient":{"properties":{"email":{"type":"string"},"entityId":{"type":"string"},"isPrimary":{"type":"boolean"},"label":{"nullable":true,"type":"string"},"name":{"type":"string"}},"required":["entityId","name","email","label","isPrimary"],"type":"object"},"CrmEmailRecipientArray":{"properties":{"data":{"items":{"$ref":"#/components/schemas/CrmEmailRecipient"},"type":"array"}},"required":["data"],"type":"object"},"CrmEmailSendBody":{"properties":{"attachments":{"items":{"$ref":"#/components/schemas/CrmEmailAttachment"},"type":"array"},"bcc":{"items":{"type":"string"},"type":"array"},"cc":{"items":{"type":"string"},"type":"array"},"entityId":{"type":"string"},"html":{"type":"string"},"organizationId":{"type":"string"},"provider":{"$ref":"#/components/schemas/CrmMailProvider"},"subject":{"type":"string"},"text":{"type":"string"},"to":{"items":{"type":"string"},"minItems":1,"type":"array"}},"required":["entityId","to","subject","html","text"],"type":"object"},"CrmEmailSendResult":{"properties":{"provider":{"$ref":"#/components/schemas/CrmMailProvider"},"result":{"enum":["sent","needs-connect"],"type":"string"}},"required":["result","provider"],"type":"object"},"CrmEmailUpstreamError":{"properties":{"detail":{"type":"string"},"result":{"enum":["error"],"type":"string"},"status":{"type":"number"}},"required":["result","status","detail"],"type":"object"},"CrmEnrichmentContact":{"properties":{"isPrimary":{"type":"boolean"},"kind":{"$ref":"#/components/schemas/CrmContactKind"},"label":{"nullable":true,"type":"string"},"value":{"nullable":true}},"required":["kind"],"type":"object"},"CrmEnrichmentOverrideSources":{"description":"Origin of each `overrides` value: \"mm\" (ours) or \"imported\" (the customer's). An \"mm\" value the record already renders from the mirror is NOT pinned, so the record keeps tracking. Omit to pin everything.","properties":{"company":{"type":"string"},"companyType":{"type":"string"},"title":{"type":"string"}},"type":"object"},"CrmEnrichmentOverrides":{"properties":{"company":{"type":"string"},"companyType":{"type":"string"},"title":{"type":"string"}},"type":"object"},"CrmEnrichmentResult":{"properties":{"data":{"properties":{"linked":{"type":"boolean"},"seeded":{"type":"number"}},"required":["linked","seeded"],"type":"object"}},"required":["data"],"type":"object"},"CrmEntityType":{"enum":["lo","agent","company","branch"],"type":"string"},"CrmFilterMembersResult":{"properties":{"data":{"properties":{"entityIds":{"items":{"type":"string"},"type":"array"}},"required":["entityIds"],"type":"object"}},"required":["data"],"type":"object"},"CrmGenerateDescriptionResult":{"properties":{"data":{"properties":{"description":{"nullable":true,"type":"string"},"sources":{"description":"Web pages the description was built from (http/https, at most 8). Empty when no description was produced.","items":{"properties":{"href":{"type":"string"},"title":{"type":"string"}},"required":["title","href"],"type":"object"},"type":"array"},"status":{"description":"`cached` = a description was produced; `no_match` = researched but nothing reliably matched this record; `none` = the research run failed and can be retried.","enum":["cached","no_match","none"],"type":"string"}},"required":["description"],"type":"object"}},"required":["data"],"type":"object"},"CrmGrantListAccessResult":{"properties":{"data":{"properties":{"granted":{"type":"boolean"}},"required":["granted"],"type":"object"}},"required":["data"],"type":"object"},"CrmGrantRecordAccessRequestResult":{"properties":{"data":{"properties":{"granted":{"type":"boolean"},"status":{"enum":["granted"],"type":"string"}},"required":["granted","status"],"type":"object"}},"required":["data"],"type":"object"},"CrmGrantRecordAccessResult":{"properties":{"data":{"properties":{"granted":{"type":"boolean"}},"required":["granted"],"type":"object"}},"required":["data"],"type":"object"},"CrmHangupCallResult":{"properties":{"data":{"$ref":"#/components/schemas/CrmCall"}},"required":["data"],"type":"object"},"CrmImportAccepted":{"properties":{"data":{"properties":{"jobId":{"description":"Poll GET /crm/import/{jobId} for progress + per-row errors.","type":"string"}},"required":["jobId"],"type":"object"}},"required":["data"],"type":"object"},"CrmImportCheck":{"properties":{"data":{"properties":{"failed":{"type":"number"},"fileRows":{"nullable":true,"type":"number"},"imported":{"type":"number"},"inCrm":{"type":"number"},"lists":{"items":{"properties":{"deleted":{"type":"boolean"},"imported":{"type":"number"},"inList":{"type":"number"},"listId":{"type":"string"},"name":{"type":"string"},"rows":{"type":"number"}},"required":["listId","name","deleted","rows","imported","inList"],"type":"object"},"type":"array"},"notes":{"properties":{"inFile":{"type":"number"},"onFailedRows":{"type":"number"},"present":{"type":"number"}},"required":["inFile","onFailedRows","present"],"type":"object"},"rows":{"type":"number"}},"required":["fileRows","rows","imported","failed","inCrm","lists","notes"],"type":"object"}},"required":["data"],"type":"object"},"CrmImportErrorCode":{"description":"Failure reason on a failed row; drives friendly client copy. Absent on success.","enum":["MISSING_NAME","RECORD_NOT_FOUND","WRONG_OBJECT_TYPE","NO_ACCESS","UNKNOWN_FIELD","EXTERNAL_ID_CONFLICT","INVALID","INTERNAL"],"type":"string"},"CrmImportJob":{"properties":{"data":{"properties":{"completedAt":{"type":"string"},"error":{"type":"string"},"errorsUrl":{"type":"string"},"failed":{"type":"number"},"jobId":{"type":"string"},"resultsUrl":{"type":"string"},"startedAt":{"type":"string"},"status":{"enum":["queued","running","completed","failed","cancelled"],"type":"string"},"succeeded":{"type":"number"},"total":{"type":"number"}},"required":["jobId","status","total","succeeded","failed"],"type":"object"}},"required":["data"],"type":"object"},"CrmImportPhone":{"properties":{"e164":{"type":"string"},"raw":{"type":"string"}},"required":["raw","e164"],"type":"object"},"CrmImportResult":{"properties":{"data":{"$ref":"#/components/schemas/CrmImportSummary"}},"required":["data"],"type":"object"},"CrmImportRow":{"properties":{"address":{"type":"string"},"city":{"type":"string"},"company":{"description":"Employer override for people rows; ignored on companies imports.","type":"string"},"county":{"type":"string"},"countyFips":{"type":"string"},"customValues":{"additionalProperties":{"$ref":"#/components/schemas/CrmCustomValue"},"type":"object"},"email":{"type":"string"},"emails":{"description":"Additional emails in submitted order (first non-duplicate becomes primary via oldest-wins).","items":{"type":"string"},"maxItems":5,"type":"array"},"entityId":{"description":"Set to update an existing record; omit to create one.","type":"string"},"externalId":{"description":"The record's id in the source system (unique per org + batch externalSource). A known id updates that record; an unknown one is stamped on the created record, so re-running an import never duplicates. A record holds at most one id — a different one fails the row with EXTERNAL_ID_CONFLICT.","maxLength":256,"type":"string"},"facebook":{"type":"string"},"instagram":{"type":"string"},"link":{"allOf":[{"$ref":"#/components/schemas/CrmLink"},{"description":"Match pointer; an MM-sourced link populates the entity mirror."}]},"linkedin":{"type":"string"},"listStatus":{"description":"Status (id or label) within the row's first list; becomes the record's status. Fails the row when it isn't one of that list's.","maxLength":120,"type":"string"},"lists":{"description":"Lists this row's record joins, by name (case/space-insensitive), among the list owner's lists — the batch ownerUserId, else the caller. A name with no match fails the row unless the batch sets createMissingLists.","items":{"maxLength":200,"minLength":1,"type":"string"},"maxItems":20,"type":"array"},"location":{"type":"string"},"name":{"type":"string"},"note":{"description":"Plain-text timeline note appended to the record's activity feed, authored by the importing user. Distinct from `notes` (the Description scalar).","maxLength":2000,"type":"string"},"notes":{"type":"string"},"ownerUserId":{"description":"Working owner (member userId) for this CREATED record; overrides the batch-level ownerUserId. Ignored on update rows (entityId set) — import never reassigns an existing record's owner. Assigning any owner other than the caller requires an org admin.","type":"string"},"phone":{"$ref":"#/components/schemas/CrmImportPhone"},"phones":{"description":"Additional phones in submitted order.","items":{"$ref":"#/components/schemas/CrmImportPhone"},"maxItems":5,"type":"array"},"realtor":{"type":"string"},"rejectReason":{"description":"The client already failed this row (e.g. an undialable phone): it is logged as failed with this reason and never written.","maxLength":500,"minLength":1,"type":"string"},"sourceLine":{"description":"The row's line in the source file; kept in import history so the download points back at the file.","minimum":1,"type":"integer"},"state":{"type":"string"},"status":{"type":"string"},"subtitle":{"type":"string"},"timelineNotes":{"description":"Dated note history (e.g. a legacy notes export), appended as plain notes authored by the record's owner. Keyed: a note the record already has (deleted ones included) is skipped, so re-runs never double it. Distinct from `note`, which is append-only.","items":{"properties":{"body":{"maxLength":10000,"minLength":1,"type":"string"},"key":{"description":"Stable id from the source system; absent ⇒ a hash of date + text.","maxLength":256,"type":"string"},"occurredAt":{"description":"ISO date-time the note was written (the timeline backdates to it); an unreadable date fails the row.","maxLength":64,"type":"string"}},"required":["body"],"type":"object"},"maxItems":200,"type":"array"},"title":{"description":"Role title override for people rows (the record's Title field, column and filter) — distinct from `subtitle`, the display line under the name. Trimmed; blank reads as absent. Overwrites on update rows. Ignored on companies imports.","type":"string"},"website":{"type":"string"},"x":{"type":"string"},"youtube":{"type":"string"},"zillow":{"type":"string"},"zip":{"type":"string"}},"type":"object"},"CrmImportRowResult":{"properties":{"code":{"$ref":"#/components/schemas/CrmImportErrorCode"},"entityId":{"type":"string"},"error":{"type":"string"},"outcome":{"enum":["created","updated","failed"],"type":"string"},"row":{"type":"number"}},"required":["row","outcome"],"type":"object"},"CrmImportRows":{"properties":{"data":{"properties":{"next":{"nullable":true,"type":"number"},"rows":{"items":{"properties":{"code":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string"},"entityId":{"nullable":true,"type":"string"},"error":{"nullable":true,"type":"string"},"externalId":{"nullable":true,"type":"string"},"inCrm":{"type":"boolean"},"inListIds":{"items":{"type":"string"},"type":"array"},"listIds":{"items":{"type":"string"},"type":"array"},"name":{"nullable":true,"type":"string"},"notesInFile":{"type":"number"},"notesPresent":{"type":"number"},"outcome":{"enum":["created","updated","failed"],"type":"string"},"phone":{"nullable":true,"type":"string"},"seq":{"type":"number"},"sourceLine":{"nullable":true,"type":"number"}},"required":["seq","outcome","entityId","name","externalId","email","phone","code","error","sourceLine","listIds","inListIds","inCrm","notesInFile","notesPresent"],"type":"object"},"type":"array"}},"required":["rows","next"],"type":"object"}},"required":["data"],"type":"object"},"CrmImportRun":{"properties":{"data":{"properties":{"canUndo":{"type":"boolean"},"completedAt":{"nullable":true,"type":"string"},"created":{"type":"number"},"createdAt":{"type":"string"},"createdByUserId":{"type":"string"},"externalSource":{"nullable":true,"type":"string"},"failed":{"type":"number"},"fileName":{"nullable":true,"type":"string"},"fileRows":{"nullable":true,"type":"number"},"id":{"type":"string"},"lastUndoAt":{"nullable":true,"type":"string"},"lists":{"items":{"properties":{"created":{"type":"boolean"},"deleted":{"type":"boolean"},"listId":{"type":"string"},"name":{"type":"string"}},"required":["listId","name","created","deleted"],"type":"object"},"type":"array"},"objectType":{"type":"string"},"ownerUserId":{"nullable":true,"type":"string"},"scoped":{"type":"boolean"},"total":{"type":"number"},"undoRemoved":{"nullable":true,"type":"number"},"undoneAt":{"nullable":true,"type":"string"},"undoneByUserId":{"nullable":true,"type":"string"},"updated":{"type":"number"}},"required":["id","createdByUserId","ownerUserId","objectType","externalSource","fileName","fileRows","total","created","updated","failed","lists","createdAt","completedAt","undoneAt","undoneByUserId","undoRemoved","lastUndoAt","scoped","canUndo"],"type":"object"}},"required":["data"],"type":"object"},"CrmImportRuns":{"properties":{"data":{"items":{"properties":{"canUndo":{"type":"boolean"},"completedAt":{"nullable":true,"type":"string"},"created":{"type":"number"},"createdAt":{"type":"string"},"createdByUserId":{"type":"string"},"externalSource":{"nullable":true,"type":"string"},"failed":{"type":"number"},"fileName":{"nullable":true,"type":"string"},"fileRows":{"nullable":true,"type":"number"},"id":{"type":"string"},"lastUndoAt":{"nullable":true,"type":"string"},"lists":{"items":{"properties":{"created":{"type":"boolean"},"deleted":{"type":"boolean"},"listId":{"type":"string"},"name":{"type":"string"}},"required":["listId","name","created","deleted"],"type":"object"},"type":"array"},"objectType":{"type":"string"},"ownerUserId":{"nullable":true,"type":"string"},"scoped":{"type":"boolean"},"total":{"type":"number"},"undoRemoved":{"nullable":true,"type":"number"},"undoneAt":{"nullable":true,"type":"string"},"undoneByUserId":{"nullable":true,"type":"string"},"updated":{"type":"number"}},"required":["id","createdByUserId","ownerUserId","objectType","externalSource","fileName","fileRows","total","created","updated","failed","lists","createdAt","completedAt","undoneAt","undoneByUserId","undoRemoved","lastUndoAt","scoped","canUndo"],"type":"object"},"type":"array"}},"required":["data"],"type":"object"},"CrmImportSummary":{"properties":{"created":{"type":"number"},"dryRun":{"type":"boolean"},"enrichJobId":{"type":"string"},"failed":{"type":"number"},"lists":{"description":"Lists the rows named (row `lists`), and which this batch created.","items":{"properties":{"created":{"type":"boolean"},"listId":{"type":"string"},"name":{"type":"string"}},"required":["name","listId","created"],"type":"object"},"type":"array"},"results":{"items":{"$ref":"#/components/schemas/CrmImportRowResult"},"type":"array"},"total":{"type":"number"},"updated":{"type":"number"}},"required":["total","created","updated","failed","results"],"type":"object"},"CrmImportUndo":{"properties":{"data":{"properties":{"keptChanged":{"type":"number"},"keptNoAccess":{"type":"number"},"listsRemoved":{"items":{"type":"string"},"type":"array"},"removed":{"type":"number"}},"required":["removed","keptChanged","keptNoAccess","listsRemoved"],"type":"object"}},"required":["data"],"type":"object"},"CrmLenderChannels":{"properties":{"data":{"properties":{"byLo":{"additionalProperties":{"properties":{"channel":{"enum":["Bank","Credit Union","Broker","Retail","Unknown"],"type":"string"},"companyName":{"type":"string"},"companyNmlsId":{"type":"string"}},"required":["companyNmlsId","companyName","channel"],"type":"object"},"type":"object"}},"required":["byLo"],"type":"object"}},"required":["data"],"type":"object"},"CrmLink":{"nullable":true,"properties":{"entityId":{"type":"string"},"mmaId":{"type":"string"},"nmlsId":{"type":"string"},"propertyId":{"type":"string"},"source":{"enum":["mm","manual"],"type":"string"}},"required":["source","entityId"],"type":"object"},"CrmLinkRecordResult":{"properties":{"data":{"properties":{"linked":{"type":"boolean"}},"required":["linked"],"type":"object"}},"required":["data"],"type":"object"},"CrmList":{"properties":{"access":{"description":"Per-user editor/viewer grants, oldest first — no org-wide grant, never the owner. Always present on GET /lists (every scope) and GET /lists/{id}; omitted on write results.","items":{"$ref":"#/components/schemas/CrmListAccessGrant"},"type":"array"},"canManage":{"type":"boolean"},"createdAt":{"type":"number"},"defaultView":{"description":"Layout the list opens in for viewers who haven't picked one: the records `table` or a status `kanban` board.","enum":["table","kanban"],"type":"string"},"hasMember":{"type":"boolean"},"id":{"type":"string"},"memberCount":{"type":"number"},"name":{"type":"string"},"objectType":{"$ref":"#/components/schemas/CrmObjectType"},"ownerUserId":{"type":"string"},"sourceTemplate":{"nullable":true,"properties":{"canManage":{"description":"Caller may edit/share it (owner or workspace admin). Always false for library templates.","type":"boolean"},"id":{"type":"string"},"kind":{"enum":["saved","library"],"type":"string"},"name":{"description":"Resolved at read time.","type":"string"}},"required":["id","kind","name","canManage"],"type":"object"},"visibility":{"enum":["private","organization","shared"],"type":"string"}},"required":["id","name","objectType","visibility","memberCount","createdAt","defaultView","ownerUserId","sourceTemplate"],"type":"object"},"CrmListAccessGrant":{"properties":{"permission":{"enum":["editor","viewer"],"type":"string"},"userId":{"type":"string"}},"required":["userId","permission"],"type":"object"},"CrmListActivityEntry":{"properties":{"actorAgent":{"nullable":true,"type":"string"},"actorChatId":{"nullable":true,"type":"string"},"actorEngagementId":{"nullable":true,"type":"string"},"actorMode":{"enum":["user","agent","agent_with_user","system",null],"nullable":true,"type":"string"},"actorRunId":{"nullable":true,"type":"string"},"actorUserId":{"nullable":true,"type":"string"},"auditRef":{"nullable":true,"type":"string"},"createdAt":{"type":"number"},"data":{"nullable":true},"id":{"type":"string"},"listId":{"type":"string"},"subtype":{"type":"string"}},"required":["id","listId","subtype","actorUserId","actorMode","actorAgent","actorRunId","actorChatId","auditRef","actorEngagementId","createdAt"],"type":"object"},"CrmListActivityPage":{"properties":{"data":{"properties":{"entries":{"items":{"$ref":"#/components/schemas/CrmListActivityEntry"},"type":"array"},"nextCursor":{"description":"Pass back as `cursor` for older entries; null at the end.","nullable":true,"type":"string"}},"required":["entries","nextCursor"],"type":"object"}},"required":["data"],"type":"object"},"CrmListArray":{"properties":{"data":{"items":{"$ref":"#/components/schemas/CrmList"},"type":"array"}},"required":["data"],"type":"object"},"CrmListAssignee":{"properties":{"email":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"userId":{"type":"string"}},"required":["userId","name","email","image"],"type":"object"},"CrmListAssigneeList":{"properties":{"data":{"properties":{"assignees":{"items":{"$ref":"#/components/schemas/CrmListAssignee"},"type":"array"}},"required":["assignees"],"type":"object"}},"required":["data"],"type":"object"},"CrmListCreateResult":{"properties":{"data":{"$ref":"#/components/schemas/CrmList"}},"required":["data"],"type":"object"},"CrmListDeleteResult":{"properties":{"data":{"properties":{"ok":{"type":"boolean"}},"required":["ok"],"type":"object"}},"required":["data"],"type":"object"},"CrmListFieldsResult":{"properties":{"data":{"items":{"$ref":"#/components/schemas/CrmCustomField"},"type":"array"}},"required":["data"],"type":"object"},"CrmListMember":{"nullable":true,"properties":{"addedAt":{"type":"number"},"display":{"$ref":"#/components/schemas/CrmDisplay"},"entityId":{"type":"string"},"entityType":{"$ref":"#/components/schemas/CrmEntityType"},"lastActivityAt":{"nullable":true,"type":"number"},"overrides":{"$ref":"#/components/schemas/CrmOverlay"},"ownerUserId":{"nullable":true,"type":"string"}},"required":["entityId","entityType","addedAt","display"],"type":"object"},"CrmListMembershipEntry":{"properties":{"canManage":{"type":"boolean"},"id":{"type":"string"},"name":{"type":"string"},"objectType":{"$ref":"#/components/schemas/CrmObjectType"}},"required":["id","name","objectType","canManage"],"type":"object"},"CrmListMemberships":{"properties":{"memberships":{"additionalProperties":{"items":{"$ref":"#/components/schemas/CrmListMembershipEntry"},"type":"array"},"type":"object"}},"required":["memberships"],"type":"object"},"CrmListMembershipsResult":{"properties":{"data":{"$ref":"#/components/schemas/CrmListMemberships"}},"required":["data"],"type":"object"},"CrmListMiUpdatesResult":{"properties":{"data":{"properties":{"failedEntityIds":{"description":"Members whose check failed transiently; retry them with `getCrmMiUpdates` or a later pass.","items":{"type":"string"},"type":"array"},"fieldSetVersion":{"type":"number"},"nextCursor":{"description":"Pass back as `cursor` for the next page; null once every member has been scanned. A page can return zero `records` and still have a `nextCursor` — keep paging until it is null.","nullable":true,"type":"string"},"records":{"items":{"properties":{"checkedAt":{"description":"Epoch ms of this check.","type":"number"},"entityId":{"type":"string"},"entityType":{"$ref":"#/components/schemas/CrmEntityType"},"inputsChanged":{"description":"The Market-Insights data or the record changed since the previous check (true when the record had never been checked).","type":"boolean"},"name":{"nullable":true,"type":"string"},"status":{"description":"`needs_review`: at least one proposal the user has not reviewed. `snoozed`: every proposal was already reviewed within the check window (only returned with `includeSnoozed: true`).","enum":["needs_review","snoozed"],"type":"string"},"updates":{"items":{"properties":{"action":{"enum":["add","overwrite"],"type":"string"},"current":{"nullable":true,"type":"string"},"field":{"type":"string"},"id":{"type":"string"},"incoming":{"type":"string"},"kind":{"type":"string"},"label":{"type":"string"},"linkage":{"properties":{"companyNmlsId":{"type":"string"},"office":{"$ref":"#/components/schemas/CrmOverrideOffice"}},"type":"object"},"previouslyReviewed":{"description":"True when the user already reviewed (applied around or dismissed) this exact proposal inside the 31-day check window. A record is returned only when at least one of its proposals is new, unless `includeSnoozed` is set.","type":"boolean"},"seenKey":{"type":"string"},"store":{"enum":["override","contact"],"type":"string"}},"required":["id","field","label","store","current","incoming","action","seenKey","previouslyReviewed"],"type":"object"},"type":"array"}},"required":["entityId","entityType","name","status","inputsChanged","updates","checkedAt"],"type":"object"},"type":"array"},"scanned":{"description":"List members evaluated by this page.","type":"number"},"summary":{"description":"Tally over every member this page scanned.","properties":{"failed":{"type":"number"},"needsReview":{"type":"number"},"snoozed":{"type":"number"},"unavailable":{"description":"Members with no Market-Insights data to compare against (manual / unmatched records).","type":"number"},"upToDate":{"type":"number"}},"required":["needsReview","snoozed","upToDate","unavailable","failed"],"type":"object"}},"required":["records","scanned","summary","failedEntityIds","nextCursor","fieldSetVersion"],"type":"object"}},"required":["data"],"type":"object"},"CrmListShare":{"properties":{"createdAt":{"type":"number"},"email":{"nullable":true,"type":"string"},"id":{"type":"string"},"image":{"nullable":true,"type":"string"},"invitedByName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"permission":{"enum":["owner","editor","viewer"],"type":"string"},"userId":{"type":"string"}},"required":["id","userId","name","email","image","permission","invitedByName","createdAt"],"type":"object"},"CrmListSharing":{"nullable":true,"properties":{"canManageSharing":{"type":"boolean"},"orgWidePermission":{"enum":["viewer","editor"],"type":"string"},"owner":{"properties":{"email":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"userId":{"type":"string"}},"required":["userId","name","email","image"],"type":"object"},"ownerUserId":{"type":"string"},"shares":{"items":{"$ref":"#/components/schemas/CrmListShare"},"type":"array"},"visibility":{"enum":["private","organization","shared"],"type":"string"}},"required":["visibility","ownerUserId","owner","canManageSharing","orgWidePermission","shares"],"type":"object"},"CrmListSharingResult":{"properties":{"data":{"$ref":"#/components/schemas/CrmListSharing"}},"required":["data"],"type":"object"},"CrmListUpdateBody":{"properties":{"defaultView":{"enum":["table","kanban"],"type":"string"},"name":{"type":"string"},"orgWidePermission":{"enum":["viewer","editor"],"type":"string"},"visibility":{"enum":["private","organization","shared"],"type":"string"}},"type":"object"},"CrmListUpdateResult":{"properties":{"data":{"allOf":[{"$ref":"#/components/schemas/CrmList"},{"nullable":true}]}},"required":["data"],"type":"object"},"CrmListWithMembers":{"properties":{"data":{"nullable":true,"properties":{"list":{"$ref":"#/components/schemas/CrmList"},"members":{"items":{"$ref":"#/components/schemas/CrmListMember"},"type":"array"}},"required":["list","members"],"type":"object"}},"required":["data"],"type":"object"},"CrmLoLoanMix":{"properties":{"data":{"properties":{"mix":{"items":{"properties":{"percentage":{"type":"number"},"type":{"type":"string"}},"required":["type","percentage"],"type":"object"},"type":"array"},"top":{"nullable":true,"type":"string"}},"required":["mix","top"],"type":"object"}},"required":["data"],"type":"object"},"CrmLoMomentum":{"properties":{"data":{"additionalProperties":{"properties":{"priorUnits":{"type":"number"},"recentUnits":{"type":"number"}},"required":["recentUnits","priorUnits"],"type":"object"},"type":"object"}},"required":["data"],"type":"object"},"CrmLoSponsorLocation":{"properties":{"data":{"additionalProperties":{"properties":{"location":{"type":"string"},"sponsored":{"type":"boolean"}},"required":["sponsored"],"type":"object"},"type":"object"}},"required":["data"],"type":"object"},"CrmLogActivityResult":{"properties":{"data":{"properties":{"id":{"type":"string"}},"required":["id"],"type":"object"}},"required":["data"],"type":"object"},"CrmLoggedActivityType":{"enum":["call","meeting","email","task"],"type":"string"},"CrmMailProvider":{"enum":["google","microsoft",null],"nullable":true,"type":"string"},"CrmManualRecordResult":{"properties":{"data":{"properties":{"added":{"type":"boolean"},"entityId":{"type":"string"}},"required":["entityId","added"],"type":"object"}},"required":["data"],"type":"object"},"CrmMatchCandidate":{"properties":{"company":{"type":"string"},"location":{"type":"string"},"mmaId":{"type":"string"},"name":{"type":"string"},"nmlsId":{"type":"string"},"units":{"type":"number"},"volume":{"type":"number"}},"required":["name"],"type":"object"},"CrmMatchCandidates":{"properties":{"data":{"items":{"$ref":"#/components/schemas/CrmMatchCandidate"},"type":"array"}},"required":["data"],"type":"object"},"CrmMeeting":{"properties":{"attendees":{"items":{"$ref":"#/components/schemas/CrmMeetingAttendee"},"type":"array"},"calendarEventId":{"nullable":true,"type":"string"},"calendarHtmlLink":{"nullable":true,"type":"string"},"calendarId":{"nullable":true,"type":"string"},"calendarProvider":{"$ref":"#/components/schemas/CrmMeetingProvider"},"calendarSyncedAt":{"nullable":true,"type":"number"},"cancelReason":{"$ref":"#/components/schemas/CrmMeetingCancelReason"},"cancelledAt":{"nullable":true,"type":"number"},"completedAt":{"nullable":true,"type":"number"},"completedBy":{"$ref":"#/components/schemas/CrmMeetingCompletedBy"},"createdAt":{"type":"number"},"createdByUserId":{"type":"string"},"description":{"nullable":true,"type":"string"},"endAt":{"type":"number"},"entityId":{"type":"string"},"icalUid":{"nullable":true,"type":"string"},"id":{"type":"string"},"listId":{"nullable":true,"type":"string"},"location":{"nullable":true,"type":"string"},"startAt":{"type":"number"},"status":{"$ref":"#/components/schemas/CrmMeetingStatus"},"timezone":{"nullable":true,"type":"string"},"title":{"type":"string"}},"required":["id","entityId","createdByUserId","title","description","startAt","endAt","timezone","location","status","listId","calendarProvider","calendarId","calendarEventId","icalUid","calendarHtmlLink","calendarSyncedAt","completedAt","completedBy","cancelledAt","cancelReason","createdAt","attendees"],"type":"object"},"CrmMeetingAttendee":{"properties":{"email":{"type":"string"},"id":{"type":"string"},"isOrganizer":{"type":"boolean"},"kind":{"enum":["record","teammate","external"],"type":"string"},"name":{"nullable":true,"type":"string"},"responseStatus":{"enum":["needsAction","accepted","declined","tentative"],"type":"string"},"userId":{"nullable":true,"type":"string"}},"required":["id","kind","userId","email","name","responseStatus","isOrganizer"],"type":"object"},"CrmMeetingCancelReason":{"enum":["cancelled","no_show",null],"nullable":true,"type":"string"},"CrmMeetingCompletedBy":{"enum":["user","system",null],"nullable":true,"type":"string"},"CrmMeetingCreated":{"properties":{"data":{"$ref":"#/components/schemas/CrmMeeting"},"needsConnect":{"$ref":"#/components/schemas/CrmMeetingProvider"}},"required":["data"],"type":"object"},"CrmMeetingDeleted":{"properties":{"data":{"properties":{"deleted":{"type":"boolean"}},"required":["deleted"],"type":"object"}},"required":["data"],"type":"object"},"CrmMeetingList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/CrmMeeting"},"type":"array"}},"required":["data"],"type":"object"},"CrmMeetingProvider":{"enum":["google","microsoft",null],"nullable":true,"type":"string"},"CrmMeetingReconcileResult":{"properties":{"data":{"properties":{"applied":{"type":"number"}},"required":["applied"],"type":"object"}},"required":["data"],"type":"object"},"CrmMeetingStatus":{"enum":["scheduled","cancelled","completed"],"type":"string"},"CrmMeetingUpdateResult":{"properties":{"needsConnect":{"$ref":"#/components/schemas/CrmMeetingProvider"},"updated":{"type":"boolean"}},"required":["updated"],"type":"object"},"CrmMeetingUpdated":{"properties":{"data":{"$ref":"#/components/schemas/CrmMeetingUpdateResult"}},"required":["data"],"type":"object"},"CrmMemberFilter":{"properties":{"companyNmlsId":{"items":{"type":"string"},"type":"array"},"entityType":{"items":{"$ref":"#/components/schemas/CrmEntityType"},"type":"array"},"state":{"items":{"type":"string"},"type":"array"},"units":{"properties":{"gte":{"type":"number"},"lte":{"type":"number"}},"type":"object"},"volume":{"properties":{"gte":{"type":"number"},"lte":{"type":"number"}},"type":"object"}},"type":"object"},"CrmMemberIdsResult":{"properties":{"data":{"properties":{"entityIds":{"items":{"type":"string"},"type":"array"},"truncated":{"type":"boolean"}},"required":["entityIds","truncated"],"type":"object"}},"required":["data"],"type":"object"},"CrmMembersList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/CrmListMember"},"type":"array"}},"required":["data"],"type":"object"},"CrmMentionRecord":{"properties":{"entityId":{"type":"string"},"entityType":{"$ref":"#/components/schemas/CrmEntityType"},"location":{"nullable":true,"type":"string"},"name":{"type":"string"},"subtitle":{"nullable":true,"type":"string"}},"required":["entityId","entityType","name","subtitle","location"],"type":"object"},"CrmMentionSearch":{"properties":{"data":{"properties":{"results":{"items":{"$ref":"#/components/schemas/CrmMentionRecord"},"type":"array"}},"required":["results"],"type":"object"}},"required":["data"],"type":"object"},"CrmMiUpdatesResult":{"properties":{"data":{"properties":{"checkedAt":{"nullable":true,"type":"number"},"updates":{"items":{"properties":{"action":{"enum":["add","overwrite"],"type":"string"},"current":{"nullable":true,"type":"string"},"field":{"type":"string"},"id":{"type":"string"},"incoming":{"type":"string"},"kind":{"type":"string"},"label":{"type":"string"},"linkage":{"properties":{"companyNmlsId":{"type":"string"},"office":{"$ref":"#/components/schemas/CrmOverrideOffice"}},"type":"object"},"seenKey":{"type":"string"},"store":{"enum":["override","contact"],"type":"string"}},"required":["id","field","label","store","current","incoming","action","seenKey"],"type":"object"},"type":"array"}},"required":["updates","checkedAt"],"type":"object"}},"required":["data"],"type":"object"},"CrmObjectType":{"enum":["people","companies"],"type":"string"},"CrmOrgMember":{"properties":{"email":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"userId":{"type":"string"}},"required":["userId","name","email","image"],"type":"object"},"CrmOrgMemberList":{"properties":{"data":{"properties":{"members":{"items":{"$ref":"#/components/schemas/CrmOrgMember"},"type":"array"}},"required":["members"],"type":"object"}},"required":["data"],"type":"object"},"CrmOutcomesReportResult":{"properties":{"data":{"$ref":"#/components/schemas/CrmReportOutcomes"}},"required":["data"],"type":"object"},"CrmOverlay":{"additionalProperties":{"type":"string"},"properties":{"office":{"$ref":"#/components/schemas/CrmOverrideOffice"}},"type":"object"},"CrmOverrideField":{"enum":["status","notes","title","company","companyType","firstName","lastName","location","city","state","zip","companyNmlsId","office"],"type":"string"},"CrmOverrideOffice":{"properties":{"city":{"type":"string"},"key":{"minLength":1,"type":"string"},"lat":{"type":"number"},"lon":{"type":"number"},"name":{"type":"string"},"state":{"type":"string"}},"required":["key"],"type":"object"},"CrmOverridesMap":{"properties":{"data":{"additionalProperties":{"$ref":"#/components/schemas/CrmOverlay"},"type":"object"}},"required":["data"],"type":"object"},"CrmPatchContactBody":{"oneOf":[{"properties":{"id":{"type":"string"},"isPrimary":{"type":"boolean"},"label":{"nullable":true,"type":"string"},"op":{"enum":["update"],"type":"string"},"value":{"nullable":true}},"required":["op","id"],"type":"object"},{"properties":{"entityId":{"type":"string"},"kind":{"$ref":"#/components/schemas/CrmContactKind"},"mmKey":{"type":"string"},"op":{"enum":["suppress"],"type":"string"}},"required":["op","entityId","kind","mmKey"],"type":"object"}]},"CrmPatchContactResult":{"properties":{"data":{"properties":{"id":{"type":"string"},"updated":{"type":"boolean"}},"type":"object"}},"required":["data"],"type":"object"},"CrmPlaceCallResult":{"properties":{"data":{"$ref":"#/components/schemas/CrmCall"}},"required":["data"],"type":"object"},"CrmPollCallResult":{"properties":{"data":{"$ref":"#/components/schemas/CrmCall"}},"required":["data"],"type":"object"},"CrmProductionEnrichJob":{"properties":{"data":{"properties":{"completedAt":{"type":"string"},"error":{"type":"string"},"failed":{"type":"number"},"jobId":{"type":"string"},"startedAt":{"type":"string"},"status":{"enum":["queued","running","completed","failed","cancelled"],"type":"string"},"succeeded":{"type":"number"},"total":{"type":"number"}},"required":["jobId","status","total","succeeded","failed"],"type":"object"}},"required":["data"],"type":"object"},"CrmProfile":{"properties":{"data":{"nullable":true}},"type":"object"},"CrmProfileContact":{"properties":{"id":{"type":"string"},"isPrimary":{"type":"boolean"},"kind":{"type":"string"},"label":{"nullable":true,"type":"string"},"source":{"description":"`mm-edited` = a user edit of a Market Insights value; `user` = added by the workspace (by hand, import or enrichment).","enum":["user","mm-edited"],"type":"string"},"value":{"nullable":true}},"required":["id","kind","label","isPrimary","source"],"type":"object"},"CrmRecordAccessFacts":{"properties":{"data":{"properties":{"accessibleUserIds":{"items":{"type":"string"},"type":"array"},"canManageShares":{"type":"boolean"},"everyone":{"type":"boolean"}},"required":["canManageShares","everyone","accessibleUserIds"],"type":"object"}},"required":["data"],"type":"object"},"CrmRecordAccessRequestInfo":{"properties":{"data":{"properties":{"alreadyHasAccess":{"type":"boolean"},"entityType":{"$ref":"#/components/schemas/CrmEntityType"},"recordName":{"type":"string"},"requesterName":{"nullable":true,"type":"string"},"status":{"enum":["pending","granted","dismissed"],"type":"string"}},"required":["requesterName","recordName","entityType","status","alreadyHasAccess"],"type":"object"}},"required":["data"],"type":"object"},"CrmRecordConnections":{"properties":{"data":{"properties":{"colleagues":{"items":{"$ref":"#/components/schemas/CrmRelatedRecord"},"type":"array"},"inCrm":{"items":{"type":"string"},"type":"array"}},"required":["inCrm","colleagues"],"type":"object"}},"required":["data"],"type":"object"},"CrmRecordRef":{"properties":{"data":{"nullable":true,"properties":{"entityId":{"type":"string"},"entityType":{"$ref":"#/components/schemas/CrmEntityType"}},"required":["entityId","entityType"],"type":"object"}},"required":["data"],"type":"object"},"CrmRecordRequestAccessResult":{"properties":{"data":{"properties":{"ownerName":{"nullable":true,"type":"string"},"status":{"enum":["requested","already_requested","already_has_access"],"type":"string"}},"required":["status","ownerName"],"type":"object"}},"required":["data"],"type":"object"},"CrmRecordSearchResult":{"properties":{"data":{"properties":{"ids":{"items":{"type":"string"},"type":"array"}},"required":["ids"],"type":"object"}},"required":["data"],"type":"object"},"CrmRecordShare":{"properties":{"createdAt":{"type":"number"},"email":{"nullable":true,"type":"string"},"grantedByName":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"source":{"type":"string"},"userId":{"type":"string"}},"required":["userId","name","email","image","source","grantedByName","createdAt"],"type":"object"},"CrmRecordShareList":{"properties":{"data":{"properties":{"canManageShares":{"type":"boolean"},"shares":{"items":{"$ref":"#/components/schemas/CrmRecordShare"},"type":"array"}},"required":["canManageShares","shares"],"type":"object"}},"required":["data"],"type":"object"},"CrmRecordShareableMember":{"properties":{"email":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"userId":{"type":"string"}},"required":["userId","name","email","image"],"type":"object"},"CrmRecordShareableMemberList":{"properties":{"data":{"properties":{"members":{"items":{"$ref":"#/components/schemas/CrmRecordShareableMember"},"type":"array"}},"required":["members"],"type":"object"}},"required":["data"],"type":"object"},"CrmReferencedActivityEntry":{"allOf":[{"$ref":"#/components/schemas/CrmActivityEntry"},{"properties":{"sourceAccessible":{"type":"boolean"},"sourceEntityId":{"type":"string"},"sourceEntityType":{"$ref":"#/components/schemas/CrmEntityType"},"sourceHref":{"type":"string"},"sourceName":{"type":"string"}},"required":["sourceEntityId","sourceEntityType","sourceName","sourceHref","sourceAccessible"],"type":"object"}]},"CrmReferencedActivityList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/CrmReferencedActivityEntry"},"type":"array"}},"required":["data"],"type":"object"},"CrmRefreshMirrorResult":{"properties":{"data":{"properties":{"display":{"allOf":[{"$ref":"#/components/schemas/CrmDisplay"},{"description":"The record's mirrored display after the attempt.","nullable":true}]},"refreshed":{"description":"Whether the mirrored row actually CHANGED. `false` when it was already current, when the record has no resolvable MM link, or when the refresh could not run — all of which are normal and none of which are errors.","type":"boolean"}},"required":["refreshed","display"],"type":"object"}},"required":["data"],"type":"object"},"CrmRelatedRecord":{"properties":{"display":{"$ref":"#/components/schemas/CrmDisplay"},"entityId":{"type":"string"},"entityType":{"$ref":"#/components/schemas/CrmEntityType"},"listNames":{"items":{"type":"string"},"type":"array"}},"required":["entityId","entityType","display","listNames"],"type":"object"},"CrmRemoveContactResult":{"properties":{"data":{"properties":{"removed":{"type":"boolean"}},"required":["removed"],"type":"object"}},"required":["data"],"type":"object"},"CrmRemoveListMemberResult":{"properties":{"data":{"properties":{"removed":{"type":"boolean"}},"required":["removed"],"type":"object"}},"required":["data"],"type":"object"},"CrmReportActivity":{"properties":{"from":{"type":"number"},"to":{"type":"number"},"users":{"items":{"$ref":"#/components/schemas/CrmReportActivityUser"},"type":"array"}},"required":["from","to","users"],"type":"object"},"CrmReportActivityDay":{"properties":{"calls":{"minimum":0,"type":"integer"},"callsConnected":{"minimum":0,"type":"integer"},"date":{"type":"string"},"emails":{"minimum":0,"type":"integer"},"meetingsCancelled":{"minimum":0,"type":"integer"},"meetingsCompleted":{"minimum":0,"type":"integer"},"meetingsNoShow":{"minimum":0,"type":"integer"},"meetingsScheduled":{"minimum":0,"type":"integer"},"notes":{"minimum":0,"type":"integer"},"recordsAdded":{"minimum":0,"type":"integer"},"recordsLost":{"minimum":0,"type":"integer"},"recordsWon":{"minimum":0,"type":"integer"},"talkTimeSeconds":{"minimum":0,"type":"integer"},"tasksCompleted":{"minimum":0,"type":"integer"},"tasksCreated":{"minimum":0,"type":"integer"},"voicemails":{"minimum":0,"type":"integer"}},"required":["date","calls","callsConnected","talkTimeSeconds","voicemails","notes","emails","tasksCreated","tasksCompleted","meetingsScheduled","meetingsCompleted","meetingsNoShow","meetingsCancelled","recordsAdded","recordsWon","recordsLost"],"type":"object"},"CrmReportActivityTotals":{"properties":{"calls":{"minimum":0,"type":"integer"},"callsConnected":{"minimum":0,"type":"integer"},"emails":{"minimum":0,"type":"integer"},"meetingsCancelled":{"minimum":0,"type":"integer"},"meetingsCompleted":{"minimum":0,"type":"integer"},"meetingsNoShow":{"minimum":0,"type":"integer"},"meetingsScheduled":{"minimum":0,"type":"integer"},"notes":{"minimum":0,"type":"integer"},"recordsAdded":{"minimum":0,"type":"integer"},"recordsLost":{"minimum":0,"type":"integer"},"recordsWon":{"minimum":0,"type":"integer"},"talkTimeSeconds":{"minimum":0,"type":"integer"},"tasksCompleted":{"minimum":0,"type":"integer"},"tasksCreated":{"minimum":0,"type":"integer"},"voicemails":{"minimum":0,"type":"integer"}},"required":["calls","callsConnected","talkTimeSeconds","voicemails","notes","emails","tasksCreated","tasksCompleted","meetingsScheduled","meetingsCompleted","meetingsNoShow","meetingsCancelled","recordsAdded","recordsWon","recordsLost"],"type":"object"},"CrmReportActivityUser":{"properties":{"days":{"description":"Ascending by date; all-zero days omitted (fill gaps client-side).","items":{"$ref":"#/components/schemas/CrmReportActivityDay"},"type":"array"},"previousTotals":{"properties":{"calls":{"minimum":0,"type":"integer"},"callsConnected":{"minimum":0,"type":"integer"},"emails":{"minimum":0,"type":"integer"},"meetingsCancelled":{"minimum":0,"type":"integer"},"meetingsCompleted":{"minimum":0,"type":"integer"},"meetingsNoShow":{"minimum":0,"type":"integer"},"meetingsScheduled":{"minimum":0,"type":"integer"},"notes":{"minimum":0,"type":"integer"},"recordsAdded":{"minimum":0,"type":"integer"},"recordsContacted":{"minimum":0,"type":"integer"},"recordsLost":{"minimum":0,"type":"integer"},"recordsWon":{"minimum":0,"type":"integer"},"talkTimeSeconds":{"minimum":0,"type":"integer"},"tasksCompleted":{"minimum":0,"type":"integer"},"tasksCreated":{"minimum":0,"type":"integer"},"voicemails":{"minimum":0,"type":"integer"}},"required":["calls","callsConnected","talkTimeSeconds","voicemails","notes","emails","tasksCreated","tasksCompleted","meetingsScheduled","meetingsCompleted","meetingsNoShow","meetingsCancelled","recordsAdded","recordsWon","recordsLost","recordsContacted"],"type":"object"},"recordsContacted":{"description":"Distinct records with ≥1 outreach touch in the period. Totals-only — never per day (distincts don't sum).","minimum":0,"type":"integer"},"totals":{"$ref":"#/components/schemas/CrmReportActivityTotals"},"userId":{"type":"string"}},"required":["userId","totals","recordsContacted","previousTotals","days"],"type":"object"},"CrmReportEffortPerWin":{"properties":{"avgCalls":{"nullable":true,"type":"number"},"avgDaysToWin":{"nullable":true,"type":"number"},"avgEmails":{"nullable":true,"type":"number"},"avgMeetings":{"nullable":true,"type":"number"},"avgTouches":{"nullable":true,"type":"number"},"wins":{"minimum":0,"type":"integer"}},"required":["wins","avgTouches","avgCalls","avgEmails","avgMeetings","avgDaysToWin"],"type":"object"},"CrmReportMilestones":{"properties":{"timeToConnect":{"properties":{"avgDays":{"nullable":true,"type":"number"},"medianDays":{"nullable":true,"type":"number"},"records":{"minimum":0,"type":"integer"}},"required":["records","medianDays","avgDays"],"type":"object"},"timeToFirstMeeting":{"properties":{"avgDays":{"nullable":true,"type":"number"},"medianDays":{"nullable":true,"type":"number"},"records":{"minimum":0,"type":"integer"}},"required":["records","medianDays","avgDays"],"type":"object"},"timeToFirstTouch":{"properties":{"avgDays":{"nullable":true,"type":"number"},"medianDays":{"nullable":true,"type":"number"},"records":{"minimum":0,"type":"integer"}},"required":["records","medianDays","avgDays"],"type":"object"},"timeToWin":{"properties":{"avgDays":{"nullable":true,"type":"number"},"medianDays":{"nullable":true,"type":"number"},"records":{"minimum":0,"type":"integer"}},"required":["records","medianDays","avgDays"],"type":"object"}},"required":["timeToFirstTouch","timeToConnect","timeToFirstMeeting","timeToWin"],"type":"object"},"CrmReportOutcomes":{"properties":{"from":{"type":"number"},"pipeline":{"description":"CURRENT snapshot of records by status (ignores from/to and userId).","items":{"$ref":"#/components/schemas/CrmReportPipelineBucket"},"type":"array"},"to":{"type":"number"},"users":{"items":{"$ref":"#/components/schemas/CrmReportOutcomesUser"},"type":"array"}},"required":["from","to","users","pipeline"],"type":"object"},"CrmReportOutcomesUser":{"properties":{"effortPerWin":{"$ref":"#/components/schemas/CrmReportEffortPerWin"},"losses":{"properties":{"records":{"minimum":0,"type":"integer"},"transitions":{"minimum":0,"type":"integer"}},"required":["transitions","records"],"type":"object"},"milestones":{"$ref":"#/components/schemas/CrmReportMilestones"},"previous":{"properties":{"effortPerWin":{"$ref":"#/components/schemas/CrmReportEffortPerWin"},"losses":{"properties":{"records":{"minimum":0,"type":"integer"},"transitions":{"minimum":0,"type":"integer"}},"required":["transitions","records"],"type":"object"},"milestones":{"$ref":"#/components/schemas/CrmReportMilestones"},"volumeOnboarded":{"$ref":"#/components/schemas/CrmReportVolumeOnboarded"},"wins":{"properties":{"records":{"minimum":0,"type":"integer"},"transitions":{"minimum":0,"type":"integer"}},"required":["transitions","records"],"type":"object"},"winsByStatus":{"items":{"properties":{"label":{"type":"string"},"records":{"minimum":0,"type":"integer"},"statusId":{"type":"string"}},"required":["statusId","label","records"],"type":"object"},"type":"array"}},"required":["wins","losses","winsByStatus","volumeOnboarded","milestones","effortPerWin"],"type":"object"},"userId":{"type":"string"},"volumeOnboarded":{"$ref":"#/components/schemas/CrmReportVolumeOnboarded"},"wins":{"properties":{"records":{"minimum":0,"type":"integer"},"transitions":{"minimum":0,"type":"integer"}},"required":["transitions","records"],"type":"object"},"winsByStatus":{"items":{"properties":{"label":{"type":"string"},"records":{"minimum":0,"type":"integer"},"statusId":{"type":"string"}},"required":["statusId","label","records"],"type":"object"},"type":"array"}},"required":["userId","wins","losses","winsByStatus","volumeOnboarded","milestones","effortPerWin","previous"],"type":"object"},"CrmReportPipelineBucket":{"properties":{"label":{"type":"string"},"outcome":{"enum":["won","lost",null],"nullable":true,"type":"string"},"records":{"minimum":0,"type":"integer"},"statusId":{"nullable":true,"type":"string"}},"required":["statusId","label","outcome","records"],"type":"object"},"CrmReportVolumeOnboarded":{"properties":{"buyerSideUnits":{"nullable":true,"type":"number"},"buyerSideVolume":{"nullable":true,"type":"number"},"records":{"minimum":0,"type":"integer"},"windows":{"properties":{"r12":{"nullable":true,"properties":{"records":{"minimum":0,"type":"integer"},"units":{"type":"number"},"volume":{"type":"number"}},"required":["volume","units","records"],"type":"object"},"r14":{"nullable":true,"properties":{"records":{"minimum":0,"type":"integer"},"units":{"type":"number"},"volume":{"type":"number"}},"required":["volume","units","records"],"type":"object"},"r6":{"nullable":true,"properties":{"records":{"minimum":0,"type":"integer"},"units":{"type":"number"},"volume":{"type":"number"}},"required":["volume","units","records"],"type":"object"}},"required":["r6","r12","r14"],"type":"object"},"withProduction":{"minimum":0,"type":"integer"}},"required":["records","withProduction","windows","buyerSideVolume","buyerSideUnits"],"type":"object"},"CrmRequestAccessResult":{"properties":{"data":{"properties":{"status":{"enum":["sent","already_requested"],"type":"string"}},"required":["status"],"type":"object"}},"required":["data"],"type":"object"},"CrmRevokeListAccessResult":{"properties":{"data":{"properties":{"revoked":{"type":"boolean"}},"required":["revoked"],"type":"object"}},"required":["data"],"type":"object"},"CrmRevokeRecordAccessResult":{"properties":{"data":{"properties":{"revoked":{"type":"boolean"}},"required":["revoked"],"type":"object"}},"required":["data"],"type":"object"},"CrmSetCustomValueResult":{"properties":{"data":{"properties":{"updated":{"type":"boolean"}},"required":["updated"],"type":"object"}},"required":["data"],"type":"object"},"CrmSetDefaultCallerIdResult":{"properties":{"data":{"properties":{"updated":{"type":"boolean"}},"required":["updated"],"type":"object"}},"required":["data"],"type":"object"},"CrmSetOverrideResult":{"properties":{"data":{"$ref":"#/components/schemas/CrmOverlay"},"derived":{"$ref":"#/components/schemas/CrmDerivedLocation"}},"required":["data"],"type":"object"},"CrmSetOwnerResult":{"properties":{"data":{"properties":{"canShare":{"type":"boolean"},"needsShare":{"type":"boolean"},"ownerUserId":{"type":"string"}},"required":["ownerUserId"],"type":"object"}},"required":["data"],"type":"object"},"CrmShareTemplateResult":{"properties":{"data":{"properties":{"granted":{"type":"boolean"}},"required":["granted"],"type":"object"}},"required":["data"],"type":"object"},"CrmShareableMember":{"properties":{"email":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"userId":{"type":"string"}},"required":["userId","name","email","image"],"type":"object"},"CrmShareableMemberList":{"properties":{"data":{"properties":{"members":{"items":{"$ref":"#/components/schemas/CrmShareableMember"},"type":"array"}},"required":["members"],"type":"object"}},"required":["data"],"type":"object"},"CrmSimilarOriginators":{"properties":{"data":{"properties":{"results":{"items":{"properties":{"components":{"properties":{"loan":{"nullable":true,"type":"number"},"size":{"type":"number"},"tx":{"nullable":true,"type":"number"}},"required":["tx","loan","size"],"type":"object"},"highlight":{"nullable":true,"properties":{"partnerPct":{"type":"number"},"type":{"type":"string"}},"required":["type","partnerPct"],"type":"object"},"nmls":{"type":"string"},"score":{"type":"number"},"units":{"type":"number"},"volume":{"type":"number"}},"required":["nmls","score","components","volume","units","highlight"],"type":"object"},"type":"array"}},"required":["results"],"type":"object"}},"required":["data"],"type":"object"},"CrmTask":{"properties":{"allDay":{"type":"boolean"},"assigneeUserId":{"type":"string"},"body":{"nullable":true,"type":"string"},"calendarEventId":{"nullable":true,"type":"string"},"calendarProvider":{"enum":["google","microsoft",null],"nullable":true,"type":"string"},"cancelledAt":{"nullable":true,"type":"number"},"completedAt":{"nullable":true,"type":"number"},"createdAt":{"type":"number"},"createdByUserId":{"type":"string"},"dueAt":{"nullable":true,"type":"number"},"entityId":{"type":"string"},"id":{"type":"string"},"listId":{"nullable":true,"type":"string"},"status":{"$ref":"#/components/schemas/CrmTaskStatus"},"title":{"type":"string"}},"required":["id","entityId","title","body","dueAt","allDay","status","assigneeUserId","createdByUserId","completedAt","cancelledAt","calendarProvider","calendarEventId","createdAt","listId"],"type":"object"},"CrmTaskCreated":{"properties":{"data":{"anyOf":[{"$ref":"#/components/schemas/CrmTask"},{"properties":{"canShare":{"type":"boolean"},"created":{"type":"boolean"},"needsShare":{"enum":[true],"type":"boolean"},"updated":{"type":"boolean"}},"required":["needsShare","canShare"],"type":"object"}]}},"required":["data"],"type":"object"},"CrmTaskDeleted":{"properties":{"data":{"properties":{"deleted":{"type":"boolean"}},"required":["deleted"],"type":"object"}},"required":["data"],"type":"object"},"CrmTaskList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/CrmTask"},"type":"array"}},"required":["data"],"type":"object"},"CrmTaskStatus":{"enum":["open","completed","cancelled"],"type":"string"},"CrmTaskUpdated":{"properties":{"data":{"anyOf":[{"properties":{"updated":{"type":"boolean"}},"required":["updated"],"type":"object"},{"properties":{"canShare":{"type":"boolean"},"created":{"type":"boolean"},"needsShare":{"enum":[true],"type":"boolean"},"updated":{"type":"boolean"}},"required":["needsShare","canShare"],"type":"object"},{"properties":{"needsConnect":{"enum":["google","microsoft"],"type":"string"},"task":{"$ref":"#/components/schemas/CrmTask"}},"required":["task"],"type":"object"}]}},"required":["data"],"type":"object"},"CrmTemplate":{"properties":{"data":{"allOf":[{"$ref":"#/components/schemas/CrmTemplateWithFields"},{"nullable":true}]}},"required":["data"],"type":"object"},"CrmTemplateField":{"properties":{"config":{"additionalProperties":{"nullable":true},"nullable":true,"type":"object"},"id":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"options":{"items":{"properties":{"color":{"type":"string"},"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"type":"object"},"nullable":true,"type":"array"},"sortOrder":{"type":"number"},"type":{"enum":["text","number","currency","date","select","multiselect","url","rating","checkbox","status","tags"],"type":"string"}},"required":["id","key","label","type","options","config","sortOrder"],"type":"object"},"CrmTemplateList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/CrmTemplateSummary"},"type":"array"}},"required":["data"],"type":"object"},"CrmTemplateShareList":{"properties":{"data":{"$ref":"#/components/schemas/CrmTemplateShares"}},"required":["data"],"type":"object"},"CrmTemplateShares":{"properties":{"canManage":{"type":"boolean"},"owner":{"properties":{"email":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"userId":{"type":"string"}},"required":["userId","name","email","image"],"type":"object"},"ownerUserId":{"type":"string"},"shares":{"items":{"properties":{"createdAt":{"type":"number"},"email":{"nullable":true,"type":"string"},"grantedByName":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"userId":{"type":"string"}},"required":["userId","name","email","image","grantedByName","createdAt"],"type":"object"},"type":"array"}},"required":["ownerUserId","owner","canManage","shares"],"type":"object"},"CrmTemplateSummary":{"properties":{"canManage":{"type":"boolean"},"createdAt":{"type":"number"},"fieldCount":{"type":"number"},"id":{"type":"string"},"name":{"type":"string"},"objectType":{"$ref":"#/components/schemas/CrmObjectType"},"ownerName":{"nullable":true,"type":"string"},"ownerUserId":{"type":"string"},"sharedCount":{"type":"number"},"updatedAt":{"type":"number"}},"required":["id","name","objectType","ownerUserId","sharedCount","fieldCount","createdAt","updatedAt","ownerName","canManage"],"type":"object"},"CrmTemplateWithFields":{"properties":{"createdAt":{"type":"number"},"fieldCount":{"type":"number"},"fields":{"items":{"$ref":"#/components/schemas/CrmTemplateField"},"type":"array"},"id":{"type":"string"},"name":{"type":"string"},"objectType":{"$ref":"#/components/schemas/CrmObjectType"},"ownerUserId":{"type":"string"},"sharedCount":{"type":"number"},"updatedAt":{"type":"number"}},"required":["id","name","objectType","ownerUserId","sharedCount","fieldCount","createdAt","updatedAt","fields"],"type":"object"},"CrmTranscriptSentence":{"properties":{"speaker":{"enum":["user","contact"],"type":"string"},"text":{"type":"string"}},"required":["speaker","text"],"type":"object"},"CrmTransferListOwnershipResult":{"properties":{"data":{"properties":{"transferred":{"type":"boolean"}},"required":["transferred"],"type":"object"}},"required":["data"],"type":"object"},"CrmUnshareTemplateResult":{"properties":{"data":{"properties":{"revoked":{"type":"boolean"}},"required":["revoked"],"type":"object"}},"required":["data"],"type":"object"},"CrmUpdateListFieldResult":{"properties":{"data":{"properties":{"updated":{"type":"boolean"}},"required":["updated"],"type":"object"}},"required":["data"],"type":"object"},"CrmUpdateObjectFieldResult":{"properties":{"data":{"properties":{"updated":{"type":"boolean"}},"required":["updated"],"type":"object"}},"required":["data"],"type":"object"},"CrmUpdateTemplateResult":{"properties":{"data":{"properties":{"updated":{"type":"boolean"}},"required":["updated"],"type":"object"}},"required":["data"],"type":"object"},"CrmWorkspaceMeeting":{"allOf":[{"$ref":"#/components/schemas/CrmMeeting"},{"properties":{"canManage":{"type":"boolean"},"display":{"allOf":[{"$ref":"#/components/schemas/CrmDisplay"},{"nullable":true}]},"entityType":{"$ref":"#/components/schemas/CrmEntityType"},"overrides":{"$ref":"#/components/schemas/CrmOverlay"},"recordName":{"type":"string"},"recordSubtitle":{"nullable":true,"type":"string"}},"required":["entityType","recordName","recordSubtitle","display","canManage"],"type":"object"}]},"CrmWorkspaceMeetingList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/CrmWorkspaceMeeting"},"type":"array"}},"required":["data"],"type":"object"},"CrmWorkspaceTask":{"allOf":[{"$ref":"#/components/schemas/CrmTask"},{"properties":{"canDelete":{"type":"boolean"},"display":{"allOf":[{"$ref":"#/components/schemas/CrmDisplay"},{"nullable":true}]},"entityType":{"$ref":"#/components/schemas/CrmEntityType"},"overrides":{"$ref":"#/components/schemas/CrmOverlay"},"recordName":{"type":"string"},"recordSubtitle":{"nullable":true,"type":"string"}},"required":["entityType","recordName","recordSubtitle","display","canDelete"],"type":"object"}]},"CrmWorkspaceTaskList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/CrmWorkspaceTask"},"type":"array"}},"required":["data"],"type":"object"},"DateFilterValue":{"anyOf":[{"description":"Exact date, or a whole period: `YYYY-MM-DD` (that day), `YYYY-MM` (the whole month — `\"2025-06\"` = 2025-06-01 through 2025-06-30) or `YYYY` (the whole year). `YYYYMMDD`, `MM/DD/YYYY`, an ISO-8601 datetime and epoch milliseconds are also accepted. An unparseable value is a 400.","example":"2024-01-01","type":"string"},{"description":"Date range. Excludes null/missing-field docs by default; add `includeNulls: true` to keep them. Bounds accept `YYYY`, `YYYY-MM`, `YYYY-MM-DD`, `YYYYMMDD`, `MM/DD/YYYY`, a full ISO datetime or epoch milliseconds; an unparseable bound is a 400. A partial bound denotes the whole period and expands to the edge that preserves the operator: `gte`/`lt` take the period START, `gt`/`lte` take the period END — so `{gte: \"2024\"}` means on/after 2024-01-01 and `{lte: \"2024\"}` means through 2024-12-31.","example":{"gte":"2024-01-01","lte":"2024-12-31"},"properties":{"gt":{"type":"string"},"gte":{"type":"string"},"includeNulls":{"description":"Also keep docs where the field is null/missing (a range filter drops them by default). Requires a bound.","type":"boolean"},"lt":{"type":"string"},"lte":{"type":"string"}},"type":"object"},{"nullable":true}]},"DatedPeriod":{"description":"Date window for loans / sales / market endpoints. Accepts every `Period` value plus rolling windows: `last30Days` / `last60Days` / `last90Days` (today minus 30 / 60 / 90 days through today), `previousMonth` (the last complete calendar month) and `currentMonth` (the 1st of this month through today). All windows are resolved in UTC with inclusive calendar-date bounds. Rolling windows are only accepted by the loans, sales and market endpoints (list, count, breakdowns, analytics summary / time-series / chart); originators / companies / branches / agents / offices endpoints return 400 for them.","enum":["2017","2018","2019","2020","2021","2022","2023","2024","2025","2026","last3Months","last6Months","last12Months","last14Months","last16Months","last18Months","last24Months","yearToDate","allTime","last30Days","last60Days","last90Days","previousMonth","currentMonth"],"type":"string"},"DeleteSavedFilterResult":{"properties":{"data":{"properties":{"deleted":{"enum":[true],"type":"boolean"}},"required":["deleted"],"type":"object"}},"required":["data"],"type":"object"},"EarlyExitCounterparty":{"properties":{"name":{"nullable":true,"type":"string"},"nmlsId":{"nullable":true,"type":"string"}},"required":["nmlsId","name"],"type":"object"},"EarlyExitRow":{"properties":{"city":{"nullable":true,"type":"string"},"daysAtCompany":{"nullable":true,"type":"number"},"daysSinceStart":{"type":"number"},"endDate":{"nullable":true,"type":"string"},"kind":{"enum":["early_departure","recent_start"],"type":"string"},"name":{"nullable":true,"type":"string"},"nextEmployer":{"$ref":"#/components/schemas/EarlyExitCounterparty"},"nmlsId":{"type":"string"},"previousEmployer":{"$ref":"#/components/schemas/EarlyExitCounterparty"},"startDate":{"type":"string"},"state":{"nullable":true,"type":"string"},"trailingUnits":{"type":"number"},"trailingVolume":{"description":"Trailing-12-month production across all employers (0 when none on file).","type":"number"}},"required":["nmlsId","name","kind","city","state","startDate","endDate","daysAtCompany","daysSinceStart","previousEmployer","nextEmployer","trailingVolume","trailingUnits"],"type":"object"},"EmploymentBranchLocation":{"nullable":true,"properties":{"city":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"nmlsId":{"nullable":true,"type":"string"},"state":{"nullable":true,"type":"string"}},"required":["nmlsId","name","city","state"],"type":"object"},"EmploymentContact":{"nullable":true,"properties":{"cellPhone":{"nullable":true,"type":"string"},"employerAddress":{"nullable":true,"type":"string"},"employerCity":{"nullable":true,"type":"string"},"employerCompany":{"nullable":true,"type":"string"},"employerCompanyId":{"nullable":true,"type":"string"},"employerState":{"nullable":true,"type":"string"},"employerType":{"nullable":true,"type":"string"},"employerWebsite":{"nullable":true,"type":"string"},"employerZip":{"nullable":true,"type":"string"},"facebook":{"nullable":true,"type":"string"},"linkedin":{"nullable":true,"type":"string"},"officePhone":{"nullable":true,"type":"string"},"officePhoneExt":{"nullable":true,"type":"string"},"personalEmail":{"nullable":true,"type":"string"},"twitter":{"nullable":true,"type":"string"},"website":{"nullable":true,"type":"string"},"workEmail":{"nullable":true,"type":"string"}},"required":["cellPhone","officePhone","officePhoneExt","workEmail","personalEmail","linkedin","facebook","twitter","website","employerCompany","employerCompanyId","employerAddress","employerCity","employerState","employerZip","employerWebsite","employerType"],"type":"object"},"EmploymentWindow":{"properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"type":"object"},"EnrichAmbiguousRef":{"properties":{"alternates":{"description":"Sibling document `id`s — pass one back as `/{id}/enrich` to enrich that exact unit.","items":{"type":"string"},"type":"array"},"error":{"type":"string"}},"required":["error","alternates"],"type":"object"},"EnrichBatchItem":{"properties":{"alternates":{"description":"Sibling document `id`s. Present only on `ambiguous_ref` — pass one as a precise id to enrich that exact unit.","items":{"type":"string"},"type":"array"},"balance":{"description":"Remaining credit balance. Present only on insufficient_credits.","type":"number"},"cached":{"description":"Served from cache (member entitlement or internal). ok items only.","type":"boolean"},"charged":{"description":"True when this id resulted in a credit debit. ok items only.","type":"boolean"},"code":{"$ref":"#/components/schemas/EnrichBatchItemErrorCode"},"data":{"$ref":"#/components/schemas/PropertyEnrichment"},"property":{"description":"The parcel behind this enrichment. ok items only; `null` when the id resolved to more than one parcel.","nullable":true,"properties":{"communityLending":{"$ref":"#/components/schemas/PropertyCommunityLending"},"parties":{"$ref":"#/components/schemas/PropertyParties"}},"required":["communityLending","parties"],"type":"object"},"propertyId":{"type":"string"},"reason":{"$ref":"#/components/schemas/EnrichmentReason"},"result":{"$ref":"#/components/schemas/EnrichmentResultMeta"},"status":{"enum":["ok","error"],"type":"string"}},"required":["propertyId","status"],"type":"object"},"EnrichBatchItemErrorCode":{"description":"Failure reason. error items only.","enum":["not_found","ambiguous_ref","no_address","provider_error","insufficient_credits","rate_limited","daily_limit_exceeded","permission_denied","member_not_found","bad_request","billing_unavailable"],"type":"string"},"EnrichBatchRequest":{"properties":{"propertyIds":{"description":"Property ids to enrich in one request. 1–50; larger sets must use the async bulk job. Use the `id`/`mmPropertyId` from a property search or a loan/sale record (e.g. `mm_<fips><apn>`) — bare APNs, fips+apn, or `loan_…` ids will not resolve.","items":{"minLength":1,"type":"string"},"maxItems":50,"minItems":1,"type":"array"},"refresh":{"description":"When true, bypass both caches for every id, force a fresh skip-trace, and re-charge per match.","type":"boolean"}},"required":["propertyIds"],"type":"object"},"EnrichBatchResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/EnrichBatchItem"},"type":"array"},"summary":{"$ref":"#/components/schemas/EnrichBatchSummary"}},"required":["results","summary"],"type":"object"},"EnrichBatchSummary":{"properties":{"charged":{"description":"Items that resulted in a credit debit (one per match).","type":"integer"},"failed":{"description":"Items with status error.","type":"integer"},"requested":{"type":"integer"},"succeeded":{"description":"Items with status ok (cache hits + fresh, matched or empty).","type":"integer"}},"required":["requested","succeeded","charged","failed"],"type":"object"},"EnrichBulkJobResponse":{"properties":{"billingStatus":{"description":"Outcome of the job's single finalize debit, taken before the results are released: `charged`, `capped` (member balance / spend cap / daily cap declined it — the job fails `insufficient_credits`), `billing_error` (the debit could not be made — the job fails `billing_unavailable`), or `none` (nothing matched). Absent until billing has run, and on older rows.","enum":["charged","capped","billing_error","none"],"type":"string"},"chargedCount":{"description":"Intended charge — matched rows tallied during the run. NOT necessarily what was billed; read `creditsCharged` for the actual debit and `billingStatus` for why they differ.","type":"integer"},"completedAt":{"type":"string"},"creditsCharged":{"description":"Credits ACTUALLY debited (0 when the finalize debit was rejected/failed). Absent only on rows written before the field existed, where enrichment billed 1 credit per match and `chargedCount` was the credit amount.","type":"integer"},"downloadUrl":{"description":"Stable, shareable download link for the completed results. Forces a file download (with a friendly filename) and stays valid for 7 days after completion. Present once `status` is `completed`. This is the link to hand to a user or send by email.","type":"string"},"error":{"description":"Why the job failed. `insufficient_credits` = the charge was declined (balance, spend cap or daily cap), no results released. `billing_unavailable` = the charge could not be made, no results released — retry.","type":"string"},"failed":{"type":"integer"},"fromCache":{"type":"integer"},"jobId":{"type":"string"},"resultsUrl":{"description":"Direct download URL for the completed results. Long-lived per request but changes on each poll; prefer `downloadUrl` for a stable link to share.","type":"string"},"startedAt":{"type":"string"},"status":{"enum":["queued","running","completed","failed","cancelled"],"type":"string"},"succeeded":{"type":"integer"},"total":{"type":"integer"}},"required":["jobId","status","total","succeeded","failed","fromCache","chargedCount"],"type":"object"},"EnrichBulkRequest":{"additionalProperties":false,"properties":{"advancedFilters":{"$ref":"#/components/schemas/FilterNode","description":"Filter-driven mode: an advanced boolean filter tree, AND-merged with `flatFilters` (same semantics as `POST /properties`)."},"filters":{"$ref":"#/components/schemas/FilterNode","description":"Legacy alias for `advancedFilters`."},"flatFilters":{"allOf":[{"$ref":"#/components/schemas/PropertyFlatFilters"},{"description":"Filter-driven mode: the same flat filters as `POST /properties` (including the loan-slot filters). The job enriches every matching property up to `limit` (or the hard cap). Provide filters OR propertyIds, not both."}]},"limit":{"description":"Filter-driven mode only: cap the number of matching properties enriched (and billed). Omitted → enrich every match up to the 50000 hard cap.","maximum":50000,"minimum":1,"type":"integer"},"propertyIds":{"description":"Property IDs to enrich (id-driven mode). Hard cap 50000. Use the `id`/`mmPropertyId` from a property search or a loan/sale record (e.g. `mm_<fips><apn>`) — bare APNs, fips+apn, or `loan_…` ids will not resolve. Provide this OR filters, not both.","items":{"minLength":1,"type":"string"},"maxItems":50000,"minItems":1,"type":"array"},"refresh":{"description":"When true, the ECS task bypasses both caches for every property and re-charges credits. Idempotency key picks up an epoch-minute discriminator.","type":"boolean"}},"type":"object"},"EnrichBulkResponse":{"properties":{"estimatedCost":{"description":"Worst-case credit cost (10 / property). Actual debit is per match — properties with no skip-trace contacts and cached no-match rows don't charge. The post-completion `creditsCharged` on the job row is the precise debited total; `chargedCount` is the match COUNT, which is a different unit.","type":"integer"},"jobId":{"type":"string"},"propertyCount":{"type":"integer"},"status":{"enum":["queued"],"type":"string"}},"required":["jobId","status","propertyCount","estimatedCost"],"type":"object"},"EnrichPropertyContext":{"description":"The parcel behind the enrichment: its Community Lending neighborhood profile and the mortgage parties attributed to it. Identical to the `communityLending` and `parties` blocks on `GET /v1/properties/{id}` — returned here so a skip-trace does not need a second call to answer 'what kind of neighborhood is this' and 'who already has a relationship with this parcel'.","nullable":true,"properties":{"communityLending":{"$ref":"#/components/schemas/PropertyCommunityLending"},"parties":{"$ref":"#/components/schemas/PropertyParties"}},"required":["communityLending","parties"],"type":"object"},"EnrichPropertyResponse":{"properties":{"cached":{"description":"Whether the result was served from cache","type":"boolean"},"charged":{"description":"True when this call resulted in a credit debit. False on cache hits AND on `fresh_skip_trace_empty` (no-match calls don't charge).","type":"boolean"},"data":{"$ref":"#/components/schemas/PropertyEnrichment"},"property":{"$ref":"#/components/schemas/EnrichPropertyContext"},"reason":{"$ref":"#/components/schemas/EnrichmentReason"},"result":{"$ref":"#/components/schemas/EnrichmentResultMeta"}},"required":["data","cached","charged","reason","result"],"type":"object"},"EnrichmentCacheBustRequest":{"properties":{"rows":{"description":"Explicit list of cache rows to delete. Mix internal and member keys freely. Max 500 per call; the helper batches into 25-item DDB `BatchWriteItem` chunks under the hood.","items":{"$ref":"#/components/schemas/EnrichmentCacheRowKey"},"maxItems":500,"minItems":1,"type":"array"}},"required":["rows"],"type":"object"},"EnrichmentCacheBustResponse":{"properties":{"deleted":{"minimum":0,"type":"integer"},"unprocessed":{"items":{"$ref":"#/components/schemas/EnrichmentCacheRowKey"},"type":"array"}},"required":["deleted","unprocessed"],"type":"object"},"EnrichmentCacheDeleteResponse":{"properties":{"deleted":{"enum":[true],"type":"boolean"}},"required":["deleted"],"type":"object"},"EnrichmentCacheGetResponse":{"properties":{"data":{"$ref":"#/components/schemas/EnrichmentCacheRow"}},"required":["data"],"type":"object"},"EnrichmentCachePropertyChildrenResponse":{"properties":{"internal":{"allOf":[{"$ref":"#/components/schemas/EnrichmentCacheRow"},{"description":"The internal property cache row, or `null` if the property has no cached enrichment.","nullable":true}]},"members":{"description":"Every member entitlement row tied to this property. Empty when no member has enriched it.","items":{"$ref":"#/components/schemas/EnrichmentCacheRow"},"type":"array"}},"required":["internal","members"],"type":"object"},"EnrichmentCacheRow":{"properties":{"data":{"description":"Parsed `PropertyEnrichment` payload, or `null` if the row failed schema parse (drift). Admin-view exposes both.","nullable":true},"enrichedAt":{"nullable":true,"type":"string"},"expired":{"type":"boolean"},"expiresAt":{"nullable":true,"type":"number"},"key":{"$ref":"#/components/schemas/EnrichmentCacheRowKey"},"personCount":{"description":"Number of skip-trace persons cached in this row. `0` usually means the provider had no contact match — but rows from the May 2026 parser-drift incident also surface here.","minimum":0,"type":"integer"},"source":{"nullable":true,"type":"string"}},"required":["key","personCount","enrichedAt","source","expiresAt","expired"],"type":"object"},"EnrichmentCacheRowKey":{"oneOf":[{"properties":{"kind":{"enum":["internal"],"type":"string"},"propertyId":{"type":"string"}},"required":["kind","propertyId"],"type":"object"},{"properties":{"kind":{"enum":["member"],"type":"string"},"orgId":{"type":"string"},"propertyId":{"type":"string"},"userId":{"type":"string"}},"required":["kind","orgId","userId","propertyId"],"type":"object"}]},"EnrichmentCacheScanResponse":{"properties":{"cursor":{"description":"Pagination cursor. Pass back unchanged on the next call.","type":"string"},"items":{"items":{"$ref":"#/components/schemas/EnrichmentCacheRow"},"type":"array"}},"required":["items"],"type":"object"},"EnrichmentCacheStats":{"properties":{"computedAt":{"description":"ISO 8601 timestamp","type":"string"},"costUsd":{"description":"`total × unitCostUsd` — upstream spend behind the live table.","minimum":0,"type":"number"},"empty":{"description":"Unexpired rows where the provider returned no persons.","minimum":0,"type":"integer"},"expired":{"minimum":0,"type":"integer"},"healthy":{"description":"Unexpired rows with at least one person.","minimum":0,"type":"integer"},"memberRows":{"description":"Member entitlement rows across every workspace.","minimum":0,"type":"integer"},"partial":{"description":"True when the scan hit its page/time budget; counts are a lower bound.","type":"boolean"},"savedLookups":{"description":"Member entitlements served from the internal cache rather than a fresh BatchData call (every member beyond the first per property).","minimum":0,"type":"integer"},"savingsUsd":{"description":"`savedLookups × unitCostUsd`.","minimum":0,"type":"number"},"total":{"description":"Internal property cache rows — one per enriched property.","minimum":0,"type":"integer"},"unitCostUsd":{"minimum":0,"type":"number"}},"required":["total","expired","empty","healthy","memberRows","savedLookups","costUsd","savingsUsd","unitCostUsd","partial","computedAt"],"type":"object"},"EnrichmentCharge":{"properties":{"at":{"description":"ISO 8601 time of the debit","type":"string"},"credits":{"type":"number"},"refresh":{"description":"True when this charge came from a forced re-run","type":"boolean"}},"required":["at","credits","refresh"],"type":"object"},"EnrichmentListItem":{"properties":{"charged":{"description":"Whether the call that produced the current result debited credits. `null` for results stored before charges were recorded.","nullable":true,"type":"boolean"},"charges":{"description":"Every recorded debit for this property, oldest first. More than one means it was paid for more than once (a `refresh` re-run). `null` when not recorded.","items":{"$ref":"#/components/schemas/EnrichmentCharge"},"nullable":true,"type":"array"},"creditsCharged":{"description":"Total credits debited for this property across every recorded run, including forced re-runs. `null` when not recorded.","nullable":true,"type":"number"},"emailCount":{"description":"Email addresses found across every matched person.","type":"number"},"enrichedAt":{"type":"string"},"personCount":{"type":"number"},"phoneCount":{"description":"Phone numbers found across every matched person. A matched person can have none.","type":"number"},"propertyId":{"type":"string"},"source":{"type":"string"}},"required":["propertyId","enrichedAt","source","personCount","phoneCount","emailCount","charged","creditsCharged","charges"],"type":"object"},"EnrichmentListResponse":{"properties":{"cursor":{"type":"string"},"data":{"items":{"$ref":"#/components/schemas/EnrichmentListItem"},"type":"array"}},"required":["data"],"type":"object"},"EnrichmentReason":{"description":"Pipeline path used to produce this enrichment. Pair with `charged` to drive billing UX; pair with `data.persons` to drive the empty-state UX.","enum":["member_cache_hit","internal_cache_hit","internal_cache_hit_empty","fresh_skip_trace","fresh_skip_trace_empty"],"type":"string"},"EnrichmentResultMeta":{"description":"Per-batch counts BatchData echoed back (or all-zero on cache hits). `matched` > 0 implies a fresh hit; `noMatch` > 0 with `matched: 0` implies a genuine no-match.","properties":{"error":{"minimum":0,"type":"integer"},"matched":{"minimum":0,"type":"integer"},"noMatch":{"minimum":0,"type":"integer"},"requested":{"minimum":0,"type":"integer"}},"required":["requested","matched","noMatch","error"],"type":"object"},"EntityCommunityLending":{"description":"Community Lending — the neighborhood (U.S. Census tract) mix of the loans this entity produced in the selected period: program shares and counts, the averaged neighborhood profile, and the local mortgage market. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100. Every share is taken over `loansWithCommunityData`, NOT over the entity's total production. Two fields are deliberately not 0-100: `avgIncomeVsMetroPct` is a ratio where 100 means parity with the metro (it exceeds 100), and `ruralGradient` is an ordinal 1-10 code. `null` — not an all-null object — when the entity had no tract-resolved loans in the window. Returned by the entity DETAIL routes only (`getOriginator` / `getCompany` / `getBranch`); list rows omit the block. Every key here is also a filter key on the matching list route.","nullable":true,"properties":{"affordableHousingTractCount":{"description":"Loans in qualified affordable-housing neighborhoods, as a count. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"affordableHousingTractPct":{"description":"Share of the entity's tract-resolved loans in qualified neighborhoods for affordable-housing programs, 0-100. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"avgAsianPct":{"description":"Mean Asian (non-Hispanic) share of the population in those neighborhoods, 0-100. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"avgBlackPct":{"description":"Mean Black (non-Hispanic) share of the population in those neighborhoods, 0-100. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"avgDenialRate":{"description":"Mean share of mortgage applications denied in those neighborhoods, 0-100. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"avgFamilyIncome":{"description":"Mean median family income of those neighborhoods, in whole dollars. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"avgHispanicPct":{"description":"Mean Hispanic or Latino share of the population in those neighborhoods, 0-100. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"avgHomeValue":{"description":"Mean median home value across those neighborhoods, in whole dollars — a neighborhood statistic, not the entity's average loan size (`avgLoanAmount`). Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"avgHomeownershipRate":{"description":"Mean owner-occupied share of housing units in those neighborhoods, 0-100. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"avgHouseholdIncome":{"description":"Mean median household income of those neighborhoods, in whole dollars. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"avgIncomeVsMetroPct":{"description":"Mean neighborhood income relative to its metro area, where 100 is parity. Legitimately exceeds 100 — a ratio, not a share. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"avgLowModHouseholdPct":{"description":"Mean HUD block-group low/moderate-income HOUSEHOLD share across those neighborhoods, 0-100 — a finer measure than `lowModIncomeTractPct`, which counts whole neighborhoods. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"avgMedianAge":{"description":"Mean median age of the population in those neighborhoods, in years. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"avgMilesToCollege":{"description":"Mean straight-line distance to the nearest college, in miles. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"avgMilesToSchool":{"description":"Mean straight-line distance to the nearest school, in miles. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"avgMilesToWorship":{"description":"Mean straight-line distance to the nearest place of worship, in miles. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"avgMinorityPct":{"description":"Mean non-white share of the population in those neighborhoods, 0-100. `majorityMinorityTractPct` is the per-neighborhood-threshold form of the same question. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"avgPopulation":{"description":"Mean population of those neighborhoods. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"avgPovertyRate":{"description":"Mean share of the population below the poverty line in those neighborhoods, 0-100. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"avgTractApplications":{"description":"Mean number of mortgage applications reported in those neighborhoods, over the year. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"avgTractLoanVolume":{"description":"Mean mortgage dollar volume reported in those neighborhoods, over the year. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"avgTractOriginations":{"description":"Mean number of mortgage originations reported in those neighborhoods, over the year. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"avgWhiteNonHispanicPct":{"description":"Mean White (non-Hispanic) share of the population in those neighborhoods, 0-100. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"difficultDevelopmentAreaCount":{"description":"Loans in HUD-designated difficult development areas, as a count. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"difficultDevelopmentAreaPct":{"description":"Share of the entity's tract-resolved loans in HUD-designated difficult development areas, 0-100. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"distressedTractCount":{"description":"Loans in distressed-or-underserved neighborhoods, as a count. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"distressedTractPct":{"description":"Share of the entity's tract-resolved loans in distressed-or-underserved nonmetropolitan middle-income neighborhoods, 0-100. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"floodHazardTractCount":{"description":"Loans in a FEMA special flood hazard area, as a count. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"floodHazardTractPct":{"description":"Share of the entity's tract-resolved loans in a FEMA special flood hazard area, 0-100. `predominantFloodZone` names the specific zone. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"loansWithCommunityData":{"description":"How many of the entity's loans in the selected period resolved to a neighborhood — the DENOMINATOR every share in this block is taken over. Read it first: a 100% share off two loans is not a 100% share off two hundred. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"lowModIncomeTractCount":{"description":"Loans in low- or moderate-income neighborhoods, as a count. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"lowModIncomeTractPct":{"description":"Share of the entity's tract-resolved loans in low- or moderate-income neighborhoods under the Community Reinvestment Act, 0-100. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"majorityMinorityTractCount":{"description":"Loans in majority-minority neighborhoods, as a count. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"majorityMinorityTractPct":{"description":"Share of the entity's tract-resolved loans in majority-minority neighborhoods, 0-100. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"opportunityZoneCount":{"description":"Loans in Opportunity Zones, as a count. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"opportunityZonePct":{"description":"Share of the entity's tract-resolved loans in federally designated Opportunity Zones, 0-100. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"predominantFloodZone":{"description":"FEMA flood-zone code most common across those neighborhoods (e.g. `AE`). Null means no special flood hazard area on file. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"string"},"predominantIncomeLevel":{"description":"The relative-income classification most of the entity's loans landed in: low, moderate, middle or upper. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","enum":["low","moderate","middle","upper",null],"nullable":true,"type":"string"},"ruralGradient":{"description":"Mean remoteness of those neighborhoods on an ORDINAL 1-10 scale (1 = metropolitan core, 10 = most remote). A code, not a percent. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"ruralTractCount":{"description":"Loans in rural neighborhoods, as a count. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"ruralTractPct":{"description":"Share of the entity's tract-resolved loans in rural neighborhoods, 0-100. `ruralGradient` is the finer, ordinal form. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"usdaEligibleTractCount":{"description":"Loans in USDA-eligible neighborhoods, as a count. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"usdaEligibleTractPct":{"description":"Share of the entity's tract-resolved loans in neighborhoods eligible for USDA rural housing programs, 0-100. Broader than `ruralTractPct`. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"}},"required":["loansWithCommunityData","lowModIncomeTractPct","lowModIncomeTractCount","majorityMinorityTractPct","majorityMinorityTractCount","ruralTractPct","ruralTractCount","opportunityZonePct","opportunityZoneCount","affordableHousingTractPct","affordableHousingTractCount","floodHazardTractPct","floodHazardTractCount","usdaEligibleTractPct","usdaEligibleTractCount","distressedTractPct","distressedTractCount","difficultDevelopmentAreaPct","difficultDevelopmentAreaCount","predominantIncomeLevel","predominantFloodZone","avgHouseholdIncome","avgFamilyIncome","avgHomeValue","avgMedianAge","avgPopulation","avgMinorityPct","avgIncomeVsMetroPct","avgDenialRate","avgHomeownershipRate","avgPovertyRate","avgLowModHouseholdPct","avgWhiteNonHispanicPct","avgBlackPct","avgAsianPct","avgHispanicPct","avgTractOriginations","avgTractApplications","avgTractLoanVolume","ruralGradient","avgMilesToSchool","avgMilesToCollege","avgMilesToWorship"],"type":"object"},"EntityPredominantFloodZoneFilterValue":{"anyOf":[{"description":"One of (case-insensitive): A, AE, AH, AO, A99, V, VE","enum":["A","AE","AH","AO","A99","V","VE"],"type":"string"},{"description":"Match any of these values","items":{"description":"One of (case-insensitive): A, AE, AH, AO, A99, V, VE","enum":["A","AE","AH","AO","A99","V","VE"],"type":"string"},"type":"array"},{"description":"Fuzzy text match","properties":{"match":{"type":"string"}},"required":["match"],"type":"object"},{"nullable":true}]},"EntityPredominantIncomeLevelFilterValue":{"anyOf":[{"description":"One of (case-insensitive): low, moderate, middle, upper","enum":["low","moderate","middle","upper"],"type":"string"},{"description":"Match any of these values","items":{"description":"One of (case-insensitive): low, moderate, middle, upper","enum":["low","moderate","middle","upper"],"type":"string"},"type":"array"},{"description":"Fuzzy text match","properties":{"match":{"type":"string"}},"required":["match"],"type":"object"},{"nullable":true}]},"ErrorResponse":{"properties":{"error":{"description":"Error message","type":"string"}},"required":["error"],"type":"object"},"FieldCondition":{"properties":{"field":{"type":"string"},"op":{"$ref":"#/components/schemas/FilterOp"},"type":{"enum":["filter"],"type":"string"},"value":{"description":"Comparison value","nullable":true}},"required":["type","field","op"],"type":"object"},"File":{"properties":{"class":{"description":"`standard` (the default) or `protected`. A protected file is shared with named people only, opens through a one-time link, records every access in its access log, and an agent can open it only after the person approves it in that conversation.","enum":["standard","protected"],"type":"string"},"contentPath":{"description":"The file's permanent link. Each open is checked again and redirects to a short-lived download.","type":"string"},"createdAt":{"type":"string"},"id":{"type":"string"},"kind":{"description":"What it is, for icons and filters: `csv`, `pdf`, `image`, `spreadsheet`…","type":"string"},"legalHold":{"type":"boolean"},"links":{"description":"What the file is attached to.","items":{"type":"string"},"type":"array"},"mediaType":{"type":"string"},"metadata":{"additionalProperties":{"nullable":true},"description":"Free-form data that belongs to the app that made the file.","type":"object"},"name":{"type":"string"},"organizationId":{"type":"string"},"origin":{"description":"How it arrived: `upload`, `agent`, `export`, `system`…","type":"string"},"ownerId":{"type":"string"},"provenance":{"additionalProperties":{"type":"string"},"description":"Where it came from (app, chat, run, message, export job). Set once.","type":"object"},"readyAt":{"nullable":true,"type":"string"},"retainUntil":{"nullable":true,"type":"string"},"revision":{"description":"Goes up by one each time the contents are replaced.","type":"integer"},"role":{"description":"Your role on the file; `null` when you see it as an organization admin.","enum":["owner","editor","viewer",null],"nullable":true,"type":"string"},"sha256":{"description":"Hex SHA-256 of the bytes. Empty while `sha256Pending` is true.","type":"string"},"sha256Pending":{"description":"True while the SHA-256 is not known yet: the upload (or the latest replacement) declared none, so it is computed in the background after `complete`, usually within a minute or two for large files. The file opens and downloads as usual meanwhile; `sha256` is empty until it is set.","type":"boolean"},"sizeBytes":{"type":"integer"},"status":{"description":"`uploading` (waiting for the bytes), `scanning` (being checked for malware), `ready`, `rejected` (see `statusReason`; the bytes were removed), or `reencrypting` (just made protected and being encrypted again; it lists, but cannot be opened, replaced, shared, linked or deleted until it is `ready`, usually within a minute).","type":"string"},"statusReason":{"description":"Why the file is in its status, or `null`. For `rejected`: `malware` (it did not pass the malware check); `unscannable` (it could not be checked for malware, for example because it is password-protected or encrypted; upload a version that can be checked); `size_mismatch` or `checksum_mismatch` (the bytes were not what was declared; start a new upload). For `reencrypting`: `reencrypt_failed` (encrypting it did not finish; it stays closed, and making it protected again retries).","nullable":true,"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","mediaType","sizeBytes","sha256","sha256Pending","revision","origin","kind","class","status","statusReason","ownerId","organizationId","provenance","metadata","links","role","contentPath","retainUntil","legalHold","createdAt","updatedAt","readyAt"],"type":"object"},"FileAccessLogEntry":{"properties":{"actor":{"additionalProperties":{"nullable":true},"description":"Who: `userId`, `mode` (`user`, `agent`, `agent_with_user`, `system`), and the agent, chat, run and case when there was one.","type":"object"},"app":{"nullable":true,"type":"string"},"event":{"description":"`viewed`, `download_minted`, `downloaded`, `shared`, `unshared`, `linked`, `unlinked`, `updated`, `class_raised`, `retention_changed`, `deleted`, `created`, `derived`, `revised`, `agent_approved`.","type":"string"},"fileId":{"type":"string"},"fileName":{"nullable":true,"type":"string"},"id":{"type":"string"},"ip":{"nullable":true,"type":"string"},"occurredAt":{"type":"string"},"reason":{"description":"Why it was denied (`no_access`, `insufficient_role`, `agent_not_approved`, `human_required`, `share_scope`, `token_used`, `token_expired`, `token_revoked`), or a note on an allowed entry (`org_admin`).","nullable":true,"type":"string"},"result":{"enum":["allowed","denied"],"type":"string"},"userAgent":{"nullable":true,"type":"string"}},"required":["id","fileId","fileName","event","result","reason","actor","app","ip","userAgent","occurredAt"],"type":"object"},"FileAgentApprovalCreate":{"additionalProperties":false,"properties":{"chatId":{"description":"The conversation the agent may open it in.","pattern":"^[A-Za-z0-9_.:-]{1,200}$","type":"string"}},"required":["chatId"],"type":"object"},"FileCreate":{"additionalProperties":false,"properties":{"class":{"description":"`standard` (the default) or `protected`. A protected file is shared with named people only, opens through a one-time link, records every access in its access log, and an agent can open it only after the person approves it in that conversation.","enum":["standard","protected"],"type":"string"},"derivedFrom":{"description":"Ids of the files this one was made from. If any is protected, the new file is protected too. You must be able to open each one.","items":{"pattern":"^file_[0-9a-f]{32}$","type":"string"},"maxItems":20,"type":"array"},"kind":{"description":"Defaults from the type and extension.","pattern":"^[a-z][a-z0-9_]{0,31}$","type":"string"},"links":{"items":{"description":"What the file belongs to, as `<type>:<id>`: `crm_record` (a CRM person or company, by its record id, e.g. `crm_record:lo:123`), `studio_table`, `ask_chat`, `ask_project` or `export_job`. You must be able to see a CRM record to link a file to it, and anyone who can see the record can view the standard files linked to it.","example":"ask_chat:chat_123","maxLength":220,"minLength":3,"type":"string"},"maxItems":20,"type":"array"},"mediaType":{"example":"text/csv","maxLength":255,"minLength":1,"type":"string"},"metadata":{"additionalProperties":{"nullable":true},"type":"object"},"name":{"description":"The file name, with its extension.","example":"client-list.csv","maxLength":255,"minLength":1,"type":"string"},"origin":{"description":"Defaults to `upload`.","pattern":"^[a-z][a-z0-9_]{0,31}$","type":"string"},"provenance":{"additionalProperties":{"maxLength":200,"type":"string"},"type":"object"},"sha256":{"description":"Hex SHA-256 of the bytes, if you have it: the upload is then refused when the bytes differ. Leave it out and it is computed in the background after the upload completes (`sha256Pending` is true until then).","pattern":"^[0-9a-fA-F]{64}$","type":"string"},"sizeBytes":{"description":"Exact size in bytes (up to 5 GB).","maximum":5368709120,"minimum":1,"type":"integer"}},"required":["name","mediaType","sizeBytes"],"type":"object"},"FileError":{"properties":{"code":{"description":"Stable code: `not_found`, `forbidden`, `no_organization`, `unauthenticated`, `invalid_request`, `invalid_cursor`, `invalid_principal`, `principal_not_in_organization`, `invalid_link_target`, `link_target_not_supported`, `link_not_found`, `share_not_found`, `upload_missing`, `upload_rejected`, `size_mismatch`, `checksum_mismatch`, `not_ready`, `legal_hold`, `retention`, `protected_share_scope`, `agent_not_approved`, `human_required`, `not_protected`, `invalid_derived_from`, `malware`, `unscannable`, `file_busy`, `access_log_unavailable`, `scan_pending`, `revision_pending`, `storage_unavailable`, `membership_unavailable`.","type":"string"},"error":{"description":"What went wrong, in plain language.","type":"string"}},"required":["error","code"],"type":"object"},"FileLinkCreate":{"additionalProperties":false,"properties":{"target":{"description":"What the file belongs to, as `<type>:<id>`: `crm_record` (a CRM person or company, by its record id, e.g. `crm_record:lo:123`), `studio_table`, `ask_chat`, `ask_project` or `export_job`. You must be able to see a CRM record to link a file to it, and anyone who can see the record can view the standard files linked to it.","example":"ask_chat:chat_123","maxLength":220,"minLength":3,"type":"string"}},"required":["target"],"type":"object"},"FilePatch":{"additionalProperties":false,"properties":{"class":{"description":"Raise the class to protected (the owner only, a ready file). It can never be lowered. Team and organization shares are removed, and the file is `reencrypting` until it is encrypted again (usually within a minute). Sending it again for a file still `reencrypting` retries.","enum":["protected"],"type":"string"},"legalHold":{"description":"Put the file under a legal hold, or lift it (the owner or an organization admin). A file under a hold cannot be deleted.","type":"boolean"},"metadata":{"additionalProperties":{"nullable":true},"type":"object"},"name":{"maxLength":255,"minLength":1,"type":"string"},"retainUntil":{"description":"Keep the file until this time (the owner or an organization admin); `null` clears it. The file cannot be deleted before then.","format":"date-time","nullable":true,"type":"string"}},"type":"object"},"FileRevisionCreate":{"additionalProperties":false,"properties":{"mediaType":{"description":"The new type, if it changed.","maxLength":255,"minLength":1,"type":"string"},"sha256":{"description":"Hex SHA-256 of the new bytes, if you have it. Leave it out and it is computed in the background after complete (`sha256Pending` is true until then).","pattern":"^[0-9a-fA-F]{64}$","type":"string"},"sizeBytes":{"description":"Exact size of the new bytes.","maximum":5368709120,"minimum":1,"type":"integer"}},"required":["sizeBytes"],"type":"object"},"FileShare":{"properties":{"createdAt":{"type":"string"},"principal":{"type":"string"},"role":{"enum":["viewer","editor"],"type":"string"},"sharedBy":{"type":"string"}},"required":["principal","role","sharedBy","createdAt"],"type":"object"},"FileShareCreate":{"additionalProperties":false,"properties":{"principal":{"description":"Who the file is shared with: `user:<userId>`, `team:<teamId>`, or `org` for everyone in your organization.","example":"user:usr_123","maxLength":140,"minLength":3,"type":"string"},"role":{"default":"viewer","enum":["viewer","editor"],"type":"string"}},"required":["principal"],"type":"object"},"FilterNode":{"anyOf":[{"$ref":"#/components/schemas/AndFilter"},{"$ref":"#/components/schemas/OrFilter"},{"$ref":"#/components/schemas/NotFilter"},{"$ref":"#/components/schemas/FieldCondition"}]},"FilterOp":{"description":"Comparison operator. `exists` means the field has a REAL value: on fields whose source records an unknown as an in-domain value (e.g. `beds`, `squareFeet`, `lotSquareFeet`, where an unrecorded measurement is stored as `0`), those docs count as NOT existing. `neq` keeps docs with no value — it removes only what is known to equal the value, matching the reading of an exclusion.","enum":["eq","neq","gt","gte","lt","lte","between","in","match","geoDistance","exists"],"type":"string"},"FootprintProductFilter":{"additionalProperties":false,"description":"Correlate a product INSIDE this lender relationship — 'FHA business through this lender'.","properties":{"avgLoanAmount":{"allOf":[{"$ref":"#/components/schemas/FootprintRange"},{"description":"Mean loan size of this product INSIDE the named market."}]},"key":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}],"description":"Product key(s), lowercase — e.g. `fha`, `conventional`, `va` for `loanType`; `purchase`, `refinance` for `transactionType`."},"mix":{"description":"Which product breakdown inside the market — loan type (fha, conventional, va, …) or transaction type (purchase, refinance, …).","enum":["loanType","transactionType"],"type":"string"},"shareOfUnits":{"allOf":[{"$ref":"#/components/schemas/FootprintRange"},{"description":"This product's share of the market's loan count, as a 0–100 PERCENT (not a 0–1 fraction)."}]},"shareOfVolume":{"allOf":[{"$ref":"#/components/schemas/FootprintRange"},{"description":"This product's share of the market's dollar volume, as a 0–100 PERCENT (not a 0–1 fraction)."}]},"units":{"allOf":[{"$ref":"#/components/schemas/FootprintRange"},{"description":"Loan count of this product INSIDE the named market."}]},"volume":{"allOf":[{"$ref":"#/components/schemas/FootprintRange"},{"description":"Dollar volume of this product INSIDE the named market, for the selected period."}]}},"type":"object"},"FootprintRange":{"additionalProperties":false,"description":"Dollar volume of the agent's sales financed BY this lender during the selected period — evaluated inside that lender's own bucket, not against the agent's total.","properties":{"gt":{"type":"number"},"gte":{"type":"number"},"lt":{"type":"number"},"lte":{"type":"number"}},"type":"object"},"ForecastError":{"properties":{"code":{"enum":["forecast_interval","forecast_measure","forecast_history","forecast_unavailable"],"type":"string"},"error":{"description":"Error message","type":"string"}},"required":["error"],"type":"object"},"ForecastPoint":{"properties":{"date":{"description":"First day of the forecast month, `yyyy-MM-dd`.","type":"string"},"p10":{"type":"number"},"p50":{"description":"Median forecast.","type":"number"},"p90":{"type":"number"}},"required":["date","p10","p50","p90"],"type":"object"},"ForecastRequest":{"description":"Append a zero-shot forecast (Amazon Chronos-2) to the time series. Monthly interval only. The history in `current` is returned unchanged; the forecast starts the month after `forecast.asOf`.","properties":{"horizon":{"default":6,"description":"Months ahead to forecast, counted from `asOf` (1–12).","maximum":12,"minimum":1,"type":"integer"},"scenario":{"default":{"rate30y":"hold"},"description":"Known-future covariates the forecast conditions on. Omit for `hold`.","properties":{"rate30y":{"anyOf":[{"enum":["hold","fall","rise"],"type":"string"},{"items":{"maximum":25,"minimum":0,"type":"number"},"maxItems":12,"minItems":1,"type":"array"}],"default":"hold","description":"Path of the 30-year fixed mortgage rate over the forecast horizon, one value per month, as a plain percent (6.5 = 6.5%). Presets: `hold` keeps the latest weekly Freddie Mac PMMS reading flat; `fall` glides it down 1.0 point linearly over the horizon; `rise` glides it up 1.0 point. An explicit array must have exactly `horizon` entries. The rate is an INPUT the model conditions on, never something it predicts."}},"type":"object"}},"type":"object"},"ForecastResponse":{"description":"Present only when the request carried `forecast`. History above is unchanged; the forecast starts the month after `forecast.asOf`.","properties":{"asOf":{"description":"First day of the last month of history the model saw (`yyyy-MM-dd`). The forecast begins the following month.","type":"string"},"cached":{"description":"True when served from cache (same request, same data version).","type":"boolean"},"confidence":{"description":"Support tier: `high` ≥ 100/month, `medium` ≥ 20/month, `low` below. Below 20/month the series is mostly noise and the band is wide; treat `low` as a shape, not a number.","enum":["high","medium","low"],"type":"string"},"horizon":{"type":"integer"},"interval":{"enum":["monthly"],"type":"string"},"model":{"description":"Model id that produced the quantiles.","type":"string"},"points":{"items":{"$ref":"#/components/schemas/ForecastPoint"},"type":"array"},"scenario":{"description":"The resolved covariate path the forecast conditioned on, one value per horizon month. `null` when the rate series was unavailable and the forecast ran without it.","nullable":true,"properties":{"rate30y":{"items":{"type":"number"},"type":"array"}},"required":["rate30y"],"type":"object"},"segments":{"description":"Per-segment forecasts when the request carried `segment`, one per label (top 12 by history total). Independent forecasts — they are not reconciled to sum to the total.","items":{"$ref":"#/components/schemas/ForecastSegment"},"type":"array"},"support":{"description":"Mean monthly value of the forecast target over the last 12 months of history the model saw. The number behind `confidence`.","type":"number"},"trimmedMonths":{"description":"Trailing months dropped from history before forecasting because they are still filling in (ingest lag on application months; closing lag on originated measures).","type":"integer"}},"required":["model","asOf","trimmedMonths","horizon","interval","scenario","support","confidence","points","cached"],"type":"object"},"ForecastSegment":{"properties":{"confidence":{"description":"Support tier: `high` ≥ 100/month, `medium` ≥ 20/month, `low` below. Below 20/month the series is mostly noise and the band is wide; treat `low` as a shape, not a number.","enum":["high","medium","low"],"type":"string"},"label":{"description":"Segment label, never blank. Documents the dimension could not bucket are reported on the time-series history as its `(unknown)` segment; that disclosure is not a category and is not forecast.","type":"string"},"points":{"items":{"$ref":"#/components/schemas/ForecastPoint"},"type":"array"},"support":{"description":"Mean monthly value of the forecast target over the last 12 months of history the model saw. The number behind `confidence`.","type":"number"}},"required":["label","support","confidence","points"],"type":"object"},"GeoBounds":{"description":"The cell's extent","properties":{"east":{"example":-97.65,"maximum":180,"minimum":-180,"type":"number"},"north":{"example":30.33,"maximum":90,"minimum":-90,"type":"number"},"south":{"example":30.2,"maximum":90,"minimum":-90,"type":"number"},"west":{"example":-97.85,"maximum":180,"minimum":-180,"type":"number"}},"required":["north","south","east","west"],"type":"object"},"GeoBoundsFilterValue":{"description":"Map viewport `{north, south, east, west}` in degrees: only listings inside the box. `west` greater than `east` crosses the antimeridian. Unlike `geoPoint` (a radius) this is the shape a map reports. Applies to list, count and analytics alike.","nullable":true,"properties":{"east":{"example":-97.65,"maximum":180,"minimum":-180,"type":"number"},"north":{"example":30.33,"maximum":90,"minimum":-90,"type":"number"},"south":{"example":30.2,"maximum":90,"minimum":-90,"type":"number"},"west":{"example":-97.85,"maximum":180,"minimum":-180,"type":"number"}},"required":["north","south","east","west"],"type":"object"},"GeoFilterValue":{"description":"Radius search — `{ lat, lon, radius }` (e.g. radius \"15mi\" or \"24km\") — around any office on the agent's record; with `locationSource` `office` the CURRENT office, `production` their transactions.","nullable":true,"properties":{"lat":{"type":"number"},"lon":{"type":"number"},"radius":{"example":"25mi","type":"string"}},"required":["lat","lon","radius"],"type":"object"},"GetSavedFilterResult":{"properties":{"data":{"$ref":"#/components/schemas/SavedFilter"}},"required":["data"],"type":"object"},"GetSavedFilterSharesResult":{"properties":{"data":{"$ref":"#/components/schemas/SavedFilterSharing"}},"required":["data"],"type":"object"},"GrantSavedFilterAccessRequest":{"additionalProperties":false,"properties":{"permission":{"allOf":[{"$ref":"#/components/schemas/SavedFilterGrantPermission"},{"description":"Defaults to `viewer`."}]},"userId":{"minLength":1,"type":"string"}},"required":["userId"],"type":"object"},"GrantSavedFilterAccessResult":{"properties":{"data":{"properties":{"granted":{"type":"boolean"}},"required":["granted"],"type":"object"}},"required":["data"],"type":"object"},"HeadcountPoint":{"properties":{"active":{"description":"Distinct loan officers with any employment record here overlapping the month.","type":"number"},"entered":{"description":"Hires in the month.","type":"number"},"exited":{"description":"Complete departures in the month.","type":"number"},"net":{"type":"number"},"period":{"description":"Month, `YYYY-MM`.","type":"string"}},"required":["period","active","entered","exited","net"],"type":"object"},"HomeValueActiveZipsData":{"properties":{"data":{"properties":{"zips":{"items":{"type":"string"},"type":"array"}},"required":["zips"],"type":"object"}},"required":["data"],"type":"object"},"HomeValueActivityData":{"properties":{"data":{"properties":{"cursor":{"nullable":true,"type":"string"},"items":{"items":{"$ref":"#/components/schemas/HomeValueActivityItem"},"type":"array"}},"required":["items","cursor"],"type":"object"}},"required":["data"],"type":"object"},"HomeValueActivityItem":{"properties":{"borrower":{"properties":{"firstName":{"type":"string"},"lastName":{"type":"string"}},"type":"object"},"ctaId":{"nullable":true,"type":"string"},"ctaKind":{"nullable":true,"type":"string"},"cycleId":{"type":"string"},"enrollmentId":{"type":"string"},"eventType":{"type":"string"},"id":{"type":"string"},"loUserId":{"type":"string"},"meta":{"additionalProperties":{"nullable":true},"type":"object"},"mmPropertyId":{"nullable":true,"type":"string"},"occurredAt":{"type":"number"}},"required":["id","eventType","occurredAt","enrollmentId","cycleId","loUserId","ctaId","ctaKind","meta","borrower","mmPropertyId"],"type":"object"},"HomeValueBeacon":{"properties":{"eventType":{"enum":["view","scroll_50","scroll_100","cta_click","calc_adjust","calc_complete","tab_view"],"type":"string"},"meta":{"additionalProperties":{"nullable":true},"description":"Behavioral only (no raw financials). cta_click: { ctaId: string, kind: \"call\" | \"text\" | \"email\" | \"apply\" | \"external\", href?: string } — promoted to the cta_id / cta_kind columns on write. calc_complete: { tool: \"refi\" | \"heloc\" | \"cash_out\", amountBucket?: \"lt_50k\" | \"50k_100k\" | \"100k_250k\" | \"gte_250k\" }.","type":"object"}},"required":["eventType"],"type":"object"},"HomeValueBeaconAccepted":{"properties":{"data":{"properties":{"accepted":{"type":"boolean"}},"required":["accepted"],"type":"object"}},"required":["data"],"type":"object"},"HomeValueBorrower":{"properties":{"email":{"format":"email","type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"phone":{"type":"string"}},"type":"object"},"HomeValueBulkData":{"properties":{"data":{"$ref":"#/components/schemas/HomeValueBulkResult"}},"required":["data"],"type":"object"},"HomeValueBulkEnroll":{"properties":{"items":{"items":{"properties":{"borrower":{"$ref":"#/components/schemas/HomeValueBorrower"},"loanOverrides":{"$ref":"#/components/schemas/HomeValueLoanOverrides"},"mmPropertyId":{"minLength":1,"type":"string"},"propertyOverrides":{"$ref":"#/components/schemas/HomeValuePropertyOverrides"},"sourceLoanId":{"type":"string"},"valuations":{"$ref":"#/components/schemas/HomeValueValuations"}},"required":["mmPropertyId","borrower"],"type":"object"},"maxItems":1000,"minItems":1,"type":"array"}},"required":["items"],"type":"object"},"HomeValueBulkResult":{"properties":{"batchId":{"type":"string"},"results":{"items":{"properties":{"error":{"type":"string"},"id":{"type":"string"},"index":{"type":"integer"},"status":{"enum":["created","error"],"type":"string"}},"required":["index","status"],"type":"object"},"type":"array"}},"required":["batchId","results"],"type":"object"},"HomeValueCreateEnrollment":{"properties":{"borrower":{"$ref":"#/components/schemas/HomeValueBorrower"},"cadence":{"type":"string"},"loanOverrides":{"$ref":"#/components/schemas/HomeValueLoanOverrides"},"mmPropertyId":{"minLength":1,"type":"string"},"propertyOverrides":{"$ref":"#/components/schemas/HomeValuePropertyOverrides"},"sourceLoanId":{"type":"string"},"valuations":{"$ref":"#/components/schemas/HomeValueValuations"}},"required":["mmPropertyId","borrower"],"type":"object"},"HomeValueCurrentDisclosures":{"properties":{"bullets":{"description":"The required disclosures, in order, rendered with the caller's company name.","items":{"type":"string"},"type":"array"},"companyDisclosurePlaceholder":{"description":"Shown where the company's own disclosures go when it has none.","type":"string"},"shortDisclaimer":{"type":"string"},"version":{"description":"The current disclosures version. Acknowledge by PUTting it as `disclosuresVersion`.","type":"string"}},"required":["version","shortDisclaimer","bullets","companyDisclosurePlaceholder"],"type":"object"},"HomeValueCycleList":{"properties":{"data":{"properties":{"cursor":{"nullable":true,"type":"string"},"items":{"items":{"$ref":"#/components/schemas/HomeValueCycleSummary"},"type":"array"}},"required":["items","cursor"],"type":"object"}},"required":["data"],"type":"object"},"HomeValueCyclePayload":{"description":"Versioned cycle render payload; read payload_version to branch.","type":"object"},"HomeValueCycleRead":{"properties":{"cycleMonth":{"type":"string"},"id":{"type":"string"},"market":{"$ref":"#/components/schemas/HomeValueMarketV1"},"payload":{"$ref":"#/components/schemas/HomeValueCyclePayload"},"payloadVersion":{"type":"integer"},"sentAt":{"nullable":true,"type":"number"}},"required":["id","cycleMonth","payloadVersion","payload","sentAt","market"],"type":"object"},"HomeValueCycleReadData":{"properties":{"data":{"$ref":"#/components/schemas/HomeValueCycleRead"}},"required":["data"],"type":"object"},"HomeValueCycleSummary":{"properties":{"approvedAt":{"nullable":true,"type":"number"},"createdAt":{"type":"number"},"cycleMonth":{"type":"string"},"firstViewedAt":{"nullable":true,"type":"number"},"id":{"type":"string"},"payloadVersion":{"type":"integer"},"sentAt":{"nullable":true,"type":"number"},"status":{"description":"`skipped` = the report composed to nothing. `declined` = an LO reviewed a held cycle and chose not to send it. Distinct on purpose: only one of them is a decision someone made.","enum":["pending_approval","ready","sent","skipped","declined"],"type":"string"}},"required":["id","cycleMonth","status","payloadVersion","approvedAt","sentAt","firstViewedAt","createdAt"],"type":"object"},"HomeValueCycleSummaryData":{"properties":{"data":{"$ref":"#/components/schemas/HomeValueCycleSummary"}},"required":["data"],"type":"object"},"HomeValueEngagement":{"properties":{"byType":{"additionalProperties":{"type":"number"},"type":"object"},"calcCompletes":{"type":"number"},"calcCompletesByTool":{"additionalProperties":{"type":"number"},"type":"object"},"ctaClicks":{"type":"number"},"ctr":{"nullable":true,"type":"number"},"emailClicked":{"type":"number"},"emailDelivered":{"type":"number"},"emailOpened":{"type":"number"},"estimatedOpenRate":{"nullable":true,"type":"number"},"uniqueViews":{"type":"number"},"views":{"type":"number"}},"required":["byType","emailDelivered","emailOpened","emailClicked","views","uniqueViews","ctaClicks","calcCompletes","calcCompletesByTool","ctr","estimatedOpenRate"],"type":"object"},"HomeValueEngagementByEnrollmentData":{"properties":{"data":{"properties":{"items":{"items":{"$ref":"#/components/schemas/HomeValueEnrollmentEngagement"},"type":"array"},"truncated":{"description":"True when the workspace has more than 500 enrollments and rows were dropped. Never silent.","type":"boolean"},"windowDays":{"type":"number"}},"required":["windowDays","items","truncated"],"type":"object"}},"required":["data"],"type":"object"},"HomeValueEngagementFull":{"allOf":[{"$ref":"#/components/schemas/HomeValueEngagement"},{"properties":{"kpis":{"$ref":"#/components/schemas/HomeValueEngagementKpis"},"series":{"items":{"$ref":"#/components/schemas/HomeValueEngagementSeriesPoint"},"type":"array"},"windowDays":{"type":"number"}},"required":["windowDays","kpis","series"],"type":"object"}]},"HomeValueEngagementFullData":{"properties":{"data":{"$ref":"#/components/schemas/HomeValueEngagementFull"}},"required":["data"],"type":"object"},"HomeValueEngagementKpis":{"properties":{"clickThroughRate":{"nullable":true,"type":"number"},"deliverRate":{"nullable":true,"type":"number"},"emailsBounced":{"type":"number"},"emailsSent":{"type":"number"},"enrolledBorrowers":{"type":"number"},"newLeads":{"type":"number"},"openRate":{"nullable":true,"type":"number"},"unsubscribeRate":{"nullable":true,"type":"number"}},"required":["enrolledBorrowers","emailsSent","emailsBounced","deliverRate","openRate","clickThroughRate","newLeads","unsubscribeRate"],"type":"object"},"HomeValueEngagementSeriesPoint":{"properties":{"clicks":{"type":"number"},"date":{"type":"string"},"opens":{"type":"number"}},"required":["date","opens","clicks"],"type":"object"},"HomeValueEnrollment":{"properties":{"borrower":{"$ref":"#/components/schemas/HomeValueBorrower"},"cadence":{"type":"string"},"createdAt":{"type":"number"},"gateKey":{"type":"string"},"id":{"type":"string"},"lastSentAt":{"description":"Epoch ms of the most recent report send for this borrower, across all cycles. Null when nothing has gone out yet.","nullable":true,"type":"number"},"lastViewedAt":{"description":"Epoch ms of the last time the borrower opened a report we sent. Null when they have never opened one.","nullable":true,"type":"number"},"loUserId":{"type":"string"},"loanOverrides":{"$ref":"#/components/schemas/HomeValueLoanOverrides"},"mmPropertyId":{"type":"string"},"nextSendAt":{"nullable":true,"type":"number"},"optInBatchId":{"nullable":true,"type":"string"},"pausedReason":{"nullable":true,"type":"string"},"propertyOverrides":{"$ref":"#/components/schemas/HomeValuePropertyOverrides"},"refinancedAt":{"description":"When the scheduler re-pointed `sourceLoanId` at a refinance recorded after enrollment. Non-null means the borrower's original loan was replaced and any loan-fact overrides describing it were cleared.","nullable":true,"type":"number"},"soldDetectedAt":{"description":"When a purchase was recorded on the property after enrollment — the borrower has probably sold and moved. Their cycles are held for review rather than sent. An inference from recorded liens, never an automatic unsubscribe: the LO decides.","nullable":true,"type":"number"},"sourceLoanId":{"nullable":true,"type":"string"},"status":{"$ref":"#/components/schemas/HomeValueStatus"},"suppression":{"$ref":"#/components/schemas/HomeValueSuppression"},"updatedAt":{"type":"number"},"valuations":{"$ref":"#/components/schemas/HomeValueValuations"}},"required":["id","loUserId","mmPropertyId","sourceLoanId","borrower","loanOverrides","propertyOverrides","status","pausedReason","gateKey","cadence","nextSendAt","lastSentAt","lastViewedAt","optInBatchId","suppression","valuations","refinancedAt","soldDetectedAt","createdAt","updatedAt"],"type":"object"},"HomeValueEnrollmentData":{"properties":{"data":{"$ref":"#/components/schemas/HomeValueEnrollment"}},"required":["data"],"type":"object"},"HomeValueEnrollmentEngagement":{"properties":{"calcCompletes":{"type":"number"},"clicks":{"type":"number"},"enrollmentId":{"type":"string"},"highIntent":{"description":"A high-intent CTA click or a completed calculation within the window.","type":"boolean"},"lastCtaKind":{"description":"Set only when `lastEventType` is `cta_click`; null otherwise.","nullable":true,"type":"string"},"lastEventAt":{"description":"Epoch ms of the borrower's most recent event. ALL-TIME, not windowed.","nullable":true,"type":"number"},"lastEventType":{"nullable":true,"type":"string"},"views":{"type":"number"}},"required":["enrollmentId","lastEventAt","lastEventType","lastCtaKind","views","clicks","calcCompletes","highIntent"],"type":"object"},"HomeValueEnrollmentList":{"properties":{"data":{"properties":{"cursor":{"nullable":true,"type":"string"},"items":{"items":{"$ref":"#/components/schemas/HomeValueEnrollment"},"type":"array"}},"required":["items","cursor"],"type":"object"}},"required":["data"],"type":"object"},"HomeValueHeldCycle":{"properties":{"borrowerFirstName":{"nullable":true,"type":"string"},"cycle":{"$ref":"#/components/schemas/HomeValueCycleSummary"},"enrollmentId":{"type":"string"},"holdReason":{"description":"Why the cycle is waiting. `value_drop` — the new value is far below the last one actually sent. `sold` — a purchase was recorded on the property after enrollment, so the borrower has probably moved.","enum":["sold","value_drop"],"type":"string"}},"required":["cycle","enrollmentId","borrowerFirstName","holdReason"],"type":"object"},"HomeValueHeldCycleList":{"properties":{"cursor":{"nullable":true,"type":"string"},"items":{"items":{"$ref":"#/components/schemas/HomeValueHeldCycle"},"type":"array"}},"required":["items","cursor"],"type":"object"},"HomeValueHeldCycles":{"properties":{"data":{"$ref":"#/components/schemas/HomeValueHeldCycleList"}},"required":["data"],"type":"object"},"HomeValueLoanOverrides":{"properties":{"amount":{"type":"number"},"balance":{"type":"number"},"downPayment":{"type":"number"},"hasPmi":{"type":"boolean"},"originationDate":{"type":"string"},"rate":{"type":"number"},"termMonths":{"type":"integer"}},"type":"object"},"HomeValueLoanOverridesPatch":{"properties":{"amount":{"nullable":true,"type":"number"},"balance":{"nullable":true,"type":"number"},"downPayment":{"nullable":true,"type":"number"},"hasPmi":{"nullable":true,"type":"boolean"},"originationDate":{"nullable":true,"type":"string"},"rate":{"nullable":true,"type":"number"},"termMonths":{"nullable":true,"type":"integer"}},"type":"object"},"HomeValueMarketIndex":{"properties":{"asOf":{"type":"string"},"months":{"items":{"$ref":"#/components/schemas/HomeValueMarketIndexMonth"},"type":"array"},"zip":{"type":"string"}},"required":["zip","asOf","months"],"type":"object"},"HomeValueMarketIndexData":{"properties":{"data":{"$ref":"#/components/schemas/HomeValueMarketIndex"}},"required":["data"],"type":"object"},"HomeValueMarketIndexInput":{"properties":{"asOf":{"type":"string"},"months":{"items":{"$ref":"#/components/schemas/HomeValueMarketIndexMonth"},"minItems":1,"type":"array"}},"required":["asOf","months"],"type":"object"},"HomeValueMarketIndexMonth":{"properties":{"month":{"type":"string"},"value":{"type":"number"}},"required":["month","value"],"type":"object"},"HomeValueMarketV1":{"nullable":true,"properties":{"demand":{"properties":{"score":{"type":"number"},"tier":{"enum":["strong","healthy","soft","thin"],"type":"string"}},"required":["score","tier"],"type":"object"},"lending":{"properties":{"appCount":{"type":"number"},"avgRatePct":{"type":"number"},"firstTimeBuyerShare":{"type":"number"},"medianLoanAmount":{"type":"number"},"purchaseShare":{"type":"number"}},"required":["appCount"],"type":"object"},"momPct":{"type":"number"},"sales":{"properties":{"count":{"type":"number"},"medianDomDays":{"type":"number"},"medianSoldPrice":{"type":"number"}},"required":["count"],"type":"object"},"valueHistory":{"items":{"properties":{"month":{"type":"string"},"value":{"type":"number"}},"required":["month","value"],"type":"object"},"type":"array"},"yoyPct":{"type":"number"},"zip":{"type":"string"}},"required":["zip"],"type":"object"},"HomeValueNeighborhoodData":{"properties":{"data":{"properties":{"neighborhood":{"$ref":"#/components/schemas/HomeValueNeighborhoodV1"}},"required":["neighborhood"],"type":"object"}},"required":["data"],"type":"object"},"HomeValueNeighborhoodV1":{"nullable":true,"properties":{"loanMix":{"properties":{"cashOutSharePct":{"type":"number"},"conventionalPct":{"type":"number"},"fhaPct":{"type":"number"},"jumboPct":{"type":"number"},"refiSharePct":{"type":"number"},"vaPct":{"type":"number"}},"required":["conventionalPct","fhaPct","vaPct","refiSharePct","cashOutSharePct"],"type":"object"},"rateLandscape":{"properties":{"medianRatePct":{"type":"number"},"trend":{"enum":["rising","falling","stable"],"type":"string"}},"required":["medianRatePct"],"type":"object"},"recentSales":{"properties":{"count":{"type":"number"},"medianDomDays":{"type":"number"},"medianSoldPrice":{"type":"number"},"medianSoldToListPct":{"type":"number"},"priceCutSharePct":{"type":"number"},"soldToListSampleCount":{"type":"number"},"yoyMedianPriceDeltaPct":{"type":"number"}},"required":["count"],"type":"object"},"scope":{"properties":{"kind":{"enum":["zip","city","state"],"type":"string"},"label":{"type":"string"}},"required":["kind","label"],"type":"object"},"windowDays":{"type":"number"}},"required":["windowDays"],"type":"object"},"HomeValueOnboarding":{"properties":{"completed":{"type":"boolean"},"completedAt":{"nullable":true,"type":"number"},"disclosuresAckAt":{"nullable":true,"type":"number"},"disclosuresVersion":{"nullable":true,"type":"string"},"steps":{"$ref":"#/components/schemas/HomeValueOnboardingSteps"}},"required":["completed","completedAt","disclosuresAckAt","disclosuresVersion","steps"],"type":"object"},"HomeValueOnboardingData":{"properties":{"data":{"$ref":"#/components/schemas/HomeValueOnboarding"}},"required":["data"],"type":"object"},"HomeValueOnboardingPatch":{"properties":{"completed":{"type":"boolean"},"completedAt":{"format":"date-time","type":"string"},"disclosuresAckAt":{"format":"date-time","type":"string"},"disclosuresVersion":{"minLength":1,"type":"string"},"steps":{"$ref":"#/components/schemas/HomeValueOnboardingSteps"}},"type":"object"},"HomeValueOnboardingRead":{"properties":{"completed":{"type":"boolean"},"completedAt":{"nullable":true,"type":"number"},"currentDisclosures":{"$ref":"#/components/schemas/HomeValueCurrentDisclosures"},"disclosuresAckAt":{"nullable":true,"type":"number"},"disclosuresVersion":{"nullable":true,"type":"string"},"steps":{"$ref":"#/components/schemas/HomeValueOnboardingSteps"}},"required":["completed","completedAt","disclosuresAckAt","disclosuresVersion","steps","currentDisclosures"],"type":"object"},"HomeValueOnboardingReadData":{"properties":{"data":{"$ref":"#/components/schemas/HomeValueOnboardingRead"}},"required":["data"],"type":"object"},"HomeValueOnboardingSteps":{"properties":{"disclosures":{"type":"boolean"},"enrolling":{"type":"boolean"},"notifications":{"type":"boolean"},"profile":{"type":"boolean"}},"type":"object"},"HomeValuePatchEnrollment":{"properties":{"borrower":{"$ref":"#/components/schemas/HomeValueBorrower"},"cadence":{"type":"string"},"loanOverrides":{"$ref":"#/components/schemas/HomeValueLoanOverridesPatch"},"paused":{"type":"boolean"},"propertyOverrides":{"$ref":"#/components/schemas/HomeValuePropertyOverridesPatch"}},"type":"object"},"HomeValuePropertyOverrides":{"properties":{"baths":{"type":"number"},"beds":{"type":"number"},"sqft":{"type":"number"},"yearBuilt":{"type":"integer"}},"type":"object"},"HomeValuePropertyOverridesPatch":{"properties":{"baths":{"nullable":true,"type":"number"},"beds":{"nullable":true,"type":"number"},"sqft":{"nullable":true,"type":"number"},"yearBuilt":{"nullable":true,"type":"integer"}},"type":"object"},"HomeValueRemovedData":{"properties":{"data":{"properties":{"removed":{"type":"boolean"}},"required":["removed"],"type":"object"}},"required":["data"],"type":"object"},"HomeValueStatus":{"enum":["pending_confirmation","active","paused","unsubscribed","bounced","removed"],"type":"string"},"HomeValueStopOptInBatch":{"properties":{"batchId":{"minLength":1,"type":"string"}},"required":["batchId"],"type":"object"},"HomeValueStopOptInBatchData":{"properties":{"data":{"properties":{"stopped":{"type":"integer"}},"required":["stopped"],"type":"object"}},"required":["data"],"type":"object"},"HomeValueSuppression":{"properties":{"deceased":{"type":"boolean"},"dncTcpa":{"type":"boolean"},"litigator":{"type":"boolean"}},"type":"object"},"HomeValueUnsubscribe":{"properties":{"scope":{"default":"this","enum":["this","all"],"type":"string"},"token":{"format":"uuid","type":"string"}},"required":["token"],"type":"object"},"HomeValueUnsubscribed":{"properties":{"data":{"properties":{"unsubscribed":{"enum":[true],"type":"boolean"}},"required":["unsubscribed"],"type":"object"}},"required":["data"],"type":"object"},"HomeValueValuations":{"nullable":true,"properties":{"asOf":{"format":"date-time","type":"string"},"internal":{"properties":{"high":{"exclusiveMinimum":true,"minimum":0,"type":"number"},"low":{"exclusiveMinimum":true,"minimum":0,"type":"number"},"modelVersion":{"type":"string"},"value":{"exclusiveMinimum":true,"minimum":0,"type":"number"}},"required":["value"],"type":"object"},"lender":{"properties":{"confidence":{"type":"number"},"high":{"exclusiveMinimum":true,"minimum":0,"type":"number"},"low":{"exclusiveMinimum":true,"minimum":0,"type":"number"},"value":{"exclusiveMinimum":true,"minimum":0,"type":"number"}},"required":["value"],"type":"object"},"override":{"properties":{"asOf":{"format":"date-time","type":"string"},"value":{"exclusiveMinimum":true,"minimum":0,"type":"number"}},"required":["value"],"type":"object"}},"required":["asOf"],"type":"object"},"HubspotError":{"properties":{"code":{"description":"Stable reason code. `not_connected` means run the HubSpot connect flow; `portal_mismatch` means the connected account is not the one the workspace's mapping was built for; the rest describe a setup problem to fix before retrying.","type":"string"},"details":{"additionalProperties":{"nullable":true},"type":"object"},"error":{"description":"Human-readable explanation.","type":"string"}},"required":["error","code"],"type":"object"},"HubspotObjectStatus":{"properties":{"code":{"type":"string"},"entity":{"description":"The kind of Model Match record the ids refer to — `originator` for loan officers, `agent` for real estate agents. Required, and checked against what your workspace configured: if they disagree the request is refused rather than writing records built from the wrong mapping.","enum":["agent","originator"],"type":"string"},"mappedFieldCount":{"type":"number"},"matchOn":{"description":"The HubSpot field used to match existing records.","type":"string"},"object":{"description":"Which kind of HubSpot record to write. Your workspace decides which Model Match records feed each one.","enum":["contact","company"],"type":"string"},"ready":{"type":"boolean"},"reason":{"type":"string"}},"required":["object","ready"],"type":"object"},"HubspotPaymentRequired":{"properties":{"balance":{"description":"Credits available.","type":"number"},"cost":{"description":"Credits this push would cost at most.","type":"number"},"error":{"type":"string"}},"required":["error","balance","cost"],"type":"object"},"HubspotPushRecordResult":{"properties":{"crmRecordId":{"description":"The record's id in your HubSpot account, when written.","type":"string"},"id":{"type":"string"},"message":{"type":"string"},"preserved":{"description":"Fields left untouched because your HubSpot record already had a value and the mapping says not to overwrite.","items":{"type":"string"},"type":"array"},"reason":{"enum":["not_found","missing_dedupe_value","duplicate_dedupe_value","rejected"],"type":"string"},"status":{"enum":["created","updated","skipped","failed","would_create","would_update"],"type":"string"}},"required":["id","status"],"type":"object"},"HubspotPushRequest":{"properties":{"dryRun":{"default":false,"description":"Resolve the records, apply the mapping and report exactly what would be written — without writing anything. There is no undo on a real push; use this first.","type":"boolean"},"entity":{"description":"The kind of Model Match record the ids refer to — `originator` for loan officers, `agent` for real estate agents. Required, and checked against what your workspace configured: if they disagree the request is refused rather than writing records built from the wrong mapping.","enum":["agent","originator"],"type":"string"},"ids":{"description":"Record ids to send, at most 100 per request. Loan officers are identified by NMLS id, agents by their Model Match id. Duplicates are collapsed.","items":{"minLength":1,"type":"string"},"maxItems":100,"minItems":1,"type":"array"},"object":{"description":"Which kind of HubSpot record to write. Your workspace decides which Model Match records feed each one.","enum":["contact","company"],"type":"string"}},"required":["object","entity","ids"],"type":"object"},"HubspotPushResponse":{"properties":{"billing":{"properties":{"charged":{"nullable":true,"type":"number"},"note":{"type":"string"}},"required":["charged"],"type":"object"},"dryRun":{"type":"boolean"},"entity":{"description":"The kind of Model Match record the ids refer to — `originator` for loan officers, `agent` for real estate agents. Required, and checked against what your workspace configured: if they disagree the request is refused rather than writing records built from the wrong mapping.","enum":["agent","originator"],"type":"string"},"object":{"description":"Which kind of HubSpot record to write. Your workspace decides which Model Match records feed each one.","enum":["contact","company"],"type":"string"},"portalId":{"description":"The HubSpot account these records were written to.","type":"string"},"portalRecorded":{"description":"Whether your workspace's setup records which HubSpot account it was built for. When false, consider saving it so a member on a different account can be warned before sending.","type":"boolean"},"results":{"items":{"$ref":"#/components/schemas/HubspotPushRecordResult"},"type":"array"},"summary":{"properties":{"created":{"type":"number"},"failed":{"type":"number"},"requested":{"type":"number"},"skipped":{"type":"number"},"updated":{"type":"number"}},"required":["requested","created","updated","skipped","failed"],"type":"object"}},"required":["object","entity","dryRun","portalId","portalRecorded","summary","results","billing"],"type":"object"},"HubspotStatusResponse":{"properties":{"configuredPortalId":{"description":"The HubSpot account your workspace's setup was built for. When this differs from `portalId`, pushes are refused.","nullable":true,"type":"string"},"connected":{"type":"boolean"},"maxRecordsPerPush":{"type":"number"},"objects":{"items":{"$ref":"#/components/schemas/HubspotObjectStatus"},"type":"array"},"portalId":{"description":"The HubSpot account you have connected, when known.","nullable":true,"type":"string"},"portalMismatch":{"type":"boolean"}},"required":["connected","portalId","configuredPortalId","portalMismatch","maxRecordsPerPush","objects"],"type":"object"},"InstantSearchRequest":{"properties":{"entities":{"description":"Entity types to search (default: all)","items":{"type":"string"},"type":"array"},"filters":{"additionalProperties":{"type":"string"},"description":"Per-entity filter strings","type":"object"},"limit":{"description":"Max results per entity (default: 5)","maximum":50,"minimum":1,"type":"integer"},"query":{"description":"Search query","minLength":1,"type":"string"}},"required":["query"],"type":"object"},"InstantSearchResponse":{"properties":{"results":{"additionalProperties":{"items":{"nullable":true},"type":"array"},"type":"object"}},"required":["results"],"type":"object"},"Interval":{"enum":["weekly","monthly","quarterly","yearly"],"type":"string"},"LenderDetail":{"allOf":[{"$ref":"#/components/schemas/LenderSummary"},{"properties":{},"type":"object"}]},"LenderDetailResponse":{"properties":{"data":{"$ref":"#/components/schemas/LenderDetail"}},"required":["data"],"type":"object"},"LenderFilterEntry":{"properties":{"canonical":{"description":"Canonical lender name (the `value` from lender autocomplete). Resolved to a lender id server-side; pass `id` instead when you have one.","type":"string"},"displayName":{"description":"Label / typed search string","type":"string"},"id":{"description":"Lender-dictionary id — the `id` from instantSearch / listLenders (e.g. \"mortgage_rocket\" or \"mortgage rocket\"), and the same value the `lender` filter takes. PREFERRED: matched directly against the stored lender key with no name resolution. `canonical` is still accepted and resolved server-side.","type":"string"},"mode":{"enum":["include","exclude"],"type":"string"},"percentMin":{"description":"Minimum percent_of_volume (0–100); 0/undefined = > 0%","maximum":100,"minimum":0,"type":"number"},"type":{"enum":["canonical","freetext"],"type":"string"}},"required":["displayName"],"type":"object"},"LenderListRequest":{"additionalProperties":false,"properties":{"advancedFilters":{"$ref":"#/components/schemas/FilterNode"},"filters":{"$ref":"#/components/schemas/FilterNode"},"flatFilters":{"additionalProperties":false,"properties":{"mode":{"enum":["and","or"],"type":"string"},"name":{"$ref":"#/components/schemas/TextFilterValue"},"totalDocuments":{"$ref":"#/components/schemas/NumericFilterValue"}},"type":"object"},"pagination":{"$ref":"#/components/schemas/Pagination"},"sort":{"items":{"properties":{"field":{"enum":["name","totalDocuments"],"type":"string"},"order":{"$ref":"#/components/schemas/SortOrder"}},"required":["field"],"type":"object"},"type":"array"}},"type":"object"},"LenderListResponse":{"properties":{"cursor":{"type":"string"},"data":{"items":{"$ref":"#/components/schemas/LenderSummary"},"type":"array"},"total":{"type":"number"}},"required":["data","total"],"type":"object"},"LenderMatchMode":{"enum":["and","or"],"type":"string"},"LenderNormalization":{"properties":{"aliasCount":{"description":"Stored lender-name variants this id expands to","minimum":0,"type":"integer"},"displayName":{"nullable":true,"type":"string"},"id":{"description":"Canonical lender-dictionary id, or null","nullable":true,"type":"string"},"matchedVia":{"description":"`id` = the value already WAS a canonical key; `alias` = a stored lender name; `name` = matched the display/canonical name; `unresolved` = fell back to raw text match; `degraded` = the dictionary could not be consulted.","enum":["id","alias","name","unresolved","degraded"],"type":"string"},"original":{"description":"The value the caller sent","type":"string"},"totalDocuments":{"description":"Loans the dictionary attributes to this id. A small number next to a well-known lender name means the name matched a minor entry.","minimum":0,"type":"integer"}},"required":["original","id","displayName","matchedVia","aliasCount","totalDocuments"],"type":"object"},"LenderSummary":{"properties":{"canonicalName":{"nullable":true,"type":"string"},"displayName":{"nullable":true,"type":"string"},"id":{"type":"string"},"totalDocuments":{"nullable":true,"type":"number"}},"required":["id"],"type":"object"},"LoMoveSignal":{"properties":{"city":{"nullable":true,"type":"string"},"companyName":{"description":"Current company.","nullable":true,"type":"string"},"companyNmlsId":{"description":"Current company's NMLS ID.","nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"nmlsId":{"type":"string"},"percentile":{"description":"Priority percentile, 0–100: where this priority score sits among everyone scored nationally for this signal (all scored loan officers, past clients, or agent relationships). 100 = highest priority. On the state list it is still the national percentile, not a within-state one.","type":"number"},"reasons":{"description":"Up to three plain-language reasons this row is a priority.","items":{"type":"string"},"type":"array"},"score":{"description":"Priority score (0–1) for reaching out to this loan officer about a move to a new company in the next six months; higher is higher priority.","type":"number"},"scoredAt":{"description":"When this score was computed (ISO 8601).","type":"string"},"state":{"nullable":true,"type":"string"}},"required":["nmlsId","name","companyName","companyNmlsId","city","state","score","percentile","reasons","scoredAt"],"type":"object"},"LoMoveSignalDetail":{"properties":{"data":{"$ref":"#/components/schemas/LoMoveSignal"}},"required":["data"],"type":"object"},"LoMoveSignalList":{"properties":{"cursor":{"description":"Pass as `cursor` for the next page. Absent on the last page.","type":"string"},"data":{"items":{"$ref":"#/components/schemas/LoMoveSignal"},"type":"array"}},"required":["data"],"type":"object"},"LoanBorrowerStatusFilterValue":{"anyOf":[{"description":"One of (case-insensitive): Current, PSALE, PWNLO, PWCLO, C_PWNLO, C_PWCLO, R_CWNLO, R_CWCLO, E_CWNLO, E_CWCLO, REO_CWNLO, REO_CWCLO, UNK_NOORIG, UNK_PWNLO, UNK_PWCLO","enum":["Current","PSALE","PWNLO","PWCLO","C_PWNLO","C_PWCLO","R_CWNLO","R_CWCLO","E_CWNLO","E_CWCLO","REO_CWNLO","REO_CWCLO","UNK_NOORIG","UNK_PWNLO","UNK_PWCLO"],"type":"string"},{"description":"Match any of these values","items":{"description":"One of (case-insensitive): Current, PSALE, PWNLO, PWCLO, C_PWNLO, C_PWCLO, R_CWNLO, R_CWCLO, E_CWNLO, E_CWCLO, REO_CWNLO, REO_CWCLO, UNK_NOORIG, UNK_PWNLO, UNK_PWCLO","enum":["Current","PSALE","PWNLO","PWCLO","C_PWNLO","C_PWCLO","R_CWNLO","R_CWCLO","E_CWNLO","E_CWCLO","REO_CWNLO","REO_CWCLO","UNK_NOORIG","UNK_PWNLO","UNK_PWCLO"],"type":"string"},"type":"array"},{"description":"Fuzzy text match","properties":{"match":{"type":"string"}},"required":["match"],"type":"object"},{"nullable":true}],"description":"ModelMatch-derived loan position: whether the borrower on THIS loan is still the property's current owner. Codes read as [purpose_](C|P)W(N|C)LO — CW = current owner, PW = previous owner; NLO = a different originator than the prior loan, CLO = the same one (the retention signal).\n\nCURRENT OWNER — `Current` (no newer loan), `R_CWCLO`/`R_CWNLO` (refinanced), `E_CWCLO`/`E_CWNLO` (took equity). For \"past clients still in the home\" pass ALL FIVE: `\"Current\"` on its own silently drops ~5M loans whose borrower is still there but has since refinanced or tapped equity.\n\nPREVIOUS OWNER — `PSALE` (home sold), `PWCLO`/`PWNLO` (purchase loan), `C_PWCLO`/`C_PWNLO` (construction loan).\n\nUNKNOWN — `UNK_NOORIG` (the property's most recent loan had no originator; ~64% of all populated values), `UNK_PWCLO`/`UNK_PWNLO` (most recent loan was not a purchase). `REO_CWNLO`/`REO_CWCLO` exist but are vanishingly rare (<300 loans total) and are not classified in the source glossary.\n\nOnly ~69% of loans carry any status, so an absent value means unknown — not \"not current\"."},"LoanChartRequest":{"additionalProperties":false,"properties":{"advancedFilters":{"$ref":"#/components/schemas/FilterNode"},"after":{"description":"PARTY slices only. Opaque cursor from a previous page's `nextCursor`; send the same body otherwise. A cursor is bound to the `slice` and `measure` it was issued for (400 if they change). It is an offset into the ranking, so a rolling `period` re-resolved on a later UTC day ranks a shifted window.","minLength":1,"type":"string"},"filters":{"$ref":"#/components/schemas/FilterNode"},"flatFilters":{"additionalProperties":false,"properties":{"borrowerStatus":{"$ref":"#/components/schemas/LoanBorrowerStatusFilterValue"},"broker":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Broker shop NMLS id (digits only). A broker is a company — resolve a broker name to its NMLS id via instantSearch (or listCompanies)."}]},"buyerEntityType":{"$ref":"#/components/schemas/BooleanFilterValue"},"city":{"$ref":"#/components/schemas/TextFilterValue"},"conforming":{"$ref":"#/components/schemas/BooleanFilterValue"},"county":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"County name (e.g. \"Broward\") or 5-digit FIPS code. Names resolve to FIPS server-side; include a `state` filter to disambiguate."}]},"currentBalance":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Estimated remaining principal balance (~19% populated). Approximate current equity as `homeValue` (AVM) minus this."}]},"employer":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Employer/company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"equity":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Point-in-time equity recorded on the loan (sparse, ~10%). NOT a live current-equity figure. For HELOC/cash-out targeting on up-to-date equity, use properties search (listProperties) instead — its equity is far better populated and current."}]},"excludeBroker":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans brokered by this broker-shop NMLS id (digits only) — the inverse of `broker`."}]},"excludeCity":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this city — the inverse of `city`."}]},"excludeLender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans from this lender ID (\"everyone but X\") — the inverse of `lender`, same id contract (resolve via instantSearch/listLenders). Loans with no lender stay in the results."}]},"excludeLoanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans funded by this company NMLS id (digits only) — the inverse of `loanCompany`."}]},"excludeLoanType":{"$ref":"#/components/schemas/LoanTypeExcludeFilterValue"},"excludeOriginator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans with this originator NMLS id (digits only) — the inverse of `originator`. Common for 'everyone but my own shop' lists."}]},"excludeState":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this state (2-letter code, e.g. \"CA\") — the inverse of `state`. For \"everywhere but this state\" lists."}]},"excludeTransactionType":{"$ref":"#/components/schemas/LoanTransactionTypeExcludeFilterValue"},"excludeZipCode":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this ZIP code — the inverse of `zipCode`."}]},"fips":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exact 5-digit county FIPS code (no name resolution) — the code-only escape hatch alongside `county`."}]},"geoPoint":{"$ref":"#/components/schemas/GeoFilterValue"},"homeValue":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"AVM (automated valuation) at the linked property (~26%, MLS-linked). Pair with `currentBalance` to approximate current equity."}]},"includeUnknownOriginator":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Include loans that have no originator NMLS id. Omitted/false (default): such loans are excluded — the vast majority are pre-2016 public records with no linkable originator. true: include them. Note that the default scopes results to loans with a known originator (~2016+ recordings)."}]},"interestRate":{"$ref":"#/components/schemas/NumericFilterValue"},"lender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender ID — the normalized lender-dictionary key, NOT a fuzzy name match. Resolve a lender via instantSearch (or listLenders) and pass the `id` it returns (e.g. \"mortgage_rocket\" or \"mortgage rocket\"). Underscores and letter case are normalized, so either id surface works. A stored normalized lender name (what the `slice: \"lender\"` chart buckets emit) is also accepted, so a chart bucket key filters directly. A value that is neither returns 400 rather than silently matching nothing — to search by lender NAME, use `lenderName`."}]},"lenderName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender name as recorded on the loan document — fuzzy, all-terms match (e.g. \"Fifth Third\"). The name counterpart to the exact-id `lender` filter; use `lender` when you have a resolved id, and this when you only have a name."}]},"loanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Funding/loan company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"loanType":{"$ref":"#/components/schemas/LoanTypeFilterValue"},"ltvAtOrigination":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Loan-to-value at ORIGINATION (sparse), as a PERCENT on a 0-100 scale (`80` = 80% LTV; values above 100 are real underwater loans). This is not a current LTV — there is no stored current-LTV field on loans."}]},"mode":{"enum":["and","or"],"type":"string"},"mortgageAmount":{"$ref":"#/components/schemas/NumericFilterValue"},"mortgageDate":{"$ref":"#/components/schemas/DateFilterValue"},"originator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Loan originator NMLS id (digits only). To search by name use `originatorName`, or resolve a name to its id via instantSearch."}]},"originatorName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"deprecated":true,"description":"DEPRECATED — fuzzy name matching is unreliable (same originator can return wildly different counts by name string). Resolve the loan officer via instantSearch and filter by `originator` (exact NMLS id) instead. Still functional for now."}]},"propertyId":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Parcel id — returns every loan recorded against one property. Pass the same string this endpoint returns as `mmPropertyId` on a loan row, or the `mmPropertyId` of a property record.\n\nThis is the parcel's FULL recorded loan history, which is deliberately wider than the loans embedded on a property record: that embed is a snapshot of what is still owed (up to five currently-active loans), so paid-off mortgages are absent from it and present here.\n\nMulti-unit caveat: loans carry a unit-blind parcel id, so for one unit of a multi-unit building this selects every unit in the building, not that unit alone."}]},"reverseRefinance":{"description":"HECM-to-HECM. `true`: keep only reverse loans recorded AFTER an earlier reverse loan (≥ $1,000) on the same property — a refinance of an existing reverse mortgage, resolved from the property's loan history because the transaction type does not record it. Pair with `loanType: \"reverse\"`. Resolves up to 50,000 distinct properties per request (else 400). Chart only.","type":"boolean"},"saleDate":{"$ref":"#/components/schemas/DateFilterValue"},"salePrice":{"$ref":"#/components/schemas/NumericFilterValue"},"state":{"$ref":"#/components/schemas/TextFilterValue"},"transactionType":{"$ref":"#/components/schemas/LoanTransactionTypeFilterValue"},"zip":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Alias of `zipCode` — same ZIP filter, accepted for cross-entity key parity."}]},"zipCode":{"$ref":"#/components/schemas/TextFilterValue"}},"type":"object"},"measure":{"$ref":"#/components/schemas/ChartMeasure"},"period":{"$ref":"#/components/schemas/DatedPeriod"},"segment":{"allOf":[{"$ref":"#/components/schemas/LoanSlice"},{"description":"Optional second dimension. Each bucket of `slice` then carries `segments`: the same `measure` broken down by this dimension (e.g. `slice: \"loanType\", segment: \"lender\"` is loan type × lender in one call), top 25 per bucket ranked by `measure`, with the remainder counted in `segmentsOmittedCount`. Omit it and the response is the one-dimensional chart, unchanged. Must differ from `slice` (400). Combines with `size` / `after` paging on a party slice: the cursor pages the `slice` ranking and every bucket on each page carries its own segments (e.g. `slice: \"broker\", segment: \"lender\"` walks every broker shop × its lenders)."}]},"size":{"description":"PARTY slices only (`originator`, `broker`, `loanCompany`; 400 on any other slice). Page size for the ranking, 1–1000. Passing `size` (or `after`) turns on paging: the response gains `total` / `totalApproximate` and, when more buckets remain, `nextCursor`, and drops `omittedCount`. Buckets stay ranked by `measure` descending (ties broken by key), and bucket labels stay NMLS ids. Default when only `after` is sent: 200, the fixed chart's bucket count. Paging reaches the top 10,000 ranked buckets.","maximum":1000,"minimum":1,"type":"integer"},"slice":{"$ref":"#/components/schemas/LoanSlice"}},"required":["slice"],"type":"object"},"LoanDetail":{"allOf":[{"$ref":"#/components/schemas/LoanSummary"},{"properties":{"buyers":{"items":{"nullable":true},"nullable":true,"type":"array"},"downPayment":{"nullable":true},"employersAtTimeOfLoan":{"items":{"type":"string"},"nullable":true,"type":"array"},"equity":{"nullable":true,"type":"number"},"estimatedPayment":{"nullable":true,"type":"number"},"homeValue":{"nullable":true,"type":"number"},"listAgent":{"nullable":true},"ltv":{"nullable":true,"type":"number"},"mmSaleId":{"nullable":true,"type":"string"},"propertyUseCode":{"nullable":true,"type":"string"},"recordingDate":{"nullable":true,"type":"string"},"sellers":{"items":{"nullable":true},"nullable":true,"type":"array"},"soldAgent":{"nullable":true},"titleCompany":{"nullable":true}},"type":"object"}]},"LoanDetailResponse":{"properties":{"data":{"$ref":"#/components/schemas/LoanDetail"}},"required":["data"],"type":"object"},"LoanListRequest":{"additionalProperties":false,"properties":{"advancedFilters":{"$ref":"#/components/schemas/FilterNode"},"filters":{"$ref":"#/components/schemas/FilterNode"},"flatFilters":{"additionalProperties":false,"properties":{"agentId":{"description":"Loans crediting this agent (`GET /v1/agents/{id}`) — the rows' `*AgentId`; see `agentRole`. ≤ 10,000 candidate loans in scope (else 400).","minLength":1,"type":"string"},"agentRole":{"description":"`agentId`'s role: `sold`, `list`, `coList`, `listing` (list or co-list), `any` (default).","enum":["any","sold","list","coList","listing"],"type":"string"},"borrowerStatus":{"$ref":"#/components/schemas/LoanBorrowerStatusFilterValue"},"broker":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Broker shop NMLS id (digits only). A broker is a company — resolve a broker name to its NMLS id via instantSearch (or listCompanies)."}]},"buyerEntityType":{"$ref":"#/components/schemas/BooleanFilterValue"},"city":{"$ref":"#/components/schemas/TextFilterValue"},"coListAgentName":{"description":"Co-listing agent name.","maxLength":100,"minLength":1,"type":"string"},"conforming":{"$ref":"#/components/schemas/BooleanFilterValue"},"county":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"County name (e.g. \"Broward\") or 5-digit FIPS code. Names resolve to FIPS server-side; include a `state` filter to disambiguate."}]},"currentBalance":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Estimated remaining principal balance (~19% populated). Approximate current equity as `homeValue` (AVM) minus this."}]},"employer":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Employer/company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"equity":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Point-in-time equity recorded on the loan (sparse, ~10%). NOT a live current-equity figure. For HELOC/cash-out targeting on up-to-date equity, use properties search (listProperties) instead — its equity is far better populated and current."}]},"excludeBroker":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans brokered by this broker-shop NMLS id (digits only) — the inverse of `broker`."}]},"excludeCity":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this city — the inverse of `city`."}]},"excludeLender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans from this lender ID (\"everyone but X\") — the inverse of `lender`, same id contract (resolve via instantSearch/listLenders). Loans with no lender stay in the results."}]},"excludeLoanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans funded by this company NMLS id (digits only) — the inverse of `loanCompany`."}]},"excludeLoanType":{"$ref":"#/components/schemas/LoanTypeExcludeFilterValue"},"excludeOriginator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans with this originator NMLS id (digits only) — the inverse of `originator`. Common for 'everyone but my own shop' lists."}]},"excludeState":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this state (2-letter code, e.g. \"CA\") — the inverse of `state`. For \"everywhere but this state\" lists."}]},"excludeTransactionType":{"$ref":"#/components/schemas/LoanTransactionTypeExcludeFilterValue"},"excludeZipCode":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this ZIP code — the inverse of `zipCode`."}]},"fips":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exact 5-digit county FIPS code (no name resolution) — the code-only escape hatch alongside `county`."}]},"geoPoint":{"$ref":"#/components/schemas/GeoFilterValue"},"hasAgent":{"description":"Roles that must have an agent: `sold` (buyer's), `list`, `coList`; `any` = at least one.","items":{"enum":["any","sold","list","coList"],"type":"string"},"minItems":1,"type":"array"},"hasBuilder":{"description":"`true`: new construction — a sale of the property names a builder, or the loan names a builder or a builder seller of record. `false`: the rest. Needs a scope of ≤ 50,000 loans (else 400).","type":"boolean"},"homeValue":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"AVM (automated valuation) at the linked property (~26%, MLS-linked). Pair with `currentBalance` to approximate current equity."}]},"includeUnknownOriginator":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Include loans that have no originator NMLS id. Omitted/false (default): such loans are excluded — the vast majority are pre-2016 public records with no linkable originator. true: include them. Note that the default scopes results to loans with a known originator (~2016+ recordings)."}]},"interestRate":{"$ref":"#/components/schemas/NumericFilterValue"},"lender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender ID — the normalized lender-dictionary key, NOT a fuzzy name match. Resolve a lender via instantSearch (or listLenders) and pass the `id` it returns (e.g. \"mortgage_rocket\" or \"mortgage rocket\"). Underscores and letter case are normalized, so either id surface works. A stored normalized lender name (what the `slice: \"lender\"` chart buckets emit) is also accepted, so a chart bucket key filters directly. A value that is neither returns 400 rather than silently matching nothing — to search by lender NAME, use `lenderName`."}]},"lenderName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender name as recorded on the loan document — fuzzy, all-terms match (e.g. \"Fifth Third\"). The name counterpart to the exact-id `lender` filter; use `lender` when you have a resolved id, and this when you only have a name."}]},"listAgentName":{"description":"Listing agent name.","maxLength":100,"minLength":1,"type":"string"},"loanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Funding/loan company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"loanType":{"$ref":"#/components/schemas/LoanTypeFilterValue"},"ltvAtOrigination":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Loan-to-value at ORIGINATION (sparse), as a PERCENT on a 0-100 scale (`80` = 80% LTV; values above 100 are real underwater loans). This is not a current LTV — there is no stored current-LTV field on loans."}]},"mode":{"enum":["and","or"],"type":"string"},"mortgageAmount":{"$ref":"#/components/schemas/NumericFilterValue"},"mortgageDate":{"$ref":"#/components/schemas/DateFilterValue"},"originator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Loan originator NMLS id (digits only). To search by name use `originatorName`, or resolve a name to its id via instantSearch."}]},"originatorName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"deprecated":true,"description":"DEPRECATED — fuzzy name matching is unreliable (same originator can return wildly different counts by name string). Resolve the loan officer via instantSearch and filter by `originator` (exact NMLS id) instead. Still functional for now."}]},"propertyId":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Parcel id — returns every loan recorded against one property. Pass the same string this endpoint returns as `mmPropertyId` on a loan row, or the `mmPropertyId` of a property record.\n\nThis is the parcel's FULL recorded loan history, which is deliberately wider than the loans embedded on a property record: that embed is a snapshot of what is still owed (up to five currently-active loans), so paid-off mortgages are absent from it and present here.\n\nMulti-unit caveat: loans carry a unit-blind parcel id, so for one unit of a multi-unit building this selects every unit in the building, not that unit alone."}]},"saleDate":{"$ref":"#/components/schemas/DateFilterValue"},"salePrice":{"$ref":"#/components/schemas/NumericFilterValue"},"search":{"description":"Every word starts a word of the address (street, city, state, ZIP), the lender name or an agent name (\"12 oak\", \"jane sm\").","maxLength":100,"minLength":1,"type":"string"},"soldAgentName":{"description":"Buyer's agent: every word starts a word of the MLS name or the linked agent's name. Likewise `listAgentName`, `coListAgentName`.","maxLength":100,"minLength":1,"type":"string"},"state":{"$ref":"#/components/schemas/TextFilterValue"},"transactionType":{"$ref":"#/components/schemas/LoanTransactionTypeFilterValue"},"zip":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Alias of `zipCode` — same ZIP filter, accepted for cross-entity key parity."}]},"zipCode":{"$ref":"#/components/schemas/TextFilterValue"}},"type":"object"},"pagination":{"$ref":"#/components/schemas/Pagination"},"period":{"$ref":"#/components/schemas/DatedPeriod"},"sort":{"items":{"properties":{"field":{"enum":["city","state","zipCode","county","transactionType","loanType","conforming","mortgageAmount","mortgageDate","broker","loanCompany","lender","borrowerStatus","salePrice","saleDate","originator","originatorName","interestRate","equity","homeValue","ltvAtOrigination","currentBalance","streetAddress","listPrice","employerName","brokerName","soldAgentName","listAgentName","coListAgentName"],"type":"string"},"order":{"$ref":"#/components/schemas/SortOrder"}},"required":["field"],"type":"object"},"type":"array"}},"type":"object"},"LoanListResponse":{"properties":{"cursor":{"type":"string"},"data":{"items":{"$ref":"#/components/schemas/LoanSummary"},"type":"array"},"lenderNormalizations":{"description":"How each `lenderName` value resolved against the lender dictionary. Present when a `lenderName` filter was supplied.","items":{"$ref":"#/components/schemas/LenderNormalization"},"type":"array"},"locationNormalizations":{"description":"How each location filter value resolved. Present when a `city`/`county`/`state`/`zip` filter was supplied.","items":{"$ref":"#/components/schemas/LocationNormalization"},"type":"array"},"total":{"type":"number"},"truncated":{"description":"Row sorts only: more than 10,000 loans matched; the newest 10,000 were sorted and `total` counts them.","type":"boolean"}},"required":["data","total"],"type":"object"},"LoanSegment":{"description":"Dimension to group by. Most are the loan's own field (`loanType`, `transactionType`, `state`, …). `lender` groups on the normalized lender (label = display name, `id` = filter key). `propertyType` is the recorder's land-use code of the collateral (`SFR` single-family, `PUD` planned unit development, `CND` condo, `RES` residential-other, `MFD` multi-family dwelling, `2ND` second home, `MFG` manufactured, `TWN` townhouse, `LAN` land, `COM` commercial, …); loans with no code are not grouped (≈20% of recent loans). `conforming` splits on the conforming-loan-limit flag: `conforming` vs `nonConforming` (above the county conforming limit — i.e. jumbo, not Non-QM), raw `true`/`false` on `id`. Time-series only: `titleCompany` groups on the title company named on the deed, with spellings of one company merged per bucket (`label` = most-used spelling across the response, `id` = normalized name — match on `id`) and \"none available\"-style placeholders excluded.","enum":["transactionType","loanType","city","county","state","zip","lender","propertyType","conforming","broker","loanCompany","originator","titleCompany"],"type":"string"},"LoanSlice":{"description":"Dimension to group by. Most are the loan's own field (`loanType`, `transactionType`, `state`, …). `lender` groups on the normalized lender (label = display name, `id` = filter key). `propertyType` is the recorder's land-use code of the collateral (`SFR` single-family, `PUD` planned unit development, `CND` condo, `RES` residential-other, `MFD` multi-family dwelling, `2ND` second home, `MFG` manufactured, `TWN` townhouse, `LAN` land, `COM` commercial, …); loans with no code are not grouped (≈20% of recent loans). `conforming` splits on the conforming-loan-limit flag: `conforming` vs `nonConforming` (above the county conforming limit — i.e. jumbo, not Non-QM), raw `true`/`false` on `id`.","enum":["transactionType","loanType","city","county","state","zip","lender","propertyType","conforming","broker","loanCompany","originator"],"type":"string"},"LoanSummary":{"properties":{"apn":{"nullable":true,"type":"string"},"borrowerName":{"nullable":true,"type":"string"},"borrowerStatus":{"enum":["Current","PSALE","PWNLO","PWCLO","C_PWNLO","C_PWCLO","R_CWNLO","R_CWCLO","E_CWNLO","E_CWCLO","REO_CWNLO","REO_CWCLO","UNK_NOORIG","UNK_PWNLO","UNK_PWCLO",null],"nullable":true,"type":"string"},"brokerName":{"description":"Mortgage broker as written on the loan document, when third-party originated.","nullable":true,"type":"string"},"brokerNmlsId":{"nullable":true,"type":"string"},"builderName":{"description":"Builder named on a sale of this property (new construction); the `hasBuilder` predicate.","nullable":true,"type":"string"},"buyer1FirstMiddle":{"description":"First buyer's first + middle name (an entity's whole name, with no last).","nullable":true,"type":"string"},"buyer1Last":{"description":"First buyer's last name.","nullable":true,"type":"string"},"buyer2FirstMiddle":{"description":"Second buyer's first + middle name.","nullable":true,"type":"string"},"buyer2Last":{"description":"Second buyer's last name.","nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"coListAgentEmail":{"description":"Co-listing agent email, same rule.","nullable":true,"type":"string"},"coListAgentId":{"description":"Co-listing agent id, same rule.","nullable":true,"type":"string"},"coListAgentName":{"description":"Co-listing agent: the agent record's name when the MLS keys resolve to one agent, else as the MLS recorded it.","nullable":true,"type":"string"},"coListAgentPhone":{"description":"Co-listing agent direct phone, same rule.","nullable":true,"type":"string"},"companyName":{"nullable":true,"type":"string"},"companyNmlsId":{"nullable":true,"type":"string"},"conforming":{"nullable":true,"type":"boolean"},"coordinates":{"nullable":true,"properties":{"lat":{"type":"number"},"lon":{"type":"number"}},"required":["lat","lon"],"type":"object"},"employerName":{"description":"Employer at the time of the loan (the LO's company then), as recorded. Not `companyName`, the funding company on the document.","nullable":true,"type":"string"},"employerNmlsId":{"description":"NMLS id of `employerName`.","nullable":true,"type":"string"},"fips":{"nullable":true,"type":"string"},"id":{"type":"string"},"interestRate":{"nullable":true,"type":"number"},"interestRateType":{"description":"Recorded rate type (e.g. `FIXED`, `ADJUSTABLE`); null when not on file.","nullable":true,"type":"string"},"lenderId":{"description":"Normalized lender id — the value the `lender` filter takes.","nullable":true,"type":"string"},"lenderName":{"nullable":true,"type":"string"},"listAgentEmail":{"description":"Listing agent email, same rule.","nullable":true,"type":"string"},"listAgentId":{"description":"Listing agent id, same rule.","nullable":true,"type":"string"},"listAgentName":{"description":"Listing agent: the agent record's name when the MLS keys resolve to one agent, else as the MLS recorded it.","nullable":true,"type":"string"},"listAgentPhone":{"description":"Listing agent direct phone, same rule.","nullable":true,"type":"string"},"listPrice":{"nullable":true,"type":"number"},"loanTermMonths":{"nullable":true,"type":"number"},"loanType":{"nullable":true,"type":"string"},"mmPropertyId":{"nullable":true,"type":"string"},"mortgageAmount":{"nullable":true,"type":"number"},"mortgageDate":{"nullable":true,"type":"string"},"originatorEmail":{"deprecated":true,"description":"DEPRECATED — ALWAYS NULL. Loan records carry no originator email field, so this is null on every loan; it is retained only for response-shape compatibility. To get a loan officer's email, take `originatorNmlsId` from this response and fetch the originator (`GET /v1/originators/{nmlsId}`), whose `email` field carries it — available for roughly 14% of loan officers.","nullable":true,"type":"string"},"originatorName":{"nullable":true,"type":"string"},"originatorNmlsId":{"nullable":true,"type":"string"},"salePrice":{"nullable":true,"type":"number"},"seller1FirstMiddle":{"description":"First seller's first + middle name.","nullable":true,"type":"string"},"seller1Last":{"description":"First seller's last name.","nullable":true,"type":"string"},"seller2FirstMiddle":{"description":"Second seller's first + middle name.","nullable":true,"type":"string"},"seller2Last":{"description":"Second seller's last name.","nullable":true,"type":"string"},"sellerName":{"nullable":true,"type":"string"},"soldAgentEmail":{"description":"Buyer's agent email — the agent record's `email` (`GET /v1/agents/{id}`); null when `soldAgentId` is.","nullable":true,"type":"string"},"soldAgentId":{"description":"Buyer's agent id (`GET /v1/agents/{id}`) when the MLS keys resolve to one agent.","nullable":true,"type":"string"},"soldAgentName":{"description":"Buyer's agent: the agent record's name when the loan's MLS agent keys resolve to one agent, else as the MLS recorded it; lowercase.","nullable":true,"type":"string"},"soldAgentPhone":{"description":"Buyer's agent direct phone — the agent record's `phone`; null when `soldAgentId` is.","nullable":true,"type":"string"},"state":{"nullable":true,"type":"string"},"streetAddress":{"nullable":true,"type":"string"},"titleCompanyName":{"description":"Title company name.","nullable":true,"type":"string"},"transactionDate":{"nullable":true,"type":"string"},"transactionType":{"nullable":true,"type":"string"},"zipCode":{"nullable":true,"type":"string"}},"required":["id"],"type":"object"},"LoanSummaryRequest":{"additionalProperties":false,"properties":{"advancedFilters":{"$ref":"#/components/schemas/FilterNode"},"filters":{"$ref":"#/components/schemas/FilterNode"},"flatFilters":{"additionalProperties":false,"properties":{"borrowerStatus":{"$ref":"#/components/schemas/LoanBorrowerStatusFilterValue"},"broker":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Broker shop NMLS id (digits only). A broker is a company — resolve a broker name to its NMLS id via instantSearch (or listCompanies)."}]},"buyerEntityType":{"$ref":"#/components/schemas/BooleanFilterValue"},"city":{"$ref":"#/components/schemas/TextFilterValue"},"conforming":{"$ref":"#/components/schemas/BooleanFilterValue"},"county":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"County name (e.g. \"Broward\") or 5-digit FIPS code. Names resolve to FIPS server-side; include a `state` filter to disambiguate."}]},"currentBalance":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Estimated remaining principal balance (~19% populated). Approximate current equity as `homeValue` (AVM) minus this."}]},"employer":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Employer/company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"equity":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Point-in-time equity recorded on the loan (sparse, ~10%). NOT a live current-equity figure. For HELOC/cash-out targeting on up-to-date equity, use properties search (listProperties) instead — its equity is far better populated and current."}]},"excludeBroker":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans brokered by this broker-shop NMLS id (digits only) — the inverse of `broker`."}]},"excludeCity":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this city — the inverse of `city`."}]},"excludeLender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans from this lender ID (\"everyone but X\") — the inverse of `lender`, same id contract (resolve via instantSearch/listLenders). Loans with no lender stay in the results."}]},"excludeLoanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans funded by this company NMLS id (digits only) — the inverse of `loanCompany`."}]},"excludeLoanType":{"$ref":"#/components/schemas/LoanTypeExcludeFilterValue"},"excludeOriginator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans with this originator NMLS id (digits only) — the inverse of `originator`. Common for 'everyone but my own shop' lists."}]},"excludeState":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this state (2-letter code, e.g. \"CA\") — the inverse of `state`. For \"everywhere but this state\" lists."}]},"excludeTransactionType":{"$ref":"#/components/schemas/LoanTransactionTypeExcludeFilterValue"},"excludeZipCode":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this ZIP code — the inverse of `zipCode`."}]},"fips":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exact 5-digit county FIPS code (no name resolution) — the code-only escape hatch alongside `county`."}]},"geoPoint":{"$ref":"#/components/schemas/GeoFilterValue"},"homeValue":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"AVM (automated valuation) at the linked property (~26%, MLS-linked). Pair with `currentBalance` to approximate current equity."}]},"includeUnknownOriginator":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Include loans that have no originator NMLS id. Omitted/false (default): such loans are excluded — the vast majority are pre-2016 public records with no linkable originator. true: include them. Note that the default scopes results to loans with a known originator (~2016+ recordings)."}]},"interestRate":{"$ref":"#/components/schemas/NumericFilterValue"},"lender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender ID — the normalized lender-dictionary key, NOT a fuzzy name match. Resolve a lender via instantSearch (or listLenders) and pass the `id` it returns (e.g. \"mortgage_rocket\" or \"mortgage rocket\"). Underscores and letter case are normalized, so either id surface works. A stored normalized lender name (what the `slice: \"lender\"` chart buckets emit) is also accepted, so a chart bucket key filters directly. A value that is neither returns 400 rather than silently matching nothing — to search by lender NAME, use `lenderName`."}]},"lenderName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender name as recorded on the loan document — fuzzy, all-terms match (e.g. \"Fifth Third\"). The name counterpart to the exact-id `lender` filter; use `lender` when you have a resolved id, and this when you only have a name."}]},"loanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Funding/loan company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"loanType":{"$ref":"#/components/schemas/LoanTypeFilterValue"},"ltvAtOrigination":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Loan-to-value at ORIGINATION (sparse), as a PERCENT on a 0-100 scale (`80` = 80% LTV; values above 100 are real underwater loans). This is not a current LTV — there is no stored current-LTV field on loans."}]},"mode":{"enum":["and","or"],"type":"string"},"mortgageAmount":{"$ref":"#/components/schemas/NumericFilterValue"},"mortgageDate":{"$ref":"#/components/schemas/DateFilterValue"},"originator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Loan originator NMLS id (digits only). To search by name use `originatorName`, or resolve a name to its id via instantSearch."}]},"originatorName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"deprecated":true,"description":"DEPRECATED — fuzzy name matching is unreliable (same originator can return wildly different counts by name string). Resolve the loan officer via instantSearch and filter by `originator` (exact NMLS id) instead. Still functional for now."}]},"propertyId":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Parcel id — returns every loan recorded against one property. Pass the same string this endpoint returns as `mmPropertyId` on a loan row, or the `mmPropertyId` of a property record.\n\nThis is the parcel's FULL recorded loan history, which is deliberately wider than the loans embedded on a property record: that embed is a snapshot of what is still owed (up to five currently-active loans), so paid-off mortgages are absent from it and present here.\n\nMulti-unit caveat: loans carry a unit-blind parcel id, so for one unit of a multi-unit building this selects every unit in the building, not that unit alone."}]},"saleDate":{"$ref":"#/components/schemas/DateFilterValue"},"salePrice":{"$ref":"#/components/schemas/NumericFilterValue"},"state":{"$ref":"#/components/schemas/TextFilterValue"},"transactionType":{"$ref":"#/components/schemas/LoanTransactionTypeFilterValue"},"zip":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Alias of `zipCode` — same ZIP filter, accepted for cross-entity key parity."}]},"zipCode":{"$ref":"#/components/schemas/TextFilterValue"}},"type":"object"},"period":{"$ref":"#/components/schemas/DatedPeriod"}},"type":"object"},"LoanTimeSeriesRequest":{"additionalProperties":false,"properties":{"advancedFilters":{"$ref":"#/components/schemas/FilterNode"},"filters":{"$ref":"#/components/schemas/FilterNode"},"flatFilters":{"additionalProperties":false,"properties":{"borrowerStatus":{"$ref":"#/components/schemas/LoanBorrowerStatusFilterValue"},"broker":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Broker shop NMLS id (digits only). A broker is a company — resolve a broker name to its NMLS id via instantSearch (or listCompanies)."}]},"buyerEntityType":{"$ref":"#/components/schemas/BooleanFilterValue"},"city":{"$ref":"#/components/schemas/TextFilterValue"},"conforming":{"$ref":"#/components/schemas/BooleanFilterValue"},"county":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"County name (e.g. \"Broward\") or 5-digit FIPS code. Names resolve to FIPS server-side; include a `state` filter to disambiguate."}]},"currentBalance":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Estimated remaining principal balance (~19% populated). Approximate current equity as `homeValue` (AVM) minus this."}]},"employer":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Employer/company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"equity":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Point-in-time equity recorded on the loan (sparse, ~10%). NOT a live current-equity figure. For HELOC/cash-out targeting on up-to-date equity, use properties search (listProperties) instead — its equity is far better populated and current."}]},"excludeBroker":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans brokered by this broker-shop NMLS id (digits only) — the inverse of `broker`."}]},"excludeCity":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this city — the inverse of `city`."}]},"excludeLender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans from this lender ID (\"everyone but X\") — the inverse of `lender`, same id contract (resolve via instantSearch/listLenders). Loans with no lender stay in the results."}]},"excludeLoanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans funded by this company NMLS id (digits only) — the inverse of `loanCompany`."}]},"excludeLoanType":{"$ref":"#/components/schemas/LoanTypeExcludeFilterValue"},"excludeOriginator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans with this originator NMLS id (digits only) — the inverse of `originator`. Common for 'everyone but my own shop' lists."}]},"excludeState":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this state (2-letter code, e.g. \"CA\") — the inverse of `state`. For \"everywhere but this state\" lists."}]},"excludeTransactionType":{"$ref":"#/components/schemas/LoanTransactionTypeExcludeFilterValue"},"excludeZipCode":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this ZIP code — the inverse of `zipCode`."}]},"fips":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exact 5-digit county FIPS code (no name resolution) — the code-only escape hatch alongside `county`."}]},"geoPoint":{"$ref":"#/components/schemas/GeoFilterValue"},"homeValue":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"AVM (automated valuation) at the linked property (~26%, MLS-linked). Pair with `currentBalance` to approximate current equity."}]},"includeUnknownOriginator":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Include loans that have no originator NMLS id. Omitted/false (default): such loans are excluded — the vast majority are pre-2016 public records with no linkable originator. true: include them. Note that the default scopes results to loans with a known originator (~2016+ recordings)."}]},"interestRate":{"$ref":"#/components/schemas/NumericFilterValue"},"lender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender ID — the normalized lender-dictionary key, NOT a fuzzy name match. Resolve a lender via instantSearch (or listLenders) and pass the `id` it returns (e.g. \"mortgage_rocket\" or \"mortgage rocket\"). Underscores and letter case are normalized, so either id surface works. A stored normalized lender name (what the `slice: \"lender\"` chart buckets emit) is also accepted, so a chart bucket key filters directly. A value that is neither returns 400 rather than silently matching nothing — to search by lender NAME, use `lenderName`."}]},"lenderName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender name as recorded on the loan document — fuzzy, all-terms match (e.g. \"Fifth Third\"). The name counterpart to the exact-id `lender` filter; use `lender` when you have a resolved id, and this when you only have a name."}]},"loanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Funding/loan company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"loanType":{"$ref":"#/components/schemas/LoanTypeFilterValue"},"ltvAtOrigination":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Loan-to-value at ORIGINATION (sparse), as a PERCENT on a 0-100 scale (`80` = 80% LTV; values above 100 are real underwater loans). This is not a current LTV — there is no stored current-LTV field on loans."}]},"mode":{"enum":["and","or"],"type":"string"},"mortgageAmount":{"$ref":"#/components/schemas/NumericFilterValue"},"mortgageDate":{"$ref":"#/components/schemas/DateFilterValue"},"originator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Loan originator NMLS id (digits only). To search by name use `originatorName`, or resolve a name to its id via instantSearch."}]},"originatorName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"deprecated":true,"description":"DEPRECATED — fuzzy name matching is unreliable (same originator can return wildly different counts by name string). Resolve the loan officer via instantSearch and filter by `originator` (exact NMLS id) instead. Still functional for now."}]},"propertyId":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Parcel id — returns every loan recorded against one property. Pass the same string this endpoint returns as `mmPropertyId` on a loan row, or the `mmPropertyId` of a property record.\n\nThis is the parcel's FULL recorded loan history, which is deliberately wider than the loans embedded on a property record: that embed is a snapshot of what is still owed (up to five currently-active loans), so paid-off mortgages are absent from it and present here.\n\nMulti-unit caveat: loans carry a unit-blind parcel id, so for one unit of a multi-unit building this selects every unit in the building, not that unit alone."}]},"saleDate":{"$ref":"#/components/schemas/DateFilterValue"},"salePrice":{"$ref":"#/components/schemas/NumericFilterValue"},"state":{"$ref":"#/components/schemas/TextFilterValue"},"transactionType":{"$ref":"#/components/schemas/LoanTransactionTypeFilterValue"},"zip":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Alias of `zipCode` — same ZIP filter, accepted for cross-entity key parity."}]},"zipCode":{"$ref":"#/components/schemas/TextFilterValue"}},"type":"object"},"interval":{"$ref":"#/components/schemas/Interval"},"measure":{"$ref":"#/components/schemas/Measure"},"period":{"$ref":"#/components/schemas/DatedPeriod"},"segment":{"$ref":"#/components/schemas/LoanSegment"}},"type":"object"},"LoanTransactionTypeExcludeFilterValue":{"anyOf":[{"description":"One of (case-insensitive): purchase, refinance, construction, equity, reo","enum":["purchase","refinance","construction","equity","reo"],"type":"string"},{"description":"Match any of these values","items":{"description":"One of (case-insensitive): purchase, refinance, construction, equity, reo","enum":["purchase","refinance","construction","equity","reo"],"type":"string"},"type":"array"},{"description":"Fuzzy text match","properties":{"match":{"type":"string"}},"required":["match"],"type":"object"},{"nullable":true}],"description":"Exclude loans of this transaction type — the inverse of `transactionType`, same values (one type or a list; a list drops loans matching ANY of them). E.g. `[\"equity\"]` keeps purchase, refinance, construction and REO. Loans with no transaction type recorded stay in the results."},"LoanTransactionTypeFilterValue":{"anyOf":[{"description":"One of (case-insensitive): purchase, refinance, construction, equity, reo","enum":["purchase","refinance","construction","equity","reo"],"type":"string"},{"description":"Match any of these values","items":{"description":"One of (case-insensitive): purchase, refinance, construction, equity, reo","enum":["purchase","refinance","construction","equity","reo"],"type":"string"},"type":"array"},{"description":"Fuzzy text match","properties":{"match":{"type":"string"}},"required":["match"],"type":"object"},{"nullable":true}]},"LoanTypeExcludeFilterValue":{"anyOf":[{"description":"One of (case-insensitive): conventional, fha, va, usda, he, heloc, building, balloon, commercial, reverse, sba, assumption, stand_alone_refi, stand_alone_second, aggregate, closed_end, negative_amortization, land_contract, modification, trade, other, unknown","enum":["conventional","fha","va","usda","he","heloc","building","balloon","commercial","reverse","sba","assumption","stand_alone_refi","stand_alone_second","aggregate","closed_end","negative_amortization","land_contract","modification","trade","other","unknown"],"type":"string"},{"description":"Match any of these values","items":{"description":"One of (case-insensitive): conventional, fha, va, usda, he, heloc, building, balloon, commercial, reverse, sba, assumption, stand_alone_refi, stand_alone_second, aggregate, closed_end, negative_amortization, land_contract, modification, trade, other, unknown","enum":["conventional","fha","va","usda","he","heloc","building","balloon","commercial","reverse","sba","assumption","stand_alone_refi","stand_alone_second","aggregate","closed_end","negative_amortization","land_contract","modification","trade","other","unknown"],"type":"string"},"type":"array"},{"description":"Fuzzy text match","properties":{"match":{"type":"string"}},"required":["match"],"type":"object"},{"nullable":true}],"description":"Exclude loans of this loan type — the inverse of `loanType`, same values (one type or a list; a list drops loans matching ANY of them). E.g. `[\"he\", \"heloc\"]` keeps everything but home-equity loans and HELOCs. Loans with no loan type recorded stay in the results."},"LoanTypeFilterValue":{"anyOf":[{"description":"One of (case-insensitive): conventional, fha, va, usda, he, heloc, building, balloon, commercial, reverse, sba, assumption, stand_alone_refi, stand_alone_second, aggregate, closed_end, negative_amortization, land_contract, modification, trade, other, unknown","enum":["conventional","fha","va","usda","he","heloc","building","balloon","commercial","reverse","sba","assumption","stand_alone_refi","stand_alone_second","aggregate","closed_end","negative_amortization","land_contract","modification","trade","other","unknown"],"type":"string"},{"description":"Match any of these values","items":{"description":"One of (case-insensitive): conventional, fha, va, usda, he, heloc, building, balloon, commercial, reverse, sba, assumption, stand_alone_refi, stand_alone_second, aggregate, closed_end, negative_amortization, land_contract, modification, trade, other, unknown","enum":["conventional","fha","va","usda","he","heloc","building","balloon","commercial","reverse","sba","assumption","stand_alone_refi","stand_alone_second","aggregate","closed_end","negative_amortization","land_contract","modification","trade","other","unknown"],"type":"string"},"type":"array"},{"description":"Fuzzy text match","properties":{"match":{"type":"string"}},"required":["match"],"type":"object"},{"nullable":true}]},"LocationNormalization":{"properties":{"candidates":{"description":"Location ids matching an ambiguous name, ranked. Use `instantSearch` or `suggestLocations` to pick one.","items":{"type":"string"},"type":"array"},"confidence":{"description":"\"exact\" — matched a dictionary entry as written. \"normalized\" — resolved to a different spelling or merged several candidates. \"fallback\" — NOT resolved; the raw value was passed through, so a zero result means the name was not recognized rather than empty.","enum":["exact","normalized","fallback"],"example":"normalized","type":"string"},"displayName":{"example":"Saint Louis, MO","type":"string"},"field":{"description":"The filter key this applies to","example":"city","type":"string"},"id":{"description":"Resolved location id — pass this back for an exact filter","example":"city_mo_saint-louis","type":"string"},"normalized":{"example":"Saint Louis","type":"string"},"original":{"example":"St. Louis","type":"string"},"variants":{"description":"Spellings actually queried against the index","items":{"type":"string"},"type":"array"}},"required":["field","original","normalized","displayName","confidence"],"type":"object"},"LocationRetrieveResponse":{"properties":{"location":{"$ref":"#/components/schemas/NormalizedLocation"}},"required":["location"],"type":"object"},"LocationSuggestResponse":{"properties":{"suggestions":{"items":{"$ref":"#/components/schemas/MapboxSuggestion"},"type":"array"}},"required":["suggestions"],"type":"object"},"MapboxSuggestion":{"properties":{"feature_type":{"type":"string"},"full_address":{"type":"string"},"id":{"description":"Location dictionary id (e.g. `city_mo_saint-louis`). Pass this to a city / county filter. Absent on Mapbox address suggestions.","type":"string"},"mapbox_id":{"description":"Pass to `retrieveLocation`. On a dictionary suggestion this is the location `id`; on a Mapbox suggestion it is the Mapbox feature id.","type":"string"},"name":{"type":"string"},"place_formatted":{"type":"string"},"source":{"description":"Where the suggestion came from. `dictionary` suggestions carry an `id` that filters accept; `mapbox` suggestions are addresses and coordinates only.","enum":["dictionary","mapbox"],"type":"string"},"state":{"type":"string"},"totalCount":{"description":"Records across all entities at this location — a popularity signal for ranking, not a filter result count.","type":"number"},"type":{"description":"Location type — `city` or `county`.","type":"string"}},"required":["mapbox_id","name","feature_type"],"type":"object"},"MarketChartMeasure":{"default":"units","description":"Which metric to compute. Every field-backed measure is sentinel-guarded: the source encodes unknown values as an out-of-range fill, so values outside the measure's plausible range are dropped before it is aggregated. Ranges: `volume` 0–100,000,000; `avgRate` 0–25; `avgLoanAmount` 0–100,000,000; `avgCreditScore` 300–850; `avgLTV` 0–999; `avgDTI` 0–999; `avgIncome` 0–100,000,000; `avgAppraisedValue` 0–100,000,000; `avgPurchasePrice` 0–100,000,000; `avgDtiFront` 0–999; `avgCombinedLtv` 0–999; `avgLoanTerm` 0–1,200; `originatedVolume` 0–100,000,000; `originatedAvgDti` 0–100. `units` and `originatedUnits` are document counts and are not guarded. Each response reports how many documents its guard excluded, so a mean taken over 98% of the data can be told apart from one taken over 60%. NOTE on population: `units` and `volume` cover loan APPLICATIONS of every outcome — denials, withdrawals and secondary-market purchases included — and so does `avgDTI`, while `originatedUnits`, `originatedVolume` and `originatedAvgDti` cover originations only. Which metric each bar reports, AND what the bars are ranked by — the list is ordered by the measure you ask for, descending. Defaults to `units`, so an unqualified \"top originators\" means the busiest; pass `volume` for the biggest by dollars, or an average to rank by that average. Two things to know about the averages specifically. Buckets built from fewer than 5 documents are dropped from an average chart entirely, because a mean says nothing about how many transactions produced it and a single-transaction bucket would otherwise outrank real ones; no floor is applied to `units` or `volume`, where a lone large transaction is a legitimate top bar. And ranking a bucket list by a sub-aggregated average is approximate in the search engine — each shard contributes its own local top-N before they are merged — so treat the ordering of an average chart as indicative near the boundary rather than exact. Every bucket publishes its own `count`, so the sample size behind a value is never implicit.","enum":["volume","units","avgRate","avgLoanAmount","avgCreditScore","avgLTV","avgDTI","avgIncome","avgAppraisedValue","avgPurchasePrice","avgDtiFront","avgCombinedLtv","avgLoanTerm","originatedUnits","originatedVolume","originatedAvgDti"],"type":"string"},"MarketChartRequest":{"additionalProperties":false,"properties":{"advancedFilters":{"$ref":"#/components/schemas/FilterNode"},"filters":{"$ref":"#/components/schemas/FilterNode"},"flatFilters":{"$ref":"#/components/schemas/MarketFlatFilters"},"measure":{"$ref":"#/components/schemas/MarketChartMeasure"},"period":{"$ref":"#/components/schemas/DatedPeriod"},"slice":{"$ref":"#/components/schemas/MarketSliceDimension"}},"required":["slice"],"type":"object"},"MarketCommunityBucket":{"properties":{"affordableLoanOriginations":{"type":"number"},"affordableLoanSharePct":{"description":"Share (0-100) of `originations` that are affordable loans.","nullable":true,"type":"number"},"avgMinorityTractPct":{"description":"Average non-white share (0-100) of the neighborhood population across originations that carry it. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"avgTractIncomeVsMetroPct":{"description":"Average neighborhood median family income as a percent of its metro area's — 100 is parity, and it legitimately exceeds 100. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"craEligibleAndAffordableOriginations":{"description":"Originations both CRA-eligible and affordable.","type":"number"},"craEligibleCoverage":{"description":"Originations carrying a CRA-eligibility determination — the denominator of `craEligibleSharePct`. Effectively the whole population: the determination is loan-level and is present on every record.","type":"number"},"craEligibleOriginations":{"type":"number"},"craEligibleSharePct":{"description":"Share (0-100) of `craEligibleCoverage` that is CRA-eligible — a low- or moderate-income neighborhood OR a low- or moderate-income borrower. Null when nothing in scope carries the determination.","nullable":true,"type":"number"},"incomeBandCoverage":{"description":"Originations whose neighborhood carries an income band — the denominator of `lowModIncomeTractSharePct`, `middleIncomeTractSharePct` and every `incomeBands[].sharePct`. READ THIS FIRST: roughly a fifth of records carry a band, and a share taken over the full population instead is about 4.5x too low.","type":"number"},"incomeBands":{"items":{"$ref":"#/components/schemas/MarketCommunityIncomeBand"},"type":"array"},"key":{"description":"The dimension value this bucket covers — a metro (CBSA) code for `metro`, a state code for `state`, and so on.","type":"string"},"lowModIncomeTractOriginations":{"type":"number"},"lowModIncomeTractSharePct":{"description":"Share (0-100) of `incomeBandCoverage` originated in a low- or moderate-income neighborhood. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"majorityMinorityTractOriginations":{"type":"number"},"majorityMinorityTractSharePct":{"description":"Share (0-100) of `minorityTractCoverage` originated in a majority-minority neighborhood. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"middleIncomeTractOriginations":{"type":"number"},"middleIncomeTractSharePct":{"description":"Share (0-100) of `incomeBandCoverage` originated in a middle-income neighborhood. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"minorityTractCoverage":{"description":"Originations whose neighborhood carries the majority-minority determination — the denominator of `majorityMinorityTractSharePct` and the population behind `avgMinorityTractPct`. About half of all records; it is a different denominator from `incomeBandCoverage`.","type":"number"},"originations":{"description":"Originations matched by the filters in this scope.","type":"number"},"underservedMarketOriginations":{"type":"number"},"underservedMarketSharePct":{"description":"Share (0-100) of `originations` in an underserved market.","nullable":true,"type":"number"}},"required":["key","originations","craEligibleOriginations","craEligibleCoverage","craEligibleSharePct","incomeBandCoverage","lowModIncomeTractOriginations","lowModIncomeTractSharePct","middleIncomeTractOriginations","middleIncomeTractSharePct","incomeBands","majorityMinorityTractOriginations","minorityTractCoverage","majorityMinorityTractSharePct","avgMinorityTractPct","avgTractIncomeVsMetroPct","underservedMarketOriginations","underservedMarketSharePct","affordableLoanOriginations","affordableLoanSharePct","craEligibleAndAffordableOriginations"],"type":"object"},"MarketCommunityIncomeBand":{"description":"One FFIEC tract income band and its share (0-100) of `incomeBandCoverage`. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","properties":{"level":{"enum":["low","moderate","middle","upper"],"type":"string"},"originations":{"type":"number"},"sharePct":{"nullable":true,"type":"number"}},"required":["level","originations","sharePct"],"type":"object"},"MarketCommunityIncomeLevel":{"anyOf":[{"description":"One of (case-insensitive): low, moderate, middle, upper","enum":["low","moderate","middle","upper"],"type":"string"},{"description":"Match any of these values","items":{"description":"One of (case-insensitive): low, moderate, middle, upper","enum":["low","moderate","middle","upper"],"type":"string"},"type":"array"},{"description":"Fuzzy text match","properties":{"match":{"type":"string"}},"required":["match"],"type":"object"},{"nullable":true}],"description":"FFIEC income classification of the neighborhood the property sits in. A tract-level aggregate statistic describing the neighborhood, never an individual, household or applicant attribute. Carried on roughly a fifth of originations, so this filter narrows sharply."},"MarketCommunityInterval":{"description":"Also return `series`: the mix per bucket.","enum":["monthly","quarterly","yearly"],"type":"string"},"MarketCommunityLendingRequest":{"additionalProperties":false,"properties":{"advancedFilters":{"$ref":"#/components/schemas/FilterNode"},"compare":{"description":"Also return `previous` (preceding equal-length window).","type":"boolean"},"filters":{"$ref":"#/components/schemas/FilterNode"},"flatFilters":{"$ref":"#/components/schemas/MarketFlatFilters"},"interval":{"$ref":"#/components/schemas/MarketCommunityInterval"},"limit":{"description":"Maximum buckets when `slice` is supplied (default 25, max 200).","maximum":200,"minimum":1,"type":"integer"},"period":{"$ref":"#/components/schemas/DatedPeriod"},"slice":{"description":"Break the mix down by a market dimension — `metro` for the metro (CBSA) grain, `state` / `county` / `zip` for geography, or any product dimension. Each bucket reports its OWN denominators, so bucket shares are comparable to each other and to the overall mix. Omit for the overall mix only.","enum":["state","county","metro","zip","loanPurpose","loanType","propertyType","occupancyType","amortizationType","channel","borrowerGeneration","firstTimeHomebuyer","veteranIndicator","hmdaActionTaken","selfEmployed","currentHomeOwner","lenderType","lenderVolumeClass"],"type":"string"}},"type":"object"},"MarketCommunityLendingResponse":{"properties":{"overall":{"$ref":"#/components/schemas/MarketCommunityMix"},"previous":{"allOf":[{"$ref":"#/components/schemas/MarketCommunityMix"},{"description":"With `compare: true`: the mix over the preceding window of equal length."}]},"series":{"items":{"$ref":"#/components/schemas/MarketCommunitySeriesBucket"},"type":"array"},"slice":{"properties":{"buckets":{"items":{"$ref":"#/components/schemas/MarketCommunityBucket"},"type":"array"},"dimension":{"type":"string"}},"required":["dimension","buckets"],"type":"object"}},"required":["overall"],"type":"object"},"MarketCommunityMix":{"properties":{"affordableLoanOriginations":{"type":"number"},"affordableLoanSharePct":{"description":"Share (0-100) of `originations` that are affordable loans.","nullable":true,"type":"number"},"avgMinorityTractPct":{"description":"Average non-white share (0-100) of the neighborhood population across originations that carry it. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"avgTractIncomeVsMetroPct":{"description":"Average neighborhood median family income as a percent of its metro area's — 100 is parity, and it legitimately exceeds 100. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"craEligibleAndAffordableOriginations":{"description":"Originations both CRA-eligible and affordable.","type":"number"},"craEligibleCoverage":{"description":"Originations carrying a CRA-eligibility determination — the denominator of `craEligibleSharePct`. Effectively the whole population: the determination is loan-level and is present on every record.","type":"number"},"craEligibleOriginations":{"type":"number"},"craEligibleSharePct":{"description":"Share (0-100) of `craEligibleCoverage` that is CRA-eligible — a low- or moderate-income neighborhood OR a low- or moderate-income borrower. Null when nothing in scope carries the determination.","nullable":true,"type":"number"},"incomeBandCoverage":{"description":"Originations whose neighborhood carries an income band — the denominator of `lowModIncomeTractSharePct`, `middleIncomeTractSharePct` and every `incomeBands[].sharePct`. READ THIS FIRST: roughly a fifth of records carry a band, and a share taken over the full population instead is about 4.5x too low.","type":"number"},"incomeBands":{"items":{"$ref":"#/components/schemas/MarketCommunityIncomeBand"},"type":"array"},"lowModIncomeTractOriginations":{"type":"number"},"lowModIncomeTractSharePct":{"description":"Share (0-100) of `incomeBandCoverage` originated in a low- or moderate-income neighborhood. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"majorityMinorityTractOriginations":{"type":"number"},"majorityMinorityTractSharePct":{"description":"Share (0-100) of `minorityTractCoverage` originated in a majority-minority neighborhood. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"middleIncomeTractOriginations":{"type":"number"},"middleIncomeTractSharePct":{"description":"Share (0-100) of `incomeBandCoverage` originated in a middle-income neighborhood. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"minorityTractCoverage":{"description":"Originations whose neighborhood carries the majority-minority determination — the denominator of `majorityMinorityTractSharePct` and the population behind `avgMinorityTractPct`. About half of all records; it is a different denominator from `incomeBandCoverage`.","type":"number"},"originations":{"description":"Originations matched by the filters in this scope.","type":"number"},"underservedMarketOriginations":{"type":"number"},"underservedMarketSharePct":{"description":"Share (0-100) of `originations` in an underserved market.","nullable":true,"type":"number"}},"required":["originations","craEligibleOriginations","craEligibleCoverage","craEligibleSharePct","incomeBandCoverage","lowModIncomeTractOriginations","lowModIncomeTractSharePct","middleIncomeTractOriginations","middleIncomeTractSharePct","incomeBands","majorityMinorityTractOriginations","minorityTractCoverage","majorityMinorityTractSharePct","avgMinorityTractPct","avgTractIncomeVsMetroPct","underservedMarketOriginations","underservedMarketSharePct","affordableLoanOriginations","affordableLoanSharePct","craEligibleAndAffordableOriginations"],"type":"object"},"MarketCommunitySeriesBucket":{"properties":{"affordableLoanOriginations":{"type":"number"},"affordableLoanSharePct":{"description":"Share (0-100) of `originations` that are affordable loans.","nullable":true,"type":"number"},"avgMinorityTractPct":{"description":"Average non-white share (0-100) of the neighborhood population across originations that carry it. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"avgTractIncomeVsMetroPct":{"description":"Average neighborhood median family income as a percent of its metro area's — 100 is parity, and it legitimately exceeds 100. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"craEligibleAndAffordableOriginations":{"description":"Originations both CRA-eligible and affordable.","type":"number"},"craEligibleCoverage":{"description":"Originations carrying a CRA-eligibility determination — the denominator of `craEligibleSharePct`. Effectively the whole population: the determination is loan-level and is present on every record.","type":"number"},"craEligibleOriginations":{"type":"number"},"craEligibleSharePct":{"description":"Share (0-100) of `craEligibleCoverage` that is CRA-eligible — a low- or moderate-income neighborhood OR a low- or moderate-income borrower. Null when nothing in scope carries the determination.","nullable":true,"type":"number"},"from":{"description":"Bucket start (inclusive), YYYY-MM-DD.","type":"string"},"incomeBandCoverage":{"description":"Originations whose neighborhood carries an income band — the denominator of `lowModIncomeTractSharePct`, `middleIncomeTractSharePct` and every `incomeBands[].sharePct`. READ THIS FIRST: roughly a fifth of records carry a band, and a share taken over the full population instead is about 4.5x too low.","type":"number"},"incomeBands":{"items":{"$ref":"#/components/schemas/MarketCommunityIncomeBand"},"type":"array"},"lowModIncomeTractOriginations":{"type":"number"},"lowModIncomeTractSharePct":{"description":"Share (0-100) of `incomeBandCoverage` originated in a low- or moderate-income neighborhood. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"majorityMinorityTractOriginations":{"type":"number"},"majorityMinorityTractSharePct":{"description":"Share (0-100) of `minorityTractCoverage` originated in a majority-minority neighborhood. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"middleIncomeTractOriginations":{"type":"number"},"middleIncomeTractSharePct":{"description":"Share (0-100) of `incomeBandCoverage` originated in a middle-income neighborhood. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"minorityTractCoverage":{"description":"Originations whose neighborhood carries the majority-minority determination — the denominator of `majorityMinorityTractSharePct` and the population behind `avgMinorityTractPct`. About half of all records; it is a different denominator from `incomeBandCoverage`.","type":"number"},"originations":{"description":"Originations matched by the filters in this scope.","type":"number"},"to":{"description":"Bucket end (exclusive), YYYY-MM-DD.","type":"string"},"underservedMarketOriginations":{"type":"number"},"underservedMarketSharePct":{"description":"Share (0-100) of `originations` in an underserved market.","nullable":true,"type":"number"}},"required":["from","to","originations","craEligibleOriginations","craEligibleCoverage","craEligibleSharePct","incomeBandCoverage","lowModIncomeTractOriginations","lowModIncomeTractSharePct","middleIncomeTractOriginations","middleIncomeTractSharePct","incomeBands","majorityMinorityTractOriginations","minorityTractCoverage","majorityMinorityTractSharePct","avgMinorityTractPct","avgTractIncomeVsMetroPct","underservedMarketOriginations","underservedMarketSharePct","affordableLoanOriginations","affordableLoanSharePct","craEligibleAndAffordableOriginations"],"type":"object"},"MarketConcentrationFilterValue":{"additionalProperties":false,"description":"Share of the originator's period volume held by their SINGLE LARGEST city, as a 0–100 percent. `{gte:50}` = 'at least half their book is in one city'. LOWER BOUNDS ONLY (`gte`/`gt`): an upper bound on this reads as 'some market is small', which is true of almost everyone — to find diversified producers use `marketCount` instead.","properties":{"gt":{"maximum":100,"minimum":0,"type":"number"},"gte":{"maximum":100,"minimum":0,"type":"number"},"lt":{"maximum":100,"minimum":0,"type":"number"},"lte":{"maximum":100,"minimum":0,"type":"number"}},"type":"object"},"MarketExcludedCounts":{"description":"Per-measure count of documents this query's sentinel guard excluded — documents that carry the measure's field but whose value is an out-of-range fill. Compare against `units` to see what share of the matched population each average was actually computed over. Absent for `units` (a document count, not a guarded metric).","properties":{"avgAppraisedValue":{"type":"number"},"avgCombinedLtv":{"type":"number"},"avgCreditScore":{"type":"number"},"avgDTI":{"type":"number"},"avgDtiFront":{"type":"number"},"avgIncome":{"type":"number"},"avgLTV":{"type":"number"},"avgLoanAmount":{"type":"number"},"avgLoanTerm":{"type":"number"},"avgPurchasePrice":{"type":"number"},"avgRate":{"type":"number"},"originatedAvgDti":{"type":"number"},"originatedVolume":{"type":"number"},"volume":{"type":"number"}},"type":"object"},"MarketFlatFilters":{"additionalProperties":false,"properties":{"amortizationType":{"$ref":"#/components/schemas/TextFilterValue"},"appraisedValue":{"$ref":"#/components/schemas/NumericFilterValue"},"borrowerGeneration":{"$ref":"#/components/schemas/TextFilterValue"},"channel":{"$ref":"#/components/schemas/TextFilterValue"},"closingDate":{"$ref":"#/components/schemas/DateFilterValue"},"combinedLtv":{"$ref":"#/components/schemas/NumericFilterValue"},"communityIncomeLevel":{"$ref":"#/components/schemas/MarketCommunityIncomeLevel"},"county":{"$ref":"#/components/schemas/TextFilterValue"},"countyCode":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"3-digit county code (the county segment of a FIPS, e.g. Philadelphia = \"101\"). Pair it with `state` — the code is not unique across states. `county` accepts a county NAME or 5-digit FIPS and resolves to this code for you."}]},"craEligible":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Only CRA-eligible originations (a low- or moderate-income neighborhood OR a low- or moderate-income borrower). Determined on every origination."}]},"creditScore":{"$ref":"#/components/schemas/NumericFilterValue"},"currentHomeOwner":{"$ref":"#/components/schemas/BooleanFilterValue"},"dti":{"$ref":"#/components/schemas/NumericFilterValue"},"dtifront":{"$ref":"#/components/schemas/NumericFilterValue"},"firstTimeHomebuyer":{"$ref":"#/components/schemas/BooleanFilterValue"},"hmdaActionTaken":{"$ref":"#/components/schemas/TextFilterValue"},"income":{"$ref":"#/components/schemas/NumericFilterValue"},"loanAmount":{"$ref":"#/components/schemas/NumericFilterValue"},"loanApplicationDate":{"$ref":"#/components/schemas/DateFilterValue"},"loanPurpose":{"$ref":"#/components/schemas/TextFilterValue"},"loanStatus":{"$ref":"#/components/schemas/MarketLoanStatus"},"loanTerm":{"$ref":"#/components/schemas/NumericFilterValue"},"loanType":{"$ref":"#/components/schemas/TextFilterValue"},"lowModIncomeTract":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Only originations in a low- or moderate-income neighborhood. This describes the U.S. Census tract (neighborhood) as a whole — a tract-level aggregate statistic, never an individual, household or applicant attribute. `false` also matches originations whose neighborhood carries no income classification; pair with `communityIncomeLevel` when you need the classified population only."}]},"ltv":{"$ref":"#/components/schemas/NumericFilterValue"},"majorityMinorityTract":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Only originations in a majority-minority neighborhood. This describes the U.S. Census tract (neighborhood) as a whole — a tract-level aggregate statistic, never an individual, household or applicant attribute. Carried on about half of originations."}]},"metro":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Metro area code (5-digit federal CBSA code, e.g. Los Angeles = \"31084\"). Roughly half of originations sit outside any metro area and carry no code, so a metro filter is a narrowing one."}]},"middleIncomeTract":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Only originations in a middle-income neighborhood. Tract-level aggregate, never an individual attribute. Same caveat on `false` as `lowModIncomeTract`."}]},"minorityTractPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Non-white share (0-100) of the neighborhood's population. Tract-level aggregate, never an individual attribute."}]},"mode":{"enum":["and","or"],"type":"string"},"noteRate":{"$ref":"#/components/schemas/NumericFilterValue"},"occupancyType":{"$ref":"#/components/schemas/TextFilterValue"},"propertyType":{"$ref":"#/components/schemas/TextFilterValue"},"purchasePrice":{"$ref":"#/components/schemas/NumericFilterValue"},"selfEmployed":{"$ref":"#/components/schemas/BooleanFilterValue"},"state":{"$ref":"#/components/schemas/TextFilterValue"},"tractIncomeVsMetroPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Neighborhood median family income as a percent of its metro area's — 100 is parity, and it legitimately exceeds 100. Tract-level aggregate, never an individual attribute."}]},"veteranIndicator":{"$ref":"#/components/schemas/BooleanFilterValue"},"zip":{"$ref":"#/components/schemas/TextFilterValue"}},"type":"object"},"MarketLoanStatus":{"anyOf":[{"description":"One of (case-insensitive): funded, purchased, not_funded, pending","enum":["funded","purchased","not_funded","pending"],"type":"string"},{"description":"Match any of these values","items":{"description":"One of (case-insensitive): funded, purchased, not_funded, pending","enum":["funded","purchased","not_funded","pending"],"type":"string"},"type":"array"},{"description":"Fuzzy text match","properties":{"match":{"type":"string"}},"required":["match"],"type":"object"},{"nullable":true}],"description":"HMDA action, else funding/denial/lock date evidence."},"MarketMeasure":{"description":"Which metric to compute. Every field-backed measure is sentinel-guarded: the source encodes unknown values as an out-of-range fill, so values outside the measure's plausible range are dropped before it is aggregated. Ranges: `volume` 0–100,000,000; `avgRate` 0–25; `avgLoanAmount` 0–100,000,000; `avgCreditScore` 300–850; `avgLTV` 0–999; `avgDTI` 0–999; `avgIncome` 0–100,000,000; `avgAppraisedValue` 0–100,000,000; `avgPurchasePrice` 0–100,000,000; `avgDtiFront` 0–999; `avgCombinedLtv` 0–999; `avgLoanTerm` 0–1,200; `originatedVolume` 0–100,000,000; `originatedAvgDti` 0–100. `units` and `originatedUnits` are document counts and are not guarded. Each response reports how many documents its guard excluded, so a mean taken over 98% of the data can be told apart from one taken over 60%. NOTE on population: `units` and `volume` cover loan APPLICATIONS of every outcome — denials, withdrawals and secondary-market purchases included — and so does `avgDTI`, while `originatedUnits`, `originatedVolume` and `originatedAvgDti` cover originations only.","enum":["volume","units","avgRate","avgLoanAmount","avgCreditScore","avgLTV","avgDTI","avgIncome","avgAppraisedValue","avgPurchasePrice","avgDtiFront","avgCombinedLtv","avgLoanTerm","originatedUnits","originatedVolume","originatedAvgDti"],"type":"string"},"MarketMetrics":{"properties":{"avgAppraisedValue":{"description":"Average appraised property value. Excludes values outside 0–100,000,000 — the source encodes unknown values as an out-of-range fill, and averaging them raw is wrong by orders of magnitude. The bound is applied before the metric and is not part of the public filter surface, so an equivalent range filter will not reproduce this figure exactly.","nullable":true,"type":"number"},"avgCombinedLtv":{"description":"Average combined LTV (including subordinate liens). Excludes values outside 0–999 — the source encodes unknown values as an out-of-range fill, and averaging them raw is wrong by orders of magnitude. The bound is applied before the metric and is not part of the public filter surface, so an equivalent range filter will not reproduce this figure exactly.","nullable":true,"type":"number"},"avgCreditScore":{"description":"Average credit score. Excludes values outside 300–850 — the source encodes unknown values as an out-of-range fill, and averaging them raw is wrong by orders of magnitude. The bound is applied before the metric and is not part of the public filter surface, so an equivalent range filter will not reproduce this figure exactly.","type":"number"},"avgDTI":{"description":"Average back-end DTI ratio across loan APPLICATIONS matching the filters — every outcome, on the same population as `units`. A denied application carries a much higher ratio than a funded loan, often above 100, so this figure sits several points above what closed borrowers actually carry. For originations use `originatedAvgDti`. Excludes values outside 0–999 — the source encodes unknown values as an out-of-range fill, and averaging them raw is wrong by orders of magnitude. The bound is applied before the metric and is not part of the public filter surface, so an equivalent range filter will not reproduce this figure exactly.","type":"number"},"avgDtiFront":{"description":"Average front-end DTI ratio. Excludes values outside 0–999 — the source encodes unknown values as an out-of-range fill, and averaging them raw is wrong by orders of magnitude. The bound is applied before the metric and is not part of the public filter surface, so an equivalent range filter will not reproduce this figure exactly.","nullable":true,"type":"number"},"avgIncome":{"description":"Average household annual income. Excludes values outside 0–100,000,000 — the source encodes unknown values as an out-of-range fill, and averaging them raw is wrong by orders of magnitude. The bound is applied before the metric and is not part of the public filter surface, so an equivalent range filter will not reproduce this figure exactly.","type":"number"},"avgLTV":{"description":"Average LTV ratio. Excludes values outside 0–999 — the source encodes unknown values as an out-of-range fill, and averaging them raw is wrong by orders of magnitude. The bound is applied before the metric and is not part of the public filter surface, so an equivalent range filter will not reproduce this figure exactly.","type":"number"},"avgLoanAmount":{"description":"Average loan amount. Excludes values outside 0–100,000,000 — the source encodes unknown values as an out-of-range fill, and averaging them raw is wrong by orders of magnitude. The bound is applied before the metric and is not part of the public filter surface, so an equivalent range filter will not reproduce this figure exactly.","type":"number"},"avgLoanTerm":{"description":"Average loan term in months. Excludes values outside 0–1,200 — the source encodes unknown values as an out-of-range fill, and averaging them raw is wrong by orders of magnitude. The bound is applied before the metric and is not part of the public filter surface, so an equivalent range filter will not reproduce this figure exactly.","nullable":true,"type":"number"},"avgPurchasePrice":{"description":"Average purchase price. Excludes values outside 0–100,000,000 — the source encodes unknown values as an out-of-range fill, and averaging them raw is wrong by orders of magnitude. The bound is applied before the metric and is not part of the public filter surface, so an equivalent range filter will not reproduce this figure exactly.","nullable":true,"type":"number"},"avgRate":{"description":"Average note rate. Excludes values outside 0–25 — the source encodes unknown values as an out-of-range fill, and averaging them raw is wrong by orders of magnitude. The bound is applied before the metric and is not part of the public filter surface, so an equivalent range filter will not reproduce this figure exactly.","type":"number"},"excluded":{"$ref":"#/components/schemas/MarketExcludedCounts"},"originatedAvgDti":{"description":"Average back-end DTI ratio across ORIGINATED loans only — the subset of applications whose `hmdaActionTaken` is \"loan originated\". Prefer this over `avgDTI` for any question about what borrowers who actually got a loan are carrying. `avgDTI` averages applications of EVERY outcome, and a denied application legitimately carries a far higher ratio — often above 100 — because that is frequently why it was denied, so the two figures differ by several points on the same filters and neither is a correction of the other. `null` when the matched set contains no originations. Excludes values outside 0–100 — the source encodes unknown values as an out-of-range fill, and averaging them raw is wrong by orders of magnitude. The bound is applied before the metric and is not part of the public filter surface, so an equivalent range filter will not reproduce this figure exactly.","nullable":true,"type":"number"},"originatedUnits":{"description":"Loans ORIGINATED — the subset of `units` whose `hmdaActionTaken` is \"loan originated\". This is the count most callers mean by \"number of loans\"","type":"number"},"originatedVolume":{"description":"Total dollar volume of ORIGINATED loans — the subset of `volume` whose `hmdaActionTaken` is \"loan originated\". Pair with `originatedUnits` for an originated average loan size. Excludes values outside 0–100,000,000 — the source encodes unknown values as an out-of-range fill, and averaging them raw is wrong by orders of magnitude. The bound is applied before the metric and is not part of the public filter surface, so an equivalent range filter will not reproduce this figure exactly.","type":"number"},"outcomes":{"description":"How the matched applications split by outcome — a complete PARTITION of `units` and `volume`, so the two headline numbers can be reconciled against their parts without a second query. Roughly half of all rows are not originated loans and the share varies widely by geography, so no fixed correction ratio exists. Summary only: on the chart use `slice: \"hmdaActionTaken\"`, on the time-series `segment: \"hmdaActionTaken\"`.","items":{"$ref":"#/components/schemas/MarketOutcomeBucket"},"type":"array"},"units":{"description":"Loan APPLICATIONS matching the filters — every outcome, not just originations. Withdrawn, denied, closed-for-incompleteness and secondary-market purchases are all counted here; roughly half of all rows are not originated loans, and the originated share varies enough by geography that no fixed correction ratio exists. For originations use `originatedUnits`; `outcomes` reports the full breakdown, and `hmdaActionTaken` filters on it","type":"number"},"volume":{"description":"Total dollar volume of loan APPLICATIONS matching the filters — every outcome, on the same population as `units`, not just originations. For originated dollars use `originatedVolume`. `volume` ÷ `units` is an application average, not an originated average. Excludes values outside 0–100,000,000 — the source encodes unknown values as an out-of-range fill, and averaging them raw is wrong by orders of magnitude. The bound is applied before the metric and is not part of the public filter surface, so an equivalent range filter will not reproduce this figure exactly.","type":"number"}},"required":["volume","units","avgRate","avgLoanAmount","avgCreditScore","avgLTV","avgDTI","avgIncome","avgAppraisedValue","avgPurchasePrice","avgDtiFront","avgCombinedLtv","avgLoanTerm","originatedUnits","originatedVolume","originatedAvgDti"],"type":"object"},"MarketOutcomeBucket":{"properties":{"outcome":{"description":"The application outcome, exactly as stored — the same vocabulary the `hmdaActionTaken` filter accepts, so any bucket here can be reproduced as a filter. The empty-string bucket carries rows with no outcome recorded. One value is a leaked source header row and is not a real outcome.","type":"string"},"units":{"description":"Applications with this outcome. These sum to `units`.","type":"number"},"volume":{"description":"Dollar volume for this outcome. These sum to `volume`.","type":"number"}},"required":["outcome","units","volume"],"type":"object"},"MarketSignalsRequest":{"additionalProperties":false,"properties":{"flatFilters":{"$ref":"#/components/schemas/MarketFlatFilters"},"lookbackMonths":{"maximum":120,"minimum":6,"type":"integer"},"previous":{"allOf":[{"$ref":"#/components/schemas/MarketSignalsWindow"},{"description":"Comparison window; defaults to the preceding equal-length one."}]},"stats":{"items":{"enum":["funnel","refiMix","affordability","pipeline","status","refiOpportunity"],"type":"string"},"minItems":1,"type":"array"},"thresholdBps":{"maximum":500,"minimum":0,"type":"integer"},"window":{"$ref":"#/components/schemas/MarketSignalsWindow"}},"required":["window","stats"],"type":"object"},"MarketSignalsResponse":{"properties":{"affordability":{"properties":{"current":{"properties":{"medianAnnualIncome":{"nullable":true,"type":"number"},"medianLoanAmount":{"nullable":true,"type":"number"},"sampleCount":{"type":"number"}},"required":["medianLoanAmount","medianAnnualIncome","sampleCount"],"type":"object"},"monthly":{"items":{"properties":{"medianAnnualIncome":{"nullable":true,"type":"number"},"medianLoanAmount":{"nullable":true,"type":"number"},"month":{"type":"string"},"sampleCount":{"type":"number"}},"required":["medianLoanAmount","medianAnnualIncome","sampleCount","month"],"type":"object"},"type":"array"},"previous":{"properties":{"medianAnnualIncome":{"nullable":true,"type":"number"},"medianLoanAmount":{"nullable":true,"type":"number"},"sampleCount":{"type":"number"}},"required":["medianLoanAmount","medianAnnualIncome","sampleCount"],"type":"object"}},"required":["current","previous","monthly"],"type":"object"},"funnel":{"properties":{"reLock":{"properties":{"reLockedCount":{"type":"number"},"sampleCount":{"type":"number"}},"required":["reLockedCount","sampleCount"],"type":"object"},"timeToClose":{"properties":{"p25":{"nullable":true,"type":"number"},"p50":{"nullable":true,"type":"number"},"p75":{"nullable":true,"type":"number"},"sampleCount":{"type":"number"}},"required":["p25","p50","p75","sampleCount"],"type":"object"}},"required":["timeToClose","reLock"],"type":"object"},"pipeline":{"properties":{"expected":{"properties":{"next30Days":{"type":"number"},"next60Days":{"type":"number"},"next90Days":{"type":"number"},"weekly":{"items":{"properties":{"count":{"type":"number"},"weekStart":{"type":"string"}},"required":["weekStart","count"],"type":"object"},"type":"array"}},"required":["next30Days","next60Days","next90Days","weekly"],"type":"object"},"funnel":{"properties":{"application":{"type":"number"},"closing":{"type":"number"},"funded":{"type":"number"},"locked":{"type":"number"}},"required":["application","locked","closing","funded"],"type":"object"},"transitions":{"properties":{"appToLock":{"properties":{"converted":{"type":"number"},"p25":{"nullable":true,"type":"number"},"p50":{"nullable":true,"type":"number"},"p75":{"nullable":true,"type":"number"},"priorP50":{"nullable":true,"type":"number"},"priorSampleCount":{"type":"number"},"reached":{"type":"number"},"sampleCount":{"type":"number"}},"required":["p25","p50","p75","sampleCount","priorP50","priorSampleCount","reached","converted"],"type":"object"},"closeToFunding":{"properties":{"converted":{"type":"number"},"p25":{"nullable":true,"type":"number"},"p50":{"nullable":true,"type":"number"},"p75":{"nullable":true,"type":"number"},"priorP50":{"nullable":true,"type":"number"},"priorSampleCount":{"type":"number"},"reached":{"type":"number"},"sampleCount":{"type":"number"}},"required":["p25","p50","p75","sampleCount","priorP50","priorSampleCount","reached","converted"],"type":"object"}},"required":["appToLock","closeToFunding"],"type":"object"}},"required":["transitions","funnel","expected"],"type":"object"},"refiMix":{"properties":{"cashOut":{"properties":{"medianAmount":{"nullable":true,"type":"number"},"sampleCount":{"type":"number"}},"required":["medianAmount","sampleCount"],"type":"object"},"purposes":{"items":{"properties":{"count":{"type":"number"},"key":{"type":"string"}},"required":["key","count"],"type":"object"},"type":"array"}},"required":["purposes","cashOut"],"type":"object"},"refiOpportunity":{"properties":{"baseline":{"nullable":true,"type":"number"},"byLoanType":{"items":{"properties":{"count":{"type":"number"},"key":{"type":"string"}},"required":["key","count"],"type":"object"},"type":"array"},"byState":{"items":{"properties":{"avgRate":{"nullable":true,"type":"number"},"avgSpreadBps":{"nullable":true,"type":"number"},"count":{"type":"number"},"state":{"type":"string"},"totalVolume":{"type":"number"}},"required":["state","count","totalVolume","avgRate","avgSpreadBps"],"type":"object"},"type":"array"},"byVintage":{"items":{"properties":{"count":{"type":"number"},"year":{"type":"number"}},"required":["year","count"],"type":"object"},"type":"array"},"lookbackMonths":{"type":"number"},"medianSpreadBps":{"nullable":true,"type":"number"},"spreadHistogram":{"items":{"properties":{"count":{"type":"number"},"spreadBps":{"type":"number"}},"required":["spreadBps","count"],"type":"object"},"type":"array"},"thresholdBps":{"type":"number"},"topStateConcentrationPct":{"type":"number"},"totals":{"properties":{"count":{"type":"number"},"medianLoanAmount":{"nullable":true,"type":"number"},"totalVolume":{"type":"number"}},"required":["count","totalVolume","medianLoanAmount"],"type":"object"}},"required":["baseline","thresholdBps","lookbackMonths","totals","byState","spreadHistogram","medianSpreadBps","byVintage","byLoanType","topStateConcentrationPct"],"type":"object"},"status":{"properties":{"applications":{"properties":{"current":{"type":"number"},"prior":{"type":"number"}},"required":["current","prior"],"type":"object"},"approvals":{"properties":{"current":{"type":"number"},"prior":{"type":"number"}},"required":["current","prior"],"type":"object"},"expectedClosings":{"type":"number"},"locks":{"properties":{"current":{"type":"number"},"prior":{"type":"number"}},"required":["current","prior"],"type":"object"},"timeToClose":{"properties":{"current":{"properties":{"median":{"nullable":true,"type":"number"},"sampleCount":{"type":"number"}},"required":["median","sampleCount"],"type":"object"},"prior":{"properties":{"median":{"nullable":true,"type":"number"},"sampleCount":{"type":"number"}},"required":["median","sampleCount"],"type":"object"}},"required":["current","prior"],"type":"object"}},"required":["applications","locks","approvals","timeToClose","expectedClosings"],"type":"object"}},"type":"object"},"MarketSignalsWindow":{"description":"`[gte, lt)` window, YYYY-MM-DD.","properties":{"gte":{"format":"date","type":"string"},"lt":{"format":"date","type":"string"}},"required":["gte","lt"],"type":"object"},"MarketSliceDimension":{"enum":["state","county","metro","zip","loanPurpose","loanType","propertyType","occupancyType","amortizationType","channel","borrowerGeneration","firstTimeHomebuyer","veteranIndicator","hmdaActionTaken","selfEmployed","currentHomeOwner","lenderType","lenderVolumeClass"],"type":"string"},"MarketSummaryRequest":{"additionalProperties":false,"properties":{"advancedFilters":{"$ref":"#/components/schemas/FilterNode"},"filters":{"$ref":"#/components/schemas/FilterNode"},"flatFilters":{"$ref":"#/components/schemas/MarketFlatFilters"},"period":{"$ref":"#/components/schemas/DatedPeriod"}},"type":"object"},"MarketSummaryResponse":{"properties":{"completeness":{"$ref":"#/components/schemas/AnalyticsCompleteness"},"current":{"$ref":"#/components/schemas/MarketMetrics"},"previous":{"allOf":[{"$ref":"#/components/schemas/MarketMetrics"},{"nullable":true}]}},"required":["current","previous"],"type":"object"},"MarketTimeSeriesBucket":{"properties":{"complete":{"description":"Whether this bucket's whole period is backed by data. `false` means the bucket extends past `completeness.through`, so it is built from a partial period and MUST NOT be compared against its neighbours or the same bucket a year earlier. Absent whenever `completeness` itself is absent; the two are emitted together or not at all.","type":"boolean"},"date":{"type":"string"},"excluded":{"description":"How many of this bucket's documents the requested measure's sentinel guard excluded — documents carrying the field whose value is an out-of-range fill. Compare against `units` to see the share the value was computed over. Present per BUCKET because exclusion is not uniform over time: one period can be almost entirely fill values while its neighbors are clean, and a single response-level total would hide exactly that. Absent for `units`, which is a document count and cannot be guarded.","type":"number"},"measureValue":{"description":"This bucket's value for the requested `measure` (`volume` when none was supplied). Null when the bucket has no in-bounds document for the measure's field — sentinel-filtered rows do not contribute, so an empty bucket reports null rather than 0.","nullable":true,"type":"number"},"segments":{"items":{"$ref":"#/components/schemas/MarketTimeSeriesSegment"},"type":"array"},"units":{"description":"Number of loans","type":"number"},"volume":{"description":"Total loan volume in dollars","type":"number"}},"required":["date","volume","units","measureValue"],"type":"object"},"MarketTimeSeriesRequest":{"additionalProperties":false,"properties":{"advancedFilters":{"$ref":"#/components/schemas/FilterNode"},"filters":{"$ref":"#/components/schemas/FilterNode"},"flatFilters":{"$ref":"#/components/schemas/MarketFlatFilters"},"forecast":{"$ref":"#/components/schemas/ForecastRequest"},"interval":{"$ref":"#/components/schemas/Interval"},"measure":{"$ref":"#/components/schemas/MarketMeasure"},"period":{"$ref":"#/components/schemas/DatedPeriod"},"segment":{"$ref":"#/components/schemas/MarketSliceDimension"}},"type":"object"},"MarketTimeSeriesResponse":{"properties":{"completeness":{"$ref":"#/components/schemas/AnalyticsCompleteness"},"current":{"items":{"$ref":"#/components/schemas/MarketTimeSeriesBucket"},"type":"array"},"forecast":{"$ref":"#/components/schemas/ForecastResponse"},"measure":{"description":"Echo of the measure `measureValue` reports, so a caller never has to infer which metric it is plotting.","type":"string"},"previous":{"items":{"$ref":"#/components/schemas/MarketTimeSeriesBucket"},"nullable":true,"type":"array"}},"required":["measure","current","previous"],"type":"object"},"MarketTimeSeriesSegment":{"properties":{"label":{"type":"string"},"measureValue":{"description":"This segment's value for the requested `measure`. Null when the segment has no in-bounds document for the measure's field.","nullable":true,"type":"number"},"unattributed":{"description":"Present and `true` on at most one segment PER DATE BUCKET, which is not a real category: it collects the documents that bucket could not attribute to any value of the requested `segment`, and its `label` (\"(unknown)\") is prose, not an identifier. Filter on THIS field, never on the label — a consumer joining a segment label to a real code must drop it. It is always the LAST entry of its bucket's `segments`, appended after ranking rather than placed by value, so it is the one segment that does not obey the ordering `measure` describes. It exists so a period's segments account for the same documents that period's own `units` counts: a document whose segment field holds no indexed term is absent from a terms breakdown entirely rather than forming a small segment, so without it a stacked series silently omits part of every bar. That reconciliation is exact for `units`; on an average it is not, because segments under the five-document floor are dropped and a segment field with more than 200 distinct values still truncates — neither loss is collected here. Reported per bucket rather than once per response because what cannot be attributed is not uniform over time. Absent when there is nothing unattributed, never `false` and never a zero-valued segment.","enum":[true],"type":"boolean"},"units":{"type":"number"},"volume":{"type":"number"}},"required":["label","volume","units","measureValue"],"type":"object"},"MeAuth":{"properties":{"clientId":{"description":"OAuth client that minted the token, when applicable","nullable":true,"type":"string"},"method":{"description":"Which credential the API resolved this caller from","enum":["api-key","bearer","session","internal"],"type":"string"},"profileResolved":{"description":"Always true on a successful read; retained for compatibility now that every caller type resolves the full profile","type":"boolean"},"role":{"description":"Global user role","type":"string"},"scopes":{"description":"OAuth scopes on the bearer token; null for API-key / session callers","items":{"type":"string"},"nullable":true,"type":"array"}},"required":["method","role","profileResolved"],"type":"object"},"MeCreditAllowance":{"properties":{"perCycle":{"description":"Credits granted to each member per billing cycle","type":"number"},"unitPriceCents":{"description":"Price of one on-demand credit, in cents","type":"number"}},"required":["perCycle","unitPriceCents"],"type":"object"},"MeCreditBalance":{"properties":{"cycle":{"description":"Credits from the current subscription cycle allowance","type":"number"},"onDemand":{"description":"Purchased credits that do not expire with the cycle","type":"number"},"personal":{"description":"The user's personal (non-workspace) credit balance","type":"number"},"total":{"type":"number"}},"required":["cycle","onDemand","personal","total"],"type":"object"},"MeCreditUsage":{"properties":{"granted":{"type":"number"},"purchased":{"type":"number"},"spent":{"type":"number"},"spentByCategory":{"properties":{"ai_agent":{"type":"number"},"ai_chat":{"type":"number"},"api":{"type":"number"},"enrichment":{"type":"number"}},"required":["api","enrichment","ai_chat","ai_agent"],"type":"object"},"window":{"properties":{"endDate":{"description":"ISO-8601, inclusive","type":"string"},"startDate":{"description":"ISO-8601, inclusive","type":"string"}},"required":["startDate","endDate"],"type":"object"}},"required":["window","granted","purchased","spent","spentByCategory"],"type":"object"},"MeCreditsResponse":{"properties":{"allowance":{"$ref":"#/components/schemas/MeCreditAllowance"},"balance":{"$ref":"#/components/schemas/MeCreditBalance"},"organizationId":{"type":"string"},"usage":{"$ref":"#/components/schemas/MeCreditUsage"}},"required":["organizationId","balance","allowance","usage"],"type":"object"},"MeOrganization":{"nullable":true,"properties":{"id":{"type":"string"},"role":{"description":"The caller's MEMBERSHIP role in this org (owner/admin/member)","nullable":true,"type":"string"}},"required":["id"],"type":"object"},"MePlan":{"nullable":true,"properties":{"displayName":{"nullable":true,"type":"string"},"group":{"nullable":true,"type":"string"},"id":{"type":"string"},"limits":{"additionalProperties":{"nullable":true},"description":"Plan limit map as configured in auth (free-form)","type":"object"},"name":{"type":"string"}},"required":["id","name","limits"],"type":"object"},"MePlanGrants":{"properties":{"organization":{"items":{"properties":{"additive":{"nullable":true,"type":"boolean"},"planId":{"type":"string"}},"required":["planId"],"type":"object"},"type":"array"},"user":{"items":{"properties":{"planId":{"type":"string"}},"required":["planId"],"type":"object"},"type":"array"}},"required":["organization","user"],"type":"object"},"MePlanResponse":{"properties":{"grants":{"$ref":"#/components/schemas/MePlanGrants"},"organizationId":{"type":"string"},"plan":{"$ref":"#/components/schemas/MePlan"},"subscription":{"$ref":"#/components/schemas/MeSubscription"}},"required":["organizationId","plan","subscription","grants"],"type":"object"},"MeResponse":{"properties":{"auth":{"$ref":"#/components/schemas/MeAuth"},"organization":{"$ref":"#/components/schemas/MeOrganization"},"user":{"$ref":"#/components/schemas/MeUser"}},"required":["user","organization","auth"],"type":"object"},"MeSubscription":{"nullable":true,"properties":{"planName":{"nullable":true,"type":"string"},"status":{"description":"active | trialing | past_due","type":"string"}},"required":["status"],"type":"object"},"MeTheme":{"enum":["light","dark","system"],"type":"string"},"MeUpdateRequest":{"additionalProperties":false,"properties":{"addressLine1":{"maxLength":255,"nullable":true,"type":"string"},"agentPhotoUrl":{"maxLength":4096,"nullable":true,"type":"string"},"city":{"maxLength":255,"nullable":true,"type":"string"},"contactCardType":{"$ref":"#/components/schemas/ContactCardType"},"contactPhone":{"maxLength":64,"nullable":true,"type":"string"},"headline":{"maxLength":255,"nullable":true,"type":"string"},"image":{"maxLength":4096,"nullable":true,"type":"string"},"jobRole":{"maxLength":255,"nullable":true,"type":"string"},"name":{"maxLength":255,"minLength":1,"type":"string"},"nmlsId":{"maxLength":64,"nullable":true,"type":"string"},"postalCode":{"maxLength":10,"nullable":true,"type":"string"},"qrBaseUrl":{"maxLength":4096,"nullable":true,"type":"string"},"reLicenseNumber":{"maxLength":64,"nullable":true,"type":"string"},"reLicenseState":{"maxLength":2,"nullable":true,"type":"string"},"sendNewLoginEmail":{"type":"boolean"},"signatureImage":{"maxLength":4096,"nullable":true,"type":"string"},"state":{"maxLength":2,"nullable":true,"type":"string"},"tagline":{"maxLength":255,"nullable":true,"type":"string"},"theme":{"$ref":"#/components/schemas/MeTheme"}},"type":"object"},"MeUser":{"properties":{"addressLine1":{"nullable":true,"type":"string"},"agentPhotoUrl":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"contactCardType":{"nullable":true,"type":"string"},"contactPhone":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string"},"emailVerified":{"nullable":true,"type":"boolean"},"headline":{"nullable":true,"type":"string"},"id":{"description":"Auth user id","type":"string"},"image":{"nullable":true,"type":"string"},"jobRole":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"nmlsId":{"nullable":true,"type":"string"},"postalCode":{"nullable":true,"type":"string"},"qrBaseUrl":{"nullable":true,"type":"string"},"reLicenseNumber":{"nullable":true,"type":"string"},"reLicenseState":{"nullable":true,"type":"string"},"sendNewLoginEmail":{"nullable":true,"type":"boolean"},"signatureImage":{"nullable":true,"type":"string"},"state":{"nullable":true,"type":"string"},"tagline":{"nullable":true,"type":"string"},"theme":{"nullable":true,"type":"string"}},"required":["id"],"type":"object"},"Measure":{"enum":["volume","units","avgSalePrice","avgListPrice"],"type":"string"},"MeiliUnavailable":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"},"MlsStatus":{"enum":["SLD","ACT","PND","Cancelled","WDN","EXP","CNT","OFF","UNK","RNTD","RNT","LSE","RNT-SLD","RNT-ACT","RNT-PND","RNT-WDN","RNT-EXP","RNT-LSE","RNT-RNTD"],"type":"string"},"Monitor":{"properties":{"cadence":{"description":"How often it checks. `manual`: only when you run the job yourself.","enum":["daily","weekly","manual"],"type":"string"},"delivery":{"description":"Where its alerts go. Null for recipes: set that in your notification settings.","nullable":true,"properties":{"email":{"type":"boolean"},"inApp":{"type":"boolean"}},"required":["inApp","email"],"type":"object"},"description":{"type":"string"},"edit":{"description":"How to change it: the recipe routes with `recipeId`; the Studio job routes with `jobName`; or, for `monitor`, `PATCH /v1/monitors/{id}` with `id` (`jobName` is then the job that holds its table and runs).","oneOf":[{"properties":{"kind":{"enum":["recipe"],"type":"string"},"recipeId":{"type":"string"}},"required":["kind","recipeId"],"type":"object"},{"properties":{"id":{"description":"`monitor` only: the monitor's id.","type":"string"},"jobName":{"type":"string"},"kind":{"enum":["job","monitor"],"type":"string"}},"required":["kind","jobName"],"type":"object"}]},"family":{"description":"Recipe and template monitors only: the kind of alert it sends.","enum":["past-clients","agent-partners","farm-area","watch-record"],"type":"string"},"id":{"description":"`recipe:<recipeId>`, `job:<jobName>`, or `mon_…` for a monitor from a ModelMatch template.","type":"string"},"kind":{"description":"`recipe`: an alert recipe you subscribed to. `job`: a Studio job of yours with alert rules. `template`: a monitor you set up from a ModelMatch template.","enum":["recipe","job","template"],"type":"string"},"lastFiredAt":{"description":"When it last sent an alert (ISO 8601). For recipes, within the last 30 days; null if none.","nullable":true,"type":"string"},"status":{"description":"`paused`: everything it watches has expired, so it sends nothing.","enum":["active","paused"],"type":"string"},"title":{"type":"string"},"watches":{"properties":{"subjects":{"items":{"properties":{"label":{"description":"What to show for it.","type":"string"},"type":{"description":"`nmls`: your past clients by NMLS id. `agent`: an agent. `area`: a place. `document`: one property, sale or loan. `query`: a saved Studio question.","enum":["nmls","agent","area","document","query"],"type":"string"}},"required":["type","label"],"type":"object"},"type":"array"},"summary":{"description":"One line, for a list.","type":"string"}},"required":["summary","subjects"],"type":"object"}},"required":["id","kind","title","watches","cadence","status","lastFiredAt","delivery","edit"],"type":"object"},"MonitorCheck":{"properties":{"checkId":{"description":"Poll `GET /v1/monitors/checks/{checkId}` while `running`.","type":"string"},"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"fired":{"description":"Counts by kind of update.","properties":{"agent_pending":{"type":"number"},"agent_sale_closed":{"type":"number"},"area_home":{"type":"number"},"early_payoff_risk":{"type":"number"},"loan_changed":{"type":"number"},"new_listing":{"type":"number"},"past_client_home":{"type":"number"},"past_client_listed":{"type":"number"},"past_client_loan":{"type":"number"},"property_changed":{"type":"number"},"refi_area":{"type":"number"},"sale_changed":{"type":"number"}},"type":"object"},"preview":{"description":"A preview that answered `running`: what it found, once `succeeded`.","properties":{"byKind":{"description":"Counts by kind of update.","properties":{"agent_pending":{"type":"number"},"agent_sale_closed":{"type":"number"},"area_home":{"type":"number"},"early_payoff_risk":{"type":"number"},"loan_changed":{"type":"number"},"new_listing":{"type":"number"},"past_client_home":{"type":"number"},"past_client_listed":{"type":"number"},"past_client_loan":{"type":"number"},"property_changed":{"type":"number"},"refi_area":{"type":"number"},"sale_changed":{"type":"number"}},"type":"object"},"count":{"description":"Rows it would hold now.","type":"number"},"sample":{"description":"Up to 25 rows of the table it would fill.","items":{"properties":{"agentName":{"anyOf":[{"type":"string"},{"type":"number"},{"nullable":true}]},"baths":{"anyOf":[{"type":"string"},{"type":"number"},{"nullable":true}]},"beds":{"anyOf":[{"type":"string"},{"type":"number"},{"nullable":true}]},"brokerage":{"anyOf":[{"type":"string"},{"type":"number"},{"nullable":true}]},"city":{"anyOf":[{"type":"string"},{"type":"number"},{"nullable":true}]},"closeDate":{"anyOf":[{"type":"string"},{"type":"number"},{"nullable":true}]},"county":{"anyOf":[{"type":"string"},{"type":"number"},{"nullable":true}]},"event_at":{"nullable":true,"type":"string"},"field":{"anyOf":[{"type":"string"},{"type":"number"},{"nullable":true}]},"from":{"anyOf":[{"type":"string"},{"type":"number"},{"nullable":true}]},"kind":{"nullable":true,"type":"string"},"lender":{"anyOf":[{"type":"string"},{"type":"number"},{"nullable":true}]},"listDate":{"anyOf":[{"type":"string"},{"type":"number"},{"nullable":true}]},"listPrice":{"anyOf":[{"type":"string"},{"type":"number"},{"nullable":true}]},"loanAmount":{"anyOf":[{"type":"string"},{"type":"number"},{"nullable":true}]},"loanType":{"anyOf":[{"type":"string"},{"type":"number"},{"nullable":true}]},"rate":{"anyOf":[{"type":"string"},{"type":"number"},{"nullable":true}]},"rateVsMarket":{"anyOf":[{"type":"string"},{"type":"number"},{"nullable":true}]},"soldDate":{"anyOf":[{"type":"string"},{"type":"number"},{"nullable":true}]},"soldPrice":{"anyOf":[{"type":"string"},{"type":"number"},{"nullable":true}]},"sqft":{"anyOf":[{"type":"string"},{"type":"number"},{"nullable":true}]},"state":{"anyOf":[{"type":"string"},{"type":"number"},{"nullable":true}]},"status":{"anyOf":[{"type":"string"},{"type":"number"},{"nullable":true}]},"subject":{"nullable":true,"type":"string"},"summary":{"nullable":true,"type":"string"},"title":{"nullable":true,"type":"string"},"to":{"anyOf":[{"type":"string"},{"type":"number"},{"nullable":true}]},"update_key":{"nullable":true,"type":"string"},"url":{"nullable":true,"type":"string"},"zip":{"anyOf":[{"type":"string"},{"type":"number"},{"nullable":true}]}},"required":["update_key","kind","event_at","subject","title","summary","url"],"type":"object"},"type":"array"},"since":{"description":"The window the counts cover.","type":"string"}},"required":["count","byKind","sample","since"],"type":"object"},"rows":{"description":"Rows in the monitor's table after the check.","type":"number"},"status":{"description":"`running`: still checking. `succeeded` / `failed` / `timed_out`: done. `skipped`: not checked now (see `error`); the weekly run covers it.","enum":["running","succeeded","failed","timed_out","skipped"],"type":"string"}},"required":["status"],"type":"object"},"MonitorCheckResponse":{"properties":{"data":{"$ref":"#/components/schemas/MonitorCheck"}},"required":["data"],"type":"object"},"MonitorDeleted":{"properties":{"data":{"properties":{"deleted":{"enum":[true],"type":"boolean"},"id":{"type":"string"}},"required":["deleted","id"],"type":"object"}},"required":["data"],"type":"object"},"MonitorDelivery":{"additionalProperties":false,"properties":{"email":{"description":"`digest` (default): one email a week across all your monitors. `run`: one email per monitor run. `item`: one email per update, up to `itemCap`, then one for the rest.","enum":["item","run","digest"],"type":"string"},"inApp":{"description":"`run` (default): one notification per monitor run. `item`: one per update, up to `itemCap`.","enum":["item","run"],"type":"string"},"itemCap":{"description":"Most item-by-item notifications or webhooks per run (default 25, at most 100).","maximum":100,"minimum":1,"type":"integer"},"webhook":{"description":"`run` (default): one `monitors.fired` per run, with a link to page through every update. `item`: one `monitors.item` per update, up to `itemCap`, then one `monitors.item.overflow`.","enum":["item","run"],"type":"string"}},"type":"object"},"MonitorDeliveryResolved":{"properties":{"email":{"enum":["item","run","digest"],"type":"string"},"inApp":{"enum":["item","run"],"type":"string"},"itemCap":{"type":"integer"},"webhook":{"enum":["item","run"],"type":"string"}},"required":["email","inApp","webhook","itemCap"],"type":"object"},"MonitorDetail":{"discriminator":{"mapping":{"sql":"#/components/schemas/SqlMonitor","template":"#/components/schemas/TemplateMonitor"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/TemplateMonitor"},{"$ref":"#/components/schemas/SqlMonitor"}]},"MonitorEmailBlock":{"properties":{"columns":{"description":"items, table layout only: 1–5 columns (`value` is a token template).","items":{"properties":{"label":{"type":"string"},"value":{"type":"string"}},"required":["label","value"],"type":"object"},"type":"array"},"href":{"description":"button: `{appUrl}` (your monitors page).","type":"string"},"label":{"description":"button: the label (≤40).","type":"string"},"layout":{"description":"items: cards | list | table.","type":"string"},"link":{"description":"items: `{url}` (default — each entry links) or `none`.","type":"string"},"max":{"description":"items: how many to show, 1–25 (default 10).","type":"integer"},"meta":{"description":"items: up to 4 detail lines; a line whose token has no value for an entry is dropped.","items":{"type":"string"},"type":"array"},"text":{"description":"heading / text / callout: the copy (tokens allowed).","type":"string"},"title":{"description":"items: each entry's title line (item tokens allowed).","type":"string"},"tone":{"description":"callout: info | success | warning.","type":"string"},"type":{"description":"heading (`text` ≤120) · text (`text` ≤600; newlines become line breaks) · callout (`tone` info|success|warning + `text` ≤300) · items (one entry per alert: `layout` cards|list|table, `title`, optional `meta` lines, `columns` for table, `max`, `link`) · button (`label` ≤40 + `href` `{appUrl}`) · divider.","enum":["heading","text","callout","items","button","divider"],"type":"string"}},"required":["type"],"type":"object"},"MonitorEmailPreview":{"properties":{"ok":{"enum":[true],"type":"boolean"},"props":{"additionalProperties":{"nullable":true},"description":"What the email renders from, filled with sample updates.","type":"object"},"subjectPreview":{"description":"The email subject with the sample count filled in.","type":"string"}},"required":["ok","subjectPreview","props"],"type":"object"},"MonitorEmailPreviewRequest":{"additionalProperties":false,"properties":{"emailTemplate":{"$ref":"#/components/schemas/MonitorEmailTemplate"},"kinds":{"items":{"enum":["past_client_listed","early_payoff_risk","past_client_home","past_client_loan","agent_pending","agent_sale_closed","new_listing","refi_area","area_home","sale_changed","property_changed","loan_changed"],"type":"string"},"maxItems":12,"type":"array"},"monitorId":{"description":"Or under one of your monitors' template.","type":"string"},"template":{"description":"Preview under this template's copy and kinds.","type":"string"}},"required":["emailTemplate"],"type":"object"},"MonitorEmailTemplate":{"description":"The monitor's email, as blocks. Plain text only. Run tokens (listed by `GET /v1/monitors/email-tokens`) work anywhere; `{one|many}` (resolved by count) in heading / text / callout; item tokens, per kind of update, inside an items block. Serialized size ≤ 8 KB.","properties":{"blocks":{"description":"The blocks, rendered top to bottom.","items":{"$ref":"#/components/schemas/MonitorEmailBlock"},"type":"array"},"version":{"description":"Template format version.","enum":[1],"type":"number"}},"required":["version","blocks"],"type":"object"},"MonitorEmailTokens":{"properties":{"byKind":{"description":"Item tokens per kind of update, usable inside an `items` block. A token any of the monitor's kinds offers is allowed; an item without a value drops that line.","properties":{"agent_pending":{"items":{"properties":{"example":{"description":"A formatted sample value.","type":"string"},"label":{"type":"string"},"token":{"description":"Use as `{token}`.","example":"price","type":"string"}},"required":["token","label","example"],"type":"object"},"type":"array"},"agent_sale_closed":{"items":{"properties":{"example":{"description":"A formatted sample value.","type":"string"},"label":{"type":"string"},"token":{"description":"Use as `{token}`.","example":"price","type":"string"}},"required":["token","label","example"],"type":"object"},"type":"array"},"area_home":{"items":{"properties":{"example":{"description":"A formatted sample value.","type":"string"},"label":{"type":"string"},"token":{"description":"Use as `{token}`.","example":"price","type":"string"}},"required":["token","label","example"],"type":"object"},"type":"array"},"early_payoff_risk":{"items":{"properties":{"example":{"description":"A formatted sample value.","type":"string"},"label":{"type":"string"},"token":{"description":"Use as `{token}`.","example":"price","type":"string"}},"required":["token","label","example"],"type":"object"},"type":"array"},"loan_changed":{"items":{"properties":{"example":{"description":"A formatted sample value.","type":"string"},"label":{"type":"string"},"token":{"description":"Use as `{token}`.","example":"price","type":"string"}},"required":["token","label","example"],"type":"object"},"type":"array"},"new_listing":{"items":{"properties":{"example":{"description":"A formatted sample value.","type":"string"},"label":{"type":"string"},"token":{"description":"Use as `{token}`.","example":"price","type":"string"}},"required":["token","label","example"],"type":"object"},"type":"array"},"past_client_home":{"items":{"properties":{"example":{"description":"A formatted sample value.","type":"string"},"label":{"type":"string"},"token":{"description":"Use as `{token}`.","example":"price","type":"string"}},"required":["token","label","example"],"type":"object"},"type":"array"},"past_client_listed":{"items":{"properties":{"example":{"description":"A formatted sample value.","type":"string"},"label":{"type":"string"},"token":{"description":"Use as `{token}`.","example":"price","type":"string"}},"required":["token","label","example"],"type":"object"},"type":"array"},"past_client_loan":{"items":{"properties":{"example":{"description":"A formatted sample value.","type":"string"},"label":{"type":"string"},"token":{"description":"Use as `{token}`.","example":"price","type":"string"}},"required":["token","label","example"],"type":"object"},"type":"array"},"property_changed":{"items":{"properties":{"example":{"description":"A formatted sample value.","type":"string"},"label":{"type":"string"},"token":{"description":"Use as `{token}`.","example":"price","type":"string"}},"required":["token","label","example"],"type":"object"},"type":"array"},"refi_area":{"items":{"properties":{"example":{"description":"A formatted sample value.","type":"string"},"label":{"type":"string"},"token":{"description":"Use as `{token}`.","example":"price","type":"string"}},"required":["token","label","example"],"type":"object"},"type":"array"},"sale_changed":{"items":{"properties":{"example":{"description":"A formatted sample value.","type":"string"},"label":{"type":"string"},"token":{"description":"Use as `{token}`.","example":"price","type":"string"}},"required":["token","label","example"],"type":"object"},"type":"array"}},"type":"object"},"run":{"description":"Tokens usable anywhere in the email.","items":{"type":"string"},"type":"array"}},"required":["run","byKind"],"type":"object"},"MonitorError":{"properties":{"code":{"description":"Stable machine code: `invalid_inputs`, `invalid_options`, `invalid_rules`, `unknown_template`, `template_archived`, `kind_not_in_template`, `monitor_limit`, `check_limit`, `check_in_flight`, `unknown_monitor`, `no_org`, `name_conflict`, `version_conflict`, `invalid_email_template`, `studio_unavailable`.","type":"string"},"details":{"description":"Every problem found, by field.","items":{"properties":{"message":{"type":"string"},"path":{"type":"string"}},"required":["path","message"],"type":"object"},"type":"array"},"error":{"description":"What went wrong, for a person.","type":"string"}},"required":["error","code"],"type":"object"},"MonitorList":{"properties":{"data":{"description":"Recipe monitors first (in the recipe catalog's order, then your own recipes), then monitors from templates (oldest first), then job monitors (oldest first).","items":{"$ref":"#/components/schemas/Monitor"},"type":"array"},"partial":{"description":"Present when Studio could not be read: job monitors may be missing or lack `lastFiredAt`.","enum":[true],"type":"boolean"}},"required":["data"],"type":"object"},"MonitorPreview":{"properties":{"data":{"properties":{"byKind":{"description":"Counts by kind of update.","properties":{"agent_pending":{"type":"number"},"agent_sale_closed":{"type":"number"},"area_home":{"type":"number"},"early_payoff_risk":{"type":"number"},"loan_changed":{"type":"number"},"new_listing":{"type":"number"},"past_client_home":{"type":"number"},"past_client_listed":{"type":"number"},"past_client_loan":{"type":"number"},"property_changed":{"type":"number"},"refi_area":{"type":"number"},"sale_changed":{"type":"number"}},"type":"object"},"count":{"description":"Rows it would hold now.","type":"number"},"sample":{"description":"Up to 25 rows of the table it would fill.","items":{"properties":{"agentName":{"anyOf":[{"type":"string"},{"type":"number"},{"nullable":true}]},"baths":{"anyOf":[{"type":"string"},{"type":"number"},{"nullable":true}]},"beds":{"anyOf":[{"type":"string"},{"type":"number"},{"nullable":true}]},"brokerage":{"anyOf":[{"type":"string"},{"type":"number"},{"nullable":true}]},"city":{"anyOf":[{"type":"string"},{"type":"number"},{"nullable":true}]},"closeDate":{"anyOf":[{"type":"string"},{"type":"number"},{"nullable":true}]},"county":{"anyOf":[{"type":"string"},{"type":"number"},{"nullable":true}]},"event_at":{"nullable":true,"type":"string"},"field":{"anyOf":[{"type":"string"},{"type":"number"},{"nullable":true}]},"from":{"anyOf":[{"type":"string"},{"type":"number"},{"nullable":true}]},"kind":{"nullable":true,"type":"string"},"lender":{"anyOf":[{"type":"string"},{"type":"number"},{"nullable":true}]},"listDate":{"anyOf":[{"type":"string"},{"type":"number"},{"nullable":true}]},"listPrice":{"anyOf":[{"type":"string"},{"type":"number"},{"nullable":true}]},"loanAmount":{"anyOf":[{"type":"string"},{"type":"number"},{"nullable":true}]},"loanType":{"anyOf":[{"type":"string"},{"type":"number"},{"nullable":true}]},"rate":{"anyOf":[{"type":"string"},{"type":"number"},{"nullable":true}]},"rateVsMarket":{"anyOf":[{"type":"string"},{"type":"number"},{"nullable":true}]},"soldDate":{"anyOf":[{"type":"string"},{"type":"number"},{"nullable":true}]},"soldPrice":{"anyOf":[{"type":"string"},{"type":"number"},{"nullable":true}]},"sqft":{"anyOf":[{"type":"string"},{"type":"number"},{"nullable":true}]},"state":{"anyOf":[{"type":"string"},{"type":"number"},{"nullable":true}]},"status":{"anyOf":[{"type":"string"},{"type":"number"},{"nullable":true}]},"subject":{"nullable":true,"type":"string"},"summary":{"nullable":true,"type":"string"},"title":{"nullable":true,"type":"string"},"to":{"anyOf":[{"type":"string"},{"type":"number"},{"nullable":true}]},"update_key":{"nullable":true,"type":"string"},"url":{"nullable":true,"type":"string"},"zip":{"anyOf":[{"type":"string"},{"type":"number"},{"nullable":true}]}},"required":["update_key","kind","event_at","subject","title","summary","url"],"type":"object"},"type":"array"},"since":{"description":"The window the counts cover.","type":"string"}},"required":["count","byKind","sample","since"],"type":"object"}},"required":["data"],"type":"object"},"MonitorResponse":{"properties":{"check":{"$ref":"#/components/schemas/MonitorCheck"},"data":{"$ref":"#/components/schemas/MonitorDetail"}},"required":["data"],"type":"object"},"MonitorTemplate":{"properties":{"category":{"type":"string"},"description":{"type":"string"},"family":{"enum":["past-clients","agent-partners","farm-area","watch-record"],"type":"string"},"featured":{"type":"boolean"},"howItWorks":{"type":"string"},"icon":{"type":"string"},"id":{"type":"string"},"inputs":{"items":{"properties":{"help":{"type":"string"},"label":{"type":"string"},"max":{"type":"number"},"min":{"type":"number"},"required":{"type":"boolean"},"type":{"enum":["nmls","agent","area","document"],"type":"string"}},"required":["type","required"],"type":"object"},"type":"array"},"kinds":{"description":"The kinds of update it sends (turn some off with `options.kinds`).","items":{"enum":["past_client_listed","early_payoff_risk","past_client_home","past_client_loan","agent_pending","agent_sale_closed","new_listing","refi_area","area_home","sale_changed","property_changed","loan_changed"],"type":"string"},"type":"array"},"schedule":{"enum":["weekly"],"type":"string"},"title":{"type":"string"}},"required":["id","title","description","icon","category","family","kinds","inputs","featured","schedule"],"type":"object"},"MonitorTemplateList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/MonitorTemplate"},"type":"array"}},"required":["data"],"type":"object"},"MonitorUpdate":{"properties":{"baseline":{"description":"Its first run: nothing to compare with, so nothing fired.","enum":[true],"type":"boolean"},"fired":{"description":"What fired: one entry per rule that matched, and for a template monitor one entry per kind of update. Empty when nothing fired.","items":{"properties":{"kind":{"description":"Template monitors: the kind of update (`new_listing`). One entry per kind, with `rule.on` `rows_added`.","type":"string"},"rows":{"description":"Up to 20 of the rows it matched; the table has them all.","items":{"additionalProperties":{"nullable":true},"type":"object"},"type":"array"},"rule":{"additionalProperties":false,"properties":{"column":{"type":"string"},"on":{"description":"`rows_added`: a key new since the previous run. `rows_removed`: a key gone since. `threshold`: `column` `op` `value` holds for a key now and did not before.","enum":["rows_added","rows_removed","threshold"],"type":"string"},"op":{"enum":[">=",">","<=","<"],"type":"string"},"value":{"type":"number"}},"required":["on"],"type":"object"},"total":{"type":"number"}},"required":["rule","total","rows"],"type":"object"},"type":"array"},"monitorId":{"type":"string"},"name":{"type":"string"},"ranAt":{"type":"string"},"rowCount":{"type":"number"},"runId":{"type":"string"},"status":{"enum":["running","succeeded","failed"],"type":"string"},"title":{"type":"string"}},"required":["monitorId","name","title","runId","ranAt","status","fired"],"type":"object"},"MonitorUpdateList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/MonitorUpdate"},"type":"array"},"partial":{"description":"Present when some monitors' updates could not be read.","enum":[true],"type":"boolean"}},"required":["data"],"type":"object"},"MovementActivity":{"properties":{"chartData":{"items":{"$ref":"#/components/schemas/MovementActivityPoint"},"type":"array"},"window":{"$ref":"#/components/schemas/MovementWindow"}},"required":["window","chartData"],"type":"object"},"MovementActivityPoint":{"properties":{"activeLos":{"description":"Loan officers with an open employment record at month end.","type":"number"},"becameInactive":{"description":"Always null: license-authorization history is not available on this surface.","nullable":true,"type":"number"},"leftIndustry":{"description":"Loan officers with no open employment whose last employment ended this month. NOT the same as license inactivation.","type":"number"},"month":{"example":"Jan 2026","type":"string"},"monthEnd":{"type":"string"},"monthStart":{"type":"string"},"newlyLicensed":{"type":"number"}},"required":["month","monthStart","monthEnd","newlyLicensed","activeLos","leftIndustry","becameInactive"],"type":"object"},"MovementByState":{"properties":{"cities":{"items":{"$ref":"#/components/schemas/MovementCityRow"},"type":"array"},"data":{"description":"Loan officers who changed companies in the window, by their current state.","items":{"$ref":"#/components/schemas/MovementStateRow"},"type":"array"},"window":{"$ref":"#/components/schemas/MovementWindow"}},"required":["window","data","cities"],"type":"object"},"MovementCityRow":{"properties":{"city":{"type":"string"},"losChanged":{"type":"number"},"state":{"nullable":true,"type":"string"},"topGainingCompany":{"nullable":true,"properties":{"gainedCount":{"type":"number"},"name":{"nullable":true,"type":"string"},"nmlsId":{"type":"string"}},"required":["nmlsId","name","gainedCount"],"type":"object"}},"required":["city","state","losChanged","topGainingCompany"],"type":"object"},"MovementCohortPayoff":{"properties":{"caveats":{"properties":{"floorMonths":{"type":"number"},"totalMoversAnalyzed":{"type":"number"},"totalMoversExcluded":{"type":"number"},"totalMoversInRange":{"type":"number"},"truncated":{"description":"Always false: every mover in the window is analyzed. Kept for compatibility.","type":"boolean"}},"required":["floorMonths","totalMoversInRange","totalMoversAnalyzed","totalMoversExcluded","truncated"],"type":"object"},"tiers":{"items":{"$ref":"#/components/schemas/MovementCohortTier"},"type":"array"},"window":{"$ref":"#/components/schemas/MovementWindow"}},"required":["window","tiers","caveats"],"type":"object"},"MovementCohortTier":{"properties":{"delta":{"properties":{"unitsChangePct":{"type":"number"},"volumeChangePct":{"type":"number"}},"required":["unitsChangePct","volumeChangePct"],"type":"object"},"moverCount":{"type":"number"},"postMove":{"properties":{"meanUnits":{"type":"number"},"meanVolume":{"type":"number"},"medianUnits":{"type":"number"},"medianVolume":{"type":"number"}},"required":["meanUnits","medianUnits","meanVolume","medianVolume"],"type":"object"},"preMove":{"properties":{"meanUnits":{"type":"number"},"meanVolume":{"type":"number"},"medianUnits":{"type":"number"},"medianVolume":{"type":"number"}},"required":["meanUnits","medianUnits","meanVolume","medianVolume"],"type":"object"},"tierKey":{"enum":["low","mid","high"],"type":"string"},"tierLabel":{"type":"string"}},"required":["tierKey","tierLabel","moverCount","preMove","postMove","delta"],"type":"object"},"MovementCompanies":{"properties":{"data":{"items":{"$ref":"#/components/schemas/MovementCompanyRow"},"type":"array"},"truncated":{"description":"Only for `rankBy=net`: more companies moved than the ranking scans, so the tail is not ranked.","type":"boolean"},"window":{"$ref":"#/components/schemas/MovementWindow"}},"required":["window","data","truncated"],"type":"object"},"MovementCompanyRow":{"properties":{"avgLoanSize":{"type":"number"},"companyName":{"nullable":true,"type":"string"},"companyNmlsId":{"type":"string"},"gained":{"description":"Loan officers who started at the company in the window.","type":"number"},"lost":{"description":"Loan officers who completely left the company in the window.","type":"number"},"net":{"type":"number"},"units":{"type":"number"},"volume":{"description":"Trailing 14-month origination volume of the loan officers counted on the ranked side (gained for most-gained, lost for most-lost).","type":"number"},"volumeTruncated":{"description":"Always false: `volume`/`units` cover every loan officer on the ranked side. Kept for compatibility.","type":"boolean"}},"required":["companyNmlsId","companyName","gained","lost","net","volume","units","avgLoanSize","volumeTruncated"],"type":"object"},"MovementComputing":{"description":"The result is not ready within the response budget (25 s). The computation continues and is cached when done — repeat the identical request after `retryAfterMs` until it answers 200. Identical concurrent requests share one computation.","properties":{"retryAfterMs":{"description":"Suggested wait before repeating the SAME request (also sent as `Retry-After`, in seconds).","example":5000,"type":"integer"},"status":{"enum":["computing"],"type":"string"}},"required":["status","retryAfterMs"],"type":"object"},"MovementMover":{"properties":{"city":{"nullable":true,"type":"string"},"fromCompanyName":{"nullable":true,"type":"string"},"fromCompanyNmlsId":{"nullable":true,"type":"string"},"moveDate":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"nmlsId":{"type":"string"},"previousUnits":{"nullable":true,"type":"number"},"previousVolume":{"description":"Trailing 14-month volume originated under the previous company.","nullable":true,"type":"number"},"state":{"nullable":true,"type":"string"},"toCompanyName":{"nullable":true,"type":"string"},"toCompanyNmlsId":{"type":"string"},"units":{"nullable":true,"type":"number"},"volume":{"description":"Trailing 14-month volume, all employers.","nullable":true,"type":"number"}},"required":["nmlsId","name","fromCompanyNmlsId","fromCompanyName","toCompanyNmlsId","toCompanyName","moveDate","state","city","volume","units","previousVolume","previousUnits"],"type":"object"},"MovementMovers":{"properties":{"data":{"items":{"$ref":"#/components/schemas/MovementMover"},"type":"array"},"limit":{"type":"number"},"page":{"type":"number"},"total":{"description":"Rows matching the request (moves for `sort=date`, loan officers for `sort=volume`).","nullable":true,"type":"number"},"window":{"$ref":"#/components/schemas/MovementWindow"}},"required":["window","data","total","page","limit"],"type":"object"},"MovementRankingRow":{"properties":{"avgLoanSize":{"type":"number"},"city":{"nullable":true,"type":"string"},"companyName":{"nullable":true,"type":"string"},"companyNmlsId":{"nullable":true,"type":"string"},"loType":{"description":"Broker when the scored profile says so; else Retail (state-licensed) or Banker (federally registered) from the current employment.","enum":["Broker","Retail","Banker",null],"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"nmlsId":{"type":"string"},"purchasePct":{"nullable":true,"type":"number"},"rank":{"type":"number"},"refinancePct":{"nullable":true,"type":"number"},"state":{"nullable":true,"type":"string"},"typeUnits":{"nullable":true,"type":"number"},"typeVolume":{"nullable":true,"type":"number"},"unitShare":{"description":"Percent of the top-100's units (type-specific units for product rankings).","type":"number"},"units":{"type":"number"},"volume":{"type":"number"}},"required":["rank","nmlsId","name","city","state","companyName","companyNmlsId","volume","units","avgLoanSize","unitShare","loType","typeVolume","typeUnits","purchasePct","refinancePct"],"type":"object"},"MovementRankings":{"properties":{"data":{"items":{"$ref":"#/components/schemas/MovementRankingRow"},"type":"array"},"page":{"type":"number"},"pageSize":{"type":"number"},"subcategory":{"enum":["total_volume","most_units","top_fha","top_va","top_purchase","top_refinance"],"type":"string"},"total":{"type":"number"},"totalPages":{"type":"number"},"year":{"type":"string"}},"required":["year","subcategory","data","total","page","pageSize","totalPages"],"type":"object"},"MovementStateRow":{"properties":{"losChanged":{"type":"number"},"state":{"type":"string"},"topGainingCompany":{"nullable":true,"properties":{"gainedCount":{"type":"number"},"name":{"nullable":true,"type":"string"},"nmlsId":{"type":"string"}},"required":["nmlsId","name","gainedCount"],"type":"object"}},"required":["state","losChanged","topGainingCompany"],"type":"object"},"MovementStats":{"properties":{"activeAtEnd":{"description":"Loan officers with an open employment record on the last day of the window.","type":"number"},"activeAtStart":{"description":"Loan officers with an open employment record on the day before the window starts.","type":"number"},"companyDepartures":{"description":"Loan officers whose every record at a company ended in the window (a complete departure from that company). Approximate distinct count.","type":"number"},"industryExits":{"description":"Loan officers with no open employment anywhere whose last employment ended in the window.","type":"number"},"joins":{"description":"Loan officers who started at a company in the window (first record at that company), new entrants included. Approximate distinct count (±~1%).","type":"number"},"moversScanned":{"description":"How many moving loan officers the volume figures cover (each counted once, at their latest move in the window).","type":"number"},"moversTruncated":{"description":"Always false: every mover in the window is covered. Kept for compatibility.","type":"boolean"},"net":{"description":"`activeAtEnd − activeAtStart` — the change in working loan officers over the window.","type":"number"},"newlyLicensed":{"description":"Loan officers first licensed or registered in the window (each counted once, ever).","type":"number"},"transitions":{"description":"Loan officers who started at a company in the window after a previous employer — company-to-company moves. Approximate distinct count.","type":"number"},"unitsTransferred":{"type":"number"},"volumeTransferred":{"description":"Trailing 14-month origination volume of the loan officers counted in `transitions` (see `moversScanned`), as of the last weekly refresh.","type":"number"},"window":{"$ref":"#/components/schemas/MovementWindow"}},"required":["window","joins","transitions","companyDepartures","industryExits","newlyLicensed","activeAtStart","activeAtEnd","net","volumeTransferred","unitsTransferred","moversScanned","moversTruncated"],"type":"object"},"MovementTransitionFlow":{"properties":{"fromCompanyName":{"nullable":true,"type":"string"},"fromCompanyNmlsId":{"type":"string"},"los":{"description":"Loan officers who made this move in the window.","type":"number"},"toCompanyName":{"nullable":true,"type":"string"},"toCompanyNmlsId":{"type":"string"}},"required":["fromCompanyNmlsId","fromCompanyName","toCompanyNmlsId","toCompanyName","los"],"type":"object"},"MovementTransitions":{"properties":{"data":{"items":{"$ref":"#/components/schemas/MovementTransitionFlow"},"type":"array"},"truncated":{"description":"True when flows beyond the scanned destination/source companies exist.","type":"boolean"},"window":{"$ref":"#/components/schemas/MovementWindow"}},"required":["window","data","truncated"],"type":"object"},"MovementWindow":{"description":"The resolved reporting window (inclusive dates).","properties":{"endDate":{"type":"string"},"months":{"type":"number"},"startDate":{"type":"string"}},"required":["startDate","endDate","months"],"type":"object"},"NetworkError":{"properties":{"code":{"description":"`invalid_request`, `not_found`, `rate_limited`, `busy`, `network_unavailable`.","example":"not_found","type":"string"},"error":{"description":"What went wrong, in plain language.","type":"string"}},"required":["error","code"],"type":"object"},"NetworkRelationship":{"properties":{"dealCount":{"description":"Deals the two share in the period: all time, or with `period=last12Months` the 12 months up to the latest data load (then the same as `dealsLast12Months`).","type":"number"},"dealsLast12Months":{"description":"The deals in the 12 months up to the latest data load (whatever the period).","type":"number"},"firstDealDate":{"description":"Date of the earliest shared deal (YYYY-MM-DD).","nullable":true,"type":"string"},"id":{"description":"The related entity's id: an agent id, an NMLS id (loan officers and companies), a lender id, a five-digit county code or a ZIP code.","type":"string"},"isCurrentCompany":{"description":"Between a loan officer and a company: true when it is the company the loan officer is registered with today, false for a past one. Null when unknown or not applicable.","nullable":true,"type":"boolean"},"lastDealDate":{"description":"Date of the most recent shared deal (YYYY-MM-DD).","nullable":true,"type":"string"},"name":{"description":"The related entity's name, or the county's name. Null when no profile names it, and for ZIP codes.","nullable":true,"type":"string"},"rank":{"description":"Position within its relationship kind, 1 = the strongest for the period.","type":"integer"},"relation":{"description":"The kind of relationship: `agents`, `loanOfficers`, `companies`, `lenders` (related people and firms), `counties` or `zipCodes` (where the deals were).","enum":["agents","loanOfficers","companies","lenders","counties","zipCodes"],"type":"string"},"sides":{"description":"Where an agent is involved: the agent's side(s) on these deals — `buyer`, `listing`, `co_listing` (for an agent's own network, that agent's side). Null otherwise.","items":{"type":"string"},"nullable":true,"type":"array"},"state":{"description":"For counties and ZIP codes, the two-letter state. Null otherwise.","nullable":true,"type":"string"},"volume":{"description":"Dollar volume of those deals, for the same period as `dealCount` (loan amount for loans, sold price for sales). Null when none records an amount.","nullable":true,"type":"number"},"volumeLast12Months":{"description":"Dollar volume of the deals in `dealsLast12Months`.","nullable":true,"type":"number"}},"required":["relation","rank","id","name","state","dealCount","volume","dealsLast12Months","volumeLast12Months","firstDealDate","lastDealDate","sides","isCurrentCompany"],"type":"object"},"NetworkResponse":{"properties":{"data":{"description":"The related entities, grouped by `relation` and ordered by `rank`: at most `limit` of each kind. Each row is billed as one row of data.","items":{"$ref":"#/components/schemas/NetworkRelationship"},"type":"array"},"entity":{"description":"Whose network this is.","properties":{"id":{"description":"The entity's id. For a lender, the id the lender's spellings add up under.","type":"string"},"name":{"nullable":true,"type":"string"},"type":{"enum":["agent","loan-officer","company","lender"],"type":"string"}},"required":["type","id","name"],"type":"object"},"period":{"enum":["allTime","last12Months"],"type":"string"},"relations":{"description":"Every kind of relationship this entity type has, including the empty ones.","items":{"properties":{"relation":{"description":"The kind of relationship: `agents`, `loanOfficers`, `companies`, `lenders` (related people and firms), `counties` or `zipCodes` (where the deals were).","enum":["agents","loanOfficers","companies","lenders","counties","zipCodes"],"type":"string"},"returned":{"description":"How many are in `data`.","type":"integer"},"total":{"description":"How many related entities of this kind there are for the period, before `limit`.","type":"integer"}},"required":["relation","total","returned"],"type":"object"},"type":"array"},"state":{"description":"The state the deals were counted in; null for every state.","nullable":true,"type":"string"}},"required":["data","entity","period","state","relations"],"type":"object"},"NormalizedLocation":{"nullable":true,"properties":{"city":{"type":"string"},"county":{"type":"string"},"displayName":{"type":"string"},"id":{"description":"Location dictionary id, when this location is one of ours. Pass it to a city / county filter instead of the free-text name.","type":"string"},"lat":{"type":"number"},"lon":{"type":"number"},"placeType":{"type":"string"},"state":{"type":"string"},"zip":{"type":"string"}},"required":["placeType","displayName"],"type":"object"},"NotFilter":{"properties":{"child":{"$ref":"#/components/schemas/FilterNode"},"type":{"enum":["not"],"type":"string"}},"required":["type","child"],"type":"object"},"NumericFilterValue":{"anyOf":[{"type":"number"},{"description":"Match any value","items":{"type":"number"},"type":"array"},{"description":"Numeric range. Excludes null/missing-field docs by default; add `includeNulls: true` to keep them.","properties":{"gt":{"type":"number"},"gte":{"type":"number"},"includeNulls":{"description":"Also keep docs where the field is null/missing (a range filter drops them by default). Requires at least one of gte/lte/gt/lt.","type":"boolean"},"lt":{"type":"number"},"lte":{"type":"number"}},"type":"object"},{"nullable":true}]},"OfficeAgentsRequest":{"additionalProperties":false,"properties":{"city":{"description":"Narrow agent matches to this city (exact, lowercase).","type":"string"},"companyName":{"description":"Office name to match against `ModelMatch.AgentOffices.OfficeName` (fuzzy). Required when `officeId` is omitted.","type":"string"},"officeId":{"description":"Office key (mm_office_key). When set, the office is fetched first to resolve its name / city / state.","type":"string"},"pagination":{"$ref":"#/components/schemas/Pagination"},"sort":{"items":{"properties":{"field":{"enum":["office","city","state","zip","volume","units","avgSalePrice","buyerVolume","buyerUnits","sellerVolume","sellerUnits","dualVolume","dualUnits","name","firstName","lastName","email","producersOnly","mortgagedBuyerVolume","mortgagedBuyerUnits","mortgagedSellerVolume","mortgagedSellerUnits","mortgagedDualVolume","mortgagedDualUnits","avgMortgagedLoanAmount","totalOriginatorsWorkedWith","totalCompaniesWorkedWith","totalLendersWorkedWith"],"type":"string"},"order":{"$ref":"#/components/schemas/SortOrder"}},"required":["field"],"type":"object"},"type":"array"},"state":{"description":"Narrow agent matches to this state (exact, lowercase).","type":"string"}},"type":"object"},"OfficeCrmListFilter":{"additionalProperties":false,"description":"Scope the result to the caller's CRM. Resolved against the caller's ACTIVE WORKSPACE at query time — list membership is read server-side, so the request never carries member ids. Only real-estate office members count; people, mortgage companies, branches and manual (unlinked) records on the same list are ignored. `mode: \"in\"` with no matching members returns an empty page (not an unfiltered one). Errors: 400 `crm_list_requires_workspace` when the caller has no active workspace (API-key / OAuth callers must select an organization), 403 / 404 when a named list is not visible to the caller or does not exist, and 400 `crm_list_too_large` when the selected lists hold more than 50,000 offices in total — narrow the selection rather than get a silently partial answer.","properties":{"lists":{"anyOf":[{"description":"Every list in the caller's workspace that the caller can see (own, org-wide, or shared with them) and that holds this kind of record — People lists for originators and agents, Company lists for companies.","enum":["any"],"type":"string"},{"description":"Specific CRM list ids (1–50).","items":{"minLength":1,"type":"string"},"maxItems":50,"minItems":1,"type":"array"}],"description":"Which lists: `\"any\"` for every Company list the caller can see, or an array of list ids. Membership is the UNION across the selected lists."},"mode":{"description":"`in` — only offices who are a member of the selected list(s). `notIn` — exclude every office who is a member of the selected list(s); everyone else passes, including offices on none of your lists.","enum":["in","notIn"],"type":"string"}},"required":["mode","lists"],"type":"object"},"OfficeDetail":{"allOf":[{"$ref":"#/components/schemas/OfficeSummary"},{"properties":{"fullAddress":{"nullable":true,"type":"string"},"number":{"nullable":true,"type":"string"},"totalListPriceActive":{"description":"Total list price of active listings at this office","nullable":true,"type":"number"}},"type":"object"}]},"OfficeDetailResponse":{"properties":{"data":{"$ref":"#/components/schemas/OfficeDetail"}},"required":["data"],"type":"object"},"OfficeField":{"enum":["company","city","state","zip","agentCount","activeListings","volume","units","buyerVolume","buyerUnits","sellerVolume","sellerUnits","dualVolume","dualUnits","avgSalePrice","avgListPrice","teamSize"],"type":"string"},"OfficeFlatFilters":{"additionalProperties":false,"properties":{"activeListings":{"$ref":"#/components/schemas/NumericFilterValue"},"agentCount":{"$ref":"#/components/schemas/NumericFilterValue"},"avgListPrice":{"$ref":"#/components/schemas/NumericFilterValue"},"avgMortgagedBuyerLoanAmount":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean loan size on the office's financed BUYER-side deals in the period."}]},"avgMortgagedLoanAmount":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean loan size on the office's financed deals in the period (either side)."}]},"avgMortgagedSellerLoanAmount":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean loan size on the office's financed LISTING-side deals (the buyer's loan) in the period."}]},"avgSalePrice":{"$ref":"#/components/schemas/NumericFilterValue"},"builderCount":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Distinct home builders on the office's deals in the period — `{gt: 0}` = works with builders."}]},"buyerUnits":{"$ref":"#/components/schemas/NumericFilterValue"},"buyerVolume":{"$ref":"#/components/schemas/NumericFilterValue"},"city":{"$ref":"#/components/schemas/TextFilterValue"},"company":{"$ref":"#/components/schemas/TextFilterValue"},"county":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Office address COUNTY: a name (`Travis`, with `state` when ambiguous), a 5-digit FIPS (`48453`) or a dictionary county id; an array matches any. Matches when the office's geocoded point lies inside the county boundary (no geocode = no match). Unknown county = 400."}]},"dualUnits":{"$ref":"#/components/schemas/NumericFilterValue"},"dualVolume":{"$ref":"#/components/schemas/NumericFilterValue"},"geoPoint":{"$ref":"#/components/schemas/GeoFilterValue"},"mode":{"enum":["and","or"],"type":"string"},"msa":{"$ref":"#/components/schemas/OfficeMsaFilterValue"},"namePrefix":{"description":"Prefix name search: every word must start a word of the name (\"keller wil\" → Keller Williams Realty). No fuzzy/nickname matching; relevance-ranked unless `sort` is set. Max 100 chars / 6 words (emails, URLs, phones ignored), else 400. Spelling variants of brokerage names also match (\"remax\" ↔ \"Re/Max\").","minLength":1,"type":"string"},"region":{"$ref":"#/components/schemas/OfficeRegionFilterValue"},"sellerUnits":{"$ref":"#/components/schemas/NumericFilterValue"},"sellerVolume":{"$ref":"#/components/schemas/NumericFilterValue"},"state":{"$ref":"#/components/schemas/TextFilterValue"},"teamSize":{"$ref":"#/components/schemas/NumericFilterValue"},"units":{"$ref":"#/components/schemas/NumericFilterValue"},"volume":{"$ref":"#/components/schemas/NumericFilterValue"},"zip":{"$ref":"#/components/schemas/TextFilterValue"},"zipCode":{"$ref":"#/components/schemas/TextFilterValue"}},"type":"object"},"OfficeListRequest":{"additionalProperties":false,"properties":{"advancedFilters":{"$ref":"#/components/schemas/FilterNode"},"builderShare":{"additionalProperties":false,"description":"Share of the office's deals in the period that named a home builder, as a 0–100 percent (Σ builder units / total units). Implies `builderCount > 0`.","properties":{"gte":{"maximum":100,"minimum":0,"type":"number"},"lte":{"maximum":100,"minimum":0,"type":"number"}},"type":"object"},"crmList":{"$ref":"#/components/schemas/OfficeCrmListFilter"},"filters":{"$ref":"#/components/schemas/FilterNode"},"flatFilters":{"$ref":"#/components/schemas/OfficeFlatFilters"},"includeTopOriginator":{"description":"Add `topOriginator` to every row (the LO on the most buyer-side deals in the period). Off by default — it reads each office's LO list.","type":"boolean"},"lenderFilters":{"items":{"$ref":"#/components/schemas/LenderFilterEntry"},"type":"array"},"lenderMatchMode":{"$ref":"#/components/schemas/LenderMatchMode"},"pagination":{"$ref":"#/components/schemas/Pagination"},"period":{"$ref":"#/components/schemas/Period"},"sort":{"items":{"properties":{"field":{"$ref":"#/components/schemas/OfficeField"},"order":{"$ref":"#/components/schemas/SortOrder"}},"required":["field"],"type":"object"},"type":"array"}},"type":"object"},"OfficeListResponse":{"properties":{"cursor":{"type":"string"},"data":{"items":{"$ref":"#/components/schemas/OfficeSummary"},"type":"array"},"total":{"type":"number"}},"required":["data","total"],"type":"object"},"OfficeMsaFilterValue":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"maxItems":50,"minItems":1,"type":"array"},{"nullable":true}],"description":"Office address METRO (MSA / CBSA): 5-digit CBSA code (`12420`) or metro name (`Austin Metro`); an array matches any. The office point inside any member county. Unknown/ambiguous = 400 naming candidates."},"OfficeNameSuggestRequest":{"additionalProperties":false,"properties":{"limit":{"description":"Max names (default 20).","maximum":50,"minimum":1,"type":"integer"},"query":{"description":"The start of an office name (≥ 2 chars), matched as a phrase prefix on the name's words.","maxLength":100,"minLength":2,"type":"string"}},"required":["query"],"type":"object"},"OfficeNameSuggestResponse":{"properties":{"data":{"items":{"properties":{"agentCount":{"description":"Agents across every office with this name","type":"number"},"name":{"description":"The office name as stored (lowercase) — pass it back as `company` on `listOffices`, or as `currentOffice` / `office` on `listAgents`.","type":"string"},"officeCount":{"description":"Offices with this name","type":"number"}},"required":["name","agentCount","officeCount"],"type":"object"},"type":"array"}},"required":["data"],"type":"object"},"OfficeRegionFilterValue":{"anyOf":[{"enum":["northeast","northeast-division-1","northeast-division-2","midwest","midwest-division-3","midwest-division-4","south","south-division-5","south-division-6","south-division-7","west","west-division-8","west-division-9"],"type":"string"},{"items":{"enum":["northeast","northeast-division-1","northeast-division-2","midwest","midwest-division-3","midwest-division-4","south","south-division-5","south-division-6","south-division-7","west","west-division-8","west-division-9"],"type":"string"},"maxItems":50,"minItems":1,"type":"array"},{"nullable":true}],"description":"Office address CENSUS REGION / DIVISION (`<region>-division-<n>`, 1–9) — offices in ANY state of it. An array matches any."},"OfficeScoredBreakdownRequest":{"properties":{"bySide":{"description":"Also return the `buyer` and `listing` views under `bySide`, computed in the same query — each identical to calling again with that `side`. Use instead of one call per side. `pagination.cursor` pages every view in step (each view's own `cursor` is absent once it ends).","type":"boolean"},"period":{"$ref":"#/components/schemas/Period"},"side":{"$ref":"#/components/schemas/AgentSide"},"sort":{"$ref":"#/components/schemas/BreakdownSort"}},"type":"object"},"OfficeSummary":{"properties":{"activeListings":{"nullable":true,"type":"number"},"agentCount":{"description":"Number of agents at this office","nullable":true,"type":"number"},"avgListPrice":{"nullable":true,"type":"number"},"avgSalePrice":{"nullable":true,"type":"number"},"buyerUnits":{"nullable":true,"type":"number"},"buyerVolume":{"nullable":true,"type":"number"},"city":{"description":"City (stored lowercase on the source index)","nullable":true,"type":"string"},"company":{"nullable":true,"type":"string"},"coordinates":{"nullable":true,"properties":{"lat":{"type":"number"},"lon":{"type":"number"}},"required":["lat","lon"],"type":"object"},"country":{"nullable":true,"type":"string"},"dualUnits":{"nullable":true,"type":"number"},"dualVolume":{"nullable":true,"type":"number"},"email":{"description":"Office email (list rows since 2026-10-15; was detail-only)","nullable":true,"type":"string"},"id":{"description":"Office key (mm_office_key)","type":"string"},"lastCountedAt":{"nullable":true,"type":"string"},"locationType":{"nullable":true,"type":"string"},"phone":{"description":"Office phone (list rows since 2026-10-15; was detail-only)","nullable":true,"type":"string"},"sellerUnits":{"nullable":true,"type":"number"},"sellerVolume":{"nullable":true,"type":"number"},"state":{"description":"State abbreviation (stored lowercase on the source index)","nullable":true,"type":"string"},"street":{"nullable":true,"type":"string"},"teamSize":{"nullable":true,"type":"number"},"topOriginator":{"description":"Present only when the request set `includeTopOriginator`: the loan officer on the most of this office's BUYER-side deals in the period (ties → more volume, then lower NMLS id), named from the LO's own profile with their current employer. `null` when no buyer-side deal had a tracked LO.","nullable":true,"properties":{"buyerUnits":{"type":"number"},"buyerVolume":{"type":"number"},"company":{"nullable":true,"properties":{"name":{"nullable":true,"type":"string"},"nmlsId":{"nullable":true,"type":"string"}},"required":["name","nmlsId"],"type":"object"},"name":{"type":"string"},"nmlsId":{"type":"string"}},"required":["nmlsId","name","company","buyerUnits","buyerVolume"],"type":"object"},"units":{"nullable":true,"type":"number"},"volume":{"nullable":true,"type":"number"},"zip":{"nullable":true,"type":"string"}},"required":["id"],"type":"object"},"OrFilter":{"properties":{"children":{"description":"Array of filter expressions (OR)","items":{"$ref":"#/components/schemas/FilterNode"},"type":"array"},"type":{"enum":["or"],"type":"string"}},"required":["type","children"],"type":"object"},"OriginatorAgentSide":{"description":"Which agent on the LO's loans to rank. `buyer` (default): the buyer's (selling) agent — the agent who brought the borrower. `listing`: the seller's listing and co-listing agents.","enum":["buyer","listing"],"type":"string"},"OriginatorAgentsBreakdownRequest":{"additionalProperties":false,"properties":{"advancedFilters":{"$ref":"#/components/schemas/FilterNode"},"bySide":{"description":"Also return the `buyer` and `listing` views under `bySide`, computed in the same query — each identical to calling again with that `side`. Use instead of one call per side. `pagination.cursor` pages every view in step (each view's own `cursor` is absent once it ends).","type":"boolean"},"filters":{"$ref":"#/components/schemas/FilterNode"},"flatFilters":{"additionalProperties":false,"properties":{"borrowerStatus":{"$ref":"#/components/schemas/LoanBorrowerStatusFilterValue"},"broker":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Broker shop NMLS id (digits only). A broker is a company — resolve a broker name to its NMLS id via instantSearch (or listCompanies)."}]},"buyerEntityType":{"$ref":"#/components/schemas/BooleanFilterValue"},"city":{"$ref":"#/components/schemas/TextFilterValue"},"conforming":{"$ref":"#/components/schemas/BooleanFilterValue"},"county":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"County name (e.g. \"Broward\") or 5-digit FIPS code. Names resolve to FIPS server-side; include a `state` filter to disambiguate."}]},"currentBalance":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Estimated remaining principal balance (~19% populated). Approximate current equity as `homeValue` (AVM) minus this."}]},"employer":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Employer/company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"equity":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Point-in-time equity recorded on the loan (sparse, ~10%). NOT a live current-equity figure. For HELOC/cash-out targeting on up-to-date equity, use properties search (listProperties) instead — its equity is far better populated and current."}]},"excludeBroker":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans brokered by this broker-shop NMLS id (digits only) — the inverse of `broker`."}]},"excludeCity":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this city — the inverse of `city`."}]},"excludeLender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans from this lender ID (\"everyone but X\") — the inverse of `lender`, same id contract (resolve via instantSearch/listLenders). Loans with no lender stay in the results."}]},"excludeLoanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans funded by this company NMLS id (digits only) — the inverse of `loanCompany`."}]},"excludeLoanType":{"$ref":"#/components/schemas/LoanTypeExcludeFilterValue"},"excludeOriginator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans with this originator NMLS id (digits only) — the inverse of `originator`. Common for 'everyone but my own shop' lists."}]},"excludeState":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this state (2-letter code, e.g. \"CA\") — the inverse of `state`. For \"everywhere but this state\" lists."}]},"excludeTransactionType":{"$ref":"#/components/schemas/LoanTransactionTypeExcludeFilterValue"},"excludeZipCode":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this ZIP code — the inverse of `zipCode`."}]},"fips":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exact 5-digit county FIPS code (no name resolution) — the code-only escape hatch alongside `county`."}]},"geoPoint":{"$ref":"#/components/schemas/GeoFilterValue"},"homeValue":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"AVM (automated valuation) at the linked property (~26%, MLS-linked). Pair with `currentBalance` to approximate current equity."}]},"includeUnknownOriginator":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Include loans that have no originator NMLS id. Omitted/false (default): such loans are excluded — the vast majority are pre-2016 public records with no linkable originator. true: include them. Note that the default scopes results to loans with a known originator (~2016+ recordings)."}]},"interestRate":{"$ref":"#/components/schemas/NumericFilterValue"},"lender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender ID — the normalized lender-dictionary key, NOT a fuzzy name match. Resolve a lender via instantSearch (or listLenders) and pass the `id` it returns (e.g. \"mortgage_rocket\" or \"mortgage rocket\"). Underscores and letter case are normalized, so either id surface works. A stored normalized lender name (what the `slice: \"lender\"` chart buckets emit) is also accepted, so a chart bucket key filters directly. A value that is neither returns 400 rather than silently matching nothing — to search by lender NAME, use `lenderName`."}]},"lenderName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender name as recorded on the loan document — fuzzy, all-terms match (e.g. \"Fifth Third\"). The name counterpart to the exact-id `lender` filter; use `lender` when you have a resolved id, and this when you only have a name."}]},"loanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Funding/loan company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"loanType":{"$ref":"#/components/schemas/LoanTypeFilterValue"},"ltvAtOrigination":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Loan-to-value at ORIGINATION (sparse), as a PERCENT on a 0-100 scale (`80` = 80% LTV; values above 100 are real underwater loans). This is not a current LTV — there is no stored current-LTV field on loans."}]},"mode":{"enum":["and","or"],"type":"string"},"mortgageAmount":{"$ref":"#/components/schemas/NumericFilterValue"},"mortgageDate":{"$ref":"#/components/schemas/DateFilterValue"},"originator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Loan originator NMLS id (digits only). To search by name use `originatorName`, or resolve a name to its id via instantSearch."}]},"originatorName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"deprecated":true,"description":"DEPRECATED — fuzzy name matching is unreliable (same originator can return wildly different counts by name string). Resolve the loan officer via instantSearch and filter by `originator` (exact NMLS id) instead. Still functional for now."}]},"propertyId":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Parcel id — returns every loan recorded against one property. Pass the same string this endpoint returns as `mmPropertyId` on a loan row, or the `mmPropertyId` of a property record.\n\nThis is the parcel's FULL recorded loan history, which is deliberately wider than the loans embedded on a property record: that embed is a snapshot of what is still owed (up to five currently-active loans), so paid-off mortgages are absent from it and present here.\n\nMulti-unit caveat: loans carry a unit-blind parcel id, so for one unit of a multi-unit building this selects every unit in the building, not that unit alone."}]},"saleDate":{"$ref":"#/components/schemas/DateFilterValue"},"salePrice":{"$ref":"#/components/schemas/NumericFilterValue"},"state":{"$ref":"#/components/schemas/TextFilterValue"},"transactionType":{"$ref":"#/components/schemas/LoanTransactionTypeFilterValue"},"zip":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Alias of `zipCode` — same ZIP filter, accepted for cross-entity key parity."}]},"zipCode":{"$ref":"#/components/schemas/TextFilterValue"}},"type":"object"},"pagination":{"$ref":"#/components/schemas/Pagination"},"period":{"$ref":"#/components/schemas/DatedPeriod"},"side":{"$ref":"#/components/schemas/OriginatorAgentSide"},"sort":{"$ref":"#/components/schemas/BreakdownSort"}},"type":"object"},"OriginatorBranchLocation":{"description":"The NMLS branch the originator is currently registered at. Null when they have no branch location on file.","nullable":true,"properties":{"city":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"nmlsId":{"description":"Branch NMLS ID.","nullable":true,"type":"string"},"state":{"nullable":true,"type":"string"}},"type":"object"},"OriginatorChartRequest":{"additionalProperties":false,"properties":{"advancedFilters":{"$ref":"#/components/schemas/FilterNode"},"filters":{"$ref":"#/components/schemas/FilterNode"},"flatFilters":{"additionalProperties":false,"properties":{"borrowerStatus":{"$ref":"#/components/schemas/LoanBorrowerStatusFilterValue"},"broker":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Broker shop NMLS id (digits only). A broker is a company — resolve a broker name to its NMLS id via instantSearch (or listCompanies)."}]},"buyerEntityType":{"$ref":"#/components/schemas/BooleanFilterValue"},"city":{"$ref":"#/components/schemas/TextFilterValue"},"conforming":{"$ref":"#/components/schemas/BooleanFilterValue"},"county":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"County name (e.g. \"Broward\") or 5-digit FIPS code. Names resolve to FIPS server-side; include a `state` filter to disambiguate."}]},"currentBalance":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Estimated remaining principal balance (~19% populated). Approximate current equity as `homeValue` (AVM) minus this."}]},"employer":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Employer/company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"equity":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Point-in-time equity recorded on the loan (sparse, ~10%). NOT a live current-equity figure. For HELOC/cash-out targeting on up-to-date equity, use properties search (listProperties) instead — its equity is far better populated and current."}]},"excludeBroker":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans brokered by this broker-shop NMLS id (digits only) — the inverse of `broker`."}]},"excludeCity":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this city — the inverse of `city`."}]},"excludeLender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans from this lender ID (\"everyone but X\") — the inverse of `lender`, same id contract (resolve via instantSearch/listLenders). Loans with no lender stay in the results."}]},"excludeLoanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans funded by this company NMLS id (digits only) — the inverse of `loanCompany`."}]},"excludeLoanType":{"$ref":"#/components/schemas/LoanTypeExcludeFilterValue"},"excludeOriginator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans with this originator NMLS id (digits only) — the inverse of `originator`. Common for 'everyone but my own shop' lists."}]},"excludeState":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this state (2-letter code, e.g. \"CA\") — the inverse of `state`. For \"everywhere but this state\" lists."}]},"excludeTransactionType":{"$ref":"#/components/schemas/LoanTransactionTypeExcludeFilterValue"},"excludeZipCode":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this ZIP code — the inverse of `zipCode`."}]},"fips":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exact 5-digit county FIPS code (no name resolution) — the code-only escape hatch alongside `county`."}]},"geoPoint":{"$ref":"#/components/schemas/GeoFilterValue"},"homeValue":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"AVM (automated valuation) at the linked property (~26%, MLS-linked). Pair with `currentBalance` to approximate current equity."}]},"includeUnknownOriginator":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Include loans that have no originator NMLS id. Omitted/false (default): such loans are excluded — the vast majority are pre-2016 public records with no linkable originator. true: include them. Note that the default scopes results to loans with a known originator (~2016+ recordings)."}]},"interestRate":{"$ref":"#/components/schemas/NumericFilterValue"},"lender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender ID — the normalized lender-dictionary key, NOT a fuzzy name match. Resolve a lender via instantSearch (or listLenders) and pass the `id` it returns (e.g. \"mortgage_rocket\" or \"mortgage rocket\"). Underscores and letter case are normalized, so either id surface works. A stored normalized lender name (what the `slice: \"lender\"` chart buckets emit) is also accepted, so a chart bucket key filters directly. A value that is neither returns 400 rather than silently matching nothing — to search by lender NAME, use `lenderName`."}]},"lenderName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender name as recorded on the loan document — fuzzy, all-terms match (e.g. \"Fifth Third\"). The name counterpart to the exact-id `lender` filter; use `lender` when you have a resolved id, and this when you only have a name."}]},"loanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Funding/loan company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"loanType":{"$ref":"#/components/schemas/LoanTypeFilterValue"},"ltvAtOrigination":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Loan-to-value at ORIGINATION (sparse), as a PERCENT on a 0-100 scale (`80` = 80% LTV; values above 100 are real underwater loans). This is not a current LTV — there is no stored current-LTV field on loans."}]},"mode":{"enum":["and","or"],"type":"string"},"mortgageAmount":{"$ref":"#/components/schemas/NumericFilterValue"},"mortgageDate":{"$ref":"#/components/schemas/DateFilterValue"},"originator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Loan originator NMLS id (digits only). To search by name use `originatorName`, or resolve a name to its id via instantSearch."}]},"originatorName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"deprecated":true,"description":"DEPRECATED — fuzzy name matching is unreliable (same originator can return wildly different counts by name string). Resolve the loan officer via instantSearch and filter by `originator` (exact NMLS id) instead. Still functional for now."}]},"propertyId":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Parcel id — returns every loan recorded against one property. Pass the same string this endpoint returns as `mmPropertyId` on a loan row, or the `mmPropertyId` of a property record.\n\nThis is the parcel's FULL recorded loan history, which is deliberately wider than the loans embedded on a property record: that embed is a snapshot of what is still owed (up to five currently-active loans), so paid-off mortgages are absent from it and present here.\n\nMulti-unit caveat: loans carry a unit-blind parcel id, so for one unit of a multi-unit building this selects every unit in the building, not that unit alone."}]},"saleDate":{"$ref":"#/components/schemas/DateFilterValue"},"salePrice":{"$ref":"#/components/schemas/NumericFilterValue"},"state":{"$ref":"#/components/schemas/TextFilterValue"},"transactionType":{"$ref":"#/components/schemas/LoanTransactionTypeFilterValue"},"zip":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Alias of `zipCode` — same ZIP filter, accepted for cross-entity key parity."}]},"zipCode":{"$ref":"#/components/schemas/TextFilterValue"}},"type":"object"},"measure":{"$ref":"#/components/schemas/ChartMeasure"},"nmlsId":{"type":"string"},"nmlsIds":{"items":{"type":"string"},"type":"array"},"period":{"$ref":"#/components/schemas/Period"},"segment":{"allOf":[{"$ref":"#/components/schemas/OriginatorSlice"},{"description":"Optional second dimension. Each bucket of `slice` then carries `segments`: the same `measure` broken down by this dimension (e.g. `slice: \"loanType\", segment: \"lender\"` is loan type × lender in one call), top 25 per bucket ranked by `measure`, with the remainder counted in `segmentsOmittedCount`. Omit it and the response is the one-dimensional chart, unchanged. Must differ from `slice` (400). Combines with `size` / `after` paging on a party slice: the cursor pages the `slice` ranking and every bucket on each page carries its own segments (e.g. `slice: \"broker\", segment: \"lender\"` walks every broker shop × its lenders)."}]},"slice":{"$ref":"#/components/schemas/OriginatorSlice"}},"required":["slice"],"type":"object"},"OriginatorCompanyCategoryFilterValue":{"anyOf":[{"description":"One of (case-insensitive): BANK, CU, OTHER, BUILDER","enum":["BANK","CU","OTHER","BUILDER"],"type":"string"},{"description":"Match any of these values","items":{"description":"One of (case-insensitive): BANK, CU, OTHER, BUILDER","enum":["BANK","CU","OTHER","BUILDER"],"type":"string"},"type":"array"},{"description":"Fuzzy text match","properties":{"match":{"type":"string"}},"required":["match"],"type":"object"},{"nullable":true}],"description":"Employer category. `BANK` / `CU` / `OTHER` are the stored NMLS categories; `BUILDER` is a virtual category matching the mortgage arms of home builders (Lennar Mortgage, DHI Mortgage, Pulte Mortgage, …), which NMLS registers as `OTHER`. Pass an array to match any of several — `[\"BANK\", \"BUILDER\"]` is banks OR builder lenders. Rows never carry `BUILDER` back; read `companyNmlsId` instead."},"OriginatorContact":{"nullable":true,"properties":{"cellPhone":{"nullable":true,"type":"string"},"employerAddress":{"nullable":true,"type":"string"},"employerCity":{"nullable":true,"type":"string"},"employerCompany":{"nullable":true,"type":"string"},"employerCompanyId":{"nullable":true,"type":"string"},"employerState":{"nullable":true,"type":"string"},"employerType":{"nullable":true,"type":"string"},"employerWebsite":{"nullable":true,"type":"string"},"employerZip":{"nullable":true,"type":"string"},"facebook":{"nullable":true,"type":"string"},"linkedin":{"nullable":true,"type":"string"},"officePhone":{"nullable":true,"type":"string"},"officePhoneExt":{"nullable":true,"type":"string"},"personalEmail":{"nullable":true,"type":"string"},"twitter":{"nullable":true,"type":"string"},"website":{"nullable":true,"type":"string"},"workEmail":{"nullable":true,"type":"string"}},"type":"object"},"OriginatorCountResponse":{"properties":{"lenderNormalizations":{"description":"How each `lenderName` value resolved against the lender dictionary. Present when a `lenderName` filter was supplied.","items":{"$ref":"#/components/schemas/LenderNormalization"},"type":"array"},"locationNormalizations":{"description":"How each location filter value resolved. Present when a `city`/`county`/`state`/`zip` filter was supplied.","items":{"$ref":"#/components/schemas/LocationNormalization"},"type":"array"},"previousTotal":{"description":"How many of the originators in this result set also produced at least one loan in the 12 months BEFORE the `last12Months` window — i.e. months 13-24 back. With no filters, or identity-only filters (`nmlsId`, name, company), that is the full prior-year active originator population, and `total` against `previousTotal` is a true trailing year-over-year change in it. It is NOT `countOriginators(last24Months) - countOriginators(last12Months)`: the 24-month window CONTAINS the 12-month one, so that subtraction returns only the originators who produced in the prior year and then stopped (46,525) rather than all who were active in it (220,836) — it drops everyone who produced in both years and understates by about 79%. There is no way to derive this figure from the published totals, which is why it is returned here. UNDER A PRODUCTION OR GEOGRAPHY FILTER IT IS A RETENTION COUNT, NOT A PRIOR-YEAR POPULATION. Every such filter (`state`, `city`, `county`, `zip`, `volume`, `units`, `loanType`, the market-count filters, `footprint`, …) is read from the CURRENT window in both passes: `state: \"CA\"` selects originators whose last-12-month production includes California, then counts how many of THOSE were also producing a year earlier (45,024 → 38,269). `previousTotal` is then a subset of `total` — it is never larger, `total - previousTotal` is the members of the current set who were not active a year ago, and `total / previousTotal` is a retention ratio, not the growth of the California market. An originator who produced in California a year ago but has since stopped or moved markets is not counted, because there is no per-market breakdown of the prior window to filter on. ABSENT rather than zero when it cannot be computed: on any `period` other than `last12Months` (no other window has a measured containing block), and when `producersOnly: false` is set (that opts the zero-production tail into `total`, so the two figures would no longer describe comparable populations).","example":220836,"minimum":0,"type":"integer"},"total":{"description":"Exact count of records matching the filters","example":48213,"minimum":0,"type":"integer"},"totalIsLowerBound":{"description":"Present (always `true`) only under `timeAtCompanyMonths` when the other filters match more than 200,000 originators: `total` then counts the tenure matches among the first 200,000 of them (in sort order) and the true count may be higher. Absent means `total` is exact.","enum":[true],"type":"boolean"}},"required":["total"],"type":"object"},"OriginatorCrmListFilter":{"additionalProperties":false,"description":"Scope the result to the caller's CRM. Resolved against the caller's ACTIVE WORKSPACE at query time — list membership is read server-side, so the request never carries member ids. Only loan-officer members count; agents and manual (unlinked) records on the same list are ignored. `mode: \"in\"` with no matching members returns an empty page (not an unfiltered one). Errors: 400 `crm_list_requires_workspace` when the caller has no active workspace (API-key / OAuth callers must select an organization), 403 / 404 when a named list is not visible to the caller or does not exist, and 400 `crm_list_too_large` when the selected lists hold more than 50,000 loan officers in total — narrow the selection rather than get a silently partial answer.","properties":{"lists":{"anyOf":[{"description":"Every list in the caller's workspace that the caller can see (own, org-wide, or shared with them) and that holds this kind of record — People lists for originators and agents, Company lists for companies.","enum":["any"],"type":"string"},{"description":"Specific CRM list ids (1–50).","items":{"minLength":1,"type":"string"},"maxItems":50,"minItems":1,"type":"array"}],"description":"Which lists: `\"any\"` for every People list the caller can see, or an array of list ids. Membership is the UNION across the selected lists."},"mode":{"description":"`in` — only originators who are a member of the selected list(s). `notIn` — exclude every originator who is a member of the selected list(s); everyone else passes, including originators on none of your lists.","enum":["in","notIn"],"type":"string"}},"required":["mode","lists"],"type":"object"},"OriginatorDetail":{"allOf":[{"$ref":"#/components/schemas/OriginatorSummary"},{"properties":{"careerHistory":{"nullable":true,"properties":{"employerCount":{"description":"Number of employers on the origination record. May be lower than `employers.length`, which also counts companies known only from the NMLS sponsorship record.","nullable":true,"type":"number"},"employers":{"description":"Employer history, current employer(s) first, then most recent activity.","items":{"properties":{"address":{"description":"The employer's NMLS-registered main office. Null when the company has no registration record on file.","nullable":true,"properties":{"city":{"nullable":true,"type":"string"},"state":{"nullable":true,"type":"string"},"street":{"nullable":true,"type":"string"},"zip":{"nullable":true,"type":"string"}},"type":"object"},"avgLoanAmount":{"nullable":true,"type":"number"},"cityCount":{"nullable":true,"type":"number"},"countyCount":{"nullable":true,"type":"number"},"isCurrent":{"description":"True when the originator is still with this employer. Taken from the NMLS sponsorship record when there is one (it is maintained independently of loan closings, so an originator who has not closed recently still reads as current), otherwise from an open production window.","type":"boolean"},"name":{"nullable":true,"type":"string"},"nmlsId":{"description":"The employer's NMLS company ID.","nullable":true,"type":"string"},"producedFrom":{"description":"First loan origination seen under this employer. Null when the originator never closed a loan here.","nullable":true,"type":"string"},"producedTo":{"description":"Most recent loan origination seen under this employer. Null means production was still open at the last scoring run — it does NOT mean no production.","nullable":true,"type":"string"},"registeredFrom":{"description":"Start of the NMLS company sponsorship. Null when this employer appears only in the origination record.","nullable":true,"type":"string"},"registeredTo":{"description":"End of the NMLS company sponsorship. Null when the sponsorship is still open.","nullable":true,"type":"string"},"sources":{"description":"Which record this employer came from. `production` only = they closed loans here but the sponsorship record does not carry the company; `registration` only = sponsored here with no closed loans on file.","items":{"enum":["production","registration"],"type":"string"},"type":"array"},"stateCount":{"description":"Distinct states originated in under this employer.","nullable":true,"type":"number"},"topStates":{"description":"The employer's three largest states by volume. The full footprint is available from the originator breakdown endpoints.","items":{"properties":{"percentOfVolume":{"description":"Share of this employer's volume originated in this state, 0–100.","nullable":true,"type":"number"},"state":{"description":"Two-letter state code.","nullable":true,"type":"string"},"stateName":{"nullable":true,"type":"string"},"units":{"nullable":true,"type":"number"},"volume":{"nullable":true,"type":"number"}},"type":"object"},"type":"array"},"units":{"nullable":true,"type":"number"},"volume":{"description":"All-time origination volume under this employer (not period-scoped). Zero is a real answer — a registered stint with no closed loans.","nullable":true,"type":"number"},"zipCount":{"nullable":true,"type":"number"}},"required":["isCurrent","topStates","sources"],"type":"object"},"type":"array"},"records":{"description":"Every NMLS employment record — company sponsorships AND federal registrations — newest start first, each with the company's registered address. Empty until the registration record carries them.","items":{"properties":{"address":{"nullable":true,"properties":{"city":{"nullable":true,"type":"string"},"state":{"nullable":true,"type":"string"},"street":{"nullable":true,"type":"string"},"zip":{"nullable":true,"type":"string"}},"type":"object"},"companyName":{"nullable":true,"type":"string"},"companyNmlsId":{"nullable":true,"type":"string"},"endDate":{"description":"Null while the record is open.","nullable":true,"type":"string"},"isActive":{"type":"boolean"},"licenseType":{"nullable":true,"type":"string"},"locationNmlsId":{"description":"Branch the originator is registered at, on the ACTIVE record at that branch's company only (no location history is kept).","nullable":true,"type":"string"},"regulator":{"description":"State regulator on a sponsorship; primary federal regulator on a registration.","nullable":true,"type":"string"},"source":{"description":"`sponsorship` = a state-licensed company sponsorship (one per license); `registration` = a federal registration (banks, credit unions).","enum":["sponsorship","registration",null],"nullable":true,"type":"string"},"startDate":{"nullable":true,"type":"string"}},"required":["isActive"],"type":"object"},"type":"array"},"summary":{"description":"Counts over `records` and the state licenses. Null when the originator has no registration record.","nullable":true,"properties":{"activeEmployers":{"type":"number"},"activeLicenses":{"description":"State licenses currently authorizing origination.","type":"number"},"avgTenurePerEmployerYears":{"description":"Mean years per employer, earliest start to latest end (open records run to today), to 0.1.","nullable":true,"type":"number"},"careerYears":{"description":"Years since the earliest employer start on `records`, to 0.1 — the career length the recruiting signal is judged on. Null when no record carries a start date.","nullable":true,"type":"number"},"currentTenureYears":{"description":"Years at the current employer (the first employer with an active record), from its earliest record start to today, to 0.1. Null when no employer is active or its start date is unknown. A 365-day year, matching the profile's recruiting signal.","nullable":true,"type":"number"},"employerChanges":{"nullable":true,"type":"number"},"licenseRegulators":{"items":{"type":"string"},"type":"array"},"recruitingSignal":{"description":"One-line read of this career for recruiting, rule-based over `records` (employers grouped by company NMLS id): no records → `none`; over half the employers missing a start date → `incompleteData`; under 2 career years with one employer → `limitedHistory`; one employer for 2+ years → `singleEmployerCareer`; 5+ years at the current employer with ≤3 employers → `longTermStability`; 3+ employers at ≥0.6 per career year → `highMobility`; under 1 year at the current employer with >1 employer → `recentMove`; 3-4 employers over 5+ years → `multiSponsorships`; otherwise `establishedAtCurrent`. First matching rule wins. `label`/`subtext` are display copy.","properties":{"code":{"enum":["singleEmployerCareer","longTermStability","establishedAtCurrent","recentMove","highMobility","multiSponsorships","limitedHistory","incompleteData","none"],"type":"string"},"label":{"type":"string"},"subtext":{"type":"string"}},"required":["code","label","subtext"],"type":"object"},"totalEmployers":{"type":"number"},"totalLicenses":{"type":"number"}},"required":["totalEmployers","activeEmployers","totalLicenses","activeLicenses","licenseRegulators"],"type":"object"}},"required":["employers"],"type":"object"},"communityLending":{"$ref":"#/components/schemas/EntityCommunityLending"},"contact":{"$ref":"#/components/schemas/OriginatorContact"},"hasScoredData":{"description":"`false` on an originator who is in the NMLS registry but has no production record — typically newly licensed. Their production fields (`volume`, `units`, the mix and share fields, `lastTransactionDate`) are `null` because none exists, not because it is zero: label the row (e.g. \"no transactions yet\") rather than rendering zeros. ABSENT on every originator with a production record. Such rows appear on the list only for an identity search (`nmlsId`, `name` or `namePrefix`) sent with `producersOnly: false`, after the rows that have production.","type":"boolean"},"licenses":{"nullable":true},"locations":{"nullable":true},"managedBranches":{"description":"NMLS branches that list this originator as a manager of record. Empty when they manage none.","items":{"$ref":"#/components/schemas/OriginatorManagedBranch"},"nullable":true,"type":"array"},"profileInsights":{"$ref":"#/components/schemas/OriginatorProfileInsights"},"registration":{"$ref":"#/components/schemas/OriginatorRegistration"},"registrations":{"nullable":true},"scored":{"nullable":true},"sponsorships":{"nullable":true},"stateLicenses":{"description":"Every state license on the originator's NMLS record, active and historical, as typed rows. The untyped `licenses` array carries the same rows verbatim.","items":{"$ref":"#/components/schemas/OriginatorStateLicense"},"nullable":true,"type":"array"},"title":{"nullable":true,"type":"string"}},"type":"object"}]},"OriginatorDetailResponse":{"properties":{"data":{"$ref":"#/components/schemas/OriginatorDetail"}},"required":["data"],"type":"object"},"OriginatorFootprintFilter":{"additionalProperties":false,"properties":{"avgLoanAmount":{"allOf":[{"$ref":"#/components/schemas/FootprintRange"},{"description":"Mean loan size INSIDE this market."}]},"city":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}],"description":"Production city — a name (`Orlando`, best paired with `state`) or a location id from `instantSearch` / `suggestLocations`. An unrecognized name is a 400, never a silent zero."},"county":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}],"description":"Production county — a 5-digit FIPS code (`06037`) or a county name (`Riverside`, best paired with `state`)."},"dimension":{"description":"Which footprint to address. Normally inferred from the location key you pass; name it explicitly to ask the ANY-market question (`{dimension:'city', volume:{gte:15000000}}` = 'some single city where they did $15M').","enum":["zip","city","county","state","lender"],"type":"string"},"lender":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}],"description":"Funding lender, as an id from `listLenders` or `instantSearch`. Lender names are stored in a normalized dictionary form, so a typed name does not match — resolve it first."},"not":{"description":"Invert the whole entry: match producers with NO market matching it (e.g. 'does not send loans to this lender').","type":"boolean"},"product":{"allOf":[{"$ref":"#/components/schemas/FootprintProductFilter"},{"description":"Correlate a product INSIDE this market — '$1M of FHA in Orlando'."}]},"shareOfVolume":{"allOf":[{"$ref":"#/components/schemas/FootprintRange"},{"description":"This market's share of the originator's total volume for the period, as a 0–100 PERCENT (not a 0–1 fraction). `{gte:50}` = 'this market is at least half their book'."}]},"state":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}],"description":"Two-letter state code or full state name. Alongside `city` or `county` it DISAMBIGUATES that place rather than adding a second predicate; on its own it selects the state footprint."},"units":{"allOf":[{"$ref":"#/components/schemas/FootprintRange"},{"description":"Loan count INSIDE this market during the selected period."}]},"volume":{"allOf":[{"$ref":"#/components/schemas/FootprintRange"},{"description":"Dollar volume originated INSIDE this market during the selected period."}]},"zip":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}],"description":"Production 5-digit zip code."}},"type":"object"},"OriginatorListRequest":{"additionalProperties":false,"properties":{"advancedFilters":{"$ref":"#/components/schemas/FilterNode"},"crmList":{"$ref":"#/components/schemas/OriginatorCrmListFilter"},"filters":{"$ref":"#/components/schemas/FilterNode"},"flatFilters":{"additionalProperties":false,"properties":{"affordableHousingTractCount":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Number of the entity's loans in qualified affordable-housing tracts. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"affordableHousingTractPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Share of the entity's tract-resolved loans in qualified census tracts for affordable-housing programs, 0-100 (`{gte:25}` = 27,209 originators). Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgAsianPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean Asian (non-Hispanic) share of the population in the tracts the entity lent in, 0-100. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgBlackPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean Black (non-Hispanic) share of the population in the tracts the entity lent in, 0-100. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgDenialRate":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean share of mortgage applications denied in the tracts the entity lent in, 0-100. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgFamilyIncome":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean median family income of the tracts the entity lent in, in whole dollars. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgHispanicPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean Hispanic or Latino share of the population in the tracts the entity lent in, 0-100. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgHomeValue":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean median home value across the tracts the entity lent in, in whole dollars. A neighborhood statistic — not the entity's average loan size, which is `avgLoanAmount`. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgHomeownershipRate":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean owner-occupied share of housing units in the tracts the entity lent in, 0-100. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgHouseholdIncome":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean median household income of the tracts the entity lent in, in whole dollars (e.g. `{lte:60000}`). Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgIncomeVsMetroPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean tract income relative to its metro area, where `100` is parity — `{lt:80}` is the CRA low/moderate band, and values legitimately exceed 100 (observed up to 412). NOT a 0-100 share. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgLoanAmount":{"$ref":"#/components/schemas/NumericFilterValue"},"avgLowModHouseholdPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean HUD block-group low/moderate-income HOUSEHOLD share across the tracts the entity lent in, 0-100. A finer-grained measure than `lowModIncomeTractPct`, which counts whole tracts — not a duplicate of it. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgMedianAge":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean median age of the population in the tracts the entity lent in, in years. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgMilesToCollege":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean straight-line distance to the nearest college, in miles. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgMilesToSchool":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean straight-line distance from the properties the entity lent on to the nearest school, in miles. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgMilesToWorship":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean straight-line distance to the nearest place of worship, in miles. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgMinorityPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean non-white share of the population in the tracts the entity lent in, 0-100 (`{gte:50}` = 63,370 originators). `majorityMinorityTractPct` is the per-tract-threshold form of the same question. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgPopulation":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean population of the tracts the entity lent in. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgPovertyRate":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean share of the population below the poverty line in the tracts the entity lent in, 0-100. Pass whole percents — `{gte:0.2}` means 0.2%. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgTractApplications":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean number of mortgage applications reported in the tracts the entity lent in, over the year. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgTractLoanVolume":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean mortgage dollar volume reported in the tracts the entity lent in, over the year. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgTractOriginations":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean number of mortgage originations reported in the tracts the entity lent in, over the year. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"avgWhiteNonHispanicPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean White (non-Hispanic) share of the population in the tracts the entity lent in, 0-100. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"city":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Production city — matches originators who originated loans in this city during the selected period (NOT office/employer location). An LO can match this city while their row's displayed `city`/`state` is a different, higher-volume market."}]},"companyCategory":{"$ref":"#/components/schemas/OriginatorCompanyCategoryFilterValue"},"companyName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"deprecated":true,"description":"DEPRECATED — fuzzy name matching is unreliable (one name can match many different people; partial names can silently return 0). Resolve the company via instantSearch and filter by `companyNmlsId` (exact NMLS id) instead. Still functional for now."}]},"companyNamePrefix":{"description":"Current company name prefix search: each word starts a word of it (\"guild mort\"); not fuzzy. Digits = company NMLS id.","minLength":1,"type":"string"},"companyNmlsId":{"$ref":"#/components/schemas/TextFilterValue"},"county":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Alias of `countyFips`, identical behavior — production county by 5-digit FIPS code (e.g. `06037` = Los Angeles, CA) or by county name (`Riverside`, optionally with a sibling `state`). Pass an array to match any of several counties."}]},"countyCount":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"How many distinct counties the originator produced in during the selected period."}]},"countyFips":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Production county. Accepts a 5-digit FIPS code (e.g. `04013` = Maricopa, AZ; `06037` = Los Angeles, CA) or a county name (`Riverside`, optionally with a sibling `state`) — names are resolved to a FIPS by the location dictionary. Matches originators who originated loans in this county during the selected period (NOT office/employer location). An ambiguous name returns candidates; an unrecognized one is a 400 naming `instantSearch`. Pass an array to match any of several counties."}]},"difficultDevelopmentAreaCount":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Number of the entity's loans in HUD-designated difficult development areas. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"difficultDevelopmentAreaPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Share of the entity's tract-resolved loans in HUD-designated difficult development areas, 0-100 (`{gte:25}` = 93,397 originators). Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"distressedTractCount":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Number of the entity's loans in distressed-or-underserved tracts. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"distressedTractPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Share of the entity's tract-resolved loans in distressed-or-underserved nonmetropolitan middle-income tracts, 0-100 (`{gte:25}` = 11,773 originators). Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"firstName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"deprecated":true,"description":"DEPRECATED — fuzzy name matching is unreliable (one name can match many different people; partial names can silently return 0). Note: firstName maps to the FULL analyzed `name` field, not a dedicated first-name leaf, so it also matches middle names. Resolve the originator via instantSearch and filter by `nmlsId` (exact NMLS id) instead. Still functional for now."}]},"floodHazardTractCount":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Number of the entity's loans in a FEMA special flood hazard area. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"floodHazardTractPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Share of the entity's tract-resolved loans in a FEMA special flood hazard area, 0-100 (`{gte:25}` = 5,212 originators). `predominantFloodZone` gives the specific zone code. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"hasEmail":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Whether the originator's profile carries at least one email address (101,566 do). Same `true`-is-a-guarantee / `false`-means-'none on the profile' caveat as `hasPhone`."}]},"hasPhone":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Whether the originator's profile carries at least one phone number (250,077 do). `true` is a guarantee — those records have a number. `false` means 'none on the profile', not 'no number exists': the detail response also draws on a broader contact source, so a small share of `false` records still show a phone when fetched individually."}]},"hasSocial":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Whether the originator's profile carries a social profile link — LinkedIn, Facebook or X/Twitter. Deliberately excludes a plain company website, which is tracked separately and is not a social presence."}]},"isBranchManager":{"$ref":"#/components/schemas/BooleanFilterValue"},"isBroker":{"$ref":"#/components/schemas/BooleanFilterValue"},"isWorking":{"$ref":"#/components/schemas/BooleanFilterValue"},"lastName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"deprecated":true,"description":"DEPRECATED — fuzzy name matching is unreliable (one name can match many different people; partial names can silently return 0). Note: lastName maps to the FULL analyzed `name` field, not a dedicated last-name leaf, so it also matches middle names. Resolve the originator via instantSearch and filter by `nmlsId` (exact NMLS id) instead. Still functional for now."}]},"lastTransactionDate":{"allOf":[{"$ref":"#/components/schemas/DateFilterValue"},{"description":"Date of the originator's most recent loan INSIDE the selected period — the 'recently active' axis. `{gte: \"2026-07-01\"}` keeps originators who closed a loan on or after that day; under the default `last12Months` the period's newest loan is the originator's newest loan, so this reads as 'last active since'. Present on every producing record (100% of served rows), so a bound drops no one for lack of a date. Bounds accept `YYYY`, `YYYY-MM`, `YYYY-MM-DD` or an ISO datetime (see `DateFilterValue`). Sortable: `sort: [{field: \"lastTransactionDate\", order: \"desc\"}]` = most recently active first."}]},"lenderCount":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"How many distinct lenders the originator sent loans to during the selected period. `{lte:1}` finds single-outlet producers."}]},"licenseCount":{"$ref":"#/components/schemas/NumericFilterValue"},"licensedSinceDate":{"allOf":[{"$ref":"#/components/schemas/DateFilterValue"},{"description":"Date the originator's NMLS registration began — 'licensed since'. Lifetime, NOT scoped by `period`. `{gte: \"2025-10-01\"}` finds originators who entered the industry on or after that day (newly licensed); `{lte: \"2015-01-01\"}` finds ten-year veterans by registration rather than by `yearsInIndustry`. On file for 99.7% of producing originators (59% of the whole index, so pair with `producersOnly: false` cautiously — unregistered rows have no date and are dropped by any bound unless `includeNulls: true`). Bounds accept `YYYY`, `YYYY-MM`, `YYYY-MM-DD` or an ISO datetime. Sortable: `desc` = newest registrations first."}]},"loanType":{"$ref":"#/components/schemas/OriginatorLoanTypeFilterValue"},"loansWithCommunityData":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"How many of the entity's loans in the selected period resolved to a neighborhood — the DENOMINATOR every Community Lending share is taken over. Pair it with a share filter (`{gte:25}`, 60,399 originators) so a 100% share off two loans does not read as a 100% share off two hundred. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"lowModIncomeTractCount":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Number of the entity's loans that landed in a low- or moderate-income tract, as a count rather than a share. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"lowModIncomeTractPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Share of the entity's tract-resolved loans that landed in a low- or moderate-income tract under the Community Reinvestment Act, 0-100. `{gte:50}` = 'at least half their book is LMI' (36,977 originators, 655 companies, 648 branches). Pass whole percents — `{gte:0.5}` means half of one percent and matches nearly everyone. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"majorityMinorityTractCount":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Number of the entity's loans in majority-minority tracts. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"majorityMinorityTractPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Share of the entity's tract-resolved loans in majority-minority tracts, 0-100 (`{gte:50}` = 65,654 originators). Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"marketConcentration":{"$ref":"#/components/schemas/MarketConcentrationFilterValue"},"marketCount":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"How many distinct CITIES the originator produced in during the selected period. `{gte:10}` = a broad, multi-market book; `{lte:2}` = concentrated. Counts markets, not loans."}]},"mode":{"enum":["and","or"],"type":"string"},"msa":{"$ref":"#/components/schemas/OriginatorMsaFilterValue"},"name":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"deprecated":true,"description":"DEPRECATED — fuzzy name matching is unreliable (one name can match many different people; partial names can silently return 0). Resolve the originator via instantSearch and filter by `nmlsId` (exact NMLS id) instead. Still functional for now."}]},"namePrefix":{"description":"Prefix name search: every word must start a word of the name (\"jen ro\" → Jennifer Rodriguez). No fuzzy/nickname matching; relevance-ranked unless `sort` is set. Max 100 chars / 6 words (emails, URLs, phones ignored), else 400.","minLength":1,"type":"string"},"nmlsId":{"$ref":"#/components/schemas/TextFilterValue"},"officeCity":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Office city — matches originators whose NMLS-registered office is in this city (NOT where they produced loans; that is `city`). Resolved through the location dictionary, so spelling variants match (`Saint Louis` = `St. Louis`); pair it with `officeState` to pick one of several same-named cities (a sibling production `state` does NOT disambiguate it), or pass a dictionary city id. An unrecognized city is a 400 naming `instantSearch`. Pass an array to match any of several."}]},"officeCounty":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Office county — matches originators whose NMLS-registered office zip lies in this county. Accepts a county name (`Orleans`, with a sibling `officeState` when the name exists in several states), a 5-digit FIPS code (`22071`) or a dictionary county id. The office address carries no county of its own, so it is derived from the office zip: each zip is assigned to the ONE county holding most of its parcels, which makes the counties of a state partition its offices but attributes an office in a zip that straddles a county line to the zip's main county. An unrecognized county is a 400."}]},"officeState":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Office state — matches originators whose NMLS-registered office is in this state (NOT where they produced loans; that is `state`). A 2-letter code or full name (`LA` or `Louisiana`), any case; pass an array to match any of several. Period-independent. Originators with no office address on file never match."}]},"officeZip":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Office zip code — matches originators whose NMLS-registered office is in this 5-digit zip (ZIP+4 office addresses match their 5-digit prefix). Pass an array to match any of several."}]},"opportunityZoneCount":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Number of the entity's loans in Opportunity Zone tracts. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"opportunityZonePct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Share of the entity's tract-resolved loans in federally designated Opportunity Zone tracts, 0-100 (`{gte:10}` = 33,520 originators — this is a small-share filter, a 50% floor finds almost nobody). Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"peakMonthUnits":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"The originator's BEST single month of loan COUNT inside the selected period. `{gte:20}` = 'they closed 20+ loans in some month' (7,295 originators over the last 12 months). Same peak semantics as `peakMonthVolume`."}]},"peakMonthVolume":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"The originator's BEST single month of volume inside the selected period. `{gte:10000000}` = 'they had at least one $10M month' (4,803 originators over the last 12 months); `{lte:X}` means no month exceeded X, so it is a true ceiling on their best month. There is no way to ask about a SPECIFIC month here — the per-month buckets are not individually addressable — so use `POST /v1/originators/analytics/time-series` (filtered to the originator) for a month-by-month series."}]},"predominantFloodZone":{"$ref":"#/components/schemas/EntityPredominantFloodZoneFilterValue"},"predominantIncomeLevel":{"$ref":"#/components/schemas/EntityPredominantIncomeLevelFilterValue"},"producersOnly":{"$ref":"#/components/schemas/BooleanFilterValue"},"region":{"$ref":"#/components/schemas/OriginatorRegionFilterValue"},"regulators":{"$ref":"#/components/schemas/TextFilterValue"},"ruralGradient":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean remoteness of the tracts the entity lent in, on an ORDINAL 1-10 scale (1 = metropolitan core, 10 = most remote). This is a code, not a percent — `{gte:7}` selects the deepest-rural books (8,886 originators). Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"ruralTractCount":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Number of the entity's loans in rural tracts. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"ruralTractPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Share of the entity's tract-resolved loans in rural tracts, 0-100 (`{gte:50}` = 24,006 originators). `ruralGradient` is the finer, ordinal form. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"sponsoredAvgLoanAmount":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean loan size on the originator's sponsored-employer production."}]},"sponsoredShare":{"anyOf":[{"type":"number"},{"description":"Match any value","items":{"type":"number"},"type":"array"},{"description":"Numeric range. Excludes null/missing-field docs by default; add `includeNulls: true` to keep them.","properties":{"gt":{"type":"number"},"gte":{"type":"number"},"includeNulls":{"description":"Also keep docs where the field is null/missing (a range filter drops them by default). Requires at least one of gte/lte/gt/lt.","type":"boolean"},"lt":{"type":"number"},"lte":{"type":"number"}},"type":"object"},{"nullable":true}],"description":"Share of the originator's period volume originated under their SPONSORING employer, as a 0–100 percent. The retail counterpart of `thirdPartyShare`; same denominator, same exclusion of zero-volume records, and the two do not sum to 100."},"sponsoredUnits":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Loan count the originator produced under their sponsoring employer during the selected period."}]},"sponsoredVolume":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Dollar volume the originator produced under their sponsoring employer during the selected period."}]},"state":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Production state — matches originators who originated loans in this state during the selected period (NOT office/employer location). Multi-state LOs match any state they produced in; each row's `state` shows only their primary (highest-volume) market."}]},"stateCount":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"How many distinct states the originator produced in during the selected period. `{gte:2}` finds multi-state producers."}]},"thirdPartyAvgLoanAmount":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mean loan size on the originator's third-party (broker) production."}]},"thirdPartyShare":{"anyOf":[{"type":"number"},{"description":"Match any value","items":{"type":"number"},"type":"array"},{"description":"Numeric range. Excludes null/missing-field docs by default; add `includeNulls: true` to keep them.","properties":{"gt":{"type":"number"},"gte":{"type":"number"},"includeNulls":{"description":"Also keep docs where the field is null/missing (a range filter drops them by default). Requires at least one of gte/lte/gt/lt.","type":"boolean"},"lt":{"type":"number"},"lte":{"type":"number"}},"type":"object"},{"nullable":true}],"description":"Share of the originator's period volume submitted through a THIRD-PARTY (broker) relationship, as a 0–100 percent. `{gte:50}` = 'most of their book is wholesale' (52,507 originators over the last 12 months). Computed against their total period volume; an originator with no volume in the period has no share and is excluded rather than counted as zero. This and `sponsoredShare` do not sum to 100 — the remainder is retail."},"thirdPartyUnits":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Loan count the originator submitted through third-party (broker) relationships during the selected period."}]},"thirdPartyVolume":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Dollar volume the originator submitted through third-party (broker) relationships during the selected period."}]},"timeAtCompanyMonths":{"description":"Whole months at the CURRENT employer (`tenureMonths` on each row), from the NMLS registration record as of the last weekly refresh. `{gte:24}` = at their company two years or more; `{lte:6}` = recent movers. Only originators currently working at a company have a value. Not sortable — sort by `yearsInIndustry` or production instead. Applied after the rest of the request: the other filters are matched first, in the request's sort order, and each match is checked against the registration record, so it works at any result size up to 200,000 matches of the OTHER filters. Past that, `total` counts only the tenure matches among the first 200,000 scanned and the response carries `totalIsLowerBound: true`; a page beyond what was found answers 400 with `code: \"TIME_AT_COMPANY_SCOPE\"` — add a geography, production or company filter to narrow. Pages use an opaque offset cursor; pass `cursor` back unchanged. Flat filters only, and not inside `mode: \"or\"`.","nullable":true,"properties":{"gt":{"minimum":0,"type":"integer"},"gte":{"minimum":0,"type":"integer"},"lt":{"minimum":0,"type":"integer"},"lte":{"minimum":0,"type":"integer"}},"type":"object"},"totalLicenses":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"How many licenses appear on the originator's record in total, including expired and superseded ones. Distinct from `licenseCount`, which is the CURRENT registration snapshot and runs lower (it is also only on file for about 60% of originators, where this is on all of them). Use `totalLicenses` for career breadth, `licenseCount` for who is licensed right now."}]},"totalLoans":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Lifetime originated loan count across every period on record. Not scoped by `period` — use `units` for the selected period."}]},"transactionType":{"$ref":"#/components/schemas/OriginatorTransactionTypeFilterValue"},"units":{"$ref":"#/components/schemas/NumericFilterValue"},"usdaEligibleTractCount":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Number of the entity's loans in USDA-eligible tracts. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"usdaEligibleTractPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Share of the entity's tract-resolved loans in tracts eligible for USDA rural housing programs, 0-100 (`{gte:50}` = 90,392 originators). Broader than `ruralTractPct` — eligibility reaches well past what is classified rural. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"volume":{"$ref":"#/components/schemas/NumericFilterValue"},"yearsInIndustry":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Years of recorded industry tenure. Lifetime, NOT scoped by `period`. `{gte:10}` finds established originators (246,091 today); `{lte:2}` finds new entrants."}]},"zip":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Production zip code — matches originators who originated loans in this 5-digit zip during the selected period (NOT office/employer location). Pass an array to match any of several zips."}]},"zipCode":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Alias of `zip` — production zip code (5-digit). Identical behavior; kept for callers using the loans/sales spelling."}]},"zipCount":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"How many distinct 5-digit zip codes the originator produced in during the selected period."}]}},"type":"object"},"footprint":{"anyOf":[{"$ref":"#/components/schemas/OriginatorFootprintFilter"},{"items":{"$ref":"#/components/schemas/OriginatorFootprintFilter"},"type":"array"}],"description":"Scoped market filter(s). Each entry names ONE market (city / county / state / zip / lender) and the metric bounds that must hold INSIDE it — `{city:'Orlando', state:'FL', volume:{gte:15000000}}` means '$15M of production in Orlando', not '$15M somewhere and a loan in Orlando'. Several entries AND together."},"lenderFilters":{"items":{"$ref":"#/components/schemas/LenderFilterEntry"},"type":"array"},"lenderMatchMode":{"$ref":"#/components/schemas/LenderMatchMode"},"officeGeoPoint":{"$ref":"#/components/schemas/OriginatorOfficeGeoPoint"},"pagination":{"$ref":"#/components/schemas/Pagination"},"period":{"$ref":"#/components/schemas/Period"},"productMix":{"$ref":"#/components/schemas/OriginatorProductMixFilter"},"productionGeoPoint":{"$ref":"#/components/schemas/OriginatorProductionGeoPoint"},"sort":{"items":{"properties":{"field":{"enum":["nmlsId","name","firstName","lastName","volume","units","scopedVolume","scopedUnits","avgLoanAmount","companyName","companyNmlsId","companyCategory","licenseCount","totalLicenses","totalLoans","yearsInIndustry","employerCount","sponsoredVolume","sponsoredUnits","sponsoredAvgLoanAmount","thirdPartyVolume","thirdPartyUnits","thirdPartyAvgLoanAmount","officeState","officeCity","licensedSinceDate","lastTransactionDate","purchaseShare","refinanceShare"],"type":"string"},"order":{"$ref":"#/components/schemas/SortOrder"}},"required":["field"],"type":"object"},"type":"array"},"transactionMix":{"$ref":"#/components/schemas/OriginatorTransactionMixFilter"}},"type":"object"},"OriginatorListResponse":{"properties":{"cursor":{"type":"string"},"data":{"items":{"$ref":"#/components/schemas/OriginatorListRow"},"type":"array"},"locationNormalizations":{"description":"How each location filter value resolved. Present when a `city`/`county`/`state`/`zip` filter was supplied.","items":{"$ref":"#/components/schemas/LocationNormalization"},"type":"array"},"total":{"type":"number"},"totalIsLowerBound":{"description":"Present (always `true`) only under `timeAtCompanyMonths` when the other filters match more than 200,000 originators: `total` then counts the tenure matches among the first 200,000 of them (in sort order) and the true count may be higher. Absent means `total` is exact.","enum":[true],"type":"boolean"}},"required":["data","total"],"type":"object"},"OriginatorListRow":{"properties":{"avgLoanAmount":{"description":"Mean loan size for the selected period, derived from the TOTAL `volume` and `units` across ALL markets — NOT scoped to any geographic filter in this request. For production INSIDE the geography this request names, read `scopedVolume`/`scopedUnits` on the same row, and sort by them to rank originators by it. `POST /v1/originators/{nmlsId}/breakdowns/counties` (or `/cities`, `/states`, `/zip-codes`) breaks ONE originator's production out by market.","nullable":true,"type":"number"},"branchLocation":{"$ref":"#/components/schemas/OriginatorBranchLocation"},"city":{"description":"The city with the most loan volume inside the primary-market `state`, in the selected period. Null when no city is on record in that state.","nullable":true,"type":"string"},"companyCategory":{"description":"Category of the current employer: `BANK`, `CU` (credit union) or `OTHER`.","nullable":true,"type":"string"},"companyName":{"nullable":true,"type":"string"},"companyNmlsId":{"description":"NMLS ID of the originator's current employer (the same value the `companyNmlsId` filter matches). Null when they are not currently registered with a company.","nullable":true,"type":"string"},"companyStartDate":{"description":"Date (YYYY-MM-DD) the originator started at their current employer: the earliest ACTIVE sponsorship or registration start at that company. Null when not currently working.","nullable":true,"type":"string"},"contact":{"description":"Collected contact block — the same object `getOriginator` returns. Null when no contact record is on file.","nullable":true,"properties":{"cellPhone":{"nullable":true,"type":"string"},"employerAddress":{"nullable":true,"type":"string"},"employerCity":{"nullable":true,"type":"string"},"employerCompany":{"nullable":true,"type":"string"},"employerCompanyId":{"nullable":true,"type":"string"},"employerState":{"nullable":true,"type":"string"},"employerType":{"nullable":true,"type":"string"},"employerWebsite":{"nullable":true,"type":"string"},"employerZip":{"nullable":true,"type":"string"},"facebook":{"nullable":true,"type":"string"},"linkedin":{"nullable":true,"type":"string"},"officePhone":{"nullable":true,"type":"string"},"officePhoneExt":{"nullable":true,"type":"string"},"personalEmail":{"nullable":true,"type":"string"},"twitter":{"nullable":true,"type":"string"},"website":{"nullable":true,"type":"string"},"workEmail":{"nullable":true,"type":"string"}},"type":"object"},"conventionalPct":{"nullable":true,"type":"number"},"email":{"nullable":true,"type":"string"},"employerCity":{"nullable":true,"type":"string"},"employerState":{"nullable":true,"type":"string"},"fhaPct":{"nullable":true,"type":"number"},"firstName":{"nullable":true,"type":"string"},"hasScoredData":{"description":"`false` on an originator who is in the NMLS registry but has no production record — typically newly licensed. Their production fields (`volume`, `units`, the mix and share fields, `lastTransactionDate`) are `null` because none exists, not because it is zero: label the row (e.g. \"no transactions yet\") rather than rendering zeros. ABSENT on every originator with a production record. Such rows appear on the list only for an identity search (`nmlsId`, `name` or `namePrefix`) sent with `producersOnly: false`, after the rows that have production.","type":"boolean"},"id":{"description":"Document ID","type":"string"},"isBranchManager":{"description":"True when the originator is a manager of record on any NMLS branch.","nullable":true,"type":"boolean"},"isBroker":{"description":"Broker (`true`) vs retail (`false`) for the selected period — the same period-scoped flag the `isBroker` filter matches. Null when the period bucket is absent.","nullable":true,"type":"boolean"},"isWorking":{"description":"True when the originator holds an active company sponsorship or registration.","nullable":true,"type":"boolean"},"lastName":{"nullable":true,"type":"string"},"lastTransactionDate":{"description":"ISO datetime of the originator's most recent loan INSIDE the selected period — the value the `lastTransactionDate` filter and sort use. Under the default `last12Months` this is the originator's most recent loan overall. Null when the period bucket carries no production.","nullable":true,"type":"string"},"licenseCount":{"description":"Current NMLS registration license count — the value the `licenseCount` filter matches.","nullable":true,"type":"number"},"licensedSinceDate":{"description":"Date (YYYY-MM-DD) the originator's NMLS registration began — the value the `licensedSinceDate` filter and sort use. Lifetime, not scoped by `period`. Null when no registration record is on file.","nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"nmlsId":{"nullable":true,"type":"string"},"officeCity":{"description":"City of the originator's NMLS-registered office — the value the `officeCity` filter matches. Null when no office address is on file.","nullable":true,"type":"string"},"officeState":{"description":"2-letter state of the originator's NMLS-registered office — the value the `officeState` filter matches.","nullable":true,"type":"string"},"officeZip":{"description":"Zip of the originator's NMLS-registered office as stored (5-digit, occasionally ZIP+4) — the value the `officeZip` filter matches.","nullable":true,"type":"string"},"phone":{"nullable":true,"type":"string"},"previousUnits":{"description":"The originator's TOTAL loan count in the 12 months BEFORE the `last12Months` window — months 13-24 back — with the same availability and geography caveats as `previousVolume` (NMLS 7206: 1,295 → 550). For production INSIDE the geography this request names, read `scopedVolume`/`scopedUnits` on the same row, and sort by them to rank originators by it. `POST /v1/originators/{nmlsId}/breakdowns/counties` (or `/cities`, `/states`, `/zip-codes`) breaks ONE originator's production out by market.","nullable":true,"type":"number"},"previousVolume":{"description":"The originator's TOTAL dollar production in the 12 months BEFORE the `last12Months` window — i.e. months 13-24 back. Pair it with `volume` for a true trailing year-over-year change (NMLS 7206: $855,758,492 → $440,740,230, −48.5%). Substituting calendar years answers a DIFFERENT question and disagrees materially — 2024 vs 2025 for the same originator reads −39.6%, nine points off — because a calendar year is not a trailing window and the current one is only partly elapsed. ABSENT, not zero, on any `period` other than `last12Months`: no other window has a containing block measured in the index, and a zero would read as 'produced nothing' rather than 'not available here'. For production INSIDE the geography this request names, read `scopedVolume`/`scopedUnits` on the same row, and sort by them to rank originators by it. `POST /v1/originators/{nmlsId}/breakdowns/counties` (or `/cities`, `/states`, `/zip-codes`) breaks ONE originator's production out by market.","nullable":true,"type":"number"},"purchaseShare":{"description":"Purchase loans as a 0–100 percent of the originator's period loan COUNT — the value `sort: [{field: \"purchaseShare\"}]` orders by. `null` when the originator wrote no purchase loans in the period (sorts as 0).","example":72.5,"nullable":true,"type":"number"},"purchaseUnits":{"nullable":true,"type":"number"},"purchaseVolume":{"nullable":true,"type":"number"},"refinanceShare":{"description":"Refinance loans as a 0–100 percent of the originator's period loan COUNT — the value `sort: [{field: \"refinanceShare\"}]` orders by. `null` when none (sorts as 0).","example":18.2,"nullable":true,"type":"number"},"refinanceUnits":{"nullable":true,"type":"number"},"refinanceVolume":{"nullable":true,"type":"number"},"regulators":{"description":"Distinct state regulators across the originator's sponsorships, historical included.","items":{"type":"string"},"nullable":true,"type":"array"},"scopedUnits":{"description":"The originator's loan count INSIDE the geography this request names, on the same basis as `scopedVolume`. Sortable. A single positive `footprint` market (city / county / state / zip, never `lender`) scopes it too; a negated, any-market (`dimension` only) or multi-entry footprint names no single place. When the request names no geography — or names one only inside an `or` group or a negation — the scope is everywhere, and this is identical to the unscoped figure beside it. Reconciles with `POST /v1/originators/{nmlsId}/markets` for the same geography and period: both are read from the same per-market rollup on the same record.","nullable":true,"type":"number"},"scopedVolume":{"description":"The originator's dollar production INSIDE the geography this request names — what a `state`/`city`/`county`/`zip` filter was almost certainly asking for, and what the sibling `volume` is not. Sort by `scopedVolume` to rank originators by it. A single positive `footprint` market (city / county / state / zip, never `lender`) scopes it too; a negated, any-market (`dimension` only) or multi-entry footprint names no single place. When the request names no geography — or names one only inside an `or` group or a negation — the scope is everywhere, and this is identical to the unscoped figure beside it. Reconciles with `POST /v1/originators/{nmlsId}/markets` for the same geography and period: both are read from the same per-market rollup on the same record.","nullable":true,"type":"number"},"state":{"description":"Primary market state: the state with the most loan volume in the selected period (production geography, not the office). Not a sort axis; sort by `officeState` to order by state.","nullable":true,"type":"string"},"tenureMonths":{"description":"Whole months at the current employer, from `companyStartDate`, as of the last weekly registration refresh. The value the `timeAtCompanyMonths` filter matches.","nullable":true,"type":"number"},"units":{"description":"The originator's TOTAL loan count for the selected period across ALL markets — NOT scoped to any geographic filter in this request, exactly as described on `volume`. For production INSIDE the geography this request names, read `scopedVolume`/`scopedUnits` on the same row, and sort by them to rank originators by it. `POST /v1/originators/{nmlsId}/breakdowns/counties` (or `/cities`, `/states`, `/zip-codes`) breaks ONE originator's production out by market.","nullable":true,"type":"number"},"vaPct":{"nullable":true,"type":"number"},"volume":{"description":"The originator's TOTAL dollar production for the selected period across ALL markets — NOT scoped to any geographic filter (`state`/`city`/`county`/`countyFips`/`zip`/`zipCode`) in this request. Those filters select WHICH originators are returned — they produced at least one loan there — and never change WHAT is summed here. Since the list sorts by `volume` descending by default, a geo-filtered search ranks originators by NATIONAL production, so the top row can be many times larger than that originator's production inside the filtered area. For production INSIDE the geography this request names, read `scopedVolume`/`scopedUnits` on the same row, and sort by them to rank originators by it. `POST /v1/originators/{nmlsId}/breakdowns/counties` (or `/cities`, `/states`, `/zip-codes`) breaks ONE originator's production out by market.","nullable":true,"type":"number"},"yearsInIndustry":{"description":"Years of recorded industry tenure — the value the `yearsInIndustry` filter and sort use. Lifetime, not scoped by `period`.","nullable":true,"type":"number"}},"required":["id"],"type":"object"},"OriginatorLoanTypeFilterValue":{"anyOf":[{"description":"One of (case-insensitive): conventional, fha, va, he, heloc, building, commercial, stand_alone_refi, closed_end, reverse, usda, stand_alone_second, aggregate, seller_take_back, sba_participation_trust_deed, balloon, opened_end, assumption, negative_amortization, land_contract, trade, modification, unknown","enum":["conventional","fha","va","he","heloc","building","commercial","stand_alone_refi","closed_end","reverse","usda","stand_alone_second","aggregate","seller_take_back","sba_participation_trust_deed","balloon","opened_end","assumption","negative_amortization","land_contract","trade","modification","unknown"],"type":"string"},{"description":"Match any of these values","items":{"description":"One of (case-insensitive): conventional, fha, va, he, heloc, building, commercial, stand_alone_refi, closed_end, reverse, usda, stand_alone_second, aggregate, seller_take_back, sba_participation_trust_deed, balloon, opened_end, assumption, negative_amortization, land_contract, trade, modification, unknown","enum":["conventional","fha","va","he","heloc","building","commercial","stand_alone_refi","closed_end","reverse","usda","stand_alone_second","aggregate","seller_take_back","sba_participation_trust_deed","balloon","opened_end","assumption","negative_amortization","land_contract","trade","modification","unknown"],"type":"string"},"type":"array"},{"description":"Fuzzy text match","properties":{"match":{"type":"string"}},"required":["match"],"type":"object"},{"nullable":true}]},"OriginatorManagedBranch":{"properties":{"city":{"nullable":true,"type":"string"},"companyName":{"nullable":true,"type":"string"},"companyNmlsId":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"nmlsId":{"nullable":true,"type":"string"},"rosterCount":{"description":"Originators actively registered at the branch.","nullable":true,"type":"number"},"state":{"nullable":true,"type":"string"}},"type":"object"},"OriginatorMarketBucket":{"properties":{"avgLoanAmount":{"description":"Mean loan size in this market.","nullable":true,"type":"number"},"key":{"description":"The market's key as the source stores it. Form varies with `source` (a rollup city is `city|state`, a live city is the city name) — use `name` for display and grouping.","nullable":true,"type":"string"},"name":{"description":"Display label for the market, in the same form the matching `/breakdowns` route publishes: a county reads `Middlesex County (MA)`, a state `MA`, a city `Belmont` (with a `, MA` qualifier when the market is a city within one state). Identical for a given market whichever `source` served the request, so labels can be compared across surfaces; `key` is the source-native identity and is not.","nullable":true,"type":"string"},"shareOfBook":{"description":"Share of the LO's whole period volume, 0–100. Null on live transaction data, which carries no stored share.","nullable":true,"type":"number"},"shareOfScope":{"description":"Share of the volume of the markets RETURNED, 0–100. Sums to 100 across the grain — this is the one a chart should render.","nullable":true,"type":"number"},"units":{"description":"Loans in this market.","nullable":true,"type":"number"},"volume":{"description":"Dollar volume originated in this market.","nullable":true,"type":"number"}},"required":["key","name","volume","units","avgLoanAmount","shareOfScope","shareOfBook"],"type":"object"},"OriginatorMarketsCommunityLending":{"description":"The Community Lending mix of this footprint: the neighborhood characteristics of where the production landed, as percentages on a 0-100 scale. Null when nothing in scope resolved to a neighborhood — an absent block, never a row of zeroes, because 'no data' and '0%' are different answers. Read `basis` before comparing two responses. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"properties":{"affordableHousingTractPct":{"description":"Share of production, 0-100, in neighborhoods carrying an affordable-housing designation. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"basis":{"description":"Which measurement produced this block, and they are NOT the same number. `entityRollup` is the neighborhood mix of the entity's own production over the whole period — the default. `marketsInScope` is the neighborhood profile of the markets the request selected, weighted by the entity's production in each, and is what any ZIP, date or filter scope returns, because a whole-period rollup cannot be re-cut to a narrower question.","enum":["entityRollup","marketsInScope"],"type":"string"},"coveredProductionPct":{"description":"`marketsInScope` only — what share of the weighted production, 0-100, sits in a market that resolved to neighborhood data. Below 100 means the mix describes part of the footprint, not all of it.","nullable":true,"type":"number"},"difficultDevelopmentAreaPct":{"description":"Share of production, 0-100, in designated difficult development areas. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"distressedTractPct":{"description":"Share of production, 0-100, in distressed or underserved nonmetropolitan middle-income neighborhoods. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"floodHazardTractPct":{"description":"Share of production, 0-100, in neighborhoods inside a special flood hazard area. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"incomeLevelMix":{"description":"`marketsInScope` only — the full relative-income distribution of the neighborhoods, 0-100, summing to about 100. Null on `entityRollup`, which stores the predominant band but no distribution; publishing one derived from a single label would be a histogram nobody measured. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"properties":{"low":{"nullable":true,"type":"number"},"middle":{"nullable":true,"type":"number"},"moderate":{"nullable":true,"type":"number"},"upper":{"nullable":true,"type":"number"}},"required":["low","moderate","middle","upper"],"type":"object"},"loansWithCommunityData":{"description":"`entityRollup` only — how many of the entity's transactions in the period resolved to a neighborhood. This is the denominator every share below is a share OF, so read it first: a 100% share over three transactions is not a footprint.","nullable":true,"type":"number"},"lowModIncomeTractPct":{"description":"Share of production, 0-100, in low- or moderate-income neighborhoods. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"majorityMinorityTractPct":{"description":"Share of production, 0-100, in majority-minority neighborhoods. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"marketsInScope":{"description":"`marketsInScope` only — ZIP markets the mix considered, including any that carried no neighborhood data.","nullable":true,"type":"number"},"marketsWithCommunityData":{"description":"`marketsInScope` only — ZIP markets that resolved to neighborhood data.","nullable":true,"type":"number"},"opportunityZonePct":{"description":"Share of production, 0-100, in designated Opportunity Zones. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"predominantIncomeLevel":{"description":"The most common relative-income classification of the neighborhoods, on the standard four-band scale. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","enum":["low","moderate","middle","upper",null],"nullable":true,"type":"string"},"ruralTractPct":{"description":"Share of production, 0-100, in neighborhoods classified rural. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"usdaEligibleTractPct":{"description":"Share of production, 0-100, in neighborhoods eligible for USDA rural housing programs. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"}},"required":["basis","loansWithCommunityData","marketsWithCommunityData","marketsInScope","coveredProductionPct","predominantIncomeLevel","incomeLevelMix","lowModIncomeTractPct","majorityMinorityTractPct","ruralTractPct","opportunityZonePct","affordableHousingTractPct","distressedTractPct","usdaEligibleTractPct","floodHazardTractPct","difficultDevelopmentAreaPct"],"type":"object"},"OriginatorMarketsRequest":{"additionalProperties":false,"properties":{"dateRange":{"description":"Custom window. A period is a fixed pre-aggregated window and cannot be re-cut, so any bound here switches the response to live transaction data.","properties":{"from":{"pattern":"^\\d{4}(?:-\\d{2}(?:-\\d{2})?)?$","type":"string"},"to":{"pattern":"^\\d{4}(?:-\\d{2}(?:-\\d{2})?)?$","type":"string"}},"type":"object"},"limit":{"description":"Markets returned per grain (default 100). The summary is computed over the whole footprint FIRST and is not affected by this.","maximum":500,"minimum":1,"type":"integer"},"period":{"allOf":[{"$ref":"#/components/schemas/Period"},{"description":"Production period the markets are read from (default last12Months)."}]},"zipCodes":{"description":"Narrow the footprint to these ZIP codes. 5-digit; ZIP+4 and zero-stripped forms are accepted and normalized. A value that is not 1–5 digits returns 400 naming it rather than being ignored. Any value here switches the response to live transaction data.","example":["92683","92703"],"items":{"type":"string"},"maxItems":200,"type":"array"}},"type":"object"},"OriginatorMarketsResponse":{"properties":{"nmlsId":{"type":"string"},"notes":{"description":"Plain-language caveats that apply to this response.","items":{"type":"string"},"type":"array"},"period":{"type":"string"},"rollups":{"$ref":"#/components/schemas/OriginatorMarketsRollups"},"scope":{"description":"The scope as applied, after normalization — echo it back to see what the request actually asked.","properties":{"dateRange":{"nullable":true,"properties":{"from":{"nullable":true,"type":"string"},"to":{"nullable":true,"type":"string"}},"required":["from","to"],"type":"object"},"zipCodes":{"items":{"type":"string"},"nullable":true,"type":"array"}},"required":["zipCodes","dateRange"],"type":"object"},"source":{"description":"Where the markets were read from. `documentRollup` is the LO's pre-aggregated footprint; `liveTransactions` aggregates the LO's loans directly, which is what any scope requires.","enum":["documentRollup","liveTransactions"],"type":"string"},"sourceReasons":{"description":"Why that source was chosen.","items":{"enum":["doc-rollup","coverage-empty","zip-scope","date-scope","live-only-metric"],"type":"string"},"type":"array"},"summary":{"$ref":"#/components/schemas/OriginatorMarketsSummary"},"totals":{"$ref":"#/components/schemas/OriginatorMarketsTotals"},"zips":{"description":"The ZIP-level footprint, largest volume first.","items":{"$ref":"#/components/schemas/OriginatorMarketBucket"},"type":"array"}},"required":["nmlsId","period","source","sourceReasons","scope","summary","zips","rollups","totals","notes"],"type":"object"},"OriginatorMarketsRollups":{"description":"Coarser views of the same scope. Each grain is its own pre-aggregation, not a re-cut of the ZIPs, so grains need not sum to each other.","properties":{"cities":{"items":{"$ref":"#/components/schemas/OriginatorMarketBucket"},"type":"array"},"counties":{"items":{"$ref":"#/components/schemas/OriginatorMarketBucket"},"type":"array"},"states":{"items":{"$ref":"#/components/schemas/OriginatorMarketBucket"},"type":"array"}},"required":["cities","counties","states"],"type":"object"},"OriginatorMarketsSummary":{"properties":{"avgLoanAmount":{"description":"Volume-weighted mean loan size — Σ volume ÷ Σ units, never an unweighted mean of the per-market averages.","nullable":true,"type":"number"},"communityLending":{"$ref":"#/components/schemas/OriginatorMarketsCommunityLending"},"markets":{"description":"Placed markets the summary covers.","type":"number"},"shareOfBook":{"description":"How much of the LO's whole period book the ZIP markets are, 0–100. Read it as COVERAGE, and expect it below 100 even with no filter: part of the gap is production that could not be placed at all (reported in `unresolved`) and part is production carrying no ZIP. The coarser grains in `rollups` are separate pre-aggregations with their own — usually higher — coverage, so they can legitimately add up to more than this. Null on live transaction data.","nullable":true,"type":"number"},"truncatedMarkets":{"description":"True when the source returned only the largest markets, so the summary covers those and not the full tail.","type":"boolean"},"units":{"description":"Σ loans of those markets.","nullable":true,"type":"number"},"unresolved":{"$ref":"#/components/schemas/OriginatorMarketsUnresolved"},"volume":{"description":"Σ volume of the markets in scope — NOT the LO's period total, which is `totals.volume`.","nullable":true,"type":"number"}},"required":["markets","volume","units","avgLoanAmount","shareOfBook","truncatedMarkets","unresolved","communityLending"],"type":"object"},"OriginatorMarketsTotals":{"properties":{"avgLoanAmount":{"description":"The LO's mean loan size for the period.","nullable":true,"type":"number"},"footprintCoverage":{"description":"What share of `volume` the returned ZIP markets account for, 0–100. Null on live transaction data, where the window and the period block are not the same denominator.","nullable":true,"type":"number"},"units":{"description":"The LO's whole loan count for the period.","nullable":true,"type":"number"},"volume":{"description":"The LO's whole volume for the period.","nullable":true,"type":"number"}},"required":["volume","units","avgLoanAmount","footprintCoverage"],"type":"object"},"OriginatorMarketsUnresolved":{"description":"Production the source could not attribute to a place, held OUT of the summary and the market lists and reported on its own.","properties":{"markets":{"description":"Buckets the source could not attribute to a place.","type":"number"},"shareOfBook":{"nullable":true,"type":"number"},"units":{"nullable":true,"type":"number"},"volume":{"nullable":true,"type":"number"}},"required":["markets","volume","units","shareOfBook"],"type":"object"},"OriginatorMsaFilterValue":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"maxItems":50,"minItems":1,"type":"array"},{"nullable":true}],"description":"Production METRO AREA (MSA / CBSA): originators who originated loans in ANY county of the metro during the selected period (not office). 5-digit CBSA code (`12420`) or metro name (`Austin Metro`); an array matches any. Member counties per the OMB July-2023 delineation (Connecticut's pre-2022 counties included; `41860` San Francisco Bay Area is the nine-county Bay Area). Unknown/ambiguous names are a 400 naming candidates."},"OriginatorOfficeGeoPoint":{"additionalProperties":false,"description":"Originators whose NMLS-registered OFFICE is within `radiusMiles` of an anchor — the radius form of `officeState` / `officeCity` / `officeZip`, NOT production geography (that is `state` / `city` / `county` / `zip` / `footprint`). Anchor on a coordinate (`{lat, lon, radiusMiles}`) or on another originator's office (`{nmlsId: \"7206\", radiusMiles: 25}` — 'LOs near this LO'; that originator is excluded). Originators with no geocoded office never match. 400 when neither anchor form is complete or both are given; 404 `office_geo_anchor_not_found` for an unknown `nmlsId`; 400 `office_geo_anchor_unlocated` when that originator has no geocoded office.","properties":{"lat":{"description":"Anchor latitude; pair with `lon`.","example":33.4484,"maximum":90,"minimum":-90,"type":"number"},"lon":{"description":"Anchor longitude; pair with `lat`.","example":-112.074,"maximum":180,"minimum":-180,"type":"number"},"nmlsId":{"description":"Anchor on another originator's office instead: their NMLS id (resolved server-side; they are excluded from the result). Exclusive with `lat`/`lon`.","example":"7206","minLength":1,"type":"string"},"radiusMiles":{"description":"Radius in miles, > 0 and ≤ 1000.","example":50,"exclusiveMinimum":true,"maximum":1000,"minimum":0,"type":"number"}},"required":["radiusMiles"],"type":"object"},"OriginatorProductMixEntry":{"additionalProperties":false,"properties":{"basis":{"description":"`volume` (default) or `units` (loan count).","enum":["volume","units"],"type":"string"},"maxShare":{"description":"Upper bound, 0–100. No bucket = 0% (passes).","example":60,"maximum":100,"minimum":0,"type":"number"},"minShare":{"description":"Lower bound, 0–100 percent of the period book.","example":25,"maximum":100,"minimum":0,"type":"number"},"product":{"description":"Loan product (case-insensitive).","enum":["conventional","fha","va","he","heloc","building","commercial","stand_alone_refi","closed_end","reverse","usda","stand_alone_second","aggregate","seller_take_back","sba_participation_trust_deed","balloon","opened_end","assumption","negative_amortization","land_contract","trade","modification","unknown"],"example":"fha","type":"string"},"products":{"description":"Any-of instead of `product`: `[\"fha\",\"va\",\"usda\"]` = one of them on its own meets the bounds (shares never summed).","items":{"description":"Loan product (case-insensitive).","enum":["conventional","fha","va","he","heloc","building","commercial","stand_alone_refi","closed_end","reverse","usda","stand_alone_second","aggregate","seller_take_back","sba_participation_trust_deed","balloon","opened_end","assumption","negative_amortization","land_contract","trade","modification","unknown"],"example":"fha","type":"string"},"maxItems":10,"minItems":1,"type":"array"},"volume":{"additionalProperties":false,"description":"Dollar volume of this type in the period, `{gte, lte}`. Needs the bucket (no loans of the type fails).","properties":{"gte":{"minimum":0,"type":"number"},"lte":{"minimum":0,"type":"number"}},"type":"object"}},"type":"object"},"OriginatorProductMixFilter":{"description":"Whole-book product-share / volume bands for the selected period, ANDed: `[{product: \"fha\", minShare: 30}, {product: \"va\", maxShare: 10}]` = FHA ≥ 30% of period volume AND VA ≤ 10%; `{product:\"fha\", volume:{gte:10000000}}` = ≥ $10M of FHA. Shares are 0–100 percents of TOTAL period production across all markets (not geography-scoped), as the row's `fhaPct` / `vaPct` / `conventionalPct`. No bucket = 0% (fails `minShare` > 0, passes `maxShare`). Pair with `units: {gte: N}` so a 100% share off two loans is not a specialty.","items":{"$ref":"#/components/schemas/OriginatorProductMixEntry"},"maxItems":10,"minItems":1,"type":"array"},"OriginatorProductionGeoPoint":{"additionalProperties":false,"description":"Production RADIUS (statute miles, 0 < r ≤ 500): originators who originated loans within the radius of the point during the selected period — where they PRODUCE, not their office. COUNTY-LEVEL APPROXIMATION: counties whose Census centroid lies within the radius (always including the nearest) are in with all their loans; a large county whose centroid is outside is out even where its border is close. Coarser than a true radius, especially under ~25 mi. Pair with `sort: [{ field: \"scopedVolume\" }]` to rank by production inside those counties.","properties":{"lat":{"maximum":90,"minimum":-90,"type":"number"},"lon":{"maximum":180,"minimum":-180,"type":"number"},"radiusMiles":{"exclusiveMinimum":true,"maximum":500,"minimum":0,"type":"number"}},"required":["lat","lon","radiusMiles"],"type":"object"},"OriginatorProfileInsights":{"description":"Profile read-outs computed server-side from the LO's production in the requested `period` (default `last12Months`) — the same `volume` / `units` this response reports. Labels and descriptions are display copy; branch on the enum fields.","properties":{"producerTier":{"description":"From the period's units and volume, first match wins: `topProducer` ≥ 60 units OR ≥ $25M; `strongProducer` ≥ 36 units OR ≥ $12M; `midTier` ≥ 18 units OR ≥ $5M; else `lowVolume`.","properties":{"description":{"type":"string"},"label":{"type":"string"},"tier":{"enum":["topProducer","strongProducer","midTier","lowVolume"],"type":"string"}},"required":["tier","label","description"],"type":"object"}},"required":["producerTier"],"type":"object"},"OriginatorRegionFilterValue":{"anyOf":[{"enum":["northeast","northeast-division-1","northeast-division-2","midwest","midwest-division-3","midwest-division-4","south","south-division-5","south-division-6","south-division-7","west","west-division-8","west-division-9"],"type":"string"},{"items":{"enum":["northeast","northeast-division-1","northeast-division-2","midwest","midwest-division-3","midwest-division-4","south","south-division-5","south-division-6","south-division-7","west","west-division-8","west-division-9"],"type":"string"},"maxItems":50,"minItems":1,"type":"array"},{"nullable":true}],"description":"Production CENSUS REGION / DIVISION (`<region>-division-<n>`, Census numbering 1–9): originators who originated loans in ANY state of it during the selected period (not office). An array matches any."},"OriginatorRegistration":{"nullable":true,"properties":{"address":{"nullable":true},"city":{"nullable":true,"type":"string"},"companyCategory":{"nullable":true,"type":"string"},"companyName":{"nullable":true,"type":"string"},"companyNmlsId":{"nullable":true,"type":"string"},"hasDisciplinaryAction":{"nullable":true,"type":"boolean"},"isBranchManager":{"nullable":true,"type":"boolean"},"isWorking":{"nullable":true,"type":"boolean"},"licenseCount":{"nullable":true,"type":"number"},"licensedSinceDate":{"nullable":true,"type":"string"},"licensedStates":{"items":{"type":"string"},"nullable":true,"type":"array"},"licenses":{"nullable":true},"otherNames":{"nullable":true},"regulators":{"items":{"type":"string"},"nullable":true,"type":"array"},"sponsorships":{"nullable":true},"state":{"nullable":true,"type":"string"}},"type":"object"},"OriginatorRetention":{"properties":{"atRisk":{"description":"Exit signals on the retained book; null when not requested or the scan could not complete.","nullable":true,"properties":{"equityBands":{"items":{"properties":{"band":{"type":"string"},"count":{"type":"number"}},"required":["band","count"],"type":"object"},"type":"array"},"highEquityLowRate":{"type":"number"},"joined":{"type":"number"},"likelyToSell":{"type":"number"},"listedNow":{"type":"number"},"medianEquityPct":{"nullable":true,"type":"number"},"medianRate":{"nullable":true,"type":"number"},"rateIncentive":{"type":"number"},"retainedScanned":{"type":"number"},"rows":{"items":{"properties":{"address":{"type":"string"},"borrower":{"type":"string"},"currentBalance":{"nullable":true,"type":"number"},"currentLender":{"nullable":true,"type":"string"},"currentRate":{"nullable":true,"type":"number"},"equityPct":{"nullable":true,"type":"number"},"flags":{"items":{"enum":["listed","likely_sell","rate"],"type":"string"},"type":"array"},"homeValue":{"nullable":true,"type":"number"},"listPrice":{"nullable":true,"type":"number"},"listedDate":{"nullable":true,"type":"number"},"listingStatus":{"nullable":true,"type":"string"},"originalAmount":{"type":"number"},"originalLoanDate":{"type":"number"},"originalLoanType":{"type":"string"},"propensityCategory":{"nullable":true,"type":"string"},"propertyId":{"type":"string"},"salePropensity":{"nullable":true,"type":"number"}},"required":["propertyId","flags","equityPct","homeValue","currentBalance","currentRate","currentLender","salePropensity","propensityCategory","listingStatus","listPrice","listedDate","address","borrower","originalLoanDate","originalAmount","originalLoanType"],"type":"object"},"type":"array"},"signalling":{"type":"number"}},"required":["retainedScanned","joined","signalling","listedNow","likelyToSell","rateIncentive","highEquityLowRate","equityBands","medianRate","medianEquityPct","rows"],"type":"object"},"capturingCompanies":{"items":{"properties":{"count":{"type":"number"},"lane":{"enum":["own_company","servicer","competitor"],"type":"string"},"name":{"type":"string"},"nmlsId":{"type":"string"},"volume":{"type":"number"}},"required":["nmlsId","name","count","volume","lane"],"type":"object"},"type":"array"},"capturingOriginators":{"items":{"properties":{"companyName":{"type":"string"},"count":{"type":"number"},"name":{"type":"string"},"nmlsId":{"type":"string"},"volume":{"type":"number"}},"required":["nmlsId","name","companyName","count","volume"],"type":"object"},"type":"array"},"capturingTotals":{"properties":{"companies":{"properties":{"distinct":{"type":"number"},"loans":{"type":"number"},"volume":{"type":"number"}},"required":["distinct","loans","volume"],"type":"object"},"originators":{"properties":{"distinct":{"type":"number"},"loans":{"type":"number"},"unattributedLoans":{"type":"number"},"volume":{"type":"number"}},"required":["distinct","loans","volume","unattributedLoans"],"type":"object"},"secondCompanies":{"properties":{"distinct":{"type":"number"},"loans":{"type":"number"},"volume":{"type":"number"}},"required":["distinct","loans","volume"],"type":"object"}},"required":["companies","originators","secondCompanies"],"type":"object"},"churnByLoanType":{"items":{"properties":{"count":{"type":"number"},"type":{"type":"string"},"volume":{"type":"number"}},"required":["type","count","volume"],"type":"object"},"type":"array"},"churnTrend":{"items":{"properties":{"churned":{"type":"number"},"kept":{"type":"number"},"month":{"type":"string"},"retained":{"type":"number"},"secondPositions":{"type":"number"}},"required":["month","churned","retained","secondPositions","kept"],"type":"object"},"type":"array"},"churnedLoans":{"items":{"properties":{"address":{"type":"string"},"borrower":{"type":"string"},"capturingAmount":{"type":"number"},"capturingCompany":{"type":"string"},"capturingCompanyNmlsId":{"type":"string"},"capturingLender":{"type":"string"},"capturingLoName":{"type":"string"},"capturingLoNmlsId":{"type":"string"},"capturingLoanType":{"type":"string"},"capturingRate":{"nullable":true,"type":"number"},"cashOut":{"type":"boolean"},"current":{"description":"What the parcel looks like today, when a scored snapshot newer than the event joined; null otherwise (unknown, never 'retained').","nullable":true,"properties":{"currentBalance":{"nullable":true,"type":"number"},"currentLender":{"nullable":true,"type":"string"},"currentRate":{"nullable":true,"type":"number"},"lastSaleDate":{"nullable":true,"type":"number"},"loStillActive":{"type":"boolean"},"ownerChanged":{"nullable":true,"type":"boolean"}},"required":["loStillActive","ownerChanged","lastSaleDate","currentLender","currentBalance","currentRate"],"type":"object"},"daysToEvent":{"type":"number"},"eventDate":{"type":"number"},"kind":{"enum":["refi","second"],"type":"string"},"lane":{"enum":["own_company","servicer","competitor"],"type":"string"},"originalAmount":{"type":"number"},"originalLender":{"type":"string"},"originalLoanDate":{"type":"number"},"originalLoanType":{"type":"string"},"originalRate":{"nullable":true,"type":"number"},"originalTransactionType":{"type":"string"},"propertyId":{"type":"string"},"sameBorrower":{"nullable":true,"type":"boolean"}},"required":["kind","lane","propertyId","address","borrower","originalLoanDate","originalAmount","originalLoanType","originalTransactionType","originalRate","originalLender","eventDate","daysToEvent","capturingAmount","capturingLoanType","capturingRate","capturingLoNmlsId","capturingLoName","capturingCompanyNmlsId","capturingCompany","capturingLender","cashOut","sameBorrower","current"],"type":"object"},"type":"array"},"lanes":{"properties":{"competitor":{"properties":{"count":{"type":"number"},"volume":{"type":"number"}},"required":["count","volume"],"type":"object"},"own_company":{"properties":{"count":{"type":"number"},"volume":{"type":"number"}},"required":["count","volume"],"type":"object"},"servicer":{"properties":{"count":{"type":"number"},"volume":{"type":"number"}},"required":["count","volume"],"type":"object"}},"required":["own_company","servicer","competitor"],"type":"object"},"previous":{"description":"The `compare` period's summary and monthly trend, when asked.","nullable":true,"properties":{"churnTrend":{"items":{"properties":{"churned":{"type":"number"},"kept":{"type":"number"},"month":{"type":"string"},"retained":{"type":"number"},"secondPositions":{"type":"number"}},"required":["month","churned","retained","secondPositions","kept"],"type":"object"},"type":"array"},"summary":{"properties":{"churnRate":{"type":"number"},"churnedCount":{"type":"number"},"daysToRefiPairsUsed":{"type":"number"},"keptRefiCount":{"description":"Same-LO refinances of the LO's own borrowers in the period","type":"number"},"keptRefiVolume":{"type":"number"},"keptSecondCount":{"type":"number"},"medianDaysToRefi":{"nullable":true,"type":"number"},"propertySoldCount":{"type":"number"},"refiRetentionRate":{"description":"kept ÷ (kept + churned) refi events; null with none","nullable":true,"type":"number"},"retainedCount":{"type":"number"},"secondPositionCount":{"type":"number"},"secondPositionVolume":{"type":"number"},"totalBorrowers":{"type":"number"},"unattributedCount":{"type":"number"},"volumeLost":{"type":"number"},"volumeRetained":{"type":"number"}},"required":["totalBorrowers","churnedCount","retainedCount","propertySoldCount","unattributedCount","secondPositionCount","secondPositionVolume","keptRefiCount","keptRefiVolume","keptSecondCount","refiRetentionRate","churnRate","volumeLost","volumeRetained","medianDaysToRefi","daysToRefiPairsUsed"],"type":"object"}},"required":["summary","churnTrend"],"type":"object"},"secondPositionCompanies":{"items":{"properties":{"count":{"type":"number"},"lane":{"enum":["own_company","servicer","competitor"],"type":"string"},"name":{"type":"string"},"nmlsId":{"type":"string"},"volume":{"type":"number"}},"required":["nmlsId","name","count","volume","lane"],"type":"object"},"type":"array"},"secondPositionLanes":{"properties":{"competitor":{"properties":{"count":{"type":"number"},"volume":{"type":"number"}},"required":["count","volume"],"type":"object"},"own_company":{"properties":{"count":{"type":"number"},"volume":{"type":"number"}},"required":["count","volume"],"type":"object"},"servicer":{"properties":{"count":{"type":"number"},"volume":{"type":"number"}},"required":["count","volume"],"type":"object"}},"required":["own_company","servicer","competitor"],"type":"object"},"status":{"description":"`timeout` when the LO's loan history could not be read within the time budget (very large book): every count is then 0 and means 'not available', not 'none'.","enum":["ok","timeout"],"type":"string"},"summary":{"properties":{"churnRate":{"type":"number"},"churnedCount":{"type":"number"},"daysToRefiPairsUsed":{"type":"number"},"keptRefiCount":{"description":"Same-LO refinances of the LO's own borrowers in the period","type":"number"},"keptRefiVolume":{"type":"number"},"keptSecondCount":{"type":"number"},"medianDaysToRefi":{"nullable":true,"type":"number"},"propertySoldCount":{"type":"number"},"refiRetentionRate":{"description":"kept ÷ (kept + churned) refi events; null with none","nullable":true,"type":"number"},"retainedCount":{"type":"number"},"secondPositionCount":{"type":"number"},"secondPositionVolume":{"type":"number"},"totalBorrowers":{"type":"number"},"unattributedCount":{"type":"number"},"volumeLost":{"type":"number"},"volumeRetained":{"type":"number"}},"required":["totalBorrowers","churnedCount","retainedCount","propertySoldCount","unattributedCount","secondPositionCount","secondPositionVolume","keptRefiCount","keptRefiVolume","keptSecondCount","refiRetentionRate","churnRate","volumeLost","volumeRetained","medianDaysToRefi","daysToRefiPairsUsed"],"type":"object"},"timing":{"properties":{"cashOutCount":{"type":"number"},"cashOutShare":{"nullable":true,"type":"number"},"loanTypeChangeCount":{"type":"number"},"medianMonths":{"nullable":true,"type":"number"},"monthsToExit":{"items":{"properties":{"bucket":{"type":"string"},"count":{"type":"number"}},"required":["bucket","count"],"type":"object"},"type":"array"},"rateDeltaMedian":{"nullable":true,"type":"number"},"rateDeltaPairs":{"type":"number"}},"required":["monthsToExit","medianMonths","cashOutCount","cashOutShare","rateDeltaMedian","rateDeltaPairs","loanTypeChangeCount"],"type":"object"},"truncated":{"description":"A loan / sale scan hit its row cap; counts cover the rows read.","type":"boolean"}},"required":["status","truncated","summary","lanes","secondPositionLanes","timing","churnTrend","churnByLoanType","capturingOriginators","capturingCompanies","secondPositionCompanies","capturingTotals","churnedLoans","atRisk","previous"],"type":"object"},"OriginatorRetentionCaptured":{"properties":{"counts":{"description":"The capturer's rows by kind, ignoring `kind`.","properties":{"refi":{"type":"number"},"second":{"type":"number"}},"required":["refi","second"],"type":"object"},"rows":{"items":{"properties":{"address":{"type":"string"},"borrower":{"type":"string"},"capturingAmount":{"type":"number"},"capturingCompany":{"type":"string"},"capturingCompanyNmlsId":{"type":"string"},"capturingLender":{"type":"string"},"capturingLoName":{"type":"string"},"capturingLoNmlsId":{"type":"string"},"capturingLoanType":{"type":"string"},"capturingRate":{"nullable":true,"type":"number"},"cashOut":{"type":"boolean"},"current":{"description":"What the parcel looks like today, when a scored snapshot newer than the event joined; null otherwise (unknown, never 'retained').","nullable":true,"properties":{"currentBalance":{"nullable":true,"type":"number"},"currentLender":{"nullable":true,"type":"string"},"currentRate":{"nullable":true,"type":"number"},"lastSaleDate":{"nullable":true,"type":"number"},"loStillActive":{"type":"boolean"},"ownerChanged":{"nullable":true,"type":"boolean"}},"required":["loStillActive","ownerChanged","lastSaleDate","currentLender","currentBalance","currentRate"],"type":"object"},"daysToEvent":{"type":"number"},"eventDate":{"type":"number"},"kind":{"enum":["refi","second"],"type":"string"},"lane":{"enum":["own_company","servicer","competitor"],"type":"string"},"originalAmount":{"type":"number"},"originalLender":{"type":"string"},"originalLoanDate":{"type":"number"},"originalLoanType":{"type":"string"},"originalRate":{"nullable":true,"type":"number"},"originalTransactionType":{"type":"string"},"propertyId":{"type":"string"},"sameBorrower":{"nullable":true,"type":"boolean"}},"required":["kind","lane","propertyId","address","borrower","originalLoanDate","originalAmount","originalLoanType","originalTransactionType","originalRate","originalLender","eventDate","daysToEvent","capturingAmount","capturingLoanType","capturingRate","capturingLoNmlsId","capturingLoName","capturingCompanyNmlsId","capturingCompany","capturingLender","cashOut","sameBorrower","current"],"type":"object"},"type":"array"},"status":{"description":"`timeout`: the book could not be read in time; `rows` is empty and the counts are zero.","enum":["ok","timeout"],"type":"string"},"total":{"description":"Rows matching the capturer (and `kind`), all pages.","type":"number"},"truncated":{"description":"A scan hit its row cap; counts cover the rows read.","type":"boolean"}},"required":["status","truncated","total","counts","rows"],"type":"object"},"OriginatorRetentionCapturedRequest":{"additionalProperties":false,"properties":{"capturingCompanyNmlsId":{"description":"The capturing company (a `capturingCompanies[].nmlsId`). Exactly one of the two capturer ids is required.","pattern":"^\\d+$","type":"string"},"capturingLoNmlsId":{"description":"The capturing loan officer (a `capturingOriginators[].nmlsId`).","pattern":"^\\d+$","type":"string"},"end":{"description":"Last day of the period (UTC, inclusive).","example":"2025-08-15","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"kind":{"description":"Only refinances or only second liens. Default both.","enum":["refi","second"],"type":"string"},"limit":{"description":"Rows per page (default 100, at most 500).","maximum":500,"minimum":1,"type":"integer"},"offset":{"description":"Rows to skip (newest first).","minimum":0,"type":"integer"},"start":{"description":"First day of the period (UTC).","example":"2025-08-15","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},"required":["start","end"],"type":"object"},"OriginatorRetentionRequest":{"additionalProperties":false,"properties":{"compare":{"additionalProperties":false,"description":"Optional comparison period (e.g. the prior 14 months). Its `summary` and monthly trend come back as `previous`; it reuses this request's loan scan, so it costs no extra search.","properties":{"end":{"description":"Last day of the period (UTC, inclusive).","example":"2025-08-15","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"start":{"description":"First day of the period (UTC).","example":"2025-08-15","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},"required":["start","end"],"type":"object"},"end":{"description":"Last day of the period (UTC, inclusive).","example":"2025-08-15","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"includeAtRisk":{"description":"Scan the retained book for exit signals (listed / likely to sell / rate incentive). Default true.","type":"boolean"},"start":{"description":"First day of the period (UTC).","example":"2025-08-15","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},"required":["start","end"],"type":"object"},"OriginatorSegment":{"description":"Dimension to group by. Most are the loan's own field (`loanType`, `transactionType`, `state`, …). `lender` groups on the normalized lender (label = display name, `id` = filter key). `propertyType` is the recorder's land-use code of the collateral (`SFR` single-family, `PUD` planned unit development, `CND` condo, `RES` residential-other, `MFD` multi-family dwelling, `2ND` second home, `MFG` manufactured, `TWN` townhouse, `LAN` land, `COM` commercial, …); loans with no code are not grouped (≈20% of recent loans). `conforming` splits on the conforming-loan-limit flag: `conforming` vs `nonConforming` (above the county conforming limit — i.e. jumbo, not Non-QM), raw `true`/`false` on `id`. Time-series only: `titleCompany` groups on the title company named on the deed, with spellings of one company merged per bucket (`label` = most-used spelling across the response, `id` = normalized name — match on `id`) and \"none available\"-style placeholders excluded.","enum":["transactionType","loanType","city","county","state","zip","lender","propertyType","conforming","titleCompany"],"type":"string"},"OriginatorSlice":{"description":"Dimension to group by. Most are the loan's own field (`loanType`, `transactionType`, `state`, …). `lender` groups on the normalized lender (label = display name, `id` = filter key). `propertyType` is the recorder's land-use code of the collateral (`SFR` single-family, `PUD` planned unit development, `CND` condo, `RES` residential-other, `MFD` multi-family dwelling, `2ND` second home, `MFG` manufactured, `TWN` townhouse, `LAN` land, `COM` commercial, …); loans with no code are not grouped (≈20% of recent loans). `conforming` splits on the conforming-loan-limit flag: `conforming` vs `nonConforming` (above the county conforming limit — i.e. jumbo, not Non-QM), raw `true`/`false` on `id`.","enum":["transactionType","loanType","city","county","state","zip","lender","propertyType","conforming"],"type":"string"},"OriginatorStateLicense":{"properties":{"isAuthorized":{"description":"True when the license currently authorizes origination.","nullable":true,"type":"boolean"},"issueDate":{"nullable":true,"type":"string"},"licenseId":{"nullable":true,"type":"string"},"licenseNumber":{"nullable":true,"type":"string"},"licenseType":{"nullable":true,"type":"string"},"regulator":{"description":"Issuing regulator — a state name or \"<State> - <Agency>\"; not a normalized state code.","nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"}},"type":"object"},"OriginatorSummary":{"properties":{"avgLoanAmount":{"description":"Mean loan size for the selected period, derived from the TOTAL `volume` and `units` across ALL markets — NOT scoped to any geographic filter in this request. For production INSIDE the geography this request names, read `scopedVolume`/`scopedUnits` on the same row, and sort by them to rank originators by it. `POST /v1/originators/{nmlsId}/breakdowns/counties` (or `/cities`, `/states`, `/zip-codes`) breaks ONE originator's production out by market.","nullable":true,"type":"number"},"branchLocation":{"$ref":"#/components/schemas/OriginatorBranchLocation"},"city":{"description":"The city with the most loan volume inside the primary-market `state`, in the selected period. Null when no city is on record in that state.","nullable":true,"type":"string"},"companyCategory":{"description":"Category of the current employer: `BANK`, `CU` (credit union) or `OTHER`.","nullable":true,"type":"string"},"companyName":{"nullable":true,"type":"string"},"companyNmlsId":{"description":"NMLS ID of the originator's current employer (the same value the `companyNmlsId` filter matches). Null when they are not currently registered with a company.","nullable":true,"type":"string"},"companyStartDate":{"description":"Date (YYYY-MM-DD) the originator started at their current employer: the earliest ACTIVE sponsorship or registration start at that company. Null when not currently working.","nullable":true,"type":"string"},"contact":{"description":"Collected contact block — the same object `getOriginator` returns. Null when no contact record is on file.","nullable":true,"properties":{"cellPhone":{"nullable":true,"type":"string"},"employerAddress":{"nullable":true,"type":"string"},"employerCity":{"nullable":true,"type":"string"},"employerCompany":{"nullable":true,"type":"string"},"employerCompanyId":{"nullable":true,"type":"string"},"employerState":{"nullable":true,"type":"string"},"employerType":{"nullable":true,"type":"string"},"employerWebsite":{"nullable":true,"type":"string"},"employerZip":{"nullable":true,"type":"string"},"facebook":{"nullable":true,"type":"string"},"linkedin":{"nullable":true,"type":"string"},"officePhone":{"nullable":true,"type":"string"},"officePhoneExt":{"nullable":true,"type":"string"},"personalEmail":{"nullable":true,"type":"string"},"twitter":{"nullable":true,"type":"string"},"website":{"nullable":true,"type":"string"},"workEmail":{"nullable":true,"type":"string"}},"type":"object"},"conventionalPct":{"nullable":true,"type":"number"},"email":{"nullable":true,"type":"string"},"employerCity":{"nullable":true,"type":"string"},"employerState":{"nullable":true,"type":"string"},"fhaPct":{"nullable":true,"type":"number"},"firstName":{"nullable":true,"type":"string"},"id":{"description":"Document ID","type":"string"},"isBranchManager":{"description":"True when the originator is a manager of record on any NMLS branch.","nullable":true,"type":"boolean"},"isBroker":{"description":"Broker (`true`) vs retail (`false`) for the selected period — the same period-scoped flag the `isBroker` filter matches. Null when the period bucket is absent.","nullable":true,"type":"boolean"},"isWorking":{"description":"True when the originator holds an active company sponsorship or registration.","nullable":true,"type":"boolean"},"lastName":{"nullable":true,"type":"string"},"lastTransactionDate":{"description":"ISO datetime of the originator's most recent loan INSIDE the selected period — the value the `lastTransactionDate` filter and sort use. Under the default `last12Months` this is the originator's most recent loan overall. Null when the period bucket carries no production.","nullable":true,"type":"string"},"licenseCount":{"description":"Current NMLS registration license count — the value the `licenseCount` filter matches.","nullable":true,"type":"number"},"licensedSinceDate":{"description":"Date (YYYY-MM-DD) the originator's NMLS registration began — the value the `licensedSinceDate` filter and sort use. Lifetime, not scoped by `period`. Null when no registration record is on file.","nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"nmlsId":{"nullable":true,"type":"string"},"officeCity":{"description":"City of the originator's NMLS-registered office — the value the `officeCity` filter matches. Null when no office address is on file.","nullable":true,"type":"string"},"officeState":{"description":"2-letter state of the originator's NMLS-registered office — the value the `officeState` filter matches.","nullable":true,"type":"string"},"officeZip":{"description":"Zip of the originator's NMLS-registered office as stored (5-digit, occasionally ZIP+4) — the value the `officeZip` filter matches.","nullable":true,"type":"string"},"phone":{"nullable":true,"type":"string"},"previousUnits":{"description":"The originator's TOTAL loan count in the 12 months BEFORE the `last12Months` window — months 13-24 back — with the same availability and geography caveats as `previousVolume` (NMLS 7206: 1,295 → 550). For production INSIDE the geography this request names, read `scopedVolume`/`scopedUnits` on the same row, and sort by them to rank originators by it. `POST /v1/originators/{nmlsId}/breakdowns/counties` (or `/cities`, `/states`, `/zip-codes`) breaks ONE originator's production out by market.","nullable":true,"type":"number"},"previousVolume":{"description":"The originator's TOTAL dollar production in the 12 months BEFORE the `last12Months` window — i.e. months 13-24 back. Pair it with `volume` for a true trailing year-over-year change (NMLS 7206: $855,758,492 → $440,740,230, −48.5%). Substituting calendar years answers a DIFFERENT question and disagrees materially — 2024 vs 2025 for the same originator reads −39.6%, nine points off — because a calendar year is not a trailing window and the current one is only partly elapsed. ABSENT, not zero, on any `period` other than `last12Months`: no other window has a containing block measured in the index, and a zero would read as 'produced nothing' rather than 'not available here'. For production INSIDE the geography this request names, read `scopedVolume`/`scopedUnits` on the same row, and sort by them to rank originators by it. `POST /v1/originators/{nmlsId}/breakdowns/counties` (or `/cities`, `/states`, `/zip-codes`) breaks ONE originator's production out by market.","nullable":true,"type":"number"},"purchaseShare":{"description":"Purchase loans as a 0–100 percent of the originator's period loan COUNT — the value `sort: [{field: \"purchaseShare\"}]` orders by. `null` when the originator wrote no purchase loans in the period (sorts as 0).","example":72.5,"nullable":true,"type":"number"},"purchaseUnits":{"nullable":true,"type":"number"},"purchaseVolume":{"nullable":true,"type":"number"},"refinanceShare":{"description":"Refinance loans as a 0–100 percent of the originator's period loan COUNT — the value `sort: [{field: \"refinanceShare\"}]` orders by. `null` when none (sorts as 0).","example":18.2,"nullable":true,"type":"number"},"refinanceUnits":{"nullable":true,"type":"number"},"refinanceVolume":{"nullable":true,"type":"number"},"regulators":{"description":"Distinct state regulators across the originator's sponsorships, historical included.","items":{"type":"string"},"nullable":true,"type":"array"},"scopedUnits":{"description":"The originator's loan count INSIDE the geography this request names, on the same basis as `scopedVolume`. Sortable. A single positive `footprint` market (city / county / state / zip, never `lender`) scopes it too; a negated, any-market (`dimension` only) or multi-entry footprint names no single place. When the request names no geography — or names one only inside an `or` group or a negation — the scope is everywhere, and this is identical to the unscoped figure beside it. Reconciles with `POST /v1/originators/{nmlsId}/markets` for the same geography and period: both are read from the same per-market rollup on the same record.","nullable":true,"type":"number"},"scopedVolume":{"description":"The originator's dollar production INSIDE the geography this request names — what a `state`/`city`/`county`/`zip` filter was almost certainly asking for, and what the sibling `volume` is not. Sort by `scopedVolume` to rank originators by it. A single positive `footprint` market (city / county / state / zip, never `lender`) scopes it too; a negated, any-market (`dimension` only) or multi-entry footprint names no single place. When the request names no geography — or names one only inside an `or` group or a negation — the scope is everywhere, and this is identical to the unscoped figure beside it. Reconciles with `POST /v1/originators/{nmlsId}/markets` for the same geography and period: both are read from the same per-market rollup on the same record.","nullable":true,"type":"number"},"state":{"description":"Primary market state: the state with the most loan volume in the selected period (production geography, not the office). Not a sort axis; sort by `officeState` to order by state.","nullable":true,"type":"string"},"tenureMonths":{"description":"Whole months at the current employer, from `companyStartDate`, as of the last weekly registration refresh. The value the `timeAtCompanyMonths` filter matches.","nullable":true,"type":"number"},"units":{"description":"The originator's TOTAL loan count for the selected period across ALL markets — NOT scoped to any geographic filter in this request, exactly as described on `volume`. For production INSIDE the geography this request names, read `scopedVolume`/`scopedUnits` on the same row, and sort by them to rank originators by it. `POST /v1/originators/{nmlsId}/breakdowns/counties` (or `/cities`, `/states`, `/zip-codes`) breaks ONE originator's production out by market.","nullable":true,"type":"number"},"vaPct":{"nullable":true,"type":"number"},"volume":{"description":"The originator's TOTAL dollar production for the selected period across ALL markets — NOT scoped to any geographic filter (`state`/`city`/`county`/`countyFips`/`zip`/`zipCode`) in this request. Those filters select WHICH originators are returned — they produced at least one loan there — and never change WHAT is summed here. Since the list sorts by `volume` descending by default, a geo-filtered search ranks originators by NATIONAL production, so the top row can be many times larger than that originator's production inside the filtered area. For production INSIDE the geography this request names, read `scopedVolume`/`scopedUnits` on the same row, and sort by them to rank originators by it. `POST /v1/originators/{nmlsId}/breakdowns/counties` (or `/cities`, `/states`, `/zip-codes`) breaks ONE originator's production out by market.","nullable":true,"type":"number"},"yearsInIndustry":{"description":"Years of recorded industry tenure — the value the `yearsInIndustry` filter and sort use. Lifetime, not scoped by `period`.","nullable":true,"type":"number"}},"required":["id"],"type":"object"},"OriginatorSummaryRequest":{"additionalProperties":false,"properties":{"advancedFilters":{"$ref":"#/components/schemas/FilterNode"},"filters":{"$ref":"#/components/schemas/FilterNode"},"flatFilters":{"additionalProperties":false,"properties":{"borrowerStatus":{"$ref":"#/components/schemas/LoanBorrowerStatusFilterValue"},"broker":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Broker shop NMLS id (digits only). A broker is a company — resolve a broker name to its NMLS id via instantSearch (or listCompanies)."}]},"buyerEntityType":{"$ref":"#/components/schemas/BooleanFilterValue"},"city":{"$ref":"#/components/schemas/TextFilterValue"},"conforming":{"$ref":"#/components/schemas/BooleanFilterValue"},"county":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"County name (e.g. \"Broward\") or 5-digit FIPS code. Names resolve to FIPS server-side; include a `state` filter to disambiguate."}]},"currentBalance":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Estimated remaining principal balance (~19% populated). Approximate current equity as `homeValue` (AVM) minus this."}]},"employer":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Employer/company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"equity":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Point-in-time equity recorded on the loan (sparse, ~10%). NOT a live current-equity figure. For HELOC/cash-out targeting on up-to-date equity, use properties search (listProperties) instead — its equity is far better populated and current."}]},"excludeBroker":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans brokered by this broker-shop NMLS id (digits only) — the inverse of `broker`."}]},"excludeCity":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this city — the inverse of `city`."}]},"excludeLender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans from this lender ID (\"everyone but X\") — the inverse of `lender`, same id contract (resolve via instantSearch/listLenders). Loans with no lender stay in the results."}]},"excludeLoanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans funded by this company NMLS id (digits only) — the inverse of `loanCompany`."}]},"excludeLoanType":{"$ref":"#/components/schemas/LoanTypeExcludeFilterValue"},"excludeOriginator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans with this originator NMLS id (digits only) — the inverse of `originator`. Common for 'everyone but my own shop' lists."}]},"excludeState":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this state (2-letter code, e.g. \"CA\") — the inverse of `state`. For \"everywhere but this state\" lists."}]},"excludeTransactionType":{"$ref":"#/components/schemas/LoanTransactionTypeExcludeFilterValue"},"excludeZipCode":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this ZIP code — the inverse of `zipCode`."}]},"fips":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exact 5-digit county FIPS code (no name resolution) — the code-only escape hatch alongside `county`."}]},"geoPoint":{"$ref":"#/components/schemas/GeoFilterValue"},"homeValue":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"AVM (automated valuation) at the linked property (~26%, MLS-linked). Pair with `currentBalance` to approximate current equity."}]},"includeUnknownOriginator":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Include loans that have no originator NMLS id. Omitted/false (default): such loans are excluded — the vast majority are pre-2016 public records with no linkable originator. true: include them. Note that the default scopes results to loans with a known originator (~2016+ recordings)."}]},"interestRate":{"$ref":"#/components/schemas/NumericFilterValue"},"lender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender ID — the normalized lender-dictionary key, NOT a fuzzy name match. Resolve a lender via instantSearch (or listLenders) and pass the `id` it returns (e.g. \"mortgage_rocket\" or \"mortgage rocket\"). Underscores and letter case are normalized, so either id surface works. A stored normalized lender name (what the `slice: \"lender\"` chart buckets emit) is also accepted, so a chart bucket key filters directly. A value that is neither returns 400 rather than silently matching nothing — to search by lender NAME, use `lenderName`."}]},"lenderName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender name as recorded on the loan document — fuzzy, all-terms match (e.g. \"Fifth Third\"). The name counterpart to the exact-id `lender` filter; use `lender` when you have a resolved id, and this when you only have a name."}]},"loanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Funding/loan company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"loanType":{"$ref":"#/components/schemas/LoanTypeFilterValue"},"ltvAtOrigination":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Loan-to-value at ORIGINATION (sparse), as a PERCENT on a 0-100 scale (`80` = 80% LTV; values above 100 are real underwater loans). This is not a current LTV — there is no stored current-LTV field on loans."}]},"mode":{"enum":["and","or"],"type":"string"},"mortgageAmount":{"$ref":"#/components/schemas/NumericFilterValue"},"mortgageDate":{"$ref":"#/components/schemas/DateFilterValue"},"originator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Loan originator NMLS id (digits only). To search by name use `originatorName`, or resolve a name to its id via instantSearch."}]},"originatorName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"deprecated":true,"description":"DEPRECATED — fuzzy name matching is unreliable (same originator can return wildly different counts by name string). Resolve the loan officer via instantSearch and filter by `originator` (exact NMLS id) instead. Still functional for now."}]},"propertyId":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Parcel id — returns every loan recorded against one property. Pass the same string this endpoint returns as `mmPropertyId` on a loan row, or the `mmPropertyId` of a property record.\n\nThis is the parcel's FULL recorded loan history, which is deliberately wider than the loans embedded on a property record: that embed is a snapshot of what is still owed (up to five currently-active loans), so paid-off mortgages are absent from it and present here.\n\nMulti-unit caveat: loans carry a unit-blind parcel id, so for one unit of a multi-unit building this selects every unit in the building, not that unit alone."}]},"saleDate":{"$ref":"#/components/schemas/DateFilterValue"},"salePrice":{"$ref":"#/components/schemas/NumericFilterValue"},"state":{"$ref":"#/components/schemas/TextFilterValue"},"transactionType":{"$ref":"#/components/schemas/LoanTransactionTypeFilterValue"},"zip":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Alias of `zipCode` — same ZIP filter, accepted for cross-entity key parity."}]},"zipCode":{"$ref":"#/components/schemas/TextFilterValue"}},"type":"object"},"nmlsId":{"type":"string"},"nmlsIds":{"items":{"type":"string"},"type":"array"},"period":{"$ref":"#/components/schemas/Period"}},"type":"object"},"OriginatorTimeSeriesRequest":{"additionalProperties":false,"properties":{"advancedFilters":{"$ref":"#/components/schemas/FilterNode"},"filters":{"$ref":"#/components/schemas/FilterNode"},"flatFilters":{"additionalProperties":false,"properties":{"borrowerStatus":{"$ref":"#/components/schemas/LoanBorrowerStatusFilterValue"},"broker":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Broker shop NMLS id (digits only). A broker is a company — resolve a broker name to its NMLS id via instantSearch (or listCompanies)."}]},"buyerEntityType":{"$ref":"#/components/schemas/BooleanFilterValue"},"city":{"$ref":"#/components/schemas/TextFilterValue"},"conforming":{"$ref":"#/components/schemas/BooleanFilterValue"},"county":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"County name (e.g. \"Broward\") or 5-digit FIPS code. Names resolve to FIPS server-side; include a `state` filter to disambiguate."}]},"currentBalance":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Estimated remaining principal balance (~19% populated). Approximate current equity as `homeValue` (AVM) minus this."}]},"employer":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Employer/company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"equity":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Point-in-time equity recorded on the loan (sparse, ~10%). NOT a live current-equity figure. For HELOC/cash-out targeting on up-to-date equity, use properties search (listProperties) instead — its equity is far better populated and current."}]},"excludeBroker":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans brokered by this broker-shop NMLS id (digits only) — the inverse of `broker`."}]},"excludeCity":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this city — the inverse of `city`."}]},"excludeLender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans from this lender ID (\"everyone but X\") — the inverse of `lender`, same id contract (resolve via instantSearch/listLenders). Loans with no lender stay in the results."}]},"excludeLoanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans funded by this company NMLS id (digits only) — the inverse of `loanCompany`."}]},"excludeLoanType":{"$ref":"#/components/schemas/LoanTypeExcludeFilterValue"},"excludeOriginator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans with this originator NMLS id (digits only) — the inverse of `originator`. Common for 'everyone but my own shop' lists."}]},"excludeState":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this state (2-letter code, e.g. \"CA\") — the inverse of `state`. For \"everywhere but this state\" lists."}]},"excludeTransactionType":{"$ref":"#/components/schemas/LoanTransactionTypeExcludeFilterValue"},"excludeZipCode":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exclude loans in this ZIP code — the inverse of `zipCode`."}]},"fips":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Exact 5-digit county FIPS code (no name resolution) — the code-only escape hatch alongside `county`."}]},"geoPoint":{"$ref":"#/components/schemas/GeoFilterValue"},"homeValue":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"AVM (automated valuation) at the linked property (~26%, MLS-linked). Pair with `currentBalance` to approximate current equity."}]},"includeUnknownOriginator":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Include loans that have no originator NMLS id. Omitted/false (default): such loans are excluded — the vast majority are pre-2016 public records with no linkable originator. true: include them. Note that the default scopes results to loans with a known originator (~2016+ recordings)."}]},"interestRate":{"$ref":"#/components/schemas/NumericFilterValue"},"lender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender ID — the normalized lender-dictionary key, NOT a fuzzy name match. Resolve a lender via instantSearch (or listLenders) and pass the `id` it returns (e.g. \"mortgage_rocket\" or \"mortgage rocket\"). Underscores and letter case are normalized, so either id surface works. A stored normalized lender name (what the `slice: \"lender\"` chart buckets emit) is also accepted, so a chart bucket key filters directly. A value that is neither returns 400 rather than silently matching nothing — to search by lender NAME, use `lenderName`."}]},"lenderName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender name as recorded on the loan document — fuzzy, all-terms match (e.g. \"Fifth Third\"). The name counterpart to the exact-id `lender` filter; use `lender` when you have a resolved id, and this when you only have a name."}]},"loanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Funding/loan company NMLS id (digits only). Resolve a company name to its NMLS id via instantSearch."}]},"loanType":{"$ref":"#/components/schemas/LoanTypeFilterValue"},"ltvAtOrigination":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Loan-to-value at ORIGINATION (sparse), as a PERCENT on a 0-100 scale (`80` = 80% LTV; values above 100 are real underwater loans). This is not a current LTV — there is no stored current-LTV field on loans."}]},"mode":{"enum":["and","or"],"type":"string"},"mortgageAmount":{"$ref":"#/components/schemas/NumericFilterValue"},"mortgageDate":{"$ref":"#/components/schemas/DateFilterValue"},"originator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Loan originator NMLS id (digits only). To search by name use `originatorName`, or resolve a name to its id via instantSearch."}]},"originatorName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"deprecated":true,"description":"DEPRECATED — fuzzy name matching is unreliable (same originator can return wildly different counts by name string). Resolve the loan officer via instantSearch and filter by `originator` (exact NMLS id) instead. Still functional for now."}]},"propertyId":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Parcel id — returns every loan recorded against one property. Pass the same string this endpoint returns as `mmPropertyId` on a loan row, or the `mmPropertyId` of a property record.\n\nThis is the parcel's FULL recorded loan history, which is deliberately wider than the loans embedded on a property record: that embed is a snapshot of what is still owed (up to five currently-active loans), so paid-off mortgages are absent from it and present here.\n\nMulti-unit caveat: loans carry a unit-blind parcel id, so for one unit of a multi-unit building this selects every unit in the building, not that unit alone."}]},"saleDate":{"$ref":"#/components/schemas/DateFilterValue"},"salePrice":{"$ref":"#/components/schemas/NumericFilterValue"},"state":{"$ref":"#/components/schemas/TextFilterValue"},"transactionType":{"$ref":"#/components/schemas/LoanTransactionTypeFilterValue"},"zip":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Alias of `zipCode` — same ZIP filter, accepted for cross-entity key parity."}]},"zipCode":{"$ref":"#/components/schemas/TextFilterValue"}},"type":"object"},"interval":{"$ref":"#/components/schemas/Interval"},"measure":{"$ref":"#/components/schemas/Measure"},"nmlsId":{"type":"string"},"nmlsIds":{"items":{"type":"string"},"type":"array"},"period":{"$ref":"#/components/schemas/Period"},"segment":{"$ref":"#/components/schemas/OriginatorSegment"}},"type":"object"},"OriginatorTransactionMixFilter":{"description":"Transaction-type bands, same rules as `productMix`: `[{transactionType:\"purchase\", minShare:60}]` = purchases ≥ 60% of period volume.","items":{"additionalProperties":false,"properties":{"basis":{"description":"`volume` (default) or `units` (loan count).","enum":["volume","units"],"type":"string"},"maxShare":{"description":"Upper bound, 0–100. No bucket = 0% (passes).","example":60,"maximum":100,"minimum":0,"type":"number"},"minShare":{"description":"Lower bound, 0–100 percent of the period book.","example":25,"maximum":100,"minimum":0,"type":"number"},"transactionType":{"enum":["purchase","refinance","construction","equity","UNKNOWN"],"type":"string"},"volume":{"additionalProperties":false,"description":"Dollar volume of this type in the period, `{gte, lte}`. Needs the bucket (no loans of the type fails).","properties":{"gte":{"minimum":0,"type":"number"},"lte":{"minimum":0,"type":"number"}},"type":"object"}},"required":["transactionType"],"type":"object"},"maxItems":10,"minItems":1,"type":"array"},"OriginatorTransactionTypeFilterValue":{"anyOf":[{"description":"One of (case-insensitive): purchase, refinance, construction, equity, UNKNOWN","enum":["purchase","refinance","construction","equity","UNKNOWN"],"type":"string"},{"description":"Match any of these values","items":{"description":"One of (case-insensitive): purchase, refinance, construction, equity, UNKNOWN","enum":["purchase","refinance","construction","equity","UNKNOWN"],"type":"string"},"type":"array"},{"description":"Fuzzy text match","properties":{"match":{"type":"string"}},"required":["match"],"type":"object"},{"nullable":true}]},"Pagination":{"properties":{"cursor":{"description":"Opaque cursor from previous response for next page","type":"string"},"size":{"description":"Page size (1-100, default 25)","example":25,"maximum":100,"minimum":1,"type":"integer"}},"type":"object"},"PayloadTooLarge":{"properties":{"error":{"type":"string"},"limit":{"type":"number"},"size":{"type":"number"}},"required":["error","size","limit"],"type":"object"},"Period":{"description":"Pre-aggregated period block. Rolling windows (last30Days, last60Days, last90Days, previousMonth, currentMonth) are NOT accepted here and return 400; they are supported on the loans, sales and market endpoints (list, count, breakdowns, analytics summary / time-series / chart) (see `DatedPeriod`).","enum":["2017","2018","2019","2020","2021","2022","2023","2024","2025","2026","last3Months","last6Months","last12Months","last14Months","last16Months","last18Months","last24Months","yearToDate","allTime"],"type":"string"},"PreviewAlertsRequest":{"properties":{"detectors":{"description":"Limit to specific triggers; all six when omitted.","items":{"enum":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan","book_property","book_loan","area_property"],"type":"string"},"type":"array"}},"type":"object"},"PreviewMonitor":{"additionalProperties":false,"properties":{"rules":{"additionalProperties":false,"properties":{"areaRules":{"additionalProperties":false,"properties":{"property":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"maxItems":10,"type":"array"}},"type":"object"},"book":{"additionalProperties":false,"properties":{"loan":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"maxItems":10,"type":"array"},"property":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"maxItems":10,"type":"array"}},"type":"object"},"thresholds":{"items":{"additionalProperties":false,"properties":{"column":{"pattern":"^[a-z_][a-z0-9_]{0,62}$","type":"string"},"on":{"enum":["threshold"],"type":"string"},"op":{"enum":[">=",">","<=","<"],"type":"string"},"value":{"type":"number"}},"required":["on","column","op","value"],"type":"object"},"maxItems":5,"type":"array"}},"type":"object"},"watch":{"additionalProperties":false,"properties":{"inputs":{"additionalProperties":{"nullable":true},"type":"object"},"options":{"additionalProperties":false,"properties":{"epoThresholdDays":{"maximum":3650,"minimum":1,"type":"integer"},"kinds":{"items":{"enum":["past_client_listed","early_payoff_risk","past_client_home","past_client_loan","agent_pending","agent_sale_closed","new_listing","refi_area","area_home","sale_changed","property_changed","loan_changed"],"type":"string"},"maxItems":12,"type":"array"},"refiMarginPoints":{"maximum":5,"minimum":0,"type":"number"},"refiRateThreshold":{"maximum":10,"minimum":0,"type":"number"}},"type":"object"},"template":{"example":"farm-area","maxLength":48,"pattern":"^[a-z0-9]+(-[a-z0-9]+)*$","type":"string"}},"required":["template","inputs"],"type":"object"}},"required":["watch"],"type":"object"},"PropertyAnalyticsFlatFilters":{"additionalProperties":false,"properties":{"absenteeOwner":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Owner's mailing address (street + 5-digit zip, case/punctuation-insensitive) differs from the property's site address — an investor / non-owner-occupied signal. `true` = absentee, `false` = owner mails to the property; parcels with no mailing or site address match neither. Evaluated per candidate document (no stored flag yet), so always pair it with a geography filter (`state`, `county`, `zipCode`, `fips`, a radius) — an unscoped `absenteeOwner` over all parcels may time out."}]},"activeLoanCount":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mortgages believed to still be outstanding (e.g. `{lte: 0}` for parcels with none). `{lte: 0}` alone is NOT a free-and-clear filter: it also matches recently-sold parcels whose new mortgage has not been recorded yet. Pair it with `preSaleLoanCount: {lte: 0}` for parcels we can actually verify."}]},"address":{"$ref":"#/components/schemas/TextFilterValue"},"affordableHousingTract":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Parcel sits in a qualified census tract for affordable-housing programs (17,603,810 parcels). Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"agentUid":{"$ref":"#/components/schemas/TextFilterValue"},"apn":{"$ref":"#/components/schemas/TextFilterValue"},"avmConfidence":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Confidence in the value estimate, as a 50–100 score (e.g. `{gte: 90}` for high-confidence estimates only). NOT a fraction — `{gte: 0.9}` matches every scored parcel, not the top decile."}]},"avmValue":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Automated value estimate for the parcel, in whole dollars (e.g. `{gte: 500000}`). ~77% coverage. Matches the `avm.mid` value on the response."}]},"beds":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Bedroom count (e.g. `{lte: 2}` for starter homes). ~46% coverage — on the rest the bedroom count was never recorded, which is NOT the same as a parcel with no bedrooms and NOT the same as a parcel with no assessor record: 15.6M of them do carry a recorded bath count and floor area. Unrecorded parcels are EXCLUDED by default; pass `includeNulls: true` to add them back. `beds: 0` matches nothing (an unrecorded count is not a count of zero, and a genuine studio is indistinguishable from it), and the response returns `null` rather than `0`."}]},"borrowerStatus":{"$ref":"#/components/schemas/PropertyBorrowerStatusFilterValue"},"brokerNmls":{"$ref":"#/components/schemas/TextFilterValue"},"city":{"$ref":"#/components/schemas/TextFilterValue"},"companyNmls":{"$ref":"#/components/schemas/TextFilterValue"},"county":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"County, as a 5-digit FIPS code (e.g. `06037`). Canonical key for the county dimension; `fips` is the exact-code alias kept for back-compat."}]},"difficultDevelopmentArea":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Parcel sits in a HUD-designated difficult development area (30,643,419 parcels). Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"distressedTract":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Parcel sits in a distressed-or-underserved nonmetropolitan middle-income tract (13,289,914 parcels). Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"equity":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Estimated equity, in whole dollars (e.g. `{gte: 250000}`). Negative values are genuine underwater parcels. Derived from the value estimate minus outstanding loan balances, so it inherits their coverage (~77%) AND their gaps: on a parcel whose mortgage is missing from the record there is nothing to subtract, so this returns the full value estimate. Pair a high-equity range with `preSaleLoanCount: {lte: 0}` to drop those."}]},"equityPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Estimated equity as a FRACTION of the value estimate, where `1` = the whole value and `0.5` = half. Pass `{gte: 0.5}` for 50%-or-more equity — `{gte: 50}` is not a synonym and matches ZERO parcels, since no value exceeds 1. Negative values are genuine underwater parcels. Note the contrast with `loanLtv`, which takes whole percents. CAUTION: `1` is not proof a parcel is owned free and clear — it is also what a recently-sold parcel returns when the buyer's new mortgage has not been recorded yet, because the calculation subtracts nothing. Add `preSaleLoanCount: {lte: 0}` to restrict to parcels whose position we can actually verify."}]},"fips":{"$ref":"#/components/schemas/TextFilterValue"},"floodHazardTract":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Parcel sits in a FEMA special flood hazard area (4,675,160 parcels). `tractFloodZone` gives the specific zone code. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"foreclosureDate":{"allOf":[{"$ref":"#/components/schemas/DateFilterValue"},{"description":"Recording date of the most recent foreclosure notice on the parcel (e.g. `{gte: \"2025-01-01\"}`). Parcels with no notice are excluded. Pair with `foreclosureStage`, e.g. `{foreclosureStage: \"ND\", foreclosureDate: {gte: \"2025-01-01\"}}`."}]},"foreclosureStage":{"$ref":"#/components/schemas/PropertyForeclosureStageFilterValue"},"foreclosureStatus":{"$ref":"#/components/schemas/PropertyForeclosureStatusFilterValue"},"geoBounds":{"allOf":[{"$ref":"#/components/schemas/GeoBoundsFilterValue"},{"description":"Map viewport `{north, south, east, west}` in degrees: only parcels inside the box. `west` greater than `east` crosses the antimeridian. Unlike `geoPoint` (a radius) this is the shape a map reports."}]},"geoPoint":{"$ref":"#/components/schemas/GeoFilterValue"},"lastSalePrice":{"$ref":"#/components/schemas/NumericFilterValue"},"lenderNmls":{"$ref":"#/components/schemas/TextFilterValue"},"loNmls":{"$ref":"#/components/schemas/TextFilterValue"},"loanCount":{"$ref":"#/components/schemas/NumericFilterValue"},"lotSquareFeet":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Lot size in square feet (e.g. `{gte: 5000}`). ~85% coverage; unmeasured parcels are excluded by default — pass `includeNulls: true` to add them back. `lotSquareFeet: 0` matches nothing (the response returns `null`)."}]},"lowModIncomeTract":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Parcel sits in a low- or moderate-income tract under the Community Reinvestment Act (34,010,153 parcels). `tractIncomeLevel` is the four-way form of the same classification. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"majorityMinorityTract":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Parcel sits in a majority-minority tract (38,745,783 parcels). Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"milesToCollege":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Straight-line distance from the parcel to the nearest college, in miles. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"milesToSchool":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Straight-line distance from the parcel to the nearest school, in miles. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"milesToWorship":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Straight-line distance from the parcel to the nearest place of worship, in miles. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"mode":{"enum":["and","or"],"type":"string"},"mortgageBalance":{"$ref":"#/components/schemas/NumericFilterValue"},"opportunityZone":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Parcel sits in a federally designated Opportunity Zone tract (10,277,168 parcels). Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"ownerName":{"$ref":"#/components/schemas/TextFilterValue"},"ownerOccupancy":{"$ref":"#/components/schemas/PropertyOwnerOccupancyFilterValue"},"preSaleLoanCount":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mortgages excluded from `activeLoanCount` because the parcel sold after they were recorded — the seller's loan, assumed paid off at closing. Use it to separate the two meanings of `activeLoanCount: 0`: `{activeLoanCount: {lte: 0}, preSaleLoanCount: {lte: 0}}` returns parcels where nothing was excluded, so the zero is backed by the record; `{activeLoanCount: {lte: 0}, preSaleLoanCount: {gte: 1}}` returns the parcels where it is not. On its own a non-zero value is unremarkable — most recently-sold parcels have one and also carry a current mortgage."}]},"ruralTract":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Parcel sits in a rural tract (29,289,319 parcels). Thinner coverage than the other flags — stamped on 111.9M of 161.1M parcels, and a parcel with no value is dropped by either `true` or `false`. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"saleCount":{"$ref":"#/components/schemas/NumericFilterValue"},"salePropensity":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Likelihood the parcel sells in the near term, as a 0–100 score (e.g. `{gte: 80}` for the most likely to sell). NOT a fraction — `{gte: 0.8}` matches nearly every scored parcel. `salePropensityCategory` is the bucketed form of the same signal."}]},"salePropensityCategory":{"$ref":"#/components/schemas/PropertySalePropensityCategoryFilterValue"},"squareFeet":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Building area in square feet (e.g. `{gte: 1500}`). ~68% coverage; unmeasured parcels are excluded by default — pass `includeNulls: true` to add them back. `squareFeet: 0` matches nothing (the response returns `null`)."}]},"state":{"$ref":"#/components/schemas/TextFilterValue"},"tractApplications":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mortgage applications reported in the tract over the year, as a count. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"tractAsianPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Asian (non-Hispanic) share of the tract's population, 0-100. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"tractBlackPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Black (non-Hispanic) share of the tract's population, 0-100. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"tractCountyCode":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Three-digit county FIPS code of the tract (county-within-state, NOT the 5-digit `county`/`fips` key). Pass with `tractStateCode` and `tractId` to pin one neighborhood. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"tractDenialRate":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Share of the tract's mortgage applications that were denied, 0-100 (e.g. `{gte: 25}` for 25%+). Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"tractFamilyIncome":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Median family income of the tract, in whole dollars (e.g. `{lte: 60000}`). Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"tractFloodZone":{"$ref":"#/components/schemas/PropertyTractFloodZoneFilterValue"},"tractHispanicPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Hispanic or Latino share of the tract's population, 0-100. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"tractHomeownershipRate":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Owner-occupied share of the tract's housing units, 0-100. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"tractHouseholdIncome":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Median household income of the tract, in whole dollars (e.g. `{gte: 120000}`). Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"tractId":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Six-digit tract code. A tract code REPEATS in every state and county, so this only identifies a neighborhood when passed ALONGSIDE `tractStateCode` and `tractCountyCode` — on its own it matches roughly 75× too many parcels. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"tractIncomeLevel":{"$ref":"#/components/schemas/PropertyTractIncomeLevelFilterValue"},"tractIncomeVsMetroPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Tract income relative to its metro area, where `100` is parity — `{lt: 80}` is the CRA low/moderate band and values legitimately exceed 100 (observed up to 412). NOT a 0-100 share. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"tractLoanVolume":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mortgage dollar volume reported in the tract over the year, in whole dollars. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"tractMedianAge":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Median age of the tract's population, in years. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"tractMedianHomeValue":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Median home value across the tract, in whole dollars. A neighborhood statistic — the parcel's own value estimate is `avmValue`. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"tractMinorityPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Non-white share of the tract's population, 0-100 (e.g. `{gte: 50}` for majority-minority; `majorityMinorityTract` is the flag form). Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"tractOriginations":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mortgage originations reported in the tract over the year, as a count. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"tractPopulation":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Total population of the tract. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"tractPovertyRate":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Share of the tract's population below the poverty line, 0-100 (e.g. `{gte: 20}` for 20%+). Pass whole percents — `{gte: 0.2}` means 0.2% and matches almost every tract. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"tractRuralGradient":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Remoteness of the tract on an ORDINAL 1-10 scale (1 = metropolitan core, 10 = most remote). This is a code, not a percent — `{gte: 7}` selects the most remote tracts. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"tractStateCode":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Two-digit state FIPS code of the tract. Pass with `tractCountyCode` and `tractId` to pin one neighborhood. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"tractWhiteNonHispanicPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"White (non-Hispanic) share of the tract's population, 0-100. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"usdaEligibleTract":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Parcel sits in a tract eligible for USDA rural housing programs (70,637,816 parcels). Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"yearBuilt":{"$ref":"#/components/schemas/NumericFilterValue"},"zip":{"$ref":"#/components/schemas/TextFilterValue"},"zipCode":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"ZIP code. Canonical key (matches loans `zipCode` and the response DTO); `zip` is a legacy alias kept for back-compat."}]}},"type":"object"},"PropertyAnalyticsResponse":{"properties":{"avgAvmValue":{"description":"Average AVM value","nullable":true,"type":"number"},"avgEquity":{"description":"Average estimated equity. Excludes values outside -2,000,000 to 50,000,000 — the source encodes unknown values as an out-of-range fill, and averaging them raw is wrong by orders of magnitude. The bound is applied before the metric and is not part of the public filter surface, so an equivalent range filter will not reproduce this figure exactly.","nullable":true,"type":"number"},"excluded":{"description":"Per-measure count of parcels this query's sentinel guard excluded — parcels that carry the field but whose value is an out-of-range fill. Compare against `totalCount` to see what share of the matched population the figure was computed over. Absent for `avgAvmValue`, which is unguarded.","properties":{"avgEquity":{"type":"number"}},"type":"object"},"pctInForeclosure":{"nullable":true,"type":"number"},"totalCount":{"type":"number"}},"required":["totalCount","avgAvmValue","avgEquity","pctInForeclosure"],"type":"object"},"PropertyAvm":{"nullable":true,"properties":{"confidence":{"description":"0–100","nullable":true,"type":"number"},"high":{"nullable":true,"type":"number"},"low":{"nullable":true,"type":"number"},"mid":{"nullable":true,"type":"number"}},"required":["low","mid","high","confidence"],"type":"object"},"PropertyBorrower":{"properties":{"firstName":{"nullable":true,"type":"string"},"lastName":{"nullable":true,"type":"string"}},"required":["firstName","lastName"],"type":"object"},"PropertyBorrowerStatusFilterValue":{"anyOf":[{"description":"One of (case-insensitive): no_active_loans, Current, Current_via_ALI","enum":["no_active_loans","Current","Current_via_ALI"],"type":"string"},{"description":"Match any of these values","items":{"description":"One of (case-insensitive): no_active_loans, Current, Current_via_ALI","enum":["no_active_loans","Current","Current_via_ALI"],"type":"string"},"type":"array"},{"description":"Fuzzy text match","properties":{"match":{"type":"string"}},"required":["match"],"type":"object"},{"nullable":true}]},"PropertyChartRequest":{"additionalProperties":false,"properties":{"advancedFilters":{"$ref":"#/components/schemas/FilterNode"},"filters":{"$ref":"#/components/schemas/FilterNode"},"flatFilters":{"$ref":"#/components/schemas/PropertyAnalyticsFlatFilters"},"measure":{"$ref":"#/components/schemas/ChartMeasure"},"slice":{"$ref":"#/components/schemas/PropertyChartSlice"}},"required":["slice"],"type":"object"},"PropertyChartSlice":{"enum":["city","county","state","zipCode","zip","foreclosureStatus","foreclosureStage","borrowerStatus","salePropensityCategory"],"type":"string"},"PropertyCommunityLending":{"description":"Community Lending — the profile of the neighborhood (U.S. Census tract) this parcel sits in: program designations, income and affordability, the population profile, the local mortgage market, remoteness and proximity. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100. Two fields are deliberately NOT 0-100: `tractIncomeVsMetroPct` is a ratio where 100 means parity with the metro (it exceeds 100), and `tractRuralGradient` is an ordinal 1-10 code. `null` — not an all-null object — for the roughly 6% of parcels that resolve to no neighborhood. Every field here is also a filter key on `POST /properties`.","nullable":true,"properties":{"affordableHousingTract":{"description":"A qualified neighborhood for affordable-housing programs. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"boolean"},"difficultDevelopmentArea":{"description":"A HUD-designated difficult development area. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"boolean"},"distressedTract":{"description":"A distressed-or-underserved nonmetropolitan middle-income neighborhood. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"boolean"},"floodHazardTract":{"description":"In a FEMA special flood hazard area. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"boolean"},"lowModIncomeTract":{"description":"A low- or moderate-income neighborhood under the Community Reinvestment Act. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"boolean"},"majorityMinorityTract":{"description":"A majority-minority neighborhood. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"boolean"},"milesToCollege":{"description":"Distance to the nearest college, in miles. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"milesToSchool":{"description":"Distance to the nearest school, in miles. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"milesToWorship":{"description":"Distance to the nearest place of worship, in miles. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"opportunityZone":{"description":"In a federally designated Opportunity Zone. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"boolean"},"ruralTract":{"description":"A rural neighborhood. Thinner coverage than the other designations, so null is common. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"boolean"},"tractApplications":{"description":"Mortgage applications reported over the year. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"tractAsianPct":{"description":"Asian (non-Hispanic) share of the population. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"tractBlackPct":{"description":"Black (non-Hispanic) share of the population. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"tractCountyCode":{"description":"Public three-digit county-within-state code (not the five-digit `fips`). Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"string"},"tractDenialRate":{"description":"Share of mortgage applications that were denied. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"tractFamilyIncome":{"description":"Median family income, in whole dollars. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"tractFloodZone":{"description":"FEMA flood-zone code (e.g. `AE`). Null means no special flood hazard area on file. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"string"},"tractHispanicPct":{"description":"Hispanic or Latino share of the population. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"tractHomeownershipRate":{"description":"Owner-occupied share of housing units. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"tractHouseholdIncome":{"description":"Median household income, in whole dollars. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"tractId":{"description":"Public six-digit neighborhood code. It repeats in every state and county, so it identifies a neighborhood only together with `tractStateCode` and `tractCountyCode`. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"string"},"tractIncomeLevel":{"description":"Relative-income classification of the neighborhood: low, moderate, middle or upper. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","enum":["low","moderate","middle","upper",null],"nullable":true,"type":"string"},"tractIncomeVsMetroPct":{"description":"Neighborhood income relative to its metro area, where 100 is parity. Legitimately exceeds 100 — this is a ratio, not a share. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"tractLoanVolume":{"description":"Mortgage dollar volume reported over the year. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"tractMedianAge":{"description":"Median age, in years. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"tractMedianHomeValue":{"description":"Median home value across the neighborhood, in whole dollars — a neighborhood statistic, not this parcel's value estimate (see `avm`). Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"tractMinorityPct":{"description":"Non-white share of the population. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"tractOriginations":{"description":"Mortgage originations reported over the year. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"tractPopulation":{"description":"Total population. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"tractPovertyRate":{"description":"Share of the population below the poverty line. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"tractRuralGradient":{"description":"Remoteness on an ordinal 1-10 scale (1 = metropolitan core, 10 = most remote). A code, not a percent. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"tractStateCode":{"description":"Public two-digit state code. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"string"},"tractWhiteNonHispanicPct":{"description":"White (non-Hispanic) share of the population. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"number"},"usdaEligibleTract":{"description":"Eligible for USDA rural housing programs. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100.","nullable":true,"type":"boolean"}},"required":["opportunityZone","majorityMinorityTract","lowModIncomeTract","distressedTract","usdaEligibleTract","ruralTract","difficultDevelopmentArea","affordableHousingTract","floodHazardTract","tractIncomeLevel","tractFamilyIncome","tractHouseholdIncome","tractIncomeVsMetroPct","tractPovertyRate","tractMinorityPct","tractPopulation","tractMedianAge","tractMedianHomeValue","tractHomeownershipRate","tractHispanicPct","tractBlackPct","tractAsianPct","tractWhiteNonHispanicPct","tractOriginations","tractApplications","tractLoanVolume","tractDenialRate","tractRuralGradient","tractFloodZone","milesToSchool","milesToCollege","milesToWorship","tractId","tractStateCode","tractCountyCode"],"type":"object"},"PropertyDetail":{"allOf":[{"$ref":"#/components/schemas/PropertySummary"},{"properties":{"communityLending":{"$ref":"#/components/schemas/PropertyCommunityLending"},"enrichment":{"description":"Owner contact enrichment data (included if previously enriched by the authenticated user)","nullable":true,"properties":{"enrichedAt":{"description":"ISO 8601 timestamp","type":"string"},"persons":{"items":{"$ref":"#/components/schemas/SkipTracePerson"},"type":"array"},"source":{"description":"Data source identifier","type":"string"}},"required":["persons","enrichedAt","source"],"type":"object"},"foreclosureDetail":{"nullable":true,"properties":{"beneficiaryLender":{"nullable":true,"type":"string"},"count":{"nullable":true,"type":"number"},"latestCode":{"nullable":true,"type":"string"},"latestDate":{"nullable":true,"type":"string"},"trusteeSaleNumber":{"nullable":true,"type":"string"},"unpaidBalance":{"nullable":true,"type":"number"}},"required":["count","latestCode","latestDate","beneficiaryLender","trusteeSaleNumber","unpaidBalance"],"type":"object"},"owners":{"description":"Every owner of record — `owners[0]` is the same person the flat `ownerName`/`ownerFirstName`/`ownerLastName` fields describe, and the rest are co-owners/co-borrowers. Additive: those three fields are unchanged. `null` (never `[]`) when the parcel has no readable owner.","items":{"$ref":"#/components/schemas/PropertyOwner"},"nullable":true,"type":"array"},"parties":{"$ref":"#/components/schemas/PropertyParties"},"position":{"properties":{"activeOverFive":{"nullable":true,"type":"boolean"},"loanCountActive":{"nullable":true,"type":"number"},"loanCountAll":{"nullable":true,"type":"number"},"loanCountPaidOff":{"nullable":true,"type":"number"},"loanCountPreSale":{"description":"Mortgages excluded because the parcel sold after they were recorded. Same value as the summary's `preSaleLoanCount`. These four counts partition `loanCountAll`.","nullable":true,"type":"number"},"loanCountReleased":{"description":"Mortgages with a recorded release — documented evidence of a payoff, unlike `loanCountPreSale`.","nullable":true,"type":"number"},"sumOutstanding":{"nullable":true,"type":"number"}},"required":["loanCountAll","loanCountActive","loanCountPaidOff","loanCountReleased","loanCountPreSale","sumOutstanding","activeOverFive"],"type":"object"},"relationships":{"$ref":"#/components/schemas/PropertyRelationships"}},"type":"object"}]},"PropertyDetailResponse":{"properties":{"alternates":{"description":"Sibling document `id`s when `ambiguousRef` is true — pass one back as `/{id}` to fetch that exact unit. Absent on an unambiguous lookup.","items":{"type":"string"},"type":"array"},"ambiguousRef":{"description":"`true` only when the id you passed resolved to more than one parcel (a non-unique `mm_property_id` colliding across units). `data` is a deterministic pick (the base parcel); use `alternates` to re-request a specific sibling by its exact `id`. Absent on an unambiguous lookup.","type":"boolean"},"data":{"$ref":"#/components/schemas/PropertyDetail"}},"required":["data"],"type":"object"},"PropertyEnrichment":{"properties":{"enrichedAt":{"description":"ISO 8601 timestamp","type":"string"},"persons":{"items":{"$ref":"#/components/schemas/SkipTracePerson"},"type":"array"},"source":{"description":"Data source identifier","type":"string"}},"required":["persons","enrichedAt","source"],"type":"object"},"PropertyEquity":{"nullable":true,"properties":{"pct":{"description":"Equity as a FRACTION of the value estimate — `1` is the whole value, `0.5` is half. A `1` alongside `activeLoanCountKnown: false` is arithmetic on a missing mortgage, not a free-and-clear parcel.","nullable":true,"type":"number"},"value":{"description":"Estimated equity in whole dollars — the value estimate minus the outstanding balance of the mortgages we know about. It inherits their completeness: when `activeLoanCountKnown` is `false` there is no known balance to subtract, so this equals the full value estimate and should NOT be read as equity.","nullable":true,"type":"number"}},"required":["value","pct"],"type":"object"},"PropertyField":{"enum":["address","city","state","zipCode","zip","apn","fips","ownerName","beds","squareFeet","lotSquareFeet","yearBuilt","avmValue","avmConfidence","equity","equityPct","salePropensity","salePropensityCategory","foreclosureStatus","foreclosureStage","foreclosureDate","borrowerStatus","loanCount","activeLoanCount","mortgageBalance","saleCount","lastSalePrice","loNmls","lenderNmls","companyNmls","brokerNmls","agentUid","loanRecordedDate","loanAmount","loanModeledInterestRate","loanType","loanTransactionType","loanOriginatorName","loanCompanyName","loanLenderName"],"type":"string"},"PropertyFlatFilters":{"additionalProperties":false,"properties":{"absenteeOwner":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Owner's mailing address (street + 5-digit zip, case/punctuation-insensitive) differs from the property's site address — an investor / non-owner-occupied signal. `true` = absentee, `false` = owner mails to the property; parcels with no mailing or site address match neither. Evaluated per candidate document (no stored flag yet), so always pair it with a geography filter (`state`, `county`, `zipCode`, `fips`, a radius) — an unscoped `absenteeOwner` over all parcels may time out."}]},"activeLoanCount":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mortgages believed to still be outstanding (e.g. `{lte: 0}` for parcels with none). `{lte: 0}` alone is NOT a free-and-clear filter: it also matches recently-sold parcels whose new mortgage has not been recorded yet. Pair it with `preSaleLoanCount: {lte: 0}` for parcels we can actually verify."}]},"address":{"$ref":"#/components/schemas/TextFilterValue"},"affordableHousingTract":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Parcel sits in a qualified census tract for affordable-housing programs (17,603,810 parcels). Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"agentId":{"anyOf":[{"minLength":1,"type":"string"},{"items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"}],"description":"Agent id(s) (`GET /v1/agents/{id}`): parcels with a recorded sale by the agent."},"agentUid":{"$ref":"#/components/schemas/TextFilterValue"},"apn":{"$ref":"#/components/schemas/TextFilterValue"},"avmConfidence":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Confidence in the value estimate, as a 50–100 score (e.g. `{gte: 90}` for high-confidence estimates only). NOT a fraction — `{gte: 0.9}` matches every scored parcel, not the top decile."}]},"avmValue":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Automated value estimate for the parcel, in whole dollars (e.g. `{gte: 500000}`). ~77% coverage. Matches the `avm.mid` value on the response."}]},"beds":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Bedroom count (e.g. `{lte: 2}` for starter homes). ~46% coverage — on the rest the bedroom count was never recorded, which is NOT the same as a parcel with no bedrooms and NOT the same as a parcel with no assessor record: 15.6M of them do carry a recorded bath count and floor area. Unrecorded parcels are EXCLUDED by default; pass `includeNulls: true` to add them back. `beds: 0` matches nothing (an unrecorded count is not a count of zero, and a genuine studio is indistinguishable from it), and the response returns `null` rather than `0`."}]},"borrowerStatus":{"$ref":"#/components/schemas/PropertyBorrowerStatusFilterValue"},"brokerNmls":{"$ref":"#/components/schemas/TextFilterValue"},"city":{"$ref":"#/components/schemas/TextFilterValue"},"companyNmls":{"$ref":"#/components/schemas/TextFilterValue"},"county":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"County, as a 5-digit FIPS code (e.g. `06037`). Canonical key for the county dimension; `fips` is the exact-code alias kept for back-compat."}]},"difficultDevelopmentArea":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Parcel sits in a HUD-designated difficult development area (30,643,419 parcels). Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"distressedTract":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Parcel sits in a distressed-or-underserved nonmetropolitan middle-income tract (13,289,914 parcels). Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"equity":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Estimated equity, in whole dollars (e.g. `{gte: 250000}`). Negative values are genuine underwater parcels. Derived from the value estimate minus outstanding loan balances, so it inherits their coverage (~77%) AND their gaps: on a parcel whose mortgage is missing from the record there is nothing to subtract, so this returns the full value estimate. Pair a high-equity range with `preSaleLoanCount: {lte: 0}` to drop those."}]},"equityPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Estimated equity as a FRACTION of the value estimate, where `1` = the whole value and `0.5` = half. Pass `{gte: 0.5}` for 50%-or-more equity — `{gte: 50}` is not a synonym and matches ZERO parcels, since no value exceeds 1. Negative values are genuine underwater parcels. Note the contrast with `loanLtv`, which takes whole percents. CAUTION: `1` is not proof a parcel is owned free and clear — it is also what a recently-sold parcel returns when the buyer's new mortgage has not been recorded yet, because the calculation subtracts nothing. Add `preSaleLoanCount: {lte: 0}` to restrict to parcels whose position we can actually verify."}]},"excludeId":{"description":"Parcel ids to exclude — the inverse of `id`.","items":{"pattern":"^mm_\\S","type":"string"},"maxItems":50000,"minItems":1,"type":"array"},"fips":{"$ref":"#/components/schemas/TextFilterValue"},"floodHazardTract":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Parcel sits in a FEMA special flood hazard area (4,675,160 parcels). `tractFloodZone` gives the specific zone code. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"foreclosureDate":{"allOf":[{"$ref":"#/components/schemas/DateFilterValue"},{"description":"Recording date of the most recent foreclosure notice on the parcel (e.g. `{gte: \"2025-01-01\"}`). Parcels with no notice are excluded. Pair with `foreclosureStage`, e.g. `{foreclosureStage: \"ND\", foreclosureDate: {gte: \"2025-01-01\"}}`."}]},"foreclosureStage":{"$ref":"#/components/schemas/PropertyForeclosureStageFilterValue"},"foreclosureStatus":{"$ref":"#/components/schemas/PropertyForeclosureStatusFilterValue"},"geoBounds":{"allOf":[{"$ref":"#/components/schemas/GeoBoundsFilterValue"},{"description":"Map viewport `{north, south, east, west}` in degrees: only parcels inside the box. `west` greater than `east` crosses the antimeridian. Unlike `geoPoint` (a radius) this is the shape a map reports."}]},"geoPoint":{"$ref":"#/components/schemas/GeoFilterValue"},"id":{"description":"Exact parcel ids (up to 50,000, any-of). A property `id` from the list/search rows (`mm_<fips><apn>|<fips>-<apn>|<unit>`, exactly that parcel) or an `mmPropertyId` (`mm_<fips><apn>`, every unit of the parcel). Must start with `mm_`. ANDed with the other filters, even under `mode: \"or\"`.","items":{"pattern":"^mm_\\S","type":"string"},"maxItems":50000,"minItems":1,"type":"array"},"lastSalePrice":{"$ref":"#/components/schemas/NumericFilterValue"},"lenderNmls":{"$ref":"#/components/schemas/TextFilterValue"},"loNmls":{"$ref":"#/components/schemas/TextFilterValue"},"loanAmount":{"$ref":"#/components/schemas/NumericFilterValue"},"loanBalance":{"$ref":"#/components/schemas/NumericFilterValue"},"loanBorrowerStatus":{"$ref":"#/components/schemas/PropertyLoanBorrowerStatusFilterValue"},"loanCompany":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Per-loan funding-company NMLS id (digits only) on the parcel's loans."}]},"loanCompanyName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Funding-company name on the loan, case-insensitive contains."}]},"loanCompanyOrLender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"NMLS id matched as the loan's funding company OR lender."}]},"loanCount":{"$ref":"#/components/schemas/NumericFilterValue"},"loanExclude":{"additionalProperties":false,"description":"Loan filters to EXCLUDE — each key negated on its own, under the same `loanMatchMode`. With `\"most_recent\"`, `{loanCompanyOrLender: \"3030\"}` keeps parcels whose newest loan is not from 3030 (no-loan parcels included); `{loanRecordedDate: {lt: \"2017-01-01\"}}` drops newest loans recorded before 2017, keeping parcels with no date.","properties":{"loanCompany":{"$ref":"#/components/schemas/TextFilterValue"},"loanCompanyName":{"$ref":"#/components/schemas/TextFilterValue"},"loanCompanyOrLender":{"$ref":"#/components/schemas/TextFilterValue"},"loanOriginator":{"$ref":"#/components/schemas/TextFilterValue"},"loanRecordedDate":{"$ref":"#/components/schemas/DateFilterValue"}},"type":"object"},"loanInterestRate":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Deprecated alias of `loanModeledInterestRate` — a low-biased ModelMatch model that caps near 7%. For the genuine recorded note rate use `recordedInterestRate`."}]},"loanLender":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender ID on the parcel's loans — the normalized lender-dictionary key, NOT the lender name the response shows. Resolve a lender via instantSearch (or listLenders) and pass the `id` it returns (e.g. \"mortgage_rocket\" or \"mortgage rocket\"); the `lenderId` on a parcel's `loans[]` is the same value, so a lender read off a result round-trips here directly. Underscores and letter case are normalized, and the id expands to every stored variant the lender is recorded under. A value that is neither an id nor a stored lender name returns 400 with the closest matches, rather than silently matching nothing — to filter by the lender NAME shown on the parcel, use `loanLenderName`."}]},"loanLenderName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender NAME on the parcel's loans — the counterpart to the exact-id `loanLender`, and the filter that accepts the `lenderName` a parcel's `loans[]` displays (e.g. \"UNION HOME MORTGAGE CORP\"). Case-insensitive, matched against the name recorded on the loan. When the name is one the lender dictionary knows, it also expands to that lender's whole recorded-name family, so a brand name (\"union home mortgage\") selects far more than the one literal string. Never 400s: a name it cannot resolve simply matches the recorded string. The response reports how each value resolved as `lenderNormalizations`."}]},"loanLenderNameContains":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Lender name on the loan, case-insensitive contains (`loanLenderName` is the exact / name-family match)."}]},"loanLtv":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Loan-to-value on the parcel's active loan(s), as WHOLE PERCENTS — `{gte: 40, lte: 50}` means 40%–50% LTV. A fractional range (`{gte: 0.4, lte: 0.5}`) is not a synonym and matches ZERO parcels. ~7% coverage. Careful: the response DTO reports the same measurement as a fraction (`loans[].ltv` of `0.4238` is 42.38% LTV), so a value read off a result must be multiplied by 100 before it can be used here. `equityPct`, by contrast, takes the fraction. Two further limits of the stored value. It SATURATES at 10 and 199 — no parcel stores a ratio outside that range, so `{gte: 200}` matches nothing at all, and the extremes are dominated by parcels whose true ratio was merely clipped to the bound; the response returns those as `null`, but this filter still selects them. And the underlying value is not a dependable per-loan ratio — two thirds of parcels with several mortgages store an identical figure across loans of very different amounts (see `loans[].ltv`, deprecated). For selecting on borrower position prefer `equityPct`, which has neither limitation."}]},"loanMatchMode":{"description":"How the loan-slot filters combine across a parcel's 5 cached loans. `correlated` (default): ONE loan (any slot) must satisfy ALL loan-slot conditions. `most_recent`: only the newest loan (loan_1). `any`: each condition may be satisfied by a different loan. `none`: ignore loan-slot filters. Honored on list, bulk-delivery, and bulk-enrich.","enum":["correlated","most_recent","any","none"],"type":"string"},"loanModeledInterestRate":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Per-loan MODELED rate (`loan_N.modeled_interest_rate`). Low-biased, effectively caps near 7% — not a note rate. Use `recordedInterestRate` for the recorded rate."}]},"loanOriginator":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Per-loan originator NMLS id (digits only) on the parcel's loans. For all-time attribution across the parcel use `loNmls`."}]},"loanOriginatorName":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"deprecated":true,"description":"DEPRECATED — fuzzy name matching is unreliable (same originator can return wildly different counts by name string). Resolve the loan officer via instantSearch and filter by `loanOriginator` (exact NMLS id) instead. Still functional for now."}]},"loanOriginatorNameContains":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Loan officer name on the loan, case-insensitive contains. Prefer `loanOriginator` (NMLS id)."}]},"loanRecordedDate":{"$ref":"#/components/schemas/DateFilterValue"},"loanTransactionType":{"$ref":"#/components/schemas/PropertyLoanTransactionTypeFilterValue"},"loanType":{"$ref":"#/components/schemas/PropertyLoanTypeFilterValue"},"lotSquareFeet":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Lot size in square feet (e.g. `{gte: 5000}`). ~85% coverage; unmeasured parcels are excluded by default — pass `includeNulls: true` to add them back. `lotSquareFeet: 0` matches nothing (the response returns `null`)."}]},"lowModIncomeTract":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Parcel sits in a low- or moderate-income tract under the Community Reinvestment Act (34,010,153 parcels). `tractIncomeLevel` is the four-way form of the same classification. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"majorityMinorityTract":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Parcel sits in a majority-minority tract (38,745,783 parcels). Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"milesToCollege":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Straight-line distance from the parcel to the nearest college, in miles. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"milesToSchool":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Straight-line distance from the parcel to the nearest school, in miles. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"milesToWorship":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Straight-line distance from the parcel to the nearest place of worship, in miles. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"mode":{"enum":["and","or"],"type":"string"},"mortgageBalance":{"$ref":"#/components/schemas/NumericFilterValue"},"opportunityZone":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Parcel sits in a federally designated Opportunity Zone tract (10,277,168 parcels). Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"ownerName":{"$ref":"#/components/schemas/TextFilterValue"},"ownerOccupancy":{"$ref":"#/components/schemas/PropertyOwnerOccupancyFilterValue"},"ownerType":{"anyOf":[{"enum":["entity","trust","individual"],"type":"string"},{"items":{"enum":["entity","trust","individual"],"type":"string"},"minItems":1,"type":"array"}],"description":"Owner vesting type (any-of); `individual` = neither entity nor trust."},"preSaleLoanCount":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mortgages excluded from `activeLoanCount` because the parcel sold after they were recorded — the seller's loan, assumed paid off at closing. Use it to separate the two meanings of `activeLoanCount: 0`: `{activeLoanCount: {lte: 0}, preSaleLoanCount: {lte: 0}}` returns parcels where nothing was excluded, so the zero is backed by the record; `{activeLoanCount: {lte: 0}, preSaleLoanCount: {gte: 1}}` returns the parcels where it is not. On its own a non-zero value is unremarkable — most recently-sold parcels have one and also carry a current mortgage."}]},"programEligibility":{"description":"Restrict to parcels whose value estimate falls within this loan program's county price limit — an eligibility band (value ceiling). Pair with `fips` to resolve the county's limit; with no county context the national baseline applies. Parcels without a value estimate are excluded. This is a price band only — no borrower income, payment, or DTI is considered.","enum":["fha","conforming"],"type":"string"},"recordedInterestRate":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Genuine RECORDED note rate from the parcel's active loan(s) (~7% coverage, concentrated on the most-recent loan). Percent input (e.g. 7 means 7%)."}]},"ruralTract":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Parcel sits in a rural tract (29,289,319 parcels). Thinner coverage than the other flags — stamped on 111.9M of 161.1M parcels, and a parcel with no value is dropped by either `true` or `false`. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"saleCount":{"$ref":"#/components/schemas/NumericFilterValue"},"salePropensity":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Likelihood the parcel sells in the near term, as a 0–100 score (e.g. `{gte: 80}` for the most likely to sell). NOT a fraction — `{gte: 0.8}` matches nearly every scored parcel. `salePropensityCategory` is the bucketed form of the same signal."}]},"salePropensityCategory":{"$ref":"#/components/schemas/PropertySalePropensityCategoryFilterValue"},"squareFeet":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Building area in square feet (e.g. `{gte: 1500}`). ~68% coverage; unmeasured parcels are excluded by default — pass `includeNulls: true` to add them back. `squareFeet: 0` matches nothing (the response returns `null`)."}]},"state":{"$ref":"#/components/schemas/TextFilterValue"},"tractApplications":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mortgage applications reported in the tract over the year, as a count. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"tractAsianPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Asian (non-Hispanic) share of the tract's population, 0-100. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"tractBlackPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Black (non-Hispanic) share of the tract's population, 0-100. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"tractCountyCode":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Three-digit county FIPS code of the tract (county-within-state, NOT the 5-digit `county`/`fips` key). Pass with `tractStateCode` and `tractId` to pin one neighborhood. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"tractDenialRate":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Share of the tract's mortgage applications that were denied, 0-100 (e.g. `{gte: 25}` for 25%+). Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"tractFamilyIncome":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Median family income of the tract, in whole dollars (e.g. `{lte: 60000}`). Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"tractFloodZone":{"$ref":"#/components/schemas/PropertyTractFloodZoneFilterValue"},"tractHispanicPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Hispanic or Latino share of the tract's population, 0-100. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"tractHomeownershipRate":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Owner-occupied share of the tract's housing units, 0-100. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"tractHouseholdIncome":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Median household income of the tract, in whole dollars (e.g. `{gte: 120000}`). Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"tractId":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Six-digit tract code. A tract code REPEATS in every state and county, so this only identifies a neighborhood when passed ALONGSIDE `tractStateCode` and `tractCountyCode` — on its own it matches roughly 75× too many parcels. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"tractIncomeLevel":{"$ref":"#/components/schemas/PropertyTractIncomeLevelFilterValue"},"tractIncomeVsMetroPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Tract income relative to its metro area, where `100` is parity — `{lt: 80}` is the CRA low/moderate band and values legitimately exceed 100 (observed up to 412). NOT a 0-100 share. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"tractLoanVolume":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mortgage dollar volume reported in the tract over the year, in whole dollars. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"tractMedianAge":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Median age of the tract's population, in years. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"tractMedianHomeValue":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Median home value across the tract, in whole dollars. A neighborhood statistic — the parcel's own value estimate is `avmValue`. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"tractMinorityPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Non-white share of the tract's population, 0-100 (e.g. `{gte: 50}` for majority-minority; `majorityMinorityTract` is the flag form). Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"tractOriginations":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Mortgage originations reported in the tract over the year, as a count. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"tractPopulation":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Total population of the tract. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"tractPovertyRate":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Share of the tract's population below the poverty line, 0-100 (e.g. `{gte: 20}` for 20%+). Pass whole percents — `{gte: 0.2}` means 0.2% and matches almost every tract. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"tractRuralGradient":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Remoteness of the tract on an ORDINAL 1-10 scale (1 = metropolitan core, 10 = most remote). This is a code, not a percent — `{gte: 7}` selects the most remote tracts. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"tractStateCode":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Two-digit state FIPS code of the tract. Pass with `tractCountyCode` and `tractId` to pin one neighborhood. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"tractWhiteNonHispanicPct":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"White (non-Hispanic) share of the tract's population, 0-100. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"usdaEligibleTract":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Parcel sits in a tract eligible for USDA rural housing programs (70,637,816 parcels). Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100."}]},"yearBuilt":{"$ref":"#/components/schemas/NumericFilterValue"},"zip":{"$ref":"#/components/schemas/TextFilterValue"},"zipCode":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"ZIP code. Canonical key (matches loans `zipCode` and the response DTO); `zip` is a legacy alias kept for back-compat."}]}},"type":"object"},"PropertyForeclosure":{"properties":{"date":{"description":"Recording date of the most recent foreclosure notice (ISO 8601) — the value the `foreclosureDate` filter matches. Null when the parcel has no notice.","nullable":true,"type":"string"},"matched":{"type":"boolean"},"scheduledAuctionDate":{"nullable":true,"type":"string"},"stage":{"description":"Stage code of the most recent recorded foreclosure notice (e.g. \"ND\", \"NS\") — the value the `foreclosureStage` filter matches. Null when the parcel has no notice.","nullable":true,"type":"string"},"status":{"description":"e.g. \"in_foreclosure\" or \"unknown\"","nullable":true,"type":"string"}},"required":["matched","status","stage","date","scheduledAuctionDate"],"type":"object"},"PropertyForeclosureStageFilterValue":{"anyOf":[{"description":"One of (case-insensitive): AN, CS, JF, ND, NF, NL, NS, NT, PF, RD, RJ, RL, RP, RS, RT, SR","enum":["AN","CS","JF","ND","NF","NL","NS","NT","PF","RD","RJ","RL","RP","RS","RT","SR"],"type":"string"},{"description":"Match any of these values","items":{"description":"One of (case-insensitive): AN, CS, JF, ND, NF, NL, NS, NT, PF, RD, RJ, RL, RP, RS, RT, SR","enum":["AN","CS","JF","ND","NF","NL","NS","NT","PF","RD","RJ","RL","RP","RS","RT","SR"],"type":"string"},"type":"array"},{"description":"Fuzzy text match","properties":{"match":{"type":"string"}},"required":["match"],"type":"object"},{"nullable":true}],"description":"Stage code of the most recent recorded foreclosure notice on the parcel (e.g. `\"ND\"`, `\"NS\"`). Present on every parcel whose `foreclosureStatus` is `in_foreclosure`, so any value here also limits results to those parcels. Accepts one code or an array (any-of). Pair with `foreclosureDate` to find recent notices of one stage."},"PropertyForeclosureStatusFilterValue":{"anyOf":[{"description":"One of (case-insensitive): unknown, in_foreclosure","enum":["unknown","in_foreclosure"],"type":"string"},{"description":"Match any of these values","items":{"description":"One of (case-insensitive): unknown, in_foreclosure","enum":["unknown","in_foreclosure"],"type":"string"},"type":"array"},{"description":"Fuzzy text match","properties":{"match":{"type":"string"}},"required":["match"],"type":"object"},{"nullable":true}]},"PropertyLastPartyRoster":{"description":"The most recent loan's originator(s). Deliberately originator-only — see the parent description.","properties":{"originators":{"items":{"type":"string"},"type":"array"}},"required":["originators"],"type":"object"},"PropertyListRequest":{"additionalProperties":false,"properties":{"advancedFilters":{"$ref":"#/components/schemas/FilterNode"},"filters":{"$ref":"#/components/schemas/FilterNode"},"flatFilters":{"$ref":"#/components/schemas/PropertyFlatFilters"},"pagination":{"$ref":"#/components/schemas/Pagination"},"sort":{"items":{"properties":{"field":{"$ref":"#/components/schemas/PropertyField"},"missing":{"description":"Where rows without a value go (default `last` in both directions). `first` with `asc` / `last` with `desc` treats blanks as the smallest value.","enum":["first","last"],"type":"string"},"order":{"$ref":"#/components/schemas/SortOrder"}},"required":["field"],"type":"object"},"type":"array"}},"type":"object"},"PropertyListResponse":{"properties":{"cursor":{"type":"string"},"data":{"items":{"$ref":"#/components/schemas/PropertySummary"},"type":"array"},"lenderNormalizations":{"description":"How each `loanLenderName` value resolved against the lender dictionary. Present when a `loanLenderName` filter was supplied. A `matchedVia` of `unresolved` means only the recorded lender string was matched, not the lender's whole name family.","items":{"$ref":"#/components/schemas/LenderNormalization"},"type":"array"},"total":{"type":"number"}},"required":["data","total"],"type":"object"},"PropertyLoan":{"properties":{"amount":{"nullable":true,"type":"number"},"amountPlausible":{"description":"`false` when `amount` is outside the range our mortgage metrics treat as possible, so aggregate totals exclude this loan while this row still shows it. Usually an institutional blanket loan — one note recorded against every parcel in a pool — which is a real record but not this property's debt. This judges SIZE only, so `true` means the amount is a believable one, not that it is the right one.","type":"boolean"},"borrowerStatus":{"nullable":true,"type":"string"},"brokerNmls":{"nullable":true,"type":"string"},"companyName":{"description":"Funding-company name as recorded on the loan.","nullable":true,"type":"string"},"companyNmls":{"nullable":true,"type":"string"},"currentBalance":{"nullable":true,"type":"number"},"interestRate":{"nullable":true,"type":"number"},"lenderId":{"description":"Lender id for this loan — pass it back as `loanLender` to select every parcel financed by the same lender, exactly as a chart bucket's `id` round-trips. `null` when this loan carries no lender id; use `lenderName` with `loanLenderName` in that case.","nullable":true,"type":"string"},"lenderName":{"description":"Lender name as recorded on the loan document — the same value `/v1/loans` returns as `lenderName` for this loan. To filter parcels by it, pass it as `loanLenderName`; `lenderId` is the exact-id route.","nullable":true,"type":"string"},"lenderNmls":{"nullable":true,"type":"string"},"loanType":{"nullable":true,"type":"string"},"ltv":{"description":"DEPRECATED — do not use; will be removed in a future major. This is not a reliable loan-to-value ratio. It is NOT per-loan: two thirds of parcels carrying several mortgages report an identical figure across loans of very different amounts, so per-loan equity computed from it is wrong. Nor does it consistently track the parcel's combined position, so it cannot be read as a whole-parcel ratio either. `null` when unknown — the stored value is clipped to a fixed range and both ends mean \"clipped\" rather than a real ratio, so they are returned as `null` rather than as a plausible-looking number. For a dependable measure of borrower position use `equity` on the parcel.","nullable":true,"type":"number"},"originatorName":{"nullable":true,"type":"string"},"originatorNmls":{"nullable":true,"type":"string"},"recordedInterestRate":{"nullable":true,"type":"number"},"recordingDate":{"nullable":true,"type":"string"},"transactionType":{"nullable":true,"type":"string"}},"required":["amount","currentBalance","interestRate","recordedInterestRate","loanType","transactionType","ltv","recordingDate","borrowerStatus","lenderNmls","lenderName","lenderId","originatorNmls","originatorName","brokerNmls","companyNmls"],"type":"object"},"PropertyLoanBorrowerStatusFilterValue":{"anyOf":[{"description":"One of (case-insensitive): Current, Current_via_ALI","enum":["Current","Current_via_ALI"],"type":"string"},{"description":"Match any of these values","items":{"description":"One of (case-insensitive): Current, Current_via_ALI","enum":["Current","Current_via_ALI"],"type":"string"},"type":"array"},{"description":"Fuzzy text match","properties":{"match":{"type":"string"}},"required":["match"],"type":"object"},{"nullable":true}]},"PropertyLoanTransactionTypeFilterValue":{"anyOf":[{"description":"One of (case-insensitive): purchase, refinance, equity, construction, non_residential","enum":["purchase","refinance","equity","construction","non_residential"],"type":"string"},{"description":"Match any of these values","items":{"description":"One of (case-insensitive): purchase, refinance, equity, construction, non_residential","enum":["purchase","refinance","equity","construction","non_residential"],"type":"string"},"type":"array"},{"description":"Fuzzy text match","properties":{"match":{"type":"string"}},"required":["match"],"type":"object"},{"nullable":true}]},"PropertyLoanTypeFilterValue":{"anyOf":[{"description":"One of (case-insensitive): va, fha, conventional, usda, home_equity, heloc, reverse, commercial, building, standalone_refi","enum":["va","fha","conventional","usda","home_equity","heloc","reverse","commercial","building","standalone_refi"],"type":"string"},{"description":"Match any of these values","items":{"description":"One of (case-insensitive): va, fha, conventional, usda, home_equity, heloc, reverse, commercial, building, standalone_refi","enum":["va","fha","conventional","usda","home_equity","heloc","reverse","commercial","building","standalone_refi"],"type":"string"},"type":"array"},{"description":"Fuzzy text match","properties":{"match":{"type":"string"}},"required":["match"],"type":"object"},{"nullable":true}]},"PropertyOwner":{"properties":{"firstName":{"nullable":true,"type":"string"},"fullName":{"description":"Per-owner composed display name; null when the record came from the assessment slots, which have no composed form.","nullable":true,"type":"string"},"lastName":{"nullable":true,"type":"string"},"middleName":{"nullable":true,"type":"string"}},"required":["firstName","middleName","lastName","fullName"],"type":"object"},"PropertyOwnerOccupancyFilterValue":{"anyOf":[{"description":"One of (case-insensitive): owner_occupied, probable_owner_occupied, not_flagged","enum":["owner_occupied","probable_owner_occupied","not_flagged"],"type":"string"},{"description":"Match any of these values","items":{"description":"One of (case-insensitive): owner_occupied, probable_owner_occupied, not_flagged","enum":["owner_occupied","probable_owner_occupied","not_flagged"],"type":"string"},"type":"array"},{"description":"Fuzzy text match","properties":{"match":{"type":"string"}},"required":["match"],"type":"object"},{"nullable":true}],"description":"Assessor owner-occupancy flag, bucketed: `\"owner_occupied\"`, `\"probable_owner_occupied\"`, or `\"not_flagged\"` (the assessor did not flag the parcel — where non-owner-occupied/investor parcels land). Accepts one value or an array (any-of). For investor targeting use `{ownerOccupancy: \"not_flagged\", absenteeOwner: true}`, optionally with `ownerType: \"entity\"`."},"PropertyParties":{"description":"Mortgage parties attributed to the parcel, split by scope: `alltime` (everyone on record, a strict superset of the rest), `active` (parties on loans still outstanding), `matched` (the subset whose loan resolved to a known NMLS entity) and `last` (the most recent loan). Real estate agents are not part of this block — reach parcels from an agent through `POST /v1/agents/{id}/properties`.","properties":{"active":{"$ref":"#/components/schemas/PropertyPartyRoster"},"alltime":{"$ref":"#/components/schemas/PropertyPartyRoster"},"last":{"$ref":"#/components/schemas/PropertyLastPartyRoster"},"matched":{"$ref":"#/components/schemas/PropertyPartyRoster"}},"required":["alltime","active","matched","last"],"type":"object"},"PropertyPartyRoster":{"description":"NMLS ids of the mortgage parties attributed to the parcel under one scope. Each id resolves through the originator, lender and company detail endpoints.","properties":{"brokers":{"items":{"type":"string"},"type":"array"},"companies":{"items":{"type":"string"},"type":"array"},"lenders":{"items":{"type":"string"},"type":"array"},"originators":{"items":{"type":"string"},"type":"array"}},"required":["originators","lenders","companies","brokers"],"type":"object"},"PropertyRelationships":{"properties":{"agents":{"items":{"type":"string"},"type":"array"},"brokers":{"items":{"type":"string"},"type":"array"},"companies":{"items":{"type":"string"},"type":"array"},"lenders":{"items":{"type":"string"},"type":"array"},"originators":{"items":{"type":"string"},"type":"array"}},"required":["originators","lenders","companies","brokers","agents"],"type":"object"},"PropertyResolveRequest":{"properties":{"addresses":{"items":{"properties":{"address":{"description":"Street line, e.g. \"123 N Main St Apt 4\".","maxLength":300,"type":"string"},"city":{"maxLength":100,"type":"string"},"line":{"description":"The whole address as one line (\"123 Main St, Springfield, IL 62701\"). Used for any part the fields leave empty.","maxLength":500,"type":"string"},"ref":{"description":"Your row key, echoed back. Defaults to the row's 0-based position.","maxLength":200,"type":"string"},"state":{"maxLength":50,"type":"string"},"zip":{"maxLength":20,"type":"string"}},"type":"object"},"maxItems":2000,"minItems":1,"type":"array"}},"required":["addresses"],"type":"object"},"PropertyResolveResponse":{"properties":{"results":{"items":{"properties":{"address":{"description":"The matched parcel's address as stored.","type":"string"},"candidates":{"description":"Up to 5 competing parcels on an `ambiguous` row.","items":{"properties":{"address":{"type":"string"},"id":{"type":"string"},"mmPropertyId":{"nullable":true,"type":"string"},"score":{"type":"number"}},"required":["id","mmPropertyId","address","score"],"type":"object"},"type":"array"},"id":{"description":"The parcel document id (pass to `propertyIds` / `flatFilters.id`). Absent when a multi-unit parcel matched without a unit — use `mmPropertyId`, which selects every unit.","type":"string"},"matchedBy":{"enum":["exact_key","search"],"type":"string"},"mmPropertyId":{"type":"string"},"reason":{"enum":["unit_required","duplicate_parcels","multiple_parcels","no_parcel_at_number","low_confidence","no_house_number","no_street","no_location","search_failed","search_budget_exhausted"],"type":"string"},"ref":{"type":"string"},"score":{"description":"Match confidence 0–1: 1 for an exact key match, street-name similarity for a search match.","type":"number"},"status":{"enum":["matched","ambiguous","not_found"],"type":"string"}},"required":["ref","status"],"type":"object"},"type":"array"},"summary":{"properties":{"ambiguous":{"type":"integer"},"matched":{"type":"integer"},"notFound":{"type":"integer"}},"required":["matched","ambiguous","notFound"],"type":"object"}},"required":["results","summary"],"type":"object"},"PropertySalePropensity":{"nullable":true,"properties":{"category":{"description":"Low/Medium/High","nullable":true,"type":"string"},"score":{"description":"0–100","nullable":true,"type":"number"}},"required":["score","category"],"type":"object"},"PropertySalePropensityCategoryFilterValue":{"anyOf":[{"description":"One of (case-insensitive): High, Medium, Low","enum":["High","Medium","Low"],"type":"string"},{"description":"Match any of these values","items":{"description":"One of (case-insensitive): High, Medium, Low","enum":["High","Medium","Low"],"type":"string"},"type":"array"},{"description":"Fuzzy text match","properties":{"match":{"type":"string"}},"required":["match"],"type":"object"},{"nullable":true}]},"PropertySales":{"properties":{"count":{"nullable":true,"type":"number"},"firstDate":{"nullable":true,"type":"string"},"lastDate":{"nullable":true,"type":"string"},"lastPrice":{"nullable":true,"type":"number"}},"required":["count","lastPrice","lastDate","firstDate"],"type":"object"},"PropertySearchRequest":{"properties":{"limit":{"description":"Max results to return (default 12).","maximum":50,"minimum":1,"type":"integer"},"query":{"description":"Free-text search — an address (full or partial), an owner name, or a place. Ranked by relevance; tolerates typos, missing parts, and reordered directionals.","maxLength":200,"minLength":1,"type":"string"}},"required":["query"],"type":"object"},"PropertySummary":{"properties":{"absenteeOwner":{"description":"`true` when the owner's mailing address (street + 5-digit zip, case/punctuation-insensitive) differs from the property's site address — a non-owner-occupied/investor signal; `false` when the owner mails to the property; `null` when either address is missing. Filterable.","nullable":true,"type":"boolean"},"activeLoanCount":{"description":"Mortgages believed to still be outstanding. IMPORTANT: `0` does not always mean the parcel is paid off — on a recently-sold parcel it usually means the buyer's new mortgage has not reached the public record yet, so the honest reading is UNKNOWN. Check `activeLoanCountKnown` before treating a `0` as fact, and do not infer 100% `equity` from it.","nullable":true,"type":"number"},"activeLoanCountKnown":{"description":"`false` when `activeLoanCount` reflects a gap in the record rather than a measurement — the parcel sold, its prior mortgage was excluded, and no replacement has been recorded yet. On those parcels `activeLoanCount: 0`, `mortgageBalance: 0` and an `equity` of 100% are all consequences of the same missing document, not independent findings. To exclude them, filter `preSaleLoanCount: {lte: 0}` alongside `activeLoanCount: {lte: 0}`.","type":"boolean"},"address":{"nullable":true,"type":"string"},"apn":{"description":"Assessor parcel number (cleaned)","nullable":true,"type":"string"},"avm":{"$ref":"#/components/schemas/PropertyAvm"},"baths":{"nullable":true,"type":"number"},"beds":{"nullable":true,"type":"number"},"borrowerStatus":{"nullable":true,"type":"string"},"borrowers":{"description":"Borrowers on the current mortgage (up to two); not the owner of record.","items":{"$ref":"#/components/schemas/PropertyBorrower"},"type":"array"},"city":{"nullable":true,"type":"string"},"coordinates":{"nullable":true,"properties":{"lat":{"type":"number"},"lon":{"type":"number"}},"required":["lat","lon"],"type":"object"},"countyName":{"description":"County name, lowercase (`\"catawba county\"`).","nullable":true,"type":"string"},"currentOwnerName":{"description":"The assessor's owner-of-record line as recorded — every owner on title.","nullable":true,"type":"string"},"equity":{"$ref":"#/components/schemas/PropertyEquity"},"equityPlausible":{"description":"`false` when `equity` is outside the range our equity metrics treat as possible, so aggregate equity figures exclude this parcel while this row still shows it — both are correct, they are answering different questions. Applies to `pct` as well, since that is `value` divided by the value estimate. Read alongside `activeLoanCountKnown`, which is the opposite failure: that one flags equity computed against a MISSING mortgage (so equity looks too GOOD), where this one flags equity distorted by an oversized one (equity looks too BAD).","type":"boolean"},"fips":{"description":"FIPS county code","nullable":true,"type":"string"},"foreclosure":{"$ref":"#/components/schemas/PropertyForeclosure"},"id":{"description":"Document ID","type":"string"},"loanCount":{"description":"Every mortgage on record for this parcel, current or not. Splits into `activeLoanCount` + `preSaleLoanCount` + the paid-off and released counts on the detail `position` block.","nullable":true,"type":"number"},"loanType":{"nullable":true,"type":"string"},"loans":{"description":"The parcel's cached top-5 loans (may be fewer than `loanCount`; full history is on the loans index).","items":{"$ref":"#/components/schemas/PropertyLoan"},"type":"array"},"lotSquareFeet":{"nullable":true,"type":"number"},"mmPropertyId":{"nullable":true,"type":"string"},"mortgageBalance":{"nullable":true,"type":"number"},"mortgageBalancePlausible":{"description":"`false` when `mortgageBalance` is outside the range our mortgage metrics treat as possible — typically a parcel carrying an institutional blanket loan, where one securitization note is recorded against every property in the pool. Sorting by `mortgageBalance` puts these first, so check this flag before reading the top of that list as the most heavily mortgaged homes.","type":"boolean"},"ownerFirstName":{"nullable":true,"type":"string"},"ownerLastName":{"nullable":true,"type":"string"},"ownerMailingAddress":{"description":"Primary owner's mailing address, `null` when none is recorded.","nullable":true,"properties":{"city":{"nullable":true,"type":"string"},"state":{"nullable":true,"type":"string"},"street":{"nullable":true,"type":"string"},"zip":{"nullable":true,"type":"string"}},"required":["street","city","state","zip"],"type":"object"},"ownerMiddleName":{"nullable":true,"type":"string"},"ownerName":{"nullable":true,"type":"string"},"ownerOccupancy":{"description":"Assessor owner-occupancy flag, bucketed: `owner_occupied` (owner-occupied, incl. the vendor's phased-out non-residential code), `probable_owner_occupied`, or `not_flagged` (the assessor did not flag the parcel — not proof of an investor, but where non-owner-occupied/investor parcels land; pair with `absenteeOwner`). Filterable.","enum":["owner_occupied","probable_owner_occupied","not_flagged"],"type":"string"},"ownerOccupied":{"description":"`true` only on the assessor's confident owner-occupied code (`\"Y\"`); `null` = not flagged / unknown, never `false`. Kept for compatibility — prefer `ownerOccupancy`.","nullable":true,"type":"boolean"},"partialBaths":{"nullable":true,"type":"number"},"preSaleLoanCount":{"description":"Mortgages excluded from `activeLoanCount` because the parcel sold after they were recorded — the seller's loan, assumed paid off at closing. Read this NEXT TO `activeLoanCount`, never alone: a non-zero value on a parcel that still has an active loan is the normal post-sale state and means the replacement mortgage was recorded. It is only a warning when `activeLoanCount` is `0`, which is what `activeLoanCountKnown` reports.","nullable":true,"type":"number"},"recordedInterestRate":{"description":"Genuine recorded note rate from the most-recent loan (sparse, ~7%). See `loans[]` for per-loan detail.","nullable":true,"type":"number"},"saleCount":{"nullable":true,"type":"number"},"salePropensity":{"$ref":"#/components/schemas/PropertySalePropensity"},"sales":{"$ref":"#/components/schemas/PropertySales"},"scoredAt":{"nullable":true,"type":"string"},"squareFeet":{"nullable":true,"type":"number"},"state":{"description":"Two-letter state abbreviation, uppercased (stored lowercase in OS)","nullable":true,"type":"string"},"stories":{"nullable":true,"type":"number"},"yearBuilt":{"nullable":true,"type":"number"},"zip":{"nullable":true,"type":"string"}},"required":["id"],"type":"object"},"PropertySummaryRequest":{"additionalProperties":false,"properties":{"advancedFilters":{"$ref":"#/components/schemas/FilterNode"},"filters":{"$ref":"#/components/schemas/FilterNode"},"flatFilters":{"$ref":"#/components/schemas/PropertyAnalyticsFlatFilters"}},"type":"object"},"PropertyTractFloodZoneFilterValue":{"anyOf":[{"description":"One of (case-insensitive): A, AE, AH, AO, A99, V, VE","enum":["A","AE","AH","AO","A99","V","VE"],"type":"string"},{"description":"Match any of these values","items":{"description":"One of (case-insensitive): A, AE, AH, AO, A99, V, VE","enum":["A","AE","AH","AO","A99","V","VE"],"type":"string"},"type":"array"},{"description":"Fuzzy text match","properties":{"match":{"type":"string"}},"required":["match"],"type":"object"},{"nullable":true}]},"PropertyTractIncomeLevelFilterValue":{"anyOf":[{"description":"One of (case-insensitive): low, moderate, middle, upper","enum":["low","moderate","middle","upper"],"type":"string"},{"description":"Match any of these values","items":{"description":"One of (case-insensitive): low, moderate, middle, upper","enum":["low","moderate","middle","upper"],"type":"string"},"type":"array"},{"description":"Fuzzy text match","properties":{"match":{"type":"string"}},"required":["match"],"type":"object"},{"nullable":true}]},"RateLimited":{"properties":{"error":{"enum":["rate_limited"],"type":"string"},"retryAfterSeconds":{"description":"Seconds until this caller may try again.","type":"number"}},"required":["error","retryAfterSeconds"],"type":"object"},"RealtimeConfigResponse":{"properties":{"app":{"description":"Topic app segment (e.g. `mm`)","type":"string"},"authorizerName":{"description":"IoT custom authorizer name used to build the WSS URL","type":"string"},"endpoint":{"description":"IoT realtime endpoint host","type":"string"},"stage":{"description":"Deployed stage segment (e.g. `prod`)","type":"string"},"userId":{"description":"The authenticated caller's user id (their MQTT topic key)","type":"string"}},"required":["endpoint","authorizerName","app","stage","userId"],"type":"object"},"RealtimeConfigUnavailable":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"},"RecruitingActiveCall":{"nullable":true,"properties":{"engagementId":{"type":"string"},"entityId":{"type":"string"},"id":{"type":"string"},"organizationId":{"type":"string"},"recordName":{"nullable":true,"type":"string"},"toNumber":{"type":"string"},"workspace":{"$ref":"#/components/schemas/RecruitingWorkspace"}},"required":["id","organizationId","entityId","toNumber","recordName","workspace","engagementId"],"type":"object"},"RecruitingActiveCallResult":{"properties":{"data":{"$ref":"#/components/schemas/RecruitingActiveCall"}},"required":["data"],"type":"object"},"RecruitingEngagement":{"properties":{"engagementId":{"type":"string"},"engagementName":{"type":"string"},"kind":{"type":"string"},"role":{"type":"string"},"workspace":{"$ref":"#/components/schemas/RecruitingWorkspace"}},"required":["engagementId","engagementName","kind","role","workspace"],"type":"object"},"RecruitingEngagementList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/RecruitingEngagement"},"type":"array"}},"required":["data"],"type":"object"},"RecruitingQueue":{"properties":{"meetings":{"items":{"allOf":[{"$ref":"#/components/schemas/CrmWorkspaceMeeting"},{"properties":{"engagementId":{"type":"string"},"workspace":{"$ref":"#/components/schemas/RecruitingWorkspace"}},"required":["workspace","engagementId"],"type":"object"}]},"type":"array"},"tasks":{"items":{"allOf":[{"$ref":"#/components/schemas/CrmWorkspaceTask"},{"properties":{"engagementId":{"type":"string"},"workspace":{"$ref":"#/components/schemas/RecruitingWorkspace"}},"required":["workspace","engagementId"],"type":"object"}]},"type":"array"}},"required":["tasks","meetings"],"type":"object"},"RecruitingQueueResult":{"properties":{"data":{"$ref":"#/components/schemas/RecruitingQueue"}},"required":["data"],"type":"object"},"RecruitingWorkspace":{"properties":{"id":{"type":"string"},"logo":{"nullable":true,"type":"string"},"name":{"type":"string"},"slug":{"nullable":true,"type":"string"}},"required":["id","name","slug","logo"],"type":"object"},"RelatedResponse":{"properties":{"data":{"description":"Ids of the linked records (unordered)","items":{"properties":{"id":{"description":"Id of the linked record, on the `to` entity","type":"string"}},"required":["id"],"type":"object"},"type":"array"},"from":{"description":"Type of the starting record","type":"string"},"linkQuality":{"description":"How the link was established. `primary` = the canonical identifier for this pair. `secondary` = a weaker but real alternate identifier, used only because the record carried nothing better. `null` = the record carries no linking identifier at all, so nothing was searched.","enum":["primary","secondary",null],"nullable":true,"type":"string"},"to":{"description":"Type of the linked records","type":"string"},"total":{"description":"Total linked records, before the `limit` page","type":"number"}},"required":["data","total","from","to","linkQuality"],"type":"object"},"ReplayRequest":{"properties":{"asOf":{"description":"The subscribe day (yyyy-MM-dd). Step 0 replays the backfill window a real subscribe would deliver on this date.","pattern":"^\\d{4}-\\d{2}-\\d{2}","type":"string"},"backfillDays":{"description":"Step-0 backfill lookback (days). Omit for the same 90-day window a real subscribe replays.","exclusiveMinimum":true,"minimum":0,"type":"integer"},"detectors":{"description":"Limit to specific triggers; all when omitted.","items":{"enum":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan","book_property","book_loan","area_property"],"type":"string"},"type":"array"},"steps":{"description":"Later dates (yyyy-MM-dd) to advance to. Each shows only what is NEW since the previous date — the forward delta the cron would have delivered. Sorted + de-duplicated; capped at 12 dates total.","items":{"pattern":"^\\d{4}-\\d{2}-\\d{2}","type":"string"},"type":"array"}},"required":["asOf"],"type":"object"},"ReplayResponse":{"properties":{"data":{"properties":{"capped":{"description":"True if the requested date list was truncated to the cap.","type":"boolean"},"steps":{"items":{"$ref":"#/components/schemas/ReplayStep"},"type":"array"}},"required":["steps","capped"],"type":"object"}},"required":["data"],"type":"object"},"ReplayStep":{"properties":{"counts":{"properties":{"matched":{"type":"integer"},"new":{"type":"integer"},"scanned":{"type":"integer"}},"required":["scanned","matched","new"],"type":"object"},"date":{"description":"The step's yyyy-MM-dd date.","type":"string"},"new":{"description":"Alerts new at this step (deduped against all prior steps).","items":{"$ref":"#/components/schemas/AlertDecision"},"type":"array"}},"required":["date","new","counts"],"type":"object"},"ReturnerCompany":{"description":"Where they worked while away: the first employer whose record overlaps the gap. Null fields when none is on file.","properties":{"name":{"nullable":true,"type":"string"},"nmlsId":{"nullable":true,"type":"string"}},"required":["nmlsId","name"],"type":"object"},"RevokeSavedFilterAccessRequest":{"additionalProperties":false,"properties":{"userId":{"minLength":1,"type":"string"}},"required":["userId"],"type":"object"},"RevokeSavedFilterAccessResult":{"properties":{"data":{"properties":{"revoked":{"type":"boolean"}},"required":["revoked"],"type":"object"}},"required":["data"],"type":"object"},"RosterProductionTier":{"properties":{"count":{"type":"number"},"label":{"type":"string"},"maxUnits":{"nullable":true,"type":"number"},"minUnits":{"type":"number"},"tier":{"enum":["none","low","mid","top"],"type":"string"},"units":{"type":"number"},"volume":{"type":"number"}},"required":["tier","label","minUnits","maxUnits","count","volume","units"],"type":"object"},"RunUserDetectorRequest":{"properties":{"backfillDays":{"description":"Ingest-axis lookback (days) the run replays past the global watermark. Omit to use the same 90-day window a real subscribe backfills, so the preview matches what the user receives on add.","exclusiveMinimum":true,"minimum":0,"type":"integer"},"detectors":{"description":"Limit to specific triggers; all six when omitted.","items":{"enum":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan","book_property","book_loan","area_property"],"type":"string"},"type":"array"},"dryRun":{"description":"Preview only (default true): compute what would fire without writing the feed, publishing events, or sending email. Set false to actually fire — persists a run record + delivers like the cron.","type":"boolean"}},"type":"object"},"RunUserDetectorResponse":{"properties":{"data":{"properties":{"correlationId":{"type":"string"},"dryRun":{"type":"boolean"},"perDetector":{"items":{"properties":{"decisions":{"description":"The alerts that fired for this detector (dry-run only).","items":{"$ref":"#/components/schemas/AlertDecision"},"type":"array"},"deduped":{"type":"integer"},"matched":{"type":"integer"},"published":{"type":"integer"},"scanned":{"type":"integer"},"type":{"enum":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan","book_property","book_loan","area_property"],"type":"string"},"written":{"type":"integer"}},"required":["type","scanned","matched","deduped","written","published"],"type":"object"},"type":"array"}},"required":["correlationId","dryRun","perDetector"],"type":"object"}},"required":["data"],"type":"object"},"SaleChartRequest":{"additionalProperties":false,"properties":{"advancedFilters":{"$ref":"#/components/schemas/FilterNode"},"filters":{"$ref":"#/components/schemas/FilterNode"},"flatFilters":{"$ref":"#/components/schemas/SaleFlatFilters"},"measure":{"$ref":"#/components/schemas/ChartMeasure"},"period":{"$ref":"#/components/schemas/DatedPeriod"},"slice":{"$ref":"#/components/schemas/SaleChartSlice"}},"required":["slice"],"type":"object"},"SaleChartSlice":{"enum":["city","county","state","zip","schoolDistrict","elementarySchool","middleSchool","highSchool"],"type":"string"},"SaleDetail":{"allOf":[{"$ref":"#/components/schemas/SaleSummary"},{"properties":{"buyerNames":{"nullable":true},"description":{"description":"Listing description (the public remarks) as supplied with the listing, typically lower-cased. Subject to the display and attribution rules that apply to listing content.","nullable":true,"type":"string"},"documentType":{"nullable":true,"type":"string"},"features":{"$ref":"#/components/schemas/SaleFeatures"},"listAgent":{"nullable":true},"listingContact":{"$ref":"#/components/schemas/SaleListingContact"},"media":{"$ref":"#/components/schemas/SaleMedia"},"mlsBoards":{"nullable":true},"mlsListDate":{"nullable":true},"mlsPendingDate":{"nullable":true},"mlsSoldDate":{"nullable":true},"mmSaleId":{"nullable":true,"type":"string"},"rental":{"$ref":"#/components/schemas/SaleRental"},"schools":{"$ref":"#/components/schemas/SaleSchools"},"sellerNames":{"nullable":true},"soldAgent":{"nullable":true},"tourUrl":{"description":"Link to the listing's tour or marketing page (Matterport, a photographer's site, etc.), verbatim. A third-party URL that may carry the sender's tracking parameters; link out, do not embed. Filled on roughly 40% of active listings.","nullable":true,"type":"string"}},"type":"object"}]},"SaleDetailResponse":{"properties":{"data":{"$ref":"#/components/schemas/SaleDetail"}},"required":["data"],"type":"object"},"SaleElementarySchoolFilterValue":{"anyOf":[{"maxLength":100,"type":"string"},{"items":{"maxLength":100,"type":"string"},"maxItems":25,"minItems":1,"type":"array"},{"nullable":true}],"description":"Elementary school name as listed, one or an array (any-of). Matched case-insensitively with the generic words (`School`, `Elementary`, `Middle`, `High`) removed, so `Lago Vista Elementary School` and `Lago Vista Elementary` select the same listings. All remaining words must appear in the stored name. The assigned school is as named on the listing record, not a boundary lookup. List the available values for an area with `POST /v1/sales/analytics/chart` and `slice: \"elementarySchool\"`."},"SaleFeatures":{"description":"Property facts from the MLS listing. Every field is nullable and filled far more densely on active listings (60-99%) than on sold ones (about half, and HOA fee / tax far less). Feature lists are RESO tokens, not display text.","nullable":true,"properties":{"appliances":{"description":"Included appliance tokens","items":{"type":"string"},"nullable":true,"type":"array"},"condition":{"description":"`Resale` or `NewConstruction`","nullable":true,"type":"string"},"cooling":{"description":"Cooling feature tokens (e.g. `CentralAir`)","items":{"type":"string"},"nullable":true,"type":"array"},"exteriorFeatures":{"description":"Exterior feature tokens","items":{"type":"string"},"nullable":true,"type":"array"},"fireplace":{"nullable":true,"type":"boolean"},"garageSpaces":{"nullable":true,"type":"number"},"heating":{"description":"Heating feature tokens (e.g. `Central`)","items":{"type":"string"},"nullable":true,"type":"array"},"hoaFee":{"description":"Primary association fee in dollars, per `hoaFeeFrequency`","nullable":true,"type":"number"},"hoaFeeFrequency":{"description":"How often `hoaFee` is charged (e.g. `Monthly`, `Annually`)","nullable":true,"type":"string"},"interiorFeatures":{"description":"Interior feature tokens","items":{"type":"string"},"nullable":true,"type":"array"},"lotSizeAcres":{"nullable":true,"type":"number"},"lotSizeSqft":{"nullable":true,"type":"number"},"parkingFeatures":{"description":"Parking feature tokens (e.g. `Attached`)","items":{"type":"string"},"nullable":true,"type":"array"},"parkingTotal":{"description":"Total parking spaces","nullable":true,"type":"number"},"poolFeatures":{"description":"Pool feature tokens. The bare `None` token is dropped.","items":{"type":"string"},"nullable":true,"type":"array"},"poolPrivate":{"description":"Whether the property has a private pool","nullable":true,"type":"boolean"},"propertySubType":{"description":"Listing sub-type (e.g. `SingleFamilyResidence`, `Condominium`). More reliably filled than `propertyType`.","nullable":true,"type":"string"},"stories":{"nullable":true,"type":"number"},"subdivision":{"nullable":true,"type":"string"},"taxAnnualAmount":{"description":"Annual property tax in dollars as listed","nullable":true,"type":"number"},"taxAssessedValue":{"nullable":true,"type":"number"},"taxAssessedYear":{"nullable":true,"type":"number"},"view":{"description":"View tokens. The bare `None` token is dropped.","items":{"type":"string"},"nullable":true,"type":"array"},"waterfront":{"nullable":true,"type":"boolean"}},"type":"object"},"SaleField":{"enum":["city","state","zipCode","county","salePrice","saleDate","listPrice","soldPrice","listingAgent","soldAgent","mlsStatus","beds","baths","sqft","yearBuilt","propertyType"],"type":"string"},"SaleFlatFilters":{"additionalProperties":false,"properties":{"baths":{"$ref":"#/components/schemas/NumericFilterValue"},"beds":{"$ref":"#/components/schemas/NumericFilterValue"},"catsAllowed":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Lease listings. `true`: a cats-OK token. `false`: No, or dogs-only."}]},"city":{"$ref":"#/components/schemas/TextFilterValue"},"county":{"$ref":"#/components/schemas/TextFilterValue"},"dogsAllowed":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Lease listings. `true`: a dogs-OK token. `false`: No, or cats-only."}]},"elementarySchool":{"$ref":"#/components/schemas/SaleElementarySchoolFilterValue"},"fips":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"5-digit county FIPS code — the exact-code escape hatch for `county` (which also accepts a county name)."}]},"fireplace":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"`true`: the listing has a fireplace. `false`: it says it does not. Rows with no answer match neither value."}]},"garageSpaces":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Garage spaces (e.g. `{gte: 2}`). Rows with no garage count are excluded unless `includeNulls: true`."}]},"geoBounds":{"$ref":"#/components/schemas/GeoBoundsFilterValue"},"geoPoint":{"$ref":"#/components/schemas/GeoFilterValue"},"hasHoa":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"`true`: the listing says it has an association, or carries a positive HOA fee. `false`: positive evidence of none (association flag `N`, or an explicit $0 fee) and no contradicting signal. A row with neither signal matches neither value."}]},"highSchool":{"$ref":"#/components/schemas/SaleHighSchoolFilterValue"},"hoaFee":{"$ref":"#/components/schemas/SaleHoaFeeFilterValue"},"keyword":{"$ref":"#/components/schemas/SaleKeywordFilterValue"},"listPrice":{"$ref":"#/components/schemas/NumericFilterValue"},"listingAgent":{"$ref":"#/components/schemas/TextFilterValue"},"lotSizeSqft":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Lot size in square feet (1 acre = 43,560). Rows with no lot size are excluded unless `includeNulls: true`."}]},"middleSchool":{"$ref":"#/components/schemas/SaleMiddleSchoolFilterValue"},"mlsStatus":{"$ref":"#/components/schemas/SaleMlsStatusFilterValue"},"mode":{"enum":["and","or"],"type":"string"},"newConstruction":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"`true`: the listing is flagged new construction, or its condition says new / under construction / to be built / pre-construction. `false`: flagged not-new and no such condition. A row with neither signal matches neither value."}]},"petsAllowed":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"Lease listings (combine with `propertyType: \"Residential Lease\"`). `true`: cats OK, dogs OK or a plain Yes. `false`: No, with nothing permitting. `Negotiable` and detail-only values (size limit, deposit) with no OK token match neither value."}]},"poolPrivate":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"`true`: the listing has a private pool. `false`: it says it does not. Community pools are not distinguished (feeds record them inconsistently). Rows with no answer match neither value."}]},"priceReduced":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"`true`: the current list price is below the ORIGINAL list price. `false`: at or above it. Rows missing either price match neither value. (Not based on `previousListPrice`, which is unreliable.)"}]},"priceReductionPercent":{"$ref":"#/components/schemas/SalePriceReductionPercentFilterValue"},"propertyId":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"Parcel id — every MLS sale record of one property (the `mmPropertyId` on a loan or property record). Loans' `propertyId` selects the same parcel."}]},"propertyType":{"$ref":"#/components/schemas/TextFilterValue"},"saleDate":{"$ref":"#/components/schemas/DateFilterValue"},"salePrice":{"$ref":"#/components/schemas/NumericFilterValue"},"schoolDistrict":{"$ref":"#/components/schemas/SaleSchoolDistrictFilterValue"},"soldAgent":{"$ref":"#/components/schemas/TextFilterValue"},"soldPrice":{"$ref":"#/components/schemas/NumericFilterValue"},"sqft":{"$ref":"#/components/schemas/NumericFilterValue"},"state":{"$ref":"#/components/schemas/TextFilterValue"},"stories":{"allOf":[{"$ref":"#/components/schemas/NumericFilterValue"},{"description":"Number of stories: `3`, `[1, 2]` or `{lte: 1}` for single level. Where the listing has no `stories` value the building's story count is used instead, which for a condo is the whole building. Rows with neither are excluded unless `includeNulls: true`."}]},"waterfront":{"allOf":[{"$ref":"#/components/schemas/BooleanFilterValue"},{"description":"`true`: waterfront property. `false`: it says it is not. Rows with no answer match neither value."}]},"yearBuilt":{"$ref":"#/components/schemas/NumericFilterValue"},"zip":{"$ref":"#/components/schemas/TextFilterValue"},"zipCode":{"allOf":[{"$ref":"#/components/schemas/TextFilterValue"},{"description":"ZIP code. Canonical key on sales (matches loans `zipCode` and the response DTO); `zip` is an alias kept for cross-entity parity."}]}},"type":"object"},"SaleHighSchoolFilterValue":{"anyOf":[{"maxLength":100,"type":"string"},{"items":{"maxLength":100,"type":"string"},"maxItems":25,"minItems":1,"type":"array"},{"nullable":true}],"description":"High school name as listed, one or an array (any-of). Matched case-insensitively with the generic words (`School`, `Elementary`, `Middle`, `High`) removed, so `Lago Vista Elementary School` and `Lago Vista Elementary` select the same listings. All remaining words must appear in the stored name. The assigned school is as named on the listing record, not a boundary lookup. List the available values for an area with `POST /v1/sales/analytics/chart` and `slice: \"highSchool\"`."},"SaleHoaFeeFilterValue":{"additionalProperties":false,"description":"Monthly-equivalent HOA fee in dollars: a quarterly fee is divided by 3, an annual fee by 12, and so on, so `{lte: 300}` means \"at most $300 a month\" whatever the listing's payment frequency. Only rows with a recognized recurring frequency (monthly, quarterly, semi-annual, annual, semi-monthly, weekly) are comparable; one-time, unknown and missing frequencies are excluded. Rows with no fee are excluded unless `includeNulls: true` (use that to also keep homes with no HOA fee on record, or `hasHoa: false`). Reads the primary association only.","nullable":true,"properties":{"gt":{"minimum":0,"type":"number"},"gte":{"minimum":0,"type":"number"},"includeNulls":{"description":"Also keep rows where the field is missing (a range drops them by default). Requires a bound.","type":"boolean"},"lt":{"minimum":0,"type":"number"},"lte":{"minimum":0,"type":"number"}},"type":"object"},"SaleKeywordFilterValue":{"description":"Words that must ALL appear in the listing description (public remarks), in any order, case-insensitive. Plain text: operators and punctuation (`* ? \" ( ) AND OR - :`) are not interpreted. At most 200 characters and 12 words; empty or punctuation-only is a 400. Stemmed (`granite` matches `granites`), not fuzzy. Listing text is MLS-supplied; see the display rules that apply to it.","nullable":true,"type":"string"},"SaleListRequest":{"additionalProperties":false,"properties":{"advancedFilters":{"$ref":"#/components/schemas/FilterNode"},"filters":{"$ref":"#/components/schemas/FilterNode"},"flatFilters":{"$ref":"#/components/schemas/SaleFlatFilters"},"pagination":{"$ref":"#/components/schemas/Pagination"},"period":{"$ref":"#/components/schemas/DatedPeriod"},"sort":{"items":{"properties":{"field":{"$ref":"#/components/schemas/SaleField"},"order":{"$ref":"#/components/schemas/SortOrder"}},"required":["field"],"type":"object"},"type":"array"}},"type":"object"},"SaleListResponse":{"properties":{"cursor":{"type":"string"},"data":{"items":{"$ref":"#/components/schemas/SaleSummary"},"type":"array"},"locationNormalizations":{"description":"How each location filter value resolved. Present when a `city`/`county`/`state`/`zip` filter was supplied.","items":{"$ref":"#/components/schemas/LocationNormalization"},"type":"array"},"total":{"type":"number"}},"required":["data","total"],"type":"object"},"SaleListingContact":{"description":"Listing agent and office contact as stored on the sale record. Personal data about a licensee: confirm you may display it before showing it to consumers.","nullable":true,"properties":{"agentEmail":{"nullable":true,"type":"string"},"agentName":{"nullable":true,"type":"string"},"agentPhone":{"nullable":true,"type":"string"},"officeName":{"nullable":true,"type":"string"},"officePhone":{"nullable":true,"type":"string"}},"type":"object"},"SaleMapCluster":{"properties":{"bounds":{"$ref":"#/components/schemas/GeoBounds"},"count":{"type":"integer"},"key":{"description":"Grid cell as `zoom/x/y` (web-mercator tile coordinates)","type":"string"},"kind":{"enum":["cluster"],"type":"string"},"lat":{"description":"Centroid of the listings in the cell (not the cell centre)","type":"number"},"lon":{"type":"number"},"medianListPrice":{"description":"Approximate median list price of the cell's listings, in dollars (list price for every status, sold included)","nullable":true,"type":"number"}},"required":["kind","key","lat","lon","count","medianListPrice","bounds"],"type":"object"},"SaleMapPoint":{"properties":{"baths":{"nullable":true,"type":"number"},"beds":{"nullable":true,"type":"number"},"id":{"description":"Sale document ID","type":"string"},"kind":{"enum":["point"],"type":"string"},"lat":{"type":"number"},"lon":{"type":"number"},"media":{"$ref":"#/components/schemas/SaleMediaSummary"},"price":{"description":"Sold price for a closed sale (`SLD`), otherwise the list price, in dollars","nullable":true,"type":"number"},"sqft":{"nullable":true,"type":"number"},"status":{"allOf":[{"$ref":"#/components/schemas/MlsStatus"},{"nullable":true}]}},"required":["kind","id","lat","lon","price","status","beds","baths","sqft"],"type":"object"},"SaleMapRequest":{"additionalProperties":false,"properties":{"advancedFilters":{"$ref":"#/components/schemas/FilterNode"},"bounds":{"allOf":[{"$ref":"#/components/schemas/GeoBounds"},{"description":"The viewport to draw. Required, and the only way to scope the map: do not also send `flatFilters.geoBounds`."}]},"filters":{"$ref":"#/components/schemas/FilterNode"},"flatFilters":{"$ref":"#/components/schemas/SaleFlatFilters"},"limit":{"description":"Most point rows to return (default 250, max 1000). It is also the `auto` switch-over: more matches than this come back as clusters. **Billing counts each element of `data`**, so this bounds the cost of one call.","maximum":1000,"minimum":1,"type":"integer"},"mode":{"description":"`auto` (default): individual `point` rows when the matches fit in `limit`, otherwise `cluster` rows. `points`: always individual rows, newest first, capped at `limit` (`truncated` says when more matched). `clusters`: always grid cells.","enum":["auto","points","clusters"],"type":"string"},"period":{"$ref":"#/components/schemas/DatedPeriod"},"zoom":{"description":"Web-map zoom level (0-22). Sets the cluster grid precision (about 8 cells across a 256 px tile). Omitted: derived from the width of `bounds`.","maximum":22,"minimum":0,"type":"integer"}},"required":["bounds"],"type":"object"},"SaleMapResponse":{"properties":{"data":{"items":{"discriminator":{"mapping":{"cluster":"#/components/schemas/SaleMapCluster","point":"#/components/schemas/SaleMapPoint"},"propertyName":"kind"},"oneOf":[{"$ref":"#/components/schemas/SaleMapPoint"},{"$ref":"#/components/schemas/SaleMapCluster"}]},"type":"array"},"mode":{"description":"What `data` holds: all `point` rows or all `cluster` rows","enum":["points","clusters"],"type":"string"},"precision":{"description":"Grid zoom level used (`clusters` only)","type":"integer"},"total":{"description":"Listings inside `bounds` matching the filters (exact), regardless of how many `data` rows are returned","type":"integer"},"truncated":{"description":"`points`: more listings matched than `limit`, so `data` is the newest `limit`. `clusters`: more cells existed than the cap, so the smallest were left out.","type":"boolean"}},"required":["mode","total","truncated","data"],"type":"object"},"SaleMarketStatsActive":{"properties":{"count":{"description":"Active inventory: status `ACT`, price at least $25,000, not a rental, touched within `scope.activeWithinDays`","type":"integer"},"medianListPrice":{"description":"Dollars","nullable":true,"type":"number"},"priceCutCount":{"description":"Active listings whose current list price is below the original list price","type":"integer"},"priceCutShare":{"description":"`priceCutCount` / `count`, 0-1; null when `count` is 0","nullable":true,"type":"number"}},"required":["count","medianListPrice","priceCutCount","priceCutShare"],"type":"object"},"SaleMarketStatsRequest":{"additionalProperties":false,"properties":{"activeWithinDays":{"description":"An active listing counts only if its status was last touched within this many days (default 180). Active rows are not removed from the index when they go stale, so without this the inventory includes listings that sold or expired years ago.","maximum":365,"minimum":1,"type":"integer"},"advancedFilters":{"$ref":"#/components/schemas/FilterNode"},"filters":{"$ref":"#/components/schemas/FilterNode"},"flatFilters":{"$ref":"#/components/schemas/SaleFlatFilters"},"period":{"allOf":[{"$ref":"#/components/schemas/DatedPeriod"},{"description":"Window for the SOLD figures, on the sale date. Defaults to `last12Months`. Does not apply to the ACTIVE figures, which describe the market now."}]}},"type":"object"},"SaleMarketStatsResponse":{"properties":{"active":{"$ref":"#/components/schemas/SaleMarketStatsActive"},"locationNormalizations":{"description":"How each location filter value resolved, as on the list route.","items":{"$ref":"#/components/schemas/LocationNormalization"},"type":"array"},"scope":{"$ref":"#/components/schemas/SaleMarketStatsScope"},"sold":{"$ref":"#/components/schemas/SaleMarketStatsSold"}},"required":["sold","active","scope"],"type":"object"},"SaleMarketStatsScope":{"properties":{"activeSince":{"description":"`YYYY-MM-DD`","type":"string"},"activeWithinDays":{"type":"integer"},"period":{"type":"string"},"soldFrom":{"description":"`YYYY-MM-DD`; null for `allTime`","nullable":true,"type":"string"},"soldTo":{"nullable":true,"type":"string"}},"required":["period","soldFrom","soldTo","activeWithinDays","activeSince"],"type":"object"},"SaleMarketStatsSold":{"properties":{"count":{"description":"Closed sales (status `SLD`, price at least $25,000, not a rental) in `scope.soldFrom`..`scope.soldTo`","type":"integer"},"medianDaysToSell":{"description":"Median days from MLS list date to MLS sold date, over sales carrying both (`samples.daysToSell`)","nullable":true,"type":"number"},"medianPricePerSqft":{"description":"Median of sold price / living area, over the sales with a living area of at least 300 sqft (`samples.pricePerSqft`). Living area is missing on a large share of sold records.","nullable":true,"type":"number"},"medianSaleToListRatio":{"description":"Median of sold price / final list price (0.95 = 5% under list), over sales carrying both (`samples.saleToList`)","nullable":true,"type":"number"},"medianSoldPrice":{"description":"Dollars","nullable":true,"type":"number"},"samples":{"description":"How many sales each median above is computed from. Read these before trusting a median: a neighborhood with a handful of sales has a noisy one.","properties":{"daysToSell":{"type":"integer"},"pricePerSqft":{"type":"integer"},"saleToList":{"type":"integer"}},"required":["pricePerSqft","daysToSell","saleToList"],"type":"object"}},"required":["count","medianSoldPrice","medianPricePerSqft","medianDaysToSell","medianSaleToListRatio","samples"],"type":"object"},"SaleMedia":{"description":"Listing photos found on the open web and stored by a partner app: links to images hosted by the source (no image bytes are stored here), plus where they came from. Present only while a non-expired `found` record exists for THIS listing (a relist gets its own), so it is `null` for most listings. Not MLS data and not necessarily the listing broker's photos: attribute them to `source.host` and link to `source.pageUrl`; they can stop resolving at any time.","nullable":true,"properties":{"foundAt":{"description":"When the photos were found (ISO-8601)","type":"string"},"photos":{"items":{"properties":{"bytes":{"type":"number"},"height":{"type":"number"},"url":{"description":"https URL of the image","type":"string"},"width":{"type":"number"}},"required":["url","width","height"],"type":"object"},"type":"array"},"source":{"properties":{"host":{"description":"Host the photos came from","type":"string"},"pageUrl":{"description":"Page the photos were read from","type":"string"}},"required":["host","pageUrl"],"type":"object"}},"required":["photos","source","foundAt"],"type":"object"},"SaleMediaSummary":{"description":"The first listing photo found on the open web, how many were found, and where from. Present on a list or map row only while a non-expired `found` record exists for THIS listing, otherwise the key is absent. Same caveats as `SaleMedia`: third-party links, attribute to `source.host`, they can stop resolving.","properties":{"count":{"description":"How many photos exist for this listing (the full list is on `GET /v1/sales/{id}`)","type":"integer"},"cover":{"properties":{"height":{"type":"number"},"url":{"description":"https URL of the cover image","type":"string"},"width":{"type":"number"}},"required":["url","width","height"],"type":"object"},"source":{"properties":{"host":{"description":"Host the photos came from","type":"string"},"pageUrl":{"description":"Page the photos were read from","type":"string"}},"required":["host","pageUrl"],"type":"object"}},"required":["cover","count","source"],"type":"object"},"SaleMiddleSchoolFilterValue":{"anyOf":[{"maxLength":100,"type":"string"},{"items":{"maxLength":100,"type":"string"},"maxItems":25,"minItems":1,"type":"array"},{"nullable":true}],"description":"Middle school name as listed, one or an array (any-of). Matched case-insensitively with the generic words (`School`, `Elementary`, `Middle`, `High`) removed, so `Lago Vista Elementary School` and `Lago Vista Elementary` select the same listings. All remaining words must appear in the stored name. The assigned school is as named on the listing record, not a boundary lookup. List the available values for an area with `POST /v1/sales/analytics/chart` and `slice: \"middleSchool\"`."},"SaleMlsStatusFilterValue":{"anyOf":[{"$ref":"#/components/schemas/MlsStatus"},{"description":"Match any MLS status","items":{"$ref":"#/components/schemas/MlsStatus"},"type":"array"},{"description":"Fuzzy text match","properties":{"match":{"type":"string"}},"required":["match"],"type":"object"},{"nullable":true}]},"SalePriceReductionPercentFilterValue":{"additionalProperties":false,"description":"How far the current list price is below the ORIGINAL list price, in percent of the original: `{gte: 5}` = cut by at least 5%. Negative means the price was raised. Rows missing either price are excluded unless `includeNulls: true`. Pair with `priceReduced: true` to exclude unchanged listings from a `lte` range.","nullable":true,"properties":{"gt":{"maximum":100,"minimum":0,"type":"number"},"gte":{"maximum":100,"minimum":0,"type":"number"},"includeNulls":{"description":"Also keep rows where the field is missing (a range drops them by default). Requires a bound.","type":"boolean"},"lt":{"maximum":100,"minimum":0,"type":"number"},"lte":{"maximum":100,"minimum":0,"type":"number"}},"type":"object"},"SaleRental":{"description":"Lease-listing terms as supplied with the listing; `null` unless the listing carries any. There is no furnished, availability-date or security-deposit field in the index.","nullable":true,"properties":{"laundry":{"items":{"type":"string"},"nullable":true,"type":"array"},"leaseIncludes":{"description":"What the rent includes. Rarely filled (under 1% of active leases in the counties checked).","items":{"type":"string"},"nullable":true,"type":"array"},"leaseTerm":{"description":"Lease term tokens, e.g. `TwelveMonths`, `Negotiable`.","items":{"type":"string"},"nullable":true,"type":"array"},"pets":{"description":"Pet policy as RESO tokens, e.g. `CatsOk`, `DogsOk`, `SizeLimit`, `BreedRestrictions`, `PetDeposit`, `Yes`, `No`, `Negotiable` (spelling varies by feed: `Cats OK`). Filter with `petsAllowed` / `catsAllowed` / `dogsAllowed`.","items":{"type":"string"},"nullable":true,"type":"array"},"utilities":{"items":{"type":"string"},"nullable":true,"type":"array"}},"type":"object"},"SaleSchoolDistrictFilterValue":{"anyOf":[{"maxLength":100,"type":"string"},{"items":{"maxLength":100,"type":"string"},"maxItems":25,"minItems":1,"type":"array"},{"nullable":true}],"description":"School district name, one or an array (any-of). Matched case-insensitively with the generic words removed, so `Austin Independent School District`, `Austin ISD` and `AUSTIN` select the same listings. Matches the district assigned at any level (elementary, middle or high). It is a name match, not a boundary lookup: `Austin` would also match a district named `Austin Achieve`, so pair it with a location filter. List the available values for an area with `POST /v1/sales/analytics/chart` and `slice: \"schoolDistrict\"`."},"SaleSchools":{"description":"Schools assigned to the listing, as named on the listing record. These are not ratings and not a boundary lookup; label them as listed.","nullable":true,"properties":{"elementary":{"nullable":true,"type":"string"},"elementaryDistrict":{"nullable":true,"type":"string"},"high":{"nullable":true,"type":"string"},"highDistrict":{"nullable":true,"type":"string"},"middle":{"nullable":true,"type":"string"},"middleDistrict":{"nullable":true,"type":"string"}},"type":"object"},"SaleSummary":{"properties":{"apn":{"nullable":true,"type":"string"},"baths":{"description":"Number of full bathrooms","nullable":true,"type":"number"},"beds":{"description":"Number of bedrooms","nullable":true,"type":"number"},"buyerName":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"coListAgentId":{"description":"ModelMatch agent ID for the co-listing agent, same rule","nullable":true,"type":"string"},"coListAgentName":{"description":"Co-listing agent's name as the MLS recorded it","nullable":true,"type":"string"},"coordinates":{"nullable":true,"properties":{"lat":{"type":"number"},"lon":{"type":"number"}},"required":["lat","lon"],"type":"object"},"cumulativeDaysOnMarket":{"description":"Cumulative days on market across relists, as the MLS states it.","nullable":true,"type":"number"},"daysOnMarket":{"nullable":true,"type":"number"},"fips":{"nullable":true,"type":"string"},"id":{"description":"Document ID","type":"string"},"lastPriceChangeDate":{"description":"Date of the most recent list-price change (`YYYY-MM-DD`). Roughly 60% filled on active listings.","nullable":true,"type":"string"},"listDate":{"description":"MLS list date (`YYYY-MM-DD`)","nullable":true,"type":"string"},"listPrice":{"description":"MLS list price in dollars","nullable":true,"type":"number"},"listingAgentId":{"description":"ModelMatch agent ID for the listing agent — the agent the MLS keys resolve to (the `agentSales` / loans rule), else the sale's linked agent id","nullable":true,"type":"string"},"listingAgentName":{"nullable":true,"type":"string"},"media":{"$ref":"#/components/schemas/SaleMediaSummary"},"mlsDaysOnMarket":{"description":"Days on market as the MLS states it for this listing. Distinct from `daysOnMarket`, which is only filled on some sold rows.","nullable":true,"type":"number"},"mlsStatus":{"description":"MLS listing status code","enum":["SLD","ACT","PND","Cancelled","WDN","EXP","CNT","OFF","UNK","RNTD","RNT","LSE","RNT-SLD","RNT-ACT","RNT-PND","RNT-WDN","RNT-EXP","RNT-LSE","RNT-RNTD",null],"nullable":true,"type":"string"},"mmPropertyId":{"description":"Property id of the parcel this listing was matched to — the same id the `propertyId` filter takes. **May not resolve to a parcel in some counties:** in Travis, Williamson (TX), Hillsborough (FL) and Wake (NC) the id on a listing is built from the MLS account number and usually does NOT exist as a property record, while in e.g. Maricopa, Denver and Davidson it usually does. Do not treat it as a guaranteed join key to `/v1/properties`.","nullable":true,"type":"string"},"originalListDate":{"description":"Date the property was first listed (`YYYY-MM-DD`), which can precede `listDate` when it was relisted.","nullable":true,"type":"string"},"originalListPrice":{"description":"Original MLS list price in dollars","nullable":true,"type":"number"},"pendingDate":{"description":"Date the listing went pending (`YYYY-MM-DD`). Filled on about half of sold listings and few active ones.","nullable":true,"type":"string"},"previousListPrice":{"description":"List price before the most recent change, in dollars. Can equal `listPrice` (a change recorded on the list date) and is not guaranteed to be consistent with `lastPriceChangeDate` — verify before presenting a price-history timeline. Roughly 60% filled on active listings, about a third on sold.","nullable":true,"type":"number"},"propertyType":{"description":"Listing property type (e.g. Residential, Condo)","nullable":true,"type":"string"},"recordingDate":{"nullable":true,"type":"string"},"salePrice":{"description":"Transaction price in dollars","nullable":true,"type":"number"},"sellerName":{"nullable":true,"type":"string"},"soldAgentId":{"description":"ModelMatch agent ID for the sold/buying agent, same rule","nullable":true,"type":"string"},"soldAgentName":{"nullable":true,"type":"string"},"soldDate":{"description":"MLS sold date (`YYYY-MM-DD`) — the MLS close, which can differ from `transactionDate` (the recorded deed)","nullable":true,"type":"string"},"soldPrice":{"description":"MLS sold price in dollars","nullable":true,"type":"number"},"sqft":{"description":"Living area in square feet","nullable":true,"type":"number"},"state":{"nullable":true,"type":"string"},"streetAddress":{"nullable":true,"type":"string"},"transactionDate":{"nullable":true,"type":"string"},"yearBuilt":{"description":"Year the property was built","nullable":true,"type":"number"},"zipCode":{"nullable":true,"type":"string"}},"required":["id"],"type":"object"},"SaleSummaryRequest":{"additionalProperties":false,"properties":{"advancedFilters":{"$ref":"#/components/schemas/FilterNode"},"filters":{"$ref":"#/components/schemas/FilterNode"},"flatFilters":{"$ref":"#/components/schemas/SaleFlatFilters"},"period":{"$ref":"#/components/schemas/DatedPeriod"}},"type":"object"},"SaleTimeSeriesRequest":{"additionalProperties":false,"properties":{"advancedFilters":{"$ref":"#/components/schemas/FilterNode"},"filters":{"$ref":"#/components/schemas/FilterNode"},"flatFilters":{"$ref":"#/components/schemas/SaleFlatFilters"},"interval":{"$ref":"#/components/schemas/Interval"},"measure":{"$ref":"#/components/schemas/Measure"},"period":{"$ref":"#/components/schemas/DatedPeriod"},"segment":{"$ref":"#/components/schemas/SegmentDimension"}},"type":"object"},"SalesTimeSeriesBucket":{"properties":{"buyer":{"$ref":"#/components/schemas/SalesTimeSeriesSideMetrics"},"date":{"type":"string"},"dual":{"$ref":"#/components/schemas/SalesTimeSeriesSideMetrics"},"seller":{"$ref":"#/components/schemas/SalesTimeSeriesSideMetrics"},"total":{"$ref":"#/components/schemas/SalesTimeSeriesSideMetrics"}},"required":["date","total","buyer","seller","dual"],"type":"object"},"SalesTimeSeriesResponse":{"properties":{"current":{"items":{"$ref":"#/components/schemas/SalesTimeSeriesBucket"},"type":"array"},"measure":{"description":"Echo of the measure `measureValue` reports, so a caller never has to infer which metric it is plotting.","type":"string"},"previous":{"items":{"$ref":"#/components/schemas/SalesTimeSeriesBucket"},"nullable":true,"type":"array"}},"required":["measure","current","previous"],"type":"object"},"SalesTimeSeriesSideMetrics":{"properties":{"measureValue":{"description":"This side's value for the requested `measure` (`volume` when none was supplied). Null when this side has no in-bounds document for the measure's field — sentinel-filtered rows do not contribute, so an empty side reports null rather than 0.","nullable":true,"type":"number"},"units":{"type":"number"},"volume":{"type":"number"}},"required":["volume","units","measureValue"],"type":"object"},"SavedFilter":{"properties":{"canDelete":{"description":"You may delete it (owner or workspace admin).","type":"boolean"},"canEdit":{"description":"You may update its name, icon, query and UI state (owner, editor, or workspace admin).","type":"boolean"},"canManageSharing":{"description":"You may change its visibility and who it is shared with (owner or workspace admin).","type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"fidelity":{"description":"How much of the UI state `query` captures: `exact`; `partial` (see `unmapped`); `ui_only` — no runnable query. Defaults from whether `query` is present.","enum":["exact","partial","ui_only"],"type":"string"},"icon":{"$ref":"#/components/schemas/SavedFilterIcon"},"id":{"type":"string"},"isOwner":{"description":"True for your own filters; false for ones shared with you.","type":"boolean"},"kind":{"description":"`filter` (default) — a saved search; `view` — a saved CRM table layout (columns / order) kept in `uiState`. Views never carry a `query` and have their own 25-per-target quota. Fixed at create.","enum":["filter","view"],"type":"string"},"lastUsedAt":{"description":"When it was last run; null if never.","format":"date-time","nullable":true,"type":"string"},"name":{"type":"string"},"operationId":{"description":"The operation to run `query` against (e.g. `listOriginators`); null for UI-only targets.","nullable":true,"type":"string"},"ownerName":{"description":"The owner's display name on a filter shared with you; null on your own filters (and when it cannot be resolved).","nullable":true,"type":"string"},"ownerUserId":{"description":"The user who owns it.","type":"string"},"permission":{"description":"Your role: `owner`, or the access it was shared with you at (`editor` / `viewer`; a filter visible to the whole workspace without an editor grant is `viewer`).","enum":["owner","editor","viewer"],"type":"string"},"query":{"additionalProperties":{"nullable":true},"nullable":true,"type":"object"},"queryVersion":{"type":"integer"},"stale":{"description":"True when the stored `query` no longer validates against the operation (its contract changed). Re-save or adjust before running.","type":"boolean"},"staleIssues":{"items":{"properties":{"message":{"type":"string"},"path":{"type":"string"}},"required":["path","message"],"type":"object"},"type":"array"},"target":{"description":"Which list the filter runs against. Market targets run against that entity's list operation (see `operationId`, e.g. listOriginators); `crm_people` / `crm_companies` are UI-only (filtered client-side).","enum":["originators","agents","companies","branches","offices","loans","properties","sales","crm_people","crm_companies"],"type":"string"},"uiState":{"additionalProperties":{"nullable":true},"nullable":true,"type":"object"},"uiStateVersion":{"type":"integer"},"unmapped":{"items":{"type":"string"},"type":"array"},"updatedAt":{"format":"date-time","type":"string"},"useCount":{"description":"How many times the filter has been run: fetched with `getSavedFilter`, or named in `X-MM-Saved-Filter-Id` on a successful list request (count requests do not count).","type":"integer"},"visibility":{"$ref":"#/components/schemas/SavedFilterVisibility"}},"required":["id","name","target","kind","icon","query","queryVersion","uiState","uiStateVersion","fidelity","unmapped","visibility","ownerUserId","ownerName","isOwner","permission","canEdit","canDelete","canManageSharing","useCount","lastUsedAt","operationId","stale","staleIssues","createdAt","updatedAt"],"type":"object"},"SavedFilterError":{"properties":{"code":{"description":"`QUOTA_EXCEEDED` (409, 25 per target + kind), `FORBIDDEN` (403, your access to a shared filter does not allow this), `NOT_ORG_MEMBER` (400, the user to share with is not in your workspace).","type":"string"},"error":{"type":"string"},"issues":{"items":{"properties":{"message":{"type":"string"},"path":{"type":"string"}},"required":["path","message"],"type":"object"},"type":"array"}},"required":["error"],"type":"object"},"SavedFilterGrantPermission":{"description":"The whole workspace's role on an `organization` filter; null for private / shared filters.","enum":["editor","viewer",null],"nullable":true,"type":"string"},"SavedFilterIcon":{"description":"Optional marker: one emoji. (Color dots and named icons were retired; existing ones were converted to the nearest emoji.)","nullable":true,"properties":{"emoji":{"maxLength":16,"minLength":1,"type":"string"},"type":{"enum":["emoji"],"type":"string"}},"required":["type","emoji"],"type":"object"},"SavedFilterList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/SavedFilter"},"type":"array"}},"required":["data"],"type":"object"},"SavedFilterShare":{"properties":{"createdAt":{"description":"Epoch milliseconds.","type":"number"},"email":{"nullable":true,"type":"string"},"id":{"type":"string"},"image":{"nullable":true,"type":"string"},"invitedByName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"permission":{"enum":["owner","editor","viewer"],"type":"string"},"userId":{"type":"string"}},"required":["id","userId","name","email","image","permission","invitedByName","createdAt"],"type":"object"},"SavedFilterShareableMember":{"properties":{"email":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"userId":{"type":"string"}},"required":["userId","name","email","image"],"type":"object"},"SavedFilterShareableMemberList":{"properties":{"data":{"properties":{"members":{"items":{"$ref":"#/components/schemas/SavedFilterShareableMember"},"type":"array"}},"required":["members"],"type":"object"}},"required":["data"],"type":"object"},"SavedFilterSharing":{"properties":{"canManageSharing":{"description":"The caller may grant / revoke and change visibility (owner or workspace admin).","type":"boolean"},"orgWidePermission":{"allOf":[{"$ref":"#/components/schemas/SavedFilterGrantPermission"},{"description":"On an `organization` filter, whether every member can edit or only view. Always `viewer` otherwise."}]},"owner":{"properties":{"email":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"userId":{"type":"string"}},"required":["userId","name","email","image"],"type":"object"},"ownerUserId":{"type":"string"},"shares":{"items":{"$ref":"#/components/schemas/SavedFilterShare"},"type":"array"},"visibility":{"$ref":"#/components/schemas/SavedFilterVisibility"}},"required":["visibility","ownerUserId","owner","canManageSharing","orgWidePermission","shares"],"type":"object"},"SavedFilterVisibility":{"description":"Who can see the filter: `private` — only its owner; `organization` — every member of the workspace (view; edit too when `orgWidePermission` is `editor`); `shared` — only the members it was shared with (see `/saved-filters/{id}/shares`).","enum":["private","organization","shared"],"type":"string"},"SearchTokenResponse":{"properties":{"expiresAt":{"description":"ISO-8601 expiry","type":"string"},"host":{"description":"Search host to query directly","type":"string"},"indexes":{"description":"Index names the token may search","items":{"type":"string"},"type":"array"},"token":{"description":"Scoped search token","type":"string"}},"required":["token","host","indexes","expiresAt"],"type":"object"},"SearchTokenUnavailable":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"},"SearchUnavailable":{"properties":{"error":{"description":"`search_timeout`: the search hit the request's time budget. `search_overloaded`: the cluster shed it (memory circuit breaker / full queue).","enum":["search_timeout","search_overloaded"],"type":"string"},"message":{"type":"string"},"retryable":{"enum":[true],"type":"boolean"}},"required":["error","message","retryable"],"type":"object"},"SegmentDimension":{"enum":["side","transactionType"],"type":"string"},"SideMetrics":{"properties":{"avgListPrice":{"type":"number"},"avgSalePrice":{"type":"number"},"units":{"type":"number"},"volume":{"type":"number"}},"required":["volume","units","avgSalePrice","avgListPrice"],"type":"object"},"SidedSummaryResponse":{"properties":{"current":{"$ref":"#/components/schemas/SummaryPeriod"},"previous":{"allOf":[{"$ref":"#/components/schemas/SummaryPeriod"},{"nullable":true}]}},"required":["current","previous"],"type":"object"},"SidedTimeSeriesBucket":{"properties":{"buyer":{"properties":{"units":{"type":"number"},"volume":{"type":"number"}},"required":["volume","units"],"type":"object"},"date":{"type":"string"},"dual":{"properties":{"units":{"type":"number"},"volume":{"type":"number"}},"required":["volume","units"],"type":"object"},"seller":{"properties":{"units":{"type":"number"},"volume":{"type":"number"}},"required":["volume","units"],"type":"object"},"total":{"properties":{"units":{"type":"number"},"volume":{"type":"number"}},"required":["volume","units"],"type":"object"}},"required":["date","total","buyer","seller","dual"],"type":"object"},"SidedTimeSeriesResponse":{"properties":{"current":{"items":{"$ref":"#/components/schemas/SidedTimeSeriesBucket"},"type":"array"},"previous":{"items":{"$ref":"#/components/schemas/SidedTimeSeriesBucket"},"nullable":true,"type":"array"}},"required":["current","previous"],"type":"object"},"SimpleExcludedCounts":{"description":"Per-measure count of documents this query's sentinel guard excluded — documents that carry the measure's field but whose value is an out-of-range fill. Compare against `units` to see what share of the matched population each figure was computed over. Empty when the entity's measures are unguarded.","properties":{"avgListPrice":{"type":"number"},"avgPrice":{"type":"number"},"volume":{"type":"number"}},"type":"object"},"SimpleMetrics":{"properties":{"avgListPrice":{"description":"Average list price. Omitted entirely for entities with no list-price column — absence means 'not available here', not zero. Excludes values outside 0–100,000,000 — the source encodes unknown values as an out-of-range fill, and averaging them raw is wrong by orders of magnitude. The bound is applied before the metric and is not part of the public filter surface, so an equivalent range filter will not reproduce this figure exactly.","type":"number"},"avgPrice":{"description":"Average sale price. Excludes values outside 0–100,000,000 — the source encodes unknown values as an out-of-range fill, and averaging them raw is wrong by orders of magnitude. The bound is applied before the metric and is not part of the public filter surface, so an equivalent range filter will not reproduce this figure exactly.","type":"number"},"excluded":{"$ref":"#/components/schemas/SimpleExcludedCounts"},"units":{"description":"Number of transactions","type":"number"},"volume":{"description":"Total volume in dollars. Excludes values outside 0–100,000,000 — the source encodes unknown values as an out-of-range fill, and averaging them raw is wrong by orders of magnitude. The bound is applied before the metric and is not part of the public filter surface, so an equivalent range filter will not reproduce this figure exactly.","type":"number"}},"required":["volume","units","avgPrice"],"type":"object"},"SimpleSummaryResponse":{"properties":{"completeness":{"$ref":"#/components/schemas/AnalyticsCompleteness"},"current":{"$ref":"#/components/schemas/SimpleMetrics"},"previous":{"allOf":[{"$ref":"#/components/schemas/SimpleMetrics"},{"nullable":true}]}},"required":["current","previous"],"type":"object"},"SimpleTimeSeriesBucket":{"properties":{"complete":{"description":"Whether this bucket's whole period is backed by data. `false` means the bucket extends past `completeness.through`, so it is built from a partial period and MUST NOT be compared against its neighbours or the same bucket a year earlier — a trailing bucket holding a few days of a month reads as a collapse. Absent on every bucket whenever `completeness` itself is absent; the two are emitted together or not at all.","type":"boolean"},"date":{"type":"string"},"excluded":{"description":"How many of this bucket's documents the measure's sentinel guard excluded — documents that carry the field but whose value is an out-of-range fill. Additive and optional: absent when the measure is unguarded (a document count, or a field with no fill values). Present per BUCKET because exclusion is not uniform — one period or slice can be almost entirely fill values while its neighbors are clean, and a single response-level total would hide exactly that.","type":"number"},"measureValue":{"description":"This bucket's value for the requested `measure` (`volume` when none was supplied). Null when the bucket has no in-bounds document for the measure's field — sentinel-filtered rows do not contribute, so an empty bucket reports null rather than 0.","nullable":true,"type":"number"},"segments":{"items":{"$ref":"#/components/schemas/SimpleTimeSeriesSegment"},"type":"array"},"units":{"description":"Number of transactions","type":"number"},"volume":{"description":"This bucket's volume in dollars. Excludes values outside 0–100,000,000 — the source encodes unknown values as an out-of-range fill, and averaging them raw is wrong by orders of magnitude. The bound is applied before the metric and is not part of the public filter surface, so an equivalent range filter will not reproduce this figure exactly.","type":"number"}},"required":["date","volume","units","measureValue"],"type":"object"},"SimpleTimeSeriesResponse":{"properties":{"completeness":{"$ref":"#/components/schemas/AnalyticsCompleteness"},"current":{"items":{"$ref":"#/components/schemas/SimpleTimeSeriesBucket"},"type":"array"},"measure":{"description":"Echo of the measure `measureValue` reports, so a caller never has to infer which metric it is plotting.","type":"string"},"previous":{"items":{"$ref":"#/components/schemas/SimpleTimeSeriesBucket"},"nullable":true,"type":"array"}},"required":["measure","current","previous"],"type":"object"},"SimpleTimeSeriesSegment":{"properties":{"id":{"description":"Machine value behind `label` when the bucket key is not itself the label. `lender`: `label` is the dictionary display name and `id` the normalized lender key — pass `id`, not `label`, back as a `lender` filter value. `conforming`: `label` is `conforming` / `nonConforming` and `id` the raw `true` / `false` flag. `titleCompany` (time-series segment): `label` is the most-used spelling and `id` the normalized name every spelling was merged under — match segments across buckets on `id`. Absent on slices whose `label` is already the machine value.","type":"string"},"label":{"type":"string"},"measureValue":{"description":"This segment's value for the requested `measure`. Null when the segment has no in-bounds document for the measure's field.","nullable":true,"type":"number"},"units":{"description":"Number of transactions","type":"number"},"volume":{"description":"This segment's volume in dollars. Excludes values outside 0–100,000,000 — the source encodes unknown values as an out-of-range fill, and averaging them raw is wrong by orders of magnitude. The bound is applied before the metric and is not part of the public filter surface, so an equivalent range filter will not reproduce this figure exactly.","type":"number"}},"required":["label","volume","units","measureValue"],"type":"object"},"SkipTraceAddress":{"additionalProperties":{"nullable":true},"nullable":true,"properties":{"addressValidity":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"county":{"nullable":true,"type":"string"},"formattedStreet":{"nullable":true,"type":"string"},"hash":{"nullable":true,"type":"string"},"houseNumber":{"nullable":true,"type":"string"},"state":{"nullable":true,"type":"string"},"street":{"nullable":true,"type":"string"},"streetNoUnit":{"nullable":true,"type":"string"},"zip":{"nullable":true,"type":"string"},"zipPlus4":{"nullable":true,"type":"string"}},"type":"object"},"SkipTraceEmail":{"additionalProperties":{"nullable":true},"properties":{"email":{"nullable":true,"type":"string"},"rank":{"nullable":true,"type":"number"},"tested":{"anyOf":[{"type":"boolean"},{"type":"string"},{"nullable":true}]}},"type":"object"},"SkipTraceName":{"nullable":true,"properties":{"first":{"nullable":true,"type":"string"},"full":{"nullable":true,"type":"string"},"last":{"nullable":true,"type":"string"},"middle":{"nullable":true,"type":"string"}},"type":"object"},"SkipTraceOwner":{"additionalProperties":{"nullable":true},"properties":{"mailingAddress":{"$ref":"#/components/schemas/SkipTraceAddress"},"name":{"$ref":"#/components/schemas/SkipTraceName"}},"type":"object"},"SkipTracePerson":{"additionalProperties":{"nullable":true},"properties":{"death":{"additionalProperties":{"nullable":true},"nullable":true,"properties":{"deceased":{"nullable":true,"type":"boolean"}},"type":"object"},"dnc":{"additionalProperties":{"nullable":true},"nullable":true,"properties":{"tcpa":{"nullable":true,"type":"boolean"}},"type":"object"},"emails":{"items":{"$ref":"#/components/schemas/SkipTraceEmail"},"nullable":true,"type":"array"},"litigator":{"nullable":true,"type":"boolean"},"mailingAddress":{"$ref":"#/components/schemas/SkipTraceAddress"},"meta":{"additionalProperties":{"nullable":true},"nullable":true,"properties":{"error":{"anyOf":[{"type":"string"},{"type":"boolean"},{"nullable":true}]},"matched":{"nullable":true,"type":"boolean"}},"type":"object"},"name":{"$ref":"#/components/schemas/SkipTraceName"},"phoneNumbers":{"items":{"$ref":"#/components/schemas/SkipTracePhone"},"nullable":true,"type":"array"},"property":{"$ref":"#/components/schemas/SkipTraceProperty"},"propertyAddress":{"$ref":"#/components/schemas/SkipTraceAddress"},"propertyOwner":{"description":"True when the provider identifies this person as an owner of record of the property. Matched persons are often NOT the owner (prior owner, tenant, relative) — especially on recent purchases. Absent when it can't be determined.","nullable":true,"type":"boolean"}},"type":"object"},"SkipTracePhone":{"additionalProperties":{"nullable":true},"properties":{"carrier":{"nullable":true,"type":"string"},"dnc":{"nullable":true,"type":"boolean"},"lastReportedDate":{"nullable":true,"type":"string"},"number":{"nullable":true,"type":"string"},"rank":{"description":"Provider's presentation order (1 = best). Not a probability.","nullable":true,"type":"number"},"reachable":{"nullable":true,"type":"boolean"},"score":{"nullable":true,"type":"number"},"tested":{"anyOf":[{"type":"boolean"},{"type":"string"},{"nullable":true}]},"type":{"nullable":true,"type":"string"}},"type":"object"},"SkipTraceProperty":{"additionalProperties":{"nullable":true},"nullable":true,"properties":{"address":{"$ref":"#/components/schemas/SkipTraceAddress"},"id":{"nullable":true,"type":"string"},"mailingAddress":{"$ref":"#/components/schemas/SkipTraceAddress"},"owner":{"additionalProperties":{"nullable":true},"description":"First owner of record (kept for older clients; see `owners`).","nullable":true,"properties":{"mailingAddress":{"$ref":"#/components/schemas/SkipTraceAddress"},"name":{"$ref":"#/components/schemas/SkipTraceName"}},"type":"object"},"owners":{"description":"Every owner of record, including co-owners.","items":{"$ref":"#/components/schemas/SkipTraceOwner"},"nullable":true,"type":"array"}},"type":"object"},"SortOrder":{"enum":["asc","desc"],"type":"string"},"SqlMonitor":{"properties":{"createdAt":{"type":"string"},"description":{"type":"string"},"id":{"type":"string"},"keys":{"items":{"type":"string"},"type":"array"},"name":{"type":"string"},"notify":{"additionalProperties":false,"properties":{"email":{"type":"boolean"},"inApp":{"type":"boolean"}},"required":["email","inApp"],"type":"object"},"rules":{"items":{"additionalProperties":false,"properties":{"column":{"type":"string"},"on":{"description":"`rows_added`: a key new since the previous run. `rows_removed`: a key gone since. `threshold`: `column` `op` `value` holds for a key now and did not before.","enum":["rows_added","rows_removed","threshold"],"type":"string"},"op":{"enum":[">=",">","<=","<"],"type":"string"},"value":{"type":"number"}},"required":["on"],"type":"object"},"type":"array"},"schedule":{"enum":["manual","daily","weekly"],"type":"string"},"sql":{"type":"string"},"status":{"enum":["active"],"type":"string"},"title":{"type":"string"},"type":{"enum":["sql"],"type":"string"},"updatedAt":{"type":"string"},"watching":{"items":{"properties":{"label":{"description":"What to show for it.","type":"string"},"type":{"enum":["nmls","agent","area","document","query"],"type":"string"}},"required":["type","label"],"type":"object"},"type":"array"}},"required":["id","type","name","title","sql","keys","rules","notify","status","schedule","watching","createdAt","updatedAt"],"type":"object"},"StartAlertDetectorRequest":{"properties":{"detectors":{"items":{"enum":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan","book_property","book_loan","area_property"],"type":"string"},"type":"array"},"dryRun":{"type":"boolean"},"limitPerDetector":{"exclusiveMinimum":true,"minimum":0,"type":"integer"},"userIds":{"items":{"type":"string"},"type":"array"}},"type":"object"},"StartAlertDetectorResponse":{"properties":{"data":{"properties":{"arn":{"type":"string"},"started":{"type":"boolean"}},"required":["arn","started"],"type":"object"}},"required":["data"],"type":"object"},"StopAlertDetectorRequest":{"properties":{"taskArn":{"minLength":1,"type":"string"}},"required":["taskArn"],"type":"object"},"StopAlertDetectorResponse":{"properties":{"data":{"properties":{"arn":{"type":"string"},"stopped":{"type":"boolean"}},"required":["arn","stopped"],"type":"object"}},"required":["data"],"type":"object"},"StudioCatalog":{"properties":{"data":{"properties":{"guidance":{"description":"How to write SQL that works here.","items":{"type":"string"},"type":"array"},"limits":{"properties":{"defaultRows":{"description":"Rows a question returns when `limit` is not set.","type":"number"},"heavyJobs":{"description":"A job saved with `size: heavy` gets these limits instead of `jobTimeoutSeconds` and `maxJobRows`. The SQL is the same: one read-only SELECT over the same tables. Absent while it cannot be reported.","properties":{"allowed":{"description":"Whether your organization can save and run `heavy` jobs. False: a heavy job is refused with `403 entitlement_missing`; ask your ModelMatch admin to enable heavy runs.","type":"boolean"},"maxRows":{"description":"Most rows a heavy job's result can hold.","type":"number"},"runCredits":{"description":"Credits one heavy job run that succeeds costs.","example":100,"type":"number"},"timeoutSeconds":{"description":"How long one heavy job run may run.","type":"number"}},"required":["allowed","timeoutSeconds","maxRows","runCredits"],"type":"object"},"jobRunCredits":{"description":"Credits one job run that succeeds costs.","example":10,"type":"number"},"jobTimeoutSeconds":{"description":"How long one job run may run.","type":"number"},"maxJobRows":{"description":"Most rows a job's result can hold.","type":"number"},"maxJobs":{"description":"Saved jobs per organization.","type":"number"},"maxRows":{"description":"Most rows one answer can carry.","type":"number"},"queryCreditsPerRow":{"description":"Credits one question costs per row it returns in `rows` (not per row it reads or counts).","example":1,"type":"number"},"queryMinCredits":{"description":"The least an answered question costs, however few rows it returns.","example":5,"type":"number"},"queryTimeoutSeconds":{"description":"How long one question may run.","type":"number"}},"required":["defaultRows","maxRows","queryTimeoutSeconds","jobTimeoutSeconds","maxJobs","maxJobRows","queryCreditsPerRow","queryMinCredits","jobRunCredits"],"type":"object"},"notes":{"description":"Things worth telling the user about what the catalog holds — for example that their CRM has no list shared with the whole organization yet, so it has no tables here. Empty when there is nothing to say.","items":{"type":"string"},"type":"array"},"tables":{"items":{"properties":{"columns":{"items":{"properties":{"description":{"description":"What the column means, in one line.","type":"string"},"key":{"description":"True for a key column of a job's result.","type":"boolean"},"name":{"type":"string"},"type":{"description":"SQL type of the column.","example":"VARCHAR","type":"string"}},"required":["name","type","description"],"type":"object"},"type":"array"},"completeThrough":{"description":"For a market table: the last day (YYYY-MM-DD) its records are treated as fully recorded. Later months are still filling in, so end trends and year-over-year windows here, not at today, and compare the same months of each year.","nullable":true,"type":"string"},"coverage":{"description":"What part of the data is available, when not all of it.","type":"string"},"dataThrough":{"description":"The most recent data the table contains (ISO 8601).","nullable":true,"type":"string"},"description":{"type":"string"},"job":{"description":"For a job's result: the job it came from.","properties":{"asOf":{"nullable":true,"type":"string"},"lastRunAt":{"type":"string"},"name":{"type":"string"},"previousTable":{"description":"Table holding the result of the run before the latest, for 'what changed' questions. Null until the job has run twice.","nullable":true,"type":"string"}},"required":["name","lastRunAt","asOf","previousTable"],"type":"object"},"kind":{"description":"`market` — market data, the same for everyone. `job_result` — the latest result of one of your organization's saved jobs. `upload` — a file your organization uploaded. `crm` — your organization's own CRM records (the lists shared with the whole organization and the records in them), refreshed about every 15 minutes. `model` — the scores of one of your organization's prediction models. `published` — a table ModelMatch computes and keeps up to date for every organization (its name starts with `mm_`): read-only, the same rows for everyone, and the right source for what it covers.","enum":["market","job_result","upload","crm","model","published"],"type":"string"},"name":{"description":"The name to use in SQL.","type":"string"},"notes":{"description":"What to know before writing SQL against this table.","items":{"type":"string"},"type":"array"},"published":{"description":"For a `published` table: who maintains it and when it was last refreshed.","properties":{"maintainedBy":{"description":"Who computes and maintains the table.","example":"ModelMatch","type":"string"},"refreshedAt":{"description":"When its rows were last computed (ISO 8601).","nullable":true,"type":"string"}},"required":["maintainedBy","refreshedAt"],"type":"object"},"refreshedAt":{"description":"For a `crm` table: when your organization's records were last copied in (ISO 8601). Changes made in the CRM since then appear after the next refresh.","nullable":true,"type":"string"},"rowCount":{"nullable":true,"type":"number"}},"required":["name","kind","description","notes","rowCount","columns"],"type":"object"},"type":"array"}},"required":["tables","notes","limits","guidance"],"type":"object"}},"required":["data"],"type":"object"},"StudioError":{"properties":{"code":{"description":"Stable code for the kind of failure: `not_a_select`, `multiple_statements`, `syntax_error`, `unknown_table`, `table_function_not_allowed`, `function_not_allowed`, `query_failed` (for example an unknown column), `timeout`, `result_too_large`, `resource_limit`, `invalid_job`, `job_not_found`, `job_exists`, `job_limit_reached`, `job_running`, `job_failed`, `busy`, `rate_limited`, `invalid_request` (the request itself is malformed), `no_organization`, `entitlement_missing` (a heavy job, which your organization has not enabled; `details.entitlementKey`), `entitlement_unavailable`, `studio_unavailable`.","example":"unknown_table","type":"string"},"details":{"description":"What the error is about, when known.","properties":{"availableTables":{"description":"Every table you can query.","items":{"type":"string"},"type":"array"},"column":{"description":"The column name that does not exist.","type":"string"},"entitlementKey":{"description":"For `entitlement_missing`: what your ModelMatch admin would enable.","type":"string"},"function":{"description":"The function that is not available.","type":"string"},"limit":{"description":"The limit that was reached.","type":"number"},"retryAfterSeconds":{"description":"How long to wait before trying again.","type":"number"},"suggestions":{"description":"Available names close to the one that was used.","items":{"type":"string"},"type":"array"},"table":{"description":"The table name that is not available.","type":"string"}},"type":"object"},"error":{"description":"What went wrong and what to do about it, in plain language.","type":"string"}},"required":["error","code"],"type":"object"},"StudioJob":{"properties":{"alerts":{"items":{"properties":{"column":{"description":"For `threshold`: a numeric column of the result.","type":"string"},"on":{"description":"`rows_added`: a key new since the previous run. `rows_removed`: a key gone since. `threshold`: `column` `op` `value` holds for a key now and did not before.","enum":["rows_added","rows_removed","threshold"],"type":"string"},"op":{"description":"For `threshold`: the comparison.","enum":[">=",">","<=","<"],"type":"string"},"value":{"description":"For `threshold`: the value to compare with.","type":"number"}},"required":["on"],"type":"object"},"type":"array"},"copiedFrom":{"description":"When it was saved as a copy: the job (`job`) or the ModelMatch table (`published`) it came from.","properties":{"job":{"type":"string"},"published":{"type":"string"}},"type":"object"},"createdAt":{"type":"string"},"createdBy":{"type":"string"},"description":{"type":"string"},"keys":{"items":{"type":"string"},"type":"array"},"lastRun":{"$ref":"#/components/schemas/StudioJobRun"},"limits":{"description":"What one run of this job may use, as things stand now.","properties":{"maxRows":{"description":"Most rows one run's result may hold.","type":"number"},"runsOn":{"description":"`dedicated`: each run gets capacity of its own, with more memory (a `heavy` job, when available). `shared`: runs on the shared capacity.","enum":["dedicated","shared"],"type":"string"},"timeoutSeconds":{"description":"How long one run may take before it is stopped.","type":"number"}},"required":["timeoutSeconds","maxRows","runsOn"],"type":"object"},"name":{"type":"string"},"nextRunAt":{"description":"When it next runs on its schedule. Null for `manual`.","nullable":true,"type":"string"},"notify":{"additionalProperties":false,"properties":{"email":{"type":"boolean"}},"required":["email"],"type":"object"},"perState":{"description":"Heavy only: per state, joined. Not for national totals.","type":"boolean"},"schedule":{"enum":["manual","daily","weekly"],"type":"string"},"size":{"description":"`heavy`: catalog `limits.heavyJobs` apply.","enum":["light","heavy"],"type":"string"},"sql":{"type":"string"},"table":{"description":"The table that holds the job's latest result, once it has run.","type":"string"},"updatedAt":{"type":"string"}},"required":["name","sql","schedule","keys","alerts","createdAt","updatedAt","nextRunAt","table","lastRun"],"type":"object"},"StudioJobDeleted":{"properties":{"data":{"properties":{"deleted":{"enum":[true],"type":"boolean"},"name":{"type":"string"}},"required":["deleted","name"],"type":"object"}},"required":["data"],"type":"object"},"StudioJobDetail":{"properties":{"data":{"properties":{"alerts":{"description":"Alert rules that matched on the latest successful run.","items":{"properties":{"events":{"items":{"properties":{"key":{"additionalProperties":{"nullable":true},"type":"object"},"previous":{"additionalProperties":{"nullable":true},"type":"object"},"row":{"additionalProperties":{"nullable":true},"type":"object"},"rule":{"type":"string"}},"required":["rule","key","row"],"type":"object"},"type":"array"},"rule":{"properties":{"column":{"description":"For `threshold`: a numeric column of the result.","type":"string"},"on":{"description":"`rows_added`: a key new since the previous run. `rows_removed`: a key gone since. `threshold`: `column` `op` `value` holds for a key now and did not before.","enum":["rows_added","rows_removed","threshold"],"type":"string"},"op":{"description":"For `threshold`: the comparison.","enum":[">=",">","<=","<"],"type":"string"},"value":{"description":"For `threshold`: the value to compare with.","type":"number"}},"required":["on"],"type":"object"},"total":{"description":"Rows the rule matched.","type":"number"}},"required":["rule","total","events"],"type":"object"},"type":"array"},"changes":{"description":"What changed in the latest successful run since the one before it. Null when there is no previous run or the job has no keys.","nullable":true,"properties":{"added":{"type":"number"},"changed":{"type":"number"},"keys":{"items":{"type":"string"},"type":"array"},"removed":{"type":"number"},"samples":{"properties":{"added":{"items":{"additionalProperties":{"nullable":true},"type":"object"},"type":"array"},"changed":{"items":{"properties":{"after":{"additionalProperties":{"nullable":true},"type":"object"},"before":{"additionalProperties":{"nullable":true},"type":"object"}},"required":["before","after"],"type":"object"},"type":"array"},"removed":{"items":{"additionalProperties":{"nullable":true},"type":"object"},"type":"array"}},"required":["added","removed","changed"],"type":"object"},"unchanged":{"type":"number"}},"required":["keys","added","removed","changed","unchanged","samples"],"type":"object"},"job":{"$ref":"#/components/schemas/StudioJob"},"result":{"description":"Where the job's rows are: query `table` like any other table. Null until the first successful run.","nullable":true,"properties":{"previousTable":{"nullable":true,"type":"string"},"table":{"type":"string"}},"required":["table","previousTable"],"type":"object"},"runs":{"description":"Newest first.","items":{"$ref":"#/components/schemas/StudioJobRun"},"type":"array"}},"required":["job","runs","changes","alerts","result"],"type":"object"}},"required":["data"],"type":"object"},"StudioJobFailed":{"properties":{"code":{"type":"string"},"details":{"description":"What the error is about, when known.","properties":{"availableTables":{"description":"Every table you can query.","items":{"type":"string"},"type":"array"},"column":{"description":"The column name that does not exist.","type":"string"},"entitlementKey":{"description":"For `entitlement_missing`: what your ModelMatch admin would enable.","type":"string"},"function":{"description":"The function that is not available.","type":"string"},"limit":{"description":"The limit that was reached.","type":"number"},"retryAfterSeconds":{"description":"How long to wait before trying again.","type":"number"},"suggestions":{"description":"Available names close to the one that was used.","items":{"type":"string"},"type":"array"},"table":{"description":"The table name that is not available.","type":"string"}},"type":"object"},"error":{"type":"string"},"run":{"$ref":"#/components/schemas/StudioJobRun"}},"required":["error","code"],"type":"object"},"StudioJobList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/StudioJob"},"type":"array"}},"required":["data"],"type":"object"},"StudioJobRequest":{"additionalProperties":false,"properties":{"alerts":{"description":"Changes between runs to flag; on a scheduled run a match is emailed to the creator.","items":{"properties":{"column":{"description":"For `threshold`: a numeric column of the result.","type":"string"},"on":{"description":"`rows_added`: a key new since the previous run. `rows_removed`: a key gone since. `threshold`: `column` `op` `value` holds for a key now and did not before.","enum":["rows_added","rows_removed","threshold"],"type":"string"},"op":{"description":"For `threshold`: the comparison.","enum":[">=",">","<=","<"],"type":"string"},"value":{"description":"For `threshold`: the value to compare with.","type":"number"}},"required":["on"],"type":"object"},"maxItems":5,"type":"array"},"copyFrom":{"description":"Copy one of your jobs by name; fields given override it.","type":"string"},"copyFromPublished":{"description":"Or copy a ModelMatch `mm_*` table's job.","type":"string"},"description":{"description":"What the job is for. Shown in the catalog.","maxLength":500,"type":"string"},"keys":{"description":"Columns identifying one row (e.g. `companyNmlsId`); needed for 'what changed' and alerts.","items":{"minLength":1,"type":"string"},"maxItems":8,"type":"array"},"name":{"description":"The job's name: lower-case letters, digits and underscores, starting with a letter. It is also the name of the table that holds the job's result.","example":"top_lenders_tx","pattern":"^[a-z][a-z0-9_]{0,62}$","type":"string"},"notify":{"additionalProperties":false,"properties":{"email":{"type":"boolean"}},"required":["email"],"type":"object"},"perState":{"description":"Heavy only: per state, joined. Not for national totals.","type":"boolean"},"schedule":{"description":"`manual` — runs only when asked. `daily` — about every 24 hours. `weekly` — every 7 days. Counted from when the job is saved.","enum":["manual","daily","weekly"],"type":"string"},"size":{"description":"`heavy`: more time and rows per run (catalog `limits.heavyJobs`), if enabled for the organization.","enum":["light","heavy"],"type":"string"},"sql":{"description":"One read-only SELECT, checked when the job is saved. It may use `$as_of`, the date of the run (a DATE), so the same job can be re-run for any day. Required unless copying.","maxLength":20000,"minLength":1,"type":"string"}},"required":["name"],"type":"object"},"StudioJobRun":{"nullable":true,"properties":{"alerts":{"description":"Alert rules that matched on this run.","items":{"properties":{"events":{"items":{"properties":{"key":{"additionalProperties":{"nullable":true},"type":"object"},"previous":{"additionalProperties":{"nullable":true},"type":"object"},"row":{"additionalProperties":{"nullable":true},"type":"object"},"rule":{"type":"string"}},"required":["rule","key","row"],"type":"object"},"type":"array"},"rule":{"properties":{"column":{"description":"For `threshold`: a numeric column of the result.","type":"string"},"on":{"description":"`rows_added`: a key new since the previous run. `rows_removed`: a key gone since. `threshold`: `column` `op` `value` holds for a key now and did not before.","enum":["rows_added","rows_removed","threshold"],"type":"string"},"op":{"description":"For `threshold`: the comparison.","enum":[">=",">","<=","<"],"type":"string"},"value":{"description":"For `threshold`: the value to compare with.","type":"number"}},"required":["on"],"type":"object"},"total":{"description":"Rows the rule matched.","type":"number"}},"required":["rule","total","events"],"type":"object"},"type":"array"},"asOf":{"description":"The date the run was as of (`$as_of`).","type":"string"},"baseline":{"description":"True for a job's first run: there is nothing to compare it with.","type":"boolean"},"changes":{"description":"What changed since the previous run, by key, with a few rows of each kind. Null on a first run or a job without keys.","nullable":true,"properties":{"added":{"type":"number"},"changed":{"type":"number"},"keys":{"items":{"type":"string"},"type":"array"},"removed":{"type":"number"},"samples":{"properties":{"added":{"items":{"additionalProperties":{"nullable":true},"type":"object"},"type":"array"},"changed":{"items":{"properties":{"after":{"additionalProperties":{"nullable":true},"type":"object"},"before":{"additionalProperties":{"nullable":true},"type":"object"}},"required":["before","after"],"type":"object"},"type":"array"},"removed":{"items":{"additionalProperties":{"nullable":true},"type":"object"},"type":"array"}},"required":["added","removed","changed"],"type":"object"},"unchanged":{"type":"number"}},"required":["keys","added","removed","changed","unchanged","samples"],"type":"object"},"delivery":{"description":"The email about `alerts`. Only a scheduled run where an alert matched has one.","properties":{"at":{"description":"When it last changed.","type":"string"},"email":{"description":"`pending` — waiting for the next scheduler tick. `sent` — emailed. `inbox` — in the creator's notifications, but their email for these is off. `off` — the job's `notify.email` is false. `skipped` — nobody to send to (`reason`). `expired` — not sent within a day. `failed` — could not be confirmed sent; never retried.","enum":["pending","sent","inbox","off","skipped","expired","failed"],"type":"string"},"reason":{"type":"string"}},"required":["email","at"],"type":"object"},"elapsedMs":{"type":"number"},"error":{"description":"Why the run failed.","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"finishedAt":{"type":"string"},"limits":{"description":"The limits this run had.","properties":{"maxRows":{"description":"Most rows one run's result may hold.","type":"number"},"timeoutSeconds":{"description":"How long one run may take before it is stopped.","type":"number"}},"required":["timeoutSeconds","maxRows"],"type":"object"},"perState":{"description":"True: the SQL ran once for each state (`perState`).","type":"boolean"},"rowCount":{"type":"number"},"runId":{"type":"string"},"runsOn":{"description":"`dedicated`: ran on capacity of its own, with more memory than an ordinary run. Absent: the shared capacity.","enum":["dedicated"],"type":"string"},"size":{"description":"`heavy`: ran with a heavy job's limits and price.","enum":["heavy"],"type":"string"},"startedAt":{"type":"string"},"states":{"description":"A per-state run: how each state went.","items":{"properties":{"attempts":{"description":"2 when the first try failed and it was tried again.","type":"number"},"elapsedMs":{"type":"number"},"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"rowCount":{"type":"number"},"state":{"description":"Two-letter state code; `other` for records whose state is not known.","type":"string"},"status":{"enum":["succeeded","failed"],"type":"string"}},"required":["state","status","attempts"],"type":"object"},"type":"array"},"status":{"enum":["running","succeeded","failed"],"type":"string"},"trigger":{"enum":["manual","schedule"],"type":"string"}},"required":["runId","trigger","status","startedAt","asOf"],"type":"object"},"StudioJobRunResult":{"properties":{"credits":{"description":"What this run cost.","properties":{"charged":{"description":"Credits this request cost. `0` when nothing was charged: a request from the web app, a run that is still going, or an account that is not metered.","example":5,"type":"number"},"pending":{"description":"On `202` only: credits that will be charged to your organization if the run that is still going finishes successfully. Nothing is charged if it fails.","example":10,"type":"number"},"remaining":{"description":"Credits left after the charge. Present only when something was charged and the balance is known.","example":1995,"type":"number"}},"required":["charged"],"type":"object"},"data":{"properties":{"run":{"$ref":"#/components/schemas/StudioJobRun"},"status":{"enum":["succeeded","running"],"type":"string"}},"required":["status","run"],"type":"object"}},"required":["data","credits"],"type":"object"},"StudioJobSaved":{"properties":{"data":{"$ref":"#/components/schemas/StudioJob"}},"required":["data"],"type":"object"},"StudioJobUpdate":{"additionalProperties":false,"properties":{"notify":{"additionalProperties":false,"properties":{"email":{"type":"boolean"}},"required":["email"],"type":"object"},"perState":{"description":"Heavy only: per state, joined. Not for national totals.","type":"boolean"},"size":{"description":"`heavy`: more time and rows per run (catalog `limits.heavyJobs`), if enabled for the organization.","enum":["light","heavy"],"type":"string"}},"type":"object"},"StudioModel":{"properties":{"asOf":{"nullable":true,"type":"string"},"basedOnPublished":{"description":"The ModelMatch model this one was copied from (its table); its card compares against it.","nullable":true,"type":"string"},"boosts":{"description":"The priority boosts (empty when none). When there are any, the scores table also has `priorityScore`, `priorityRank` and `priorityMultiplier`: sort by `priorityRank` for the boosted list; `score` and `rank` stay the model's own.","items":{"$ref":"#/components/schemas/StudioModelBoost"},"type":"array"},"card":{"additionalProperties":{"nullable":true},"description":"The report card (`ready` and `refused`). Read it to the person as it is written; do not round it up. Show the sentences and the fields named `label`, `…Label`, `sentence`, `detail`, `reason`, `summary` and `note`: they are written in plain words. The fields named `id`, `code`, `verdict`, `better`, `kind`, `table` and `column`, and everything under `technical` and `details`, are for programs: never show them to a person (say `verdictLabel` \"helped a little\", not `verdict` `helped_a_little`). `headline` — one sentence. `outcome.label` — what it predicts. `learnedFrom` — how many past cases and over what dates, and the later cases it was tested on; for a model on the person's own outcomes, `learnedFrom.funnel` — the rows in their file, then how many had a date and an outcome, matched a home, had history before their date and were used, each with the reason rows were dropped (`funnel.sentence` says it in one line). `lift.top10` (and `lift.top1` on large tests) — `modelPer100`, `randomPer100`, `bestSimpleRulePer100` and a ready-made `sentence`. `checks` — three, each `passed` true or false, with a `label` and a `detail`: beats the best simple rule, finds nothing when the outcomes are shuffled, holds up across time periods. `dataPoints.ranking` — each data point's `label`, its share, a `verdictLabel` and a `sentence`, and `dataPoints.summary`. `comparison` — the person's picks against every available data point (`sentence`, `betterLabel`) and `worthAdding`. `changeFromPrevious.sentence` — what changed since the version it replaced or was based on. `calibration.calibrated` — only when true may a home's estimated chance be called a chance; otherwise scores are a ranking; `calibration.note` says it. `caution` — when present, say it first. `caveats` — say them. `refusal` — `reason` and `whatWouldHelp` when refused. `trace` — the final training trace, the same shape as `progress.trace`, kept so a progress screen can replay how the model learned (getStudioModel only: listStudioModels leaves it out to stay small).","nullable":true,"type":"object"},"createdAt":{"type":"string"},"createdBy":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"error":{"nullable":true,"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"expectedMinutes":{"description":"While a run is going (training, or a refresh): how long a run like it takes from start to finish, in minutes. It depends on the size of the state: a couple of minutes for a small one, 15 to 25 for the largest. An estimate. Null when nothing is running.","nullable":true,"properties":{"high":{"type":"number"},"low":{"type":"number"}},"required":["low","high"],"type":"object"},"featureLabels":{"description":"The data points by their plain labels, in the same order as `features`.","items":{"type":"string"},"type":"array"},"features":{"items":{"$ref":"#/components/schemas/StudioModelDataPoint"},"type":"array"},"featuresChosen":{"description":"True when the data points were picked; false when the model uses every market data point.","type":"boolean"},"horizonMonths":{"nullable":true,"type":"number"},"name":{"type":"string"},"nextRunAt":{"nullable":true,"type":"string"},"outcome":{"nullable":true,"type":"string"},"outcomeLabel":{"description":"What the model predicts, in plain words. Show a person this, `populationLabel` and `featureLabels`; `outcome`, `population` and `features` are the request's own values, for programs.","type":"string"},"outcomeOptions":{"additionalProperties":{"type":"number"},"description":"The outcome's settings the request picked; absent when each is at its default.","type":"object"},"outcomeSource":{"additionalProperties":false,"nullable":true,"properties":{"dateColumn":{"description":"Each row's date (a date column): the day you would have wanted the prediction. Only earlier records are used.","example":"lead_date","maxLength":100,"minLength":1,"type":"string"},"key":{"$ref":"#/components/schemas/StudioModelKey"},"labelColumn":{"description":"What happened: two values (won/lost, yes/no, 1/0).","example":"result","maxLength":100,"minLength":1,"type":"string"},"positiveValues":{"description":"Values of `labelColumn` that mean it happened, when not plainly won/yes/true/1.","example":["Closed - Funded"],"items":{"maxLength":100,"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"table":{"description":"Your uploaded table: one row per known case.","example":"upload_my_deals","maxLength":100,"minLength":1,"type":"string"}},"required":["table","labelColumn","dateColumn","key"],"type":"object"},"population":{"$ref":"#/components/schemas/StudioModelPopulation"},"populationLabel":{"description":"Who is scored, in plain words.","type":"string"},"progress":{"description":"While a run is going — a new model training, a retrain of a ready model (which stays `ready`, with its current card and scores, until the new version is published) or a re-score: the step it is on, how long it has been, and how long is left (an estimate). Tell the person the step and the remaining range, as a range. Null when nothing is running.","nullable":true,"properties":{"elapsedSeconds":{"description":"Seconds since the run was started.","type":"number"},"expectedMinutes":{"description":"A range of minutes, `low` to `high`. An estimate from earlier runs of the same size, not a promise: say it as a range (\"about 13 to 23 minutes\").","nullable":true,"properties":{"high":{"type":"number"},"low":{"type":"number"}},"required":["low","high"],"type":"object"},"kind":{"description":"`train` — a new model, a new version or a retrain (`refresh` with `retrain: true`): the report card is rebuilt, and `trace` appears once learning starts. `score` — a re-score with the trained model as it is: three steps and no trace.","enum":["train","score"],"type":"string"},"note":{"description":"Says that the times are estimates, or that the run is past its estimate and still going. Pass it on.","type":"string"},"remainingMinutes":{"description":"What is left of the estimate. Null when there is no estimate for this run.","nullable":true,"properties":{"high":{"type":"number"},"low":{"type":"number"}},"required":["low","high"],"type":"object"},"stage":{"description":"The step the run is on, numbered: \"step 3 of 6: building past cases to learn from\". Steps only ever go up.","type":"string"},"startedAt":{"type":"string"},"step":{"type":"number"},"steps":{"type":"number"},"trace":{"description":"The live training trace, once training has started (absent before). Poll the model every few seconds to animate it; when the model is done the final one is `card.trace`. What a progress screen can draw while a model trains, and replay after: the backtest grid, the score by round, and how much each chosen data point matters as the model learns. Rewritten about once a second while learning; at most about 16 KB. Aggregates only: no home, row or id, and data points by their labels.","properties":{"backtest":{"description":"The backtest replay: in each period the model had not seen, its cases ranked by the model's score and cut into columns, best-scored first.","properties":{"frames":{"description":"The grid as the model learned, oldest first, for replay (thinned to fit; the first and the latest are kept). Column sizes are the period's `columnCases`.","items":{"properties":{"final":{"description":"True on the last frame: the model that was kept (at `bestRound`).","type":"boolean"},"hits":{"description":"`hits` for each period, in the order of `periods`.","items":{"items":{"type":"number"},"type":"array"},"type":"array"},"round":{"type":"number"},"seq":{"description":"Counts up with every frame drawn.","type":"number"}},"required":["seq","round","hits"],"type":"object"},"type":"array"},"minCasesPerColumn":{"description":"Every column holds at least this many cases: with fewer cases the columns are merged, and a period too small for four columns has none.","type":"number"},"periods":{"description":"One row of columns per held-out test period, oldest first: the hero grid. Aggregate counts only.","items":{"properties":{"cases":{"description":"Cases in this period the grid is drawn from (an even sample of at most 60,000 across all periods on a very large test).","type":"number"},"columnCases":{"description":"Cases per column. Column 1 holds the cases the model scored highest, the last the lowest. Sizes differ by at most one.","items":{"type":"number"},"type":"array"},"columns":{"description":"How many columns this period is cut into (up to 56; 0 when it has too few cases to show).","type":"number"},"hits":{"description":"How many cases in each column had the outcome, as the model ranks them now. `hits[i] / columnCases[i]` is the column's hit rate.","items":{"type":"number"},"type":"array"},"label":{"description":"The period in plain words (\"January 2024\").","type":"string"},"period":{"description":"The first day of the held-out test period (YYYY-MM-DD).","type":"string"},"simpleRuleHits":{"description":"The same, with the cases ranked by the best simple rule instead (the comparison the card's checks use). It does not change while training.","items":{"type":"number"},"type":"array"},"verdict":{"description":"Once the checks are read: `ahead`, `level`, `behind` or `unknown` (for programs).","type":"string"},"verdictLabel":{"description":"The verdict in plain words: \"beat the simple rule\", \"kept up with the simple rule\", \"fell behind the simple rule\".","type":"string"},"withTheOutcome":{"type":"number"}},"required":["period","label","cases","withTheOutcome","columns","columnCases","hits","simpleRuleHits"],"type":"object"},"type":"array"}},"required":["minCasesPerColumn","periods","frames"],"type":"object"},"bestRound":{"description":"Once fitting is done: the round that was kept. Rounds after it were tried and discarded because they stopped helping. Null while learning.","nullable":true,"type":"number"},"fieldFrames":{"description":"How the shares evolved: each frame's `shares` lines up with `fields` by position. At most 24 frames, oldest first.","items":{"properties":{"round":{"type":"number"},"shares":{"items":{"type":"number"},"type":"array"}},"required":["round","shares"],"type":"object"},"type":"array"},"fields":{"description":"The data points that were chosen, in the order they were chosen.","items":{"properties":{"label":{"description":"The data point, as the person picked it.","type":"string"},"sharePercent":{"description":"How much the model leans on this data point right now, as a share of 100 across the chosen data points. Not how much it causes the outcome. When the run is done this is the card's own share.","type":"number"},"source":{"description":"`market` or `upload` (for programs).","type":"string"},"sourceLabel":{"description":"\"market data\" or \"your own data\".","type":"string"}},"required":["label","source","sourceLabel","sharePercent"],"type":"object"},"type":"array"},"phase":{"description":"`learning` — the model is being fitted round by round; `checking` — fitting is done and the checks are running (shuffled outcomes, the comparison with every data point, scoring); `done` — finished, see `result`; `refused` — the model was not trained, see `rejected` and `result`. Only moves forward.","example":"learning","type":"string"},"phaseLabel":{"description":"`phase` in plain words, for a person.","example":"Learning from past cases","type":"string"},"rejected":{"description":"Data points turned away before training, each with the reason in plain words. Empty when none were.","items":{"properties":{"label":{"type":"string"},"reason":{"type":"string"}},"required":["label","reason"],"type":"object"},"type":"array"},"result":{"description":"When the run is done (or refused).","properties":{"caution":{"description":"True when the model passed but fell behind the simple rule in part of the test period. Say so first.","type":"boolean"},"label":{"description":"The result in plain words.","type":"string"},"status":{"description":"`ready` or `refused` (for programs).","type":"string"}},"required":["status","caution","label"],"type":"object"},"round":{"description":"The boosting round the model has reached so far.","type":"number"},"rounds":{"description":"The model's score by boosting round, for a line chart.","properties":{"label":{"description":"What the curve shows, in plain words.","type":"string"},"lowerIsBetter":{"type":"boolean"},"points":{"description":"`[round, value]` pairs in round order, at most about 100 (thinned evenly as rounds go on; the latest round is always last). One value per round, measured on the cases held back to tune the model.","example":[[1,0.39],[40,0.322],[107,0.3186]],"items":{"items":{"type":"number"},"type":"array"},"type":"array"}},"required":["label","lowerIsBetter","points"],"type":"object"},"update":{"description":"Counts up by one every time the trace is rewritten (about once a second while learning). Use it to tell a new trace from one you already drew.","type":"number"},"version":{"description":"Shape version of this block. `1` today.","type":"number"}},"required":["version","phase","phaseLabel","update","round","bestRound","rounds","fields","fieldFrames","rejected","backtest"],"type":"object"}},"required":["stage","startedAt"],"type":"object"},"recencyWeighting":{"description":"Favor recent past cases while learning: `moderate` (weight halves per 24 months back) or `strong` (per 12). Default `off`.","enum":["off","moderate","strong"],"type":"string"},"refresh":{"description":"A refresh in progress (a re-score, or a retrain of a model that has a version: `progress` has its steps), or why the last one produced nothing (the earlier scores stay).","nullable":true,"properties":{"elapsedSeconds":{"description":"While it runs: seconds since it started. `expectedMinutes` on the model says how long a refresh takes.","type":"number"},"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"startedAt":{"type":"string"},"status":{"enum":["running","failed"],"type":"string"}},"required":["status"],"type":"object"},"schedule":{"description":"How often the scores are refreshed: `manual` (when you ask), `weekly` or `monthly`.","enum":["manual","weekly","monthly"],"type":"string"},"scope":{"description":"Where the model looks: exactly one of `state`, `states`, `counties`, `zipCodes` or `national` (the same form the request gave), and `label`. A model from before scopes could be wider has `state`.","properties":{"counties":{"description":"Counties: their five-digit county codes.","items":{"type":"string"},"type":"array"},"label":{"description":"Where the model looks, in plain words: \"TX\", \"OK and TX\", \"12 counties\", \"the whole country\". Show a person this.","type":"string"},"national":{"description":"True: the whole country.","type":"boolean"},"state":{"description":"One state: its two-letter code.","type":"string"},"states":{"description":"Several states: their two-letter codes.","items":{"type":"string"},"type":"array"},"zipCodes":{"description":"ZIP codes: five digits each.","items":{"type":"string"},"type":"array"}},"type":"object"},"scores":{"description":"Where the scores are. Null: this model has no scores table.","nullable":true,"properties":{"asOf":{"description":"The date the scores are as of (YYYY-MM-DD).","type":"string"},"refreshedAt":{"type":"string"},"rows":{"type":"number"},"table":{"description":"The table to query, for example with runStudioQuery.","type":"string"}},"required":["table","rows","asOf","refreshedAt"],"type":"object"},"size":{"description":"`heavy`: the organization has larger model runs enabled, so this model's runs read more market data, keep a longer scores table and run on a larger machine, at the heavy price (`heavyModels` on getStudioModelOptions). `standard` otherwise.","enum":["standard","heavy"],"type":"string"},"status":{"description":"`training` — still working; ask again in a minute. `ready` — it passed its checks and has scores. `refused` — it was trained, or checked, and is not dependable enough to publish: `card.refusal` says why and what would help; it has no scores. `failed` — something went wrong on our side (`error`); nothing was charged.","enum":["training","ready","refused","failed"],"type":"string"},"subject":{"description":"Who or what the model scores: `home`, `loan_officer`, `agent`, `agent_lo_pair` or `company` (a `subjects[].id` from getStudioModelOptions).","type":"string"},"table":{"description":"The table the scores are queried as. It exists only while `scores` is not null.","type":"string"},"updatedAt":{"type":"string"},"version":{"type":"number"}},"required":["name","table","description","status","version","outcome","horizonMonths","population","features","featuresChosen","scope","asOf","outcomeSource","schedule","nextRunAt","createdBy","createdAt","updatedAt","progress","card","scores","refresh","error"],"type":"object"},"StudioModelBoost":{"additionalProperties":false,"properties":{"multiply":{"maximum":3,"minimum":0.5,"type":"number"},"when":{"additionalProperties":false,"properties":{"column":{"type":"string"},"gte":{"type":"number"},"in":{"items":{"type":"string"},"type":"array"},"lte":{"type":"number"},"notIn":{"items":{"type":"string"},"type":"array"},"onOrAfter":{"type":"string"},"onOrBefore":{"type":"string"}},"required":["column"],"type":"object"}},"required":["when","multiply"],"type":"object"},"StudioModelCreate":{"additionalProperties":false,"properties":{"asOf":{"description":"Score as of this date (YYYY-MM-DD), from records before it. Omit for today, at every refresh.","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"basedOn":{"description":"Another of your models to start from: what this request omits is taken from it; the card compares the two.","pattern":"^[a-z][a-z0-9_]{2,39}$","type":"string"},"basedOnPublished":{"description":"Copy a ModelMatch model (`mm_model_*` table); fields given override it.","type":"string"},"boosts":{"description":"After the model: matching homes' score × `multiply` is `priorityScore`; `score` and the card are unchanged. Text: `in`/`notIn`; numbers: `gte`/`lte`; dates: `onOrAfter`/`onOrBefore`.","items":{"$ref":"#/components/schemas/StudioModelBoost"},"maxItems":5,"type":"array"},"description":{"description":"What the model is for, in a sentence.","maxLength":500,"type":"string"},"features":{"description":"The data points the model may use: the ones the person believes matter. The model is trained on exactly these, and its report card says how much each one mattered and how the picks compare with using everything. Leave it out to use the outcome's default list (`outcomes[].dataPoints` in getStudioModelOptions; else every market data point).","items":{"$ref":"#/components/schemas/StudioModelDataPoint"},"maxItems":60,"type":"array"},"horizonMonths":{"description":"How far ahead to predict a market outcome, in months. Default: the outcome's `defaultHorizonMonths` (12 for most). An outcome with `horizons` in getStudioModelOptions takes only those.","maximum":24,"minimum":1,"type":"integer"},"name":{"description":"The model's name: 3 to 40 lower-case letters, digits and underscores, starting with a letter. Its scores are the table `model_<name>`.","example":"refi_watch","pattern":"^[a-z][a-z0-9_]{2,39}$","type":"string"},"outcome":{"description":"What to predict: an outcome id from getStudioModelOptions. Omit with `outcomeSource`.","example":"new_mortgage","maxLength":100,"minLength":1,"type":"string"},"outcomeOptions":{"additionalProperties":{"type":"number"},"description":"Settings of the outcome, each one of the values its `outcomes[].options` lists, for example `{\"factor\": 0.75}` for an agent who loses a quarter of their share instead of half. Leave it out for the defaults. Market outcomes only.","example":{"factor":0.75},"type":"object"},"outcomeSource":{"$ref":"#/components/schemas/StudioModelOutcomeSource"},"population":{"$ref":"#/components/schemas/StudioModelPopulation"},"recencyWeighting":{"description":"Favor recent past cases while learning: `moderate` (weight halves per 24 months back) or `strong` (per 12). Default `off`.","enum":["off","moderate","strong"],"type":"string"},"replace":{"description":"A new version of the model of this name (say, other picks): the card says what changed; the old scores come down while it trains.","type":"boolean"},"schedule":{"description":"How often the scores are refreshed: `manual` (when you ask), `weekly` or `monthly`.","enum":["manual","weekly","monthly"],"type":"string"},"scope":{"additionalProperties":false,"description":"Where the model looks: give exactly ONE of `state`, `states`, `counties`, `zipCodes` or `national: true`. Each subject lists the forms it takes (`subjects[].scopeKinds` in getStudioModelOptions; loan officers: `state`, `states`, `national`). Sampling and size limits apply to the whole area. Required unless `basedOn` supplies it.","properties":{"counties":{"description":"Counties: five-digit county codes, which may span states. Homes only.","example":["48201"],"items":{"pattern":"^\\d{5}$","type":"string"},"maxItems":500,"minItems":1,"type":"array"},"national":{"description":"`true`: the whole country.","type":"boolean"},"state":{"description":"One state: its two-letter code.","example":"TX","maxLength":2,"minLength":2,"type":"string"},"states":{"description":"Several states: two-letter codes.","example":["OK","TX"],"items":{"maxLength":2,"minLength":2,"type":"string"},"maxItems":60,"minItems":1,"type":"array"},"zipCodes":{"description":"ZIP codes: five digits each. Homes only.","example":["78701"],"items":{"pattern":"^\\d{5}$","type":"string"},"maxItems":2000,"minItems":1,"type":"array"}},"type":"object"},"subject":{"description":"Who or what the model scores: `home` (default), `loan_officer`, `agent`, `agent_lo_pair` (an agent and a loan officer together) or `company`, a `subjects[].id` from getStudioModelOptions (which lists only the subjects available). Each subject has its own outcomes, populations, data points and upload keys.","example":"loan_officer","maxLength":40,"minLength":1,"type":"string"}},"required":["name"],"type":"object"},"StudioModelCreated":{"properties":{"credits":{"$ref":"#/components/schemas/StudioModelCredits"},"data":{"$ref":"#/components/schemas/StudioModel"}},"required":["data","credits"],"type":"object"},"StudioModelCredits":{"properties":{"charged":{"description":"Credits this call charged: 50 when it is the first to read a model that passed, 10 when it is the first to read refreshed scores, otherwise 0. A finished model that nobody reads is charged to the organization on its own, usually within two hours; either way a run is charged once.","type":"number"},"pending":{"description":"Where a run was just started: the credits that will be charged when it finishes with a model that passes its checks (or with refreshed scores). Nothing is charged for a model that is refused or fails.","type":"number"},"remaining":{"description":"Your balance after the charge, when one was made.","type":"number"}},"required":["charged"],"type":"object"},"StudioModelDataPoint":{"additionalProperties":false,"properties":{"column":{"description":"For `upload`: a column known on each row's date, not recorded after the outcome.","example":"lead_source","maxLength":100,"minLength":1,"type":"string"},"direction":{"description":"`increasing`: a higher value never lowers the score; `decreasing`: never raises it. Numbers, dates only.","enum":["increasing","decreasing"],"type":"string"},"id":{"description":"For `market`: the data point's id.","example":"rate_incentive","maxLength":100,"minLength":1,"type":"string"},"knownAt":{"description":"For `upload`, optional: a date column saying when the value became known.","maxLength":100,"minLength":1,"type":"string"},"source":{"description":"`market` (give `id`) or `upload` (a column of your outcomes table: `table`, `column`).","enum":["market","upload"],"type":"string"},"table":{"description":"For `upload`: the outcomes table.","example":"upload_my_deals","maxLength":100,"minLength":1,"type":"string"}},"required":["source"],"type":"object"},"StudioModelDeleted":{"properties":{"data":{"properties":{"deleted":{"enum":[true],"type":"boolean"},"name":{"type":"string"}},"required":["deleted","name"],"type":"object"}},"required":["data"],"type":"object"},"StudioModelError":{"properties":{"code":{"description":"Stable code. The request: `invalid_request`, `invalid_model`, `invalid_model_name`, `unknown_outcome`, `unknown_data_point`, `blocked_data_point` (a data point that describes today, not the as-of date), `unknown_table`, `unknown_column`, `unsupported_key`, `direction_not_allowed` (a direction on a data point that is not a number), `invalid_boost`. The model: `model_not_found`, `published_model_not_found` (`basedOnPublished` names no published model), `model_exists`, `model_limit_reached`, `model_training_in_progress`, `model_not_ready`. Your own data: `no_date_column`, `data_point_is_outcome`, `data_point_is_key`, `data_point_after_outcome`, `data_point_needs_outcomes_table`, `data_points_missing_for_population`, `too_few_examples`, `too_few_positives`, `outcomes_all_one_class`, `outcome_dates_in_future`, `match_rate_too_low`. Never allowed: `protected_characteristic` (400: a data point, own column, direction rule or boost about race, color, ethnicity, national origin, religion, sex or gender, familial status, disability, age, marital status or receipt of public assistance; `details.fields`, `details.characteristics`; also when refreshing a model that has one). Shared: `busy`, `rate_limited`, `no_organization`, `models_unavailable`, `studio_unavailable`.","example":"match_rate_too_low","type":"string"},"details":{"description":"What the error is about, when known: the `table`, `column` or `dataPoint`, `suggestions`, and the numbers behind a refusal (`examples`, `positives`, `minimum`, `rows`, `matched`, `matchRate`, `limit`, `retryAfterSeconds`); for `protected_characteristic`, every offending field (`fields`) and what they are about (`characteristics`).","properties":{"availableTables":{"items":{"type":"string"},"type":"array"},"characteristics":{"items":{"type":"string"},"type":"array"},"column":{"type":"string"},"dataPoint":{"type":"string"},"entitlementKey":{"type":"string"},"examples":{"type":"number"},"fields":{"items":{"type":"string"},"type":"array"},"function":{"type":"string"},"limit":{"type":"number"},"matchRate":{"type":"number"},"matched":{"type":"number"},"minimum":{"type":"number"},"positives":{"type":"number"},"retryAfterSeconds":{"type":"number"},"rows":{"type":"number"},"running":{"type":"number"},"suggestions":{"items":{"type":"string"},"type":"array"},"table":{"type":"string"}},"type":"object"},"error":{"description":"What went wrong and what to do about it, in plain language.","type":"string"}},"required":["error","code"],"type":"object"},"StudioModelKey":{"additionalProperties":false,"properties":{"columns":{"example":["address_key","zip"],"items":{"maxLength":100,"minLength":1,"type":"string"},"maxItems":2,"minItems":1,"type":"array"},"kind":{"description":"Homes: `property_address` (`address_key`, ZIP), `property_id` or `loan_id`. Loan officers: `nmls_id` (the NMLS id column). Agents: `agent_id` (the agent id column). Agent and loan officer pairs: `agent_lo_pair` (two columns: the agent id, then the NMLS id). Companies: `company_nmls_id`. `subjects[].keyKinds` in getStudioModelOptions lists each subject's.","example":"property_address","maxLength":40,"minLength":1,"type":"string"}},"required":["kind","columns"],"type":"object"},"StudioModelList":{"properties":{"credits":{"$ref":"#/components/schemas/StudioModelCredits"},"data":{"items":{"$ref":"#/components/schemas/StudioModel"},"type":"array"}},"required":["data","credits"],"type":"object"},"StudioModelOptions":{"properties":{"earliestAsOf":{"type":"string"},"limits":{"properties":{"maxHorizonMonths":{"type":"number"},"maxModelsPerOrganization":{"type":"number"},"maxUploadedDataPoints":{"type":"number"},"minHorizonMonths":{"type":"number"},"scoresTableMaxRows":{"type":"number"},"uploadedOutcomes":{"properties":{"minExamples":{"type":"number"},"minMatchRate":{"type":"number"},"minNegatives":{"type":"number"},"minPositives":{"type":"number"}},"required":["minExamples","minPositives","minNegatives","minMatchRate"],"type":"object"}},"required":["maxModelsPerOrganization","minHorizonMonths","maxHorizonMonths","maxUploadedDataPoints","uploadedOutcomes","scoresTableMaxRows"],"type":"object"},"outcomes":{"items":{"properties":{"dataPoints":{"description":"The data points a model of this outcome uses when `features` is left out (the default list). Absent: every data point of its subject. Any other data point of the subject can still be picked by id.","items":{"type":"string"},"type":"array"},"defaultHorizonMonths":{"type":"number"},"description":{"type":"string"},"horizons":{"description":"The `horizonMonths` this outcome takes, the default first. Absent: any from `limits.minHorizonMonths` to `limits.maxHorizonMonths`.","items":{"type":"number"},"type":"array"},"id":{"type":"string"},"label":{"type":"string"},"options":{"additionalProperties":{"properties":{"default":{"type":"number"},"values":{"items":{"type":"number"},"type":"array"}},"required":["default","values"],"type":"object"},"description":"Settings the person may pick (`outcomeOptions`), each a closed list with its default: a threshold or a factor. Absent: none.","type":"object"},"populations":{"description":"The population kinds this outcome can be predicted for (a new pair only among pairs that have not dealt). Absent: every population of its subject.","items":{"type":"string"},"type":"array"},"question":{"type":"string"}},"required":["id","label","question","description","defaultHorizonMonths"],"type":"object"},"type":"array"},"populations":{"items":{"properties":{"description":{"type":"string"},"kind":{"type":"string"},"label":{"type":"string"},"requires":{"items":{"type":"string"},"type":"array"}},"required":["kind","label","description","requires"],"type":"object"},"type":"array"},"protectedCharacteristics":{"description":"What a model can never use, whoever asks: a data point, one of your own columns, a direction rule or a priority boost about one of these is refused with `400 protected_characteristic`. Nothing unlocks it.","properties":{"characteristics":{"items":{"properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"type":"object"},"type":"array"},"note":{"type":"string"}},"required":["note","characteristics"],"type":"object"},"scope":{"description":"Where a model can look: one state, several states, counties, ZIP codes or the whole country, with the most values each may list.","properties":{"description":{"type":"string"},"kinds":{"items":{"properties":{"description":{"type":"string"},"field":{"type":"string"},"kind":{"type":"string"},"label":{"type":"string"},"maxValues":{"nullable":true,"type":"number"}},"required":["kind","label","description","field"],"type":"object"},"type":"array"}},"required":["description","kinds"],"type":"object"},"subjects":{"description":"What can be scored: `home` (the default; its lists are also the top-level `outcomes`, `populations` and `themes`), `loan_officer`, `agent`, `agent_lo_pair` and `company`. Only subjects available to build are listed. Each subject has its own outcomes, populations, data points, upload keys and scope forms; a model uses one subject's.","items":{"properties":{"boostColumns":{"items":{"properties":{"column":{"type":"string"},"label":{"type":"string"},"needsFairLendingReview":{"type":"boolean"},"operators":{"items":{"type":"string"},"type":"array"},"type":{"type":"string"}},"required":["column","label","type","needsFairLendingReview","operators"],"type":"object"},"type":"array"},"default":{"type":"boolean"},"gatedEntitlements":{"additionalProperties":{"type":"string"},"type":"object"},"id":{"description":"The `subject` to send: `home`, `loan_officer`, `agent`, `agent_lo_pair` or `company`.","type":"string"},"keyKinds":{"items":{"properties":{"columnCount":{"type":"number"},"columns":{"type":"string"},"kind":{"type":"string"},"label":{"type":"string"},"note":{"type":"string"}},"required":["kind","label","columns","note"],"type":"object"},"type":"array"},"label":{"type":"string"},"minPositivesPerTestQuarter":{"nullable":true,"type":"number"},"nouns":{"properties":{"plural":{"type":"string"},"singular":{"type":"string"}},"required":["singular","plural"],"type":"object"},"outcomes":{"items":{"properties":{"dataPoints":{"description":"The data points a model of this outcome uses when `features` is left out (the default list). Absent: every data point of its subject. Any other data point of the subject can still be picked by id.","items":{"type":"string"},"type":"array"},"defaultHorizonMonths":{"type":"number"},"description":{"type":"string"},"horizons":{"description":"The `horizonMonths` this outcome takes, the default first. Absent: any from `limits.minHorizonMonths` to `limits.maxHorizonMonths`.","items":{"type":"number"},"type":"array"},"id":{"type":"string"},"label":{"type":"string"},"options":{"additionalProperties":{"properties":{"default":{"type":"number"},"values":{"items":{"type":"number"},"type":"array"}},"required":["default","values"],"type":"object"},"description":"Settings the person may pick (`outcomeOptions`), each a closed list with its default: a threshold or a factor. Absent: none.","type":"object"},"populations":{"description":"The population kinds this outcome can be predicted for (a new pair only among pairs that have not dealt). Absent: every population of its subject.","items":{"type":"string"},"type":"array"},"question":{"type":"string"}},"required":["id","label","question","description","defaultHorizonMonths"],"type":"object"},"type":"array"},"populations":{"items":{"properties":{"description":{"type":"string"},"kind":{"type":"string"},"label":{"type":"string"},"requires":{"items":{"type":"string"},"type":"array"}},"required":["kind","label","description","requires"],"type":"object"},"type":"array"},"scopeKinds":{"description":"The `scope` forms this subject takes; absent: all of them.","items":{"type":"string"},"type":"array"},"themes":{"items":{"properties":{"dataPoints":{"items":{"properties":{"acceptsDirection":{"description":"True when a direction rule may be set on it (numbers).","type":"boolean"},"ageProxy":{"description":"True for a data point that tracks closely with a person's age (a loan officer's tenure or career length): usable only when your organization has it enabled (`gatedEntitlements.ageProxy` on its subject), and never part of using every data point.","type":"boolean"},"description":{"type":"string"},"id":{"type":"string"},"kind":{"enum":["number","category"],"type":"string"},"label":{"type":"string"},"needsFairLendingReview":{"description":"True for data points about the neighbourhood: available to every organization, but geography can act as a proxy for protected classes, so a model that uses them should have a fair-lending review before it decides who gets an offer (the report card says so).","type":"boolean"},"whyItMightMatter":{"description":"One line on why someone might believe this matters.","type":"string"}},"required":["id","label","description","whyItMightMatter","kind","needsFairLendingReview"],"type":"object"},"type":"array"},"description":{"type":"string"},"label":{"type":"string"},"theme":{"type":"string"}},"required":["theme","label","description","dataPoints"],"type":"object"},"type":"array"}},"required":["id","label","outcomes","populations","themes","keyKinds","boostColumns"],"type":"object"},"type":"array"},"themes":{"description":"The data points a model can use, grouped by theme. Offer the themes and ask which data points the person believes matter.","items":{"properties":{"dataPoints":{"items":{"properties":{"acceptsDirection":{"description":"True when a direction rule may be set on it (numbers).","type":"boolean"},"ageProxy":{"description":"True for a data point that tracks closely with a person's age (a loan officer's tenure or career length): usable only when your organization has it enabled (`gatedEntitlements.ageProxy` on its subject), and never part of using every data point.","type":"boolean"},"description":{"type":"string"},"id":{"type":"string"},"kind":{"enum":["number","category"],"type":"string"},"label":{"type":"string"},"needsFairLendingReview":{"description":"True for data points about the neighbourhood: available to every organization, but geography can act as a proxy for protected classes, so a model that uses them should have a fair-lending review before it decides who gets an offer (the report card says so).","type":"boolean"},"whyItMightMatter":{"description":"One line on why someone might believe this matters.","type":"string"}},"required":["id","label","description","whyItMightMatter","kind","needsFairLendingReview"],"type":"object"},"type":"array"},"description":{"type":"string"},"label":{"type":"string"},"theme":{"type":"string"}},"required":["theme","label","description","dataPoints"],"type":"object"},"type":"array"},"trainingTime":{"description":"How long a model takes from start to finish, as a range of minutes: for each state (`states`, when the sizes are known) and by size of state (`sizes`). An estimate from earlier runs (`note` says so; pass it on). Tell the person the range for their state BEFORE starting a model.","properties":{"basis":{"type":"string"},"bySubject":{"description":"Models of people and companies (loan officers, agents, pairs, companies) take about the same time wherever they look: a range for training and for a refresh, by subject.","items":{"properties":{"expectedMinutes":{"description":"A range of minutes, `low` to `high`. An estimate from earlier runs of the same size, not a promise: say it as a range (\"about 13 to 23 minutes\").","properties":{"high":{"type":"number"},"low":{"type":"number"}},"required":["low","high"],"type":"object"},"refreshMinutes":{"description":"A range of minutes, `low` to `high`. An estimate from earlier runs of the same size, not a promise: say it as a range (\"about 13 to 23 minutes\").","properties":{"high":{"type":"number"},"low":{"type":"number"}},"required":["low","high"],"type":"object"},"subject":{"type":"string"}},"required":["subject","expectedMinutes","refreshMinutes"],"type":"object"},"type":"array"},"note":{"type":"string"},"sizes":{"items":{"properties":{"expectedMinutes":{"description":"A range of minutes, `low` to `high`. An estimate from earlier runs of the same size, not a promise: say it as a range (\"about 13 to 23 minutes\").","properties":{"high":{"type":"number"},"low":{"type":"number"}},"required":["low","high"],"type":"object"},"label":{"type":"string"},"size":{"enum":["small","medium","large"],"type":"string"}},"required":["size","label","expectedMinutes"],"type":"object"},"type":"array"},"states":{"items":{"properties":{"expectedMinutes":{"description":"A range of minutes, `low` to `high`. An estimate from earlier runs of the same size, not a promise: say it as a range (\"about 13 to 23 minutes\").","properties":{"high":{"type":"number"},"low":{"type":"number"}},"required":["low","high"],"type":"object"},"size":{"enum":["small","medium","large"],"type":"string"},"state":{"type":"string"}},"required":["state","size","expectedMinutes"],"type":"object"},"type":"array"}},"required":["note","basis","sizes","states"],"type":"object"},"uploadedOutcomes":{"properties":{"keyKinds":{"items":{"properties":{"columns":{"type":"string"},"kind":{"type":"string"},"label":{"type":"string"},"note":{"type":"string"}},"required":["kind","label","columns","note"],"type":"object"},"type":"array"},"minimums":{"type":"string"},"mustContain":{"items":{"type":"string"},"type":"array"},"summary":{"type":"string"},"yourOwnDataPoints":{"type":"string"}},"required":["summary","mustContain","minimums","yourOwnDataPoints","keyKinds"],"type":"object"},"weighting":{"description":"How a model can be weighted: `recentHistory` settings, `directions` (on data points with `acceptsDirection`), and the scores-table `columns` a priority boost may test. A boost on a column with `needsFairLendingReview` (ZIP code, city) is allowed; the report card adds a fair-lending caveat for it. `geographicColumnWords`: words that mark one of your own columns as describing where a home is.","properties":{"boosts":{"properties":{"columns":{"items":{"properties":{"column":{"type":"string"},"label":{"type":"string"},"needsFairLendingReview":{"type":"boolean"},"operators":{"items":{"type":"string"},"type":"array"},"type":{"type":"string"}},"required":["column","label","type","needsFairLendingReview","operators"],"type":"object"},"type":"array"},"description":{"type":"string"},"maxBoostValues":{"type":"number"},"maxBoosts":{"type":"number"},"maxMultiply":{"type":"number"},"minMultiply":{"type":"number"}},"required":["description","columns","maxBoosts","minMultiply","maxMultiply","maxBoostValues"],"type":"object"},"directions":{"properties":{"description":{"type":"string"},"values":{"items":{"properties":{"description":{"type":"string"},"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label","description"],"type":"object"},"type":"array"}},"required":["description","values"],"type":"object"},"geographicColumnWords":{"items":{"type":"string"},"type":"array"},"recentHistory":{"properties":{"default":{"type":"string"},"description":{"type":"string"},"settings":{"items":{"properties":{"halfLifeMonths":{"nullable":true,"type":"number"},"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label","halfLifeMonths"],"type":"object"},"type":"array"}},"required":["description","settings","default"],"type":"object"}},"required":["recentHistory","directions","boosts","geographicColumnWords"],"type":"object"}},"required":["outcomes","populations","themes","uploadedOutcomes","limits","earliestAsOf"],"type":"object"},"StudioModelOptionsResult":{"properties":{"data":{"$ref":"#/components/schemas/StudioModelOptions"},"heavyModels":{"description":"Larger model runs (`allowed` says whether your organization has them): more models (`maxModels`), longer scores tables (`maxScoreRows`) and more market data read before a large state is sampled (`maxMarketRows`), on a larger machine, at `trainingCredits` / `refreshCredits` per run instead of `pricing`'s. `standardLimits` are the limits without them. Nothing to ask for per model: with them enabled, every model's runs are heavy.","properties":{"allowed":{"description":"True when your organization has larger model runs enabled: then `limits` are yours, and every model's runs use them.","type":"boolean"},"limits":{"properties":{"maxMarketRows":{"type":"number"},"maxModels":{"type":"number"},"maxScoreRows":{"type":"number"}},"required":["maxModels","maxScoreRows","maxMarketRows"],"type":"object"},"note":{"type":"string"},"refreshCredits":{"type":"number"},"standardLimits":{"properties":{"maxMarketRows":{"type":"number"},"maxModels":{"type":"number"},"maxScoreRows":{"type":"number"}},"required":["maxModels","maxScoreRows","maxMarketRows"],"type":"object"},"trainingCredits":{"type":"number"}},"required":["allowed","limits","standardLimits","trainingCredits","refreshCredits","note"],"type":"object"},"neighborhoodDataAllowed":{"description":"Deprecated: always true. Neighborhood data points (`needsFairLendingReview`), ZIP code and city boosts and directions on a place are available to every organization. What a model can never use is listed in `data.protectedCharacteristics`.","type":"boolean"},"pricing":{"properties":{"note":{"type":"string"},"refreshCredits":{"type":"number"},"trainingCredits":{"type":"number"}},"required":["trainingCredits","refreshCredits","note"],"type":"object"}},"required":["data","pricing","heavyModels","neighborhoodDataAllowed"],"type":"object"},"StudioModelOutcomeSource":{"additionalProperties":false,"properties":{"dateColumn":{"description":"Each row's date (a date column): the day you would have wanted the prediction. Only earlier records are used.","example":"lead_date","maxLength":100,"minLength":1,"type":"string"},"key":{"$ref":"#/components/schemas/StudioModelKey"},"labelColumn":{"description":"What happened: two values (won/lost, yes/no, 1/0).","example":"result","maxLength":100,"minLength":1,"type":"string"},"positiveValues":{"description":"Values of `labelColumn` that mean it happened, when not plainly won/yes/true/1.","example":["Closed - Funded"],"items":{"maxLength":100,"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"table":{"description":"Your uploaded table: one row per known case.","example":"upload_my_deals","maxLength":100,"minLength":1,"type":"string"}},"required":["table","labelColumn","dateColumn","key"],"type":"object"},"StudioModelPaymentRequired":{"properties":{"balance":{"type":"number"},"cost":{"type":"number"},"error":{"enum":["payment_required"],"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"required":["error","balance","cost"],"type":"object"},"StudioModelPopulation":{"additionalProperties":false,"properties":{"companyNmlsId":{"pattern":"^\\d{1,12}$","type":"string"},"key":{"$ref":"#/components/schemas/StudioModelKey"},"kind":{"description":"Who is scored. Homes: `homes` (recent mortgage, in the scope), `company_book` (`companyNmlsId`) or `uploaded_list` (`table`, `key`). Loan officers: `loan_officers` (active in the scope), `company_loan_officers` (`companyNmlsId`) or `uploaded_list` (key `nmls_id`). Agents: `agents` (active in the scope), `agents_of_company` (agents whose clients took a mortgage from one company's loan officers: `companyNmlsId`) or `uploaded_list` (key `agent_id`). Agent and loan officer pairs: `agent_lo_pairs` (pairs with past deals), `company_agent_lo_pairs` (one company's pairs: `companyNmlsId`), `agent_lo_candidates` / `lo_agent_candidates` (`companyNmlsId`: agents of the loan officer's colleagues who have not dealt with them yet), `agent_lo_county_candidates` / `lo_agent_county_candidates` (`companyNmlsId`: busy agents in the loan officer's counties who never dealt with their company) or `uploaded_list` (key `agent_lo_pair`). Companies: `companies` (with a loan officer active in the scope; scope `national` by default) or `uploaded_list` (key `company_nmls_id`). Some outcomes take only some populations (`outcomes[].populations` in getStudioModelOptions).","enum":["homes","company_book","uploaded_list","loan_officers","company_loan_officers","agents","agents_of_company","agent_lo_pairs","company_agent_lo_pairs","agent_lo_candidates","lo_agent_candidates","companies","agent_lo_county_candidates","lo_agent_county_candidates"],"type":"string"},"table":{"maxLength":100,"minLength":1,"type":"string"}},"required":["kind"],"type":"object"},"StudioModelRefresh":{"additionalProperties":false,"properties":{"retrain":{"description":"Also train the model again on the latest data before scoring (a fresh report card). Default false: only the scores are refreshed.","type":"boolean"}},"type":"object"},"StudioModelResult":{"properties":{"credits":{"$ref":"#/components/schemas/StudioModelCredits"},"data":{"$ref":"#/components/schemas/StudioModel"}},"required":["data","credits"],"type":"object"},"StudioPaymentRequired":{"properties":{"balance":{"description":"Credits available.","type":"number"},"cost":{"description":"What the answer costs.","type":"number"},"error":{"enum":["payment_required"],"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"required":["error","balance","cost"],"type":"object"},"StudioProgram":{"properties":{"available":{"description":"True when your organization can run programs. False: ask your ModelMatch admin to enable them.","type":"boolean"},"name":{"example":"company_retention","type":"string"},"options":{"description":"The switches you can set, with their defaults.","items":{"properties":{"default":{"description":"Used when left out.","nullable":true},"description":{"type":"string"},"name":{"type":"string"}},"required":["name","description"],"type":"object"},"type":"array"},"price":{"properties":{"credits":{"description":"Credits charged once for a run that succeeds, when it has finished. A run that fails or times out is free.","type":"number"}},"required":["credits"],"type":"object"},"summary":{"type":"string"},"tables":{"description":"The tables a run leaves in your organization: your `name` plus each `suffix` (empty for the first).","items":{"properties":{"description":{"type":"string"},"suffix":{"type":"string"}},"required":["suffix","description"],"type":"object"},"type":"array"},"title":{"type":"string"}},"required":["name","title","summary","options","tables","price","available"],"type":"object"},"StudioProgramCredits":{"properties":{"charged":{"description":"Credits this call charged: the program's price when it is the first to read a run that succeeded (its tables are then delivered), otherwise 0. A run is charged once.","type":"number"},"pending":{"description":"Where a run was just started: what it will cost when it succeeds.","type":"number"},"remaining":{"description":"Your balance after the charge, when one was made.","type":"number"}},"required":["charged"],"type":"object"},"StudioProgramError":{"properties":{"code":{"description":"`invalid_request` (a switch the program does not list, or a bad value), `invalid_name`, `program_not_found`, `run_not_found`, `table_exists`, `program_running`, `busy`, `rate_limited`, `entitlement_missing`, `entitlement_unavailable`, `billing_unavailable`, `no_organization`, `studio_not_enabled`, `studio_unavailable`.","type":"string"},"details":{"description":"What the error is about: `retryAfterSeconds` and `limit` for a refusal to start now, `entitlementKey` for `entitlement_missing`.","properties":{"availableTables":{"items":{"type":"string"},"type":"array"},"characteristics":{"items":{"type":"string"},"type":"array"},"column":{"type":"string"},"dataPoint":{"type":"string"},"entitlementKey":{"type":"string"},"examples":{"type":"number"},"fields":{"items":{"type":"string"},"type":"array"},"function":{"type":"string"},"limit":{"type":"number"},"matchRate":{"type":"number"},"matched":{"type":"number"},"minimum":{"type":"number"},"positives":{"type":"number"},"retryAfterSeconds":{"type":"number"},"rows":{"type":"number"},"running":{"type":"number"},"suggestions":{"items":{"type":"string"},"type":"array"},"table":{"type":"string"}},"type":"object"},"error":{"type":"string"}},"required":["error","code"],"type":"object"},"StudioProgramList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/StudioProgram"},"type":"array"}},"required":["data"],"type":"object"},"StudioProgramPaymentRequired":{"properties":{"balance":{"type":"number"},"cost":{"type":"number"},"error":{"enum":["payment_required"],"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"required":["error","balance","cost"],"type":"object"},"StudioProgramRun":{"properties":{"asOf":{"type":"string"},"dataThrough":{"nullable":true,"type":"string"},"delivered":{"description":"True once the tables are in your organization: query them like any table (the catalog lists them).","type":"boolean"},"elapsedMs":{"nullable":true,"type":"number"},"error":{"nullable":true,"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"finishedAt":{"nullable":true,"type":"string"},"name":{"description":"The name you gave the result.","type":"string"},"options":{"additionalProperties":{"nullable":true},"type":"object"},"program":{"type":"string"},"progress":{"nullable":true,"properties":{"done":{"type":"number"},"step":{"type":"string"},"total":{"type":"number"}},"required":["step"],"type":"object"},"runId":{"type":"string"},"startedAt":{"type":"string"},"state":{"enum":["running","succeeded","failed"],"type":"string"},"tables":{"items":{"properties":{"rowCount":{"nullable":true,"type":"number"},"table":{"type":"string"}},"required":["table","rowCount"],"type":"object"},"type":"array"},"title":{"type":"string"}},"required":["runId","program","title","name","state","delivered","tables","startedAt","finishedAt","elapsedMs","asOf","options","dataThrough","progress","error"],"type":"object"},"StudioProgramRunList":{"properties":{"credits":{"$ref":"#/components/schemas/StudioProgramCredits"},"data":{"items":{"$ref":"#/components/schemas/StudioProgramRun"},"type":"array"}},"required":["data","credits"],"type":"object"},"StudioProgramRunRequest":{"additionalProperties":false,"properties":{"name":{"description":"What to call the result: the first table gets this name, the others this name plus their suffix (`tables[].suffix` on the program). Lower-case letters, digits and underscores, starting with a letter. A name starting with mm_, crm_, upload_ or model_ is reserved. Running again with the same name replaces your earlier result, and keeps it as `<name>__previous`.","example":"tx_retention","maxLength":63,"minLength":1,"type":"string"},"options":{"additionalProperties":{"nullable":true},"description":"Values for the program's switches (`options` on the program), for example `{ \"states\": [\"TX\"] }`. Only the switches the program lists; anything else is refused with 400. Left out: every switch's default.","type":"object"}},"required":["name"],"type":"object"},"StudioProgramRunResult":{"properties":{"credits":{"$ref":"#/components/schemas/StudioProgramCredits"},"data":{"$ref":"#/components/schemas/StudioProgramRun"}},"required":["data","credits"],"type":"object"},"StudioPublishedModel":{"properties":{"asOf":{"description":"The day the scores are as of.","nullable":true,"type":"string"},"caution":{"description":"The caution, when there is one. Say it first, before anything else on the card.","nullable":true,"type":"string"},"caveats":{"description":"Limits of the model. Say them.","items":{"type":"string"},"type":"array"},"dataPoints":{"properties":{"note":{"nullable":true,"type":"string"},"rejected":{"description":"Data points the model was given and barely used: they added little.","items":{"properties":{"label":{"type":"string"},"sentence":{"nullable":true,"type":"string"},"sharePercent":{"nullable":true,"type":"number"}},"required":["label","sharePercent","sentence"],"type":"object"},"type":"array"},"summary":{"nullable":true,"type":"string"},"used":{"description":"The data points that mattered, strongest first.","items":{"properties":{"label":{"type":"string"},"sentence":{"nullable":true,"type":"string"},"sharePercent":{"description":"How much the model leaned on it, as a share of everything it relied on — not how much it causes the outcome.","nullable":true,"type":"number"},"verdictLabel":{"example":"helped a little","nullable":true,"type":"string"}},"required":["label","sharePercent","verdictLabel","sentence"],"type":"object"},"type":"array"}},"required":["used","rejected","summary","note"],"type":"object"},"description":{"type":"string"},"hasCaution":{"description":"True when it is published with a caution.","type":"boolean"},"headline":{"description":"The report card in one sentence. Read it as written.","nullable":true,"type":"string"},"homes":{"description":"Homes on the scored list.","type":"number"},"learnedFrom":{"description":"What it learned from, and was tested on.","nullable":true,"properties":{"cases":{"nullable":true,"type":"number"},"from":{"nullable":true,"type":"string"},"sentence":{"nullable":true,"type":"string"},"testedOn":{"properties":{"cases":{"nullable":true,"type":"number"},"from":{"nullable":true,"type":"string"},"to":{"nullable":true,"type":"string"},"withTheOutcome":{"nullable":true,"type":"number"}},"required":["cases","withTheOutcome","from","to"],"type":"object"},"to":{"nullable":true,"type":"string"},"withTheOutcome":{"nullable":true,"type":"number"}},"required":["sentence","cases","withTheOutcome","from","to","testedOn"],"type":"object"},"metrics":{"properties":{"calibrated":{"description":"Only when true may a home's score be called a chance. Otherwise scores are a ranking only.","type":"boolean"},"calibrationNote":{"nullable":true,"type":"string"},"checks":{"description":"Beats the best simple rule; finds nothing in shuffled outcomes; holds up over time.","items":{"properties":{"detail":{"nullable":true,"type":"string"},"label":{"type":"string"},"passed":{"type":"boolean"}},"required":["label","passed","detail"],"type":"object"},"type":"array"},"top1":{"description":"The top 1% of the list, on large tests only.","nullable":true,"properties":{"bestSimpleRulePer100":{"description":"The same when sorting by the best single data point.","nullable":true,"type":"number"},"modelPer100":{"description":"Of every 100 homes at the top of the list, how many had the outcome.","nullable":true,"type":"number"},"randomPer100":{"description":"The same for 100 homes picked at random.","nullable":true,"type":"number"},"sentence":{"nullable":true,"type":"string"},"topPercent":{"nullable":true,"type":"number"}},"required":["topPercent","modelPer100","randomPer100","bestSimpleRulePer100","sentence"],"type":"object"},"top10":{"nullable":true,"properties":{"bestSimpleRulePer100":{"description":"The same when sorting by the best single data point.","nullable":true,"type":"number"},"modelPer100":{"description":"Of every 100 homes at the top of the list, how many had the outcome.","nullable":true,"type":"number"},"randomPer100":{"description":"The same for 100 homes picked at random.","nullable":true,"type":"number"},"sentence":{"nullable":true,"type":"string"},"topPercent":{"nullable":true,"type":"number"}},"required":["topPercent","modelPer100","randomPer100","bestSimpleRulePer100","sentence"],"type":"object"}},"required":["top10","top1","checks","calibrated","calibrationNote"],"type":"object"},"predicts":{"description":"What the model predicts, in plain words.","nullable":true,"type":"string"},"refreshedAt":{"description":"When the scores were last computed (ISO 8601).","type":"string"},"table":{"description":"The table its scores are in, the same for every organization. Query it with Studio.","example":"mm_model_refi_watch","type":"string"},"weighting":{"description":"How it was weighted — recent history, direction rules, priority boosts — one sentence each; empty when it was not. A copy (`basedOnPublished` on createStudioModel) starts with the same settings.","items":{"type":"string"},"type":"array"}},"required":["table","description","homes","refreshedAt","asOf","predicts","headline","hasCaution","caution","learnedFrom","metrics","dataPoints","weighting","caveats"],"type":"object"},"StudioPublishedModelResult":{"properties":{"data":{"$ref":"#/components/schemas/StudioPublishedModel"}},"required":["data"],"type":"object"},"StudioQueryRequest":{"additionalProperties":false,"properties":{"background":{"description":"`true`: do not wait for the answer. The question starts in the background and this call answers `202` with a `queryId` at once. For a question known to be heavy (a whole state with a window function, several joins). Without it a question is answered here when it is quick, and carries on in the background by itself when it is not.","type":"boolean"},"limit":{"description":"Rows to return (1–1000, default 200). Each row returned costs 1 credit (at least 5 per question): ask for the rows you need. `rowCount` is always the full count.","maximum":1000,"minimum":1,"type":"integer"},"sql":{"description":"One read-only SELECT over the tables in the catalog. WITH, joins, window functions and subqueries are fine; nothing can be written or changed.","example":"SELECT companyName, count(*) AS loans, sum(loanAmount) AS volume FROM loans WHERE state = 'TX' AND loanDate >= DATE '2025-01-01' GROUP BY 1 ORDER BY volume DESC LIMIT 10","maxLength":20000,"minLength":1,"type":"string"}},"required":["sql"],"type":"object"},"StudioQueryResult":{"properties":{"columns":{"items":{"properties":{"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type"],"type":"object"},"type":"array"},"credits":{"description":"What this answer cost.","properties":{"charged":{"description":"Credits this request cost. `0` when nothing was charged: a request from the web app, a run that is still going, or an account that is not metered.","example":5,"type":"number"},"remaining":{"description":"Credits left after the charge. Present only when something was charged and the balance is known.","example":1995,"type":"number"}},"required":["charged"],"type":"object"},"elapsedMs":{"type":"number"},"rowCount":{"description":"Rows the question produced in total.","type":"number"},"rows":{"description":"One object per row, keyed by column name.","items":{"additionalProperties":{"nullable":true},"type":"object"},"type":"array"},"truncated":{"description":"True when `rows` holds fewer than `rowCount`.","type":"boolean"}},"required":["columns","rows","rowCount","truncated","elapsedMs","credits"],"type":"object"},"StudioQueryResultState":{"properties":{"code":{"description":"On `failed`: the stable code (`timeout`, `query_failed`, …).","type":"string"},"columns":{"items":{"properties":{"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type"],"type":"object"},"type":"array"},"credits":{"description":"What this question costs.","properties":{"charged":{"description":"Credits this request cost. `0` while the question is running, when it was already paid for (fetching a paid result again is free), and for a request from the web app or an account that is not metered. On `succeeded`, when the question had not been paid for yet, this fetch pays for it: exactly once, however often it is fetched.","example":0,"type":"number"},"pending":{"description":"Credits your organization is charged, once, for this question — whether or not its result is fetched — that have not been charged yet. While `running`: the least it will be charged if it succeeds (the price is 1 credit per row returned, at least 5). On `succeeded`: only for a caller this request does not charge (the web app), exactly what the question is charged, for the rows it returned. Absent when nothing more will be charged.","example":5,"type":"number"},"remaining":{"description":"Credits left after this request's charge. Present only when this request charged something and the balance is known.","example":1995,"type":"number"}},"required":["charged"],"type":"object"},"details":{"additionalProperties":{"nullable":true},"type":"object"},"elapsedMs":{"type":"number"},"error":{"description":"On `failed`: what went wrong, written for the caller.","type":"string"},"expiresAt":{"description":"When the answer stops being kept (an hour after it finished).","type":"string"},"pollAfterSeconds":{"description":"Seconds to wait before fetching the result (again).","example":5,"type":"number"},"queryId":{"description":"Identifies the question. Fetch its result with `getStudioQueryResult`.","example":"q_3f9a1c0b7d2e4a6f8b1c0d2e","type":"string"},"rowCount":{"description":"Rows the question produced in total.","type":"number"},"rows":{"description":"One object per row, keyed by column name.","items":{"additionalProperties":{"nullable":true},"type":"object"},"type":"array"},"status":{"description":"`running` — still going: wait `pollAfterSeconds` and fetch again. `succeeded` — the answer is here (`columns`, `rows`, `rowCount`, `truncated`, `elapsedMs`), kept until `expiresAt`. `failed` — it did not produce an answer: `error` and `code` say why, as the question itself would have. `expired` — it finished, and its answer is no longer kept: ask the question again.","enum":["running","succeeded","failed","expired"],"type":"string"},"truncated":{"description":"True when `rows` holds fewer than `rowCount`.","type":"boolean"}},"required":["status","queryId"],"type":"object"},"StudioQueryRunning":{"properties":{"credits":{"description":"What this question costs.","properties":{"charged":{"description":"Credits this request cost. `0` while the question is running, when it was already paid for (fetching a paid result again is free), and for a request from the web app or an account that is not metered. On `succeeded`, when the question had not been paid for yet, this fetch pays for it: exactly once, however often it is fetched.","example":0,"type":"number"},"pending":{"description":"Credits your organization is charged, once, for this question — whether or not its result is fetched — that have not been charged yet. While `running`: the least it will be charged if it succeeds (the price is 1 credit per row returned, at least 5). On `succeeded`: only for a caller this request does not charge (the web app), exactly what the question is charged, for the rows it returned. Absent when nothing more will be charged.","example":5,"type":"number"},"remaining":{"description":"Credits left after this request's charge. Present only when this request charged something and the balance is known.","example":1995,"type":"number"}},"required":["charged"],"type":"object"},"pollAfterSeconds":{"description":"Seconds to wait before fetching the result (again).","example":5,"type":"number"},"queryId":{"description":"Identifies the question. Fetch its result with `getStudioQueryResult`.","example":"q_3f9a1c0b7d2e4a6f8b1c0d2e","type":"string"},"status":{"description":"The question is still running in the background. It has NOT failed: fetch its result with `queryId`. Do not ask it again — that starts a second run.","enum":["running"],"type":"string"}},"required":["status","queryId","pollAfterSeconds","credits"],"type":"object"},"StudioTable":{"properties":{"data":{"$ref":"#/components/schemas/StudioUpload"}},"required":["data"],"type":"object"},"StudioTableCreate":{"additionalProperties":false,"properties":{"description":{"description":"What the table holds, in a sentence. Shown in the catalog; generated from the file name when omitted.","maxLength":500,"type":"string"},"fromFileId":{"description":"The file in your files library to load: a CSV, TSV, Excel (.xlsx) or Parquet file you can open, whose status is `ready`.","example":"file_3f2a9c0d4b5e6f708192a3b4c5d6e7f8","pattern":"^file_[0-9a-f]{32}$","type":"string"},"name":{"description":"The upload's name: lower-case letters, digits and underscores, starting with a letter, at most 56 characters. The table is `upload_<name>`.","example":"closed_loans","pattern":"^[a-z][a-z0-9_]{0,55}$","type":"string"}},"required":["fromFileId","name"],"type":"object"},"StudioTableList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/StudioUpload"},"type":"array"}},"required":["data"],"type":"object"},"StudioUpload":{"properties":{"bytes":{"description":"Size of the file as uploaded.","nullable":true,"type":"number"},"columns":{"items":{"properties":{"description":{"description":"The column's header in the file when it was renamed, and how its values were read.","type":"string"},"name":{"description":"The name to use in SQL.","type":"string"},"type":{"description":"SQL type of the column.","example":"DATE","type":"string"}},"required":["name","type"],"type":"object"},"type":"array"},"description":{"nullable":true,"type":"string"},"error":{"description":"Why the file was refused (`failed` only).","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"filename":{"type":"string"},"joinHints":{"description":"Columns that line up with the market tables, and how to write the join.","items":{"properties":{"columns":{"description":"The upload's column(s) the hint is about.","items":{"type":"string"},"type":"array"},"example":{"description":"A join condition to copy: `u` is the upload, `l` is the `loans` table.","type":"string"},"explanation":{"description":"One line, in plain language, on what the match means.","type":"string"},"joinsTo":{"description":"Market columns they line up with, as `table.column`.","items":{"type":"string"},"type":"array"},"kind":{"description":"What the column can be matched on.","enum":["originator_nmls_id","company_nmls_id","state","zip","address","date","loan_amount"],"type":"string"}},"required":["kind","columns","joinsTo","explanation"],"type":"object"},"type":"array"},"name":{"type":"string"},"rowCount":{"nullable":true,"type":"number"},"sourceFileDeleted":{"description":"`true` when the table's source file has since been deleted. The table keeps working: deleting a file never deletes the tables made from it.","type":"boolean"},"sourceFileId":{"description":"The file in your files library the table was loaded from (`POST /v1/studio/tables`); `null` for a table made by sending a file to an upload URL.","nullable":true,"type":"string"},"status":{"description":"`pending` — waiting for the file. `ingesting` — the file is being read; call complete again. `ready` — it is a table. `failed` — the file was refused (`error` says why); create the upload again with a corrected file.","enum":["pending","ingesting","ready","failed"],"type":"string"},"table":{"description":"The table to query, once `status` is `ready`.","example":"upload_closed_loans","type":"string"},"uploadedAt":{"description":"When the file became a table (ISO 8601).","nullable":true,"type":"string"},"uploadedBy":{"description":"The user who created the upload.","nullable":true,"type":"string"},"warnings":{"description":"Everything about the file that was changed, skipped or could not be read the way it was written: dropped empty columns, columns kept as text because some values did not fit, skipped rows, ambiguous dates, and whether there is a date column a prediction model could use.","items":{"type":"string"},"type":"array"}},"required":["name","table","status","filename","description","uploadedBy","uploadedAt","rowCount","columns","warnings","joinHints","bytes","sourceFileId","sourceFileDeleted"],"type":"object"},"StudioUploadCreate":{"additionalProperties":false,"properties":{"description":{"description":"What the table holds, in a sentence. Shown in the catalog; generated from the file name when omitted.","example":"Loans we closed or lost in 2024, exported from our CRM.","maxLength":500,"type":"string"},"filename":{"description":"The file's name as it is on the sender's side, for display. The format is worked out from the file itself, not from this name.","example":"Closed loans 2024.csv","maxLength":255,"minLength":1,"type":"string"},"name":{"description":"The upload's name: lower-case letters, digits and underscores, starting with a letter, at most 56 characters. The table is `upload_<name>`.","example":"closed_loans","pattern":"^[a-z][a-z0-9_]{0,55}$","type":"string"},"sizeBytes":{"description":"The file's exact size in bytes. The upload URL accepts a file of exactly this size and no other.","example":482113,"minimum":1,"type":"integer"}},"required":["name","filename","sizeBytes"],"type":"object"},"StudioUploadCreated":{"properties":{"data":{"properties":{"expiresAt":{"description":"When the upload URL stops working (ISO 8601).","type":"string"},"headers":{"additionalProperties":{"type":"string"},"description":"Headers the PUT must carry. Usually empty.","type":"object"},"maxBytes":{"description":"The largest file an upload can be, in bytes.","type":"number"},"method":{"enum":["PUT"],"type":"string"},"name":{"type":"string"},"table":{"description":"The table the file will become once it is completed.","example":"upload_closed_loans","type":"string"},"uploadUrl":{"description":"Send the file here with HTTP PUT, the file's bytes as the request body. Works once, for this one file, until `expiresAt`.","type":"string"}},"required":["name","table","uploadUrl","method","headers","expiresAt","maxBytes"],"type":"object"}},"required":["data"],"type":"object"},"StudioUploadDeleted":{"properties":{"data":{"properties":{"deleted":{"enum":[true],"type":"boolean"},"name":{"type":"string"}},"required":["deleted","name"],"type":"object"}},"required":["data"],"type":"object"},"StudioUploadList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/StudioUpload"},"type":"array"}},"required":["data"],"type":"object"},"StudioUploadResult":{"properties":{"data":{"$ref":"#/components/schemas/StudioUpload"}},"required":["data"],"type":"object"},"SummaryPeriod":{"properties":{"buyer":{"$ref":"#/components/schemas/SideMetrics"},"buyerPct":{"type":"number"},"dual":{"$ref":"#/components/schemas/SideMetrics"},"dualPct":{"type":"number"},"seller":{"$ref":"#/components/schemas/SideMetrics"},"sellerPct":{"type":"number"},"total":{"$ref":"#/components/schemas/SideMetrics"}},"required":["total","buyer","seller","dual","buyerPct","sellerPct","dualPct"],"type":"object"},"TalentFlowBoomerang":{"properties":{"leftDate":{"description":"End of the stint at this company before the return.","type":"string"},"name":{"nullable":true,"type":"string"},"nmlsId":{"type":"string"},"returnedDate":{"description":"Start of the returning stint (inside the window).","type":"string"},"stillHere":{"description":"Still holds an open record at this company.","type":"boolean"},"units":{"description":"Loans behind `volume`.","type":"number"},"volume":{"description":"Production AT THIS company (employer at time of loan = this company) recorded inside the window.","type":"number"},"wentTo":{"$ref":"#/components/schemas/ReturnerCompany"},"wentToDate":{"nullable":true,"type":"string"}},"required":["nmlsId","name","leftDate","returnedDate","stillHere","wentTo","wentToDate","volume","units"],"type":"object"},"TalentFlowBoomerangs":{"description":"Window hires who came BACK: an earlier stint here ended (before or inside the window) and a later one starts inside it. Stints merge overlapping license records, so dropping one state license is not a departure. Someone who joined and left inside the window without returning is not one.","properties":{"data":{"description":"Sorted by volume, most first, then NMLS ID.","items":{"$ref":"#/components/schemas/TalentFlowBoomerang"},"type":"array"},"dataTruncated":{"description":"`true` when more than 500 matched; `data` is then the 500 with the most volume. `total`, `volume` and `units` cover every one.","type":"boolean"},"status":{"description":"`timeout` when the hires' history at this company could not be read within 8 s (very large company over a long window): every count is then 0 and means \"not available\", not \"none\". Rubberbands do not depend on it.","enum":["ok","timeout"],"type":"string"},"stillHere":{"description":"The subset still at the company.","properties":{"count":{"type":"number"},"units":{"description":"Loans behind `volume`.","type":"number"},"volume":{"description":"Production AT THIS company (employer at time of loan = this company) recorded inside the window.","type":"number"}},"required":["count","volume","units"],"type":"object"},"total":{"type":"number"},"units":{"description":"Loans behind `volume`.","type":"number"},"volume":{"description":"Production AT THIS company (employer at time of loan = this company) recorded inside the window.","type":"number"}},"required":["status","total","volume","units","dataTruncated","stillHere","data"],"type":"object"},"TalentFlowCompany":{"properties":{"companyName":{"nullable":true,"type":"string"},"companyNmlsId":{"nullable":true,"type":"string"},"count":{"description":"Loan officers attributed.","type":"number"},"units":{"description":"Loans behind `volume`.","type":"number"},"volume":{"description":"Those loan officers' production AT THIS company (employer at time of loan = this company) recorded inside the window.","type":"number"}},"required":["companyNmlsId","companyName","count","volume","units"],"type":"object"},"TalentFlowRubberband":{"properties":{"joinedDate":{"description":"First start at this company among the window-relevant records.","nullable":true,"type":"string"},"leftDate":{"description":"Complete-departure date.","type":"string"},"leftPreviousDate":{"description":"When their earlier, pre-window stint at `returnedTo` ended.","type":"string"},"name":{"nullable":true,"type":"string"},"nmlsId":{"type":"string"},"returnedTo":{"allOf":[{"$ref":"#/components/schemas/ReturnerCompany"},{"description":"The earlier employer they went back to (their next employer)."}]},"returnedToDate":{"type":"string"},"units":{"description":"Loans behind `volume`.","type":"number"},"volume":{"description":"Production AT THIS company (employer at time of loan = this company) recorded inside the window.","type":"number"}},"required":["nmlsId","name","joinedDate","leftDate","returnedTo","returnedToDate","leftPreviousDate","volume","units"],"type":"object"},"TalentFlowRubberbands":{"description":"Window exits who went BACK: their next employer is one where they hold an ended record that started before the window.","properties":{"data":{"description":"Sorted by volume, most first, then NMLS ID.","items":{"$ref":"#/components/schemas/TalentFlowRubberband"},"type":"array"},"dataTruncated":{"description":"`true` when more than 500 matched; `data` is then the 500 with the most volume. `total`, `volume` and `units` cover every one.","type":"boolean"},"total":{"type":"number"},"units":{"description":"Loans behind `volume`.","type":"number"},"volume":{"description":"Production AT THIS company (employer at time of loan = this company) recorded inside the window.","type":"number"}},"required":["total","volume","units","dataTruncated","data"],"type":"object"},"TemplateMonitor":{"properties":{"createdAt":{"type":"string"},"delivery":{"$ref":"#/components/schemas/MonitorDeliveryResolved"},"description":{"type":"string"},"emailTemplate":{"$ref":"#/components/schemas/MonitorEmailTemplate"},"family":{"enum":["past-clients","agent-partners","farm-area","watch-record"],"type":"string"},"id":{"type":"string"},"inputs":{"additionalProperties":{"nullable":true},"description":"What it watches, as you set it (the template's inputs).","type":"object"},"name":{"description":"The table its results land in, in your organization's workspace.","type":"string"},"notify":{"additionalProperties":false,"properties":{"email":{"type":"boolean"},"inApp":{"type":"boolean"}},"required":["email","inApp"],"type":"object"},"options":{"additionalProperties":false,"properties":{"epoThresholdDays":{"maximum":3650,"minimum":1,"type":"integer"},"kinds":{"items":{"enum":["past_client_listed","early_payoff_risk","past_client_home","past_client_loan","agent_pending","agent_sale_closed","new_listing","refi_area","area_home","sale_changed","property_changed","loan_changed"],"type":"string"},"maxItems":12,"type":"array"},"refiMarginPoints":{"maximum":5,"minimum":0,"type":"number"},"refiRateThreshold":{"maximum":10,"minimum":0,"type":"number"}},"type":"object"},"rules":{"additionalProperties":false,"properties":{"areaRules":{"additionalProperties":false,"properties":{"property":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"maxItems":10,"type":"array"}},"type":"object"},"book":{"additionalProperties":false,"properties":{"loan":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"maxItems":10,"type":"array"},"property":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"maxItems":10,"type":"array"}},"type":"object"},"thresholds":{"items":{"additionalProperties":false,"properties":{"column":{"pattern":"^[a-z_][a-z0-9_]{0,62}$","type":"string"},"on":{"enum":["threshold"],"type":"string"},"op":{"enum":[">=",">","<=","<"],"type":"string"},"value":{"type":"number"}},"required":["on","column","op","value"],"type":"object"},"maxItems":5,"type":"array"}},"type":"object"},"schedule":{"description":"Monitors from templates check once a week.","enum":["weekly"],"type":"string"},"status":{"enum":["active","paused"],"type":"string"},"template":{"description":"The template's id.","type":"string"},"title":{"type":"string"},"type":{"enum":["template"],"type":"string"},"updatedAt":{"type":"string"},"version":{"description":"Send it back with a change to avoid overwriting someone else's.","type":"integer"},"watching":{"items":{"properties":{"label":{"description":"What to show for it.","type":"string"},"type":{"enum":["nmls","agent","area","document","query"],"type":"string"}},"required":["type","label"],"type":"object"},"type":"array"}},"required":["id","type","name","title","family","template","inputs","options","rules","notify","delivery","status","schedule","watching","version","createdAt","updatedAt"],"type":"object"},"TextFilterValue":{"anyOf":[{"type":"string"},{"description":"Match any value","items":{"type":"string"},"type":"array"},{"description":"Fuzzy text match","properties":{"match":{"type":"string"}},"required":["match"],"type":"object"},{"nullable":true}]},"TransactionFlagAccepted":{"properties":{"data":{"properties":{"id":{"description":"The flag id.","type":"string"}},"required":["id"],"type":"object"}},"required":["data"],"type":"object"},"TransactionFlagProfile":{"additionalProperties":false,"description":"The profile the user flagged it from, when there was one.","properties":{"id":{"maxLength":256,"minLength":1,"type":"string"},"type":{"enum":["agent","loan-officer","company"],"type":"string"},"url":{"description":"Link to the profile in the app. Ignored unless it is a public http(s) URL.","maxLength":2048,"type":"string"}},"required":["type","id"],"type":"object"},"UnreadCountResponse":{"properties":{"data":{"properties":{"count":{"type":"integer"}},"required":["count"],"type":"object"}},"required":["data"],"type":"object"},"UpdateAlertConditionsRequest":{"properties":{"conditions":{"$ref":"#/components/schemas/AlertConditions"},"email":{"description":"Contact email stored for the alert digest.","type":"string"},"emailEnabled":{"deprecated":true,"description":"Deprecated and ignored: accepted for compatibility, but not stored and no longer controls delivery (the response always reports every flag off). Email and in-app channel preferences for alerts live in Notifications settings.","properties":{"agent_sale_closed":{"type":"boolean"},"area_new_listing":{"type":"boolean"},"borrower_listed":{"type":"boolean"},"epo_risk":{"type":"boolean"},"rate_term_refi_area":{"type":"boolean"},"watched_agent_pending":{"type":"boolean"},"watched_loan":{"type":"boolean"},"watched_property":{"type":"boolean"},"watched_sale":{"type":"boolean"}},"type":"object"},"enabled":{"deprecated":true,"description":"Deprecated: use the alert recipes (POST/DELETE /recipes/{id}) or /subscriptions instead. Still honoured: `true` turns the trigger on for every watched subject that supports it (and for your NMLS id when one is on file); `false` turns it off everywhere. Omitted triggers are unchanged. A trigger with nothing watched that supports it stays off.","properties":{"agent_sale_closed":{"type":"boolean"},"area_new_listing":{"type":"boolean"},"borrower_listed":{"type":"boolean"},"epo_risk":{"type":"boolean"},"rate_term_refi_area":{"type":"boolean"},"watched_agent_pending":{"type":"boolean"},"watched_loan":{"type":"boolean"},"watched_property":{"type":"boolean"},"watched_sale":{"type":"boolean"}},"type":"object"},"name":{"description":"Display name.","type":"string"},"nmlsId":{"description":"The loan officer's NMLS id. Required to enable the borrower-centric triggers (borrower_listed, epo_risk); the agent + area triggers work without it.","type":"string"}},"type":"object"},"UpdateMonitor":{"additionalProperties":false,"properties":{"delivery":{"additionalProperties":false,"description":"How updates are grouped per channel. `null` goes back to the defaults.","nullable":true,"properties":{"email":{"description":"`digest` (default): one email a week across all your monitors. `run`: one email per monitor run. `item`: one email per update, up to `itemCap`, then one for the rest.","enum":["item","run","digest"],"type":"string"},"inApp":{"description":"`run` (default): one notification per monitor run. `item`: one per update, up to `itemCap`.","enum":["item","run"],"type":"string"},"itemCap":{"description":"Most item-by-item notifications or webhooks per run (default 25, at most 100).","maximum":100,"minimum":1,"type":"integer"},"webhook":{"description":"`run` (default): one `monitors.fired` per run, with a link to page through every update. `item`: one `monitors.item` per update, up to `itemCap`, then one `monitors.item.overflow`.","enum":["item","run"],"type":"string"}},"type":"object"},"emailTemplate":{"description":"`null` goes back to the template's email.","nullable":true,"properties":{"blocks":{"description":"The blocks, rendered top to bottom.","items":{"$ref":"#/components/schemas/MonitorEmailBlock"},"type":"array"},"version":{"description":"Template format version.","enum":[1],"type":"number"}},"required":["version","blocks"],"type":"object"},"inputs":{"additionalProperties":{"nullable":true},"type":"object"},"notify":{"additionalProperties":false,"properties":{"email":{"type":"boolean"},"inApp":{"type":"boolean"}},"required":["email"],"type":"object"},"options":{"additionalProperties":false,"properties":{"epoThresholdDays":{"maximum":3650,"minimum":1,"type":"integer"},"kinds":{"items":{"enum":["past_client_listed","early_payoff_risk","past_client_home","past_client_loan","agent_pending","agent_sale_closed","new_listing","refi_area","area_home","sale_changed","property_changed","loan_changed"],"type":"string"},"maxItems":12,"type":"array"},"refiMarginPoints":{"maximum":5,"minimum":0,"type":"number"},"refiRateThreshold":{"maximum":10,"minimum":0,"type":"number"}},"type":"object"},"rules":{"additionalProperties":false,"properties":{"areaRules":{"additionalProperties":false,"properties":{"property":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"maxItems":10,"type":"array"}},"type":"object"},"book":{"additionalProperties":false,"properties":{"loan":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"maxItems":10,"type":"array"},"property":{"items":{"properties":{"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"}},"required":["predicates"],"type":"object"},"maxItems":10,"type":"array"}},"type":"object"},"thresholds":{"items":{"additionalProperties":false,"properties":{"column":{"pattern":"^[a-z_][a-z0-9_]{0,62}$","type":"string"},"on":{"enum":["threshold"],"type":"string"},"op":{"enum":[">=",">","<=","<"],"type":"string"},"value":{"type":"number"}},"required":["on","column","op","value"],"type":"object"},"maxItems":5,"type":"array"}},"type":"object"},"status":{"enum":["active","paused"],"type":"string"},"version":{"type":"integer"}},"type":"object"},"UpdateSavedFilterRequest":{"additionalProperties":false,"properties":{"fidelity":{"description":"How much of the UI state `query` captures: `exact`; `partial` (see `unmapped`); `ui_only` — no runnable query. Defaults from whether `query` is present.","enum":["exact","partial","ui_only"],"type":"string"},"icon":{"$ref":"#/components/schemas/SavedFilterIcon"},"name":{"maxLength":100,"minLength":1,"type":"string"},"orgWidePermission":{"allOf":[{"$ref":"#/components/schemas/SavedFilterGrantPermission"},{"description":"Owner or workspace admin only. The whole workspace's role; setting it also sets `visibility: organization`."}]},"query":{"additionalProperties":{"nullable":true},"description":"The target list operation's request body WITHOUT `pagination` (e.g. `{ flatFilters, filters, sort, period }` for listOriginators). Validated against that operation's schema; unknown filter fields are rejected. Null/omitted for a UI-only filter.","nullable":true,"type":"object"},"uiState":{"additionalProperties":{"nullable":true},"description":"Opaque client UI state used to restore a filter panel (≤16KB). Not interpreted by the API.","nullable":true,"type":"object"},"uiStateVersion":{"minimum":1,"type":"integer"},"unmapped":{"description":"UI filter keys the client could not express in `query` (set with `fidelity: partial`).","items":{"maxLength":200,"minLength":1,"type":"string"},"maxItems":100,"type":"array"},"visibility":{"allOf":[{"$ref":"#/components/schemas/SavedFilterVisibility"},{"description":"Owner or workspace admin only. `private` removes every share; `shared` removes the workspace-wide grant; sharing with a member (`POST /saved-filters/{id}/shares`) turns a private filter into `shared` on its own."}]}},"type":"object"},"UpdateSavedFilterResult":{"properties":{"data":{"$ref":"#/components/schemas/SavedFilter"}},"required":["data"],"type":"object"},"WatchedAgent":{"properties":{"addedAt":{"type":"string"},"agentId":{"description":"Agent id.","type":"string"},"name":{"type":"string"},"source":{"description":"How the agent entered the watchlist — added by hand or auto-derived from recent buyer-side deals.","enum":["manual","auto_buyer_24mo"],"type":"string"}},"required":["agentId","source","addedAt"],"type":"object"},"WatchedAgentsResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/WatchedAgent"},"type":"array"}},"required":["data"],"type":"object"},"WatchedArea":{"properties":{"addedAt":{"type":"string"},"id":{"description":"Opaque id used to remove the area.","type":"string"},"lat":{"description":"Radius center latitude.","type":"number"},"lon":{"description":"Radius center longitude.","type":"number"},"maxLat":{"description":"Box north edge.","type":"number"},"maxLon":{"description":"Box east edge.","type":"number"},"minLat":{"description":"Box south edge.","type":"number"},"minLon":{"description":"Box west edge.","type":"number"},"radiusMeters":{"description":"Radius in meters (canonical unit).","type":"number"},"state":{"description":"2-letter state ('' for zip + geo areas).","type":"string"},"type":{"enum":["city","county","zip","bbox","radius"],"type":"string"},"value":{"type":"string"}},"required":["id","type","value","state","addedAt"],"type":"object"},"WatchedAreasResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/WatchedArea"},"type":"array"}},"required":["data"],"type":"object"},"WatchedDocument":{"properties":{"addedAt":{"type":"string"},"documentId":{"type":"string"},"documentType":{"enum":["sale","property","loan"],"type":"string"},"rules":{"items":{"$ref":"#/components/schemas/WatchedDocumentRule"},"type":"array"}},"required":["documentType","documentId","rules","addedAt"],"type":"object"},"WatchedDocumentPredicate":{"properties":{"field":{"description":"Catalog field alias.","type":"string"},"id":{"description":"Stable predicate id.","type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","between","pct_change_gte","abs_change_gte","changed","changed_to","not_eq","in"],"type":"string"},"stringValue":{"type":"string"},"stringValues":{"items":{"type":"string"},"type":"array"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["id","field","op"],"type":"object"},"WatchedDocumentRule":{"properties":{"id":{"description":"Stable rule id.","type":"string"},"match":{"enum":["all","any"],"type":"string"},"predicates":{"items":{"$ref":"#/components/schemas/WatchedDocumentPredicate"},"type":"array"}},"required":["id","match","predicates"],"type":"object"},"WatchedDocumentsResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/WatchedDocument"},"type":"array"}},"required":["data"],"type":"object"}},"securitySchemes":{"apiKeyAuth":{"in":"header","name":"x-api-key","type":"apiKey"},"bearerAuth":{"bearerFormat":"JWT","scheme":"bearer","type":"http"}}},"info":{"description":"ModelMatch API — mortgage and real-estate market data.\n\n## Bulk delivery limits\n\nThe `POST /{entity}/bulk-delivery` endpoints export a full result set to\nS3 as NDJSON, JSON, CSV, or Parquet.\n\n- **Up to 5,000 rows per delivery: no entitlement required.** Available to\n  every authenticated caller.\n- **Above 5,000 rows: requires the entity's `bulk-delivery.{entity}`\n  entitlement** (e.g. `bulk-delivery.loans`). The grant's scope sets your\n  row ceiling and may also restrict which rows and fields you receive.\n\nA delivery that would exceed the limit available to you is rejected with\n`403 entitlement_missing`, reporting the matched row count and the ceiling\nthat applied. To stay under the limit, pass `limit` — the job then delivers\n(and bills for) only the first `limit` rows of a broader query.\n\n**Need a higher limit?** Email support@modelmatch.com to request the\nentitlement. Limits are raised per organization and per entity.\n\nBulk delivery is billed at 1 credit per delivered row whether or not\nan entitlement is held.\n\nInstead of a download, a delivery can be sent to a push target configured\non your workspace: pass `destination: { type: \"push-target\", targetId }`.\nThe same limits and billing apply.","title":"ModelMatch API","version":"3.202.0"},"openapi":"3.1.0","paths":{"/v1/admin/alerts/email-templates/preview":{"post":{"description":"Validates an email template and returns the notification props a run would send with it — any recipe (drafts too), sampled from a user's recent alerts when `userId` is given, else static samples.","operationId":"adminPreviewAlertEmailTemplate","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAlertEmailTemplatePreviewRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertEmailTemplatePreviewResponse"}}},"description":"Valid — the props the email renders from"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"Invalid recipe (see `code`)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"No such recipe"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"Conflict: `recipe_exists`, `recipe_in_use` or `version_conflict`"}},"summary":"Preview an alert email template (admin)","tags":["Admin"]}},"/v1/admin/alerts/recipes":{"get":{"description":"Every alert recipe in any status (draft, published, archived), in sort order, each with its subscriber count. Seeds the four built-in recipes on first read.","operationId":"adminListAlertRecipes","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAlertRecipesResponse"}}},"description":"Recipes"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"Invalid recipe (see `code`)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"No such recipe"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"Conflict: `recipe_exists`, `recipe_in_use` or `version_conflict`"}},"summary":"List alert recipes (admin)","tags":["Admin"]},"post":{"description":"Creates a draft recipe. Validated: kinds allowed per subject, rule templates against the field catalog, inputs covering the grants.","operationId":"adminCreateAlertRecipe","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminCreateAlertRecipeRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAlertRecipeResponse"}}},"description":"Recipe"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"Invalid recipe (see `code`)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"No such recipe"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"Conflict: `recipe_exists`, `recipe_in_use` or `version_conflict`"}},"summary":"Create an alert recipe (admin)","tags":["Admin"]}},"/v1/admin/alerts/recipes/{id}":{"delete":{"description":"Deletes a recipe no subscription carries (409 `recipe_in_use` otherwise — archive it instead).","operationId":"adminDeleteAlertRecipe","parameters":[{"description":"Recipe id.","in":"path","name":"id","required":true,"schema":{"description":"Recipe id.","example":"farm-area","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertsOkResponse"}}},"description":"Deleted"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"Invalid recipe (see `code`)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"No such recipe"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"Conflict: `recipe_exists`, `recipe_in_use` or `version_conflict`"}},"summary":"Delete an alert recipe (admin)","tags":["Admin"]},"get":{"operationId":"adminGetAlertRecipe","parameters":[{"description":"Recipe id.","in":"path","name":"id","required":true,"schema":{"description":"Recipe id.","example":"farm-area","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAlertRecipeResponse"}}},"description":"Recipe"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"Invalid recipe (see `code`)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"No such recipe"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"Conflict: `recipe_exists`, `recipe_in_use` or `version_conflict`"}},"summary":"Get an alert recipe (admin)","tags":["Admin"]},"put":{"description":"Replaces the definition (the id and status stay; `version` bumps). Existing subscriptions keep their grants until you resync.","operationId":"adminReplaceAlertRecipe","parameters":[{"description":"Recipe id.","in":"path","name":"id","required":true,"schema":{"description":"Recipe id.","example":"farm-area","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminReplaceAlertRecipeRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAlertRecipeResponse"}}},"description":"Recipe"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"Invalid recipe (see `code`)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"No such recipe"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"Conflict: `recipe_exists`, `recipe_in_use` or `version_conflict`"}},"summary":"Replace an alert recipe (admin)","tags":["Admin"]}},"/v1/admin/alerts/recipes/{id}/archive":{"post":{"operationId":"adminArchiveAlertRecipe","parameters":[{"description":"Recipe id.","in":"path","name":"id","required":true,"schema":{"description":"Recipe id.","example":"farm-area","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAlertRecipeResponse"}}},"description":"Recipe"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"Invalid recipe (see `code`)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"No such recipe"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"Conflict: `recipe_exists`, `recipe_in_use` or `version_conflict`"}},"summary":"Archive an alert recipe (admin)","tags":["Admin"]}},"/v1/admin/alerts/recipes/{id}/preview":{"post":{"description":"Dry-runs the recipe over the last 30 days for `userId`, with the given inputs applied on top of the user's saved setup. Works on drafts. Writes nothing.","operationId":"adminPreviewAlertRecipe","parameters":[{"description":"Recipe id.","in":"path","name":"id","required":true,"schema":{"description":"Recipe id.","example":"farm-area","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminPreviewAlertRecipeRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipePreviewResponse"}}},"description":"What the recipe would have fired"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"Invalid recipe (see `code`)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"No such recipe"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"Conflict: `recipe_exists`, `recipe_in_use` or `version_conflict`"}},"summary":"Preview an alert recipe for a user (admin)","tags":["Admin"]}},"/v1/admin/alerts/recipes/{id}/publish":{"post":{"operationId":"adminPublishAlertRecipe","parameters":[{"description":"Recipe id.","in":"path","name":"id","required":true,"schema":{"description":"Recipe id.","example":"farm-area","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAlertRecipeResponse"}}},"description":"Recipe"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"Invalid recipe (see `code`)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"No such recipe"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"Conflict: `recipe_exists`, `recipe_in_use` or `version_conflict`"}},"summary":"Publish an alert recipe (admin)","tags":["Admin"]}},"/v1/admin/alerts/recipes/{id}/resync":{"post":{"description":"Narrows the recipe's grant on every subscription that carries it to the kinds the recipe still grants (it never adds a kind a user turned off; a subject type the recipe no longer covers loses the grant). With `rules: true` record subscriptions also get the current rule templates. Scans every subscription (10 writes in flight): seconds per ten thousand rows. Idempotent and resumable — after a timeout, call it again to finish the rest. Returns counts.","operationId":"adminResyncAlertRecipe","parameters":[{"description":"Recipe id.","in":"path","name":"id","required":true,"schema":{"description":"Recipe id.","example":"farm-area","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminResyncAlertRecipeRequest"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminResyncAlertRecipeResponse"}}},"description":"Counts"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"Invalid recipe (see `code`)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"No such recipe"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"Conflict: `recipe_exists`, `recipe_in_use` or `version_conflict`"}},"summary":"Resync an alert recipe's subscriptions (admin)","tags":["Admin"]}},"/v1/admin/alerts/recipes/{id}/stats":{"get":{"description":"How many users subscribe to the recipe, how many alerts its grants fired in the last 30 days, and when it last fired in that window. Scans every subscription, then reads each subscriber's last 30 days of feed (10 in flight): expect seconds on a large table.","operationId":"adminGetAlertRecipeStats","parameters":[{"description":"Recipe id.","in":"path","name":"id","required":true,"schema":{"description":"Recipe id.","example":"farm-area","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAlertRecipeStatsResponse"}}},"description":"Stats"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"Invalid recipe (see `code`)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"No such recipe"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"Conflict: `recipe_exists`, `recipe_in_use` or `version_conflict`"}},"summary":"Alert recipe stats (admin)","tags":["Admin"]}},"/v1/admin/alerts/runs":{"get":{"description":"Run history, newest first. One record per non-dry-run.","operationId":"adminListAlertRuns","parameters":[{"description":"Max items to return (default 25).","in":"query","name":"limit","required":false,"schema":{"description":"Max items to return (default 25).","maximum":100,"minimum":1,"type":"integer"}},{"description":"Pagination cursor from a previous response.","in":"query","name":"cursor","required":false,"schema":{"description":"Pagination cursor from a previous response.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAlertRunsResponse"}}},"description":"Paginated run history"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"}},"summary":"List detector runs (admin)","tags":["Admin"]}},"/v1/admin/alerts/runs/{id}":{"get":{"operationId":"adminGetAlertRun","parameters":[{"description":"Opaque run id (from the run list).","in":"path","name":"id","required":true,"schema":{"description":"Opaque run id (from the run list).","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAlertRunResponse"}}},"description":"The run record"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Run not found"}},"summary":"Get one detector run (admin)","tags":["Admin"]}},"/v1/admin/alerts/task/start":{"post":{"operationId":"adminStartAlertDetector","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartAlertDetectorRequest"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartAlertDetectorResponse"}}},"description":"The launched task arn"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"}},"summary":"Start an on-demand detector run (admin)","tags":["Admin"]}},"/v1/admin/alerts/task/status":{"get":{"operationId":"adminGetAlertDetectorStatus","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertDetectorStatusResponse"}}},"description":"Running flag + any running tasks"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"}},"summary":"Is the detector running right now? (admin)","tags":["Admin"]}},"/v1/admin/alerts/task/stop":{"post":{"operationId":"adminStopAlertDetector","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StopAlertDetectorRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StopAlertDetectorResponse"}}},"description":"The stopped task arn"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"}},"summary":"Stop a running detector task (admin)","tags":["Admin"]}},"/v1/admin/alerts/user-recipes":{"get":{"description":"User recipes across all users (owner, then id), each with whether its owner subscribes and how many alerts it fired in the last 30 days. Paged by `cursor`.","operationId":"adminListAllUserRecipes","parameters":[{"description":"Max items to return (default 25).","in":"query","name":"limit","required":false,"schema":{"description":"Max items to return (default 25).","maximum":100,"minimum":1,"type":"integer"}},{"description":"Pagination cursor from a previous response.","in":"query","name":"cursor","required":false,"schema":{"description":"Pagination cursor from a previous response.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAlertUserRecipesResponse"}}},"description":"User recipes"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"}},"summary":"List every user's own alert recipes (admin)","tags":["Admin"]}},"/v1/admin/alerts/user-recipes/{ownerUserId}/{userRecipeId}/promote":{"post":{"description":"Copies the user recipe into a DRAFT global recipe with the given id (validated like any recipe: 400 `invalid_recipe_id` for a bad or `u-` id, 409 `recipe_exists` for a taken one) and records it on the user recipe's `promotedTo`. Edit and publish the draft as usual; the user's own recipe and subscription are untouched.","operationId":"adminPromoteUserRecipe","parameters":[{"description":"The recipe's owner.","in":"path","name":"ownerUserId","required":true,"schema":{"description":"The recipe's owner.","type":"string"}},{"description":"The user recipe id (`u-…`).","in":"path","name":"userRecipeId","required":true,"schema":{"description":"The user recipe id (`u-…`).","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminPromoteUserRecipeRequest"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminPromoteUserRecipeResponse"}}},"description":"Promoted"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"Invalid recipe (see `code`)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"No such recipe"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"Conflict: `recipe_exists`, `recipe_in_use` or `version_conflict`"}},"summary":"Promote a user's alert recipe to the catalog (admin)","tags":["Admin"]}},"/v1/admin/alerts/users/{userId}/conditions":{"get":{"operationId":"adminGetUserAlertConditions","parameters":[{"description":"Target user id.","in":"path","name":"userId","required":true,"schema":{"description":"Target user id.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAlertConditionsResponse"}}},"description":"The user's settings + identity (defaults if none saved)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"}},"summary":"Get a user's alert settings (admin)","tags":["Admin"]},"put":{"operationId":"adminUpdateUserAlertConditions","parameters":[{"description":"Target user id.","in":"path","name":"userId","required":true,"schema":{"description":"Target user id.","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUpdateAlertConditionsRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAlertConditionsResponse"}}},"description":"The saved settings"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"An NMLS id is required to enable the borrower-centric triggers"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"}},"summary":"Set a user's alert settings on their behalf (admin)","tags":["Admin"]}},"/v1/admin/alerts/users/{userId}/digests":{"get":{"operationId":"adminListUserAlertDigests","parameters":[{"description":"Target user id.","in":"path","name":"userId","required":true,"schema":{"description":"Target user id.","type":"string"}},{"description":"Max items to return (default 25).","in":"query","name":"limit","required":false,"schema":{"description":"Max items to return (default 25).","maximum":100,"minimum":1,"type":"integer"}},{"description":"Pagination cursor from a previous response.","in":"query","name":"cursor","required":false,"schema":{"description":"Pagination cursor from a previous response.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAlertDigestResponse"}}},"description":"Paginated digest feed (newest first)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"}},"summary":"List a user's alert digests (admin)","tags":["Admin"]}},"/v1/admin/alerts/users/{userId}/history/clear":{"post":{"description":"Deletes the user's fire-once dedupe markers + their feed (LOG) rows (and digest rows) so the detector can re-fire the same alerts — a debug aid for testing the pipeline end-to-end. Optionally scope to specific alert types; a full clear also resets the unread counter. Leaves the user's alert settings and watchlists untouched.","operationId":"adminClearUserAlertHistory","parameters":[{"description":"Target user id.","in":"path","name":"userId","required":true,"schema":{"description":"Target user id.","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClearAlertHistoryRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClearAlertHistoryResponse"}}},"description":"Counts of deleted dedupe / log / digest rows"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"}},"summary":"Clear a user's fired-alert history (admin)","tags":["Admin"]}},"/v1/admin/alerts/users/{userId}/log":{"get":{"operationId":"adminListUserAlertLog","parameters":[{"description":"Target user id.","in":"path","name":"userId","required":true,"schema":{"description":"Target user id.","type":"string"}},{"description":"Max items to return (default 25).","in":"query","name":"limit","required":false,"schema":{"description":"Max items to return (default 25).","maximum":100,"minimum":1,"type":"integer"}},{"description":"Pagination cursor from a previous response.","in":"query","name":"cursor","required":false,"schema":{"description":"Pagination cursor from a previous response.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAlertLogResponse"}}},"description":"Paginated feed (newest first)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"}},"summary":"List a user's alert feed (admin)","tags":["Admin"]},"post":{"operationId":"adminPushUserAlert","parameters":[{"description":"Target user id.","in":"path","name":"userId","required":true,"schema":{"description":"Target user id.","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminPushAlertRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminPushAlertResponse"}}},"description":"Whether it was written (false = deduped)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"}},"summary":"Push a one-off alert into a user's feed (admin)","tags":["Admin"]}},"/v1/admin/alerts/users/{userId}/log/mark-all-read":{"post":{"operationId":"adminMarkAllUserAlertsRead","parameters":[{"description":"Target user id.","in":"path","name":"userId","required":true,"schema":{"description":"Target user id.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertsOkResponse"}}},"description":"Unread count reset to 0"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"}},"summary":"Clear a user's unread badge (admin)","tags":["Admin"]}},"/v1/admin/alerts/users/{userId}/log/{id}":{"get":{"description":"The raw DynamoDB document for one alert — the drill-in behind a global alert row. 404 when it was never written (e.g. a deduped / dry-run decision) or the id is malformed.","operationId":"adminGetUserAlertLogItem","parameters":[{"in":"path","name":"userId","required":true,"schema":{"type":"string"}},{"description":"Alert id (from the feed).","in":"path","name":"id","required":true,"schema":{"description":"Alert id (from the feed).","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAlertRawResponse"}}},"description":"The raw stored alert item"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No stored alert for that id"}},"summary":"Get the raw stored item for one alert (admin)","tags":["Admin"]}},"/v1/admin/alerts/users/{userId}/log/{id}/read":{"post":{"operationId":"adminMarkUserAlertRead","parameters":[{"in":"path","name":"userId","required":true,"schema":{"type":"string"}},{"description":"Alert id (from the feed).","in":"path","name":"id","required":true,"schema":{"description":"Alert id (from the feed).","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertsOkResponse"}}},"description":"Marked read (idempotent)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"}},"summary":"Mark one of a user's alerts read (admin)","tags":["Admin"]}},"/v1/admin/alerts/users/{userId}/my-recipes":{"get":{"description":"The recipes the user created (any status), with whether they are subscribed — the rows they see on GET /alerts/my-recipes.","operationId":"adminListUserOwnedRecipes","parameters":[{"description":"Target user id.","in":"path","name":"userId","required":true,"schema":{"description":"Target user id.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertUserRecipesResponse"}}},"description":"The user's recipes"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"}},"summary":"List a user's own alert recipes (admin)","tags":["Admin"]}},"/v1/admin/alerts/users/{userId}/recipes":{"get":{"description":"The alert recipe catalog with whether the user is subscribed to each — the same rows the user sees on GET /alerts/recipes.","operationId":"adminListUserAlertRecipes","parameters":[{"description":"Target user id.","in":"path","name":"userId","required":true,"schema":{"description":"Target user id.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipesResponse"}}},"description":"Recipes"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"}},"summary":"List a user's alert recipes (admin)","tags":["Admin"]}},"/v1/admin/alerts/users/{userId}/recipes/{id}":{"delete":{"operationId":"adminUnsubscribeUserAlertRecipe","parameters":[{"description":"Target user id.","in":"path","name":"userId","required":true,"schema":{"description":"Target user id.","type":"string"}},{"description":"Recipe id (from GET /alerts/recipes).","in":"path","name":"id","required":true,"schema":{"description":"Recipe id (from GET /alerts/recipes).","example":"farm-area","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeResponse"}}},"description":"Unsubscribed"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"Invalid recipe (see `code`)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"No such recipe"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"`no_org`: the user has no alert-settings org to stamp the setup with"}},"summary":"Unsubscribe a user from an alert recipe (admin)","tags":["Admin"]},"post":{"description":"Subscribes the user exactly as POST /alerts/recipes/{id} would (same body), on their behalf: grants are stamped `addedBy: admin:{you}`, rows with the user's alert-settings org (409 `no_org` when they have none). `{id}` may be one of the user's own recipes.","operationId":"adminSubscribeUserAlertRecipe","parameters":[{"description":"Target user id.","in":"path","name":"userId","required":true,"schema":{"description":"Target user id.","type":"string"}},{"description":"Recipe id (from GET /alerts/recipes).","in":"path","name":"id","required":true,"schema":{"description":"Recipe id (from GET /alerts/recipes).","example":"farm-area","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeInputs"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeResponse"}}},"description":"Subscribed"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"Invalid recipe (see `code`)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"No such recipe"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"`no_org`: the user has no alert-settings org to stamp the setup with"}},"summary":"Subscribe a user to an alert recipe (admin)","tags":["Admin"]}},"/v1/admin/alerts/users/{userId}/recipes/{id}/preview":{"post":{"description":"POST /alerts/recipes/{id}/preview for the user: a 30-day dry replay with the given inputs over their saved setup. Works for the user's own recipes too. Writes nothing.","operationId":"adminPreviewUserAlertRecipe","parameters":[{"description":"Target user id.","in":"path","name":"userId","required":true,"schema":{"description":"Target user id.","type":"string"}},{"description":"Recipe id (from GET /alerts/recipes).","in":"path","name":"id","required":true,"schema":{"description":"Recipe id (from GET /alerts/recipes).","example":"farm-area","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeInputs"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipePreviewResponse"}}},"description":"What the recipe would have fired"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"Invalid recipe (see `code`)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"No such recipe"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"`no_org`: the user has no alert-settings org to stamp the setup with"}},"summary":"Preview an alert recipe for a user (admin)","tags":["Admin"]}},"/v1/admin/alerts/users/{userId}/replay":{"post":{"description":"Backtest: run the detector as-of `asOf` (the subscribe day) and each later `step` date, returning a timeline of what's NEW at each step. Always a dry-run — writes nothing, sends no email. A reconstruction from the current index filtered to each date, not a perfect snapshot.","operationId":"adminReplayUserAlerts","parameters":[{"description":"Target user id.","in":"path","name":"userId","required":true,"schema":{"description":"Target user id.","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplayRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplayResponse"}}},"description":"Per-step timeline of newly-firing alerts"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"}},"summary":"Replay a user's alerts over time (admin, dry-run)","tags":["Admin"]}},"/v1/admin/alerts/users/{userId}/run":{"post":{"description":"Runs all six detectors scoped to this user, in-process and synchronously. Defaults to a dry-run preview that returns the alerts that WOULD fire (per detector, with the decision payloads) without writing the feed, publishing events, or sending email. Set `dryRun: false` to actually fire.","operationId":"adminRunUserAlertDetector","parameters":[{"description":"Target user id.","in":"path","name":"userId","required":true,"schema":{"description":"Target user id.","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunUserDetectorRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunUserDetectorResponse"}}},"description":"Per-detector run summary (fired decisions on a dry-run)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"}},"summary":"Run the alert detector for one user (admin)","tags":["Admin"]}},"/v1/admin/alerts/users/{userId}/subscriptions":{"get":{"operationId":"adminListUserAlertSubscriptions","parameters":[{"description":"Target user id.","in":"path","name":"userId","required":true,"schema":{"description":"Target user id.","type":"string"}},{"description":"Only subscriptions of this subject type.","in":"query","name":"subjectType","required":false,"schema":{"description":"Only subscriptions of this subject type.","enum":["agent","area","nmls","property","loan","sale","company","filter"],"type":"string"}},{"description":"Only subscriptions carrying this alert kind.","in":"query","name":"kind","required":false,"schema":{"description":"Only subscriptions carrying this alert kind.","enum":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan","book_property","book_loan","area_property"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertSubscriptionsResponse"}}},"description":"Subscriptions"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"}},"summary":"List a user's alert subscriptions (admin)","tags":["Admin"]},"post":{"operationId":"adminCreateUserAlertSubscription","parameters":[{"description":"Target user id.","in":"path","name":"userId","required":true,"schema":{"description":"Target user id.","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAlertSubscriptionRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertSubscriptionResponse"}}},"description":"The subscription as saved"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertSubscriptionError"}}},"description":"Invalid subscription (see `code`)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"}},"summary":"Subscribe a user to alerts on a subject (admin)","tags":["Admin"]}},"/v1/admin/alerts/users/{userId}/subscriptions/{id}":{"delete":{"operationId":"adminDeleteUserAlertSubscription","parameters":[{"description":"Target user id.","in":"path","name":"userId","required":true,"schema":{"description":"Target user id.","type":"string"}},{"description":"Opaque subscription id.","in":"path","name":"id","required":true,"schema":{"description":"Opaque subscription id.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertsOkResponse"}}},"description":"Removed"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertSubscriptionError"}}},"description":"Invalid subscription (see `code`)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"}},"summary":"Remove a user's alert subscription (admin)","tags":["Admin"]}},"/v1/admin/alerts/users/{userId}/unread-count":{"get":{"operationId":"adminGetUserUnreadCount","parameters":[{"description":"Target user id.","in":"path","name":"userId","required":true,"schema":{"description":"Target user id.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnreadCountResponse"}}},"description":"Unread count for the user's bell"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"}},"summary":"Get a user's unread alert count (admin)","tags":["Admin"]}},"/v1/admin/alerts/users/{userId}/watched-agents":{"get":{"operationId":"adminListUserWatchedAgents","parameters":[{"description":"Target user id.","in":"path","name":"userId","required":true,"schema":{"description":"Target user id.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatchedAgentsResponse"}}},"description":"Watched agents"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"}},"summary":"List a user's watched agents (admin)","tags":["Admin"]},"post":{"operationId":"adminAddUserWatchedAgent","parameters":[{"description":"Target user id.","in":"path","name":"userId","required":true,"schema":{"description":"Target user id.","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddWatchedAgentRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertsOkResponse"}}},"description":"Added (idempotent)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"}},"summary":"Add a watched agent for a user (admin)","tags":["Admin"]}},"/v1/admin/alerts/users/{userId}/watched-agents/{id}":{"delete":{"operationId":"adminRemoveUserWatchedAgent","parameters":[{"in":"path","name":"userId","required":true,"schema":{"type":"string"}},{"description":"Agent id to remove.","in":"path","name":"id","required":true,"schema":{"description":"Agent id to remove.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertsOkResponse"}}},"description":"Removed (idempotent)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"}},"summary":"Remove a watched agent for a user (admin)","tags":["Admin"]}},"/v1/admin/alerts/users/{userId}/watched-areas":{"get":{"operationId":"adminListUserWatchedAreas","parameters":[{"description":"Target user id.","in":"path","name":"userId","required":true,"schema":{"description":"Target user id.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatchedAreasResponse"}}},"description":"Watched areas"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"}},"summary":"List a user's watched areas (admin)","tags":["Admin"]},"post":{"operationId":"adminAddUserWatchedArea","parameters":[{"description":"Target user id.","in":"path","name":"userId","required":true,"schema":{"description":"Target user id.","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddWatchedAreaRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatchedAreasResponse"}}},"description":"The updated list"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"}},"summary":"Add a watched area for a user (admin)","tags":["Admin"]}},"/v1/admin/alerts/users/{userId}/watched-areas/{id}":{"delete":{"operationId":"adminRemoveUserWatchedArea","parameters":[{"in":"path","name":"userId","required":true,"schema":{"type":"string"}},{"description":"Area id to remove.","in":"path","name":"id","required":true,"schema":{"description":"Area id to remove.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertsOkResponse"}}},"description":"Removed (idempotent)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"}},"summary":"Remove a watched area for a user (admin)","tags":["Admin"]}},"/v1/admin/alerts/users/{userId}/watched-documents":{"get":{"operationId":"adminListUserWatchedDocuments","parameters":[{"description":"Target user id.","in":"path","name":"userId","required":true,"schema":{"description":"Target user id.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatchedDocumentsResponse"}}},"description":"Watched documents"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"}},"summary":"List a user's watched documents (admin)","tags":["Admin"]},"post":{"operationId":"adminAddUserWatchedDocument","parameters":[{"description":"Target user id.","in":"path","name":"userId","required":true,"schema":{"description":"Target user id.","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddWatchedDocumentRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatchedDocumentsResponse"}}},"description":"The updated list of watched documents"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"}},"summary":"Add a watched document (property/sale/loan) for a user (admin)","tags":["Admin"]}},"/v1/admin/alerts/users/{userId}/watched-documents/{documentType}/{documentId}":{"delete":{"operationId":"adminRemoveUserWatchedDocument","parameters":[{"description":"The document kind.","in":"path","name":"documentType","required":true,"schema":{"description":"The document kind.","enum":["sale","property","loan"],"type":"string"}},{"description":"The document id.","in":"path","name":"documentId","required":true,"schema":{"description":"The document id.","type":"string"}},{"description":"Target user id.","in":"path","name":"userId","required":true,"schema":{"description":"Target user id.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertsOkResponse"}}},"description":"Removed (idempotent)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"}},"summary":"Remove a watched document for a user (admin)","tags":["Admin"]}},"/v1/admin/alerts/workspaces/{orgId}/log":{"get":{"description":"Every alert fired for any user in the workspace, newest first. Only alerts fired after the org was captured on each user's config appear.","operationId":"adminListWorkspaceAlertLog","parameters":[{"description":"Workspace / org id.","in":"path","name":"orgId","required":true,"schema":{"description":"Workspace / org id.","type":"string"}},{"description":"Max items to return (default 25).","in":"query","name":"limit","required":false,"schema":{"description":"Max items to return (default 25).","maximum":100,"minimum":1,"type":"integer"}},{"description":"Pagination cursor from a previous response.","in":"query","name":"cursor","required":false,"schema":{"description":"Pagination cursor from a previous response.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAlertLogResponse"}}},"description":"Paginated workspace feed"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"}},"summary":"List a whole workspace's alert feed (admin)","tags":["Admin"]}},"/v1/admin/cad/links/{nmlsId}":{"get":{"description":"Diagnostic: the LO's indexed employment union (sponsorships + registrations), split by source with active counts. `indexGaps` lists what the former database diagnostic showed that the index does not carry.","operationId":"adminGetCadLinks","parameters":[{"description":"Individual NMLS id.","in":"path","name":"nmlsId","required":true,"schema":{"description":"Individual NMLS id.","example":"3352","pattern":"^\\d+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminCadLinks"}}},"description":"Links"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No individual with that NMLS id"}},"summary":"An LO's sponsorship / registration links (admin)","tags":["Admin: NMLS"]}},"/v1/admin/contact-submissions":{"get":{"description":"Newest first. Default `status=needs_review`: pre-checked submissions waiting for a decision.","operationId":"adminListContactSubmissions","parameters":[{"description":"`needs_review` (checked | failed, not yet reviewed; default), `in_progress` (pending | checking), `reviewed`, or `all`.","in":"query","name":"status","required":false,"schema":{"default":"needs_review","description":"`needs_review` (checked | failed, not yet reviewed; default), `in_progress` (pending | checking), `reviewed`, or `all`.","enum":["needs_review","in_progress","reviewed","all"],"type":"string"}},{"description":"`lo` (entity id = NMLS id) or `agent` (canonical agent id).","in":"query","name":"entityType","required":false,"schema":{"description":"`lo` (entity id = NMLS id) or `agent` (canonical agent id).","enum":["lo","agent"],"type":"string"}},{"in":"query","name":"entityId","required":false,"schema":{"maxLength":128,"minLength":1,"type":"string"}},{"in":"query","name":"submitterUserId","required":false,"schema":{"maxLength":128,"minLength":1,"type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"default":50,"maximum":100,"minimum":1,"type":"integer"}},{"description":"`nextCursor` of the previous page (newest first).","in":"query","name":"cursor","required":false,"schema":{"description":"`nextCursor` of the previous page (newest first).","maxLength":512,"minLength":1,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminContactSubmissionList"}}},"description":"One page of submissions"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid query or cursor"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"}},"summary":"List contact submissions (admin)","tags":["Admin: Contact Submissions"]}},"/v1/admin/contact-submissions/approved":{"get":{"operationId":"adminListApprovedContacts","parameters":[{"description":"`lo` (entity id = NMLS id) or `agent` (canonical agent id).","in":"query","name":"entityType","required":true,"schema":{"description":"`lo` (entity id = NMLS id) or `agent` (canonical agent id).","enum":["lo","agent"],"type":"string"}},{"in":"query","name":"entityId","required":true,"schema":{"maxLength":128,"minLength":1,"type":"string"}},{"description":"Include revoked rows. Default false.","in":"query","name":"includeRevoked","required":false,"schema":{"default":"false","description":"Include revoked rows. Default false.","enum":["true","false"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminApprovedContactList"}}},"description":"Approved values, newest first"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid query"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"}},"summary":"Approved contact values for one person (admin)","tags":["Admin: Contact Submissions"]}},"/v1/admin/contact-submissions/approved/{id}/revoke":{"post":{"description":"Already revoked → 200 with the row unchanged.","operationId":"adminRevokeApprovedContact","parameters":[{"in":"path","name":"id","required":true,"schema":{"maxLength":128,"minLength":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminApprovedContactRevokeRequest"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminApprovedContact"}}},"description":"The approved value"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unknown approved value"}},"summary":"Revoke an approved contact value (admin)","tags":["Admin: Contact Submissions"]}},"/v1/admin/contact-submissions/{id}":{"get":{"operationId":"adminGetContactSubmission","parameters":[{"in":"path","name":"id","required":true,"schema":{"maxLength":128,"minLength":1,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminContactSubmission"}}},"description":"Submission"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid id"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unknown submission"}},"summary":"One contact submission with its subject and approved values (admin)","tags":["Admin: Contact Submissions"]}},"/v1/admin/contact-submissions/{id}/review":{"post":{"description":"Approving inserts (or reuses) the live approved value; changing an approval to a rejection revokes the value it created, unless another approval still holds it. Sending a decision already recorded is a no-op. Once every item is decided the submission is `reviewed`.","operationId":"adminReviewContactSubmission","parameters":[{"in":"path","name":"id","required":true,"schema":{"maxLength":128,"minLength":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminContactSubmissionReviewRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminContactSubmission"}}},"description":"Submission after the review"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid decisions"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unknown submission"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Submission is still being checked"}},"summary":"Approve or reject items of a contact submission (admin)","tags":["Admin: Contact Submissions"]}},"/v1/admin/crm/match-candidates":{"post":{"operationId":"adminSearchCrmMatchCandidates","requestBody":{"content":{"application/json":{"schema":{"properties":{"city":{"maxLength":100,"type":"string"},"entityType":{"$ref":"#/components/schemas/CrmEntityType"},"name":{"maxLength":200,"minLength":1,"type":"string"},"state":{"maxLength":50,"type":"string"}},"required":["entityType","name"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminCrmMatchCandidates"}}},"description":"Ranked candidates (best first)."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Find Market-Insights entities a CRM record could link to (admin)","tags":["Admin"]}},"/v1/admin/crm/orgs/{orgId}/apply-mi-updates":{"post":{"description":"`applyCrmMiUpdates` per record for any org: persists ONLY the listed updates (copy `store`, `field`/`kind` and `incoming` as `value` from the review). Sequential, in request order. Free.","operationId":"adminApplyCrmMiUpdates","parameters":[{"description":"The customer's organization id (auth org).","in":"path","name":"orgId","required":true,"schema":{"description":"The customer's organization id (auth org).","maxLength":128,"minLength":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"actor":{"description":"Who is acting, as the caller names it (`charles`, an admin user id). Writes are stamped `admin:<actor>` on the record.","maxLength":128,"minLength":1,"type":"string"},"reason":{"description":"Why (ticket / support request id + one line). Logged.","maxLength":500,"minLength":3,"type":"string"},"records":{"items":{"properties":{"entityId":{"maxLength":128,"minLength":1,"type":"string"},"updates":{"items":{"oneOf":[{"properties":{"field":{"enum":["title","company","location","city","state","zip"],"type":"string"},"store":{"enum":["override"],"type":"string"},"value":{"maxLength":2000,"minLength":1,"type":"string"}},"required":["store","field","value"],"type":"object"},{"properties":{"kind":{"enum":["email","phone","linkedin","facebook","x","instagram","youtube","zillow","realtor","website"],"type":"string"},"store":{"enum":["contact"],"type":"string"},"value":{"maxLength":2000,"minLength":1,"type":"string"}},"required":["store","kind","value"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"}},"required":["entityId","updates"],"type":"object"},"maxItems":25,"minItems":1,"type":"array"}},"required":["records","actor","reason"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminCrmApplyMiResult"}}},"description":"Per-record outcome, in request order."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Apply accepted Market-Insights updates to a customer's records (admin)","tags":["Admin"]}},"/v1/admin/crm/orgs/{orgId}/link":{"post":{"description":"`linkCrmRecord` for any org, after verifying the MM entity resolves: writes `crm_record.link`, logs the record's `linked` activity, lands the mirror row and enriches production inline. 422 `mm_entity_not_found` when the link points at nothing.","operationId":"adminLinkCrmRecord","parameters":[{"description":"The customer's organization id (auth org).","in":"path","name":"orgId","required":true,"schema":{"description":"The customer's organization id (auth org).","maxLength":128,"minLength":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"actor":{"description":"Who is acting, as the caller names it (`charles`, an admin user id). Writes are stamped `admin:<actor>` on the record.","maxLength":128,"minLength":1,"type":"string"},"entityId":{"description":"The record to connect (often a `manual:` id).","maxLength":128,"minLength":1,"type":"string"},"link":{"$ref":"#/components/schemas/CrmLink"},"reason":{"description":"Why (ticket / support request id + one line). Logged.","maxLength":500,"minLength":3,"type":"string"}},"required":["entityId","link","actor","reason"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminCrmLinkResult"}}},"description":"Linked; `previousLink` is what the record pointed at before."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"enum":["mm_entity_not_found"],"type":"string"},"error":{"type":"string"}},"required":["error","code"],"type":"object"}}},"description":"The link does not resolve to a Market-Insights entity of the record's type."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Connect a customer's CRM record to Market Insights (admin)","tags":["Admin"]}},"/v1/admin/crm/orgs/{orgId}/mi-review":{"post":{"description":"The list-level MI read (`getCrmListMiUpdates`) for any org, on explicit records or one page of a list. Does NOT restart the customer's 31-day review clock or touch their seen-ledger; records the review state only. Free.","operationId":"adminReviewCrmMiUpdates","parameters":[{"description":"The customer's organization id (auth org).","in":"path","name":"orgId","required":true,"schema":{"description":"The customer's organization id (auth org).","maxLength":128,"minLength":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"actor":{"description":"Who is acting, as the caller names it (`charles`, an admin user id). Writes are stamped `admin:<actor>` on the record.","maxLength":128,"minLength":1,"type":"string"},"cursor":{"description":"List paging: `nextCursor` of the previous page.","maxLength":256,"type":"string"},"entityIds":{"description":"Explicit records to check.","items":{"maxLength":128,"minLength":1,"type":"string"},"maxItems":50,"minItems":1,"type":"array"},"limit":{"default":25,"maximum":50,"minimum":1,"type":"integer"},"listId":{"description":"Or: check one page of this list's members.","maxLength":128,"minLength":1,"type":"string"},"reason":{"description":"Why (ticket / support request id + one line). Logged.","maxLength":500,"minLength":3,"type":"string"},"refreshMirror":{"default":true,"description":"Freshen each record's mirrored Market-Insights row before the diff (what opening the record does).","type":"boolean"}},"required":["actor","reason"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminCrmMiReviewResult"}}},"description":"Records with proposals (needs_review + snoozed) and the tally."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Check a customer's CRM records against Market Insights (admin)","tags":["Admin"]}},"/v1/admin/enrichments/cache":{"get":{"description":"Returns one page of rows from the DDB enrichment cache table. Optional `empty=true` filters server-side to rows the May 2026 parser-drift incident produced. **Cost note**: DDB Scan reads the whole table boundary regardless of the filter — admin-only.","operationId":"adminScanEnrichmentCache","parameters":[{"description":"Which row kind(s) to scan. Default `both`.","in":"query","name":"scope","required":false,"schema":{"$ref":"#/components/schemas/CacheScope"}},{"description":"When `true`, server-side filter to rows with `size(persons) = 0` — the shape produced by the May 2026 parser-drift incident.","in":"query","name":"empty","required":false,"schema":{"description":"When `true`, server-side filter to rows with `size(persons) = 0` — the shape produced by the May 2026 parser-drift incident.","enum":["true","false"],"type":"string"}},{"in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Page size (1-200, default 50).","in":"query","name":"limit","required":false,"schema":{"description":"Page size (1-200, default 50).","maximum":200,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichmentCacheScanResponse"}}},"description":"One page of cache rows"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"}},"summary":"Paginated scan of the enrichment cache (admin)","tags":["Admin"]}},"/v1/admin/enrichments/cache/bust":{"post":{"description":"Pass full row keys (as returned by `GET /v1/admin/enrichments/cache`). Mix internal and member keys in one call. Returns the count deleted and any keys DDB left in `UnprocessedItems` for the caller to retry.","operationId":"adminBustEnrichmentCacheRows","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichmentCacheBustRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichmentCacheBustResponse"}}},"description":"Delete summary"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"}},"summary":"Batch-delete a list of enrichment cache rows (admin)","tags":["Admin"]}},"/v1/admin/enrichments/cache/internal/{propertyId}":{"delete":{"description":"Idempotent — deleting a missing key is a success. Does NOT bust any `MEMBER#` rows that already cached a copy of this enrichment; use the batch `POST /v1/admin/enrichments/cache/bust` for that.","operationId":"adminDeleteInternalCacheRow","parameters":[{"in":"path","name":"propertyId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichmentCacheDeleteResponse"}}},"description":"Row deleted (or was already absent)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"}},"summary":"Bust a single internal cache row (admin)","tags":["Admin"]},"get":{"operationId":"adminGetInternalCacheRow","parameters":[{"in":"path","name":"propertyId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichmentCacheGetResponse"}}},"description":"The internal cache row (raw, including expired entries)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Row not found"}},"summary":"Inspect a single internal cache row (admin)","tags":["Admin"]}},"/v1/admin/enrichments/cache/member/{orgId}/{userId}/{propertyId}":{"delete":{"description":"Idempotent. Does NOT refund the original credit — the user's purchase remains on their account ledger; this just drops the cache row so the next enrich call re-fetches.","operationId":"adminDeleteMemberCacheRow","parameters":[{"in":"path","name":"orgId","required":true,"schema":{"type":"string"}},{"in":"path","name":"userId","required":true,"schema":{"type":"string"}},{"in":"path","name":"propertyId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichmentCacheDeleteResponse"}}},"description":"Row deleted (or was already absent)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"}},"summary":"Bust a single member entitlement row (admin)","tags":["Admin"]},"get":{"operationId":"adminGetMemberCacheRow","parameters":[{"in":"path","name":"orgId","required":true,"schema":{"type":"string"}},{"in":"path","name":"userId","required":true,"schema":{"type":"string"}},{"in":"path","name":"propertyId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichmentCacheGetResponse"}}},"description":"The member entitlement row (raw, including expired)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Row not found"}},"summary":"Inspect a single member entitlement row (admin)","tags":["Admin"]}},"/v1/admin/enrichments/cache/property/{propertyId}":{"get":{"description":"Returns the internal property cache row and every member entitlement derived from it. Backed by the `byProperty` GSI — single Query, not a table scan. Rows written before the GSI shipped (no `propertyId` attribute) won't appear here until they next refresh.","operationId":"adminGetPropertyCacheChildren","parameters":[{"in":"path","name":"propertyId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichmentCachePropertyChildrenResponse"}}},"description":"Internal row + every member entitlement for this property"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"}},"summary":"List every cache row tied to a property (admin)","tags":["Admin"]}},"/v1/admin/enrichments/cache/stats":{"get":{"description":"Counts internal cache rows by health and prices them at the BatchData per-lookup rate, plus the lookups the internal cache saved. Full-table Scan, memoized for 5 minutes per instance; `fresh=true` rescans.","operationId":"adminGetEnrichmentCacheStats","parameters":[{"description":"When `true`, bypass the 5-minute memo and rescan the table.","in":"query","name":"fresh","required":false,"schema":{"description":"When `true`, bypass the 5-minute memo and rescan the table.","enum":["true","false"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichmentCacheStats"}}},"description":"Cache KPI rollup"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"}},"summary":"Whole-table enrichment cache KPIs (admin)","tags":["Admin"]}},"/v1/admin/jobs/{jobId}":{"get":{"description":"Returns any org's bulk job (delivery or enrichment) with a freshly signed download URL for its result file. Cross-org: signs against the job's own stored org. `resultsUrl` is null until the job is completed.","operationId":"adminGetBulkJob","parameters":[{"description":"Bulk job id (delivery or enrichment).","in":"path","name":"jobId","required":true,"schema":{"description":"Bulk job id (delivery or enrichment).","example":"job_01h...","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminBulkJobResponse"}}},"description":"The job"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No job with that id (or it has aged past its TTL)"}},"summary":"Get a bulk job and a signed download URL (admin)","tags":["Admin: Jobs"]}},"/v1/admin/lo-enrichment/balance":{"get":{"operationId":"adminGetLoEnrichmentBalance","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminLoEnrichmentBalance"}}},"description":"Remaining credits"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Admin role required"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Enrichment key not configured"}},"summary":"Enrichment Firecrawl balance (admin)","tags":["Admin: LO Enrichment"]}},"/v1/admin/lo-enrichment/contacts":{"get":{"description":"Newest attempt first. `cursor` continues a page; `nmlsId` fetches one person; `runId` keeps only people whose last attempt was that run (filtered after the page is read, so a page can be short while `cursor` is still set).","operationId":"adminListLoEnrichedContacts","parameters":[{"in":"query","name":"limit","required":false,"schema":{"default":50,"maximum":100,"minimum":1,"type":"integer"}},{"in":"query","name":"cursor","required":false,"schema":{"maxLength":2048,"type":"string"}},{"description":"One loan officer; the page then holds at most that person.","in":"query","name":"nmlsId","required":false,"schema":{"description":"One loan officer; the page then holds at most that person.","pattern":"^\\d{1,12}$","type":"string"}},{"description":"Only people whose LAST attempt was this run.","in":"query","name":"runId","required":false,"schema":{"description":"Only people whose LAST attempt was this run.","maxLength":128,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminLoEnrichedContactsPage"}}},"description":"A page of enriched loan officers"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad cursor or filter"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Admin role required"}},"summary":"Loan officers the enrichment job has recorded (admin)","tags":["Admin: LO Enrichment"]}},"/v1/admin/lo-enrichment/contacts/{nmlsId}":{"get":{"operationId":"adminGetLoEnrichedContact","parameters":[{"in":"path","name":"nmlsId","required":true,"schema":{"pattern":"^\\d{1,12}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminLoEnrichedContactDetail"}}},"description":"The record"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Never enriched"}},"summary":"One loan officer's enrichment record (admin)","tags":["Admin: LO Enrichment"]}},"/v1/admin/lo-enrichment/runs":{"post":{"description":"Starts the `lo-enrichment` ECS task. Progress + outcome: the admin Job Runs page (job `lo-enrichment`). The run hard-stops at `creditBudget` and aborts if the enrichment Firecrawl account holds less than it.","operationId":"adminLaunchLoEnrichmentRun","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminLoEnrichmentRunRequest"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminLoEnrichmentLaunch"}}},"description":"Run queued"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Admin role required"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"ECS not configured or launch failed"}},"summary":"Launch an LO contact enrichment run (admin)","tags":["Admin: LO Enrichment"]}},"/v1/admin/monitors/templates":{"get":{"operationId":"adminListMonitorTemplates","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminMonitorTemplateList"}}},"description":"Templates"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"The request is not a valid monitor (`code` says which part)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"Sign in first."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`no_org`: select an organization first."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`unknown_monitor`, or the route is not available to you yet."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`name_conflict`, `version_conflict`, `monitor_limit`, `template_archived` or `check_in_flight`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`check_limit`: no checks left today."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`studio_unavailable`: try again shortly."}},"summary":"List monitor templates (every status)","tags":["Admin"]}},"/v1/admin/monitors/templates/{templateId}":{"get":{"operationId":"adminGetMonitorTemplate","parameters":[{"in":"path","name":"templateId","required":true,"schema":{"maxLength":48,"pattern":"^[a-z0-9]+(-[a-z0-9]+)*$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminMonitorTemplateResponse"}}},"description":"The template"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"The request is not a valid monitor (`code` says which part)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"Sign in first."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`no_org`: select an organization first."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`unknown_monitor`, or the route is not available to you yet."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`name_conflict`, `version_conflict`, `monitor_limit`, `template_archived` or `check_in_flight`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`check_limit`: no checks left today."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`studio_unavailable`: try again shortly."}},"summary":"Get a monitor template","tags":["Admin"]},"put":{"description":"Without `version`: create a draft (409 if it exists). With the `version` read: replace it, keeping its status.","operationId":"adminPutMonitorTemplate","parameters":[{"in":"path","name":"templateId","required":true,"schema":{"maxLength":48,"pattern":"^[a-z0-9]+(-[a-z0-9]+)*$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminMonitorTemplateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminMonitorTemplateResponse"}}},"description":"Saved"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"The request is not a valid monitor (`code` says which part)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"Sign in first."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`no_org`: select an organization first."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`unknown_monitor`, or the route is not available to you yet."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`name_conflict`, `version_conflict`, `monitor_limit`, `template_archived` or `check_in_flight`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`check_limit`: no checks left today."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`studio_unavailable`: try again shortly."}},"summary":"Create or replace a monitor template","tags":["Admin"]}},"/v1/admin/monitors/templates/{templateId}/archive":{"post":{"operationId":"adminArchiveMonitorTemplate","parameters":[{"in":"path","name":"templateId","required":true,"schema":{"maxLength":48,"pattern":"^[a-z0-9]+(-[a-z0-9]+)*$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminMonitorTemplateResponse"}}},"description":"Saved"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"The request is not a valid monitor (`code` says which part)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"Sign in first."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`no_org`: select an organization first."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`unknown_monitor`, or the route is not available to you yet."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`name_conflict`, `version_conflict`, `monitor_limit`, `template_archived` or `check_in_flight`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`check_limit`: no checks left today."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`studio_unavailable`: try again shortly."}},"summary":"Archive a monitor template","tags":["Admin"]}},"/v1/admin/monitors/templates/{templateId}/publish":{"post":{"operationId":"adminPublishMonitorTemplate","parameters":[{"in":"path","name":"templateId","required":true,"schema":{"maxLength":48,"pattern":"^[a-z0-9]+(-[a-z0-9]+)*$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminMonitorTemplateResponse"}}},"description":"Saved"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"The request is not a valid monitor (`code` says which part)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"Sign in first."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`no_org`: select an organization first."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`unknown_monitor`, or the route is not available to you yet."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`name_conflict`, `version_conflict`, `monitor_limit`, `template_archived` or `check_in_flight`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`check_limit`: no checks left today."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`studio_unavailable`: try again shortly."}},"summary":"Publish a monitor template","tags":["Admin"]}},"/v1/admin/monitors/users/{userId}/monitors":{"get":{"operationId":"adminListUserMonitors","parameters":[{"in":"path","name":"userId","required":true,"schema":{"maxLength":128,"minLength":1,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminMonitorList"}}},"description":"Their monitors"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"The request is not a valid monitor (`code` says which part)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"Sign in first."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`no_org`: select an organization first."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`unknown_monitor`, or the route is not available to you yet."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`name_conflict`, `version_conflict`, `monitor_limit`, `template_archived` or `check_in_flight`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`check_limit`: no checks left today."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`studio_unavailable`: try again shortly."}},"summary":"List a user's monitors","tags":["Admin"]},"post":{"operationId":"adminCreateUserMonitor","parameters":[{"in":"path","name":"userId","required":true,"schema":{"maxLength":128,"minLength":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminCreateMonitor"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorResponse"}}},"description":"Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"The request is not a valid monitor (`code` says which part)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"Sign in first."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`no_org`: select an organization first."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`unknown_monitor`, or the route is not available to you yet."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`name_conflict`, `version_conflict`, `monitor_limit`, `template_archived` or `check_in_flight`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`check_limit`: no checks left today."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`studio_unavailable`: try again shortly."}},"summary":"Set up a monitor for a user","tags":["Admin"]}},"/v1/admin/monitors/users/{userId}/monitors/preview":{"post":{"operationId":"adminPreviewUserMonitor","parameters":[{"in":"path","name":"userId","required":true,"schema":{"maxLength":128,"minLength":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminPreviewMonitor"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorPreview"}}},"description":"Preview"},"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorCheckResponse"}}},"description":"Still running"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"The request is not a valid monitor (`code` says which part)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"Sign in first."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`no_org`: select an organization first."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`unknown_monitor`, or the route is not available to you yet."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`name_conflict`, `version_conflict`, `monitor_limit`, `template_archived` or `check_in_flight`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`check_limit`: no checks left today."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`studio_unavailable`: try again shortly."}},"summary":"Preview a monitor for a user","tags":["Admin"]}},"/v1/admin/monitors/users/{userId}/monitors/{id}":{"delete":{"operationId":"adminDeleteUserMonitor","parameters":[{"in":"path","name":"userId","required":true,"schema":{"maxLength":128,"minLength":1,"type":"string"}},{"description":"The monitor's id (`mon_…`).","in":"path","name":"id","required":true,"schema":{"description":"The monitor's id (`mon_…`).","pattern":"^mon_[0-9a-f]{24}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorDeleted"}}},"description":"Deleted"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"The request is not a valid monitor (`code` says which part)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"Sign in first."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`no_org`: select an organization first."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`unknown_monitor`, or the route is not available to you yet."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`name_conflict`, `version_conflict`, `monitor_limit`, `template_archived` or `check_in_flight`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`check_limit`: no checks left today."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`studio_unavailable`: try again shortly."}},"summary":"Delete a user's monitor","tags":["Admin"]},"get":{"operationId":"adminGetUserMonitor","parameters":[{"in":"path","name":"userId","required":true,"schema":{"maxLength":128,"minLength":1,"type":"string"}},{"description":"The monitor's id (`mon_…`).","in":"path","name":"id","required":true,"schema":{"description":"The monitor's id (`mon_…`).","pattern":"^mon_[0-9a-f]{24}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorResponse"}}},"description":"The monitor"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"The request is not a valid monitor (`code` says which part)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"Sign in first."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`no_org`: select an organization first."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`unknown_monitor`, or the route is not available to you yet."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`name_conflict`, `version_conflict`, `monitor_limit`, `template_archived` or `check_in_flight`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`check_limit`: no checks left today."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`studio_unavailable`: try again shortly."}},"summary":"Get a user's monitor","tags":["Admin"]},"patch":{"operationId":"adminUpdateUserMonitor","parameters":[{"in":"path","name":"userId","required":true,"schema":{"maxLength":128,"minLength":1,"type":"string"}},{"description":"The monitor's id (`mon_…`).","in":"path","name":"id","required":true,"schema":{"description":"The monitor's id (`mon_…`).","pattern":"^mon_[0-9a-f]{24}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMonitor"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorResponse"}}},"description":"Changed"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"The request is not a valid monitor (`code` says which part)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"Sign in first."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`no_org`: select an organization first."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`unknown_monitor`, or the route is not available to you yet."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`name_conflict`, `version_conflict`, `monitor_limit`, `template_archived` or `check_in_flight`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`check_limit`: no checks left today."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`studio_unavailable`: try again shortly."}},"summary":"Change a user's monitor","tags":["Admin"]}},"/v1/admin/monitors/users/{userId}/monitors/{id}/check":{"post":{"operationId":"adminCheckUserMonitor","parameters":[{"in":"path","name":"userId","required":true,"schema":{"maxLength":128,"minLength":1,"type":"string"}},{"description":"The monitor's id (`mon_…`).","in":"path","name":"id","required":true,"schema":{"description":"The monitor's id (`mon_…`).","pattern":"^mon_[0-9a-f]{24}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorCheckResponse"}}},"description":"Checked"},"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorCheckResponse"}}},"description":"Still running"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"The request is not a valid monitor (`code` says which part)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"Sign in first."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`no_org`: select an organization first."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`unknown_monitor`, or the route is not available to you yet."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`name_conflict`, `version_conflict`, `monitor_limit`, `template_archived` or `check_in_flight`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`check_limit`: no checks left today."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`studio_unavailable`: try again shortly."}},"summary":"Check a user's monitor now","tags":["Admin"]}},"/v1/admin/saved-filters":{"get":{"operationId":"adminListSavedFilters","parameters":[{"in":"query","name":"organizationId","required":false,"schema":{"maxLength":128,"minLength":1,"type":"string"}},{"in":"query","name":"ownerUserId","required":false,"schema":{"maxLength":128,"minLength":1,"type":"string"}},{"description":"Which list the filter runs against. Market targets run against that entity's list operation (see `operationId`, e.g. listOriginators); `crm_people` / `crm_companies` are UI-only (filtered client-side).","in":"query","name":"target","required":false,"schema":{"description":"Which list the filter runs against. Market targets run against that entity's list operation (see `operationId`, e.g. listOriginators); `crm_people` / `crm_companies` are UI-only (filtered client-side).","enum":["originators","agents","companies","branches","offices","loans","properties","sales","crm_people","crm_companies"],"type":"string"}},{"description":"`filter` (default) — a saved search; `view` — a saved CRM table layout (columns / order) kept in `uiState`. Views never carry a `query` and have their own 25-per-target quota. Fixed at create.","in":"query","name":"kind","required":false,"schema":{"description":"`filter` (default) — a saved search; `view` — a saved CRM table layout (columns / order) kept in `uiState`. Views never carry a `query` and have their own 25-per-target quota. Fixed at create.","enum":["filter","view"],"type":"string"}},{"description":"Who can see the filter: `private` — only its owner; `organization` — every member of the workspace (view; edit too when `orgWidePermission` is `editor`); `shared` — only the members it was shared with (see `/saved-filters/{id}/shares`).","in":"query","name":"visibility","required":false,"schema":{"$ref":"#/components/schemas/SavedFilterVisibility"}},{"description":"Case-insensitive substring of the name.","in":"query","name":"q","required":false,"schema":{"description":"Case-insensitive substring of the name.","maxLength":100,"type":"string"}},{"description":"Sort column. Never-used filters sort as oldest under `lastUsedAt`.","in":"query","name":"sort","required":false,"schema":{"default":"updatedAt","description":"Sort column. Never-used filters sort as oldest under `lastUsedAt`.","enum":["updatedAt","createdAt","useCount","lastUsedAt"],"type":"string"}},{"in":"query","name":"order","required":false,"schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"description":"`pagination.nextCursor` from the previous page.","in":"query","name":"cursor","required":false,"schema":{"description":"`pagination.nextCursor` from the previous page.","maxLength":512,"type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"default":50,"maximum":200,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSavedFilterList"}}},"description":"One page of saved filters."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"List saved filters across every workspace (admin)","tags":["Admin"]}},"/v1/admin/saved-filters/stats":{"get":{"operationId":"adminSavedFilterStats","parameters":[{"description":"Narrow the counts to one workspace.","in":"query","name":"organizationId","required":false,"schema":{"description":"Narrow the counts to one workspace.","maxLength":128,"minLength":1,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSavedFilterStats"}}},"description":"Counts."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Saved-filter counts and usage (admin)","tags":["Admin"]}},"/v1/admin/saved-filters/{id}":{"delete":{"operationId":"adminDeleteSavedFilter","parameters":[{"description":"Saved-filter id (nanoid).","in":"path","name":"id","required":true,"schema":{"description":"Saved-filter id (nanoid).","example":"V1StGXR8_Z5jdHi6B-myT","maxLength":32,"minLength":1,"pattern":"^[\\w-]+$","type":"string"}},{"description":"Who is acting, as the caller names it (`charles`, an admin user id). Defaults to the authenticated caller. Logged.","in":"query","name":"actor","required":false,"schema":{"description":"Who is acting, as the caller names it (`charles`, an admin user id). Defaults to the authenticated caller. Logged.","maxLength":128,"minLength":1,"type":"string"}},{"description":"Why (ticket / support request id + one line). Logged.","in":"query","name":"reason","required":false,"schema":{"description":"Why (ticket / support request id + one line). Logged.","maxLength":500,"minLength":1,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"deleted":{"enum":[true],"type":"boolean"}},"required":["deleted"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Deleted (its shares go with it)."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Saved filter not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Delete any saved filter (admin)","tags":["Admin"]},"get":{"operationId":"adminGetSavedFilter","parameters":[{"description":"Saved-filter id (nanoid).","in":"path","name":"id","required":true,"schema":{"description":"Saved-filter id (nanoid).","example":"V1StGXR8_Z5jdHi6B-myT","maxLength":32,"minLength":1,"pattern":"^[\\w-]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSavedFilterDetailResult"}}},"description":"The saved filter with its per-user shares."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Saved filter not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Get any saved filter (admin)","tags":["Admin"]},"patch":{"description":"Applied in order: name / icon / owner, then `visibility`, then `orgWidePermission` — the same visibility rules as the user route.","operationId":"adminUpdateSavedFilter","parameters":[{"description":"Saved-filter id (nanoid).","in":"path","name":"id","required":true,"schema":{"description":"Saved-filter id (nanoid).","example":"V1StGXR8_Z5jdHi6B-myT","maxLength":32,"minLength":1,"pattern":"^[\\w-]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUpdateSavedFilterRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSavedFilterDetailResult"}}},"description":"The saved filter with its per-user shares."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSavedFilterError"}}},"description":"Validation error, or (`code: NOT_ORG_MEMBER`) the user is not a member of the filter's workspace."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Saved filter not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Workspace members could not be read (auth service unavailable)."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Update any saved filter, incl. ownership transfer (admin)","tags":["Admin"]}},"/v1/admin/saved-filters/{id}/shares":{"delete":{"operationId":"adminRevokeSavedFilterAccess","parameters":[{"description":"Saved-filter id (nanoid).","in":"path","name":"id","required":true,"schema":{"description":"Saved-filter id (nanoid).","example":"V1StGXR8_Z5jdHi6B-myT","maxLength":32,"minLength":1,"pattern":"^[\\w-]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminRevokeSavedFilterAccessRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"revoked":{"type":"boolean"}},"required":["revoked"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"`false` = there was no share."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Saved filter not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Remove a member's share on any saved filter (admin)","tags":["Admin"]},"post":{"description":"Same semantics as `grantSavedFilterAccess` without the owner check: idempotent, a private filter becomes `shared`, granting the owner is a no-op (`granted: false`).","operationId":"adminGrantSavedFilterAccess","parameters":[{"description":"Saved-filter id (nanoid).","in":"path","name":"id","required":true,"schema":{"description":"Saved-filter id (nanoid).","example":"V1StGXR8_Z5jdHi6B-myT","maxLength":32,"minLength":1,"pattern":"^[\\w-]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminGrantSavedFilterAccessRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"granted":{"type":"boolean"}},"required":["granted"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"`true` = new share; `false` = updated, or the owner."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSavedFilterError"}}},"description":"Validation error, or (`code: NOT_ORG_MEMBER`) the user is not a member of the filter's workspace."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Saved filter not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Workspace members could not be read (auth service unavailable)."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Share any saved filter with a member of its workspace (admin)","tags":["Admin"]}},"/v1/admin/signals/runs":{"post":{"description":"Starts the `predictive-signals` ECS task for one signal. Progress + outcome: the admin Job Runs page (job `signals-<signal>`).","operationId":"adminLaunchSignalsRun","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSignalsRunRequest"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSignalsRunLaunch"}}},"description":"Task started"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Admin role required"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"ECS not configured or launch failed"}},"summary":"Start a predictive-signals run (admin)","tags":["Admin: Signals"]}},"/v1/admin/signals/status":{"get":{"description":"The latest run metadata for each signal. A signal that has never completed a run comes back with null fields.","operationId":"adminGetSignalsStatus","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSignalsStatus"}}},"description":"One entry per signal"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Admin role required"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Signals table not configured"}},"summary":"Predictive-signals run metadata (admin)","tags":["Admin: Signals"]}},"/v1/admin/studio/health":{"get":{"description":"What the Studio service is doing right now: questions and job runs in progress, the local copy of the market tables, the latest scheduled sweep, and finished work that has not been charged. `load`, `mirror` and `sweep` describe the one task that answered.","operationId":"adminGetStudioHealth","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStudioHealthResult"}}},"description":"The service's state."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Platform admin role required"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStudioError"}}},"description":"The Studio service is not available"}},"summary":"Studio service health (admin)","tags":["Admin"]}},"/v1/admin/studio/jobs":{"get":{"description":"Every saved job with its schedule and its last run (status, time, rows, alerts fired). The job's SQL is not returned.","operationId":"adminListStudioJobs","parameters":[{"description":"Only this workspace.","in":"query","name":"organizationId","required":false,"schema":{"description":"Only this workspace.","pattern":"^[A-Za-z0-9_-]{1,64}$","type":"string"}},{"description":"Name contains (case-insensitive).","in":"query","name":"q","required":false,"schema":{"description":"Name contains (case-insensitive).","maxLength":100,"minLength":1,"type":"string"}},{"in":"query","name":"schedule","required":false,"schema":{"enum":["manual","daily","weekly"],"type":"string"}},{"description":"`never`: the job has not run yet.","in":"query","name":"lastRunStatus","required":false,"schema":{"description":"`never`: the job has not run yet.","enum":["succeeded","failed","running","never"],"type":"string"}},{"in":"query","name":"sort","required":false,"schema":{"default":"lastRunAt","enum":["lastRunAt","createdAt","name","rowCount"],"type":"string"}},{"description":"`pagination.nextCursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"description":"`pagination.nextCursor` of the previous page.","type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"default":50,"maximum":200,"minimum":1,"type":"integer"}},{"in":"query","name":"order","required":false,"schema":{"default":"desc","enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStudioJobList"}}},"description":"One page of jobs."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Platform admin role required"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStudioError"}}},"description":"The Studio service is not available"}},"summary":"Saved Studio jobs across every workspace (admin)","tags":["Admin"]}},"/v1/admin/studio/models":{"get":{"description":"Every prediction model: what it predicts, where, its status, version, the headline lift from its report card and when its scores were last refreshed. Never the scores.","operationId":"adminListStudioModels","parameters":[{"description":"Only this workspace.","in":"query","name":"organizationId","required":false,"schema":{"description":"Only this workspace.","pattern":"^[A-Za-z0-9_-]{1,64}$","type":"string"}},{"description":"Name contains (case-insensitive).","in":"query","name":"q","required":false,"schema":{"description":"Name contains (case-insensitive).","maxLength":100,"minLength":1,"type":"string"}},{"in":"query","name":"status","required":false,"schema":{"enum":["training","ready","refused","failed"],"type":"string"}},{"in":"query","name":"sort","required":false,"schema":{"default":"updatedAt","enum":["updatedAt","createdAt","name","lift"],"type":"string"}},{"description":"`pagination.nextCursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"description":"`pagination.nextCursor` of the previous page.","type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"default":50,"maximum":200,"minimum":1,"type":"integer"}},{"in":"query","name":"order","required":false,"schema":{"default":"desc","enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStudioModelList"}}},"description":"One page of models."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Platform admin role required"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStudioError"}}},"description":"The Studio service is not available"}},"summary":"Studio models across every workspace (admin)","tags":["Admin"]}},"/v1/admin/studio/models/{organizationId}/{name}":{"get":{"description":"The model as its owner reads it, report card included, for support. Read-only: it does not start, charge for or publish anything, so a run that has ended and has not been looked at by its owner still reads as training. Each call is recorded (`studio.admin_action`, action `view_model`).","operationId":"adminGetStudioModel","parameters":[{"description":"A workspace (organization) id.","in":"path","name":"organizationId","required":true,"schema":{"description":"A workspace (organization) id.","pattern":"^[A-Za-z0-9_-]{1,64}$","type":"string"}},{"in":"path","name":"name","required":true,"schema":{"maxLength":80,"minLength":1,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStudioModelDetail"}}},"description":"The model."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Platform admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStudioError"}}},"description":"That workspace has no model of that name"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStudioError"}}},"description":"The Studio service is not available"}},"summary":"One Studio model with its report card (admin)","tags":["Admin"]}},"/v1/admin/studio/organizations":{"get":{"description":"One row per workspace that has anything in Studio: how many jobs, uploads and models it has, how many questions it asked in the last 7 and 30 days, when it last did anything, and how much finished work is waiting to be charged. Credits already charged are in the credit ledger, not here.","operationId":"adminListStudioOrganizations","parameters":[{"description":"Only this workspace.","in":"query","name":"organizationId","required":false,"schema":{"description":"Only this workspace.","pattern":"^[A-Za-z0-9_-]{1,64}$","type":"string"}},{"in":"query","name":"sort","required":false,"schema":{"default":"lastActivityAt","enum":["lastActivityAt","questions7d","questions30d","jobs","uploads","models","owed"],"type":"string"}},{"description":"`pagination.nextCursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"description":"`pagination.nextCursor` of the previous page.","type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"default":50,"maximum":200,"minimum":1,"type":"integer"}},{"in":"query","name":"order","required":false,"schema":{"default":"desc","enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStudioOrganizationList"}}},"description":"One page of workspaces."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Platform admin role required"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStudioError"}}},"description":"The Studio service is not available"}},"summary":"Workspaces that use Studio (admin)","tags":["Admin"]}},"/v1/admin/studio/published":{"get":{"description":"Every table ModelMatch publishes for all organizations: what it is, which run readers see, when it was refreshed, what produced it (a system job, a program or a model) and who published it.","operationId":"adminListStudioPublished","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStudioPublishedTables"}}},"description":"The tables"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"Refused, and `error` says why: `invalid_request`, or SQL that is not one read-only SELECT over the catalog, or a table that cannot be published as it is (`invalid_job`: an empty run, a column with no description, a key that is not unique, a change of shape), or an audience that cannot be set (`invalid_job`: an organization id that is not valid, more than 200 organizations, or organizations added to a table published for every organization)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Platform admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_not_found`, `program_not_found`, `run_not_found` or `not_published`."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_exists`, `job_running`, `program_running`, `nothing_to_publish` (no successful run yet), `published_unavailable` (published tables are switched off) or `runner_unavailable` (heavy runs cannot be started here)."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`timeout`, `result_too_large` or `job_failed`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`busy`: retry."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`studio_unavailable` — the Studio service is not answering."}},"summary":"Published Studio tables (admin)","tags":["Admin: Studio"]}},"/v1/admin/studio/published/audit":{"get":{"description":"The audit trail of published tables, newest first: every publish, replace and unpublish, with who did it and which run it made visible.","operationId":"adminListStudioPublishedAudit","parameters":[{"description":"Entries to return, newest first (default 100).","in":"query","name":"limit","required":false,"schema":{"description":"Entries to return, newest first (default 100).","maximum":500,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStudioPublishedAudit"}}},"description":"The entries"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"Refused, and `error` says why: `invalid_request`, or SQL that is not one read-only SELECT over the catalog, or a table that cannot be published as it is (`invalid_job`: an empty run, a column with no description, a key that is not unique, a change of shape), or an audience that cannot be set (`invalid_job`: an organization id that is not valid, more than 200 organizations, or organizations added to a table published for every organization)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Platform admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_not_found`, `program_not_found`, `run_not_found` or `not_published`."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_exists`, `job_running`, `program_running`, `nothing_to_publish` (no successful run yet), `published_unavailable` (published tables are switched off) or `runner_unavailable` (heavy runs cannot be started here)."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`timeout`, `result_too_large` or `job_failed`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`busy`: retry."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`studio_unavailable` — the Studio service is not answering."}},"summary":"Who published what, when (admin)","tags":["Admin: Studio"]}},"/v1/admin/studio/published/jobs":{"get":{"description":"The jobs saved in the system space. A job with `published: null` is a draft: its result is a table only platform admins can see.","operationId":"adminListStudioSystemJobs","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStudioSystemJobs"}}},"description":"The jobs"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"Refused, and `error` says why: `invalid_request`, or SQL that is not one read-only SELECT over the catalog, or a table that cannot be published as it is (`invalid_job`: an empty run, a column with no description, a key that is not unique, a change of shape), or an audience that cannot be set (`invalid_job`: an organization id that is not valid, more than 200 organizations, or organizations added to a table published for every organization)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Platform admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_not_found`, `program_not_found`, `run_not_found` or `not_published`."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_exists`, `job_running`, `program_running`, `nothing_to_publish` (no successful run yet), `published_unavailable` (published tables are switched off) or `runner_unavailable` (heavy runs cannot be started here)."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`timeout`, `result_too_large` or `job_failed`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`busy`: retry."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`studio_unavailable` — the Studio service is not answering."}},"summary":"System jobs: drafts and published (admin)","tags":["Admin: Studio"]},"post":{"description":"Save a job with the same spec a customer uses — one read-only SELECT over the catalog, checked by the same guard — in the system space. It is a draft until published. Its runs go to dedicated capacity (8 vCPU / 32 GB, up to about 4 hours; set `perState` to run it once per state) and hold up to 5,000,000 rows (a customer's ordinary job: 120 seconds, 500,000); they are never charged. When dedicated capacity is switched off it runs on the shared server, for up to 15 minutes. A job that needs more than one SELECT, more time, or columns the catalog does not expose is a program in the repo, not this.","operationId":"adminCreateStudioSystemJob","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioJobRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStudioSystemJobSaved"}}},"description":"The saved draft"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"Refused, and `error` says why: `invalid_request`, or SQL that is not one read-only SELECT over the catalog, or a table that cannot be published as it is (`invalid_job`: an empty run, a column with no description, a key that is not unique, a change of shape), or an audience that cannot be set (`invalid_job`: an organization id that is not valid, more than 200 organizations, or organizations added to a table published for every organization)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Platform admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_not_found`, `program_not_found`, `run_not_found` or `not_published`."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_exists`, `job_running`, `program_running`, `nothing_to_publish` (no successful run yet), `published_unavailable` (published tables are switched off) or `runner_unavailable` (heavy runs cannot be started here)."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`timeout`, `result_too_large` or `job_failed`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`busy`: retry."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`studio_unavailable` — the Studio service is not answering."}},"summary":"Save a job in the system space (admin)","tags":["Admin: Studio"]}},"/v1/admin/studio/published/jobs/{name}":{"delete":{"description":"Delete a system job, its run history and its draft results. Refused while the job is published: unpublish it first.","operationId":"adminDeleteStudioSystemJob","parameters":[{"description":"The system job's name. Published, it is the table `mm_<name>`.","in":"path","name":"name","required":true,"schema":{"description":"The system job's name. Published, it is the table `mm_<name>`.","example":"top_lenders","pattern":"^[a-z][a-z0-9_]{0,62}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStudioSystemJobDeleted"}}},"description":"Deleted"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"Refused, and `error` says why: `invalid_request`, or SQL that is not one read-only SELECT over the catalog, or a table that cannot be published as it is (`invalid_job`: an empty run, a column with no description, a key that is not unique, a change of shape), or an audience that cannot be set (`invalid_job`: an organization id that is not valid, more than 200 organizations, or organizations added to a table published for every organization)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Platform admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_not_found`, `program_not_found`, `run_not_found` or `not_published`."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_exists`, `job_running`, `program_running`, `nothing_to_publish` (no successful run yet), `published_unavailable` (published tables are switched off) or `runner_unavailable` (heavy runs cannot be started here)."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`timeout`, `result_too_large` or `job_failed`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`busy`: retry."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`studio_unavailable` — the Studio service is not answering."}},"summary":"Delete a draft system job (admin)","tags":["Admin: Studio"]},"get":{"description":"A system job with its recent runs (newest first), what changed in the latest successful run, and the published table when there is one.","operationId":"adminGetStudioSystemJob","parameters":[{"description":"The system job's name. Published, it is the table `mm_<name>`.","in":"path","name":"name","required":true,"schema":{"description":"The system job's name. Published, it is the table `mm_<name>`.","example":"top_lenders","pattern":"^[a-z][a-z0-9_]{0,62}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStudioSystemJobDetail"}}},"description":"The job"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"Refused, and `error` says why: `invalid_request`, or SQL that is not one read-only SELECT over the catalog, or a table that cannot be published as it is (`invalid_job`: an empty run, a column with no description, a key that is not unique, a change of shape), or an audience that cannot be set (`invalid_job`: an organization id that is not valid, more than 200 organizations, or organizations added to a table published for every organization)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Platform admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_not_found`, `program_not_found`, `run_not_found` or `not_published`."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_exists`, `job_running`, `program_running`, `nothing_to_publish` (no successful run yet), `published_unavailable` (published tables are switched off) or `runner_unavailable` (heavy runs cannot be started here)."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`timeout`, `result_too_large` or `job_failed`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`busy`: retry."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`studio_unavailable` — the Studio service is not answering."}},"summary":"One system job: its runs and whether it is published (admin)","tags":["Admin: Studio"]}},"/v1/admin/studio/published/jobs/{name}/publish":{"post":{"description":"Make the job's latest successful run the table `mm_<name>` in every organization's catalog, or replace the version that is there. Every column needs a plain-language description. From then on each successful run of the job replaces the published table by itself. Recorded in the audit trail under the caller's identity.","operationId":"adminPublishStudioSystemJob","parameters":[{"description":"The system job's name. Published, it is the table `mm_<name>`.","in":"path","name":"name","required":true,"schema":{"description":"The system job's name. Published, it is the table `mm_<name>`.","example":"top_lenders","pattern":"^[a-z][a-z0-9_]{0,62}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStudioPublishJobRequest"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStudioPublishedTableResult"}}},"description":"The published table"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"Refused, and `error` says why: `invalid_request`, or SQL that is not one read-only SELECT over the catalog, or a table that cannot be published as it is (`invalid_job`: an empty run, a column with no description, a key that is not unique, a change of shape), or an audience that cannot be set (`invalid_job`: an organization id that is not valid, more than 200 organizations, or organizations added to a table published for every organization)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Platform admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_not_found`, `program_not_found`, `run_not_found` or `not_published`."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_exists`, `job_running`, `program_running`, `nothing_to_publish` (no successful run yet), `published_unavailable` (published tables are switched off) or `runner_unavailable` (heavy runs cannot be started here)."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`timeout`, `result_too_large` or `job_failed`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`busy`: retry."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`studio_unavailable` — the Studio service is not answering."}},"summary":"Publish a system job's latest run (admin)","tags":["Admin: Studio"]}},"/v1/admin/studio/published/jobs/{name}/run":{"post":{"description":"Run a system job now. `200` with the finished run, or `202` when it is still going (read the job). Not charged to anyone. When the job is published, a run that succeeds replaces the published table — atomically: readers see the old rows until the new ones are complete — and the old version becomes `<table>__previous`.","operationId":"adminRunStudioSystemJob","parameters":[{"description":"The system job's name. Published, it is the table `mm_<name>`.","in":"path","name":"name","required":true,"schema":{"description":"The system job's name. Published, it is the table `mm_<name>`.","example":"top_lenders","pattern":"^[a-z][a-z0-9_]{0,62}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStudioSystemJobRun"}}},"description":"The run finished"},"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStudioSystemJobRun"}}},"description":"Still running"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"Refused, and `error` says why: `invalid_request`, or SQL that is not one read-only SELECT over the catalog, or a table that cannot be published as it is (`invalid_job`: an empty run, a column with no description, a key that is not unique, a change of shape), or an audience that cannot be set (`invalid_job`: an organization id that is not valid, more than 200 organizations, or organizations added to a table published for every organization)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Platform admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_not_found`, `program_not_found`, `run_not_found` or `not_published`."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_exists`, `job_running`, `program_running`, `nothing_to_publish` (no successful run yet), `published_unavailable` (published tables are switched off) or `runner_unavailable` (heavy runs cannot be started here)."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`timeout`, `result_too_large` or `job_failed`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`busy`: retry."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`studio_unavailable` — the Studio service is not answering."}},"summary":"Run a system job now (admin)","tags":["Admin: Studio"]}},"/v1/admin/studio/published/models":{"get":{"description":"The prediction models ModelMatch trains in the system space, with their status and report card, and whether each is published for every organization.","operationId":"adminListStudioSystemModels","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStudioSystemModels"}}},"description":"The models"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"Refused, and `error` says why: `invalid_request`, or SQL that is not one read-only SELECT over the catalog, or a table that cannot be published as it is (`invalid_job`: an empty run, a column with no description, a key that is not unique, a change of shape), or an audience that cannot be set (`invalid_job`: an organization id that is not valid, more than 200 organizations, or organizations added to a table published for every organization)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Platform admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`model_not_found` (no system model of that name) or `not_published`."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`model_exists` (pass `replace: true` for a new version), `model_training_in_progress`, `model_not_ready`, `model_limit_reached`, `nothing_to_publish` (no scores yet) or `published_unavailable`."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`timeout`, `result_too_large` or `job_failed`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`busy`: retry."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`studio_unavailable` — the Studio service is not answering."}},"summary":"System models: drafts and published (admin)","tags":["Admin: Studio"]},"post":{"description":"The same definition a customer gives (`createStudioModel`): what to predict, for which state, and the data points. Trained in the system space with the heavy model limits (60 models, up to 40,000,000 market rows read before a state is sampled, the larger machine) and a scores table of up to 10,000,000 rows (every home of the largest state), never charged, and a draft until published. Answers at once with `status: training`; read it with `adminGetStudioSystemModel`.","operationId":"adminCreateStudioSystemModel","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStudioSystemModelResult"}}},"description":"Training"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"Refused, and `error` says why: `invalid_request`, or SQL that is not one read-only SELECT over the catalog, or a table that cannot be published as it is (`invalid_job`: an empty run, a column with no description, a key that is not unique, a change of shape), or an audience that cannot be set (`invalid_job`: an organization id that is not valid, more than 200 organizations, or organizations added to a table published for every organization)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Platform admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`model_not_found` (no system model of that name) or `not_published`."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`model_exists` (pass `replace: true` for a new version), `model_training_in_progress`, `model_not_ready`, `model_limit_reached`, `nothing_to_publish` (no scores yet) or `published_unavailable`."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`timeout`, `result_too_large` or `job_failed`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`busy`: retry."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`studio_unavailable` — the Studio service is not answering."}},"summary":"Define a system model and start training it (admin)","tags":["Admin: Studio"]}},"/v1/admin/studio/published/models/{name}":{"get":{"description":"Status, progress while it trains, the whole report card (including the fields for programs) and the published table when there is one.","operationId":"adminGetStudioSystemModel","parameters":[{"description":"The model's name: 3 to 40 lower-case letters, digits and underscores, starting with a letter. Its scores are the table `model_<name>`.","in":"path","name":"name","required":true,"schema":{"description":"The model's name: 3 to 40 lower-case letters, digits and underscores, starting with a letter. Its scores are the table `model_<name>`.","example":"refi_watch","pattern":"^[a-z][a-z0-9_]{2,39}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStudioSystemModelResult"}}},"description":"The model"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"Refused, and `error` says why: `invalid_request`, or SQL that is not one read-only SELECT over the catalog, or a table that cannot be published as it is (`invalid_job`: an empty run, a column with no description, a key that is not unique, a change of shape), or an audience that cannot be set (`invalid_job`: an organization id that is not valid, more than 200 organizations, or organizations added to a table published for every organization)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Platform admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`model_not_found` (no system model of that name) or `not_published`."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`model_exists` (pass `replace: true` for a new version), `model_training_in_progress`, `model_not_ready`, `model_limit_reached`, `nothing_to_publish` (no scores yet) or `published_unavailable`."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`timeout`, `result_too_large` or `job_failed`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`busy`: retry."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`studio_unavailable` — the Studio service is not answering."}},"summary":"One system model and its whole report card (admin)","tags":["Admin: Studio"]}},"/v1/admin/studio/published/models/{name}/publish":{"post":{"description":"Make its current scores the table `mm_model_<name>` in every organization's catalog, with its report card, or replace the version that is there (atomically; the one before stays readable as `<table>__previous`). Recorded in the audit trail under the caller's identity.","operationId":"adminPublishStudioSystemModel","parameters":[{"description":"The model's name: 3 to 40 lower-case letters, digits and underscores, starting with a letter. Its scores are the table `model_<name>`.","in":"path","name":"name","required":true,"schema":{"description":"The model's name: 3 to 40 lower-case letters, digits and underscores, starting with a letter. Its scores are the table `model_<name>`.","example":"refi_watch","pattern":"^[a-z][a-z0-9_]{2,39}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStudioPublishSystemModelRequest"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStudioPublishedTableResult"}}},"description":"The published table"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"Refused, and `error` says why: `invalid_request`, or SQL that is not one read-only SELECT over the catalog, or a table that cannot be published as it is (`invalid_job`: an empty run, a column with no description, a key that is not unique, a change of shape), or an audience that cannot be set (`invalid_job`: an organization id that is not valid, more than 200 organizations, or organizations added to a table published for every organization)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Platform admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`model_not_found` (no system model of that name) or `not_published`."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`model_exists` (pass `replace: true` for a new version), `model_training_in_progress`, `model_not_ready`, `model_limit_reached`, `nothing_to_publish` (no scores yet) or `published_unavailable`."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`timeout`, `result_too_large` or `job_failed`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`busy`: retry."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`studio_unavailable` — the Studio service is not answering."}},"summary":"Publish a system model for every organization (admin)","tags":["Admin: Studio"]}},"/v1/admin/studio/published/models/{name}/retrain":{"post":{"description":"Train it again on the latest data (a fresh report card), or with `scoresOnly` only score again, with the heavy model limits. Never charged. A published model keeps its published version until it is published again.","operationId":"adminRetrainStudioSystemModel","parameters":[{"description":"The model's name: 3 to 40 lower-case letters, digits and underscores, starting with a letter. Its scores are the table `model_<name>`.","in":"path","name":"name","required":true,"schema":{"description":"The model's name: 3 to 40 lower-case letters, digits and underscores, starting with a letter. Its scores are the table `model_<name>`.","example":"refi_watch","pattern":"^[a-z][a-z0-9_]{2,39}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStudioRetrainSystemModelRequest"}}},"required":false},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStudioSystemModelResult"}}},"description":"Started"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"Refused, and `error` says why: `invalid_request`, or SQL that is not one read-only SELECT over the catalog, or a table that cannot be published as it is (`invalid_job`: an empty run, a column with no description, a key that is not unique, a change of shape), or an audience that cannot be set (`invalid_job`: an organization id that is not valid, more than 200 organizations, or organizations added to a table published for every organization)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Platform admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`model_not_found` (no system model of that name) or `not_published`."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`model_exists` (pass `replace: true` for a new version), `model_training_in_progress`, `model_not_ready`, `model_limit_reached`, `nothing_to_publish` (no scores yet) or `published_unavailable`."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`timeout`, `result_too_large` or `job_failed`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`busy`: retry."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`studio_unavailable` — the Studio service is not answering."}},"summary":"Train a system model again (admin)","tags":["Admin: Studio"]}},"/v1/admin/studio/published/models/{name}/unpublish":{"post":{"description":"Take its table (and `__previous`) out of every organization's catalog; its card is no longer readable by customers. The model, its runs and its draft scores are untouched, and it can be published again.","operationId":"adminUnpublishStudioSystemModel","parameters":[{"description":"The model's name: 3 to 40 lower-case letters, digits and underscores, starting with a letter. Its scores are the table `model_<name>`.","in":"path","name":"name","required":true,"schema":{"description":"The model's name: 3 to 40 lower-case letters, digits and underscores, starting with a letter. Its scores are the table `model_<name>`.","example":"refi_watch","pattern":"^[a-z][a-z0-9_]{2,39}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStudioUnpublishRequest"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStudioUnpublished"}}},"description":"Unpublished"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"Refused, and `error` says why: `invalid_request`, or SQL that is not one read-only SELECT over the catalog, or a table that cannot be published as it is (`invalid_job`: an empty run, a column with no description, a key that is not unique, a change of shape), or an audience that cannot be set (`invalid_job`: an organization id that is not valid, more than 200 organizations, or organizations added to a table published for every organization)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Platform admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`model_not_found` (no system model of that name) or `not_published`."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`model_exists` (pass `replace: true` for a new version), `model_training_in_progress`, `model_not_ready`, `model_limit_reached`, `nothing_to_publish` (no scores yet) or `published_unavailable`."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`timeout`, `result_too_large` or `job_failed`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`busy`: retry."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`studio_unavailable` — the Studio service is not answering."}},"summary":"Unpublish a system model (admin)","tags":["Admin: Studio"]}},"/v1/admin/studio/published/programs":{"get":{"description":"The programs defined in the repository — heavy jobs that read every state and publish several tables together — with their switches, their schedule and their latest run.","operationId":"adminListStudioPrograms","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStudioPrograms"}}},"description":"The programs"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"Refused, and `error` says why: `invalid_request`, or SQL that is not one read-only SELECT over the catalog, or a table that cannot be published as it is (`invalid_job`: an empty run, a column with no description, a key that is not unique, a change of shape), or an audience that cannot be set (`invalid_job`: an organization id that is not valid, more than 200 organizations, or organizations added to a table published for every organization)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Platform admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_not_found`, `program_not_found`, `run_not_found` or `not_published`."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_exists`, `job_running`, `program_running`, `nothing_to_publish` (no successful run yet), `published_unavailable` (published tables are switched off) or `runner_unavailable` (heavy runs cannot be started here)."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`timeout`, `result_too_large` or `job_failed`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`busy`: retry."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`studio_unavailable` — the Studio service is not answering."}},"summary":"Heavy published jobs: programs (admin)","tags":["Admin: Studio"]}},"/v1/admin/studio/published/programs/{name}":{"get":{"description":"A program with its recent runs, newest first: state, progress while running, the tables and row counts it wrote, how long each step took, and whether its tables were published.","operationId":"adminGetStudioProgram","parameters":[{"description":"The program's name, as `adminListStudioPrograms` lists it.","in":"path","name":"name","required":true,"schema":{"description":"The program's name, as `adminListStudioPrograms` lists it.","example":"company_retention","pattern":"^[a-z][a-z0-9_]{0,62}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStudioProgramDetail"}}},"description":"The program"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"Refused, and `error` says why: `invalid_request`, or SQL that is not one read-only SELECT over the catalog, or a table that cannot be published as it is (`invalid_job`: an empty run, a column with no description, a key that is not unique, a change of shape), or an audience that cannot be set (`invalid_job`: an organization id that is not valid, more than 200 organizations, or organizations added to a table published for every organization)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Platform admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_not_found`, `program_not_found`, `run_not_found` or `not_published`."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_exists`, `job_running`, `program_running`, `nothing_to_publish` (no successful run yet), `published_unavailable` (published tables are switched off) or `runner_unavailable` (heavy runs cannot be started here)."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`timeout`, `result_too_large` or `job_failed`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`busy`: retry."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`studio_unavailable` — the Studio service is not answering."}},"summary":"One program and its runs (admin)","tags":["Admin: Studio"]}},"/v1/admin/studio/published/programs/{name}/run":{"post":{"description":"Start a heavy run on its own task. It takes the program's name and its named switches — never SQL: the program's statements live in the repository and are reviewed there. Answers `202` at once; read the program for progress. One run per program at a time. Not charged.","operationId":"adminStartStudioProgram","parameters":[{"description":"The program's name, as `adminListStudioPrograms` lists it.","in":"path","name":"name","required":true,"schema":{"description":"The program's name, as `adminListStudioPrograms` lists it.","example":"company_retention","pattern":"^[a-z][a-z0-9_]{0,62}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStudioStartProgramRequest"}}},"required":false},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStudioProgramRunStarted"}}},"description":"The run started"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"Refused, and `error` says why: `invalid_request`, or SQL that is not one read-only SELECT over the catalog, or a table that cannot be published as it is (`invalid_job`: an empty run, a column with no description, a key that is not unique, a change of shape), or an audience that cannot be set (`invalid_job`: an organization id that is not valid, more than 200 organizations, or organizations added to a table published for every organization)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Platform admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_not_found`, `program_not_found`, `run_not_found` or `not_published`."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_exists`, `job_running`, `program_running`, `nothing_to_publish` (no successful run yet), `published_unavailable` (published tables are switched off) or `runner_unavailable` (heavy runs cannot be started here)."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`timeout`, `result_too_large` or `job_failed`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`busy`: retry."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`studio_unavailable` — the Studio service is not answering."}},"summary":"Start a run of a program (admin)","tags":["Admin: Studio"]}},"/v1/admin/studio/published/programs/{name}/runs/{runId}/publish":{"post":{"description":"Publish the tables of a run that succeeded — a draft run, or an earlier run to roll back to. All of the program's tables move together in one step.","operationId":"adminPublishStudioProgramRun","parameters":[{"description":"The program's name, as `adminListStudioPrograms` lists it.","in":"path","name":"name","required":true,"schema":{"description":"The program's name, as `adminListStudioPrograms` lists it.","example":"company_retention","pattern":"^[a-z][a-z0-9_]{0,62}$","type":"string"}},{"description":"The run's id.","in":"path","name":"runId","required":true,"schema":{"description":"The run's id.","pattern":"^[0-9A-Za-z-]{1,64}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStudioPublishRunRequest"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStudioPublishedRunResult"}}},"description":"The published tables"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"Refused, and `error` says why: `invalid_request`, or SQL that is not one read-only SELECT over the catalog, or a table that cannot be published as it is (`invalid_job`: an empty run, a column with no description, a key that is not unique, a change of shape), or an audience that cannot be set (`invalid_job`: an organization id that is not valid, more than 200 organizations, or organizations added to a table published for every organization)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Platform admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_not_found`, `program_not_found`, `run_not_found` or `not_published`."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_exists`, `job_running`, `program_running`, `nothing_to_publish` (no successful run yet), `published_unavailable` (published tables are switched off) or `runner_unavailable` (heavy runs cannot be started here)."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`timeout`, `result_too_large` or `job_failed`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`busy`: retry."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`studio_unavailable` — the Studio service is not answering."}},"summary":"Publish a finished run of a program (admin)","tags":["Admin: Studio"]}},"/v1/admin/studio/published/programs/{name}/schedule":{"post":{"description":"`weekly` or `monthly`: the program runs on that rhythm with these switches and publishes its tables when it succeeds. `manual`: only when started.","operationId":"adminSetStudioProgramSchedule","parameters":[{"description":"The program's name, as `adminListStudioPrograms` lists it.","in":"path","name":"name","required":true,"schema":{"description":"The program's name, as `adminListStudioPrograms` lists it.","example":"company_retention","pattern":"^[a-z][a-z0-9_]{0,62}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStudioProgramScheduleRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStudioProgramSchedule"}}},"description":"The schedule"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"Refused, and `error` says why: `invalid_request`, or SQL that is not one read-only SELECT over the catalog, or a table that cannot be published as it is (`invalid_job`: an empty run, a column with no description, a key that is not unique, a change of shape), or an audience that cannot be set (`invalid_job`: an organization id that is not valid, more than 200 organizations, or organizations added to a table published for every organization)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Platform admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_not_found`, `program_not_found`, `run_not_found` or `not_published`."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_exists`, `job_running`, `program_running`, `nothing_to_publish` (no successful run yet), `published_unavailable` (published tables are switched off) or `runner_unavailable` (heavy runs cannot be started here)."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`timeout`, `result_too_large` or `job_failed`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`busy`: retry."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`studio_unavailable` — the Studio service is not answering."}},"summary":"Set when a program runs by itself (admin)","tags":["Admin: Studio"]}},"/v1/admin/studio/published/query":{"post":{"description":"Run one read-only SELECT in the system space, where draft results are tables: how a draft is looked at before it is published. The same guard and limits as a customer's question. Not charged.","operationId":"adminRunStudioSystemQuery","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStudioSystemQueryRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"columns":{"items":{"properties":{"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type"],"type":"object"},"type":"array"},"elapsedMs":{"type":"number"},"rowCount":{"description":"Rows the question produced in total.","type":"number"},"rows":{"description":"One object per row, keyed by column name.","items":{"additionalProperties":{"nullable":true},"type":"object"},"type":"array"},"truncated":{"description":"True when `rows` holds fewer than `rowCount`.","type":"boolean"}},"required":["columns","rows","rowCount","truncated","elapsedMs"],"type":"object"}}},"description":"The answer"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"Refused, and `error` says why: `invalid_request`, or SQL that is not one read-only SELECT over the catalog, or a table that cannot be published as it is (`invalid_job`: an empty run, a column with no description, a key that is not unique, a change of shape), or an audience that cannot be set (`invalid_job`: an organization id that is not valid, more than 200 organizations, or organizations added to a table published for every organization)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Platform admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_not_found`, `program_not_found`, `run_not_found` or `not_published`."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_exists`, `job_running`, `program_running`, `nothing_to_publish` (no successful run yet), `published_unavailable` (published tables are switched off) or `runner_unavailable` (heavy runs cannot be started here)."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`timeout`, `result_too_large` or `job_failed`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`busy`: retry."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`studio_unavailable` — the Studio service is not answering."}},"summary":"Answer a question in the system space (admin)","tags":["Admin: Studio"]}},"/v1/admin/studio/published/tables/{table}/audience":{"post":{"description":"Share a published table with chosen organizations only (`{ orgs, allowCopy? }`), or with every organization again (`\"public\"`). Its rows, columns and versions are untouched. A recipient can query it, read a published model's card, and copy it (`copyFromPublished`, `basedOnPublished`) unless `allowCopy` is false; every other organization is answered as for a name that was never published. Takes effect on each Studio task's next read of the published catalog (within about 30 seconds); copies an organization already made stay theirs. Audited as `share` under your identity.","operationId":"adminSetStudioPublishedAudience","parameters":[{"description":"A published table's name.","in":"path","name":"table","required":true,"schema":{"description":"A published table's name.","example":"mm_retention","pattern":"^mm_[a-z][a-z0-9_]{1,58}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStudioSetPublishedAudienceRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStudioPublishedTableResult"}}},"description":"The table, with its new audience"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"Refused, and `error` says why: `invalid_request`, or SQL that is not one read-only SELECT over the catalog, or a table that cannot be published as it is (`invalid_job`: an empty run, a column with no description, a key that is not unique, a change of shape), or an audience that cannot be set (`invalid_job`: an organization id that is not valid, more than 200 organizations, or organizations added to a table published for every organization)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Platform admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_not_found`, `program_not_found`, `run_not_found` or `not_published`."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_exists`, `job_running`, `program_running`, `nothing_to_publish` (no successful run yet), `published_unavailable` (published tables are switched off) or `runner_unavailable` (heavy runs cannot be started here)."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`timeout`, `result_too_large` or `job_failed`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`busy`: retry."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`studio_unavailable` — the Studio service is not answering."}},"summary":"Set who sees a published table (admin)","tags":["Admin: Studio"]}},"/v1/admin/studio/published/tables/{table}/orgs":{"post":{"description":"Add organizations to, or remove them from, a table shared with chosen organizations. A table published for every organization has no list: set its audience first (`adminSetStudioPublishedAudience`). Removing the last organization leaves it shared with nobody, never public. A removed organization stops seeing it on each Studio task's next read of the published catalog (within about 30 seconds); copies it already made stay its own. Audited as `share` under your identity.","operationId":"adminChangeStudioPublishedOrgs","parameters":[{"description":"A published table's name.","in":"path","name":"table","required":true,"schema":{"description":"A published table's name.","example":"mm_retention","pattern":"^mm_[a-z][a-z0-9_]{1,58}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStudioChangePublishedOrgsRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStudioPublishedTableResult"}}},"description":"The table, with its new audience"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"Refused, and `error` says why: `invalid_request`, or SQL that is not one read-only SELECT over the catalog, or a table that cannot be published as it is (`invalid_job`: an empty run, a column with no description, a key that is not unique, a change of shape), or an audience that cannot be set (`invalid_job`: an organization id that is not valid, more than 200 organizations, or organizations added to a table published for every organization)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Platform admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_not_found`, `program_not_found`, `run_not_found` or `not_published`."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_exists`, `job_running`, `program_running`, `nothing_to_publish` (no successful run yet), `published_unavailable` (published tables are switched off) or `runner_unavailable` (heavy runs cannot be started here)."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`timeout`, `result_too_large` or `job_failed`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`busy`: retry."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`studio_unavailable` — the Studio service is not answering."}},"summary":"Add or remove organizations of a shared table (admin)","tags":["Admin: Studio"]}},"/v1/admin/studio/published/tables/{table}/unpublish":{"post":{"description":"Take a published table (and its `__previous`) out of every organization's catalog. Customers' saved questions and jobs that read it stop working. What produced it — the job, the program's runs — is untouched, and it can be published again.","operationId":"adminUnpublishStudioTable","parameters":[{"description":"A published table's name.","in":"path","name":"table","required":true,"schema":{"description":"A published table's name.","example":"mm_retention","pattern":"^mm_[a-z][a-z0-9_]{1,58}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStudioUnpublishRequest"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStudioUnpublished"}}},"description":"Unpublished"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"Refused, and `error` says why: `invalid_request`, or SQL that is not one read-only SELECT over the catalog, or a table that cannot be published as it is (`invalid_job`: an empty run, a column with no description, a key that is not unique, a change of shape), or an audience that cannot be set (`invalid_job`: an organization id that is not valid, more than 200 organizations, or organizations added to a table published for every organization)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Platform admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_not_found`, `program_not_found`, `run_not_found` or `not_published`."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_exists`, `job_running`, `program_running`, `nothing_to_publish` (no successful run yet), `published_unavailable` (published tables are switched off) or `runner_unavailable` (heavy runs cannot be started here)."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`timeout`, `result_too_large` or `job_failed`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`busy`: retry."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`studio_unavailable` — the Studio service is not answering."}},"summary":"Unpublish a table (admin)","tags":["Admin: Studio"]}},"/v1/admin/studio/questions":{"get":{"description":"The latest questions asked of Studio, newest first: who asked, how it ended, how long it took, how many rows it returned, which states it named and whether those were read from local disk. The service keeps the latest 100 per workspace; older history is in the request telemetry. The question's SQL is never kept or returned.","operationId":"adminListStudioQuestions","parameters":[{"description":"Only this workspace.","in":"query","name":"organizationId","required":false,"schema":{"description":"Only this workspace.","pattern":"^[A-Za-z0-9_-]{1,64}$","type":"string"}},{"description":"`refused`: anything that was not answered or carried on in the background (a timeout, invalid SQL, no free slot).","in":"query","name":"outcome","required":false,"schema":{"description":"`refused`: anything that was not answered or carried on in the background (a timeout, invalid SQL, no free slot).","enum":["answered","background","refused"],"type":"string"}},{"description":"`pagination.nextCursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"description":"`pagination.nextCursor` of the previous page.","type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"default":50,"maximum":200,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStudioQuestionList"}}},"description":"One page of questions."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Platform admin role required"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStudioError"}}},"description":"The Studio service is not available"}},"summary":"The latest Studio questions (admin)","tags":["Admin"]}},"/v1/admin/studio/uploads":{"get":{"description":"Every uploaded file as a row: its name, size, row count, who uploaded it and when, and how many warnings it raised. Never its columns or its contents.","operationId":"adminListStudioUploads","parameters":[{"description":"Only this workspace.","in":"query","name":"organizationId","required":false,"schema":{"description":"Only this workspace.","pattern":"^[A-Za-z0-9_-]{1,64}$","type":"string"}},{"description":"Name contains (case-insensitive).","in":"query","name":"q","required":false,"schema":{"description":"Name contains (case-insensitive).","maxLength":100,"minLength":1,"type":"string"}},{"in":"query","name":"status","required":false,"schema":{"enum":["pending","ingesting","ready","failed"],"type":"string"}},{"in":"query","name":"sort","required":false,"schema":{"default":"uploadedAt","enum":["uploadedAt","name","rowCount","bytes"],"type":"string"}},{"description":"`pagination.nextCursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"description":"`pagination.nextCursor` of the previous page.","type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"default":50,"maximum":200,"minimum":1,"type":"integer"}},{"in":"query","name":"order","required":false,"schema":{"default":"desc","enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStudioUploadList"}}},"description":"One page of uploads."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Platform admin role required"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStudioError"}}},"description":"The Studio service is not available"}},"summary":"Studio uploads across every workspace (admin)","tags":["Admin"]}},"/v1/admin/transaction-flags":{"get":{"description":"Newest first. Default `status=open`: flags waiting for review.","operationId":"adminListTransactionFlags","parameters":[{"description":"`open` (default), `resolved`, `dismissed`, or `all`.","in":"query","name":"status","required":false,"schema":{"default":"open","description":"`open` (default), `resolved`, `dismissed`, or `all`.","enum":["open","resolved","dismissed","all"],"type":"string"}},{"in":"query","name":"mmPropertyId","required":false,"schema":{"maxLength":256,"minLength":1,"type":"string"}},{"in":"query","name":"submitterUserId","required":false,"schema":{"maxLength":256,"minLength":1,"type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"default":50,"maximum":100,"minimum":1,"type":"integer"}},{"description":"`nextCursor` of the previous page (newest first).","in":"query","name":"cursor","required":false,"schema":{"description":"`nextCursor` of the previous page (newest first).","maxLength":512,"minLength":1,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminTransactionFlagList"}}},"description":"One page of flags"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid query or cursor"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"}},"summary":"List flagged transactions (admin)","tags":["Admin: Transaction Flags"]}},"/v1/admin/transaction-flags/{id}":{"get":{"operationId":"adminGetTransactionFlag","parameters":[{"in":"path","name":"id","required":true,"schema":{"maxLength":256,"minLength":1,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminTransactionFlag"}}},"description":"Flag"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid id"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unknown flag"}},"summary":"One flagged transaction (admin)","tags":["Admin: Transaction Flags"]}},"/v1/admin/transaction-flags/{id}/resolve":{"post":{"description":"Closes the flag as `resolved` (the data was fixed or is being fixed) or `dismissed` (nothing to change). A closed flag may be moved between the two; the note and resolver are replaced each time.","operationId":"adminResolveTransactionFlag","parameters":[{"in":"path","name":"id","required":true,"schema":{"maxLength":256,"minLength":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminTransactionFlagResolveRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminTransactionFlag"}}},"description":"The flag after the change"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"System admin role required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unknown flag"}},"summary":"Resolve or dismiss a flagged transaction (admin)","tags":["Admin: Transaction Flags"]}},"/v1/agents":{"post":{"description":"Search and list individual real-estate agents with filters — one row per agent. Filter by name, location (state, city, zip), brokerage/office, and production metrics (sales volume, transaction units, price range), with sorting and cursor pagination. LOCATION SEMANTICS: the state/city/zip filters match ANY of an agent's location signals — their listed city/state, their office address(es), AND the markets where they actually closed transactions (production) — combined with OR. So an agent matches a searched location if their office OR their production is there (set `locationSource` to `office` or `production` to use one signal). A search for city \"Long Beach\" can therefore return agents whose office or displayed primary market is in a different city/state, because they transacted in Long Beach. The `state`/`city` returned on each row reflect the agent's primary market and may differ from the searched location. (Use the `office` filter to match by brokerage/office name — one or several names, each a case-insensitive whole-word phrase, `name*` for a prefix; `currentOffice` restricts to the agent's current office — and the per-agent city/county/state breakdown endpoints to rank an agent's volume within a specific market.) RANKING BY DEAL SIDE: combine a location filter with `sort` on `buyerVolume`/`buyerUnits` (or `sellerVolume`/`sellerUnits`, `dualVolume`/`dualUnits`) to rank agents by how active they are representing buyers vs. sellers in that market — e.g. sort `buyerVolume` descending for the most active buyer-side agents in a state or city. This is the per-agent record search: use it to find specific real-estate agents or build a filtered agent list. (For a single agent by ID use the agent detail endpoint.) If you only need how many agents match and not the records themselves, send the same request body to `countAgents`.","operationId":"listAgents","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentListRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentListResponse"}}},"description":"Paginated list of agents"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error. Includes unresolvable location filters: a `city`/`county`/`state`/`zip` value that does not match a recognized location returns 400 rather than an empty result set. Resolve the name with `instantSearch` (use an id from its `results.locations[]`) or `suggestLocations` (use the `id` of a `source: \"dictionary\"` result), then pass that id back as the filter value."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Location dictionary temporarily unavailable. Only returned for a NEGATED location filter (`neq`, or `not`), which cannot be honoured without resolving the excluded value — answering anyway would return the records you asked to exclude. Positive location filters are unaffected. Retry shortly; the filter value itself was not rejected. Also returned, as `SearchUnavailable` (`error`: `search_timeout` / `search_overloaded`, `retryable: true`, `Retry-After`), when the search ran out of time or the cluster shed it."}},"summary":"Search agents with filters","tags":["Agents"]}},"/v1/agents/analytics/chart":{"post":{"operationId":"agentAnalyticsChart","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentChartRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChartResponse"}}},"description":"Chart data"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Configurable chart (measure × slice) over the agent's sales","tags":["Agents"]}},"/v1/agents/analytics/summary":{"post":{"operationId":"agentAnalyticsSummary","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSummaryRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SidedSummaryResponse"}}},"description":"Sided summary with previous-period comparison"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Production summary with buyer/seller/dual split + previous period","tags":["Agents"]}},"/v1/agents/analytics/time-series":{"post":{"operationId":"agentAnalyticsTimeSeries","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTimeSeriesRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SidedTimeSeriesResponse"}}},"description":"Time-series with side splits + previous period"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Agent volume/units over time with buyer/seller/dual split","tags":["Agents"]}},"/v1/agents/bulk-delivery":{"post":{"description":"Queues an ECS task that dumps every matching agents document to S3 in the requested format. Returns 202 with a jobId; poll `GET /v1/agents/bulk-delivery/{jobId}` for status + the signed download URL.\n\n**Row limit.** Deliveries of up to 5,000 rows need no entitlement. Above that, the org's `bulk-delivery.agents` entitlement is required and its scope (row ceiling, row filters, allowed fields) governs the delivery; without it the request is rejected with 403 `entitlement_missing`. Pass `limit` at or below the ceiling to deliver a capped subset of a broader query. Email support@modelmatch.com to request a limit increase.\n\nDelivery is billed at 1 credit per row regardless of entitlement (deliveries submitted from the ModelMatch web app are not billed).\n\n**Push-target destination.** Pass `destination: { type: \"push-target\", targetId }` to have the finished rows sent to a configured push target instead of downloaded. The target is checked before anything is queued; a refusal returns the push target's status and `code` (`TARGET_NOT_FOUND` 404, `FORBIDDEN` 403, `PLAN_REQUIRED` 402, `TARGET_DISABLED` 409, `ENTITY_MISMATCH` 400). Limits and billing are the same as a file delivery.","operationId":"submitAgentsBulkDelivery","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AgentListRequest"},{"additionalProperties":false,"properties":{"columns":{"description":"A FORMATTED file: its columns, in order, with header labels and number formats — for `format` `csv` or `xlsx` only, and not combined with `fields` or a push-target `destination` (400 `columns_format_unsupported` / `columns_with_fields` / `columns_with_destination`). Every field a column reads is gated by the entitlement exactly as if it were listed in `fields`: a withheld field drops out of a column's fallback list, and a column with nothing left is omitted. An unknown field is a 400 `unknown_column_field`. No `id` column is added. A formatted `csv` starts with a UTF-8 byte-order mark and uses CRLF line endings, so Excel opens it with accented names intact. Columns may read any DTO field and any opt-in column `fields` documents, including the computed `governmentPct`, `branchCount`, `managerName` / `managerNmlsId` and `licensedSince`.","items":{"$ref":"#/components/schemas/BulkDeliveryColumn"},"maxItems":200,"minItems":1,"type":"array"},"destination":{"$ref":"#/components/schemas/BulkDeliveryDestination"},"fields":{"description":"Optional output column projection, named by the response DTO fields (the same camelCase fields the list endpoint returns, e.g. `city`, `interestRate`). Intersected with the entitlement scope's allowedFields and the entity's full column set. If empty after intersection, falls back to all columns. It also SELECTS the opt-in columns, which are not part of the list DTO and are never delivered unless named here: `communityLending` (properties, originators, companies, branches) — the Community Lending neighborhood profile, identical to the block on the entity's detail endpoint; `parties` (properties) — the mortgage parties attributed to the parcel, by attribution scope; `marketCount` / `countyCount` / `stateCount` / `zipCount` / `lenderCount` (originators) — the market-breadth rollups you can already filter on; and the computed `governmentPct` (originators: FHA + VA percent of loans, 0–100), `branchCount` (companies: NMLS branch count) and `managerName` / `managerNmlsId` (branches: the first branch manager) and `licensedSince` (branches: first-licensed date, the earliest license `issueDate`, YYYY-MM-DD). Agents also offer `email2` / `phone2` (the best-ranked email / phone distinct from `email` / `phone`, admitted by the `email` / `phone` entitlement field), `bestEmail` / `bestEmail2` and `bestPhone` / `bestPhone2` (the best and runner-up contact over every email / phone on the record, `email` / `phone` included — the pair the ModelMatch web app's agent export shows; same entitlement fields), `officePhone` (admitted by `phone`), `activeListings` (current active listings; null when unknown), and the profile-link columns `facebook`, `instagram`, `linkedin`, `twitter`, `youtube`, `tiktok`, `zillow`, `otherLinks` (a `; `-joined list of profile URLs on no known platform) — all admitted by the `links` entitlement field. Loans offer the list row's transaction-export fields (`employerName`, `employerNmlsId`, `brokerName`, `titleCompanyName`, `soldAgentName`, `listAgentName`, `coListAgentName`, `buyer1FirstMiddle` … `seller2Last`). In `csv` and `parquet` the two block columns are JSON-encoded cells; in `json` and `ndjson` they are nested objects. Windowed production (originators, agents, companies, branches): name `<field>_<n>mo` for n in 3, 6, 12, 14, 18, 24 to get a production field for that trailing window regardless of `period` — e.g. `volume_3mo`, `units_6mo`, `purchaseVolume_24mo`. Available for originators `volume`, `units`, `avgLoanAmount`, `purchaseVolume`, `purchaseUnits`, `refinanceVolume`, `refinanceUnits`, `conventionalPct`, `fhaPct`, `vaPct`; agents `volume`, `units`, `avgSoldPrice`, `buyerVolume`, `buyerUnits`, `sellerVolume`, `sellerUnits`, `totalOriginatorsWorkedWith`, `totalCompaniesWorkedWith`, `totalLendersWorkedWith`; companies `volume`, `units`, `avgLoanAmount`, `loCount`; branches `volume`, `units`, `avgLoanAmount`, `purchasePct`, `refinancePct`, `loCount`. Numbers (null when the window has no data); an entitlement that allows a field allows every window of it.","items":{"minLength":1,"type":"string"},"type":"array"},"format":{"$ref":"#/components/schemas/BulkDeliveryFormat"},"limit":{"description":"Optional hard cap on the number of rows delivered — and therefore billed (1 credit / row). The job delivers the first `limit` rows in sort order (default newest-first) and bills only for those. If the query matches fewer than `limit`, all matches are delivered. Distinct from the page-size `size` field, which is ignored on this endpoint. The row ceiling still applies — 5,000 without the entity's bulk-delivery entitlement, or the entitlement's `maxRows` with it. A `limit` above the ceiling is rejected, but a `limit` at or below it lets you export a capped top-N even when the full match exceeds the ceiling — which is the intended way to run a broad query under the 5,000-row allowance.","example":5000,"exclusiveMinimum":true,"minimum":0,"type":"integer"}},"type":"object"}]}}}},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeliverySubmitResponse"}}},"description":"Job queued; ECS task launched"},"400":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/BulkDeliveryPreflightExceeded"},{"$ref":"#/components/schemas/BulkDeliveryPushTargetError"},{"$ref":"#/components/schemas/BulkDeliveryColumnsError"}]}}},"description":"Validation failure (incl. `format_required`: a file delivery needs `format`; a refused `columns` request), delivery would exceed the entitlement's maxRows, OR the push target does not accept this entity (`ENTITY_MISMATCH`)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"402":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/BulkDeliveryInsufficientCredits"},{"$ref":"#/components/schemas/BulkDeliveryPushTargetError"}]}}},"description":"Insufficient credits (balance < estimatedTotal, at 1 credit per row), OR the plan does not include push targets (`PLAN_REQUIRED`)"},"403":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/BulkDeliveryForbidden"},{"$ref":"#/components/schemas/BulkDeliveryPushTargetError"},{"$ref":"#/components/schemas/BulkDeliveryInsufficientScope"}]}}},"description":"Delivery exceeds the 5,000-row limit available without the `bulk-delivery.agents` entitlement (lower `limit`, narrow the filters, or contact support for a limit increase), OR you may not use the push target (`FORBIDDEN`), OR a scoped token named a push-target destination without `push-targets:send` (`insufficient_scope`)."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeliveryPushTargetError"}}},"description":"Push target not found (`TARGET_NOT_FOUND`)"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeliveryPushTargetError"}}},"description":"Push target is disabled (`TARGET_DISABLED`)"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Preflight / S3 / DDB / ECS launch failure, the push-target check could not reach the auth server, or the credit balance could not be read (`billing_unavailable` — retry; a paid delivery is never queued unverified)"}},"summary":"Submit a bulk-delivery job for agents","tags":["Agents"]}},"/v1/agents/bulk-delivery/{jobId}":{"delete":{"description":"Cancels a queued or running agents delivery job.\n\nThe job is marked `cancelled` immediately; the container running it notices on its next page boundary and stops. Because a delivery is billed once, at the end, **a cancelled job is never charged** — no credits are debited and there is nothing to refund. No partial file is written.\n\nIdempotent-ish: cancelling a job that has already finished (or was already cancelled) returns 409 and changes nothing. Poll `GET /v1/agents/bulk-delivery/{jobId}` for the settled state.","operationId":"cancelAgentsBulkDeliveryJob","parameters":[{"description":"Job ID returned by `POST /v1/agents/bulk-delivery`","in":"path","name":"jobId","required":true,"schema":{"description":"Job ID returned by `POST /v1/agents/bulk-delivery`","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeliveryStatusResponse"}}},"description":"Job cancelled; body is its settled status"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Caller does not own this job"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Job not found (or expired past 30d TTL)"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Job already finished — nothing to cancel"}},"summary":"Cancel a bulk-delivery job for agents","tags":["Agents"]},"get":{"operationId":"getAgentsBulkDeliveryJob","parameters":[{"description":"Job ID returned by `POST /v1/agents/bulk-delivery`","in":"path","name":"jobId","required":true,"schema":{"description":"Job ID returned by `POST /v1/agents/bulk-delivery`","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeliveryStatusResponse"}}},"description":"Job status (resultsUrl re-signed if completed)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Caller does not own this job"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Job not found (or expired past 30d TTL)"}},"summary":"Get bulk-delivery job status for agents","tags":["Agents"]}},"/v1/agents/contact-submissions":{"post":{"description":"Send contact details you know for a real estate agent — a phone number, an email address, a profile link, or the company they moved to. The submission is checked and reviewed before anything appears on the profile; this call only records it and answers immediately. Sending the same details for the same person again while the first submission is still being reviewed returns the first submission's `id`.","operationId":"createAgentContactSubmission","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgentContactSubmissionBody"}}}},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactSubmissionAccepted"}}},"description":"Recorded. Review happens afterwards."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The request body is too large."},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The body must be sent as `application/json`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Too many submissions in the last 24 hours. Try again later."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Submit contact details for a real estate agent","tags":["Agents"]}},"/v1/agents/count":{"post":{"description":"Return the exact number of agents matching the given filters. Accepts the same request body as `listAgents` (pagination and sort are ignored). Use this when you only need a total; to get the matching agents themselves, send the same request body to `listAgents`.","operationId":"countAgents","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentListRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountResponse"}}},"description":"Exact count of matching agents"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Location dictionary temporarily unavailable. Only returned for a NEGATED location filter (`neq`, or `not`), which cannot be honoured without resolving the excluded value — answering anyway would return the records you asked to exclude. Positive location filters are unaffected. Retry shortly; the filter value itself was not rejected. Also returned, as `SearchUnavailable` (`error`: `search_timeout` / `search_overloaded`, `retryable: true`, `Retry-After`), when the search ran out of time or the cluster shed it."}},"summary":"Count agents matching filters","tags":["Agents"],"x-mm-records-via":"listAgents"}},"/v1/agents/office-groups":{"get":{"description":"The brokerage brand groups this workspace may pass as `officeGroups` / `excludeOfficeGroups` on `listAgents`. Entitlement-gated: a workspace without the entitlement gets an empty list.","operationId":"listAgentOfficeGroups","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AgentOfficeGroup"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Office groups the workspace is entitled to"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Entitlements could not be resolved"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"List agent office groups","tags":["Agents"],"x-mm-entitlement":"rocket-filter"}},"/v1/agents/{id}":{"get":{"operationId":"getAgent","parameters":[{"description":"Agent document ID","in":"path","name":"id","required":true,"schema":{"description":"Agent document ID","type":"string"}},{"description":"Period for volume/units (default: last12Months)","in":"query","name":"period","required":false,"schema":{"allOf":[{"$ref":"#/components/schemas/Period"},{"description":"Period for volume/units (default: last12Months)"}]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentDetailResponse"}}},"description":"Agent detail"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Agent not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large"}},"summary":"Get agent by ID","tags":["Agents"]}},"/v1/agents/{id}/analytics/loan-mix":{"post":{"description":"Scoped to the agent's FINANCED deals: recorded loans on which the agent is the buyer's agent or the listing / co-listing agent, matched through the agent's MLS ids. Cash deals carry no loan and are not counted. The date window is the loan's recording date. Returns, for each side at once (`any`, `buyer`, `listing` — duals on `buyer`): the financed deal count and loan volume, how many were brokered (third-party origination), and the loan-type mix. For the prior period, call again with that period.","operationId":"agentLoanMix","parameters":[{"description":"Agent document ID","in":"path","name":"id","required":true,"schema":{"description":"Agent document ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentLoanMixRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentLoanMixResponse"}}},"description":"Per-side financing profile"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Financing profile of the agent's deals, per side","tags":["Agents"]}},"/v1/agents/{id}/analytics/mortgaged-time-series":{"post":{"description":"Scoped to the agent's FINANCED deals: recorded loans on which the agent is the buyer's agent or the listing / co-listing agent, matched through the agent's MLS ids. Cash deals carry no loan and are not counted. The date window is the loan's recording date. One bucket per `interval` (default monthly): `units` = financed deals recorded in the bucket, `volume` = their total loan amount (out-of-range fill amounts excluded and counted in `excluded`). `previous` is the same series for the prior window. `side` defaults to `any`; `buyer` + `listing` = `any` per bucket. Pair with `agentAnalyticsTimeSeries` (closed sales by sale date) for a mortgaged-vs-total chart — the two use different date axes (loan recording vs sale close), so a deal can land a month apart.","operationId":"agentMortgagedTimeSeries","parameters":[{"description":"Agent document ID","in":"path","name":"id","required":true,"schema":{"description":"Agent document ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentMortgagedTimeSeriesRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentMortgagedTimeSeriesResponse"}}},"description":"Financed deals and loan volume per bucket"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"The agent's financed deals and loan volume, over time","tags":["Agents"]}},"/v1/agents/{id}/breakdowns/builders":{"post":{"description":"New-construction builders named on the agent's deals in the period, ranked by units. Spellings of one builder are one row (case, punctuation, legal suffixes such as LLC, a trailing \"of <State>\", generic words such as Homes, letter typos) with `units` summed; `label` / `id` are those of its most common spelling, and distinct companies (a builder's subsidiaries) stay separate. Feed placeholders (\"Unknown\", \"Unk\", \"N/A\", \"-\", \"TBD\", \"None\", \"Other\", …) are not builders and are dropped. The pre-aggregated builder list carries a deal COUNT only, so every row's `volume` and `pctVolume` are 0 — rank and share by `units` / `pctUnits` (a share of ALL the agent's deals in the period, so the rows sum to the builder-sold share, not to 1). It carries no buyer/listing split either: `side` must be `any` (or omitted); `buyer`/`listing` return 400.","operationId":"agentBuilders","parameters":[{"description":"Agent document ID","in":"path","name":"id","required":true,"schema":{"description":"Agent document ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentScoredBreakdownRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSidedBreakdownResponse"}}},"description":"Pre-aggregated builders breakdown from the agent's scored doc"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Home builders on the agent's deals (pre-aggregated)","tags":["Agents"]}},"/v1/agents/{id}/breakdowns/cities":{"post":{"description":"Ranks the agent's CLOSED sales (MLS status sold, a real sale price — rentals and lease listings excluded, duplicate MLS records of one sale counted once) by this dimension. The same population `POST /v1/agents/{id}/sales` returns with `flatFilters.mlsStatus: \"SLD\"` and the agent analytics routes count. `side` narrows to the deals the agent was on that side of (`buyer` includes deals on both sides; `buyer` + `listing` = `any`).","operationId":"agentCities","parameters":[{"description":"Agent document ID","in":"path","name":"id","required":true,"schema":{"description":"Agent document ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSalesBreakdownRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSidedBreakdownResponse"}}},"description":"Breakdown of the agent's sales by cities"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"City volume breakdown across the agent's sales","tags":["Agents"]}},"/v1/agents/{id}/breakdowns/companies":{"post":{"operationId":"agentCompanies","parameters":[{"description":"Agent document ID","in":"path","name":"id","required":true,"schema":{"description":"Agent document ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentScoredBreakdownRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSidedBreakdownResponse"}}},"description":"Pre-aggregated companies breakdown from the agent's scored doc"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Mortgage companies the agent dealt with (pre-aggregated)","tags":["Agents"]}},"/v1/agents/{id}/breakdowns/counties":{"post":{"description":"Ranks the agent's CLOSED sales (MLS status sold, a real sale price — rentals and lease listings excluded, duplicate MLS records of one sale counted once) by this dimension. The same population `POST /v1/agents/{id}/sales` returns with `flatFilters.mlsStatus: \"SLD\"` and the agent analytics routes count. `side` narrows to the deals the agent was on that side of (`buyer` includes deals on both sides; `buyer` + `listing` = `any`).","operationId":"agentCounties","parameters":[{"description":"Agent document ID","in":"path","name":"id","required":true,"schema":{"description":"Agent document ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSalesBreakdownRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSidedBreakdownResponse"}}},"description":"Breakdown of the agent's sales by counties"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"County (FIPS) volume breakdown","tags":["Agents"]}},"/v1/agents/{id}/breakdowns/lenders":{"post":{"description":"Lenders that financed the agent's deals in the period. Each row's `id` is the lender id — pass it back as the `lender` filter on the loans routes to drill into that lender's loans — and `label` its display name. The row for deals with no lender attributed carries no `id`.","operationId":"agentLenders","parameters":[{"description":"Agent document ID","in":"path","name":"id","required":true,"schema":{"description":"Agent document ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentScoredBreakdownRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSidedBreakdownResponse"}}},"description":"Pre-aggregated lenders breakdown from the agent's scored doc"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Lenders on the agent's deals (pre-aggregated)","tags":["Agents"]}},"/v1/agents/{id}/breakdowns/offices":{"post":{"description":"Ranks the agent's CLOSED sales (MLS status sold, a real sale price — rentals and lease listings excluded, duplicate MLS records of one sale counted once) by this dimension. The same population `POST /v1/agents/{id}/sales` returns with `flatFilters.mlsStatus: \"SLD\"` and the agent analytics routes count. `side` narrows to the deals the agent was on that side of (`buyer` includes deals on both sides; `buyer` + `listing` = `any`). Each sale is credited to the office recorded for the agent's OWN side of it (the listing office when the agent listed it, including dual deals; the buyer's office when the agent only represented the buyer), so every sale counts at most once. A sale with no office recorded on the agent's side lands in no row, so rows can sum to less than `totals`. Office names are as recorded and not normalized: one brokerage can appear under several spellings.","operationId":"agentOffices","parameters":[{"description":"Agent document ID","in":"path","name":"id","required":true,"schema":{"description":"Agent document ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSalesBreakdownRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSidedBreakdownResponse"}}},"description":"Breakdown of the agent's sales by offices"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Offices the agent closed deals through (their side of each sale)","tags":["Agents"]}},"/v1/agents/{id}/breakdowns/originators":{"post":{"operationId":"agentOriginators","parameters":[{"description":"Agent document ID","in":"path","name":"id","required":true,"schema":{"description":"Agent document ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentScoredBreakdownRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSidedBreakdownResponse"}}},"description":"Pre-aggregated originators breakdown from the agent's scored doc"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Loan officers the agent worked with (pre-aggregated)","tags":["Agents"]}},"/v1/agents/{id}/breakdowns/states":{"post":{"description":"Ranks the agent's CLOSED sales (MLS status sold, a real sale price — rentals and lease listings excluded, duplicate MLS records of one sale counted once) by this dimension. The same population `POST /v1/agents/{id}/sales` returns with `flatFilters.mlsStatus: \"SLD\"` and the agent analytics routes count. `side` narrows to the deals the agent was on that side of (`buyer` includes deals on both sides; `buyer` + `listing` = `any`).","operationId":"agentStates","parameters":[{"description":"Agent document ID","in":"path","name":"id","required":true,"schema":{"description":"Agent document ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSalesBreakdownRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSidedBreakdownResponse"}}},"description":"Breakdown of the agent's sales by states"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"State volume breakdown","tags":["Agents"]}},"/v1/agents/{id}/breakdowns/title-companies":{"post":{"description":"Scoped to the agent's FINANCED deals: recorded loans on which the agent is the buyer's agent or the listing / co-listing agent, matched through the agent's MLS ids. Cash deals carry no loan and are not counted. The date window is the loan's recording date. Ranks the title companies named on those loans. Spellings of one company are MERGED: `label` is its most-used spelling, `id` the normalized name every spelling was grouped under. \"None available\"-style placeholders and names shorter than 3 characters are excluded. `pctUnits` / `pctVolume` are shares of ALL the side's financed deals in the window, including those with no title company, so they do not sum to 1. `side` defaults to `any`; title company is usually picked on the buyer side, so `buyer` is the view that reads as \"who this agent's buyers close with\".","operationId":"agentTitleCompanies","parameters":[{"description":"Agent document ID","in":"path","name":"id","required":true,"schema":{"description":"Agent document ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentLoansBreakdownRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownResponse"}}},"description":"Breakdown of the agent's financed deals by title company"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Title companies on the agent's financed deals (spellings merged)","tags":["Agents"]}},"/v1/agents/{id}/breakdowns/title-companies/time-series":{"post":{"description":"Scoped to the agent's FINANCED deals: recorded loans on which the agent is the buyer's agent or the listing / co-listing agent, matched through the agent's MLS ids. Cash deals carry no loan and are not counted. The date window is the loan's recording date. One bucket per `interval` (default monthly), each segmented by title company with spellings merged per bucket: `segments[].label` is the company's most-used spelling across the whole response and `segments[].id` the normalized name — match a company across buckets on `id`. `previous` is the same series for the prior window. `side` defaults to `any`.","operationId":"agentTitleCompaniesTimeSeries","parameters":[{"description":"Agent document ID","in":"path","name":"id","required":true,"schema":{"description":"Agent document ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTitleCompanyTimeSeriesRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTimeSeriesResponse"}}},"description":"Title-company-segmented time series"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Title companies on the agent's financed deals, over time","tags":["Agents"]}},"/v1/agents/{id}/breakdowns/zip-codes":{"post":{"description":"Ranks the agent's CLOSED sales (MLS status sold, a real sale price — rentals and lease listings excluded, duplicate MLS records of one sale counted once) by this dimension. The same population `POST /v1/agents/{id}/sales` returns with `flatFilters.mlsStatus: \"SLD\"` and the agent analytics routes count. `side` narrows to the deals the agent was on that side of (`buyer` includes deals on both sides; `buyer` + `listing` = `any`).","operationId":"agentZipCodes","parameters":[{"description":"Agent document ID","in":"path","name":"id","required":true,"schema":{"description":"Agent document ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSalesBreakdownRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSidedBreakdownResponse"}}},"description":"Breakdown of the agent's sales by zip-codes"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Zip-code volume breakdown","tags":["Agents"]}},"/v1/agents/{id}/markets":{"post":{"description":"Rank the ZIP markets one real-estate agent works, with volume, transaction counts and mean sale price per market, plus a weighted summary across the whole footprint. Optionally narrow to a ZIP list or a date window. REACH, NOT MARKET SHARE: an agent belongs to every market they touch — where their office is AND everywhere they have transacted — so one agent is counted in several markets at once. Per-market agent counts therefore over-sum: they cannot be added together, and dividing one into a total does not produce a market share. The only percentage returned, `shareOfScope`, is each market's share of this agent's volume across the scope requested and sums to 100 over that scope; there is no share-of-whole-book figure, because the transaction records carry no per-agent total to divide by. TWO COUNTS, ON PURPOSE: `transactions` counts transaction records; `units` counts the ones carrying a price, which are the records behind `volume` and `avgSalePrice`. Roughly half of an agent's records are priced, so dividing volume by `transactions` understates the average by about 2×. Figures are computed live from the agent's transaction records — an agent record carries no stored market rollup — and are ranked across their busiest ZIP markets. When a ZIP scope returns no markets, `reach.presentInScope` distinguishes 'works there, nothing closed in the window' from 'not present at all'. The summary also carries a Community Lending mix: what kind of neighborhood these markets are, weighted by the agent's activity in each. These are U.S. Census tract-level aggregates describing whole neighborhoods — never an individual, household or client attribute — and on this surface the basis is always the markets in scope, since an agent record carries no stored neighborhood rollup.","operationId":"agentMarkets","parameters":[{"description":"Agent ID","in":"path","name":"id","required":true,"schema":{"description":"Agent ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentMarketsRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentMarketsResponse"}}},"description":"The agent's blended market footprint"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"The ZIP markets this agent works, blended","tags":["Agents"]}},"/v1/agents/{id}/properties":{"post":{"operationId":"agentProperties","parameters":[{"description":"Agent document ID","in":"path","name":"id","required":true,"schema":{"description":"Agent document ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRelationRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentPropertiesResponse"}}},"description":"Paginated list of properties for this agent"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Properties this agent has transacted on","tags":["Agents"]}},"/v1/agents/{id}/related":{"get":{"description":"Return the ids of records of another type that are linked to this record. Links resolve by identifier, strongest identifier first, and equally-trusted identifiers are combined — a company's linked loans cover every role it holds on a loan, not just the first one found. The response reports which strength was used: `primary` is the canonical identifier for that pair, `secondary` is a real but weaker alternate used only when the record carries nothing better. This is a lightweight index: it returns ids and a count, not full records. For filtering, sorting, pagination and full detail, use the named endpoint for the pair (for example the originator loans endpoint) and fetch records by id.","operationId":"agentRelated","parameters":[{"description":"Agent id","in":"path","name":"id","required":true,"schema":{"description":"Agent id","type":"string"}},{"description":"Type of record to link to","in":"query","name":"to","required":true,"schema":{"description":"Type of record to link to","enum":["loans","sales"],"type":"string"}},{"description":"Maximum ids to return (default 25, max 200)","in":"query","name":"limit","required":false,"schema":{"description":"Maximum ids to return (default 25, max 200)","maximum":200,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelatedResponse"}}},"description":"Linked record ids"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Record not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Records linked to this one","tags":["Related"]}},"/v1/agents/{id}/sales":{"post":{"description":"The agent's deals, newest first: every sale on which the agent is the buyer's agent or the listing / co-listing agent. `side` narrows to one half (`buyer` includes deals where the agent was on both sides; `listing` excludes them). Each row says which `side` the agent was on and carries the sale's recorded purchase `loan` — lender, loan officer, loan type, amount, title company — or `null` for a cash deal or a loan not yet on file. Pass `flatFilters.mlsStatus: \"SLD\"` for closed deals only. `dealFilters` adds an address `search`, the co-listing agent, builder / status-date filters and loan-side filters (`financed`, `loan.*` on the purchase loan). Sorts: the `/v1/sales` names plus `listDate`, `builder`, `coListAgent`, and the loan / party columns `loanAmount`, `loanType`, `loanTransactionType`, `interestRate`, `lenderName`, `originatorName`, `companyName`, `brokerName`, `titleCompany`, `buyerName`, `sellerName`, `downPayment` (one at a time; blanks last). `listingAgent` / `soldAgent` / `coListAgent` order by the name the row shows.","operationId":"agentSales","parameters":[{"description":"Agent document ID","in":"path","name":"id","required":true,"schema":{"description":"Agent document ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRelationRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSalesResponse"}}},"description":"Paginated list of sales for this agent"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Sales transactions where this agent was listing or selling side","tags":["Agents"]}},"/v1/alerts/conditions":{"get":{"operationId":"getAlertConditions","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertConditionsResponse"}}},"description":"Per-trigger flags + tunables (defaults if none saved)"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Get your alert settings","tags":["Alerts"]},"put":{"description":"Saves your NMLS id, contact identity and tunables. The per-trigger `enabled` flags are deprecated: subscribe to alert recipes or manage subscriptions instead. While still accepted, `enabled[type]: true` turns the trigger on for every watched subject that supports it, and `false` turns it off everywhere.","operationId":"updateAlertConditions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAlertConditionsRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertConditionsResponse"}}},"description":"The saved settings"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Update your alert settings","tags":["Alerts"]}},"/v1/alerts/digests":{"get":{"operationId":"listAlertDigests","parameters":[{"description":"Max items to return (default 25).","in":"query","name":"limit","required":false,"schema":{"description":"Max items to return (default 25).","maximum":100,"minimum":1,"type":"integer"}},{"description":"Pagination cursor from a previous response.","in":"query","name":"cursor","required":false,"schema":{"description":"Pagination cursor from a previous response.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertDigestResponse"}}},"description":"Paginated digest feed"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"List your alert digests (newest first)","tags":["Alerts"]}},"/v1/alerts/digests/{id}/read":{"post":{"operationId":"markAlertDigestRead","parameters":[{"description":"Digest id (from the feed).","in":"path","name":"id","required":true,"schema":{"description":"Digest id (from the feed).","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertsOkResponse"}}},"description":"Marked read (idempotent)"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Mark one digest read","tags":["Alerts"]}},"/v1/alerts/email-templates/preview":{"post":{"description":"Validates an email template and returns the notification props a run would send with it, filled with sample items for the given kinds — your recent alerts of those kinds when you have any, else samples. Writes nothing. Pass `recipeId` to preview under one of your recipes (or a published one).","operationId":"previewAlertEmailTemplate","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertEmailTemplatePreviewRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertEmailTemplatePreviewResponse"}}},"description":"Valid — the props the email renders from"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"`invalid_email_template` (with `details`: every problem's path and reason) or `unknown_recipe`"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Preview an alert email template","tags":["Alerts"]}},"/v1/alerts/email-tokens":{"get":{"description":"The tokens a recipe email template can use: run-level tokens (anywhere) and the item tokens each alert kind offers (inside an `items` block), each with a label and a formatted example.","operationId":"getAlertEmailTokens","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertEmailTokensResponse"}}},"description":"Token catalog"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"List the alert email template tokens","tags":["Alerts"]}},"/v1/alerts/log":{"get":{"operationId":"listAlertLog","parameters":[{"description":"Max items to return (default 25).","in":"query","name":"limit","required":false,"schema":{"description":"Max items to return (default 25).","maximum":100,"minimum":1,"type":"integer"}},{"description":"Pagination cursor from a previous response.","in":"query","name":"cursor","required":false,"schema":{"description":"Pagination cursor from a previous response.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertLogResponse"}}},"description":"Paginated alert feed"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"List your alerts (newest first)","tags":["Alerts"]}},"/v1/alerts/log/mark-all-read":{"post":{"operationId":"markAllAlertsRead","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertsOkResponse"}}},"description":"Unread count reset to 0"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Clear the unread badge","tags":["Alerts"]}},"/v1/alerts/log/{id}/read":{"post":{"operationId":"markAlertRead","parameters":[{"description":"Alert id (from the feed).","in":"path","name":"id","required":true,"schema":{"description":"Alert id (from the feed).","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertsOkResponse"}}},"description":"Marked read (idempotent)"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Mark one alert read","tags":["Alerts"]}},"/v1/alerts/my-recipes":{"get":{"description":"The alert recipes you created (any status), with whether you are subscribed to each. Active ones also appear on GET /alerts/recipes with `scope: \"mine\"`.","operationId":"listMyAlertRecipes","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertUserRecipesResponse"}}},"description":"Your recipes"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"List your own alert recipes","tags":["Alerts"]},"post":{"description":"Creates an alert recipe only you can see and subscribe to (at most 10). Give a title, the alert kinds per subject type (`grants`), and optionally a description, icon and inputs; the notification family, default inputs and digest copy are derived. Subscribe to it with POST /alerts/recipes/{id}.","operationId":"createMyAlertRecipe","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertMyRecipeDefinition"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertUserRecipeResponse"}}},"description":"Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"Invalid recipe (see `code`: `family_mismatch`, `grants_empty`, `invalid_icon`, `invalid_kind`, `kind_not_allowed_for_subject`, `unknown_field`, `invalid_rule`, `rule_edge_op_on_event_kind`, `inputs_mismatch`, `invalid_inputs`, `invalid_email_template` with `details`)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"You have no such recipe (`unknown_recipe`)"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"`recipe_limit` (at most 10) or `version_conflict`"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Create your own alert recipe","tags":["Alerts"]}},"/v1/alerts/my-recipes/preview":{"post":{"description":"Dry-runs a recipe definition (not saved) over the last 30 days for you, with the given inputs applied on top of your saved setup. Writes nothing.","operationId":"previewMyAlertRecipe","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertMyRecipePreviewRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipePreviewResponse"}}},"description":"What the recipe would have fired"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"Invalid recipe (see `code`: `family_mismatch`, `grants_empty`, `invalid_icon`, `invalid_kind`, `kind_not_allowed_for_subject`, `unknown_field`, `invalid_rule`, `rule_edge_op_on_event_kind`, `inputs_mismatch`, `invalid_inputs`, `invalid_email_template` with `details`)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"You have no such recipe (`unknown_recipe`)"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"`recipe_limit` (at most 10) or `version_conflict`"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Preview an unsaved alert recipe","tags":["Alerts"]}},"/v1/alerts/my-recipes/{id}":{"delete":{"description":"Deletes the recipe and unsubscribes you from it. Saved agents, areas and records stay.","operationId":"deleteMyAlertRecipe","parameters":[{"description":"Your recipe's id (`u-…`).","in":"path","name":"id","required":true,"schema":{"description":"Your recipe's id (`u-…`).","example":"u-k3j9x0a1bq","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertsOkResponse"}}},"description":"Deleted"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"Invalid recipe (see `code`: `family_mismatch`, `grants_empty`, `invalid_icon`, `invalid_kind`, `kind_not_allowed_for_subject`, `unknown_field`, `invalid_rule`, `rule_edge_op_on_event_kind`, `inputs_mismatch`, `invalid_inputs`, `invalid_email_template` with `details`)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"You have no such recipe (`unknown_recipe`)"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"`recipe_limit` (at most 10) or `version_conflict`"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Delete your own alert recipe","tags":["Alerts"]},"put":{"description":"Replaces the definition (`version` bumps). Your existing subscription to it narrows to the kinds it still grants.","operationId":"updateMyAlertRecipe","parameters":[{"description":"Your recipe's id (`u-…`).","in":"path","name":"id","required":true,"schema":{"description":"Your recipe's id (`u-…`).","example":"u-k3j9x0a1bq","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertMyRecipeUpdate"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertUserRecipeResponse"}}},"description":"Updated"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"Invalid recipe (see `code`: `family_mismatch`, `grants_empty`, `invalid_icon`, `invalid_kind`, `kind_not_allowed_for_subject`, `unknown_field`, `invalid_rule`, `rule_edge_op_on_event_kind`, `inputs_mismatch`, `invalid_inputs`, `invalid_email_template` with `details`)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"You have no such recipe (`unknown_recipe`)"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"`recipe_limit` (at most 10) or `version_conflict`"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Update your own alert recipe","tags":["Alerts"]}},"/v1/alerts/preview":{"post":{"description":"Runs all six detectors scoped to your own token, in-process and synchronously, as a dry-run: returns the alerts that WOULD fire (per detector, with the decision payloads) without writing the feed, publishing events, or sending email.","operationId":"previewAlerts","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewAlertsRequest"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunUserDetectorResponse"}}},"description":"Per-detector dry-run summary (the decisions that would fire)"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Preview the alerts that would fire for you","tags":["Alerts"]}},"/v1/alerts/recipes":{"get":{"description":"The published alert recipes — named bundles of alert triggers — with the inputs each needs and whether you are subscribed, followed by your own recipes (`scope: \"mine\"`).","operationId":"listAlertRecipes","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipesResponse"}}},"description":"Recipes"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"List alert recipes","tags":["Alerts"]}},"/v1/alerts/recipes/{id}":{"delete":{"description":"Turns the recipe's alert triggers off. Saved agents, areas and records stay; remove them with the watch-list endpoints.","operationId":"unsubscribeAlertRecipe","parameters":[{"description":"Recipe id (from GET /alerts/recipes).","in":"path","name":"id","required":true,"schema":{"description":"Recipe id (from GET /alerts/recipes).","example":"farm-area","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeResponse"}}},"description":"Unsubscribed"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"Invalid request (see `code`: `unknown_recipe`, `recipe_archived`, `invalid_inputs`, `rules_required`, `unknown_field`, `invalid_rule`)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Unsubscribe from an alert recipe","tags":["Alerts"]},"post":{"description":"Turns on the recipe's alert triggers, saves its inputs (NMLS id, agents, areas or a record — see the recipe's `inputs`), and backfills recent matches. For a record input, empty rules apply the recipe's rule templates for the record type.","operationId":"subscribeAlertRecipe","parameters":[{"description":"Recipe id (from GET /alerts/recipes).","in":"path","name":"id","required":true,"schema":{"description":"Recipe id (from GET /alerts/recipes).","example":"farm-area","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeInputs"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeResponse"}}},"description":"Subscribed"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"Invalid request (see `code`: `unknown_recipe`, `recipe_archived`, `invalid_inputs`, `rules_required`, `unknown_field`, `invalid_rule`)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Subscribe to an alert recipe","tags":["Alerts"]}},"/v1/alerts/recipes/{id}/preview":{"post":{"description":"Dry-run the recipe over the last 30 days for you, with the given inputs applied on top of your saved ones. Writes nothing.","operationId":"previewAlertRecipe","parameters":[{"description":"Recipe id (from GET /alerts/recipes).","in":"path","name":"id","required":true,"schema":{"description":"Recipe id (from GET /alerts/recipes).","example":"farm-area","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeInputs"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipePreviewResponse"}}},"description":"What the recipe would have fired"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRecipeError"}}},"description":"Invalid request (see `code`: `unknown_recipe`, `recipe_archived`, `invalid_inputs`, `rules_required`, `unknown_field`, `invalid_rule`)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Preview an alert recipe","tags":["Alerts"]}},"/v1/alerts/subscriptions":{"get":{"description":"Every subject you watch — agents, areas, your NMLS id, records — with the alert kinds that fire on it and the recipes that turned them on.","operationId":"listAlertSubscriptions","parameters":[{"description":"Only subscriptions of this subject type.","in":"query","name":"subjectType","required":false,"schema":{"description":"Only subscriptions of this subject type.","enum":["agent","area","nmls","property","loan","sale","company","filter"],"type":"string"}},{"description":"Only subscriptions carrying this alert kind.","in":"query","name":"kind","required":false,"schema":{"description":"Only subscriptions carrying this alert kind.","enum":["area_new_listing","watched_agent_pending","borrower_listed","epo_risk","agent_sale_closed","rate_term_refi_area","watched_sale","watched_property","watched_loan","book_property","book_loan","area_property"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertSubscriptionsResponse"}}},"description":"Subscriptions"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"List your alert subscriptions","tags":["Alerts"]},"post":{"description":"Watch a subject (an agent, an area, your NMLS id, or a sale / property / loan with rules) for the given alert kinds. Re-posting the same subject replaces the kinds you set directly; kinds a recipe turned on stay. Recent matches are backfilled when kinds are added.","operationId":"createAlertSubscription","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAlertSubscriptionRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertSubscriptionResponse"}}},"description":"The subscription as saved"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertSubscriptionError"}}},"description":"Invalid subscription (see `code`)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Subscribe to alerts on a subject","tags":["Alerts"]}},"/v1/alerts/subscriptions/{id}":{"delete":{"description":"Stops watching the subject (idempotent). For a record watch this also forgets its baseline, so watching it again starts fresh.","operationId":"deleteAlertSubscription","parameters":[{"description":"Opaque subscription id.","in":"path","name":"id","required":true,"schema":{"description":"Opaque subscription id.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertsOkResponse"}}},"description":"Removed"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertSubscriptionError"}}},"description":"Invalid subscription (see `code`)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Remove an alert subscription","tags":["Alerts"]}},"/v1/alerts/unread-count":{"get":{"operationId":"getAlertUnreadCount","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnreadCountResponse"}}},"description":"Unread count for the bell"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Get your unread alert count","tags":["Alerts"]}},"/v1/alerts/watched-agents":{"get":{"operationId":"listWatchedAgents","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatchedAgentsResponse"}}},"description":"Watched agents (hand-added + auto-derived)"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"List the agents you watch","tags":["Alerts"]},"post":{"operationId":"addWatchedAgent","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddWatchedAgentRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertsOkResponse"}}},"description":"Agent added (idempotent)"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Watch an agent","tags":["Alerts"]}},"/v1/alerts/watched-agents/{id}":{"delete":{"operationId":"removeWatchedAgent","parameters":[{"description":"Agent id to remove (a hand-added agent; auto-derived agents follow your NMLS id).","in":"path","name":"id","required":true,"schema":{"description":"Agent id to remove (a hand-added agent; auto-derived agents follow your NMLS id).","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertsOkResponse"}}},"description":"Agent removed (idempotent)"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Stop watching an agent","tags":["Alerts"]}},"/v1/alerts/watched-areas":{"get":{"operationId":"listWatchedAreas","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatchedAreasResponse"}}},"description":"Watched areas"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"List the areas you watch","tags":["Alerts"]},"post":{"operationId":"addWatchedArea","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddWatchedAreaRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatchedAreasResponse"}}},"description":"The updated list of watched areas"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Watch an area","tags":["Alerts"]}},"/v1/alerts/watched-areas/{id}":{"delete":{"operationId":"removeWatchedArea","parameters":[{"description":"Area id (from the list).","in":"path","name":"id","required":true,"schema":{"description":"Area id (from the list).","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertsOkResponse"}}},"description":"Area removed (idempotent)"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Stop watching an area","tags":["Alerts"]}},"/v1/alerts/watched-documents":{"get":{"operationId":"listWatchedDocuments","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatchedDocumentsResponse"}}},"description":"Watched documents"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"List the documents you watch","tags":["Alerts"]},"post":{"operationId":"addWatchedDocument","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddWatchedDocumentRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatchedDocumentsResponse"}}},"description":"The updated list of watched documents"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Watch a document","tags":["Alerts"]}},"/v1/alerts/watched-documents/{documentType}/{documentId}":{"delete":{"operationId":"removeWatchedDocument","parameters":[{"description":"The document kind.","in":"path","name":"documentType","required":true,"schema":{"description":"The document kind.","enum":["sale","property","loan"],"type":"string"}},{"description":"The document id.","in":"path","name":"documentId","required":true,"schema":{"description":"The document id.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertsOkResponse"}}},"description":"Document removed (idempotent)"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Stop watching a document","tags":["Alerts"]}},"/v1/branches":{"post":{"description":"Search NMLS-registered mortgage company branch offices (not MLS real estate offices — use listOffices for those). Returns branch name, address, parent company, managers, and NMLS ID. Each row carries branch-level production metrics for the selected period. If you only need how many branches match and not the records themselves, send the same request body to `countBranches`.","operationId":"listBranches","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchListRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchListResponse"}}},"description":"Paginated list of branches"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error. Includes unresolvable location filters: a `city`/`county`/`state`/`zip` value that does not match a recognized location returns 400 rather than an empty result set. Resolve the name with `instantSearch` (use an id from its `results.locations[]`) or `suggestLocations` (use the `id` of a `source: \"dictionary\"` result), then pass that id back as the filter value."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Search branches with filters","tags":["Branches"]}},"/v1/branches/analytics/chart":{"post":{"description":"Scoped to loans written by the loan officers on this branch's CURRENT licensing roster (wherever they wrote them), matching the branch profile. For loans public record attributes to the branch itself, use the branch breakdown endpoints.","operationId":"branchAnalyticsChart","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchChartRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChartResponse"}}},"description":"Chart data. Money measures (`volume`, `avgSalePrice`, `avgListPrice`) are sentinel-guarded. Excludes values outside 0–100,000,000 — the source encodes unknown values as an out-of-range fill, and averaging them raw is wrong by orders of magnitude. The bound is applied before the metric and is not part of the public filter surface, so an equivalent range filter will not reproduce this figure exactly."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Configurable chart (measure × slice) over a branch roster's loans","tags":["Branches"]}},"/v1/branches/analytics/summary":{"post":{"description":"Scoped to loans written by the loan officers on this branch's CURRENT licensing roster (wherever they wrote them), matching the branch profile. For loans public record attributes to the branch itself, use the branch breakdown endpoints.","operationId":"branchAnalyticsSummary","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchSummaryRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleSummaryResponse"}}},"description":"Current + previous-period summary"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Branch roster production summary with previous-period comparison","tags":["Branches"]}},"/v1/branches/analytics/time-series":{"post":{"description":"Scoped to loans written by the loan officers on this branch's CURRENT licensing roster (wherever they wrote them), matching the branch profile. For loans public record attributes to the branch itself, use the branch breakdown endpoints.","operationId":"branchAnalyticsTimeSeries","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchTimeSeriesRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTimeSeriesResponse"}}},"description":"Time-series with previous-period comparison"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Branch roster volume / units over time","tags":["Branches"]}},"/v1/branches/bulk-delivery":{"post":{"description":"Queues an ECS task that dumps every matching branches document to S3 in the requested format. Returns 202 with a jobId; poll `GET /v1/branches/bulk-delivery/{jobId}` for status + the signed download URL.\n\n**Row limit.** Deliveries of up to 5,000 rows need no entitlement. Above that, the org's `bulk-delivery.branches` entitlement is required and its scope (row ceiling, row filters, allowed fields) governs the delivery; without it the request is rejected with 403 `entitlement_missing`. Pass `limit` at or below the ceiling to deliver a capped subset of a broader query. Email support@modelmatch.com to request a limit increase.\n\nDelivery is billed at 1 credit per row regardless of entitlement (deliveries submitted from the ModelMatch web app are not billed).\n\n**Push-target destination.** Pass `destination: { type: \"push-target\", targetId }` to have the finished rows sent to a configured push target instead of downloaded. The target is checked before anything is queued; a refusal returns the push target's status and `code` (`TARGET_NOT_FOUND` 404, `FORBIDDEN` 403, `PLAN_REQUIRED` 402, `TARGET_DISABLED` 409, `ENTITY_MISMATCH` 400). Limits and billing are the same as a file delivery.","operationId":"submitBranchesBulkDelivery","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/BranchListRequest"},{"additionalProperties":false,"properties":{"columns":{"description":"A FORMATTED file: its columns, in order, with header labels and number formats — for `format` `csv` or `xlsx` only, and not combined with `fields` or a push-target `destination` (400 `columns_format_unsupported` / `columns_with_fields` / `columns_with_destination`). Every field a column reads is gated by the entitlement exactly as if it were listed in `fields`: a withheld field drops out of a column's fallback list, and a column with nothing left is omitted. An unknown field is a 400 `unknown_column_field`. No `id` column is added. A formatted `csv` starts with a UTF-8 byte-order mark and uses CRLF line endings, so Excel opens it with accented names intact. Columns may read any DTO field and any opt-in column `fields` documents, including the computed `governmentPct`, `branchCount`, `managerName` / `managerNmlsId` and `licensedSince`.","items":{"$ref":"#/components/schemas/BulkDeliveryColumn"},"maxItems":200,"minItems":1,"type":"array"},"destination":{"$ref":"#/components/schemas/BulkDeliveryDestination"},"fields":{"description":"Optional output column projection, named by the response DTO fields (the same camelCase fields the list endpoint returns, e.g. `city`, `interestRate`). Intersected with the entitlement scope's allowedFields and the entity's full column set. If empty after intersection, falls back to all columns. It also SELECTS the opt-in columns, which are not part of the list DTO and are never delivered unless named here: `communityLending` (properties, originators, companies, branches) — the Community Lending neighborhood profile, identical to the block on the entity's detail endpoint; `parties` (properties) — the mortgage parties attributed to the parcel, by attribution scope; `marketCount` / `countyCount` / `stateCount` / `zipCount` / `lenderCount` (originators) — the market-breadth rollups you can already filter on; and the computed `governmentPct` (originators: FHA + VA percent of loans, 0–100), `branchCount` (companies: NMLS branch count) and `managerName` / `managerNmlsId` (branches: the first branch manager) and `licensedSince` (branches: first-licensed date, the earliest license `issueDate`, YYYY-MM-DD). Agents also offer `email2` / `phone2` (the best-ranked email / phone distinct from `email` / `phone`, admitted by the `email` / `phone` entitlement field), `bestEmail` / `bestEmail2` and `bestPhone` / `bestPhone2` (the best and runner-up contact over every email / phone on the record, `email` / `phone` included — the pair the ModelMatch web app's agent export shows; same entitlement fields), `officePhone` (admitted by `phone`), `activeListings` (current active listings; null when unknown), and the profile-link columns `facebook`, `instagram`, `linkedin`, `twitter`, `youtube`, `tiktok`, `zillow`, `otherLinks` (a `; `-joined list of profile URLs on no known platform) — all admitted by the `links` entitlement field. Loans offer the list row's transaction-export fields (`employerName`, `employerNmlsId`, `brokerName`, `titleCompanyName`, `soldAgentName`, `listAgentName`, `coListAgentName`, `buyer1FirstMiddle` … `seller2Last`). In `csv` and `parquet` the two block columns are JSON-encoded cells; in `json` and `ndjson` they are nested objects. Windowed production (originators, agents, companies, branches): name `<field>_<n>mo` for n in 3, 6, 12, 14, 18, 24 to get a production field for that trailing window regardless of `period` — e.g. `volume_3mo`, `units_6mo`, `purchaseVolume_24mo`. Available for originators `volume`, `units`, `avgLoanAmount`, `purchaseVolume`, `purchaseUnits`, `refinanceVolume`, `refinanceUnits`, `conventionalPct`, `fhaPct`, `vaPct`; agents `volume`, `units`, `avgSoldPrice`, `buyerVolume`, `buyerUnits`, `sellerVolume`, `sellerUnits`, `totalOriginatorsWorkedWith`, `totalCompaniesWorkedWith`, `totalLendersWorkedWith`; companies `volume`, `units`, `avgLoanAmount`, `loCount`; branches `volume`, `units`, `avgLoanAmount`, `purchasePct`, `refinancePct`, `loCount`. Numbers (null when the window has no data); an entitlement that allows a field allows every window of it.","items":{"minLength":1,"type":"string"},"type":"array"},"format":{"$ref":"#/components/schemas/BulkDeliveryFormat"},"limit":{"description":"Optional hard cap on the number of rows delivered — and therefore billed (1 credit / row). The job delivers the first `limit` rows in sort order (default newest-first) and bills only for those. If the query matches fewer than `limit`, all matches are delivered. Distinct from the page-size `size` field, which is ignored on this endpoint. The row ceiling still applies — 5,000 without the entity's bulk-delivery entitlement, or the entitlement's `maxRows` with it. A `limit` above the ceiling is rejected, but a `limit` at or below it lets you export a capped top-N even when the full match exceeds the ceiling — which is the intended way to run a broad query under the 5,000-row allowance.","example":5000,"exclusiveMinimum":true,"minimum":0,"type":"integer"}},"type":"object"}]}}}},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeliverySubmitResponse"}}},"description":"Job queued; ECS task launched"},"400":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/BulkDeliveryPreflightExceeded"},{"$ref":"#/components/schemas/BulkDeliveryPushTargetError"},{"$ref":"#/components/schemas/BulkDeliveryColumnsError"}]}}},"description":"Validation failure (incl. `format_required`: a file delivery needs `format`; a refused `columns` request), delivery would exceed the entitlement's maxRows, OR the push target does not accept this entity (`ENTITY_MISMATCH`)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"402":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/BulkDeliveryInsufficientCredits"},{"$ref":"#/components/schemas/BulkDeliveryPushTargetError"}]}}},"description":"Insufficient credits (balance < estimatedTotal, at 1 credit per row), OR the plan does not include push targets (`PLAN_REQUIRED`)"},"403":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/BulkDeliveryForbidden"},{"$ref":"#/components/schemas/BulkDeliveryPushTargetError"},{"$ref":"#/components/schemas/BulkDeliveryInsufficientScope"}]}}},"description":"Delivery exceeds the 5,000-row limit available without the `bulk-delivery.branches` entitlement (lower `limit`, narrow the filters, or contact support for a limit increase), OR you may not use the push target (`FORBIDDEN`), OR a scoped token named a push-target destination without `push-targets:send` (`insufficient_scope`)."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeliveryPushTargetError"}}},"description":"Push target not found (`TARGET_NOT_FOUND`)"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeliveryPushTargetError"}}},"description":"Push target is disabled (`TARGET_DISABLED`)"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Preflight / S3 / DDB / ECS launch failure, the push-target check could not reach the auth server, or the credit balance could not be read (`billing_unavailable` — retry; a paid delivery is never queued unverified)"}},"summary":"Submit a bulk-delivery job for branches","tags":["Branches"]}},"/v1/branches/bulk-delivery/{jobId}":{"delete":{"description":"Cancels a queued or running branches delivery job.\n\nThe job is marked `cancelled` immediately; the container running it notices on its next page boundary and stops. Because a delivery is billed once, at the end, **a cancelled job is never charged** — no credits are debited and there is nothing to refund. No partial file is written.\n\nIdempotent-ish: cancelling a job that has already finished (or was already cancelled) returns 409 and changes nothing. Poll `GET /v1/branches/bulk-delivery/{jobId}` for the settled state.","operationId":"cancelBranchesBulkDeliveryJob","parameters":[{"description":"Job ID returned by `POST /v1/branches/bulk-delivery`","in":"path","name":"jobId","required":true,"schema":{"description":"Job ID returned by `POST /v1/branches/bulk-delivery`","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeliveryStatusResponse"}}},"description":"Job cancelled; body is its settled status"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Caller does not own this job"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Job not found (or expired past 30d TTL)"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Job already finished — nothing to cancel"}},"summary":"Cancel a bulk-delivery job for branches","tags":["Branches"]},"get":{"operationId":"getBranchesBulkDeliveryJob","parameters":[{"description":"Job ID returned by `POST /v1/branches/bulk-delivery`","in":"path","name":"jobId","required":true,"schema":{"description":"Job ID returned by `POST /v1/branches/bulk-delivery`","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeliveryStatusResponse"}}},"description":"Job status (resultsUrl re-signed if completed)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Caller does not own this job"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Job not found (or expired past 30d TTL)"}},"summary":"Get bulk-delivery job status for branches","tags":["Branches"]}},"/v1/branches/count":{"post":{"description":"Return the exact number of branches matching the given filters. Accepts the same request body as `listBranches` (pagination and sort are ignored). Use this when you only need a total; to get the matching branches themselves, send the same request body to `listBranches`.","operationId":"countBranches","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchListRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountResponse"}}},"description":"Exact count of matching branches"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Count branches matching filters","tags":["Branches"],"x-mm-records-via":"listBranches"}},"/v1/branches/stats":{"post":{"description":"Accepts the same request body as `listBranches` (pagination and sort are ignored) and returns aggregate KPIs over every matching branch: count, producing count, average roster size, total units and the top 3 branches' units. Use it for a company's branch network summary (`flatFilters.company`).","operationId":"branchStats","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchListRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchStatsResponse"}}},"description":"Branch roll-up KPIs"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error. Includes unresolvable location filters: a `city`/`county`/`state`/`zip` value that does not match a recognized location returns 400 rather than an empty result set. Resolve the name with `instantSearch` (use an id from its `results.locations[]`) or `suggestLocations` (use the `id` of a `source: \"dictionary\"` result), then pass that id back as the filter value."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Roll-up KPIs over the branches matching filters","tags":["Branches"]}},"/v1/branches/{nmlsId}":{"get":{"description":"Retrieve full details for a single NMLS mortgage branch including name, address, parent company, managers, trade names, licensing, and branch-level production for the selected period.","operationId":"getBranch","parameters":[{"description":"Branch NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Branch NMLS ID","type":"string"}},{"description":"Period for production metrics (default: last12Months). Does NOT apply to `teamSize`, which is a current snapshot and reads the same on every period.","in":"query","name":"period","required":false,"schema":{"allOf":[{"$ref":"#/components/schemas/Period"},{"description":"Period for production metrics (default: last12Months). Does NOT apply to `teamSize`, which is a current snapshot and reads the same on every period."}]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchDetailResponse"}}},"description":"Branch detail"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Branch not found"}},"summary":"Get branch by NMLS ID","tags":["Branches"]}},"/v1/branches/{nmlsId}/breakdowns/cities":{"post":{"description":"Ranks the cities this branch's loans were secured in, by volume — the branch's real lending footprint rather than its parent company's. Labels are Title Case so they match the city breakdowns on every other entity.","operationId":"branchCities","parameters":[{"description":"Branch NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Branch NMLS ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownResponse"}}},"description":"Breakdown of this branch's loans by cities"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"City volume breakdown across this branch's loans","tags":["Branches"]}},"/v1/branches/{nmlsId}/breakdowns/counties":{"post":{"description":"Ranks the counties this branch's loans were secured in, by volume. Labels are county codes on this surface — the same axis every other county breakdown uses, so the two are directly comparable.","operationId":"branchCounties","parameters":[{"description":"Branch NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Branch NMLS ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownResponse"}}},"description":"Breakdown of this branch's loans by counties"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"County volume breakdown across this branch's loans","tags":["Branches"]}},"/v1/branches/{nmlsId}/breakdowns/lenders":{"post":{"description":"Ranks the lenders this branch's loans funded through, by volume. Pass an item's `id` — not its `label` — back as a `lender` filter value; `label` is the display name.","operationId":"branchLenders","parameters":[{"description":"Branch NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Branch NMLS ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownResponse"}}},"description":"Breakdown of this branch's loans by lenders"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Lenders this branch originated through","tags":["Branches"]}},"/v1/branches/{nmlsId}/breakdowns/originators":{"post":{"description":"Ranks the loan officers whose loans public record attributes to this branch, by volume. Each label is the LO's NMLS ID, so it chains straight into `GET /v1/originators/{nmlsId}`. This is the branch's RECORDED roster, not its licensing roster: it answers who actually wrote loans here in the period, which is narrower than everyone registered to the branch and can include someone who has since moved. For the licensed managers on file, read `managers` on `GET /v1/branches/{nmlsId}`.","operationId":"branchOriginators","parameters":[{"description":"Branch NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Branch NMLS ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownResponse"}}},"description":"Breakdown of this branch's loans by originators"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Loan officers who wrote this branch's loans","tags":["Branches"]}},"/v1/branches/{nmlsId}/breakdowns/states":{"post":{"description":"Ranks the states this branch's loans were secured in, by volume. Labels are two-letter state abbreviations. This is where the branch actually transacted, which is narrower than where it is licensed — licensed states are returned by `GET /v1/branches/{nmlsId}`.","operationId":"branchStates","parameters":[{"description":"Branch NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Branch NMLS ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownResponse"}}},"description":"Breakdown of this branch's loans by states"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"State volume breakdown across this branch's loans","tags":["Branches"]}},"/v1/branches/{nmlsId}/breakdowns/title-companies":{"post":{"description":"Ranks the title companies on this entity's loans (recorded deeds, `recording_date` window — the same population and period axis as every other loans breakdown). Spellings of one company are MERGED: `label` is its most-used spelling, `id` the normalized name every spelling was grouped under (legal-form and filler words such as `inc`, `llc`, `co`, `company`, `title`, `escrow` removed; `natl` → `national`). Placeholder entries meaning \"no title company recorded\" (`none available` and its misspellings, `unknown`, `n/a`, …) and names shorter than 3 characters are excluded rather than ranked. `attorney` and `accommodation` are kept: they say who closed. `pctUnits` / `pctVolume` are shares of the entity's WHOLE loan population in the window, including loans with no title company, so they do not sum to 100 across the page. Pages of up to 100 via `pagination`.","operationId":"branchTitleCompanies","parameters":[{"description":"Branch NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Branch NMLS ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownResponse"}}},"description":"Breakdown of the entity's loans by title company"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Title companies on this branch's loans (spellings merged)","tags":["Branches"]}},"/v1/branches/{nmlsId}/community-lending/map":{"get":{"description":"Map points for loans written by this branch's current roster in the period that resolved to a Census tract, newest first (up to 4,000), plus a per-tract loan count keyed by 11-digit tract GEOID for a choropleth.","operationId":"branchCommunityLendingMap","parameters":[{"description":"Branch NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Branch NMLS ID","type":"string"}},{"description":"Period window (default: last12Months).","in":"query","name":"period","required":false,"schema":{"allOf":[{"$ref":"#/components/schemas/Period"},{"description":"Period window (default: last12Months)."}]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityLendingMapResponse"}}},"description":"Map feed"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Community Lending map: geocoded loans + per-tract counts","tags":["Branches"]}},"/v1/branches/{nmlsId}/loans":{"post":{"description":"Returns the individual loans attributed to this branch office — the branch's own book, not its parent company's. Accepts the same filters, sorts and pagination as the main loan search. Attribution comes from public record, so this is the branch's recorded footprint and can be smaller than the production totals on `GET /v1/branches/{nmlsId}`.","operationId":"branchLoans","parameters":[{"description":"Branch NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Branch NMLS ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoanListRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoanListResponse"}}},"description":"Paginated list of loans written by this branch"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Loans written by this branch","tags":["Branches"]}},"/v1/branches/{nmlsId}/roster":{"post":{"description":"The loan officers currently registered to this branch location who hold an active sponsorship or registration — one row per person, with current employer, tenure, years in the industry, manager flags and collected contact info. This is the LICENSING roster; for the loan officers whose loans public record attributes to the branch, use `branchOriginators`.","operationId":"branchRoster","parameters":[{"description":"Branch NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Branch NMLS ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchRosterRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchRosterResponse"}}},"description":"Paginated roster"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Branch not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Loan officers on this branch's current roster","tags":["Branches"]}},"/v1/companies":{"post":{"description":"Search and list individual mortgage companies with filters — one row per company. Filter by name, NMLS ID, location (state, county, city, zip), and production metrics (loan volume, units, market share) by period and geography, with sorting and cursor pagination. This is the per-company record search: use it to find specific mortgage lenders/companies or build a filtered company list. (For a single company by ID use the company detail endpoint.) If you only need how many companies match and not the records themselves, send the same request body to `countCompanies`.","operationId":"listCompanies","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyListRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyListResponse"}}},"description":"Paginated list of companies"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error. Includes unresolvable location filters: a `city`/`county`/`state`/`zip` value that does not match a recognized location returns 400 rather than an empty result set. Resolve the name with `instantSearch` (use an id from its `results.locations[]`) or `suggestLocations` (use the `id` of a `source: \"dictionary\"` result), then pass that id back as the filter value."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Search companies with filters","tags":["Companies"]}},"/v1/companies/analytics/chart":{"post":{"operationId":"companyAnalyticsChart","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyChartRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChartResponse"}}},"description":"Chart data. Money measures (`volume`, `avgSalePrice`, `avgListPrice`) are sentinel-guarded. Excludes values outside 0–100,000,000 — the source encodes unknown values as an out-of-range fill, and averaging them raw is wrong by orders of magnitude. The bound is applied before the metric and is not part of the public filter surface, so an equivalent range filter will not reproduce this figure exactly."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Configurable chart (measure × slice) over company's loans","tags":["Companies"]}},"/v1/companies/analytics/summary":{"post":{"operationId":"companyAnalyticsSummary","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanySummaryRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleSummaryResponse"}}},"description":"Current + previous-period summary"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Production summary with previous-period comparison","tags":["Companies"]}},"/v1/companies/analytics/time-series":{"post":{"operationId":"companyAnalyticsTimeSeries","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyTimeSeriesRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTimeSeriesResponse"}}},"description":"Time-series with previous-period comparison"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Company volume / units over time","tags":["Companies"]}},"/v1/companies/bulk-delivery":{"post":{"description":"Queues an ECS task that dumps every matching companies document to S3 in the requested format. Returns 202 with a jobId; poll `GET /v1/companies/bulk-delivery/{jobId}` for status + the signed download URL.\n\n**Row limit.** Deliveries of up to 5,000 rows need no entitlement. Above that, the org's `bulk-delivery.companies` entitlement is required and its scope (row ceiling, row filters, allowed fields) governs the delivery; without it the request is rejected with 403 `entitlement_missing`. Pass `limit` at or below the ceiling to deliver a capped subset of a broader query. Email support@modelmatch.com to request a limit increase.\n\nDelivery is billed at 1 credit per row regardless of entitlement (deliveries submitted from the ModelMatch web app are not billed).\n\n**Push-target destination.** Pass `destination: { type: \"push-target\", targetId }` to have the finished rows sent to a configured push target instead of downloaded. The target is checked before anything is queued; a refusal returns the push target's status and `code` (`TARGET_NOT_FOUND` 404, `FORBIDDEN` 403, `PLAN_REQUIRED` 402, `TARGET_DISABLED` 409, `ENTITY_MISMATCH` 400). Limits and billing are the same as a file delivery.","operationId":"submitCompaniesBulkDelivery","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/CompanyListRequest"},{"additionalProperties":false,"properties":{"columns":{"description":"A FORMATTED file: its columns, in order, with header labels and number formats — for `format` `csv` or `xlsx` only, and not combined with `fields` or a push-target `destination` (400 `columns_format_unsupported` / `columns_with_fields` / `columns_with_destination`). Every field a column reads is gated by the entitlement exactly as if it were listed in `fields`: a withheld field drops out of a column's fallback list, and a column with nothing left is omitted. An unknown field is a 400 `unknown_column_field`. No `id` column is added. A formatted `csv` starts with a UTF-8 byte-order mark and uses CRLF line endings, so Excel opens it with accented names intact. Columns may read any DTO field and any opt-in column `fields` documents, including the computed `governmentPct`, `branchCount`, `managerName` / `managerNmlsId` and `licensedSince`.","items":{"$ref":"#/components/schemas/BulkDeliveryColumn"},"maxItems":200,"minItems":1,"type":"array"},"destination":{"$ref":"#/components/schemas/BulkDeliveryDestination"},"fields":{"description":"Optional output column projection, named by the response DTO fields (the same camelCase fields the list endpoint returns, e.g. `city`, `interestRate`). Intersected with the entitlement scope's allowedFields and the entity's full column set. If empty after intersection, falls back to all columns. It also SELECTS the opt-in columns, which are not part of the list DTO and are never delivered unless named here: `communityLending` (properties, originators, companies, branches) — the Community Lending neighborhood profile, identical to the block on the entity's detail endpoint; `parties` (properties) — the mortgage parties attributed to the parcel, by attribution scope; `marketCount` / `countyCount` / `stateCount` / `zipCount` / `lenderCount` (originators) — the market-breadth rollups you can already filter on; and the computed `governmentPct` (originators: FHA + VA percent of loans, 0–100), `branchCount` (companies: NMLS branch count) and `managerName` / `managerNmlsId` (branches: the first branch manager) and `licensedSince` (branches: first-licensed date, the earliest license `issueDate`, YYYY-MM-DD). Agents also offer `email2` / `phone2` (the best-ranked email / phone distinct from `email` / `phone`, admitted by the `email` / `phone` entitlement field), `bestEmail` / `bestEmail2` and `bestPhone` / `bestPhone2` (the best and runner-up contact over every email / phone on the record, `email` / `phone` included — the pair the ModelMatch web app's agent export shows; same entitlement fields), `officePhone` (admitted by `phone`), `activeListings` (current active listings; null when unknown), and the profile-link columns `facebook`, `instagram`, `linkedin`, `twitter`, `youtube`, `tiktok`, `zillow`, `otherLinks` (a `; `-joined list of profile URLs on no known platform) — all admitted by the `links` entitlement field. Loans offer the list row's transaction-export fields (`employerName`, `employerNmlsId`, `brokerName`, `titleCompanyName`, `soldAgentName`, `listAgentName`, `coListAgentName`, `buyer1FirstMiddle` … `seller2Last`). In `csv` and `parquet` the two block columns are JSON-encoded cells; in `json` and `ndjson` they are nested objects. Windowed production (originators, agents, companies, branches): name `<field>_<n>mo` for n in 3, 6, 12, 14, 18, 24 to get a production field for that trailing window regardless of `period` — e.g. `volume_3mo`, `units_6mo`, `purchaseVolume_24mo`. Available for originators `volume`, `units`, `avgLoanAmount`, `purchaseVolume`, `purchaseUnits`, `refinanceVolume`, `refinanceUnits`, `conventionalPct`, `fhaPct`, `vaPct`; agents `volume`, `units`, `avgSoldPrice`, `buyerVolume`, `buyerUnits`, `sellerVolume`, `sellerUnits`, `totalOriginatorsWorkedWith`, `totalCompaniesWorkedWith`, `totalLendersWorkedWith`; companies `volume`, `units`, `avgLoanAmount`, `loCount`; branches `volume`, `units`, `avgLoanAmount`, `purchasePct`, `refinancePct`, `loCount`. Numbers (null when the window has no data); an entitlement that allows a field allows every window of it.","items":{"minLength":1,"type":"string"},"type":"array"},"format":{"$ref":"#/components/schemas/BulkDeliveryFormat"},"limit":{"description":"Optional hard cap on the number of rows delivered — and therefore billed (1 credit / row). The job delivers the first `limit` rows in sort order (default newest-first) and bills only for those. If the query matches fewer than `limit`, all matches are delivered. Distinct from the page-size `size` field, which is ignored on this endpoint. The row ceiling still applies — 5,000 without the entity's bulk-delivery entitlement, or the entitlement's `maxRows` with it. A `limit` above the ceiling is rejected, but a `limit` at or below it lets you export a capped top-N even when the full match exceeds the ceiling — which is the intended way to run a broad query under the 5,000-row allowance.","example":5000,"exclusiveMinimum":true,"minimum":0,"type":"integer"}},"type":"object"}]}}}},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeliverySubmitResponse"}}},"description":"Job queued; ECS task launched"},"400":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/BulkDeliveryPreflightExceeded"},{"$ref":"#/components/schemas/BulkDeliveryPushTargetError"},{"$ref":"#/components/schemas/BulkDeliveryColumnsError"}]}}},"description":"Validation failure (incl. `format_required`: a file delivery needs `format`; a refused `columns` request), delivery would exceed the entitlement's maxRows, OR the push target does not accept this entity (`ENTITY_MISMATCH`)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"402":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/BulkDeliveryInsufficientCredits"},{"$ref":"#/components/schemas/BulkDeliveryPushTargetError"}]}}},"description":"Insufficient credits (balance < estimatedTotal, at 1 credit per row), OR the plan does not include push targets (`PLAN_REQUIRED`)"},"403":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/BulkDeliveryForbidden"},{"$ref":"#/components/schemas/BulkDeliveryPushTargetError"},{"$ref":"#/components/schemas/BulkDeliveryInsufficientScope"}]}}},"description":"Delivery exceeds the 5,000-row limit available without the `bulk-delivery.companies` entitlement (lower `limit`, narrow the filters, or contact support for a limit increase), OR you may not use the push target (`FORBIDDEN`), OR a scoped token named a push-target destination without `push-targets:send` (`insufficient_scope`)."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeliveryPushTargetError"}}},"description":"Push target not found (`TARGET_NOT_FOUND`)"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeliveryPushTargetError"}}},"description":"Push target is disabled (`TARGET_DISABLED`)"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Preflight / S3 / DDB / ECS launch failure, the push-target check could not reach the auth server, or the credit balance could not be read (`billing_unavailable` — retry; a paid delivery is never queued unverified)"}},"summary":"Submit a bulk-delivery job for companies","tags":["Companies"]}},"/v1/companies/bulk-delivery/{jobId}":{"delete":{"description":"Cancels a queued or running companies delivery job.\n\nThe job is marked `cancelled` immediately; the container running it notices on its next page boundary and stops. Because a delivery is billed once, at the end, **a cancelled job is never charged** — no credits are debited and there is nothing to refund. No partial file is written.\n\nIdempotent-ish: cancelling a job that has already finished (or was already cancelled) returns 409 and changes nothing. Poll `GET /v1/companies/bulk-delivery/{jobId}` for the settled state.","operationId":"cancelCompaniesBulkDeliveryJob","parameters":[{"description":"Job ID returned by `POST /v1/companies/bulk-delivery`","in":"path","name":"jobId","required":true,"schema":{"description":"Job ID returned by `POST /v1/companies/bulk-delivery`","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeliveryStatusResponse"}}},"description":"Job cancelled; body is its settled status"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Caller does not own this job"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Job not found (or expired past 30d TTL)"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Job already finished — nothing to cancel"}},"summary":"Cancel a bulk-delivery job for companies","tags":["Companies"]},"get":{"operationId":"getCompaniesBulkDeliveryJob","parameters":[{"description":"Job ID returned by `POST /v1/companies/bulk-delivery`","in":"path","name":"jobId","required":true,"schema":{"description":"Job ID returned by `POST /v1/companies/bulk-delivery`","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeliveryStatusResponse"}}},"description":"Job status (resultsUrl re-signed if completed)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Caller does not own this job"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Job not found (or expired past 30d TTL)"}},"summary":"Get bulk-delivery job status for companies","tags":["Companies"]}},"/v1/companies/count":{"post":{"description":"Return the exact number of companies matching the given filters. Accepts the same request body as `listCompanies` (pagination and sort are ignored). Use this when you only need a total; to get the matching companies themselves, send the same request body to `listCompanies`.","operationId":"countCompanies","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyListRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountResponse"}}},"description":"Exact count of matching companies"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Count companies matching filters","tags":["Companies"],"x-mm-records-via":"listCompanies"}},"/v1/companies/lookup":{"post":{"description":"Search the NMLS company registry by id, name, registered address, regulator category and size — one row per registered company, INCLUDING companies with no production on file (which `listCompanies` does not return). Use it to resolve canonical company names for a list of NMLS ids, or to filter/sort companies by `regulatorCategory`, `branchCount`, `activeLoCount` or `avgTenureMonths`. For production metrics use `listCompanies`.","operationId":"lookupCompanies","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyLookupRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyLookupResponse"}}},"description":"Registered companies"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Look up companies in the NMLS registry","tags":["Companies"]}},"/v1/companies/{id}/related":{"get":{"description":"Return the ids of records of another type that are linked to this record. Links resolve by identifier, strongest identifier first, and equally-trusted identifiers are combined — a company's linked loans cover every role it holds on a loan, not just the first one found. The response reports which strength was used: `primary` is the canonical identifier for that pair, `secondary` is a real but weaker alternate used only when the record carries nothing better. This is a lightweight index: it returns ids and a count, not full records. For filtering, sorting, pagination and full detail, use the named endpoint for the pair (for example the originator loans endpoint) and fetch records by id.","operationId":"companyRelated","parameters":[{"description":"Company NMLS ID","in":"path","name":"id","required":true,"schema":{"description":"Company NMLS ID","type":"string"}},{"description":"Type of record to link to","in":"query","name":"to","required":true,"schema":{"description":"Type of record to link to","enum":["loans","originators","properties"],"type":"string"}},{"description":"Maximum ids to return (default 25, max 200)","in":"query","name":"limit","required":false,"schema":{"description":"Maximum ids to return (default 25, max 200)","maximum":200,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelatedResponse"}}},"description":"Linked record ids"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Record not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Records linked to this one","tags":["Related"]}},"/v1/companies/{nmlsId}":{"get":{"operationId":"getCompany","parameters":[{"description":"Company NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Company NMLS ID","type":"string"}},{"description":"Period for production metrics (default: last12Months)","in":"query","name":"period","required":false,"schema":{"allOf":[{"$ref":"#/components/schemas/Period"},{"description":"Period for production metrics (default: last12Months)"}]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyDetailResponse"}}},"description":"Company detail"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Company not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large"}},"summary":"Get company by NMLS ID","tags":["Companies"]}},"/v1/companies/{nmlsId}/branches":{"post":{"operationId":"companyBranches","parameters":[{"description":"Company NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Company NMLS ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyBranchesRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyBranchesResponse"}}},"description":"Paginated list of branches"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Branch locations for this company","tags":["Companies"]}},"/v1/companies/{nmlsId}/breakdowns/agents":{"post":{"description":"Ranks the real-estate agents on the selling side of this company's loans, by volume. Buckets whose name is an MLS placeholder for \"no selling agent recorded\" (`non member`, `non listed agent`, and ~140 board-specific spellings) are excluded rather than ranked as agents — they are not people and cannot be resolved with `GET /v1/agents/{id}`. Percentages are shares of the company's whole loan population, so they do not sum to 100 across the page.","operationId":"companyAgents","parameters":[{"description":"Company NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Company NMLS ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyBreakdownRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownResponse"}}},"description":"Breakdown of the company's loans by agents"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Real-estate agents who co-closed with this company's LOs","tags":["Companies"]}},"/v1/companies/{nmlsId}/breakdowns/brokers":{"post":{"operationId":"companyBrokers","parameters":[{"description":"Company NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Company NMLS ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyBreakdownRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownResponse"}}},"description":"Breakdown of the company's loans by brokers"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Broker shops that originated loans funding through this company. For a wholesale/TPO lender this is its top broker partners.","tags":["Companies"]}},"/v1/companies/{nmlsId}/breakdowns/cities":{"post":{"operationId":"companyCities","parameters":[{"description":"Company NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Company NMLS ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyBreakdownRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownResponse"}}},"description":"Breakdown of the company's loans by cities"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"City volume breakdown across this company's loans","tags":["Companies"]}},"/v1/companies/{nmlsId}/breakdowns/counties":{"post":{"operationId":"companyCounties","parameters":[{"description":"Company NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Company NMLS ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyBreakdownRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownResponse"}}},"description":"Breakdown of the company's loans by counties"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"County (FIPS) volume breakdown across this company's loans","tags":["Companies"]}},"/v1/companies/{nmlsId}/breakdowns/lenders":{"post":{"operationId":"companyLenders","parameters":[{"description":"Company NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Company NMLS ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyBreakdownRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownResponse"}}},"description":"Breakdown of the company's loans by lenders"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Lenders this company originated through","tags":["Companies"]}},"/v1/companies/{nmlsId}/breakdowns/offices":{"post":{"operationId":"companyOffices","parameters":[{"description":"Company NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Company NMLS ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyBreakdownRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownResponse"}}},"description":"Breakdown of the company's loans by offices"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Broker offices this company originated through","tags":["Companies"]}},"/v1/companies/{nmlsId}/breakdowns/originators":{"post":{"description":"Ranks the loan officers on this company's loans (scope with `roleScope` — `tpo` for its third-party originators). `label` is the LO's NMLS id; `name` and `company` (the LO's CURRENT employer per NMLS licensing, not necessarily the company on the loans) are resolved server-side, and are absent for an id with no originator profile. `sort: [{field: \"name\"}]` orders by that resolved name across the top 10,000 originators by volume (`truncated` says when there are more).","operationId":"companyOriginators","parameters":[{"description":"Company NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Company NMLS ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyBreakdownRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownResponse"}}},"description":"Breakdown of the company's loans by originators"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Loan officers who originated through this company","tags":["Companies"]}},"/v1/companies/{nmlsId}/breakdowns/states":{"post":{"operationId":"companyStates","parameters":[{"description":"Company NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Company NMLS ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyBreakdownRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownResponse"}}},"description":"Breakdown of the company's loans by states"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"State volume breakdown across this company's loans","tags":["Companies"]}},"/v1/companies/{nmlsId}/breakdowns/title-companies":{"post":{"description":"Ranks the title companies on this entity's loans (recorded deeds, `recording_date` window — the same population and period axis as every other loans breakdown). Spellings of one company are MERGED: `label` is its most-used spelling, `id` the normalized name every spelling was grouped under (legal-form and filler words such as `inc`, `llc`, `co`, `company`, `title`, `escrow` removed; `natl` → `national`). Placeholder entries meaning \"no title company recorded\" (`none available` and its misspellings, `unknown`, `n/a`, …) and names shorter than 3 characters are excluded rather than ranked. `attorney` and `accommodation` are kept: they say who closed. `pctUnits` / `pctVolume` are shares of the entity's WHOLE loan population in the window, including loans with no title company, so they do not sum to 100 across the page. Pages of up to 100 via `pagination`.","operationId":"companyTitleCompanies","parameters":[{"description":"Company NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Company NMLS ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyBreakdownRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownResponse"}}},"description":"Breakdown of the entity's loans by title company"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Title companies on this company's loans (spellings merged)","tags":["Companies"]}},"/v1/companies/{nmlsId}/breakdowns/zip-codes":{"post":{"operationId":"companyZipCodes","parameters":[{"description":"Company NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Company NMLS ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyBreakdownRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownResponse"}}},"description":"Breakdown of the company's loans by zip-codes"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Zip-code volume breakdown across this company's loans","tags":["Companies"]}},"/v1/companies/{nmlsId}/community-lending/benchmark":{"get":{"description":"Percentile rank and peer average of this entity's low- or moderate-income and majority-minority neighborhood shares, against peers producing in its top 12 states by units. `data` is null when the entity has no neighborhood-resolved loans in the period.","operationId":"companyCommunityLendingBenchmark","parameters":[{"description":"Company NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Company NMLS ID","type":"string"}},{"description":"Period window (default: last12Months).","in":"query","name":"period","required":false,"schema":{"allOf":[{"$ref":"#/components/schemas/Period"},{"description":"Period window (default: last12Months)."}]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityLendingBenchmarkResponse"}}},"description":"Peer benchmark"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Community Lending peer benchmark (LMI / majority-minority)","tags":["Companies"]}},"/v1/companies/{nmlsId}/community-lending/map":{"get":{"description":"Map points for loans naming this company on the loan document in the period that resolved to a Census tract, newest first (up to 4,000), plus a per-tract loan count keyed by 11-digit tract GEOID for a choropleth.","operationId":"companyCommunityLendingMap","parameters":[{"description":"Company NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Company NMLS ID","type":"string"}},{"description":"Period window (default: last12Months).","in":"query","name":"period","required":false,"schema":{"allOf":[{"$ref":"#/components/schemas/Period"},{"description":"Period window (default: last12Months)."}]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityLendingMapResponse"}}},"description":"Map feed"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Community Lending map: geocoded loans + per-tract counts","tags":["Companies"]}},"/v1/companies/{nmlsId}/departure-status":{"get":{"description":"The window's complete departures, split by whether each loan officer's current employer on file is another company. One aggregate — no rows.","operationId":"companyDepartureStatus","parameters":[{"description":"Company NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Company NMLS ID","type":"string"}},{"description":"Preset window when `from`/`to` are not given (default `last12Months`). Rolling periods start on the FIRST day of the month N months back and end today; a year is Jan 1 – Dec 31; `allTime` starts 2017-01-01, the earliest reliable registration data. Also selects the production period for volume/units.","in":"query","name":"period","required":false,"schema":{"allOf":[{"$ref":"#/components/schemas/Period"},{"description":"Preset window when `from`/`to` are not given (default `last12Months`). Rolling periods start on the FIRST day of the month N months back and end today; a year is Jan 1 – Dec 31; `allTime` starts 2017-01-01, the earliest reliable registration data. Also selects the production period for volume/units."}]}},{"description":"Window start, inclusive (YYYY-MM-DD). Overrides `period`.","in":"query","name":"from","required":false,"schema":{"description":"Window start, inclusive (YYYY-MM-DD). Overrides `period`.","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},{"description":"Window end, inclusive (YYYY-MM-DD). Overrides `period`.","in":"query","name":"to","required":false,"schema":{"description":"Window end, inclusive (YYYY-MM-DD). Overrides `period`.","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyDepartureStatusResponse"}}},"description":"Exits working elsewhere vs not working"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"How many of a company's exits work elsewhere today","tags":["Companies"]}},"/v1/companies/{nmlsId}/early-exits":{"get":{"operationId":"companyEarlyExits","parameters":[{"description":"Company NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Company NMLS ID","type":"string"}},{"description":"Preset window when `from`/`to` are not given (default `last12Months`). Rolling periods start on the FIRST day of the month N months back and end today; a year is Jan 1 – Dec 31; `allTime` starts 2017-01-01, the earliest reliable registration data. Also selects the production period for volume/units.","in":"query","name":"period","required":false,"schema":{"allOf":[{"$ref":"#/components/schemas/Period"},{"description":"Preset window when `from`/`to` are not given (default `last12Months`). Rolling periods start on the FIRST day of the month N months back and end today; a year is Jan 1 – Dec 31; `allTime` starts 2017-01-01, the earliest reliable registration data. Also selects the production period for volume/units."}]}},{"description":"Window start, inclusive (YYYY-MM-DD). Overrides `period`.","in":"query","name":"from","required":false,"schema":{"description":"Window start, inclusive (YYYY-MM-DD). Overrides `period`.","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},{"description":"Window end, inclusive (YYYY-MM-DD). Overrides `period`.","in":"query","name":"to","required":false,"schema":{"description":"Window end, inclusive (YYYY-MM-DD). Overrides `period`.","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},{"description":"Drill into one hire cohort (`YYYY-MM`): `data` then lists its early departures and recent starts.","in":"query","name":"month","required":false,"schema":{"description":"Drill into one hire cohort (`YYYY-MM`): `data` then lists its early departures and recent starts.","pattern":"^\\d{4}-\\d{2}$","type":"string"}},{"description":"An exit within this many days of the start is EARLY (default 90). Also the 'recent start' and incomplete-cohort horizon.","in":"query","name":"withinDays","required":false,"schema":{"description":"An exit within this many days of the start is EARLY (default 90). Also the 'recent start' and incomplete-cohort horizon.","maximum":730,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyEarlyExitsResponse"}}},"description":"Early-exit cohorts"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Hire cohorts and how many left within N days","tags":["Companies"]}},"/v1/companies/{nmlsId}/employee-stats":{"get":{"operationId":"companyEmployeeStats","parameters":[{"description":"Company NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Company NMLS ID","type":"string"}},{"description":"Preset window when `from`/`to` are not given (default `last12Months`). Rolling periods start on the FIRST day of the month N months back and end today; a year is Jan 1 – Dec 31; `allTime` starts 2017-01-01, the earliest reliable registration data. Also selects the production period for volume/units.","in":"query","name":"period","required":false,"schema":{"allOf":[{"$ref":"#/components/schemas/Period"},{"description":"Preset window when `from`/`to` are not given (default `last12Months`). Rolling periods start on the FIRST day of the month N months back and end today; a year is Jan 1 – Dec 31; `allTime` starts 2017-01-01, the earliest reliable registration data. Also selects the production period for volume/units."}]}},{"description":"Window start, inclusive (YYYY-MM-DD). Overrides `period`.","in":"query","name":"from","required":false,"schema":{"description":"Window start, inclusive (YYYY-MM-DD). Overrides `period`.","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},{"description":"Window end, inclusive (YYYY-MM-DD). Overrides `period`.","in":"query","name":"to","required":false,"schema":{"description":"Window end, inclusive (YYYY-MM-DD). Overrides `period`.","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyEmployeeStatsResponse"}}},"description":"Roster and mover statistics"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Roster size by production tier, plus hire and exit production","tags":["Companies"]}},"/v1/companies/{nmlsId}/employment":{"get":{"description":"Loan officers employed by (sponsored or registered with) this company, one row per person, from NMLS employment records. `status` picks the current roster, the window's hires, the window's complete departures, or everyone; `asOf` gives the roster on a past date. Rows carry tenure dates, branch-manager status, branch location, current employer, contact details and period production.","operationId":"companyEmployment","parameters":[{"description":"Company NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Company NMLS ID","type":"string"}},{"description":"`active` (default): currently employed — any open employment record. `entered`: hired inside the window. `exited`: completely departed inside the window. `all`: everyone with a record relevant to the window. A hire is a loan officer whose earliest employment record at this company still relevant to the window (open, or ended on/after the window start) starts inside it — so someone who fully left and came back inside the window counts, and an existing employee who adds a state license does not. An exit is a loan officer whose latest record at this company ended inside the window and who holds NO open record there — a complete departure.","in":"query","name":"status","required":false,"schema":{"description":"`active` (default): currently employed — any open employment record. `entered`: hired inside the window. `exited`: completely departed inside the window. `all`: everyone with a record relevant to the window. A hire is a loan officer whose earliest employment record at this company still relevant to the window (open, or ended on/after the window start) starts inside it — so someone who fully left and came back inside the window counts, and an existing employee who adds a state license does not. An exit is a loan officer whose latest record at this company ended inside the window and who holds NO open record there — a complete departure.","enum":["active","entered","exited","all"],"type":"string"}},{"description":"Preset window when `from`/`to` are not given (default `last12Months`). Rolling periods start on the FIRST day of the month N months back and end today; a year is Jan 1 – Dec 31; `allTime` starts 2017-01-01, the earliest reliable registration data. Also selects the production period for volume/units.","in":"query","name":"period","required":false,"schema":{"allOf":[{"$ref":"#/components/schemas/Period"},{"description":"Preset window when `from`/`to` are not given (default `last12Months`). Rolling periods start on the FIRST day of the month N months back and end today; a year is Jan 1 – Dec 31; `allTime` starts 2017-01-01, the earliest reliable registration data. Also selects the production period for volume/units."}]}},{"description":"Window start, inclusive (YYYY-MM-DD). Overrides `period`.","in":"query","name":"from","required":false,"schema":{"description":"Window start, inclusive (YYYY-MM-DD). Overrides `period`.","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},{"description":"Window end, inclusive (YYYY-MM-DD). Overrides `period`.","in":"query","name":"to","required":false,"schema":{"description":"Window end, inclusive (YYYY-MM-DD). Overrides `period`.","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},{"description":"Roster AS OF this date (YYYY-MM-DD): loan officers with a record covering it. Replaces the window; `status` must be `active` or omitted.","in":"query","name":"asOf","required":false,"schema":{"description":"Roster AS OF this date (YYYY-MM-DD): loan officers with a record covering it. Replaces the window; `status` must be `active` or omitted.","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},{"description":"Loan officer name (all words, fuzzy) or an exact NMLS ID when numeric.","in":"query","name":"search","required":false,"schema":{"description":"Loan officer name (all words, fuzzy) or an exact NMLS ID when numeric.","maxLength":200,"type":"string"}},{"description":"1-based page (default 1).","in":"query","name":"page","required":false,"schema":{"description":"1-based page (default 1).","minimum":1,"type":"integer"}},{"description":"Rows per page (default 25, max 500).","in":"query","name":"limit","required":false,"schema":{"description":"Rows per page (default 25, max 500).","maximum":500,"minimum":1,"type":"integer"}},{"description":"Sort key (default `name`). `volume`/`units` rank by the loan officer's production in `period` across all employers; `companyVolume`/`companyUnits` by their production AT this company inside the window.","in":"query","name":"sort","required":false,"schema":{"description":"Sort key (default `name`). `volume`/`units` rank by the loan officer's production in `period` across all employers; `companyVolume`/`companyUnits` by their production AT this company inside the window.","enum":["name","nmlsId","startDate","exitDate","volume","units","companyVolume","companyUnits"],"type":"string"}},{"description":"Default `asc` for text/date keys, `desc` for the production keys.","in":"query","name":"order","required":false,"schema":{"description":"Default `asc` for text/date keys, `desc` for the production keys.","enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyEmploymentResponse"}}},"description":"Employment rows"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"List a company's loan officers: current roster, hires, or exits","tags":["Companies"]}},"/v1/companies/{nmlsId}/headcount":{"get":{"operationId":"companyHeadcount","parameters":[{"description":"Company NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Company NMLS ID","type":"string"}},{"description":"Preset window when `from`/`to` are not given (default `last12Months`). Rolling periods start on the FIRST day of the month N months back and end today; a year is Jan 1 – Dec 31; `allTime` starts 2017-01-01, the earliest reliable registration data. Also selects the production period for volume/units.","in":"query","name":"period","required":false,"schema":{"allOf":[{"$ref":"#/components/schemas/Period"},{"description":"Preset window when `from`/`to` are not given (default `last12Months`). Rolling periods start on the FIRST day of the month N months back and end today; a year is Jan 1 – Dec 31; `allTime` starts 2017-01-01, the earliest reliable registration data. Also selects the production period for volume/units."}]}},{"description":"Window start, inclusive (YYYY-MM-DD). Overrides `period`.","in":"query","name":"from","required":false,"schema":{"description":"Window start, inclusive (YYYY-MM-DD). Overrides `period`.","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},{"description":"Window end, inclusive (YYYY-MM-DD). Overrides `period`.","in":"query","name":"to","required":false,"schema":{"description":"Window end, inclusive (YYYY-MM-DD). Overrides `period`.","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},{"description":"Series granularity. Only `month` is supported.","in":"query","name":"interval","required":false,"schema":{"description":"Series granularity. Only `month` is supported.","enum":["month"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyHeadcountResponse"}}},"description":"Headcount series and summary"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Monthly loan officer headcount, hires and exits for a company","tags":["Companies"]}},"/v1/companies/{nmlsId}/markets":{"post":{"description":"The company's market footprint for a period: a units-weighted summary, the ZIP-level markets, and the city / county / state rollups, computed from the company's recorded transactions. Optionally narrow to a set of ZIP codes and/or a custom date window. Shares are percentages on a 0–100 scale. The summary also carries a Community Lending mix — what kind of neighborhood the book lands in, as U.S. Census tract-level aggregates describing whole neighborhoods, never individual or applicant attributes. Unfiltered, it is the company's own whole-period mix; any ZIP, date or transaction filter recomputes it over the markets in scope, and `summary.communityLending.basis` says which you got.","operationId":"companyMarkets","parameters":[{"description":"Company NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Company NMLS ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyMarketsRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyMarketsResponse"}}},"description":"Blended market footprint"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error. Includes unresolvable location filters: a `city`/`county`/`state`/`zip` value that does not match a recognized location returns 400 rather than an empty result set. Resolve the name with `instantSearch` (use an id from its `results.locations[]`) or `suggestLocations` (use the `id` of a `source: \"dictionary\"` result), then pass that id back as the filter value."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Where a company lends — blended market footprint","tags":["Companies"]}},"/v1/companies/{nmlsId}/mover-production":{"get":{"description":"The window's hires and complete departures, each side's combined production across ALL employers recorded inside the production window (default: the same window). Pass a prior window's movers with the current production window to see how past hires and exits perform now.","operationId":"companyMoverProduction","parameters":[{"description":"Company NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Company NMLS ID","type":"string"}},{"description":"Preset window when `from`/`to` are not given (default `last12Months`). Rolling periods start on the FIRST day of the month N months back and end today; a year is Jan 1 – Dec 31; `allTime` starts 2017-01-01, the earliest reliable registration data. Also selects the production period for volume/units.","in":"query","name":"period","required":false,"schema":{"allOf":[{"$ref":"#/components/schemas/Period"},{"description":"Preset window when `from`/`to` are not given (default `last12Months`). Rolling periods start on the FIRST day of the month N months back and end today; a year is Jan 1 – Dec 31; `allTime` starts 2017-01-01, the earliest reliable registration data. Also selects the production period for volume/units."}]}},{"description":"Window start, inclusive (YYYY-MM-DD). Overrides `period`.","in":"query","name":"from","required":false,"schema":{"description":"Window start, inclusive (YYYY-MM-DD). Overrides `period`.","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},{"description":"Window end, inclusive (YYYY-MM-DD). Overrides `period`.","in":"query","name":"to","required":false,"schema":{"description":"Window end, inclusive (YYYY-MM-DD). Overrides `period`.","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},{"description":"Production window start, inclusive (YYYY-MM-DD). Defaults to the mover window's start.","in":"query","name":"productionFrom","required":false,"schema":{"description":"Production window start, inclusive (YYYY-MM-DD). Defaults to the mover window's start.","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},{"description":"Production window end, inclusive (YYYY-MM-DD). Defaults to the mover window's end.","in":"query","name":"productionTo","required":false,"schema":{"description":"Production window end, inclusive (YYYY-MM-DD). Defaults to the mover window's end.","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyMoverProductionResponse"}}},"description":"Hires' and exits' production"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Combined production of a company's hires and exits","tags":["Companies"]}},"/v1/companies/{nmlsId}/retention":{"get":{"description":"How well a company keeps its borrowers when they refinance: kept (refinanced again by ANY LO at the company) vs lost to other companies, with the capturing companies and LOs, timing, the trend, a verdict, and per-LO retention for the company's own loan officers. Precomputed weekly — `computedAt` says when. 404 means not computed (no loans since 2017, or not reached yet), never zero retention.","operationId":"companyRetention","parameters":[{"description":"Company NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Company NMLS ID","type":"string"}},{"description":"`last12Months` (the trailing 12 months to the computation date, with the 12 months before as `previous`) or `allTime` (2017-01-01 on). Default `last12Months`.","in":"query","name":"window","required":false,"schema":{"default":"last12Months","description":"`last12Months` (the trailing 12 months to the computation date, with the 12 months before as `previous`) or `allTime` (2017-01-01 on). Default `last12Months`.","enum":["last12Months","allTime"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyRetentionSnapshot"}}},"description":"The stored snapshot"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Company borrower retention (weekly snapshot)","tags":["Companies"]}},"/v1/companies/{nmlsId}/retention/active-listings":{"get":{"description":"The company's retained borrowers (their latest loan is still the company's) whose home is listed for sale right now, each with the company loan officer who wrote that loan — only LOs the company employed on the loan, not brokers' LOs on loans it only funded. Newest listing first; filter to one LO with `originator`. \"Listed now\" is the LO Borrower Retention tab's rule: an active MLS listing event in the last 90 days, list price at least $20k, not under contract. Checked weekly with the retention snapshot — `computedAt` says when. 404 means not computed for this company yet.","operationId":"companyRetentionActiveListings","parameters":[{"description":"Company NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Company NMLS ID","type":"string"}},{"description":"`company` (default): loans written at the company. `team`: the company's CURRENT loan officers' borrowers — loans they wrote at the company or at a previous employer (`writtenAt`), e.g. a recruit's book.","in":"query","name":"view","required":false,"schema":{"description":"`company` (default): loans written at the company. `team`: the company's CURRENT loan officers' borrowers — loans they wrote at the company or at a previous employer (`writtenAt`), e.g. a recruit's book.","enum":["company","team"],"type":"string"}},{"description":"Only rows whose loan was written by this LO (NMLS id) — e.g. one of `activeListings.topOriginators`.","in":"query","name":"originator","required":false,"schema":{"description":"Only rows whose loan was written by this LO (NMLS id) — e.g. one of `activeListings.topOriginators`.","pattern":"^\\d+$","type":"string"}},{"description":"Page size (1-100, default 25).","in":"query","name":"size","required":false,"schema":{"description":"Page size (1-100, default 25).","example":25,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Opaque cursor from the previous page's `cursor`.","in":"query","name":"cursor","required":false,"schema":{"description":"Opaque cursor from the previous page's `cursor`.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyActiveListingsResponse"}}},"description":"One page of listing rows"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Retained borrowers listed for sale now (weekly)","tags":["Companies"]}},"/v1/companies/{nmlsId}/retention/captured":{"get":{"description":"The loss rows (the LO report's `churnedLoans` shape) one capturing loan officer took from the company's borrowers in a stored snapshot's `period`, newest first, paged. Read live from that LO's parcels, so `total` matches the snapshot's count for the LO (give or take loans recorded since `computedAt`). 404 when the snapshot has not been computed.","operationId":"companyRetentionCaptured","parameters":[{"description":"Company NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Company NMLS ID","type":"string"}},{"description":"The snapshot window whose `period` to use: `last12Months` (default) or `allTime`.","in":"query","name":"window","required":false,"schema":{"default":"last12Months","description":"The snapshot window whose `period` to use: `last12Months` (default) or `allTime`.","enum":["last12Months","allTime"],"type":"string"}},{"description":"The capturing loan officer (a snapshot `capturingOriginators[].nmlsId`).","in":"query","name":"capturingLoNmlsId","required":true,"schema":{"description":"The capturing loan officer (a snapshot `capturingOriginators[].nmlsId`).","pattern":"^\\d+$","type":"string"}},{"description":"Only refinances or only second liens. Default both.","in":"query","name":"kind","required":false,"schema":{"description":"Only refinances or only second liens. Default both.","enum":["refi","second"],"type":"string"}},{"description":"Rows per page (default 100, at most 500).","in":"query","name":"limit","required":false,"schema":{"description":"Rows per page (default 100, at most 500).","maximum":500,"minimum":1,"type":"integer"}},{"description":"Rows to skip (newest first).","in":"query","name":"offset","required":false,"schema":{"description":"Rows to skip (newest first).","minimum":0,"nullable":true,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OriginatorRetentionCaptured"}}},"description":"The capturer's loss rows"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Loans one LO captured from this company","tags":["Companies"]}},"/v1/companies/{nmlsId}/retention/likely-to-sell":{"get":{"description":"The company's retained borrowers (their latest loan is still the company's) whose home looks likely to be listed for sale soon, each with the company loan officer who wrote that loan — only LOs the company employed on the loan, not brokers' LOs on loans it only funded. Each row carries a likely-to-list score from 0 to 100: a priority / likelihood ranking, not a probability. Highest score first; filter to one LO with `originator`. \"Likely to list\" is the LO Borrower Retention tab's rule: a score of 90 or more, and not listed for sale or under contract now (those are in `active-listings`). Checked weekly with the retention snapshot — `computedAt` says when. 404 means not computed for this company yet.","operationId":"companyRetentionLikelyToSell","parameters":[{"description":"Company NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Company NMLS ID","type":"string"}},{"description":"`company` (default): loans written at the company. `team`: the company's CURRENT loan officers' borrowers — loans they wrote at the company or at a previous employer (`writtenAt`), e.g. a recruit's book.","in":"query","name":"view","required":false,"schema":{"description":"`company` (default): loans written at the company. `team`: the company's CURRENT loan officers' borrowers — loans they wrote at the company or at a previous employer (`writtenAt`), e.g. a recruit's book.","enum":["company","team"],"type":"string"}},{"description":"Only rows whose loan was written by this LO (NMLS id) — e.g. one of `likelyToSell.topOriginators`.","in":"query","name":"originator","required":false,"schema":{"description":"Only rows whose loan was written by this LO (NMLS id) — e.g. one of `likelyToSell.topOriginators`.","pattern":"^\\d+$","type":"string"}},{"description":"Page size (1-100, default 25).","in":"query","name":"size","required":false,"schema":{"description":"Page size (1-100, default 25).","example":25,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Opaque cursor from the previous page's `cursor`.","in":"query","name":"cursor","required":false,"schema":{"description":"Opaque cursor from the previous page's `cursor`.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyLikelyToSellResponse"}}},"description":"One page of likely-to-list rows"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Retained borrowers likely to list their home (weekly)","tags":["Companies"]}},"/v1/companies/{nmlsId}/sponsored-individuals":{"post":{"operationId":"companySponsoredIndividuals","parameters":[{"description":"Company NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Company NMLS ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanySponsoredIndividualsRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanySponsoredIndividualsResponse"}}},"description":"Paginated list of sponsored individuals"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Loan originators sponsored by this company","tags":["Companies"]}},"/v1/companies/{nmlsId}/sponsorship-movement":{"post":{"operationId":"companySponsorshipMovement","parameters":[{"description":"Company NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Company NMLS ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanySponsorshipMovementRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanySponsorshipMovementResponse"}}},"description":"Movement analysis"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Analyze LO arrivals and departures for a company","tags":["Companies"]}},"/v1/companies/{nmlsId}/talent-flow":{"get":{"operationId":"companyTalentFlow","parameters":[{"description":"Company NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Company NMLS ID","type":"string"}},{"description":"Preset window when `from`/`to` are not given (default `last12Months`). Rolling periods start on the FIRST day of the month N months back and end today; a year is Jan 1 – Dec 31; `allTime` starts 2017-01-01, the earliest reliable registration data. Also selects the production period for volume/units.","in":"query","name":"period","required":false,"schema":{"allOf":[{"$ref":"#/components/schemas/Period"},{"description":"Preset window when `from`/`to` are not given (default `last12Months`). Rolling periods start on the FIRST day of the month N months back and end today; a year is Jan 1 – Dec 31; `allTime` starts 2017-01-01, the earliest reliable registration data. Also selects the production period for volume/units."}]}},{"description":"Window start, inclusive (YYYY-MM-DD). Overrides `period`.","in":"query","name":"from","required":false,"schema":{"description":"Window start, inclusive (YYYY-MM-DD). Overrides `period`.","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},{"description":"Window end, inclusive (YYYY-MM-DD). Overrides `period`.","in":"query","name":"to","required":false,"schema":{"description":"Window end, inclusive (YYYY-MM-DD). Overrides `period`.","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},{"description":"Counterparty companies per side (default 50, max 1000).","in":"query","name":"limit","required":false,"schema":{"description":"Counterparty companies per side (default 50, max 1000).","maximum":1000,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyTalentFlowResponse"}}},"description":"Hires by prior employer, exits by next employer"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Where a company's hires came from and where its exits went","tags":["Companies"]}},"/v1/crm/activity":{"delete":{"operationId":"deleteCrmNote","requestBody":{"content":{"application/json":{"schema":{"properties":{"id":{"minLength":1,"type":"string"}},"required":["id"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmDeleteNoteResult"}}},"description":"Whether the note was soft-deleted."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Soft-delete a note","tags":["CRM"]},"get":{"operationId":"listCrmActivity","parameters":[{"description":"The CRM record id whose timeline to read.","in":"query","name":"entityId","required":true,"schema":{"description":"The CRM record id whose timeline to read.","minLength":1,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmActivityList"}}},"description":"The record's timeline entries, newest first."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"List a record's activity timeline (newest first)","tags":["CRM"]},"patch":{"operationId":"editCrmNote","requestBody":{"content":{"application/json":{"schema":{"properties":{"body":{"type":"string"},"bodyHtml":{"nullable":true,"type":"string"},"grantRecordAccessUserIds":{"items":{"type":"string"},"type":"array"},"id":{"minLength":1,"type":"string"},"listId":{"nullable":true,"type":"string"},"recordName":{"type":"string"},"recordUrl":{"deprecated":true,"description":"Ignored — the record link is server-built.","type":"string"}},"required":["id","body"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmEditNoteResult"}}},"description":"Whether the note was updated, plus its record + prior body."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Edit a note's body","tags":["CRM"]},"post":{"operationId":"addCrmNote","requestBody":{"content":{"application/json":{"schema":{"properties":{"body":{"type":"string"},"bodyHtml":{"nullable":true,"type":"string"},"callId":{"nullable":true,"type":"string"},"entityId":{"minLength":1,"type":"string"},"grantRecordAccessUserIds":{"items":{"type":"string"},"type":"array"},"listId":{"nullable":true,"type":"string"},"parentId":{"nullable":true,"type":"string"},"recordName":{"type":"string"},"recordUrl":{"deprecated":true,"description":"Ignored — the record link is server-built.","type":"string"}},"required":["entityId","body"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmAddNoteResult"}}},"description":"The new note's id + its resolved thread root (null if top-level)."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Append a note to a record's timeline","tags":["CRM"]}},"/v1/crm/activity/log":{"patch":{"operationId":"editCrmLoggedActivity","requestBody":{"content":{"application/json":{"schema":{"properties":{"activityType":{"$ref":"#/components/schemas/CrmLoggedActivityType"},"body":{"type":"string"},"bodyHtml":{"nullable":true,"type":"string"},"direction":{"description":"call + email only.","enum":["inbound","outbound",null],"nullable":true,"type":"string"},"durationMinutes":{"description":"call + meeting only, in minutes.","maximum":1440,"minimum":0,"nullable":true,"type":"integer"},"grantRecordAccessUserIds":{"items":{"type":"string"},"type":"array"},"id":{"minLength":1,"type":"string"},"listId":{"nullable":true,"type":"string"},"occurredAt":{"description":"Epoch ms the activity actually happened. Must be ≤ now + 5 minutes.","exclusiveMinimum":true,"minimum":0,"type":"integer"},"outcome":{"description":"call: connected | voicemail | no_answer | busy. meeting: held | no_show. Not allowed for email/task.","nullable":true,"type":"string"},"recordName":{"type":"string"},"title":{"description":"Meeting title / email subject / task title. Not allowed for a call; required for a task.","maxLength":200,"nullable":true,"type":"string"}},"required":["id","activityType","occurredAt","body"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmEditLoggedActivityResult"}}},"description":"Whether the logged entry was updated."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No live logged entry with that id — either it doesn't exist, was deleted, or isn't a logged entry (this route can't edit a plain note)."},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Edit a logged activity entry","tags":["CRM"]},"post":{"operationId":"logCrmActivity","requestBody":{"content":{"application/json":{"schema":{"properties":{"activityType":{"$ref":"#/components/schemas/CrmLoggedActivityType"},"body":{"type":"string"},"bodyHtml":{"nullable":true,"type":"string"},"direction":{"description":"call + email only.","enum":["inbound","outbound",null],"nullable":true,"type":"string"},"durationMinutes":{"description":"call + meeting only, in minutes.","maximum":1440,"minimum":0,"nullable":true,"type":"integer"},"entityId":{"minLength":1,"type":"string"},"grantRecordAccessUserIds":{"items":{"type":"string"},"type":"array"},"listId":{"nullable":true,"type":"string"},"occurredAt":{"description":"Epoch ms the activity actually happened. Must be ≤ now + 5 minutes.","exclusiveMinimum":true,"minimum":0,"type":"integer"},"outcome":{"description":"call: connected | voicemail | no_answer | busy. meeting: held | no_show. Not allowed for email/task.","nullable":true,"type":"string"},"recordName":{"type":"string"},"title":{"description":"Meeting title / email subject / task title. Not allowed for a call; required for a task.","maxLength":200,"nullable":true,"type":"string"}},"required":["entityId","activityType","occurredAt","body"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmLogActivityResult"}}},"description":"The new logged entry's id."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Log a Call/Meeting/Email/Task that happened outside Model Match","tags":["CRM"]}},"/v1/crm/activity/referenced":{"get":{"operationId":"listCrmReferencedActivity","parameters":[{"description":"The CRM record whose referenced (trickled-up) activity to read.","in":"query","name":"entityId","required":true,"schema":{"description":"The CRM record whose referenced (trickled-up) activity to read.","minLength":1,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmReferencedActivityList"}}},"description":"Notes authored on other records that reference this record, newest first."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"List notes from other records that reference this one (trickled up)","tags":["CRM"]}},"/v1/crm/caller-ids":{"delete":{"operationId":"deleteCrmCallerId","parameters":[{"in":"query","name":"id","required":true,"schema":{"minLength":1,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmDeleteCallerIdResult"}}},"description":"Whether the caller ID was removed."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Remove a caller ID from the registry","tags":["CRM"]},"get":{"operationId":"listCrmCallerIds","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmCallerIdList"}}},"description":"The user's caller IDs + whether Twilio is configured."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"List the current user's caller IDs","tags":["CRM"]},"patch":{"operationId":"setDefaultCrmCallerId","requestBody":{"content":{"application/json":{"schema":{"properties":{"id":{"maxLength":128,"minLength":1,"type":"string"}},"required":["id"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmSetDefaultCallerIdResult"}}},"description":"Whether the default was set."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Make a verified caller ID the default","tags":["CRM"]},"post":{"operationId":"actionCrmCallerId","requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"properties":{"action":{"enum":["start"],"type":"string"},"friendlyName":{"maxLength":64,"type":"string"},"phoneNumber":{"maxLength":32,"minLength":7,"type":"string"}},"required":["action","phoneNumber"],"type":"object"},{"properties":{"action":{"enum":["check"],"type":"string"},"id":{"maxLength":128,"minLength":1,"type":"string"}},"required":["action","id"],"type":"object"}]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmCallerIdActionResult"}}},"description":"The caller-ID row (+ the verification code on start)."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Start caller-ID verification or re-check its outcome","tags":["CRM"]}},"/v1/crm/calls":{"get":{"operationId":"getCrmCall","parameters":[{"in":"query","name":"id","required":true,"schema":{"minLength":1,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmPollCallResult"}}},"description":"The call row."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Poll one call's status (syncs + finalizes on terminal)","tags":["CRM"]},"patch":{"operationId":"hangupCrmCall","requestBody":{"content":{"application/json":{"schema":{"properties":{"id":{"maxLength":128,"minLength":1,"type":"string"}},"required":["id"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmHangupCallResult"}}},"description":"The call row."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Hang up an in-flight call","tags":["CRM"]},"post":{"operationId":"placeCrmCall","requestBody":{"content":{"application/json":{"schema":{"properties":{"callerIdId":{"maxLength":128,"minLength":1,"type":"string"},"entityId":{"maxLength":128,"minLength":1,"type":"string"},"record":{"type":"boolean"},"toNumber":{"maxLength":32,"minLength":7,"type":"string"}},"required":["entityId","toNumber","callerIdId"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmPlaceCallResult"}}},"description":"The call row."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Place an outbound bridge call","tags":["CRM"]}},"/v1/crm/calls/active":{"get":{"operationId":"getCrmActiveCall","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmActiveCallResult"}}},"description":"The live call to resume, or null."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"The current user's still-live call (for reload resume)","tags":["CRM"]}},"/v1/crm/calls/analysis":{"post":{"operationId":"setCrmCallAnalysis","requestBody":{"content":{"application/json":{"schema":{"properties":{"actions":{"items":{"oneOf":[{"properties":{"dueInDays":{"maximum":365,"minimum":0,"type":"integer"},"title":{"maxLength":300,"minLength":1,"type":"string"},"type":{"enum":["task"],"type":"string"}},"required":["type","title","dueInDays"],"type":"object"},{"properties":{"durationMinutes":{"maximum":480,"minimum":5,"type":"integer"},"startInDays":{"maximum":365,"minimum":0,"type":"integer"},"title":{"maxLength":300,"minLength":1,"type":"string"},"type":{"enum":["meeting"],"type":"string"}},"required":["type","title","startInDays"],"type":"object"}]},"maxItems":4,"type":"array"},"id":{"maxLength":128,"minLength":1,"type":"string"},"label":{"enum":["interested","ready_to_move","callback_requested","follow_up_needed","objection_raised","not_interested","not_a_fit",null],"nullable":true,"type":"string"},"sentiment":{"enum":["positive","neutral","negative"],"type":"string"},"summary":{"maxLength":4000,"minLength":1,"type":"string"}},"required":["id","label","summary","sentiment","actions"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmCallAnalysisResult"}}},"description":"The call row with the analysis persisted."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Persist an AI analysis of a recorded call","tags":["CRM"]}},"/v1/crm/calls/analyze":{"post":{"operationId":"analyzeCrmCall","requestBody":{"content":{"application/json":{"schema":{"properties":{"contactName":{"maxLength":200,"type":"string"},"id":{"maxLength":128,"minLength":1,"type":"string"}},"required":["id"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmCallAnalyzeResult"}}},"description":"The call row with the analysis persisted."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The call's transcript isn't completed yet."},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The model didn't return a usable analysis."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Analyze a recorded call's transcript with AI and persist it","tags":["CRM"]}},"/v1/crm/calls/transcript":{"get":{"operationId":"getCrmCallTranscript","parameters":[{"in":"query","name":"id","required":true,"schema":{"minLength":1,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmCallTranscriptResult"}}},"description":"The call row with the transcript pipeline advanced."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Poll a recorded call's transcript (advances the pipeline)","tags":["CRM"]},"post":{"operationId":"transcribeCrmCall","requestBody":{"content":{"application/json":{"schema":{"properties":{"id":{"maxLength":128,"minLength":1,"type":"string"}},"required":["id"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmCallTranscribeResult"}}},"description":"The call row with transcription started."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The call wasn't skipped as voicemail, or its recording isn't ready yet."},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Transcribe a recorded call that was skipped as voicemail","tags":["CRM"]}},"/v1/crm/contacts":{"delete":{"operationId":"removeCrmContactMethod","requestBody":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"string"}},"required":["id"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmRemoveContactResult"}}},"description":"Whether a contact was removed."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Remove a user-added contact method","tags":["CRM"]},"get":{"operationId":"listCrmContactMethods","parameters":[{"description":"Comma-separated CRM record ids (`lo:123456`), at most 200.","in":"query","name":"entityIds","required":true,"schema":{"description":"Comma-separated CRM record ids (`lo:123456`), at most 200.","minLength":1,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmContactMethodsByRecord"}}},"description":"Contacts keyed by entity id, oldest first (the profile's order; `isPrimary` marks the primary per kind). Records with no contacts, or that the caller can't see, are absent."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Get contact methods for many records","tags":["CRM"]},"patch":{"operationId":"updateCrmContactMethod","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmPatchContactBody"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmPatchContactResult"}}},"description":"The update flag, or the id of the suppression tombstone."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Update or suppress a contact method","tags":["CRM"]},"post":{"operationId":"addCrmContactMethod","requestBody":{"content":{"application/json":{"schema":{"properties":{"entityId":{"type":"string"},"isPrimary":{"type":"boolean"},"kind":{"$ref":"#/components/schemas/CrmContactKind"},"label":{"nullable":true,"type":"string"},"mmKey":{"nullable":true,"type":"string"},"value":{"nullable":true}},"required":["entityId","kind"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmAddContactResult"}}},"description":"The id of the newly added contact method."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Add a contact method to a record","tags":["CRM"]}},"/v1/crm/custom-values":{"get":{"operationId":"getCrmCustomValues","parameters":[{"in":"query","name":"entityId","required":false,"schema":{"type":"string"}},{"in":"query","name":"entityIds","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmCustomValueResult"}}},"description":"Single: values keyed by field id. Bulk: keyed by entity id then field id."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Get custom-field values for one or many records","tags":["CRM"]},"patch":{"operationId":"setCrmCustomValue","requestBody":{"content":{"application/json":{"schema":{"properties":{"entityId":{"type":"string"},"fieldId":{"type":"string"},"value":{"$ref":"#/components/schemas/CrmCustomValue"}},"required":["entityId","fieldId","value"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmSetCustomValueResult"}}},"description":"Acknowledgement that the value was written."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Set a record's value for one custom field","tags":["CRM"]}},"/v1/crm/email/send":{"post":{"operationId":"sendCrmEmail","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmEmailSendBody"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmEmailSendResult"}}},"description":"Sent, or needs-connect when no send connector is available."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmEmailUpstreamError"}}},"description":"Upstream provider error."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Send an outbound email via the user's connected Gmail or Outlook","tags":["CRM"]}},"/v1/crm/enrich/apply":{"post":{"operationId":"applyCrmEnrichment","requestBody":{"content":{"application/json":{"schema":{"properties":{"contacts":{"items":{"$ref":"#/components/schemas/CrmEnrichmentContact"},"type":"array"},"display":{"$ref":"#/components/schemas/CrmDisplay"},"entityId":{"type":"string"},"entityType":{"$ref":"#/components/schemas/CrmEntityType"},"link":{"allOf":[{"$ref":"#/components/schemas/CrmLink"},{"description":"Set to accept the match; omit to leave unlinked."}]},"overrideSources":{"$ref":"#/components/schemas/CrmEnrichmentOverrideSources"},"overrides":{"$ref":"#/components/schemas/CrmEnrichmentOverrides"}},"required":["entityId","entityType"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmEnrichmentResult"}}},"description":"Whether a match was linked + the count of seeded contacts."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Apply a match to an imported record (link + seed contacts)","tags":["CRM"]}},"/v1/crm/fields":{"delete":{"operationId":"deleteCrmObjectField","requestBody":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"string"}},"required":["id"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmDeleteObjectFieldResult"}}},"description":"Whether a field was deleted."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Delete an object-scoped custom field (values cascade)","tags":["CRM"]},"get":{"operationId":"listCrmCustomFields","parameters":[{"in":"query","name":"objectType","required":true,"schema":{"$ref":"#/components/schemas/CrmObjectType"}},{"description":"Also include this list's list-scoped fields.","in":"query","name":"listId","required":false,"schema":{"description":"Also include this list's list-scoped fields.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmCustomFieldList"}}},"description":"Object-scoped fields plus any requested list-scoped fields."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"List custom fields applicable to a view","tags":["CRM"]},"patch":{"operationId":"updateCrmObjectField","requestBody":{"content":{"application/json":{"schema":{"properties":{"config":{"additionalProperties":{"nullable":true},"nullable":true,"type":"object"},"id":{"type":"string"},"label":{"type":"string"},"options":{"items":{"$ref":"#/components/schemas/CrmCustomFieldOption"},"nullable":true,"type":"array"},"sortOrder":{"type":"number"}},"required":["id"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmUpdateObjectFieldResult"}}},"description":"Whether a field was updated."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Update an object-scoped custom field (label / options / config / order)","tags":["CRM"]},"post":{"operationId":"createCrmObjectField","requestBody":{"content":{"application/json":{"schema":{"properties":{"config":{"additionalProperties":{"nullable":true},"nullable":true,"type":"object"},"key":{"type":"string"},"label":{"type":"string"},"objectType":{"$ref":"#/components/schemas/CrmObjectType"},"options":{"items":{"$ref":"#/components/schemas/CrmCustomFieldOption"},"nullable":true,"type":"array"},"sortOrder":{"type":"number"},"type":{"$ref":"#/components/schemas/CrmCustomFieldType"}},"required":["objectType","label","type"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmCreateObjectFieldResult"}}},"description":"The created field."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"}}},"description":"A field with that key already exists for the object type."},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Create an object-scoped (workspace-wide) custom field","tags":["CRM"]}},"/v1/crm/import":{"post":{"operationId":"importCrmRecords","requestBody":{"content":{"application/json":{"schema":{"properties":{"createMissingLists":{"description":"Create lists rows name that the list owner doesn't have yet, owned by ownerUserId (else the caller).","type":"boolean"},"dryRun":{"description":"Plan only: return what the import WOULD do (per-row created / updated / failed, lists it would find or create) without writing anything. Always synchronous.","type":"boolean"},"entityType":{"allOf":[{"$ref":"#/components/schemas/CrmEntityType"},{"description":"Entity type for created rows (default per object)."}]},"externalSource":{"description":"Source system the rows' externalIds belong to (e.g. \"legacy-mm\"). Defaults to \"import\".","pattern":"^[a-z0-9][a-z0-9-]{0,63}$","type":"string"},"fileName":{"description":"Source file name, shown in import history.","maxLength":255,"type":"string"},"fileRows":{"description":"Data rows in the source file (the client's count, including rows it rejected before sending) — the check report's file rows.","minimum":0,"type":"integer"},"importBatchKey":{"description":"This batch's key within its run (e.g. \"2/5\"). A batch resent under a key the run already recorded is refused (409).","maxLength":40,"minLength":1,"type":"string"},"importRunId":{"description":"Import history run id, minted by the client per run and sent with every batch of it — the batches become one history entry.","maxLength":100,"minLength":1,"type":"string"},"listId":{"nullable":true,"type":"string"},"listStatuses":{"additionalProperties":{"items":{"maxLength":120,"minLength":1,"type":"string"},"maxItems":50,"type":"array"},"description":"Status labels, in order, per list name — the status vocabulary of lists this batch creates (else the default statuses).","type":"object"},"objectType":{"$ref":"#/components/schemas/CrmObjectType"},"ownerUserId":{"description":"Default working owner (member userId) for created rows; a row's own ownerUserId overrides it. Both fall back to the caller. Assigning an owner other than the caller requires an org admin.","type":"string"},"rows":{"items":{"$ref":"#/components/schemas/CrmImportRow"},"type":"array"}},"required":["objectType","rows"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmImportResult"}}},"description":"Small batch: per-row outcomes plus the batch tally."},"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmImportAccepted"}}},"description":"Large batch accepted for asynchronous processing; returns a job handle."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"This batch's `importBatchKey` was already recorded on the run — a resend, refused."},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Auth service unavailable (owner-assignment member lookup failed)."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Bulk import records (create or update), optionally into a list","tags":["CRM"]}},"/v1/crm/import/{jobId}":{"get":{"operationId":"getCrmImportJob","parameters":[{"description":"Job id from a 202 import.","in":"path","name":"jobId","required":true,"schema":{"description":"Job id from a 202 import.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmImportJob"}}},"description":"Job status (queued / running / completed / failed / cancelled)."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Get an async import job's status (progress + per-row errors)","tags":["CRM"]}},"/v1/crm/imports":{"get":{"operationId":"listCrmImports","parameters":[{"in":"query","name":"limit","required":false,"schema":{"maximum":500,"minimum":1,"type":"integer"}},{"description":"Only runs that touched this list (list settings).","in":"query","name":"listId","required":false,"schema":{"description":"Only runs that touched this list (list settings).","minLength":1,"type":"string"}},{"description":"Page back: runs created before this (the last run's `createdAt`).","in":"query","name":"before","required":false,"schema":{"description":"Page back: runs created before this (the last run's `createdAt`).","format":"date-time","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmImportRuns"}}},"description":"Import runs."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"List import runs (own + into your lists; all for admins), newest first","tags":["CRM"]}},"/v1/crm/imports/{id}":{"get":{"operationId":"getCrmImport","parameters":[{"description":"Import run id.","in":"path","name":"id","required":true,"schema":{"description":"Import run id.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmImportRun"}}},"description":"The import run."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Get one import run","tags":["CRM"]}},"/v1/crm/imports/{id}/check":{"get":{"operationId":"checkCrmImport","parameters":[{"description":"Import run id.","in":"path","name":"id","required":true,"schema":{"description":"Import run id.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmImportCheck"}}},"description":"The run checked against the CRM now."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Check report for an import run (rows, records, lists, notes)","tags":["CRM"]}},"/v1/crm/imports/{id}/rows":{"get":{"operationId":"listCrmImportRows","parameters":[{"description":"Import run id.","in":"path","name":"id","required":true,"schema":{"description":"Import run id.","type":"string"}},{"description":"Cursor: return rows after this `seq` (from `next`).","in":"query","name":"after","required":false,"schema":{"description":"Cursor: return rows after this `seq` (from `next`).","minimum":-1,"nullable":true,"type":"integer"}},{"in":"query","name":"limit","required":false,"schema":{"maximum":5000,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmImportRows"}}},"description":"A page of the run's rows."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Every row of an import run with its outcome, in file order","tags":["CRM"]}},"/v1/crm/imports/{id}/undo":{"post":{"operationId":"undoCrmImport","parameters":[{"description":"Import run id.","in":"path","name":"id","required":true,"schema":{"description":"Import run id.","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"dryRun":{"description":"Count what would be removed; change nothing.","type":"boolean"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmImportUndo"}}},"description":"What was (or, on a dry run, would be) removed and kept."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Undo an import run (removes untouched records it created)","tags":["CRM"]}},"/v1/crm/lender-channels":{"post":{"operationId":"crmLenderChannels","requestBody":{"content":{"application/json":{"schema":{"properties":{"loNmlsIds":{"description":"Bare LO NMLS ids (deduped, capped at 500).","items":{"type":"string"},"type":"array"}},"required":["loNmlsIds"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmLenderChannels"}}},"description":"Per-LO current sponsor company + classified lender channel."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Bank / Credit Union / Broker / Retail channel per LO (by NMLS)","tags":["CRM"]}},"/v1/crm/lists":{"get":{"operationId":"listCrmLists","parameters":[{"in":"query","name":"objectType","required":false,"schema":{"$ref":"#/components/schemas/CrmObjectType"}},{"in":"query","name":"entityId","required":false,"schema":{"minLength":1,"type":"string"}},{"in":"query","name":"scope","required":false,"schema":{"enum":["visible","all"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmListArray"}}},"description":"Visible lists (own + org-wide + shared-with-me); scope=all returns every workspace list for admins."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"List the caller's lists (picker mode with ?entityId adds hasMember)","tags":["CRM"]},"post":{"operationId":"createCrmList","requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"type":"string"},"objectType":{"$ref":"#/components/schemas/CrmObjectType"}},"required":["name","objectType"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmListCreateResult"}}},"description":"The created list."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Create a list","tags":["CRM"]}},"/v1/crm/lists/memberships":{"get":{"operationId":"listCrmListMemberships","parameters":[{"in":"query","name":"objectType","required":false,"schema":{"$ref":"#/components/schemas/CrmObjectType"}},{"in":"query","name":"entityIds","required":true,"schema":{"minLength":1,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmListMembershipsResult"}}},"description":"Each requested entityId mapped to the visible lists it's on ([] = none)."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Batched list-membership lookup for many entities","tags":["CRM"]}},"/v1/crm/lists/{id}":{"delete":{"operationId":"deleteCrmList","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmListDeleteResult"}}},"description":"Deleted (soft)."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Delete a list","tags":["CRM"]},"get":{"operationId":"getCrmList","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmListWithMembers"}}},"description":"The list + members, or null when not found / not visible."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Get a list with its members","tags":["CRM"]},"patch":{"operationId":"updateCrmList","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmListUpdateBody"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmListUpdateResult"}}},"description":"The updated list (null when only a sub-op with no rename ran)."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Update a list's name, visibility, whole-org role, or default view","tags":["CRM"]}},"/v1/crm/lists/{id}/activity":{"get":{"operationId":"listCrmListActivity","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"maximum":200,"minimum":1,"type":"integer"}},{"in":"query","name":"cursor","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmListActivityPage"}}},"description":"List events, newest first."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"A list's own history (created, renamed, shared, fields, …)","tags":["CRM"]}},"/v1/crm/lists/{id}/apply-mi-updates":{"post":{"description":"Bulk form of `applyCrmMiUpdates` for records in one CRM list: for each record, persist ONLY the updates listed for it (copy them from `getCrmListMiUpdates` — `store`, `field` or `kind`, and the `incoming` value as `value`). Never send updates the user did not accept. Proposals on a record that were not accepted count as reviewed. Records not in the list are reported, not applied.","operationId":"applyCrmListMiUpdates","parameters":[{"description":"The CRM list id.","in":"path","name":"id","required":true,"schema":{"description":"The CRM list id.","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"records":{"items":{"properties":{"entityId":{"maxLength":128,"minLength":1,"type":"string"},"updates":{"items":{"oneOf":[{"properties":{"field":{"enum":["title","company","location","city","state","zip"],"type":"string"},"store":{"enum":["override"],"type":"string"},"value":{"maxLength":2000,"minLength":1,"type":"string"}},"required":["store","field","value"],"type":"object"},{"properties":{"kind":{"enum":["email","phone","linkedin","facebook","x","instagram","youtube","zillow","realtor","website"],"type":"string"},"store":{"enum":["contact"],"type":"string"},"value":{"maxLength":2000,"minLength":1,"type":"string"}},"required":["store","kind","value"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"}},"required":["entityId","updates"],"type":"object"},"maxItems":25,"minItems":1,"type":"array"}},"required":["records"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmApplyListMiUpdatesResult"}}},"description":"Per-record outcome, in request order."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Apply accepted Market-Insights updates to several list records","tags":["CRM"]}},"/v1/crm/lists/{id}/assignees":{"get":{"operationId":"listCrmListAssignees","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmListAssigneeList"}}},"description":"Members who can access the list."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"List not found."},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Auth service unavailable."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"List who can be assigned on a list (access-filtered by visibility)","tags":["CRM"]}},"/v1/crm/lists/{id}/dismiss-mi-updates":{"post":{"description":"Bulk form of `dismissCrmMiUpdates` for records in one CRM list: marks the updates last shown for each record as reviewed for the 31-day check window, so `getCrmListMiUpdates` stops returning them. Nothing is written to the records. A proposal that was not shown yet (new Market-Insights data) still comes back.","operationId":"dismissCrmListMiUpdates","parameters":[{"description":"The CRM list id.","in":"path","name":"id","required":true,"schema":{"description":"The CRM list id.","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"entityIds":{"items":{"maxLength":128,"minLength":1,"type":"string"},"maxItems":100,"minItems":1,"type":"array"}},"required":["entityIds"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmDismissListMiUpdatesResult"}}},"description":"Which records were snoozed, and which are not in the list."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Snooze Market-Insights updates on several list records","tags":["CRM"]}},"/v1/crm/lists/{id}/filter-members":{"post":{"operationId":"filterCrmListMembers","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"filter":{"$ref":"#/components/schemas/CrmMemberFilter"},"limit":{"exclusiveMinimum":true,"minimum":0,"type":"integer"}},"required":["filter"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmFilterMembersResult"}}},"description":"Matching member entity ids (resolved in Postgres)."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Filter a list's members by entity attributes (read)","tags":["CRM"]}},"/v1/crm/lists/{id}/member-ids":{"get":{"operationId":"getCrmListMemberIds","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmMemberIdsResult"}}},"description":"Every member entity id of the list, all entity types."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"List a CRM list's member entity ids (ids only)","tags":["CRM"]}},"/v1/crm/lists/{id}/members":{"delete":{"operationId":"removeCrmListMember","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"entityId":{"type":"string"}},"required":["entityId"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmRemoveListMemberResult"}}},"description":"Whether a membership was removed."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Remove a member from a list","tags":["CRM"]},"post":{"operationId":"addCrmListMember","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"display":{"$ref":"#/components/schemas/CrmDisplay"},"entityId":{"type":"string"},"entityType":{"$ref":"#/components/schemas/CrmEntityType"},"grantRecordAccessUserIds":{"items":{"type":"string"},"type":"array"},"link":{"$ref":"#/components/schemas/CrmLink"},"note":{"properties":{"body":{"type":"string"},"bodyHtml":{"nullable":true,"type":"string"}},"required":["body"],"type":"object"},"ownerUserId":{"type":"string"},"status":{"type":"string"}},"required":["entityType","entityId","link","display"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmAddListMemberResult"}}},"description":"Whether the member was newly added + the member row."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Add a member to a list","tags":["CRM"]}},"/v1/crm/lists/{id}/members/bulk":{"post":{"operationId":"addCrmListMembersBulk","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"grantRecordAccessUserIds":{"items":{"type":"string"},"type":"array"},"members":{"items":{"properties":{"company":{"type":"string"},"companyType":{"type":"string"},"contacts":{"items":{"$ref":"#/components/schemas/CrmContactSeed"},"type":"array"},"display":{"$ref":"#/components/schemas/CrmDisplay"},"entityId":{"type":"string"},"entityType":{"$ref":"#/components/schemas/CrmEntityType"},"link":{"$ref":"#/components/schemas/CrmLink"},"title":{"type":"string"}},"required":["entityType","entityId","display"],"type":"object"},"minItems":1,"type":"array"},"note":{"properties":{"body":{"type":"string"},"bodyHtml":{"nullable":true,"type":"string"}},"required":["body"],"type":"object"},"ownerUserId":{"type":"string"},"status":{"type":"string"}},"required":["members"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmAddMembersBulkResult"}}},"description":"Counts + the ids newly added."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Add many members to a list","tags":["CRM"]}},"/v1/crm/lists/{id}/mi-updates":{"post":{"description":"Checks a CRM list's members against current Market-Insights data and returns ONLY the records that need attention, each with its proposed updates. Use this instead of calling `getCrmRecordProfile` + `getCrmMiUpdates` for every member: one call covers a page of up to 50 members, and records the user already reviewed (applied or dismissed) with nothing new since are left out. Page with `cursor` until `nextCursor` is null; a page may return no records and still have more to scan. Act on the results with `applyCrmListMiUpdates` (explicit per-record accepted updates) and `dismissCrmListMiUpdates` (snooze the rest). Each scan counts as a check of those records, exactly like `getCrmMiUpdates`.","operationId":"getCrmListMiUpdates","parameters":[{"description":"The CRM list id.","in":"path","name":"id","required":true,"schema":{"description":"The CRM list id.","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"cursor":{"description":"`nextCursor` of the previous page.","maxLength":256,"type":"string"},"entityTypes":{"description":"Only these entity types.","items":{"$ref":"#/components/schemas/CrmEntityType"},"maxItems":4,"type":"array"},"includeSnoozed":{"default":false,"description":"Also return records whose proposals were all already reviewed.","type":"boolean"},"limit":{"default":25,"description":"Members evaluated per page (max 50), not records returned.","maximum":50,"minimum":1,"type":"integer"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmListMiUpdatesResult"}}},"description":"The records on this page that need Market-Insights review, with their proposed updates."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Find the records in a CRM list that have Market-Insights updates to review","tags":["CRM"]}},"/v1/crm/lists/{id}/shareable-members":{"get":{"operationId":"listCrmListShareableMembers","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmShareableMemberList"}}},"description":"The org roster for the list's sharing picker (all members)."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Auth service unavailable."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"List the org members a list can be shared with (manage-gated)","tags":["CRM"]}},"/v1/crm/lists/{id}/shares":{"delete":{"operationId":"revokeCrmListAccess","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"userId":{"type":"string"}},"required":["userId"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmRevokeListAccessResult"}}},"description":"Whether a grant was removed."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Revoke a member's access to a list","tags":["CRM"]},"get":{"operationId":"getCrmListShares","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmListSharingResult"}}},"description":"Visibility + owner display + enriched grants, or null."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Auth service unavailable."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Get a list's sharing state (+ owner display, canManageSharing)","tags":["CRM"]},"patch":{"operationId":"transferCrmListOwnership","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"newOwnerUserId":{"type":"string"}},"required":["newOwnerUserId"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmTransferListOwnershipResult"}}},"description":"Whether ownership moved (false when the target is already the owner)."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Transfer a list's ownership to another member","tags":["CRM"]},"post":{"operationId":"grantCrmListAccess","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"permission":{"enum":["editor","viewer"],"type":"string"},"userId":{"type":"string"}},"required":["userId"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmGrantListAccessResult"}}},"description":"Whether a new grant was created."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Grant a member access to a list","tags":["CRM"]}},"/v1/crm/lists/{listId}/apply-template":{"post":{"operationId":"applyCrmListTemplate","parameters":[{"in":"path","name":"listId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmApplyTemplateBody"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmApplyTemplateResult"}}},"description":"Fields that landed vs. were skipped (additive, idempotent)."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Replay a template's fields onto a list","tags":["CRM"]}},"/v1/crm/lists/{listId}/fields":{"delete":{"operationId":"deleteCrmListField","parameters":[{"in":"path","name":"listId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"string"}},"required":["id"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmDeleteListFieldResult"}}},"description":"Whether the field was deleted."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Delete a custom field","tags":["CRM"]},"get":{"operationId":"listCrmListFields","parameters":[{"in":"path","name":"listId","required":true,"schema":{"type":"string"}},{"in":"query","name":"objectType","required":false,"schema":{"$ref":"#/components/schemas/CrmObjectType"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmListFieldsResult"}}},"description":"Object-scoped fields plus this list's list-scoped fields."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"List the custom fields applicable to a list","tags":["CRM"]},"patch":{"operationId":"updateCrmListField","parameters":[{"in":"path","name":"listId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"config":{"additionalProperties":{"nullable":true},"nullable":true,"type":"object"},"id":{"type":"string"},"label":{"type":"string"},"options":{"items":{"$ref":"#/components/schemas/CrmCustomFieldOption"},"nullable":true,"type":"array"},"sortOrder":{"type":"number"}},"required":["id"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmUpdateListFieldResult"}}},"description":"Whether the field was updated."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Update a custom field's mutable props","tags":["CRM"]},"post":{"operationId":"createCrmListField","parameters":[{"in":"path","name":"listId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"config":{"additionalProperties":{"nullable":true},"nullable":true,"type":"object"},"key":{"type":"string"},"label":{"type":"string"},"objectType":{"$ref":"#/components/schemas/CrmObjectType"},"options":{"items":{"$ref":"#/components/schemas/CrmCustomFieldOption"},"nullable":true,"type":"array"},"sortOrder":{"type":"number"},"type":{"$ref":"#/components/schemas/CrmCustomFieldType"}},"required":["label","type"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmCreateListFieldResult"}}},"description":"The created custom field."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Create a list-scoped custom field","tags":["CRM"]}},"/v1/crm/lo-loan-mix":{"post":{"operationId":"crmLoLoanMix","requestBody":{"content":{"application/json":{"schema":{"properties":{"dateRange":{"description":"Period key (default: last_14_months).","type":"string"},"nmls":{"description":"Bare NMLS id.","type":"string"}},"required":["nmls"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmLoLoanMix"}}},"description":"Loan-type percentage breakdown + the top loan type (or null)."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Loan-type mix (percentage + top type) for a single LO (by NMLS)","tags":["CRM"]}},"/v1/crm/lo-momentum":{"post":{"operationId":"crmLoMomentum","requestBody":{"content":{"application/json":{"schema":{"properties":{"nmls":{"description":"Bare NMLS ids (deduped, capped at 50).","items":{"type":"string"},"type":"array"}},"required":["nmls"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmLoMomentum"}}},"description":"Per-NMLS recent (last 3mo) vs prior (3mo) closed-loan units."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Recent-vs-prior 3-month closed-loan units for a set of LOs (by NMLS)","tags":["CRM"]}},"/v1/crm/lo-sponsor-location":{"post":{"operationId":"crmLoSponsorLocation","requestBody":{"content":{"application/json":{"schema":{"properties":{"nmlsIds":{"description":"Bare NMLS ids (deduped, empties dropped, capped 2000).","items":{"type":"string"},"type":"array"}},"required":["nmlsIds"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmLoSponsorLocation"}}},"description":"Per-NMLS current-sponsor office location (optional) + sponsored flag. Ids not on file are omitted."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Current-sponsor office location + sponsored flag for a set of LOs","tags":["CRM"]}},"/v1/crm/match":{"patch":{"operationId":"linkCrmRecord","requestBody":{"content":{"application/json":{"schema":{"properties":{"display":{"$ref":"#/components/schemas/CrmDisplay"},"entityId":{"type":"string"},"link":{"$ref":"#/components/schemas/CrmLink"}},"required":["entityId","link"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmLinkRecordResult"}}},"description":"Whether the record was linked."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Link a record to a chosen candidate","tags":["CRM"]},"post":{"operationId":"searchCrmMatchCandidates","requestBody":{"content":{"application/json":{"schema":{"properties":{"city":{"type":"string"},"entityType":{"$ref":"#/components/schemas/CrmEntityType"},"name":{"minLength":1,"type":"string"},"state":{"type":"string"}},"required":["entityType","name"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmMatchCandidates"}}},"description":"Ranked candidates (best first)."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Find candidate entities to link an unmatched record to","tags":["CRM"]}},"/v1/crm/meetings":{"delete":{"operationId":"deleteCrmMeeting","parameters":[{"in":"query","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmMeetingDeleted"}}},"description":"Success."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Delete a meeting (and its provider event)","tags":["CRM"]},"get":{"operationId":"listCrmMeetings","parameters":[{"in":"query","name":"entityId","required":true,"schema":{"type":"string"}},{"in":"query","name":"status","required":false,"schema":{"$ref":"#/components/schemas/CrmMeetingStatus"}},{"in":"query","name":"upcoming","required":false,"schema":{"enum":["0","1"],"type":"string"}},{"in":"query","name":"reconcile","required":false,"schema":{"enum":["0","1"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmMeetingList"}}},"description":"Success."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"List meetings for a record","tags":["CRM"]},"patch":{"operationId":"updateCrmMeeting","requestBody":{"content":{"application/json":{"schema":{"properties":{"action":{"enum":["update","cancel","complete","sync"],"type":"string"},"description":{"nullable":true,"type":"string"},"endAt":{"type":"number"},"id":{"type":"string"},"inviteeEmail":{"nullable":true,"type":"string"},"inviteeName":{"nullable":true,"type":"string"},"location":{"nullable":true,"type":"string"},"provider":{"$ref":"#/components/schemas/CrmMeetingProvider"},"reason":{"$ref":"#/components/schemas/CrmMeetingCancelReason"},"recordName":{"type":"string"},"recordUrl":{"type":"string"},"startAt":{"type":"number"},"teammateUserIds":{"items":{"type":"string"},"type":"array"},"timezone":{"nullable":true,"type":"string"},"title":{"type":"string"}},"required":["id","action"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmMeetingUpdated"}}},"description":"Success."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Update, cancel, complete, or re-sync a meeting","tags":["CRM"]},"post":{"operationId":"createCrmMeeting","requestBody":{"content":{"application/json":{"schema":{"properties":{"description":{"nullable":true,"type":"string"},"endAt":{"type":"number"},"entityId":{"type":"string"},"inviteeEmail":{"nullable":true,"type":"string"},"inviteeName":{"nullable":true,"type":"string"},"listId":{"maxLength":128,"minLength":1,"type":"string"},"location":{"nullable":true,"type":"string"},"provider":{"$ref":"#/components/schemas/CrmMeetingProvider"},"recordName":{"type":"string"},"recordUrl":{"type":"string"},"startAt":{"type":"number"},"teammateUserIds":{"items":{"type":"string"},"type":"array"},"timezone":{"nullable":true,"type":"string"},"title":{"minLength":1,"type":"string"}},"required":["entityId","title","startAt","endAt"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmMeetingCreated"}}},"description":"Created."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Create a meeting (optionally syncing it to a calendar provider)","tags":["CRM"]}},"/v1/crm/meetings/reconcile":{"post":{"operationId":"reconcileCrmMeetings","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"properties":{"entityId":{"type":"string"}},"required":["entityId"],"type":"object"},{"properties":{"scope":{"enum":["user"],"type":"string"}},"required":["scope"],"type":"object"}]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmMeetingReconcileResult"}}},"description":"Success."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Pull calendar changes and apply them (one record, or user-wide)","tags":["CRM"]}},"/v1/crm/meetings/workspace":{"get":{"operationId":"listCrmWorkspaceMeetings","parameters":[{"in":"query","name":"status","required":false,"schema":{"$ref":"#/components/schemas/CrmMeetingStatus"}},{"description":"Restrict to one organizer; omit for anyone on my records.","in":"query","name":"organizer","required":false,"schema":{"description":"Restrict to one organizer; omit for anyone on my records.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmWorkspaceMeetingList"}}},"description":"Meetings on visible records, soonest first."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Cross-record meeting inbox for the caller's visible records","tags":["CRM"]}},"/v1/crm/members":{"get":{"operationId":"listCrmMembers","parameters":[{"in":"query","name":"objectType","required":true,"schema":{"$ref":"#/components/schemas/CrmObjectType"}},{"description":"`me` scopes to the caller's records; omit for everyone.","in":"query","name":"owner","required":false,"schema":{"description":"`me` scopes to the caller's records; omit for everyone.","enum":["me"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmMembersList"}}},"description":"The visible records of the object type, newest first."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"List curated CRM records of an object type","tags":["CRM"]}},"/v1/crm/org-members":{"get":{"operationId":"listCrmOrgMembers","parameters":[{"in":"query","name":"search","required":false,"schema":{"type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"exclusiveMinimum":true,"minimum":0,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmOrgMemberList"}}},"description":"The active org's members (optionally searched)."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Auth service unavailable."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"List the active org's members","tags":["CRM"]}},"/v1/crm/overrides":{"get":{"operationId":"getCrmOverrides","parameters":[{"description":"Comma-separated record ids.","in":"query","name":"entityIds","required":true,"schema":{"description":"Comma-separated record ids.","example":"lo:1,lo:2","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmOverridesMap"}}},"description":"The overlay per entity id."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Batch-read record overrides","tags":["CRM"]},"patch":{"operationId":"setCrmOverride","requestBody":{"content":{"application/json":{"schema":{"properties":{"entityId":{"type":"string"},"entityType":{"$ref":"#/components/schemas/CrmEntityType"},"field":{"$ref":"#/components/schemas/CrmOverrideField"},"value":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/CrmOverrideOffice"}]}},"required":["entityId","entityType","field","value"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmSetOverrideResult"}}},"description":"The record's updated overlay (+ re-derived location facets)."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Set a single override field on a record","tags":["CRM"]}},"/v1/crm/production-enrich/{jobId}":{"get":{"operationId":"getCrmProductionEnrichJob","parameters":[{"description":"Job id from a bulk/import add.","in":"path","name":"jobId","required":true,"schema":{"description":"Job id from a bulk/import add.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmProductionEnrichJob"}}},"description":"Job status (queued / running / completed / failed / cancelled)."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Get an add-time production-enrich job's status","tags":["CRM"]}},"/v1/crm/profile":{"get":{"operationId":"getCrmRecordProfile","parameters":[{"description":"The CRM record id to read.","in":"query","name":"entityId","required":true,"schema":{"description":"The CRM record id to read.","minLength":1,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmProfile"}}},"description":"The record's aggregate profile payload."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Aggregate profile read for a CRM record","tags":["CRM"]}},"/v1/crm/recipients":{"get":{"operationId":"searchCrmEmailRecipients","parameters":[{"description":"Name or address fragment.","in":"query","name":"q","required":true,"schema":{"description":"Name or address fragment.","type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"exclusiveMinimum":true,"minimum":0,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmEmailRecipientArray"}}},"description":"Matching records with a stored email address."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Typeahead search for email recipients the caller can see","tags":["CRM"]}},"/v1/crm/record-access":{"get":{"operationId":"getCrmRecordAccess","parameters":[{"description":"The record's entity id.","in":"query","name":"entityId","required":true,"schema":{"description":"The record's entity id.","minLength":1,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmRecordAccessFacts"}}},"description":"The resolved accessible-user set + the caller's manage capability."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Record not found / not accessible to the caller."},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Auth service unavailable."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Who can access a record, and whether the caller may manage shares","tags":["CRM"]}},"/v1/crm/record-shareable-members":{"get":{"operationId":"listCrmRecordShareableMembers","parameters":[{"description":"The record's entity id.","in":"query","name":"entityId","required":true,"schema":{"description":"The record's entity id.","minLength":1,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmRecordShareableMemberList"}}},"description":"The org roster for the record's share picker (all members)."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Auth service unavailable."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"List the org members a record can be shared with (manage-gated)","tags":["CRM"]}},"/v1/crm/record-shares":{"delete":{"operationId":"revokeCrmRecordAccess","requestBody":{"content":{"application/json":{"schema":{"properties":{"entityId":{"type":"string"},"userId":{"type":"string"}},"required":["entityId","userId"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmRevokeRecordAccessResult"}}},"description":"Whether a share was removed."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Auth service unavailable (roster needed for the gate)."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Revoke a user's access to a record","tags":["CRM"]},"get":{"operationId":"listCrmRecordShares","parameters":[{"description":"The record's entity id.","in":"query","name":"entityId","required":true,"schema":{"description":"The record's entity id.","minLength":1,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmRecordShareList"}}},"description":"The per-user share grants on the record, with display."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Auth service unavailable."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"List the direct shares on a record (+ display, canManageShares)","tags":["CRM"]},"post":{"operationId":"grantCrmRecordAccess","requestBody":{"content":{"application/json":{"schema":{"properties":{"entityId":{"type":"string"},"listId":{"type":"string"},"source":{"enum":["mention","manual"],"type":"string"},"userId":{"type":"string"}},"required":["entityId","userId"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmGrantRecordAccessResult"}}},"description":"Whether a new share was created (idempotent)."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Auth service unavailable (roster needed for the gate)."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Grant a user access to a record","tags":["CRM"]}},"/v1/crm/records":{"delete":{"operationId":"deleteCrmRecord","parameters":[{"description":"The record id.","in":"query","name":"entityId","required":true,"schema":{"description":"The record id.","minLength":1,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmDeleteRecordResult"}}},"description":"Whether a record was removed."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Remove a record from the workspace CRM","tags":["CRM"]},"patch":{"operationId":"setCrmRecordOwner","requestBody":{"content":{"application/json":{"schema":{"properties":{"entityId":{"type":"string"},"entityType":{"$ref":"#/components/schemas/CrmEntityType"},"grantAccess":{"type":"boolean"},"ownerUserId":{"nullable":true,"type":"string"}},"required":["entityId","entityType","ownerUserId"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmSetOwnerResult"}}},"description":"The record's owner after the call; `needsShare` is set instead when the assignee can't see the record and the write was held."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"(Re)assign a record's working owner","tags":["CRM"]},"post":{"operationId":"createCrmRecord","requestBody":{"content":{"application/json":{"schema":{"properties":{"display":{"$ref":"#/components/schemas/CrmDisplay"},"entityId":{"type":"string"},"entityType":{"$ref":"#/components/schemas/CrmEntityType"},"link":{"$ref":"#/components/schemas/CrmLink"},"ownerUserId":{"type":"string"}},"required":["entityId","entityType","link","display"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmCreateRecordResult"}}},"description":"Whether the record was newly created (vs. refreshed)."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Create (or refresh) a canonical record from a match","tags":["CRM"]}},"/v1/crm/records/access-request":{"get":{"operationId":"getCrmRecordAccessRequest","parameters":[{"in":"query","name":"requestId","required":true,"schema":{"minLength":1,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmRecordAccessRequestInfo"}}},"description":"The pending ask, for the confirm prompt."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Auth service unavailable (roster needed for the gate)."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Resolve a record access request for the owner's grant-confirm screen","tags":["CRM"]}},"/v1/crm/records/add":{"post":{"operationId":"addCrmRecord","requestBody":{"content":{"application/json":{"schema":{"properties":{"display":{"$ref":"#/components/schemas/CrmDisplay"},"entityId":{"type":"string"},"entityType":{"$ref":"#/components/schemas/CrmEntityType"},"grantRecordAccessUserIds":{"items":{"type":"string"},"type":"array"},"link":{"$ref":"#/components/schemas/CrmLink"},"listId":{"type":"string"},"note":{"properties":{"body":{"type":"string"},"bodyHtml":{"nullable":true,"type":"string"}},"required":["body"],"type":"object"},"ownerUserId":{"type":"string"},"status":{"type":"string"}},"required":["entityType","entityId","link","display"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmAddRecordResult"}}},"description":"Whether the record was newly added + the member row."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Add a record to the CRM (and optionally a list)","tags":["CRM"]}},"/v1/crm/records/add/bulk":{"post":{"operationId":"addCrmRecordsBulk","requestBody":{"content":{"application/json":{"schema":{"properties":{"grantRecordAccessUserIds":{"items":{"type":"string"},"type":"array"},"members":{"items":{"properties":{"company":{"type":"string"},"companyType":{"type":"string"},"contacts":{"items":{"$ref":"#/components/schemas/CrmContactSeed"},"type":"array"},"display":{"$ref":"#/components/schemas/CrmDisplay"},"entityId":{"type":"string"},"entityType":{"$ref":"#/components/schemas/CrmEntityType"},"link":{"$ref":"#/components/schemas/CrmLink"},"title":{"type":"string"}},"required":["entityType","entityId","display"],"type":"object"},"minItems":1,"type":"array"},"note":{"properties":{"body":{"type":"string"},"bodyHtml":{"nullable":true,"type":"string"}},"required":["body"],"type":"object"},"ownerUserId":{"type":"string"},"status":{"type":"string"}},"required":["members"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmAddRecordsBulkResult"}}},"description":"Counts + the ids newly added."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Bulk add records to the canonical CRM (listless)","tags":["CRM"]}},"/v1/crm/records/apply-mi-updates":{"post":{"operationId":"applyCrmMiUpdates","requestBody":{"content":{"application/json":{"schema":{"properties":{"entityId":{"type":"string"},"entityType":{"$ref":"#/components/schemas/CrmEntityType"},"updates":{"items":{"oneOf":[{"properties":{"field":{"enum":["title","company","location","city","state","zip"],"type":"string"},"store":{"enum":["override"],"type":"string"},"value":{"maxLength":2000,"minLength":1,"type":"string"}},"required":["store","field","value"],"type":"object"},{"properties":{"kind":{"enum":["email","phone","linkedin","facebook","x","instagram","youtube","zillow","realtor","website"],"type":"string"},"store":{"enum":["contact"],"type":"string"},"value":{"maxLength":2000,"minLength":1,"type":"string"}},"required":["store","kind","value"],"type":"object"}]},"minItems":1,"type":"array"}},"required":["entityId","entityType","updates"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmApplyMiUpdatesResult"}}},"description":"How many accepted fields were persisted."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Apply the Market-Insights updates the user accepted","tags":["CRM"]}},"/v1/crm/records/by-nmls":{"get":{"operationId":"findCrmRecordByNmls","parameters":[{"description":"Bare NMLS id.","in":"query","name":"nmlsId","required":true,"schema":{"description":"Bare NMLS id.","minLength":1,"type":"string"}},{"description":"Comma-separated entity types to match (default: all).","in":"query","name":"entityTypes","required":false,"schema":{"description":"Comma-separated entity types to match (default: all).","example":"lo,company","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmRecordRef"}}},"description":"The matching record ref, or null when none exists."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Find an existing CRM record by NMLS id","tags":["CRM"]}},"/v1/crm/records/connections":{"post":{"operationId":"getCrmRecordConnections","requestBody":{"content":{"application/json":{"schema":{"properties":{"branchName":{"type":"string"},"branchNmlsId":{"type":"string"},"companyName":{"type":"string"},"companyNmlsId":{"type":"string"},"entityId":{"minLength":1,"type":"string"},"entityType":{"$ref":"#/components/schemas/CrmEntityType"},"officeKey":{"type":"string"},"officeName":{"type":"string"},"partnerEntityIds":{"items":{"type":"string"},"type":"array"}},"required":["entityId","entityType"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmRecordConnections"}}},"description":"In-CRM partner ids + colleagues tagged with their list names."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Relationship cross-reference for a record (in-CRM partners + colleagues)","tags":["CRM"]}},"/v1/crm/records/create":{"post":{"operationId":"createCrmManualRecord","requestBody":{"content":{"application/json":{"schema":{"properties":{"contacts":{"items":{"$ref":"#/components/schemas/CrmContactSeed"},"maxItems":30,"type":"array"},"customValues":{"additionalProperties":{"$ref":"#/components/schemas/CrmCustomValue"},"type":"object"},"display":{"$ref":"#/components/schemas/CrmDisplay"},"entityType":{"$ref":"#/components/schemas/CrmEntityType"},"listId":{"type":"string"},"overrides":{"properties":{"city":{"type":"string"},"company":{"type":"string"},"companyNmlsId":{"type":"string"},"companyType":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"location":{"type":"string"},"notes":{"type":"string"},"office":{"type":"string"},"state":{"type":"string"},"status":{"type":"string"},"title":{"type":"string"},"zip":{"type":"string"}},"type":"object"},"ownerUserId":{"type":"string"}},"required":["entityType","display"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmManualRecordResult"}}},"description":"The new record's id + whether it joined the given list."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Create a manual (unmatched) CRM record","tags":["CRM"]}},"/v1/crm/records/decline-mi-update":{"post":{"operationId":"declineCrmMiUpdate","requestBody":{"content":{"application/json":{"schema":{"properties":{"entityId":{"type":"string"},"entityType":{"$ref":"#/components/schemas/CrmEntityType"},"fields":{"description":"The diverging override fields to keep, e.g. `[\"company\", \"location\"]`. Batched because the review dialog can select several rows at once. Only the fields the server still sees diverging are suppressed.","items":{"maxLength":64,"minLength":1,"type":"string"},"maxItems":16,"minItems":1,"type":"array"}},"required":["entityId","entityType","fields"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmDeclineMiUpdateResult"}}},"description":"The subset of the requested fields that actually diverged and are now suppressed. A field absent from this list no longer disagrees with MI, so there was nothing to decline."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Keep the pinned values — suppress divergence proposals","tags":["CRM"]}},"/v1/crm/records/delete":{"post":{"operationId":"deleteCrmRecords","requestBody":{"content":{"application/json":{"schema":{"properties":{"entityIds":{"items":{"type":"string"},"minItems":1,"type":"array"}},"required":["entityIds"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmDeleteRecordsResult"}}},"description":"Ids actually removed vs. skipped (not owned / not found)."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Remove one or more records from the CRM","tags":["CRM"]}},"/v1/crm/records/describe-on-add":{"post":{"operationId":"describeCrmRecordsOnAdd","requestBody":{"content":{"application/json":{"schema":{"properties":{"created":{"items":{"properties":{"entityId":{"type":"string"},"entityType":{"$ref":"#/components/schemas/CrmEntityType"}},"required":["entityId","entityType"],"type":"object"},"maxItems":500,"minItems":1,"type":"array"}},"required":["created"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmDescribeOnAddResult"}}},"description":"The created entity ids that need a generate-description run (cache misses this caller claimed)."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Resolve descriptions for just-created records (cache-first)","tags":["CRM"]}},"/v1/crm/records/dismiss-mi-updates":{"post":{"operationId":"dismissCrmMiUpdates","requestBody":{"content":{"application/json":{"schema":{"properties":{"entityId":{"type":"string"},"seen":{"additionalProperties":{"items":{"maxLength":512,"type":"string"},"maxItems":50,"type":"array"},"type":"object"}},"required":["entityId"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmDismissMiUpdatesResult"}}},"description":"Confirmation the check window was restarted. The seen-ledger is untouched."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Snooze surfaced MI updates for the check window","tags":["CRM"]}},"/v1/crm/records/generate-description":{"post":{"operationId":"generateCrmRecordDescription","requestBody":{"content":{"application/json":{"schema":{"properties":{"company":{"description":"Ignored.","type":"string"},"entityId":{"type":"string"},"entityType":{"$ref":"#/components/schemas/CrmEntityType"},"location":{"description":"Ignored.","type":"string"},"name":{"description":"Ignored. Who is researched comes from the market-data record, not the request.","type":"string"},"title":{"description":"Ignored.","type":"string"}},"required":["entityId","entityType"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmGenerateDescriptionResult"}}},"description":"The generated description, or null when no usable source was found."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimited"}}},"description":"`rate_limited` — too many AI requests from this user in the last minute. Wait `retryAfterSeconds` (also sent as the `Retry-After` header)."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Auto-generate a record's description from the web","tags":["CRM"]}},"/v1/crm/records/grant-access":{"post":{"operationId":"grantCrmRecordAccessRequest","requestBody":{"content":{"application/json":{"schema":{"properties":{"requestId":{"minLength":1,"type":"string"}},"required":["requestId"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmGrantRecordAccessRequestResult"}}},"description":"The requester was granted access (idempotent) and the ask closed."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Auth service unavailable (roster needed for the gate)."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Grant a pending record access request (owner/admin, one tap)","tags":["CRM"]}},"/v1/crm/records/member-ids":{"get":{"operationId":"getCrmRecordMemberIds","parameters":[{"in":"query","name":"objectType","required":true,"schema":{"$ref":"#/components/schemas/CrmObjectType"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmMemberIdsResult"}}},"description":"Every workspace record id of the object type."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"List the workspace's record entity ids of an object type (ids only)","tags":["CRM"]}},"/v1/crm/records/mention-search":{"post":{"operationId":"searchCrmMentionRecords","requestBody":{"content":{"application/json":{"schema":{"properties":{"q":{"default":"","type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmMentionSearch"}}},"description":"The viewer-visible records matching the query (or recent)."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Name-first search over visible CRM records for the mention picker","tags":["CRM"]}},"/v1/crm/records/mi-updates":{"post":{"operationId":"getCrmMiUpdates","requestBody":{"content":{"application/json":{"schema":{"properties":{"entityId":{"maxLength":128,"minLength":1,"type":"string"},"entityType":{"$ref":"#/components/schemas/CrmEntityType"}},"required":["entityId","entityType"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmMiUpdatesResult"}}},"description":"The available per-field updates + the check timestamp (null when skipped)."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Compute which Market-Insights fields differ from a record snapshot","tags":["CRM"]}},"/v1/crm/records/refresh-mirror":{"post":{"operationId":"refreshCrmRecordMirror","requestBody":{"content":{"application/json":{"schema":{"properties":{"entityId":{"maxLength":128,"minLength":1,"type":"string"}},"required":["entityId"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmRefreshMirrorResult"}}},"description":"Whether the mirror moved, and the display after the attempt. Never errors on a record that cannot be refreshed."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Freshen a record's mirrored Market-Insights row on demand","tags":["CRM"]}},"/v1/crm/records/request-access":{"post":{"operationId":"requestCrmRecordAccess","requestBody":{"content":{"application/json":{"schema":{"properties":{"entityId":{"minLength":1,"type":"string"},"organizationId":{"minLength":1,"type":"string"}},"required":["organizationId","entityId"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmRecordRequestAccessResult"}}},"description":"The owner was emailed, a recent request still stands, or the caller already has access."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The record has no owner/admin to notify."},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Owner-roster lookup or email send failed — safe to retry."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Ask a record's owner to share it (membership-gated, notify-only)","tags":["CRM"]}},"/v1/crm/records/search":{"post":{"operationId":"searchCrmRecords","requestBody":{"content":{"application/json":{"schema":{"properties":{"listId":{"description":"Scope to one list's members; omit for the full CRM.","type":"string"},"objectType":{"$ref":"#/components/schemas/CrmObjectType"},"q":{"description":"Free-text query.","type":"string"}},"required":["objectType","q"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmRecordSearchResult"}}},"description":"The matching namespaced entity ids."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Free-text search over CRM records","tags":["CRM"]}},"/v1/crm/recruiting/calls/active":{"get":{"operationId":"getRecruitingActiveCall","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecruitingActiveCallResult"}}},"description":"The most recent live call across my engagements, or null."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Auth service unavailable."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"My still-live call in any customer workspace (reload resume)","tags":["CRM"]}},"/v1/crm/recruiting/engagements":{"get":{"operationId":"listRecruitingEngagements","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecruitingEngagementList"}}},"description":"Active engagements, oldest first. Pass a `workspace.id` as `x-mm-organization-id` (MCP: `workspaceId`) to work that customer's CRM."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Auth service unavailable."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Customer workspaces I can work through a service engagement","tags":["CRM"]}},"/v1/crm/recruiting/queue":{"get":{"operationId":"getRecruitingQueue","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecruitingQueueResult"}}},"description":"Open tasks assigned to me (due-soonest first) and meetings I organise that are still scheduled (soonest first), each tagged with its customer workspace."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Auth service unavailable."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"My open tasks and scheduled meetings across every customer I work","tags":["CRM"]}},"/v1/crm/reports/activity":{"get":{"description":"Human actions only, attributed to the actor (never the record owner). `previousTotals` covers the equal-length period immediately before `from`. Ratios (connect rate, show rate, win rate) are client-side divisions.","operationId":"getCrmActivityReport","parameters":[{"description":"Inclusive start of the range (epoch ms).","in":"query","name":"from","required":false,"schema":{"description":"Inclusive start of the range (epoch ms).","minimum":0,"nullable":true,"type":"integer"}},{"description":"Exclusive end of the range (epoch ms).","in":"query","name":"to","required":false,"schema":{"description":"Exclusive end of the range (epoch ms).","minimum":0,"nullable":true,"type":"integer"}},{"description":"Omit = the caller's own metrics. `team` = one entry per workspace member (owner/admin only). A member id = that member (owner/admin only).","in":"query","name":"userId","required":false,"schema":{"description":"Omit = the caller's own metrics. `team` = one entry per workspace member (owner/admin only). A member id = that member (owner/admin only).","type":"string"}},{"description":"IANA zone the day buckets are cut in (default America/New_York).","in":"query","name":"tz","required":false,"schema":{"description":"IANA zone the day buckets are cut in (default America/New_York).","type":"string"}},{"description":"Scope every metric to that list's members and vocabulary. A 1-element alias for `listIds` — do not pass both.","in":"query","name":"listId","required":false,"schema":{"description":"Scope every metric to that list's members and vocabulary. A 1-element alias for `listIds` — do not pass both.","type":"string"}},{"description":"CSV of list ids to scope to (union, not intersection — a record that's a member of more than one selected list is still counted once in every distinct-record metric and once per day-bucket). A list id the caller can't see is silently dropped, not an error. Do not pass alongside `listId`.","in":"query","name":"listIds","required":false,"schema":{"description":"CSV of list ids to scope to (union, not intersection — a record that's a member of more than one selected list is still counted once in every distinct-record metric and once per day-bucket). A list id the caller can't see is silently dropped, not an error. Do not pass alongside `listId`.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmActivityReportResult"}}},"description":"The activity report."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Per-user, per-day activity counts with previous-period totals","tags":["CRM"]}},"/v1/crm/reports/outcomes":{"get":{"description":"Cohort = records that hit the event in [from, to). Win/loss resolves through each status option's `outcome` (seed ids `won`/`lost` by convention). `pipeline` is a current snapshot and ignores the range.","operationId":"getCrmOutcomesReport","parameters":[{"description":"Inclusive start of the range (epoch ms).","in":"query","name":"from","required":false,"schema":{"description":"Inclusive start of the range (epoch ms).","minimum":0,"nullable":true,"type":"integer"}},{"description":"Exclusive end of the range (epoch ms).","in":"query","name":"to","required":false,"schema":{"description":"Exclusive end of the range (epoch ms).","minimum":0,"nullable":true,"type":"integer"}},{"description":"Omit = the caller's own metrics. `team` = one entry per workspace member (owner/admin only). A member id = that member (owner/admin only).","in":"query","name":"userId","required":false,"schema":{"description":"Omit = the caller's own metrics. `team` = one entry per workspace member (owner/admin only). A member id = that member (owner/admin only).","type":"string"}},{"description":"IANA zone the day buckets are cut in (default America/New_York).","in":"query","name":"tz","required":false,"schema":{"description":"IANA zone the day buckets are cut in (default America/New_York).","type":"string"}},{"description":"Scope every metric to that list's members and vocabulary. A 1-element alias for `listIds` — do not pass both.","in":"query","name":"listId","required":false,"schema":{"description":"Scope every metric to that list's members and vocabulary. A 1-element alias for `listIds` — do not pass both.","type":"string"}},{"description":"CSV of list ids to scope to (union, not intersection — a record that's a member of more than one selected list is still counted once in every distinct-record metric and once per day-bucket). A list id the caller can't see is silently dropped, not an error. Do not pass alongside `listId`.","in":"query","name":"listIds","required":false,"schema":{"description":"CSV of list ids to scope to (union, not intersection — a record that's a member of more than one selected list is still counted once in every distinct-record metric and once per day-bucket). A list id the caller can't see is silently dropped, not an error. Do not pass alongside `listId`.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmOutcomesReportResult"}}},"description":"The outcomes report."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Cohort outcomes: wins/losses, volume onboarded, milestones, effort per win, pipeline","tags":["CRM"]}},"/v1/crm/request-access":{"post":{"operationId":"requestCrmAccess","requestBody":{"content":{"application/json":{"schema":{"properties":{"organizationId":{"minLength":1,"type":"string"}},"required":["organizationId"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmRequestAccessResult"}}},"description":"The owner(s) were emailed, or a recent request still stands."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The org has no billing owner to notify."},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Owner-roster lookup or email send failed — safe to retry."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Ask the org owner(s) to enable the CRM (membership-gated)","tags":["CRM"]}},"/v1/crm/similar-originators":{"post":{"operationId":"crmSimilarOriginators","requestBody":{"content":{"application/json":{"schema":{"properties":{"dateRange":{"description":"Period key (default: last_14_months).","type":"string"},"partnerNmlsIds":{"description":"Partner LO NMLS ids to rank (deduped, self-excluded, capped at 200).","items":{"type":"string"},"type":"array"},"top":{"description":"Max scored rows to return (1–50, default 25).","type":"number"},"viewerNmls":{"description":"The viewing LO's bare NMLS id.","type":"string"},"weights":{"description":"Live tuning overrides for the tx/loan/size blend (clamped to ≥ 0).","properties":{"loan":{"type":"number"},"size":{"type":"number"},"tx":{"type":"number"}},"type":"object"}},"required":["viewerNmls","partnerNmlsIds"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmSimilarOriginators"}}},"description":"Scored + sorted partner LOs (score, per-component similarity, shared highlight)."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Rank an agent's LO partners by product-mix + size similarity to a viewing LO","tags":["CRM"]}},"/v1/crm/tasks":{"delete":{"operationId":"deleteCrmTask","requestBody":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"string"}},"required":["id"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmTaskDeleted"}}},"description":"Success."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Delete a task","tags":["CRM"]},"get":{"operationId":"listCrmTasks","parameters":[{"in":"query","name":"entityId","required":false,"schema":{"type":"string"}},{"in":"query","name":"assigneeUserId","required":false,"schema":{"type":"string"}},{"in":"query","name":"owner","required":false,"schema":{"enum":["me"],"type":"string"}},{"in":"query","name":"status","required":false,"schema":{"$ref":"#/components/schemas/CrmTaskStatus"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmTaskList"}}},"description":"Success."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"List tasks for a record or for an assignee","tags":["CRM"]},"patch":{"operationId":"updateCrmTask","requestBody":{"content":{"application/json":{"schema":{"properties":{"action":{"enum":["calendar"],"type":"string"},"allDay":{"type":"boolean"},"assigneeUserId":{"type":"string"},"body":{"nullable":true,"type":"string"},"dueAt":{"nullable":true,"type":"number"},"grantAccess":{"type":"boolean"},"id":{"type":"string"},"provider":{"enum":["google","microsoft",null],"nullable":true,"type":"string"},"recordName":{"type":"string"},"recordUrl":{"type":"string"},"status":{"enum":["completed","cancelled","open"],"type":"string"},"title":{"type":"string"}},"required":["id"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmTaskUpdated"}}},"description":"Success."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Edit, complete, cancel or reopen a task","tags":["CRM"]},"post":{"operationId":"createCrmTask","requestBody":{"content":{"application/json":{"schema":{"properties":{"allDay":{"type":"boolean"},"assigneeUserId":{"type":"string"},"body":{"nullable":true,"type":"string"},"dueAt":{"nullable":true,"type":"number"},"entityId":{"type":"string"},"grantAccess":{"type":"boolean"},"listId":{"maxLength":128,"minLength":1,"type":"string"},"title":{"minLength":1,"type":"string"}},"required":["entityId","title"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmTaskCreated"}}},"description":"Success."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Create a task on a record","tags":["CRM"]}},"/v1/crm/tasks/workspace":{"get":{"operationId":"listCrmWorkspaceTasks","parameters":[{"in":"query","name":"status","required":false,"schema":{"$ref":"#/components/schemas/CrmTaskStatus"}},{"description":"Restrict to one assignee; omit for anyone on my records.","in":"query","name":"assignee","required":false,"schema":{"description":"Restrict to one assignee; omit for anyone on my records.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmWorkspaceTaskList"}}},"description":"Tasks on visible records, due-soonest first."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Cross-record task inbox for the caller's visible records","tags":["CRM"]}},"/v1/crm/templates":{"get":{"operationId":"listCrmTemplates","parameters":[{"in":"query","name":"objectType","required":false,"schema":{"$ref":"#/components/schemas/CrmObjectType"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmTemplateList"}}},"description":"Templates owned by or shared with the caller (+ owner display)."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Auth service unavailable."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"List attribute templates the caller can load","tags":["CRM"]},"post":{"operationId":"createCrmTemplate","requestBody":{"content":{"application/json":{"schema":{"properties":{"fields":{"items":{"properties":{"config":{"additionalProperties":{"nullable":true},"nullable":true,"type":"object"},"key":{"type":"string"},"label":{"type":"string"},"options":{"items":{"properties":{"color":{"type":"string"},"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"type":"object"},"nullable":true,"type":"array"},"sortOrder":{"type":"number"},"type":{"enum":["text","number","currency","date","select","multiselect","url","rating","checkbox","status","tags"],"type":"string"}},"required":["key","label","type"],"type":"object"},"type":"array"},"fromListId":{"type":"string"},"name":{"type":"string"},"objectType":{"$ref":"#/components/schemas/CrmObjectType"}},"required":["name"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmCreateTemplateResult"}}},"description":"The created template with its captured fields."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Create a template (optionally captured from a list)","tags":["CRM"]}},"/v1/crm/templates/{id}":{"delete":{"operationId":"deleteCrmTemplate","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmDeleteTemplateResult"}}},"description":"Whether the template row was deleted."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Delete a template (its fields + shares cascade)","tags":["CRM"]},"get":{"operationId":"getCrmTemplate","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmTemplate"}}},"description":"The template, or null when missing / not accessible."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Load one template with its fields","tags":["CRM"]},"patch":{"operationId":"updateCrmTemplate","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmUpdateTemplateResult"}}},"description":"Whether the template row was updated."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Rename a template","tags":["CRM"]}},"/v1/crm/templates/{id}/shares":{"delete":{"operationId":"unshareCrmTemplate","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"in":"query","name":"userId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmUnshareTemplateResult"}}},"description":"Whether a grant was removed."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Revoke a teammate's template grant","tags":["CRM"]},"get":{"operationId":"getCrmTemplateShares","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmTemplateShareList"}}},"description":"Owner display + caller canManage + enriched grantees."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Template not found / not accessible to the caller."},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Auth service unavailable."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"A template's share panel (owner display, canManage, grantees)","tags":["CRM"]},"post":{"operationId":"shareCrmTemplate","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"userId":{"type":"string"}},"required":["userId"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmShareTemplateResult"}}},"description":"Whether a new grant was created."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Grant a teammate load access to a template","tags":["CRM"]}},"/v1/files":{"get":{"description":"Files you own and files shared with you, newest first. Filter by origin, kind, class, status, what a file is linked to (`linkedTo`), or only files others shared with you (`sharedWithMe=true`). Pass `facets=true` for counts per origin and kind. Page with `cursor` (from `nextCursor`). Organization admins can pass `scope=org` to list every file in the organization. With `linkedTo=crm_record:<id>` you must be able to see that CRM record (otherwise 404); you then get every standard file linked to it, the protected files linked to it that you can open, and `hiddenProtectedCount` for the protected ones you cannot. Free.","operationId":"listFiles","parameters":[{"in":"query","name":"limit","required":false,"schema":{"default":50,"maximum":100,"minimum":1,"type":"integer"}},{"in":"query","name":"cursor","required":false,"schema":{"maxLength":200,"type":"string"}},{"description":"Comma-separated origins.","in":"query","name":"origin","required":false,"schema":{"description":"Comma-separated origins.","maxLength":512,"type":"string"}},{"description":"Comma-separated kinds.","in":"query","name":"kind","required":false,"schema":{"description":"Comma-separated kinds.","maxLength":512,"type":"string"}},{"description":"`standard` (the default) or `protected`. A protected file is shared with named people only, opens through a one-time link, records every access in its access log, and an agent can open it only after the person approves it in that conversation.","in":"query","name":"class","required":false,"schema":{"description":"`standard` (the default) or `protected`. A protected file is shared with named people only, opens through a one-time link, records every access in its access log, and an agent can open it only after the person approves it in that conversation.","enum":["standard","protected"],"type":"string"}},{"description":"Comma-separated statuses (default `ready` and `reencrypting`).","in":"query","name":"status","required":false,"schema":{"description":"Comma-separated statuses (default `ready` and `reencrypting`).","maxLength":512,"type":"string"}},{"description":"What the file belongs to, as `<type>:<id>`: `crm_record` (a CRM person or company, by its record id, e.g. `crm_record:lo:123`), `studio_table`, `ask_chat`, `ask_project` or `export_job`. You must be able to see a CRM record to link a file to it, and anyone who can see the record can view the standard files linked to it.","in":"query","name":"linkedTo","required":false,"schema":{"description":"What the file belongs to, as `<type>:<id>`: `crm_record` (a CRM person or company, by its record id, e.g. `crm_record:lo:123`), `studio_table`, `ask_chat`, `ask_project` or `export_job`. You must be able to see a CRM record to link a file to it, and anyone who can see the record can view the standard files linked to it.","example":"ask_chat:chat_123","maxLength":220,"minLength":3,"type":"string"}},{"description":"Only files others shared with you.","in":"query","name":"sharedWithMe","required":false,"schema":{"description":"Only files others shared with you.","enum":["true","false"],"type":"string"}},{"description":"Also return counts per origin and kind.","in":"query","name":"facets","required":false,"schema":{"description":"Also return counts per origin and kind.","enum":["true","false"],"type":"string"}},{"description":"`org` lists every file in the organization (organization admins only).","in":"query","name":"scope","required":false,"schema":{"default":"mine","description":"`org` lists every file in the organization (organization admins only).","enum":["mine","org"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/File"},"type":"array"},"facets":{"properties":{"kind":{"items":{"properties":{"count":{"type":"integer"},"value":{"type":"string"}},"required":["value","count"],"type":"object"},"type":"array"},"origin":{"items":{"properties":{"count":{"type":"integer"},"value":{"type":"string"}},"required":["value","count"],"type":"object"},"type":"array"}},"required":["origin","kind"],"type":"object"},"hiddenProtectedCount":{"description":"Only when `linkedTo` is a CRM record: how many protected files are linked to it that you cannot open. Protected files are shared person by person; seeing the record does not open them.","type":"integer"},"nextCursor":{"nullable":true,"type":"string"}},"required":["data","nextCursor"],"type":"object"}}},"description":"A page of files"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Not signed in"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Not allowed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"No such file"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Conflicts with the file's state"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"The upload did not match"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Could not check membership"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Storage or the access log unavailable"}},"summary":"Your files","tags":["Files"]},"post":{"description":"Step one of two: declare the file (name, type, exact size and, optionally, its SHA-256) and get `upload`, a URL to PUT the bytes to with the headers given. Step two: call complete. A new file is visible only to you until you share it. Free.","operationId":"createFile","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"file":{"$ref":"#/components/schemas/File"},"upload":{"properties":{"expiresAt":{"type":"string"},"headers":{"additionalProperties":{"type":"string"},"description":"Send these headers with the PUT, exactly as given.","type":"object"},"method":{"enum":["PUT"],"type":"string"},"url":{"description":"Send the bytes here with HTTP PUT.","type":"string"}},"required":["url","method","headers","expiresAt"],"type":"object"}},"required":["file","upload"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"The file record and its upload URL"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Not signed in"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Not allowed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"No such file"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Conflicts with the file's state"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"The upload did not match"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Could not check membership"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Storage or the access log unavailable"}},"summary":"Start an upload","tags":["Files"]}},"/v1/files/access-report":{"get":{"description":"Organization admins: the access log across every protected file in the organization, newest first. Filter by file, person, event, result and time; pass `format=csv` for a spreadsheet. Free.","operationId":"getFilesAccessReport","parameters":[{"in":"query","name":"limit","required":false,"schema":{"default":100,"maximum":500,"minimum":1,"type":"integer"}},{"in":"query","name":"cursor","required":false,"schema":{"maxLength":200,"type":"string"}},{"description":"The file's id.","in":"query","name":"fileId","required":false,"schema":{"description":"The file's id.","example":"file_3f2a…","pattern":"^file_[0-9a-f]{32}$","type":"string"}},{"in":"query","name":"userId","required":false,"schema":{"maxLength":128,"minLength":1,"type":"string"}},{"in":"query","name":"event","required":false,"schema":{"pattern":"^[a-z_]{1,40}$","type":"string"}},{"in":"query","name":"result","required":false,"schema":{"enum":["allowed","denied"],"type":"string"}},{"in":"query","name":"from","required":false,"schema":{"format":"date-time","type":"string"}},{"in":"query","name":"to","required":false,"schema":{"format":"date-time","type":"string"}},{"description":"`csv` answers a spreadsheet of up to 10,000 entries.","in":"query","name":"format","required":false,"schema":{"default":"json","description":"`csv` answers a spreadsheet of up to 10,000 entries.","enum":["json","csv"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/FileAccessLogEntry"},"type":"array"},"nextCursor":{"nullable":true,"type":"string"}},"required":["data","nextCursor"],"type":"object"}},"text/csv":{"schema":{"type":"string"}}},"description":"Access log entries"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Not signed in"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Not allowed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"No such file"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Conflicts with the file's state"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"The upload did not match"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Could not check membership"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Storage or the access log unavailable"}},"summary":"Who opened which protected files","tags":["Files"]}},"/v1/files/d/{token}":{"get":{"description":"The link a protected file's content request hands out. It works once, within 5 minutes, needs no sign-in (the link itself is the permission) and redirects to a download that lasts at most a minute. A second use answers 410. Free.","operationId":"redeemFileDownload","parameters":[{"description":"The one-time link's token.","in":"path","name":"token","required":true,"schema":{"description":"The one-time link's token.","maxLength":100,"minLength":1,"type":"string"}}],"responses":{"302":{"description":"Redirect to the download","headers":{"location":{"required":true,"schema":{"type":"string"}}}},"404":{"description":"No such link"},"410":{"description":"The link was already used or has expired"},"503":{"description":"Not available right now"}},"summary":"Open a protected file's one-time link","tags":["Files"]}},"/v1/files/search":{"get":{"description":"Files you can see whose name contains `q`, names that start with it first. Free.","operationId":"searchFiles","parameters":[{"in":"query","name":"q","required":true,"schema":{"maxLength":200,"minLength":1,"type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"default":20,"maximum":50,"minimum":1,"type":"integer"}},{"in":"query","name":"kind","required":false,"schema":{"maxLength":512,"type":"string"}},{"in":"query","name":"origin","required":false,"schema":{"maxLength":512,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/File"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Matching files"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Not signed in"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Not allowed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"No such file"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Conflicts with the file's state"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"The upload did not match"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Could not check membership"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Storage or the access log unavailable"}},"summary":"Search your files by name","tags":["Files"]}},"/v1/files/{id}":{"delete":{"description":"The owner or an organization admin can delete a file. Its contents are removed; a record that it existed is kept. Refused while a retention date or a legal hold applies. Data already loaded from the file elsewhere (a Studio table) is not deleted. Free.","operationId":"deleteFile","parameters":[{"description":"The file's id.","in":"path","name":"id","required":true,"schema":{"description":"The file's id.","example":"file_3f2a…","pattern":"^file_[0-9a-f]{32}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"deleted":{"enum":[true],"type":"boolean"},"id":{"type":"string"}},"required":["id","deleted"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Deleted"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Not signed in"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Not allowed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"No such file"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Conflicts with the file's state"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"The upload did not match"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Could not check membership"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Storage or the access log unavailable"}},"summary":"Delete a file","tags":["Files"]},"get":{"description":"A file you can see, with who it is shared with and what it is attached to. A file you cannot see answers 404, the same as one that does not exist. Free.","operationId":"getFile","parameters":[{"description":"The file's id.","in":"path","name":"id","required":true,"schema":{"description":"The file's id.","example":"file_3f2a…","pattern":"^file_[0-9a-f]{32}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"file":{"$ref":"#/components/schemas/File"},"shares":{"items":{"$ref":"#/components/schemas/FileShare"},"type":"array"}},"required":["file","shares"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"The file"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Not signed in"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Not allowed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"No such file"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Conflicts with the file's state"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"The upload did not match"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Could not check membership"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Storage or the access log unavailable"}},"summary":"One file: its details, shares and links","tags":["Files"]},"patch":{"description":"The owner and editors can rename a file or replace its `metadata`. Free.","operationId":"updateFile","parameters":[{"description":"The file's id.","in":"path","name":"id","required":true,"schema":{"description":"The file's id.","example":"file_3f2a…","pattern":"^file_[0-9a-f]{32}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilePatch"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/File"}},"required":["data"],"type":"object"}}},"description":"The updated file"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Not signed in"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Not allowed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"No such file"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Conflicts with the file's state"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"The upload did not match"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Could not check membership"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Storage or the access log unavailable"}},"summary":"Rename a file or edit its metadata","tags":["Files"]}},"/v1/files/{id}/access-log":{"get":{"description":"Every access to a protected file, newest first: who opened, downloaded, shared or changed it, from which app, and every refused attempt. The owner and organization admins only. Free.","operationId":"getFileAccessLog","parameters":[{"description":"The file's id.","in":"path","name":"id","required":true,"schema":{"description":"The file's id.","example":"file_3f2a…","pattern":"^file_[0-9a-f]{32}$","type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"default":100,"maximum":500,"minimum":1,"type":"integer"}},{"in":"query","name":"cursor","required":false,"schema":{"maxLength":200,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/FileAccessLogEntry"},"type":"array"},"nextCursor":{"nullable":true,"type":"string"}},"required":["data","nextCursor"],"type":"object"}}},"description":"Access log entries"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Not signed in"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Not allowed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"No such file"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Conflicts with the file's state"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"The upload did not match"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Could not check membership"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Storage or the access log unavailable"}},"summary":"A protected file's access log","tags":["Files"]}},"/v1/files/{id}/agent-approvals":{"post":{"description":"You approve an agent to open this protected file in the conversation `chatId`, and nowhere else. Only you can approve, from your own session: an agent cannot approve itself. Each approval is recorded in the file's access log. Free.","operationId":"approveFileForAgent","parameters":[{"description":"The file's id.","in":"path","name":"id","required":true,"schema":{"description":"The file's id.","example":"file_3f2a…","pattern":"^file_[0-9a-f]{32}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileAgentApprovalCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"approvedAt":{"type":"string"},"chatId":{"type":"string"},"fileId":{"type":"string"},"userId":{"type":"string"}},"required":["fileId","chatId","userId","approvedAt"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Approved"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Not signed in"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Not allowed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"No such file"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Conflicts with the file's state"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"The upload did not match"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Could not check membership"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Storage or the access log unavailable"}},"summary":"Let an agent open a protected file in one conversation","tags":["Files"]}},"/v1/files/{id}/complete":{"post":{"description":"Call after the bytes were PUT to the upload URL. The size and SHA-256 are checked (when no SHA-256 was declared it is computed now); a match makes the file ready (`200`), or `scanning` while it is checked for malware (`202`, call again shortly). A mismatch answers `422` and the upload must be started again. Calling it again is safe. Free.","operationId":"completeFile","parameters":[{"description":"The file's id.","in":"path","name":"id","required":true,"schema":{"description":"The file's id.","example":"file_3f2a…","pattern":"^file_[0-9a-f]{32}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/File"}},"required":["data"],"type":"object"}}},"description":"The file is ready"},"202":{"content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/File"}},"required":["data"],"type":"object"}}},"description":"The file is being scanned"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Not signed in"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Not allowed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"No such file"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Conflicts with the file's state"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"The upload did not match"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Could not check membership"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Storage or the access log unavailable"}},"summary":"Finish an upload","tags":["Files"]}},"/v1/files/{id}/content":{"get":{"description":"Redirects to a short-lived download link for a ready file. This path is the file's permanent link: it never expires, because each open is checked again. Pass `redirect=false` to get the link as JSON instead. Free.","operationId":"getFileContent","parameters":[{"description":"The file's id.","in":"path","name":"id","required":true,"schema":{"description":"The file's id.","example":"file_3f2a…","pattern":"^file_[0-9a-f]{32}$","type":"string"}},{"in":"query","name":"disposition","required":false,"schema":{"default":"attachment","enum":["inline","attachment"],"type":"string"}},{"description":"`false` answers with the link as JSON instead of redirecting.","in":"query","name":"redirect","required":false,"schema":{"default":"true","description":"`false` answers with the link as JSON instead of redirecting.","enum":["true","false"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"expiresAt":{"type":"string"},"oneTime":{"description":"`true` for a protected file: the link opens once, within 5 minutes, and only for you.","type":"boolean"},"url":{"type":"string"}},"required":["url","expiresAt","oneTime"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"The download link (with `redirect=false`)"},"302":{"description":"Redirect to the download link","headers":{"location":{"required":true,"schema":{"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Not signed in"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Not allowed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"No such file"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Conflicts with the file's state"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"The upload did not match"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Could not check membership"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Storage or the access log unavailable"}},"summary":"Open a file","tags":["Files"]}},"/v1/files/{id}/links":{"delete":{"description":"The owner or an editor removes a link. Removing a CRM record link also needs you to be able to see the record. Free.","operationId":"unlinkFile","parameters":[{"description":"The file's id.","in":"path","name":"id","required":true,"schema":{"description":"The file's id.","example":"file_3f2a…","pattern":"^file_[0-9a-f]{32}$","type":"string"}},{"description":"What the file belongs to, as `<type>:<id>`: `crm_record` (a CRM person or company, by its record id, e.g. `crm_record:lo:123`), `studio_table`, `ask_chat`, `ask_project` or `export_job`. You must be able to see a CRM record to link a file to it, and anyone who can see the record can view the standard files linked to it.","in":"query","name":"target","required":true,"schema":{"description":"What the file belongs to, as `<type>:<id>`: `crm_record` (a CRM person or company, by its record id, e.g. `crm_record:lo:123`), `studio_table`, `ask_chat`, `ask_project` or `export_job`. You must be able to see a CRM record to link a file to it, and anyone who can see the record can view the standard files linked to it.","example":"ask_chat:chat_123","maxLength":220,"minLength":3,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"type":"string"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"The file's links"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Not signed in"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Not allowed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"No such file"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Conflicts with the file's state"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"The upload did not match"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Could not check membership"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Storage or the access log unavailable"}},"summary":"Detach a file","tags":["Files"]},"post":{"description":"The owner or an editor attaches a file to a CRM record, a Studio table, a chat, a project or an export. Linking to a CRM record needs you to be able to see the record, and lets anyone who can see the record view the file if it is standard (a protected file stays shared person by person). Other links share the file with no one. Free.","operationId":"linkFile","parameters":[{"description":"The file's id.","in":"path","name":"id","required":true,"schema":{"description":"The file's id.","example":"file_3f2a…","pattern":"^file_[0-9a-f]{32}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileLinkCreate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"type":"string"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"The file's links"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Not signed in"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Not allowed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"No such file"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Conflicts with the file's state"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"The upload did not match"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Could not check membership"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Storage or the access log unavailable"}},"summary":"Attach a file to something","tags":["Files"]}},"/v1/files/{id}/revisions":{"post":{"description":"The owner or an editor replaces a ready file's bytes and keeps its id, shares and links. Declare the new size (and, optionally, SHA-256), PUT the bytes to `upload` with the headers given, then call complete. Until complete succeeds the file keeps its current contents; a mismatch leaves it unchanged. Free.","operationId":"createFileRevision","parameters":[{"description":"The file's id.","in":"path","name":"id","required":true,"schema":{"description":"The file's id.","example":"file_3f2a…","pattern":"^file_[0-9a-f]{32}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileRevisionCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"file":{"$ref":"#/components/schemas/File"},"upload":{"properties":{"expiresAt":{"type":"string"},"headers":{"additionalProperties":{"type":"string"},"description":"Send these headers with the PUT, exactly as given.","type":"object"},"method":{"enum":["PUT"],"type":"string"},"url":{"description":"Send the bytes here with HTTP PUT.","type":"string"}},"required":["url","method","headers","expiresAt"],"type":"object"}},"required":["file","upload"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"The file and the URL for its new bytes"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Not signed in"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Not allowed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"No such file"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Conflicts with the file's state"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"The upload did not match"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Could not check membership"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Storage or the access log unavailable"}},"summary":"Replace a file's contents","tags":["Files"]}},"/v1/files/{id}/shares":{"delete":{"description":"The owner removes a share. Anyone can remove a share to themselves (`user:<their id>`) to leave a file shared with them. Free.","operationId":"unshareFile","parameters":[{"description":"The file's id.","in":"path","name":"id","required":true,"schema":{"description":"The file's id.","example":"file_3f2a…","pattern":"^file_[0-9a-f]{32}$","type":"string"}},{"description":"Who the file is shared with: `user:<userId>`, `team:<teamId>`, or `org` for everyone in your organization.","in":"query","name":"principal","required":true,"schema":{"description":"Who the file is shared with: `user:<userId>`, `team:<teamId>`, or `org` for everyone in your organization.","example":"user:usr_123","maxLength":140,"minLength":3,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/FileShare"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"The file's shares"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Not signed in"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Not allowed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"No such file"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Conflicts with the file's state"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"The upload did not match"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Could not check membership"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Storage or the access log unavailable"}},"summary":"Stop sharing a file","tags":["Files"]},"post":{"description":"The owner shares a file with a person (`user:<id>`), a team (`team:<id>`) or the whole organization (`org`), as `viewer` (default) or `editor`. Sharing again changes the role. Free.","operationId":"shareFile","parameters":[{"description":"The file's id.","in":"path","name":"id","required":true,"schema":{"description":"The file's id.","example":"file_3f2a…","pattern":"^file_[0-9a-f]{32}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileShareCreate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/FileShare"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"The file's shares"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Not signed in"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Not allowed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"No such file"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Conflicts with the file's state"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"The upload did not match"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Could not check membership"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileError"}}},"description":"Storage or the access log unavailable"}},"summary":"Share a file","tags":["Files"]}},"/v1/graph/{entityType}/{id}/network":{"get":{"description":"Who an agent, loan officer, mortgage company or lender does the most deals with, and where: the top related entities of each kind with shared deals, dollar volume, deals in the last 12 months and the last deal date, plus the top counties and ZIP codes. Agent: loan officers, other agents, counties, ZIPs. Loan officer: agents, companies (past and current), lenders, counties, ZIPs. Company: loan officers, lenders, counties, ZIPs. Lender: loan officers, companies. Counts are recorded deals that could be tied to both sides. 1 credit per row of `data`.","operationId":"getNetwork","parameters":[{"description":"Whose network.","in":"path","name":"entityType","required":true,"schema":{"description":"Whose network.","enum":["agent","loan-officer","company","lender"],"example":"loan-officer","type":"string"}},{"description":"Agent id, NMLS id (loan officer, company) or lender id.","in":"path","name":"id","required":true,"schema":{"description":"Agent id, NMLS id (loan officer, company) or lender id.","example":"151263","pattern":"^\\P{Cc}{1,200}$","type":"string"}},{"description":"`allTime` (default), or `last12Months`: only relationships active in the last 12 months, ranked by those deals.","in":"query","name":"period","required":false,"schema":{"description":"`allTime` (default), or `last12Months`: only relationships active in the last 12 months, ranked by those deals.","enum":["allTime","last12Months"],"type":"string"}},{"description":"Per kind of relationship (1–50, default 10).","in":"query","name":"limit","required":false,"schema":{"description":"Per kind of relationship (1–50, default 10).","maximum":50,"minimum":1,"type":"integer"}},{"description":"Two-letter state: count only deals in it. Default: every state.","in":"query","name":"state","required":false,"schema":{"description":"Two-letter state: count only deals in it. Default: every state.","example":"TX","pattern":"^[A-Za-z]{2}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetworkResponse"}}},"description":"The entity's network"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetworkError"}}},"description":"`invalid_request` — the request is malformed."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetworkError"}}},"description":"Authentication required."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetworkError"}}},"description":"`not_found` — nothing on record for that id: no profile and no relationship."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetworkError"}}},"description":"`rate_limited` — too many requests from your organization in the last minute; `busy` — try again shortly. Wait `Retry-After` seconds."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetworkError"}}},"description":"`network_unavailable` — relationship data is not available right now. Try again later."}},"summary":"One entity's relationship network","tags":["Graph"]}},"/v1/instant-search":{"post":{"description":"Fast typeahead/autocomplete search across agents, originators, companies, and offices. Returns top matches per entity type. A bare NMLS ID resolves directly to its originator, company, or branch — including an originator who is in the NMLS registry with no production record yet (returned with `hasScoredData: false`). Use this for quick name lookups, not for filtered searches (use the entity-specific list endpoints for those). If you already have an entity ID, prefer getOriginator / getCompany / getBranch.","operationId":"instantSearch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstantSearchRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstantSearchResponse"}}},"description":"Search results grouped by entity"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeiliUnavailable"}}},"description":"Search backend not configured"}},"summary":"Instant multi-entity typeahead search","tags":["Search"]}},"/v1/integrations/hubspot/push":{"post":{"description":"Sends the given Model Match records into the HubSpot account you have connected, using the field mapping your workspace configured. Existing records are matched and updated rather than duplicated, so sending the same list twice does not create it twice. Every id you send comes back with an outcome — some records failing is normal and does not fail the rest. At most 100 records per request; send larger lists in batches. There is no undo: use `dryRun` first to see exactly what would be written. Charged per record actually written, at the same rate as fetching that record.","operationId":"pushToHubspot","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HubspotPushRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HubspotPushResponse"}}},"description":"Per-record outcome. Check `summary` for what landed."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HubspotError"}}},"description":"Validation or setup mismatch"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HubspotPaymentRequired"}}},"description":"Not enough credits to send this many records"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No active workspace"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HubspotError"}}},"description":"Refused before writing anything — not connected, wrong HubSpot account, or a mapping that cannot be applied safely"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HubspotError"}}},"description":"HubSpot or billing could not be reached. Nothing was sent."}},"summary":"Send records to your HubSpot account","tags":["Integrations"]}},"/v1/integrations/hubspot/status":{"get":{"description":"Reports whether your HubSpot account is connected, which record types your workspace has set up to send, and whether the connected account is the one that setup was built for. Read-only — call it before offering to send anything.","operationId":"getHubspotPushStatus","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HubspotStatusResponse"}}},"description":"Readiness per record type"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Check whether records can be sent to HubSpot","tags":["Integrations"]}},"/v1/lenders":{"post":{"description":"Search and list normalized lender names/identities with filters — resolves raw or variant lender names to canonical lender records. Use it to look up a lender by name or reconcile lender-name variants to a single canonical entity. If you only need how many lenders match and not the records themselves, send the same request body to `countLenders`.","operationId":"listLenders","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LenderListRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LenderListResponse"}}},"description":"Paginated list of lenders"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Search lenders with filters","tags":["Lenders"]}},"/v1/lenders/count":{"post":{"description":"Return the exact number of lenders matching the given filters. Accepts the same request body as `listLenders` (pagination and sort are ignored). Use this when you only need a total; to get the matching lenders themselves, send the same request body to `listLenders`.","operationId":"countLenders","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LenderListRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountResponse"}}},"description":"Exact count of matching lenders"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Count lenders matching filters","tags":["Lenders"],"x-mm-records-via":"listLenders"}},"/v1/lenders/{id}":{"get":{"operationId":"getLender","parameters":[{"description":"Lender canonical-name ID","in":"path","name":"id","required":true,"schema":{"description":"Lender canonical-name ID","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LenderDetailResponse"}}},"description":"Lender detail"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Lender not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large"}},"summary":"Get lender by ID","tags":["Lenders"]}},"/v1/lenders/{id}/breakdowns/cities":{"post":{"description":"Ranks the cities this lender's loans were secured in, by volume. Labels are Title Case so they match the city breakdowns on every other entity.","operationId":"lenderCities","parameters":[{"description":"Lender canonical-name ID","in":"path","name":"id","required":true,"schema":{"description":"Lender canonical-name ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownResponse"}}},"description":"Breakdown of this lender's loans by cities"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"City volume breakdown across this lender's loans","tags":["Lenders"]}},"/v1/lenders/{id}/breakdowns/companies":{"post":{"description":"Ranks the mortgage companies whose loans funded through this lender, by volume. Each label is the company's NMLS ID (with the company name resolved alongside it where available), so it chains straight into `GET /v1/companies/{nmlsId}`. Loans with no identified company are excluded.","operationId":"lenderCompanies","parameters":[{"description":"Lender canonical-name ID","in":"path","name":"id","required":true,"schema":{"description":"Lender canonical-name ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownResponse"}}},"description":"Breakdown of this lender's loans by companies"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Mortgage companies that send business to this lender","tags":["Lenders"]}},"/v1/lenders/{id}/breakdowns/counties":{"post":{"description":"Ranks the counties this lender's loans were secured in, by volume. Labels are county codes on this surface — the same axis every other county breakdown uses, so the two are directly comparable.","operationId":"lenderCounties","parameters":[{"description":"Lender canonical-name ID","in":"path","name":"id","required":true,"schema":{"description":"Lender canonical-name ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownResponse"}}},"description":"Breakdown of this lender's loans by counties"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"County volume breakdown across this lender's loans","tags":["Lenders"]}},"/v1/lenders/{id}/breakdowns/originators":{"post":{"description":"Ranks the loan officers whose loans funded through this lender, by volume. Each label is the loan officer's NMLS ID, so it chains straight into `GET /v1/originators/{nmlsId}`. Loans with no identified loan officer are excluded rather than collapsed into one unnavigable bucket.","operationId":"lenderOriginators","parameters":[{"description":"Lender canonical-name ID","in":"path","name":"id","required":true,"schema":{"description":"Lender canonical-name ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownResponse"}}},"description":"Breakdown of this lender's loans by originators"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Loan officers who send business to this lender","tags":["Lenders"]}},"/v1/lenders/{id}/breakdowns/states":{"post":{"description":"Ranks the states this lender's loans were secured in, by volume. Labels are two-letter state abbreviations.","operationId":"lenderStates","parameters":[{"description":"Lender canonical-name ID","in":"path","name":"id","required":true,"schema":{"description":"Lender canonical-name ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownResponse"}}},"description":"Breakdown of this lender's loans by states"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"State volume breakdown across this lender's loans","tags":["Lenders"]}},"/v1/loans":{"post":{"description":"Search and list individual public-record mortgage and deed loan records — one row per loan (purchase, refinance, origination). Filter by geography (state, county, city, zip), lender, originator, loan amount, interest rate, loan type/purpose, and recording date, with sorting and cursor pagination. This is the discrete per-loan record search: use it to find specific loans or build a filtered loan list. Each row carries the property address, loan terms, the originating loan officer, and `borrowerStatus` — so this is also how you pull a loan officer's own funded production (\"my closed loans\", \"my past clients\", \"my book of business\"): filter by `originator` (their NMLS id), and add `borrowerStatus` for borrowers still in the home — that is the five current-owner codes (`Current`, `R_CWCLO`, `R_CWNLO`, `E_CWCLO`, `E_CWNLO`), NOT `\"Current\"` alone, which omits everyone who has since refinanced. That is market data, not CRM data — it does not require the loan officer to have added anything to a CRM workspace. (For aggregate market rates and volumes use the market search; for one loan by its ID use the loan detail endpoint.) If you only need how many loans match and not the records themselves, send the same request body to `countLoans`.","operationId":"listLoans","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoanListRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoanListResponse"}}},"description":"Paginated list of loans"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error. Includes unresolvable location filters: a `city`/`county`/`state`/`zip` value that does not match a recognized location returns 400 rather than an empty result set. Resolve the name with `instantSearch` (use an id from its `results.locations[]`) or `suggestLocations` (use the `id` of a `source: \"dictionary\"` result), then pass that id back as the filter value."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Search individual loan records with filters","tags":["Loans"]}},"/v1/loans/analytics/chart":{"post":{"description":"Buckets the filtered loans by `slice` and ranks them by `measure`, descending. Party slices (`originator`, `broker`, `loanCompany`) are pageable: send `size` (1–1000) and follow `nextCursor` via `after` to walk the whole ranking, with `total` giving the (approximate) number of distinct parties. Other slices return their fixed top-N. `period` accepts rolling windows (`last30Days`, `last60Days`, `last90Days`, `previousMonth`, `currentMonth`) resolved in UTC; `/loans/analytics/summary` with the same filters and period returns the matching population totals.","operationId":"loansAnalyticsChart","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoanChartRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChartResponse"}}},"description":"Chart data. Money measures (`volume`, `avgSalePrice`, `avgListPrice`) are sentinel-guarded. Excludes values outside 0–100,000,000 — the source encodes unknown values as an out-of-range fill, and averaging them raw is wrong by orders of magnitude. The bound is applied before the metric and is not part of the public filter surface, so an equivalent range filter will not reproduce this figure exactly."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Configurable chart data (measure × slice)","tags":["Loans"]}},"/v1/loans/analytics/summary":{"post":{"operationId":"loansAnalyticsSummary","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoanSummaryRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleSummaryResponse"}}},"description":"Current + previous-period summary"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Market summary with previous-period comparison","tags":["Loans"]}},"/v1/loans/analytics/time-series":{"post":{"operationId":"loansAnalyticsTimeSeries","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoanTimeSeriesRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTimeSeriesResponse"}}},"description":"Time-series with previous-period comparison"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Volume / units over time","tags":["Loans"]}},"/v1/loans/bulk-delivery":{"post":{"description":"Queues an ECS task that dumps every matching loans document to S3 in the requested format. Returns 202 with a jobId; poll `GET /v1/loans/bulk-delivery/{jobId}` for status + the signed download URL.\n\n**Row limit.** Deliveries of up to 5,000 rows need no entitlement. Above that, the org's `bulk-delivery.loans` entitlement is required and its scope (row ceiling, row filters, allowed fields) governs the delivery; without it the request is rejected with 403 `entitlement_missing`. Pass `limit` at or below the ceiling to deliver a capped subset of a broader query. Email support@modelmatch.com to request a limit increase.\n\nDelivery is billed at 1 credit per row regardless of entitlement (deliveries submitted from the ModelMatch web app are not billed).\n\n**Push-target destination.** Pass `destination: { type: \"push-target\", targetId }` to have the finished rows sent to a configured push target instead of downloaded. The target is checked before anything is queued; a refusal returns the push target's status and `code` (`TARGET_NOT_FOUND` 404, `FORBIDDEN` 403, `PLAN_REQUIRED` 402, `TARGET_DISABLED` 409, `ENTITY_MISMATCH` 400). Limits and billing are the same as a file delivery.","operationId":"submitLoansBulkDelivery","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/LoanListRequest"},{"additionalProperties":false,"properties":{"columns":{"description":"A FORMATTED file: its columns, in order, with header labels and number formats — for `format` `csv` or `xlsx` only, and not combined with `fields` or a push-target `destination` (400 `columns_format_unsupported` / `columns_with_fields` / `columns_with_destination`). Every field a column reads is gated by the entitlement exactly as if it were listed in `fields`: a withheld field drops out of a column's fallback list, and a column with nothing left is omitted. An unknown field is a 400 `unknown_column_field`. No `id` column is added. A formatted `csv` starts with a UTF-8 byte-order mark and uses CRLF line endings, so Excel opens it with accented names intact. Columns may read any DTO field and any opt-in column `fields` documents, including the computed `governmentPct`, `branchCount`, `managerName` / `managerNmlsId` and `licensedSince`.","items":{"$ref":"#/components/schemas/BulkDeliveryColumn"},"maxItems":200,"minItems":1,"type":"array"},"destination":{"$ref":"#/components/schemas/BulkDeliveryDestination"},"fields":{"description":"Optional output column projection, named by the response DTO fields (the same camelCase fields the list endpoint returns, e.g. `city`, `interestRate`). Intersected with the entitlement scope's allowedFields and the entity's full column set. If empty after intersection, falls back to all columns. It also SELECTS the opt-in columns, which are not part of the list DTO and are never delivered unless named here: `communityLending` (properties, originators, companies, branches) — the Community Lending neighborhood profile, identical to the block on the entity's detail endpoint; `parties` (properties) — the mortgage parties attributed to the parcel, by attribution scope; `marketCount` / `countyCount` / `stateCount` / `zipCount` / `lenderCount` (originators) — the market-breadth rollups you can already filter on; and the computed `governmentPct` (originators: FHA + VA percent of loans, 0–100), `branchCount` (companies: NMLS branch count) and `managerName` / `managerNmlsId` (branches: the first branch manager) and `licensedSince` (branches: first-licensed date, the earliest license `issueDate`, YYYY-MM-DD). Agents also offer `email2` / `phone2` (the best-ranked email / phone distinct from `email` / `phone`, admitted by the `email` / `phone` entitlement field), `bestEmail` / `bestEmail2` and `bestPhone` / `bestPhone2` (the best and runner-up contact over every email / phone on the record, `email` / `phone` included — the pair the ModelMatch web app's agent export shows; same entitlement fields), `officePhone` (admitted by `phone`), `activeListings` (current active listings; null when unknown), and the profile-link columns `facebook`, `instagram`, `linkedin`, `twitter`, `youtube`, `tiktok`, `zillow`, `otherLinks` (a `; `-joined list of profile URLs on no known platform) — all admitted by the `links` entitlement field. Loans offer the list row's transaction-export fields (`employerName`, `employerNmlsId`, `brokerName`, `titleCompanyName`, `soldAgentName`, `listAgentName`, `coListAgentName`, `buyer1FirstMiddle` … `seller2Last`). In `csv` and `parquet` the two block columns are JSON-encoded cells; in `json` and `ndjson` they are nested objects. Windowed production (originators, agents, companies, branches): name `<field>_<n>mo` for n in 3, 6, 12, 14, 18, 24 to get a production field for that trailing window regardless of `period` — e.g. `volume_3mo`, `units_6mo`, `purchaseVolume_24mo`. Available for originators `volume`, `units`, `avgLoanAmount`, `purchaseVolume`, `purchaseUnits`, `refinanceVolume`, `refinanceUnits`, `conventionalPct`, `fhaPct`, `vaPct`; agents `volume`, `units`, `avgSoldPrice`, `buyerVolume`, `buyerUnits`, `sellerVolume`, `sellerUnits`, `totalOriginatorsWorkedWith`, `totalCompaniesWorkedWith`, `totalLendersWorkedWith`; companies `volume`, `units`, `avgLoanAmount`, `loCount`; branches `volume`, `units`, `avgLoanAmount`, `purchasePct`, `refinancePct`, `loCount`. Numbers (null when the window has no data); an entitlement that allows a field allows every window of it.","items":{"minLength":1,"type":"string"},"type":"array"},"format":{"$ref":"#/components/schemas/BulkDeliveryFormat"},"limit":{"description":"Optional hard cap on the number of rows delivered — and therefore billed (1 credit / row). The job delivers the first `limit` rows in sort order (default newest-first) and bills only for those. If the query matches fewer than `limit`, all matches are delivered. Distinct from the page-size `size` field, which is ignored on this endpoint. The row ceiling still applies — 5,000 without the entity's bulk-delivery entitlement, or the entitlement's `maxRows` with it. A `limit` above the ceiling is rejected, but a `limit` at or below it lets you export a capped top-N even when the full match exceeds the ceiling — which is the intended way to run a broad query under the 5,000-row allowance.","example":5000,"exclusiveMinimum":true,"minimum":0,"type":"integer"}},"type":"object"}]}}}},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeliverySubmitResponse"}}},"description":"Job queued; ECS task launched"},"400":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/BulkDeliveryPreflightExceeded"},{"$ref":"#/components/schemas/BulkDeliveryPushTargetError"},{"$ref":"#/components/schemas/BulkDeliveryColumnsError"}]}}},"description":"Validation failure (incl. `format_required`: a file delivery needs `format`; a refused `columns` request), delivery would exceed the entitlement's maxRows, OR the push target does not accept this entity (`ENTITY_MISMATCH`)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"402":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/BulkDeliveryInsufficientCredits"},{"$ref":"#/components/schemas/BulkDeliveryPushTargetError"}]}}},"description":"Insufficient credits (balance < estimatedTotal, at 1 credit per row), OR the plan does not include push targets (`PLAN_REQUIRED`)"},"403":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/BulkDeliveryForbidden"},{"$ref":"#/components/schemas/BulkDeliveryPushTargetError"},{"$ref":"#/components/schemas/BulkDeliveryInsufficientScope"}]}}},"description":"Delivery exceeds the 5,000-row limit available without the `bulk-delivery.loans` entitlement (lower `limit`, narrow the filters, or contact support for a limit increase), OR you may not use the push target (`FORBIDDEN`), OR a scoped token named a push-target destination without `push-targets:send` (`insufficient_scope`)."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeliveryPushTargetError"}}},"description":"Push target not found (`TARGET_NOT_FOUND`)"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeliveryPushTargetError"}}},"description":"Push target is disabled (`TARGET_DISABLED`)"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Preflight / S3 / DDB / ECS launch failure, the push-target check could not reach the auth server, or the credit balance could not be read (`billing_unavailable` — retry; a paid delivery is never queued unverified)"}},"summary":"Submit a bulk-delivery job for loans","tags":["Loans"]}},"/v1/loans/bulk-delivery/{jobId}":{"delete":{"description":"Cancels a queued or running loans delivery job.\n\nThe job is marked `cancelled` immediately; the container running it notices on its next page boundary and stops. Because a delivery is billed once, at the end, **a cancelled job is never charged** — no credits are debited and there is nothing to refund. No partial file is written.\n\nIdempotent-ish: cancelling a job that has already finished (or was already cancelled) returns 409 and changes nothing. Poll `GET /v1/loans/bulk-delivery/{jobId}` for the settled state.","operationId":"cancelLoansBulkDeliveryJob","parameters":[{"description":"Job ID returned by `POST /v1/loans/bulk-delivery`","in":"path","name":"jobId","required":true,"schema":{"description":"Job ID returned by `POST /v1/loans/bulk-delivery`","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeliveryStatusResponse"}}},"description":"Job cancelled; body is its settled status"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Caller does not own this job"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Job not found (or expired past 30d TTL)"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Job already finished — nothing to cancel"}},"summary":"Cancel a bulk-delivery job for loans","tags":["Loans"]},"get":{"operationId":"getLoansBulkDeliveryJob","parameters":[{"description":"Job ID returned by `POST /v1/loans/bulk-delivery`","in":"path","name":"jobId","required":true,"schema":{"description":"Job ID returned by `POST /v1/loans/bulk-delivery`","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeliveryStatusResponse"}}},"description":"Job status (resultsUrl re-signed if completed)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Caller does not own this job"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Job not found (or expired past 30d TTL)"}},"summary":"Get bulk-delivery job status for loans","tags":["Loans"]}},"/v1/loans/count":{"post":{"description":"Return the exact number of loans matching the given filters. Accepts the same request body as `listLoans` (pagination and sort are ignored). Use this when you only need a total; to get the matching loans themselves, send the same request body to `listLoans`.","operationId":"countLoans","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoanListRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountResponse"}}},"description":"Exact count of matching loans"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Count loans matching filters","tags":["Loans"],"x-mm-records-via":"listLoans"}},"/v1/loans/{id}":{"get":{"operationId":"getLoan","parameters":[{"description":"Loan ID","in":"path","name":"id","required":true,"schema":{"description":"Loan ID","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoanDetailResponse"}}},"description":"Loan detail"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Loan not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large"}},"summary":"Get loan by ID","tags":["Loans"]}},"/v1/loans/{id}/related":{"get":{"description":"Return the ids of records of another type that are linked to this record. Links resolve by identifier, strongest identifier first, and equally-trusted identifiers are combined — a company's linked loans cover every role it holds on a loan, not just the first one found. The response reports which strength was used: `primary` is the canonical identifier for that pair, `secondary` is a real but weaker alternate used only when the record carries nothing better. This is a lightweight index: it returns ids and a count, not full records. For filtering, sorting, pagination and full detail, use the named endpoint for the pair (for example the originator loans endpoint) and fetch records by id.","operationId":"loanRelated","parameters":[{"description":"Loan id","in":"path","name":"id","required":true,"schema":{"description":"Loan id","type":"string"}},{"description":"Type of record to link to","in":"query","name":"to","required":true,"schema":{"description":"Type of record to link to","enum":["agents","companies","originators","properties","sales"],"type":"string"}},{"description":"Maximum ids to return (default 25, max 200)","in":"query","name":"limit","required":false,"schema":{"description":"Maximum ids to return (default 25, max 200)","maximum":200,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelatedResponse"}}},"description":"Linked record ids"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Record not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Records linked to this one","tags":["Related"]}},"/v1/locations/retrieve/{mapboxId}":{"get":{"description":"Retrieve normalized location details (city, state, county, zip, coordinates) for a suggestion ID from `suggestLocations`. A location dictionary id resolves from Model Match's own data and echoes back its `id`; any other id resolves through Mapbox.","operationId":"retrieveLocation","parameters":[{"description":"Mapbox suggestion ID","in":"path","name":"mapboxId","required":true,"schema":{"description":"Mapbox suggestion ID","minLength":1,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationRetrieveResponse"}}},"description":"Normalized location details"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Retrieve normalized location details","tags":["Locations"]}},"/v1/locations/suggest":{"get":{"description":"Autocomplete location search. Cities and counties come from Model Match's own location dictionary and carry an `id` (e.g. `city_mo_saint-louis`) that city / county filters accept — including for places our data spells differently than a mapping provider does. Street addresses come from Mapbox. Use the `mapbox_id` from any suggestion with `retrieveLocation` to get normalized geographic details and coordinates.","operationId":"suggestLocations","parameters":[{"description":"Search text","in":"query","name":"q","required":true,"schema":{"description":"Search text","minLength":1,"type":"string"}},{"description":"Max results (1-10, default 5)","in":"query","name":"limit","required":false,"schema":{"default":5,"description":"Max results (1-10, default 5)","maximum":10,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationSuggestResponse"}}},"description":"Location suggestions"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Autocomplete location search","tags":["Locations"]}},"/v1/market/analytics/chart":{"post":{"operationId":"marketAnalyticsChart","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketChartRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChartResponse"}}},"description":"Chart data with measure/slice breakdown"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Market measure by dimension breakdown","tags":["Market"]}},"/v1/market/analytics/summary":{"post":{"operationId":"marketAnalyticsSummary","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketSummaryRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketSummaryResponse"}}},"description":"16 market metrics + previous-period comparison"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Market summary (volume, units, rate, loan amount, credit score, LTV, DTI, income, etc.) with previous-period comparison","tags":["Market"]}},"/v1/market/analytics/time-series":{"post":{"operationId":"marketAnalyticsTimeSeries","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketTimeSeriesRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketTimeSeriesResponse"}}},"description":"Time series with previous-period comparison. Each bucket carries `volume`, `units`, and `measureValue` for the requested `measure`. With `forecast` in the request, a `forecast` block is appended."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForecastError"}}},"description":"Validation error. With `forecast`, `code` says which rule tripped: non-monthly interval, an average measure, or under 24 months of history."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForecastError"}}},"description":"Only with `forecast`: the forecast service is unreachable or not configured for this stage. The history itself is fine — retry without `forecast` for an immediate answer. Also returned as `SearchUnavailable` (`error`: `search_timeout` / `search_overloaded`) when the search ran out of time or the cluster shed it."}},"summary":"Market metrics over time","tags":["Market"]}},"/v1/market/community-lending":{"post":{"description":"The aggregate Community Lending profile of the originations matching your filters: the share that landed in low- or moderate-income neighborhoods, the CRA-eligible share, the distribution across the four neighborhood income bands, and the majority-minority neighborhood share. Values describe the U.S. Census tract (neighborhood) as a whole — tract-level aggregate statistics, never an individual, household or applicant attribute. Percentages are 0-100. This is a MARKET-LEVEL view only — the underlying origination data carries no lender, loan officer or borrower identity, and no figure here is attributable to one. Every share is reported next to the count it is a share of, because the three designations have three different coverage levels; read the denominator before comparing markets.","operationId":"marketCommunityLending","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketCommunityLendingRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketCommunityLendingResponse"}}},"description":"Community Lending mix, optionally sliced by dimension"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Community Lending mix of a market's originations","tags":["Market"]}},"/v1/market/movement/activity":{"get":{"description":"Monthly series of newly licensed loan officers, loan officers with an open employment at month end, and loan officers who left the industry (no open employment; last one ended that month). `becameInactive` (license authorization lapses) is not available and is always null. `all_time` charts the last 60 months. A move is dated by the loan officer's FIRST record at the new company; a loan officer licensed in several states counts once per company. Location filters use the loan officer's CURRENT NMLS location. Results refresh weekly. A response not ready within 25 s answers `202` (`MovementComputing`): repeat the same request after `retryAfterMs`.","operationId":"marketMovementActivity","parameters":[{"description":"Reporting window. `last_N_months` = the N most recent COMPLETED calendar months (the current month is excluded); `year_to_date` = Jan 1 through the end of last month; `YYYY` (or `fy_YYYY`) = that calendar year; `all_time`. Default `last_12_months`.","in":"query","name":"dateRange","required":false,"schema":{"description":"Reporting window. `last_N_months` = the N most recent COMPLETED calendar months (the current month is excluded); `year_to_date` = Jan 1 through the end of last month; `YYYY` (or `fy_YYYY`) = that calendar year; `all_time`. Default `last_12_months`.","example":"last_12_months","pattern":"^(?:last_\\d{1,3}_months|year_to_date|all_time|(?:fy_|fiscal_)?\\d{4})$","type":"string"}},{"description":"Two-letter state. Matches the loan officer's CURRENT NMLS location, not where they were when they moved.","in":"query","name":"state","required":false,"schema":{"description":"Two-letter state. Matches the loan officer's CURRENT NMLS location, not where they were when they moved.","example":"TX","pattern":"^[A-Za-z]{2}$","type":"string"}},{"description":"Comma-separated two-letter states (e.g. a region). ORed; combined with `state` when both are sent.","in":"query","name":"states","required":false,"schema":{"description":"Comma-separated two-letter states (e.g. a region). ORed; combined with `state` when both are sent.","example":"WA,OR,ID","pattern":"^[A-Za-z]{2}(?:,[A-Za-z]{2})*$","type":"string"}},{"description":"Exact city name of the loan officer's current NMLS location. Pair with `state`.","in":"query","name":"city","required":false,"schema":{"description":"Exact city name of the loan officer's current NMLS location. Pair with `state`.","maxLength":100,"minLength":1,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MovementActivity"}}},"description":"OK"},"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MovementComputing"}}},"description":"Still computing — poll the same request after `retryAfterMs`. See `MovementComputing`.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","required":true,"schema":{"description":"Seconds to wait before retrying.","example":"5","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Monthly NMLS activity: newly licensed, active, leaving","tags":["Market"]}},"/v1/market/movement/by-state":{"get":{"description":"Loan officers who changed companies in the window, grouped by state (all states) and city (top `limit`), each with the company that gained the most of them. A move is dated by the loan officer's FIRST record at the new company; a loan officer licensed in several states counts once per company. Location filters use the loan officer's CURRENT NMLS location. Results refresh weekly. A response not ready within 25 s answers `202` (`MovementComputing`): repeat the same request after `retryAfterMs`.","operationId":"marketMovementByState","parameters":[{"description":"Reporting window. `last_N_months` = the N most recent COMPLETED calendar months (the current month is excluded); `year_to_date` = Jan 1 through the end of last month; `YYYY` (or `fy_YYYY`) = that calendar year; `all_time`. Default `last_12_months`.","in":"query","name":"dateRange","required":false,"schema":{"description":"Reporting window. `last_N_months` = the N most recent COMPLETED calendar months (the current month is excluded); `year_to_date` = Jan 1 through the end of last month; `YYYY` (or `fy_YYYY`) = that calendar year; `all_time`. Default `last_12_months`.","example":"last_12_months","pattern":"^(?:last_\\d{1,3}_months|year_to_date|all_time|(?:fy_|fiscal_)?\\d{4})$","type":"string"}},{"description":"Two-letter state. Matches the loan officer's CURRENT NMLS location, not where they were when they moved.","in":"query","name":"state","required":false,"schema":{"description":"Two-letter state. Matches the loan officer's CURRENT NMLS location, not where they were when they moved.","example":"TX","pattern":"^[A-Za-z]{2}$","type":"string"}},{"description":"Comma-separated two-letter states (e.g. a region). ORed; combined with `state` when both are sent.","in":"query","name":"states","required":false,"schema":{"description":"Comma-separated two-letter states (e.g. a region). ORed; combined with `state` when both are sent.","example":"WA,OR,ID","pattern":"^[A-Za-z]{2}(?:,[A-Za-z]{2})*$","type":"string"}},{"description":"Exact city name of the loan officer's current NMLS location. Pair with `state`.","in":"query","name":"city","required":false,"schema":{"description":"Exact city name of the loan officer's current NMLS location. Pair with `state`.","maxLength":100,"minLength":1,"type":"string"}},{"description":"Comma-separated company categories (`BANK`, `CU`, `OTHER`) applied to the company whose roster changed — the destination for arrivals, the company left for departures.","in":"query","name":"companyCategory","required":false,"schema":{"description":"Comma-separated company categories (`BANK`, `CU`, `OTHER`) applied to the company whose roster changed — the destination for arrivals, the company left for departures.","example":"BANK,CU","pattern":"^(?:BANK|CU|OTHER)(?:,(?:BANK|CU|OTHER))*$","type":"string"}},{"description":"City rows to return (default 25, max 100). All states are always returned.","in":"query","name":"limit","required":false,"schema":{"description":"City rows to return (default 25, max 100). All states are always returned.","maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MovementByState"}}},"description":"OK"},"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MovementComputing"}}},"description":"Still computing — poll the same request after `retryAfterMs`. See `MovementComputing`.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","required":true,"schema":{"description":"Seconds to wait before retrying.","example":"5","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Loan officer movement by state and city","tags":["Market"]}},"/v1/market/movement/cohort-payoff":{"get":{"description":"For loan officers who moved in the window (default last 24 months), annualized production at the previous employer vs the new one, bucketed by pre-move tier (Low <25, Mid 25–99, High 100+ units/yr). Each side is annualized over the months actually spent there inside a trailing 24-month production window; movers with fewer than `windowMonths` months on either side are excluded. A move is dated by the loan officer's FIRST record at the new company; a loan officer licensed in several states counts once per company. Location filters use the loan officer's CURRENT NMLS location. Results refresh weekly. A response not ready within 25 s answers `202` (`MovementComputing`): repeat the same request after `retryAfterMs`.","operationId":"marketMovementCohortPayoff","parameters":[{"description":"Reporting window. `last_N_months` = the N most recent COMPLETED calendar months (the current month is excluded); `year_to_date` = Jan 1 through the end of last month; `YYYY` (or `fy_YYYY`) = that calendar year; `all_time`. Default `last_12_months`.","in":"query","name":"dateRange","required":false,"schema":{"description":"Reporting window. `last_N_months` = the N most recent COMPLETED calendar months (the current month is excluded); `year_to_date` = Jan 1 through the end of last month; `YYYY` (or `fy_YYYY`) = that calendar year; `all_time`. Default `last_12_months`.","example":"last_12_months","pattern":"^(?:last_\\d{1,3}_months|year_to_date|all_time|(?:fy_|fiscal_)?\\d{4})$","type":"string"}},{"description":"Two-letter state. Matches the loan officer's CURRENT NMLS location, not where they were when they moved.","in":"query","name":"state","required":false,"schema":{"description":"Two-letter state. Matches the loan officer's CURRENT NMLS location, not where they were when they moved.","example":"TX","pattern":"^[A-Za-z]{2}$","type":"string"}},{"description":"Comma-separated two-letter states (e.g. a region). ORed; combined with `state` when both are sent.","in":"query","name":"states","required":false,"schema":{"description":"Comma-separated two-letter states (e.g. a region). ORed; combined with `state` when both are sent.","example":"WA,OR,ID","pattern":"^[A-Za-z]{2}(?:,[A-Za-z]{2})*$","type":"string"}},{"description":"Exact city name of the loan officer's current NMLS location. Pair with `state`.","in":"query","name":"city","required":false,"schema":{"description":"Exact city name of the loan officer's current NMLS location. Pair with `state`.","maxLength":100,"minLength":1,"type":"string"}},{"description":"Comma-separated company categories (`BANK`, `CU`, `OTHER`) applied to the company whose roster changed — the destination for arrivals, the company left for departures.","in":"query","name":"companyCategory","required":false,"schema":{"description":"Comma-separated company categories (`BANK`, `CU`, `OTHER`) applied to the company whose roster changed — the destination for arrivals, the company left for departures.","example":"BANK,CU","pattern":"^(?:BANK|CU|OTHER)(?:,(?:BANK|CU|OTHER))*$","type":"string"}},{"description":"Minimum months a mover must have on EACH side of the move inside the 24-month production window (default 3).","in":"query","name":"windowMonths","required":false,"schema":{"description":"Minimum months a mover must have on EACH side of the move inside the 24-month production window (default 3).","enum":["3","6","12"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MovementCohortPayoff"}}},"description":"OK"},"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MovementComputing"}}},"description":"Still computing — poll the same request after `retryAfterMs`. See `MovementComputing`.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","required":true,"schema":{"description":"Seconds to wait before retrying.","example":"5","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Did the move pay off? Production before vs after moving","tags":["Market"]}},"/v1/market/movement/most-gained":{"get":{"description":"Companies ranked by loan officers gained in the window (or by net = gained − lost with `rankBy=net`). Each row carries gained, lost and net, plus the trailing-14-month production of the loan officers on the ranked side. A move is dated by the loan officer's FIRST record at the new company; a loan officer licensed in several states counts once per company. Location filters use the loan officer's CURRENT NMLS location. Results refresh weekly. A response not ready within 25 s answers `202` (`MovementComputing`): repeat the same request after `retryAfterMs`.","operationId":"marketMovementMostGained","parameters":[{"description":"Reporting window. `last_N_months` = the N most recent COMPLETED calendar months (the current month is excluded); `year_to_date` = Jan 1 through the end of last month; `YYYY` (or `fy_YYYY`) = that calendar year; `all_time`. Default `last_12_months`.","in":"query","name":"dateRange","required":false,"schema":{"description":"Reporting window. `last_N_months` = the N most recent COMPLETED calendar months (the current month is excluded); `year_to_date` = Jan 1 through the end of last month; `YYYY` (or `fy_YYYY`) = that calendar year; `all_time`. Default `last_12_months`.","example":"last_12_months","pattern":"^(?:last_\\d{1,3}_months|year_to_date|all_time|(?:fy_|fiscal_)?\\d{4})$","type":"string"}},{"description":"Two-letter state. Matches the loan officer's CURRENT NMLS location, not where they were when they moved.","in":"query","name":"state","required":false,"schema":{"description":"Two-letter state. Matches the loan officer's CURRENT NMLS location, not where they were when they moved.","example":"TX","pattern":"^[A-Za-z]{2}$","type":"string"}},{"description":"Comma-separated two-letter states (e.g. a region). ORed; combined with `state` when both are sent.","in":"query","name":"states","required":false,"schema":{"description":"Comma-separated two-letter states (e.g. a region). ORed; combined with `state` when both are sent.","example":"WA,OR,ID","pattern":"^[A-Za-z]{2}(?:,[A-Za-z]{2})*$","type":"string"}},{"description":"Exact city name of the loan officer's current NMLS location. Pair with `state`.","in":"query","name":"city","required":false,"schema":{"description":"Exact city name of the loan officer's current NMLS location. Pair with `state`.","maxLength":100,"minLength":1,"type":"string"}},{"description":"Comma-separated company categories (`BANK`, `CU`, `OTHER`) applied to the company whose roster changed — the destination for arrivals, the company left for departures.","in":"query","name":"companyCategory","required":false,"schema":{"description":"Comma-separated company categories (`BANK`, `CU`, `OTHER`) applied to the company whose roster changed — the destination for arrivals, the company left for departures.","example":"BANK,CU","pattern":"^(?:BANK|CU|OTHER)(?:,(?:BANK|CU|OTHER))*$","type":"string"}},{"description":"`count` (default) ranks by LOs gained (most-gained) or lost (most-lost); `net` ranks by gained − lost (descending for most-gained, ascending for most-lost).","in":"query","name":"rankBy","required":false,"schema":{"description":"`count` (default) ranks by LOs gained (most-gained) or lost (most-lost); `net` ranks by gained − lost (descending for most-gained, ascending for most-lost).","enum":["count","net"],"type":"string"}},{"description":"Rows to return (default 10, max 100).","in":"query","name":"limit","required":false,"schema":{"description":"Rows to return (default 10, max 100).","maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MovementCompanies"}}},"description":"OK"},"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MovementComputing"}}},"description":"Still computing — poll the same request after `retryAfterMs`. See `MovementComputing`.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","required":true,"schema":{"description":"Seconds to wait before retrying.","example":"5","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Companies that gained the most loan officers","tags":["Market"]}},"/v1/market/movement/most-lost":{"get":{"description":"Companies ranked by loan officers lost in the window (or by net = gained − lost with `rankBy=net`). Each row carries gained, lost and net, plus the trailing-14-month production of the loan officers on the ranked side. A move is dated by the loan officer's FIRST record at the new company; a loan officer licensed in several states counts once per company. Location filters use the loan officer's CURRENT NMLS location. Results refresh weekly. A response not ready within 25 s answers `202` (`MovementComputing`): repeat the same request after `retryAfterMs`.","operationId":"marketMovementMostLost","parameters":[{"description":"Reporting window. `last_N_months` = the N most recent COMPLETED calendar months (the current month is excluded); `year_to_date` = Jan 1 through the end of last month; `YYYY` (or `fy_YYYY`) = that calendar year; `all_time`. Default `last_12_months`.","in":"query","name":"dateRange","required":false,"schema":{"description":"Reporting window. `last_N_months` = the N most recent COMPLETED calendar months (the current month is excluded); `year_to_date` = Jan 1 through the end of last month; `YYYY` (or `fy_YYYY`) = that calendar year; `all_time`. Default `last_12_months`.","example":"last_12_months","pattern":"^(?:last_\\d{1,3}_months|year_to_date|all_time|(?:fy_|fiscal_)?\\d{4})$","type":"string"}},{"description":"Two-letter state. Matches the loan officer's CURRENT NMLS location, not where they were when they moved.","in":"query","name":"state","required":false,"schema":{"description":"Two-letter state. Matches the loan officer's CURRENT NMLS location, not where they were when they moved.","example":"TX","pattern":"^[A-Za-z]{2}$","type":"string"}},{"description":"Comma-separated two-letter states (e.g. a region). ORed; combined with `state` when both are sent.","in":"query","name":"states","required":false,"schema":{"description":"Comma-separated two-letter states (e.g. a region). ORed; combined with `state` when both are sent.","example":"WA,OR,ID","pattern":"^[A-Za-z]{2}(?:,[A-Za-z]{2})*$","type":"string"}},{"description":"Exact city name of the loan officer's current NMLS location. Pair with `state`.","in":"query","name":"city","required":false,"schema":{"description":"Exact city name of the loan officer's current NMLS location. Pair with `state`.","maxLength":100,"minLength":1,"type":"string"}},{"description":"Comma-separated company categories (`BANK`, `CU`, `OTHER`) applied to the company whose roster changed — the destination for arrivals, the company left for departures.","in":"query","name":"companyCategory","required":false,"schema":{"description":"Comma-separated company categories (`BANK`, `CU`, `OTHER`) applied to the company whose roster changed — the destination for arrivals, the company left for departures.","example":"BANK,CU","pattern":"^(?:BANK|CU|OTHER)(?:,(?:BANK|CU|OTHER))*$","type":"string"}},{"description":"`count` (default) ranks by LOs gained (most-gained) or lost (most-lost); `net` ranks by gained − lost (descending for most-gained, ascending for most-lost).","in":"query","name":"rankBy","required":false,"schema":{"description":"`count` (default) ranks by LOs gained (most-gained) or lost (most-lost); `net` ranks by gained − lost (descending for most-gained, ascending for most-lost).","enum":["count","net"],"type":"string"}},{"description":"Rows to return (default 10, max 100).","in":"query","name":"limit","required":false,"schema":{"description":"Rows to return (default 10, max 100).","maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MovementCompanies"}}},"description":"OK"},"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MovementComputing"}}},"description":"Still computing — poll the same request after `retryAfterMs`. See `MovementComputing`.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","required":true,"schema":{"description":"Seconds to wait before retrying.","example":"5","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Companies that lost the most loan officers","tags":["Market"]}},"/v1/market/movement/movers":{"get":{"description":"The loan officers who moved to a new company in the window, with previous and new employer, move date, current location and production. `sort=volume` returns the highest producers who moved (notable moves); `sort=date` pages every move newest first. A move is dated by the loan officer's FIRST record at the new company; a loan officer licensed in several states counts once per company. Location filters use the loan officer's CURRENT NMLS location. Results refresh weekly. A response not ready within 25 s answers `202` (`MovementComputing`): repeat the same request after `retryAfterMs`.","operationId":"marketMovementMovers","parameters":[{"description":"Reporting window. `last_N_months` = the N most recent COMPLETED calendar months (the current month is excluded); `year_to_date` = Jan 1 through the end of last month; `YYYY` (or `fy_YYYY`) = that calendar year; `all_time`. Default `last_12_months`.","in":"query","name":"dateRange","required":false,"schema":{"description":"Reporting window. `last_N_months` = the N most recent COMPLETED calendar months (the current month is excluded); `year_to_date` = Jan 1 through the end of last month; `YYYY` (or `fy_YYYY`) = that calendar year; `all_time`. Default `last_12_months`.","example":"last_12_months","pattern":"^(?:last_\\d{1,3}_months|year_to_date|all_time|(?:fy_|fiscal_)?\\d{4})$","type":"string"}},{"description":"Two-letter state. Matches the loan officer's CURRENT NMLS location, not where they were when they moved.","in":"query","name":"state","required":false,"schema":{"description":"Two-letter state. Matches the loan officer's CURRENT NMLS location, not where they were when they moved.","example":"TX","pattern":"^[A-Za-z]{2}$","type":"string"}},{"description":"Comma-separated two-letter states (e.g. a region). ORed; combined with `state` when both are sent.","in":"query","name":"states","required":false,"schema":{"description":"Comma-separated two-letter states (e.g. a region). ORed; combined with `state` when both are sent.","example":"WA,OR,ID","pattern":"^[A-Za-z]{2}(?:,[A-Za-z]{2})*$","type":"string"}},{"description":"Exact city name of the loan officer's current NMLS location. Pair with `state`.","in":"query","name":"city","required":false,"schema":{"description":"Exact city name of the loan officer's current NMLS location. Pair with `state`.","maxLength":100,"minLength":1,"type":"string"}},{"description":"Comma-separated company categories (`BANK`, `CU`, `OTHER`) applied to the company whose roster changed — the destination for arrivals, the company left for departures.","in":"query","name":"companyCategory","required":false,"schema":{"description":"Comma-separated company categories (`BANK`, `CU`, `OTHER`) applied to the company whose roster changed — the destination for arrivals, the company left for departures.","example":"BANK,CU","pattern":"^(?:BANK|CU|OTHER)(?:,(?:BANK|CU|OTHER))*$","type":"string"}},{"description":"Destination company.","in":"query","name":"companyNmlsId","required":false,"schema":{"description":"Destination company.","type":"string"}},{"description":"Previous company.","in":"query","name":"fromCompanyNmlsId","required":false,"schema":{"description":"Previous company.","type":"string"}},{"description":"`date` (default): most recent moves first, one row per move. `volume`: the highest-producing movers first (trailing 14 months), one row per loan officer — scans the top producers, so `total` is null.","in":"query","name":"sort","required":false,"schema":{"description":"`date` (default): most recent moves first, one row per move. `volume`: the highest-producing movers first (trailing 14 months), one row per loan officer — scans the top producers, so `total` is null.","enum":["date","volume"],"type":"string"}},{"in":"query","name":"page","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}},{"description":"Rows to return (default 25, max 100).","in":"query","name":"limit","required":false,"schema":{"description":"Rows to return (default 25, max 100).","maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MovementMovers"}}},"description":"OK"},"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MovementComputing"}}},"description":"Still computing — poll the same request after `retryAfterMs`. See `MovementComputing`.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","required":true,"schema":{"description":"Seconds to wait before retrying.","example":"5","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Loan officers who changed companies","tags":["Market"]}},"/v1/market/movement/rankings":{"get":{"description":"The top 100 loan officers for a calendar year by total volume, units, or FHA / VA / purchase / refinance volume, with current employer and retail / banker / broker type. A move is dated by the loan officer's FIRST record at the new company; a loan officer licensed in several states counts once per company. Location filters use the loan officer's CURRENT NMLS location. Results refresh weekly. A response not ready within 25 s answers `202` (`MovementComputing`): repeat the same request after `retryAfterMs`.","operationId":"marketMovementRankings","parameters":[{"description":"Ranking metric (default `total_volume`).","in":"query","name":"subcategory","required":false,"schema":{"description":"Ranking metric (default `total_volume`).","enum":["total_volume","most_units","top_fha","top_va","top_purchase","top_refinance"],"type":"string"}},{"description":"Calendar year to rank (default: last year).","in":"query","name":"year","required":false,"schema":{"description":"Calendar year to rank (default: last year).","pattern":"^\\d{4}$","type":"string"}},{"in":"query","name":"page","required":false,"schema":{"maximum":4,"minimum":1,"type":"integer"}},{"description":"Rows to return (default 25, max 100).","in":"query","name":"limit","required":false,"schema":{"description":"Rows to return (default 25, max 100).","maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MovementRankings"}}},"description":"OK"},"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MovementComputing"}}},"description":"Still computing — poll the same request after `retryAfterMs`. See `MovementComputing`.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","required":true,"schema":{"description":"Seconds to wait before retrying.","example":"5","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Top-100 loan officer rankings for a year","tags":["Market"]}},"/v1/market/movement/stats":{"get":{"description":"Period totals of loan-officer movement: company joins, company-to-company transitions, complete company departures, industry exits, newly licensed loan officers, the working head-count at both ends of the window and its net change, plus the trailing-14-month production of the loan officers who moved. A move is dated by the loan officer's FIRST record at the new company; a loan officer licensed in several states counts once per company. Location filters use the loan officer's CURRENT NMLS location. Results refresh weekly. A response not ready within 25 s answers `202` (`MovementComputing`): repeat the same request after `retryAfterMs`.","operationId":"marketMovementStats","parameters":[{"description":"Reporting window. `last_N_months` = the N most recent COMPLETED calendar months (the current month is excluded); `year_to_date` = Jan 1 through the end of last month; `YYYY` (or `fy_YYYY`) = that calendar year; `all_time`. Default `last_12_months`.","in":"query","name":"dateRange","required":false,"schema":{"description":"Reporting window. `last_N_months` = the N most recent COMPLETED calendar months (the current month is excluded); `year_to_date` = Jan 1 through the end of last month; `YYYY` (or `fy_YYYY`) = that calendar year; `all_time`. Default `last_12_months`.","example":"last_12_months","pattern":"^(?:last_\\d{1,3}_months|year_to_date|all_time|(?:fy_|fiscal_)?\\d{4})$","type":"string"}},{"description":"Two-letter state. Matches the loan officer's CURRENT NMLS location, not where they were when they moved.","in":"query","name":"state","required":false,"schema":{"description":"Two-letter state. Matches the loan officer's CURRENT NMLS location, not where they were when they moved.","example":"TX","pattern":"^[A-Za-z]{2}$","type":"string"}},{"description":"Comma-separated two-letter states (e.g. a region). ORed; combined with `state` when both are sent.","in":"query","name":"states","required":false,"schema":{"description":"Comma-separated two-letter states (e.g. a region). ORed; combined with `state` when both are sent.","example":"WA,OR,ID","pattern":"^[A-Za-z]{2}(?:,[A-Za-z]{2})*$","type":"string"}},{"description":"Exact city name of the loan officer's current NMLS location. Pair with `state`.","in":"query","name":"city","required":false,"schema":{"description":"Exact city name of the loan officer's current NMLS location. Pair with `state`.","maxLength":100,"minLength":1,"type":"string"}},{"description":"Comma-separated company categories (`BANK`, `CU`, `OTHER`) applied to the company whose roster changed — the destination for arrivals, the company left for departures.","in":"query","name":"companyCategory","required":false,"schema":{"description":"Comma-separated company categories (`BANK`, `CU`, `OTHER`) applied to the company whose roster changed — the destination for arrivals, the company left for departures.","example":"BANK,CU","pattern":"^(?:BANK|CU|OTHER)(?:,(?:BANK|CU|OTHER))*$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MovementStats"}}},"description":"OK"},"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MovementComputing"}}},"description":"Still computing — poll the same request after `retryAfterMs`. See `MovementComputing`.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","required":true,"schema":{"description":"Seconds to wait before retrying.","example":"5","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Loan officer movement totals for a period","tags":["Market"]}},"/v1/market/movement/transitions":{"get":{"description":"The largest company-to-company flows in the window: how many loan officers moved from each previous employer to each new one. Filter to one company (either side) with `companyNmlsId`. A move is dated by the loan officer's FIRST record at the new company; a loan officer licensed in several states counts once per company. Location filters use the loan officer's CURRENT NMLS location. Results refresh weekly. A response not ready within 25 s answers `202` (`MovementComputing`): repeat the same request after `retryAfterMs`.","operationId":"marketMovementTransitions","parameters":[{"description":"Reporting window. `last_N_months` = the N most recent COMPLETED calendar months (the current month is excluded); `year_to_date` = Jan 1 through the end of last month; `YYYY` (or `fy_YYYY`) = that calendar year; `all_time`. Default `last_12_months`.","in":"query","name":"dateRange","required":false,"schema":{"description":"Reporting window. `last_N_months` = the N most recent COMPLETED calendar months (the current month is excluded); `year_to_date` = Jan 1 through the end of last month; `YYYY` (or `fy_YYYY`) = that calendar year; `all_time`. Default `last_12_months`.","example":"last_12_months","pattern":"^(?:last_\\d{1,3}_months|year_to_date|all_time|(?:fy_|fiscal_)?\\d{4})$","type":"string"}},{"description":"Two-letter state. Matches the loan officer's CURRENT NMLS location, not where they were when they moved.","in":"query","name":"state","required":false,"schema":{"description":"Two-letter state. Matches the loan officer's CURRENT NMLS location, not where they were when they moved.","example":"TX","pattern":"^[A-Za-z]{2}$","type":"string"}},{"description":"Comma-separated two-letter states (e.g. a region). ORed; combined with `state` when both are sent.","in":"query","name":"states","required":false,"schema":{"description":"Comma-separated two-letter states (e.g. a region). ORed; combined with `state` when both are sent.","example":"WA,OR,ID","pattern":"^[A-Za-z]{2}(?:,[A-Za-z]{2})*$","type":"string"}},{"description":"Exact city name of the loan officer's current NMLS location. Pair with `state`.","in":"query","name":"city","required":false,"schema":{"description":"Exact city name of the loan officer's current NMLS location. Pair with `state`.","maxLength":100,"minLength":1,"type":"string"}},{"description":"Comma-separated company categories (`BANK`, `CU`, `OTHER`) applied to the company whose roster changed — the destination for arrivals, the company left for departures.","in":"query","name":"companyCategory","required":false,"schema":{"description":"Comma-separated company categories (`BANK`, `CU`, `OTHER`) applied to the company whose roster changed — the destination for arrivals, the company left for departures.","example":"BANK,CU","pattern":"^(?:BANK|CU|OTHER)(?:,(?:BANK|CU|OTHER))*$","type":"string"}},{"description":"Only flows into or out of this company.","in":"query","name":"companyNmlsId","required":false,"schema":{"description":"Only flows into or out of this company.","type":"string"}},{"description":"Rows to return (default 25, max 200).","in":"query","name":"limit","required":false,"schema":{"description":"Rows to return (default 25, max 200).","maximum":200,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MovementTransitions"}}},"description":"OK"},"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MovementComputing"}}},"description":"Still computing — poll the same request after `retryAfterMs`. See `MovementComputing`.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","required":true,"schema":{"description":"Seconds to wait before retrying.","example":"5","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Company-to-company loan officer flows","tags":["Market"]}},"/v1/market/signals":{"post":{"operationId":"marketSignals","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketSignalsRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketSignalsResponse"}}},"description":"The requested stats"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Market Signals card stats (web app feed)","tags":["Market"]}},"/v1/me":{"get":{"description":"Identity, active organization + membership role, and how the caller authenticated.\n\nExtended profile fields (`nmlsId`, `jobRole`, the contact-card block) are resolved for every caller type — session-cookie, API-key, and OAuth-bearer alike. `auth.profileResolved` is `true` on any successful read; it is retained for compatibility and no longer varies by the credential the caller presented.","operationId":"getMe","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}},"description":"The caller's account"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountServiceUnavailable"}}},"description":"Account service unavailable"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Get the current caller's account","tags":["Me"]},"patch":{"description":"Partial update — send only the fields that change; `null` clears one. Returns the account in the same shape as `GET /v1/me`.\n\n`email` is NOT updatable here: changing it runs a verification flow. Sending it is a 400, not a silent no-op.","operationId":"updateMe","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeUpdateRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}},"description":"The updated account"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountServiceUnavailable"}}},"description":"Account service unavailable"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Update the current caller's profile","tags":["Me"]}},"/v1/me/credits":{"get":{"description":"Balance split by bucket (cycle allowance, purchased on-demand, personal), the per-cycle allowance and on-demand unit price, and ledger totals over a window.\n\nThe window defaults to the current calendar month to date (UTC). Figures are for the caller's own membership in their active organization — the same organization the API meters requests against.","operationId":"getMeCredits","parameters":[{"description":"Usage window start (YYYY-MM-DD, inclusive)","in":"query","name":"startDate","required":false,"schema":{"description":"Usage window start (YYYY-MM-DD, inclusive)","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},{"description":"Usage window end (YYYY-MM-DD, inclusive)","in":"query","name":"endDate","required":false,"schema":{"description":"Usage window end (YYYY-MM-DD, inclusive)","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeCreditsResponse"}}},"description":"Credit balance and usage"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountServiceUnavailable"}}},"description":"Account service unavailable"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Get the caller's credit balance and usage","tags":["Me"]}},"/v1/me/plan":{"get":{"description":"The active organization's resolved plan (with its limit map), the subscription status backing it, and the plan grants attached to the organization and to the user.\n\n`plan` is null when the workspace has no active, trialing, or past-due subscription. No billing details (invoices, payment methods) are exposed.","operationId":"getMePlan","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MePlanResponse"}}},"description":"The caller's plan"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountServiceUnavailable"}}},"description":"Account service unavailable"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Get the caller's current plan","tags":["Me"]}},"/v1/monitors":{"get":{"description":"Everything that alerts you, in one list: the alert recipes you subscribed to, the monitors you set up from ModelMatch templates, and the Studio jobs you saved with alert rules in your active organization. Each monitor says what it watches, how often it checks, when it last sent an alert and how to change it. Free.","operationId":"listMonitors","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorList"}}},"description":"Your monitors"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"List your monitors","tags":["Monitors"]},"post":{"description":"Set up a monitor. From a ModelMatch template: send `watch: { template, inputs, options }` (see `GET /v1/monitors/templates`); it checks once right away, so updates from the last 90 days arrive with its first run, then weekly. From your own query: send `watch: { sql, keys, schedule }`, a `name` and at least one rule. Results land in a table in your organization's workspace. Free to set up; each weekly run of a template monitor costs credits.","operationId":"createMonitor","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMonitor"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorResponse"}}},"description":"Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"The request is not a valid monitor (`code` says which part)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"Sign in first."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`no_org`: select an organization first."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`unknown_monitor`, or the route is not available to you yet."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`name_conflict`, `version_conflict`, `monitor_limit`, `template_archived` or `check_in_flight`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`check_limit`: no checks left today."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`studio_unavailable`: try again shortly."}},"summary":"Create a monitor","tags":["Monitors"]}},"/v1/monitors/checks/{checkId}":{"get":{"description":"Where a check you started stands. Free.","operationId":"getMonitorCheck","parameters":[{"in":"path","name":"checkId","required":true,"schema":{"maxLength":128,"minLength":1,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorCheckResponse"}}},"description":"The check"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"The request is not a valid monitor (`code` says which part)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"Sign in first."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`no_org`: select an organization first."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`unknown_monitor`, or the route is not available to you yet."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`name_conflict`, `version_conflict`, `monitor_limit`, `template_archived` or `check_in_flight`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`check_limit`: no checks left today."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`studio_unavailable`: try again shortly."}},"summary":"Get a monitor check","tags":["Monitors"]}},"/v1/monitors/email-preview":{"post":{"description":"Validates an email and returns what a run would send with it, filled with sample updates of the given kinds: your recent ones when you have any, else samples. Pass `template` or `monitorId` to preview under that template's copy and kinds. Writes nothing. Free.","operationId":"previewMonitorEmail","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorEmailPreviewRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorEmailPreview"}}},"description":"Valid"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"The request is not a valid monitor (`code` says which part)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"Sign in first."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`no_org`: select an organization first."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`unknown_monitor`, or the route is not available to you yet."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`name_conflict`, `version_conflict`, `monitor_limit`, `template_archived` or `check_in_flight`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`check_limit`: no checks left today."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`studio_unavailable`: try again shortly."}},"summary":"Preview a monitor email","tags":["Monitors"]}},"/v1/monitors/email-tokens":{"get":{"description":"The tokens a monitor's email can use: tokens usable anywhere, and the item tokens each kind of update offers (inside an `items` block), each with a label and a formatted example. Free.","operationId":"getMonitorEmailTokens","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorEmailTokens"}}},"description":"Token catalog"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"The request is not a valid monitor (`code` says which part)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"Sign in first."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`no_org`: select an organization first."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`unknown_monitor`, or the route is not available to you yet."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`name_conflict`, `version_conflict`, `monitor_limit`, `template_archived` or `check_in_flight`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`check_limit`: no checks left today."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`studio_unavailable`: try again shortly."}},"summary":"List the monitor email tokens","tags":["Monitors"]}},"/v1/monitors/preview":{"post":{"description":"What a monitor from a template would hold right now, with a sample of its rows, without saving anything or sending anything. Answers within about 12 seconds, else `running` with a `checkId`: poll `GET /v1/monitors/checks/{checkId}` until it has `succeeded`, then read `preview`. One at a time, shared with checks. Free.","operationId":"previewMonitor","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewMonitor"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorPreview"}}},"description":"Preview"},"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorCheckResponse"}}},"description":"Still running: poll `GET /v1/monitors/checks/{checkId}`; its `preview` holds the answer"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"The request is not a valid monitor (`code` says which part)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"Sign in first."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`no_org`: select an organization first."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`unknown_monitor`, or the route is not available to you yet."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`name_conflict`, `version_conflict`, `monitor_limit`, `template_archived` or `check_in_flight`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`check_limit`: no checks left today."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`studio_unavailable`: try again shortly."}},"summary":"Preview a monitor","tags":["Monitors"]}},"/v1/monitors/templates":{"get":{"description":"The ModelMatch templates you can set up a monitor from: what each watches, the kinds of update it sends and the inputs it asks for. Free.","operationId":"listMonitorTemplates","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorTemplateList"}}},"description":"Templates"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"The request is not a valid monitor (`code` says which part)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"Sign in first."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`no_org`: select an organization first."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`unknown_monitor`, or the route is not available to you yet."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`name_conflict`, `version_conflict`, `monitor_limit`, `template_archived` or `check_in_flight`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`check_limit`: no checks left today."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`studio_unavailable`: try again shortly."}},"summary":"List monitor templates","tags":["Monitors"]}},"/v1/monitors/updates":{"get":{"description":"What your monitors found, newest first: each run that fired, with the rows it matched. Free.","operationId":"listMonitorUpdates","parameters":[{"in":"query","name":"limit","required":false,"schema":{"maximum":200,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorUpdateList"}}},"description":"Updates"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"The request is not a valid monitor (`code` says which part)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"Sign in first."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`no_org`: select an organization first."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`unknown_monitor`, or the route is not available to you yet."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`name_conflict`, `version_conflict`, `monitor_limit`, `template_archived` or `check_in_flight`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`check_limit`: no checks left today."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`studio_unavailable`: try again shortly."}},"summary":"List your monitor updates","tags":["Monitors"]}},"/v1/monitors/{id}":{"delete":{"description":"Stop a monitor and delete its table. Free.","operationId":"deleteMonitor","parameters":[{"description":"A monitor's id: `mon_…` for a monitor from a ModelMatch template, `job:<name>` for one of your SQL monitors.","in":"path","name":"id","required":true,"schema":{"description":"A monitor's id: `mon_…` for a monitor from a ModelMatch template, `job:<name>` for one of your SQL monitors.","example":"mon_0123456789abcdef01234567","pattern":"^(?:mon_[0-9a-f]{24}|job:[a-z][a-z0-9_]{0,62})$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorDeleted"}}},"description":"Deleted"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"The request is not a valid monitor (`code` says which part)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"Sign in first."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`no_org`: select an organization first."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`unknown_monitor`, or the route is not available to you yet."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`name_conflict`, `version_conflict`, `monitor_limit`, `template_archived` or `check_in_flight`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`check_limit`: no checks left today."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`studio_unavailable`: try again shortly."}},"summary":"Delete a monitor","tags":["Monitors"]},"get":{"description":"One of your monitors: what it watches, its rules, where its updates go and its status. Free.","operationId":"getMonitor","parameters":[{"description":"A monitor's id: `mon_…` for a monitor from a ModelMatch template, `job:<name>` for one of your SQL monitors.","in":"path","name":"id","required":true,"schema":{"description":"A monitor's id: `mon_…` for a monitor from a ModelMatch template, `job:<name>` for one of your SQL monitors.","example":"mon_0123456789abcdef01234567","pattern":"^(?:mon_[0-9a-f]{24}|job:[a-z][a-z0-9_]{0,62})$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorResponse"}}},"description":"The monitor"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"The request is not a valid monitor (`code` says which part)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"Sign in first."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`no_org`: select an organization first."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`unknown_monitor`, or the route is not available to you yet."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`name_conflict`, `version_conflict`, `monitor_limit`, `template_archived` or `check_in_flight`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`check_limit`: no checks left today."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`studio_unavailable`: try again shortly."}},"summary":"Get a monitor","tags":["Monitors"]},"patch":{"description":"Change what a template monitor watches (`inputs`), its switches (`options`), rules, delivery (`notify`), email or `status` (`paused` stops its updates). New inputs are checked right away. Send the `version` you read to avoid overwriting another change. A SQL monitor takes only `notify` here; change its query by saving the job again. Free.","operationId":"updateMonitor","parameters":[{"description":"A monitor's id: `mon_…` for a monitor from a ModelMatch template, `job:<name>` for one of your SQL monitors.","in":"path","name":"id","required":true,"schema":{"description":"A monitor's id: `mon_…` for a monitor from a ModelMatch template, `job:<name>` for one of your SQL monitors.","example":"mon_0123456789abcdef01234567","pattern":"^(?:mon_[0-9a-f]{24}|job:[a-z][a-z0-9_]{0,62})$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMonitor"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorResponse"}}},"description":"Changed"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"The request is not a valid monitor (`code` says which part)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"Sign in first."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`no_org`: select an organization first."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`unknown_monitor`, or the route is not available to you yet."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`name_conflict`, `version_conflict`, `monitor_limit`, `template_archived` or `check_in_flight`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`check_limit`: no checks left today."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`studio_unavailable`: try again shortly."}},"summary":"Change a monitor","tags":["Monitors"]}},"/v1/monitors/{id}/check":{"post":{"description":"Run a monitor from a template now instead of waiting for its weekly run. Answers within about 12 seconds, else `running` with a `checkId` to poll. A few checks a day; free.","operationId":"checkMonitor","parameters":[{"description":"A monitor's id: `mon_…` for a monitor from a ModelMatch template, `job:<name>` for one of your SQL monitors.","in":"path","name":"id","required":true,"schema":{"description":"A monitor's id: `mon_…` for a monitor from a ModelMatch template, `job:<name>` for one of your SQL monitors.","example":"mon_0123456789abcdef01234567","pattern":"^(?:mon_[0-9a-f]{24}|job:[a-z][a-z0-9_]{0,62})$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorCheckResponse"}}},"description":"Checked"},"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorCheckResponse"}}},"description":"Still running: poll `GET /v1/monitors/checks/{checkId}`"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"The request is not a valid monitor (`code` says which part)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"Sign in first."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`no_org`: select an organization first."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`unknown_monitor`, or the route is not available to you yet."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`name_conflict`, `version_conflict`, `monitor_limit`, `template_archived` or `check_in_flight`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`check_limit`: no checks left today."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`studio_unavailable`: try again shortly."}},"summary":"Check a monitor now","tags":["Monitors"]}},"/v1/monitors/{id}/updates":{"get":{"description":"Every kept run of one monitor, newest first, with what fired on each. `runId` narrows it to one run (the `runId` a `monitors.fired` webhook or a notification names). Free.","operationId":"listMonitorRunUpdates","parameters":[{"description":"A monitor's id: `mon_…` for a monitor from a ModelMatch template, `job:<name>` for one of your SQL monitors.","in":"path","name":"id","required":true,"schema":{"description":"A monitor's id: `mon_…` for a monitor from a ModelMatch template, `job:<name>` for one of your SQL monitors.","example":"mon_0123456789abcdef01234567","pattern":"^(?:mon_[0-9a-f]{24}|job:[a-z][a-z0-9_]{0,62})$","type":"string"}},{"description":"Only this run.","in":"query","name":"runId","required":false,"schema":{"description":"Only this run.","maxLength":80,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorUpdateList"}}},"description":"Runs"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"The request is not a valid monitor (`code` says which part)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"Sign in first."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`no_org`: select an organization first."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`unknown_monitor`, or the route is not available to you yet."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`name_conflict`, `version_conflict`, `monitor_limit`, `template_archived` or `check_in_flight`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`check_limit`: no checks left today."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorError"}}},"description":"`studio_unavailable`: try again shortly."}},"summary":"List a monitor's runs","tags":["Monitors"]}},"/v1/offices":{"post":{"description":"NOT NMLS mortgage branches — use `/branches` for those. Returns office name, address, agent count, coordinates, and office-level production for the selected period. Default sort is by agent count descending. If you only need how many offices match and not the records themselves, send the same request body to `countOffices`.","operationId":"listOffices","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfficeListRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfficeListResponse"}}},"description":"Paginated list of offices"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Search real-estate offices with filters","tags":["Offices"]}},"/v1/offices/agents":{"post":{"operationId":"officeAgents","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfficeAgentsRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentListResponse"}}},"description":"Paginated list of agents at the office"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Agents at an office","tags":["Offices"]}},"/v1/offices/count":{"post":{"description":"Return the exact number of offices matching the given filters. Accepts the same request body as `listOffices` (pagination and sort are ignored). Use this when you only need a total; to get the matching offices themselves, send the same request body to `listOffices`.","operationId":"countOffices","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfficeListRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountResponse"}}},"description":"Exact count of matching offices"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Count offices matching filters","tags":["Offices"],"x-mm-records-via":"listOffices"}},"/v1/offices/names":{"post":{"description":"Distinct real-estate office names starting with `query`, each with the agents and offices behind that name across all its offices — the picker for filters that match by office name (`listOffices` `company`, `listAgents` `currentOffice`). To find one office, use `instantSearch` or `listOffices` instead.","operationId":"suggestOfficeNames","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfficeNameSuggestRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfficeNameSuggestResponse"}}},"description":"Matching office names"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Office-name typeahead (distinct names with agent totals)","tags":["Offices"]}},"/v1/offices/{id}":{"get":{"operationId":"getOffice","parameters":[{"description":"Office key (mm_office_key)","in":"path","name":"id","required":true,"schema":{"description":"Office key (mm_office_key)","type":"string"}},{"description":"Period for production metrics (default: last12Months)","in":"query","name":"period","required":false,"schema":{"allOf":[{"$ref":"#/components/schemas/Period"},{"description":"Period for production metrics (default: last12Months)"}]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfficeDetailResponse"}}},"description":"Office detail"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Office not found"}},"summary":"Get office by key with office-level production","tags":["Offices"]}},"/v1/offices/{id}/breakdowns/builders":{"post":{"description":"New-construction builders named on the office's deals in the period, ranked by units. Spellings of one builder (case, punctuation, legal suffixes, a trailing \"of <State>\", generic words such as Homes, letter typos) are one row with `units` summed; distinct companies stay separate. Feed placeholders (\"Unknown\", \"N/A\", \"-\", \"TBD\", …) are dropped. Deal COUNT only: every row's `volume` / `pctVolume` is 0 and `pctUnits` is a share of ALL the office's deals. No buyer/listing split: `side` must be `any` (or omitted).","operationId":"officeBuilders","parameters":[{"description":"Office id (from `listOffices` / `instantSearch`)","in":"path","name":"id","required":true,"schema":{"description":"Office id (from `listOffices` / `instantSearch`)","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfficeScoredBreakdownRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSidedBreakdownResponse"}}},"description":"Pre-aggregated builders breakdown from the office's scored doc"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Home builders on the office's deals (pre-aggregated)","tags":["Offices"]}},"/v1/offices/{id}/breakdowns/lenders":{"post":{"description":"Lenders that financed the office's deals in the period. `id` is the lender id (pass it back as the `lender` filter on the loans routes), `label` its display name. The row for deals with no lender attributed carries no `id`.","operationId":"officeLenders","parameters":[{"description":"Office id (from `listOffices` / `instantSearch`)","in":"path","name":"id","required":true,"schema":{"description":"Office id (from `listOffices` / `instantSearch`)","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfficeScoredBreakdownRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSidedBreakdownResponse"}}},"description":"Pre-aggregated lenders breakdown from the office's scored doc"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Lenders on the office's deals (pre-aggregated)","tags":["Offices"]}},"/v1/offices/{id}/breakdowns/loanTypes":{"post":{"description":"The office's financed deals in the period by loan product (`label` = product key, e.g. `conventional`, `fha`, `va`), summed across its lenders. Shares are of the financed deals on the requested side, so rows sum to 1; cash deals are not counted.","operationId":"officeLoanTypes","parameters":[{"description":"Office id (from `listOffices` / `instantSearch`)","in":"path","name":"id","required":true,"schema":{"description":"Office id (from `listOffices` / `instantSearch`)","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfficeScoredBreakdownRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSidedBreakdownResponse"}}},"description":"Pre-aggregated loanTypes breakdown from the office's scored doc"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Loan products on the office's financed deals (pre-aggregated)","tags":["Offices"]}},"/v1/offices/{id}/breakdowns/originators":{"post":{"description":"Loan officers on the office's deals in the period. `id` is the LO's NMLS id; `label` their registered name and `company` their current employer (both from the LO's own profile, not the deal records). `side: buyer` = deals where this office represented the buyer.","operationId":"officeOriginators","parameters":[{"description":"Office id (from `listOffices` / `instantSearch`)","in":"path","name":"id","required":true,"schema":{"description":"Office id (from `listOffices` / `instantSearch`)","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfficeScoredBreakdownRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSidedBreakdownResponse"}}},"description":"Pre-aggregated originators breakdown from the office's scored doc"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Loan officers the office's agents worked with (pre-aggregated)","tags":["Offices"]}},"/v1/originators":{"post":{"description":"Search and list individual loan originators (LOs — NMLS-registered mortgage loan officers) with filters — one row per originator. Filter by name, NMLS ID, location (state, city), employer/company, and production metrics (loan volume, units, product mix), with sorting and cursor pagination. LOCATION SEMANTICS: the state/city filters match an originator's PRODUCTION GEOGRAPHY — the markets where they actually originated loans in the selected period — not where their office or employer sits. An LO who lends across several markets matches a filter for ANY of those markets, while the `state`/`city` returned on each row reflect only their PRIMARY (highest-volume) market. So a search for city \"Long Beach\" can return an LO whose displayed location is a different city/state (e.g. their top market is in Arizona) — they still originated loans in Long Beach, it just isn't their #1 market. To rank originators by their volume within a specific market, sort by volume after filtering, or use the per-originator city/county/state breakdown endpoints. NEWLY LICENSED / NO PRODUCTION: an originator who is in the NMLS registry but has no production record is returned only by an identity search — `nmlsId`, `name` or `namePrefix` as the ONLY filter — sent with `producersOnly: false`. Those rows come after the rows that have production, carry `hasScoredData: false`, and have `null` production fields. Under any other filter, or without `producersOnly: false`, they are not returned (use `getOriginator` for one by NMLS id). This is the per-originator record search: use it to find specific loan officers or build a filtered LO list. (For a single originator by NMLS ID use the originator detail endpoint.) If you only need how many originators match and not the records themselves, send the same request body to `countOriginators`.","operationId":"listOriginators","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OriginatorListRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OriginatorListResponse"}}},"description":"Paginated list of originators"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error. Includes unresolvable location filters: a `city`/`county`/`state`/`zip` value that does not match a recognized location returns 400 rather than an empty result set. Resolve the name with `instantSearch` (use an id from its `results.locations[]`) or `suggestLocations` (use the `id` of a `source: \"dictionary\"` result), then pass that id back as the filter value. Also returned with `code: \"TIME_AT_COMPANY_SCOPE\"` when `timeAtCompanyMonths` is set, the other filters match more than 200,000 originators, and the requested page lies past the tenure matches found among the first 200,000 — narrow the request."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Search originators with filters","tags":["Originators"]}},"/v1/originators/analytics/chart":{"post":{"operationId":"originatorAnalyticsChart","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OriginatorChartRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChartResponse"}}},"description":"Chart data. Money measures (`volume`, `avgSalePrice`, `avgListPrice`) are sentinel-guarded. Excludes values outside 0–100,000,000 — the source encodes unknown values as an out-of-range fill, and averaging them raw is wrong by orders of magnitude. The bound is applied before the metric and is not part of the public filter surface, so an equivalent range filter will not reproduce this figure exactly."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Configurable chart (measure × slice) over one LO's loans","tags":["Originators"]}},"/v1/originators/analytics/summary":{"post":{"operationId":"originatorAnalyticsSummary","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OriginatorSummaryRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleSummaryResponse"}}},"description":"Current + previous-period summary"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Production summary with previous-period comparison","tags":["Originators"]}},"/v1/originators/analytics/time-series":{"post":{"operationId":"originatorAnalyticsTimeSeries","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OriginatorTimeSeriesRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTimeSeriesResponse"}}},"description":"Time-series with previous-period comparison"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Originator volume / units over time","tags":["Originators"]}},"/v1/originators/bulk-delivery":{"post":{"description":"Queues an ECS task that dumps every matching originators document to S3 in the requested format. Returns 202 with a jobId; poll `GET /v1/originators/bulk-delivery/{jobId}` for status + the signed download URL.\n\n**Row limit.** Deliveries of up to 5,000 rows need no entitlement. Above that, the org's `bulk-delivery.originators` entitlement is required and its scope (row ceiling, row filters, allowed fields) governs the delivery; without it the request is rejected with 403 `entitlement_missing`. Pass `limit` at or below the ceiling to deliver a capped subset of a broader query. Email support@modelmatch.com to request a limit increase.\n\nDelivery is billed at 1 credit per row regardless of entitlement (deliveries submitted from the ModelMatch web app are not billed).\n\n**Push-target destination.** Pass `destination: { type: \"push-target\", targetId }` to have the finished rows sent to a configured push target instead of downloaded. The target is checked before anything is queued; a refusal returns the push target's status and `code` (`TARGET_NOT_FOUND` 404, `FORBIDDEN` 403, `PLAN_REQUIRED` 402, `TARGET_DISABLED` 409, `ENTITY_MISMATCH` 400). Limits and billing are the same as a file delivery.","operationId":"submitOriginatorsBulkDelivery","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/OriginatorListRequest"},{"additionalProperties":false,"properties":{"columns":{"description":"A FORMATTED file: its columns, in order, with header labels and number formats — for `format` `csv` or `xlsx` only, and not combined with `fields` or a push-target `destination` (400 `columns_format_unsupported` / `columns_with_fields` / `columns_with_destination`). Every field a column reads is gated by the entitlement exactly as if it were listed in `fields`: a withheld field drops out of a column's fallback list, and a column with nothing left is omitted. An unknown field is a 400 `unknown_column_field`. No `id` column is added. A formatted `csv` starts with a UTF-8 byte-order mark and uses CRLF line endings, so Excel opens it with accented names intact. Columns may read any DTO field and any opt-in column `fields` documents, including the computed `governmentPct`, `branchCount`, `managerName` / `managerNmlsId` and `licensedSince`.","items":{"$ref":"#/components/schemas/BulkDeliveryColumn"},"maxItems":200,"minItems":1,"type":"array"},"destination":{"$ref":"#/components/schemas/BulkDeliveryDestination"},"fields":{"description":"Optional output column projection, named by the response DTO fields (the same camelCase fields the list endpoint returns, e.g. `city`, `interestRate`). Intersected with the entitlement scope's allowedFields and the entity's full column set. If empty after intersection, falls back to all columns. It also SELECTS the opt-in columns, which are not part of the list DTO and are never delivered unless named here: `communityLending` (properties, originators, companies, branches) — the Community Lending neighborhood profile, identical to the block on the entity's detail endpoint; `parties` (properties) — the mortgage parties attributed to the parcel, by attribution scope; `marketCount` / `countyCount` / `stateCount` / `zipCount` / `lenderCount` (originators) — the market-breadth rollups you can already filter on; and the computed `governmentPct` (originators: FHA + VA percent of loans, 0–100), `branchCount` (companies: NMLS branch count) and `managerName` / `managerNmlsId` (branches: the first branch manager) and `licensedSince` (branches: first-licensed date, the earliest license `issueDate`, YYYY-MM-DD). Agents also offer `email2` / `phone2` (the best-ranked email / phone distinct from `email` / `phone`, admitted by the `email` / `phone` entitlement field), `bestEmail` / `bestEmail2` and `bestPhone` / `bestPhone2` (the best and runner-up contact over every email / phone on the record, `email` / `phone` included — the pair the ModelMatch web app's agent export shows; same entitlement fields), `officePhone` (admitted by `phone`), `activeListings` (current active listings; null when unknown), and the profile-link columns `facebook`, `instagram`, `linkedin`, `twitter`, `youtube`, `tiktok`, `zillow`, `otherLinks` (a `; `-joined list of profile URLs on no known platform) — all admitted by the `links` entitlement field. Loans offer the list row's transaction-export fields (`employerName`, `employerNmlsId`, `brokerName`, `titleCompanyName`, `soldAgentName`, `listAgentName`, `coListAgentName`, `buyer1FirstMiddle` … `seller2Last`). In `csv` and `parquet` the two block columns are JSON-encoded cells; in `json` and `ndjson` they are nested objects. Windowed production (originators, agents, companies, branches): name `<field>_<n>mo` for n in 3, 6, 12, 14, 18, 24 to get a production field for that trailing window regardless of `period` — e.g. `volume_3mo`, `units_6mo`, `purchaseVolume_24mo`. Available for originators `volume`, `units`, `avgLoanAmount`, `purchaseVolume`, `purchaseUnits`, `refinanceVolume`, `refinanceUnits`, `conventionalPct`, `fhaPct`, `vaPct`; agents `volume`, `units`, `avgSoldPrice`, `buyerVolume`, `buyerUnits`, `sellerVolume`, `sellerUnits`, `totalOriginatorsWorkedWith`, `totalCompaniesWorkedWith`, `totalLendersWorkedWith`; companies `volume`, `units`, `avgLoanAmount`, `loCount`; branches `volume`, `units`, `avgLoanAmount`, `purchasePct`, `refinancePct`, `loCount`. Numbers (null when the window has no data); an entitlement that allows a field allows every window of it.","items":{"minLength":1,"type":"string"},"type":"array"},"format":{"$ref":"#/components/schemas/BulkDeliveryFormat"},"limit":{"description":"Optional hard cap on the number of rows delivered — and therefore billed (1 credit / row). The job delivers the first `limit` rows in sort order (default newest-first) and bills only for those. If the query matches fewer than `limit`, all matches are delivered. Distinct from the page-size `size` field, which is ignored on this endpoint. The row ceiling still applies — 5,000 without the entity's bulk-delivery entitlement, or the entitlement's `maxRows` with it. A `limit` above the ceiling is rejected, but a `limit` at or below it lets you export a capped top-N even when the full match exceeds the ceiling — which is the intended way to run a broad query under the 5,000-row allowance.","example":5000,"exclusiveMinimum":true,"minimum":0,"type":"integer"}},"type":"object"}]}}}},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeliverySubmitResponse"}}},"description":"Job queued; ECS task launched"},"400":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/BulkDeliveryPreflightExceeded"},{"$ref":"#/components/schemas/BulkDeliveryPushTargetError"},{"$ref":"#/components/schemas/BulkDeliveryColumnsError"}]}}},"description":"Validation failure (incl. `format_required`: a file delivery needs `format`; a refused `columns` request), delivery would exceed the entitlement's maxRows, OR the push target does not accept this entity (`ENTITY_MISMATCH`)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"402":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/BulkDeliveryInsufficientCredits"},{"$ref":"#/components/schemas/BulkDeliveryPushTargetError"}]}}},"description":"Insufficient credits (balance < estimatedTotal, at 1 credit per row), OR the plan does not include push targets (`PLAN_REQUIRED`)"},"403":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/BulkDeliveryForbidden"},{"$ref":"#/components/schemas/BulkDeliveryPushTargetError"},{"$ref":"#/components/schemas/BulkDeliveryInsufficientScope"}]}}},"description":"Delivery exceeds the 5,000-row limit available without the `bulk-delivery.originators` entitlement (lower `limit`, narrow the filters, or contact support for a limit increase), OR you may not use the push target (`FORBIDDEN`), OR a scoped token named a push-target destination without `push-targets:send` (`insufficient_scope`)."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeliveryPushTargetError"}}},"description":"Push target not found (`TARGET_NOT_FOUND`)"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeliveryPushTargetError"}}},"description":"Push target is disabled (`TARGET_DISABLED`)"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Preflight / S3 / DDB / ECS launch failure, the push-target check could not reach the auth server, or the credit balance could not be read (`billing_unavailable` — retry; a paid delivery is never queued unverified)"}},"summary":"Submit a bulk-delivery job for originators","tags":["Originators"]}},"/v1/originators/bulk-delivery/{jobId}":{"delete":{"description":"Cancels a queued or running originators delivery job.\n\nThe job is marked `cancelled` immediately; the container running it notices on its next page boundary and stops. Because a delivery is billed once, at the end, **a cancelled job is never charged** — no credits are debited and there is nothing to refund. No partial file is written.\n\nIdempotent-ish: cancelling a job that has already finished (or was already cancelled) returns 409 and changes nothing. Poll `GET /v1/originators/bulk-delivery/{jobId}` for the settled state.","operationId":"cancelOriginatorsBulkDeliveryJob","parameters":[{"description":"Job ID returned by `POST /v1/originators/bulk-delivery`","in":"path","name":"jobId","required":true,"schema":{"description":"Job ID returned by `POST /v1/originators/bulk-delivery`","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeliveryStatusResponse"}}},"description":"Job cancelled; body is its settled status"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Caller does not own this job"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Job not found (or expired past 30d TTL)"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Job already finished — nothing to cancel"}},"summary":"Cancel a bulk-delivery job for originators","tags":["Originators"]},"get":{"operationId":"getOriginatorsBulkDeliveryJob","parameters":[{"description":"Job ID returned by `POST /v1/originators/bulk-delivery`","in":"path","name":"jobId","required":true,"schema":{"description":"Job ID returned by `POST /v1/originators/bulk-delivery`","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeliveryStatusResponse"}}},"description":"Job status (resultsUrl re-signed if completed)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Caller does not own this job"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Job not found (or expired past 30d TTL)"}},"summary":"Get bulk-delivery job status for originators","tags":["Originators"]}},"/v1/originators/contact-submissions":{"post":{"description":"Send contact details you know for a loan officer — a phone number, an email address, a profile link, or the company they moved to. The submission is checked and reviewed before anything appears on the profile; this call only records it and answers immediately. Sending the same details for the same person again while the first submission is still being reviewed returns the first submission's `id`.","operationId":"createOriginatorContactSubmission","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOriginatorContactSubmissionBody"}}}},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactSubmissionAccepted"}}},"description":"Recorded. Review happens afterwards."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The request body is too large."},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The body must be sent as `application/json`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Too many submissions in the last 24 hours. Try again later."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Submit contact details for a loan officer","tags":["Originators"]}},"/v1/originators/count":{"post":{"description":"Return the exact number of originators matching the given filters. Accepts the same request body as `listOriginators` (pagination and sort are ignored). Use this when you only need a total; to get the matching originators themselves, send the same request body to `listOriginators`.","operationId":"countOriginators","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OriginatorListRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OriginatorCountResponse"}}},"description":"Exact count of matching originators"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Count originators matching filters","tags":["Originators"],"x-mm-records-via":"listOriginators"}},"/v1/originators/{id}/related":{"get":{"description":"Return the ids of records of another type that are linked to this record. Links resolve by identifier, strongest identifier first, and equally-trusted identifiers are combined — a company's linked loans cover every role it holds on a loan, not just the first one found. The response reports which strength was used: `primary` is the canonical identifier for that pair, `secondary` is a real but weaker alternate used only when the record carries nothing better. This is a lightweight index: it returns ids and a count, not full records. For filtering, sorting, pagination and full detail, use the named endpoint for the pair (for example the originator loans endpoint) and fetch records by id.","operationId":"originatorRelated","parameters":[{"description":"Originator NMLS ID","in":"path","name":"id","required":true,"schema":{"description":"Originator NMLS ID","type":"string"}},{"description":"Type of record to link to","in":"query","name":"to","required":true,"schema":{"description":"Type of record to link to","enum":["companies","loans","properties"],"type":"string"}},{"description":"Maximum ids to return (default 25, max 200)","in":"query","name":"limit","required":false,"schema":{"description":"Maximum ids to return (default 25, max 200)","maximum":200,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelatedResponse"}}},"description":"Linked record ids"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Record not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Records linked to this one","tags":["Related"]}},"/v1/originators/{nmlsId}":{"get":{"operationId":"getOriginator","parameters":[{"description":"Originator NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Originator NMLS ID","type":"string"}},{"description":"Period for volume/units (default: last12Months)","in":"query","name":"period","required":false,"schema":{"allOf":[{"$ref":"#/components/schemas/Period"},{"description":"Period for volume/units (default: last12Months)"}]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OriginatorDetailResponse"}}},"description":"Originator detail"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Originator not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large"}},"summary":"Get originator by NMLS ID","tags":["Originators"]}},"/v1/originators/{nmlsId}/breakdowns/agents":{"post":{"description":"Ranks the real-estate agents on this LO's loans, by volume — the buyer's agent by default, the listing and co-listing agents with `side: \"listing\"`. Each loan is credited to the agent its MLS agent keys resolve to (a key naming several different people credits only the confirmed one), so `units` counts distinct loans per agent. `id` is that agent's id (pass it to `GET /v1/agents/{id}`) and `office` / `contact` its brokerage and email / direct phone; absent when the loan's key matches no agent profile, in which case `label` is the name the MLS recorded. Names that are an MLS placeholder for \"no agent recorded\" (`non member`, `non listed agent`, and ~140 board-specific spellings) are excluded — they are not people. Percentages are shares of the LO's whole loan population, so they do not sum to 100 across the page.","operationId":"originatorAgents","parameters":[{"description":"Originator NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Originator NMLS ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OriginatorAgentsBreakdownRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSidedBreakdownResponse"}}},"description":"Breakdown of the LO's loans by real-estate agent"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Real-estate agents this LO co-closed with","tags":["Originators"]}},"/v1/originators/{nmlsId}/breakdowns/branches":{"post":{"operationId":"originatorBranches","parameters":[{"description":"Originator NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Originator NMLS ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownResponse"}}},"description":"Breakdown of the LO's loans by branches"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Branch (broker) history for this LO","tags":["Originators"]}},"/v1/originators/{nmlsId}/breakdowns/brokers":{"post":{"operationId":"originatorBrokers","parameters":[{"description":"Originator NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Originator NMLS ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownResponse"}}},"description":"Breakdown of the LO's loans by brokers"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Broker shops this LO originated loans through (name-resolved)","tags":["Originators"]}},"/v1/originators/{nmlsId}/breakdowns/builders":{"post":{"description":"Ranks the home builders behind this LO's new-construction loans, by volume. A loan counts when `originatorLoans` with `flatFilters.hasBuilder: true` keeps it, and is credited to the `builderName` that list shows on its row (the parcel's newest builder-named sale, else the builder named on the loan or its builder seller of record) — so a row's `units` equals that list's rows naming any of the builder's spellings. Spellings of one builder are one row (case, punctuation, legal suffixes such as LLC/LP, a trailing \"of <State>\", generic words such as Homes, and letter typos), with `units` and `volume` summed; `label` is the most common spelling and `id` its normalized key. Distinct companies (a builder's subsidiaries) stay separate rows. Feed placeholders (\"Unknown\", \"N/A\", \"-\", \"TBD\", …) are not builders: their loans get no row. Percentages are shares of the LO's whole loan population in scope, so rows do not sum to 100. More than 50,000 loans in scope is a 400 (narrow the period); `truncated` is set when the builder loans exceed that cap.","operationId":"originatorBuilders","parameters":[{"description":"Originator NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Originator NMLS ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownResponse"}}},"description":"Breakdown of the LO's builder loans by home builder"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Home builders on this LO's new-construction loans","tags":["Originators"]}},"/v1/originators/{nmlsId}/breakdowns/cities":{"post":{"operationId":"originatorCitiesBreakdown","parameters":[{"description":"Originator NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Originator NMLS ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownResponse"}}},"description":"Breakdown of the LO's loans by cities"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"City volume breakdown across this LO's loans","tags":["Originators"]}},"/v1/originators/{nmlsId}/breakdowns/companies":{"post":{"operationId":"originatorCompanies","parameters":[{"description":"Originator NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Originator NMLS ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownResponse"}}},"description":"Breakdown of the LO's loans by companies"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Funding companies (employer history) for this LO","tags":["Originators"]}},"/v1/originators/{nmlsId}/breakdowns/counties":{"post":{"operationId":"originatorCountiesBreakdown","parameters":[{"description":"Originator NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Originator NMLS ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownResponse"}}},"description":"Breakdown of the LO's loans by counties"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"County (FIPS) volume breakdown across this LO's loans","tags":["Originators"]}},"/v1/originators/{nmlsId}/breakdowns/lenders":{"post":{"operationId":"originatorLenders","parameters":[{"description":"Originator NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Originator NMLS ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownResponse"}}},"description":"Breakdown of the LO's loans by lenders"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Lenders this LO has originated through","tags":["Originators"]}},"/v1/originators/{nmlsId}/breakdowns/offices":{"post":{"operationId":"originatorOffices","parameters":[{"description":"Originator NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Originator NMLS ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownResponse"}}},"description":"Breakdown of the LO's loans by broker (office)"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Real-estate offices this LO closed through (with sponsoring company)","tags":["Originators"]}},"/v1/originators/{nmlsId}/breakdowns/states":{"post":{"operationId":"originatorStatesBreakdown","parameters":[{"description":"Originator NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Originator NMLS ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownResponse"}}},"description":"Breakdown of the LO's loans by states"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"State volume breakdown across this LO's loans","tags":["Originators"]}},"/v1/originators/{nmlsId}/breakdowns/title-companies":{"post":{"description":"Ranks the title companies on this entity's loans (recorded deeds, `recording_date` window — the same population and period axis as every other loans breakdown). Spellings of one company are MERGED: `label` is its most-used spelling, `id` the normalized name every spelling was grouped under (legal-form and filler words such as `inc`, `llc`, `co`, `company`, `title`, `escrow` removed; `natl` → `national`). Placeholder entries meaning \"no title company recorded\" (`none available` and its misspellings, `unknown`, `n/a`, …) and names shorter than 3 characters are excluded rather than ranked. `attorney` and `accommodation` are kept: they say who closed. `pctUnits` / `pctVolume` are shares of the entity's WHOLE loan population in the window, including loans with no title company, so they do not sum to 100 across the page. Pages of up to 100 via `pagination`.","operationId":"originatorTitleCompanies","parameters":[{"description":"Originator NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Originator NMLS ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownResponse"}}},"description":"Breakdown of the entity's loans by title company"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Title companies on this LO's loans (spellings merged)","tags":["Originators"]}},"/v1/originators/{nmlsId}/breakdowns/zip-codes":{"post":{"operationId":"originatorZipCodes","parameters":[{"description":"Originator NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Originator NMLS ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownResponse"}}},"description":"Breakdown of the LO's loans by zip-codes"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Zip-code volume breakdown","tags":["Originators"]}},"/v1/originators/{nmlsId}/community-lending/benchmark":{"get":{"description":"Percentile rank and peer average of this entity's low- or moderate-income and majority-minority neighborhood shares, against peers producing in its top 12 states by units. `data` is null when the entity has no neighborhood-resolved loans in the period.","operationId":"originatorCommunityLendingBenchmark","parameters":[{"description":"Originator NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Originator NMLS ID","type":"string"}},{"description":"Period window (default: last12Months).","in":"query","name":"period","required":false,"schema":{"allOf":[{"$ref":"#/components/schemas/Period"},{"description":"Period window (default: last12Months)."}]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityLendingBenchmarkResponse"}}},"description":"Peer benchmark"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Community Lending peer benchmark (LMI / majority-minority)","tags":["Originators"]}},"/v1/originators/{nmlsId}/community-lending/map":{"get":{"description":"Map points for this loan officer's loans in the period that resolved to a Census tract, newest first (up to 4,000), plus a per-tract loan count keyed by 11-digit tract GEOID for a choropleth.","operationId":"originatorCommunityLendingMap","parameters":[{"description":"Originator NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Originator NMLS ID","type":"string"}},{"description":"Period window (default: last12Months).","in":"query","name":"period","required":false,"schema":{"allOf":[{"$ref":"#/components/schemas/Period"},{"description":"Period window (default: last12Months)."}]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityLendingMapResponse"}}},"description":"Map feed"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Community Lending map: geocoded loans + per-tract counts","tags":["Originators"]}},"/v1/originators/{nmlsId}/loans":{"post":{"operationId":"originatorLoans","parameters":[{"description":"Originator NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Originator NMLS ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoanListRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoanListResponse"}}},"description":"Paginated list of loans originated by this LO"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Loans originated by this LO","tags":["Originators"]}},"/v1/originators/{nmlsId}/markets":{"post":{"description":"One blended view of a loan officer's lending footprint: the ZIP codes they originated in, city / county / state rollups of the same scope, and the period totals those markets are a share of. AVERAGES ARE VOLUME-WEIGHTED: the summary loan size is Σ volume ÷ Σ units, not an unweighted mean of the per-market averages (on a real footprint the two differ by thousands of dollars). Sending `zipCodes` narrows every grain to those ZIPs; sending a `dateRange` re-cuts the window. Either switches the response from the LO's pre-aggregated footprint to a live aggregation of their loans — `source` and `sourceReasons` say which was used, and bucket `key` forms differ between them (use `name` for display). All shares on this response are 0–100 percentages. A summary can cover less than the whole book: production that could not be attributed to a place is held out and reported in `summary.unresolved` rather than being folded in or silently dropped. The summary also carries a Community Lending mix — what kind of neighborhood this book lands in. These are U.S. Census tract-level aggregates describing whole neighborhoods, never individual, household or applicant attributes. Unscoped it is the LO's own whole-period mix; a ZIP or date scope recomputes it over the markets in scope, and `summary.communityLending.basis` says which you got.","operationId":"originatorMarkets","parameters":[{"description":"Originator NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Originator NMLS ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OriginatorMarketsRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OriginatorMarketsResponse"}}},"description":"The LO's blended market footprint"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Originator not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"The markets this LO lends in","tags":["Originators"]}},"/v1/originators/{nmlsId}/properties":{"post":{"description":"Returns the parcels this loan officer is attributed to in public record — the reverse of the `parties` block on `GET /v1/properties/{id}`. Accepts the same filters, sorts and pagination as the main property search, so a caller can ask 'this LO's parcels in Travis County built after 2015' in one request. Attribution is ALL-TIME: a parcel stays in this LO's set after the loan is paid off, because the question is career reach rather than current book. An LO with no attributed parcels returns an empty page, not a 404 — the LO may be real and simply have nothing in the public record yet.","operationId":"originatorProperties","parameters":[{"description":"Originator NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Originator NMLS ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyListRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyListResponse"}}},"description":"Paginated list of parcels attributed to this LO"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Properties this loan officer has touched","tags":["Originators"]}},"/v1/originators/{nmlsId}/retention":{"post":{"description":"Classifies every loan this LO originated since 2017 against every later loan and MLS sale on the same parcel, for the period `start`–`end`: borrowers kept (the LO refinanced them again), lost (refinanced elsewhere — `churnedLoans`, with who captured them), sold, or a second lien taken elsewhere. Returns the summary, capture lanes (same funding lender vs other companies), capturing companies / LOs (top 25 + full-population totals), timing, monthly trend, the newest 500 loss rows, and exit signals on the retained book (`atRisk`). `compare` adds a second period's `summary` and monthly trend (`previous`) from the same scan. A very large book that cannot be read in time answers `status: \"timeout\"`.","operationId":"originatorRetention","parameters":[{"description":"Originator NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Originator NMLS ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OriginatorRetentionRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OriginatorRetention"}}},"description":"Retention report"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Borrower retention report for this LO","tags":["Originators"]}},"/v1/originators/{nmlsId}/retention/captured":{"post":{"description":"The loss rows (`churnedLoans` shape) one capturing loan officer — or company — took from this LO's borrowers in `start`–`end`, newest first, paged. Same classification as `originatorRetention`, so `total` matches that capturer's `count` there; unlike the report, it is not limited to the newest 500 rows overall.","operationId":"originatorRetentionCaptured","parameters":[{"description":"Originator NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Originator NMLS ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OriginatorRetentionCapturedRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OriginatorRetentionCaptured"}}},"description":"The capturer's loss rows"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Loans one capturer took from this LO","tags":["Originators"]}},"/v1/originators/{nmlsId}/signals/agent-pulse":{"get":{"description":"Relationship Pulse: the buyer's agents this loan officer has worked with, ordered by priority (highest first, up to 50) for working toward another closed deal together in the next six months. Each row has the agent (`agentLinked` says whether its id can be looked up with the agent routes), a priority score (0–1, higher is higher priority), its priority percentile among all scored agent relationships, and up to three plain-language reasons. Returns an empty `data` list when the loan officer is scored but has no agent relationships in scope; 404 when the loan officer is not scored at all. 1 credit per row returned.","operationId":"getOriginatorAgentPulseSignals","parameters":[{"description":"Loan officer NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Loan officer NMLS ID","example":"7206","pattern":"^\\d{1,12}$","type":"string"}},{"description":"Rows per page (1–50, default 25)","in":"query","name":"limit","required":false,"schema":{"default":25,"description":"Rows per page (1–50, default 25)","maximum":50,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentPulseSignalList"}}},"description":"Agents, highest priority first"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid parameters or cursor"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"This loan officer has no predictive scores."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Signals are temporarily unavailable. Retry later."}},"summary":"Buyer's agent relationships to prioritize for this loan officer","tags":["Signals"]}},"/v1/originators/{nmlsId}/signals/client-retention":{"get":{"description":"Client Retention Risk: this loan officer's past clients (properties they financed between six months and ten years ago), ordered by priority (highest first): the clients most at risk of taking their next refinance or equity loan to a different loan officer come first. Each row has the property, the last loan this loan officer made on it, a priority score (0–1, higher is higher priority; `risk` carries the same value), its priority percentile among all scored past clients, and up to three plain-language reasons. Returns an empty `data` list when the loan officer is scored but has no past clients in scope; 404 when the loan officer is not scored at all. Pages with `limit` / `cursor`. 1 credit per row returned.","operationId":"getOriginatorClientRetentionSignals","parameters":[{"description":"Loan officer NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Loan officer NMLS ID","example":"7206","pattern":"^\\d{1,12}$","type":"string"}},{"description":"Rows per page (1–100, default 25)","in":"query","name":"limit","required":false,"schema":{"default":25,"description":"Rows per page (1–100, default 25)","maximum":100,"minimum":1,"type":"integer"}},{"description":"Opaque cursor from the previous page's `cursor`.","in":"query","name":"cursor","required":false,"schema":{"description":"Opaque cursor from the previous page's `cursor`.","maxLength":2048,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientRetentionSignalList"}}},"description":"A page of past clients, most at risk first"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid parameters or cursor"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"This loan officer has no predictive scores."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Signals are temporarily unavailable. Retry later."}},"summary":"This loan officer's past clients most at risk of going elsewhere","tags":["Signals"]}},"/v1/originators/{nmlsId}/signals/lo-move":{"get":{"description":"Recruiting Radar for one loan officer: a priority score (0–1, higher is higher priority) for reaching out about a move to a new company in the next six months, its priority percentile among all scored loan officers, and up to three plain-language reasons. 404 when this loan officer is not scored. 1 credit.","operationId":"getOriginatorLoMoveSignal","parameters":[{"description":"Loan officer NMLS ID","in":"path","name":"nmlsId","required":true,"schema":{"description":"Loan officer NMLS ID","example":"7206","pattern":"^\\d{1,12}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoMoveSignalDetail"}}},"description":"The loan officer's score"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid parameters or cursor"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"This loan officer has no predictive scores."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Signals are temporarily unavailable. Retry later."}},"summary":"This loan officer's recruiting priority","tags":["Signals"]}},"/v1/properties":{"post":{"description":"Search and list individual properties/parcels with filters — one row per parcel. Filter by location (state, county, city, zip, address), owner name, property characteristics (beds, baths, square footage, year built, property type), value, ownership or transaction history, and occupancy (`ownerOccupancy: not_flagged` plus `absenteeOwner: true` targets likely investor / non-owner-occupied parcels — pair `absenteeOwner` with a geography filter), with sorting and cursor pagination. This is the discrete per-property record search: use it to find specific properties or build a filtered property list. (For a single property by its ID use the property detail endpoint.) If you only need how many properties match and not the records themselves, send the same request body to `countProperties`.","operationId":"listProperties","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyListRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyListResponse"}}},"description":"Paginated list of properties"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Search properties with filters","tags":["Properties"]}},"/v1/properties/analytics/chart":{"post":{"operationId":"propertiesAnalyticsChart","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyChartRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChartResponse"}}},"description":"Chart data with measure/slice breakdown"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Configurable chart data (measure × slice)","tags":["Properties"]}},"/v1/properties/analytics/summary":{"post":{"operationId":"propertiesAnalyticsSummary","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertySummaryRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyAnalyticsResponse"}}},"description":"Property count and average AVM value"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Property count and average AVM","tags":["Properties"]}},"/v1/properties/bulk-delivery":{"post":{"description":"Queues an ECS task that dumps every matching properties document to S3 in the requested format. Returns 202 with a jobId; poll `GET /v1/properties/bulk-delivery/{jobId}` for status + the signed download URL.\n\n**Row limit.** Deliveries of up to 5,000 rows need no entitlement. Above that, the org's `bulk-delivery.properties` entitlement is required and its scope (row ceiling, row filters, allowed fields) governs the delivery; without it the request is rejected with 403 `entitlement_missing`. Pass `limit` at or below the ceiling to deliver a capped subset of a broader query. Email support@modelmatch.com to request a limit increase.\n\nDelivery is billed at 1 credit per row regardless of entitlement (deliveries submitted from the ModelMatch web app are not billed).\n\n**Push-target destination.** Pass `destination: { type: \"push-target\", targetId }` to have the finished rows sent to a configured push target instead of downloaded. The target is checked before anything is queued; a refusal returns the push target's status and `code` (`TARGET_NOT_FOUND` 404, `FORBIDDEN` 403, `PLAN_REQUIRED` 402, `TARGET_DISABLED` 409, `ENTITY_MISMATCH` 400). Limits and billing are the same as a file delivery.","operationId":"submitPropertiesBulkDelivery","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PropertyListRequest"},{"additionalProperties":false,"properties":{"columns":{"description":"A FORMATTED file: its columns, in order, with header labels and number formats — for `format` `csv` or `xlsx` only, and not combined with `fields` or a push-target `destination` (400 `columns_format_unsupported` / `columns_with_fields` / `columns_with_destination`). Every field a column reads is gated by the entitlement exactly as if it were listed in `fields`: a withheld field drops out of a column's fallback list, and a column with nothing left is omitted. An unknown field is a 400 `unknown_column_field`. No `id` column is added. A formatted `csv` starts with a UTF-8 byte-order mark and uses CRLF line endings, so Excel opens it with accented names intact. Columns may read any DTO field and any opt-in column `fields` documents, including the computed `governmentPct`, `branchCount`, `managerName` / `managerNmlsId` and `licensedSince`.","items":{"$ref":"#/components/schemas/BulkDeliveryColumn"},"maxItems":200,"minItems":1,"type":"array"},"destination":{"$ref":"#/components/schemas/BulkDeliveryDestination"},"fields":{"description":"Optional output column projection, named by the response DTO fields (the same camelCase fields the list endpoint returns, e.g. `city`, `interestRate`). Intersected with the entitlement scope's allowedFields and the entity's full column set. If empty after intersection, falls back to all columns. It also SELECTS the opt-in columns, which are not part of the list DTO and are never delivered unless named here: `communityLending` (properties, originators, companies, branches) — the Community Lending neighborhood profile, identical to the block on the entity's detail endpoint; `parties` (properties) — the mortgage parties attributed to the parcel, by attribution scope; `marketCount` / `countyCount` / `stateCount` / `zipCount` / `lenderCount` (originators) — the market-breadth rollups you can already filter on; and the computed `governmentPct` (originators: FHA + VA percent of loans, 0–100), `branchCount` (companies: NMLS branch count) and `managerName` / `managerNmlsId` (branches: the first branch manager) and `licensedSince` (branches: first-licensed date, the earliest license `issueDate`, YYYY-MM-DD). Agents also offer `email2` / `phone2` (the best-ranked email / phone distinct from `email` / `phone`, admitted by the `email` / `phone` entitlement field), `bestEmail` / `bestEmail2` and `bestPhone` / `bestPhone2` (the best and runner-up contact over every email / phone on the record, `email` / `phone` included — the pair the ModelMatch web app's agent export shows; same entitlement fields), `officePhone` (admitted by `phone`), `activeListings` (current active listings; null when unknown), and the profile-link columns `facebook`, `instagram`, `linkedin`, `twitter`, `youtube`, `tiktok`, `zillow`, `otherLinks` (a `; `-joined list of profile URLs on no known platform) — all admitted by the `links` entitlement field. Loans offer the list row's transaction-export fields (`employerName`, `employerNmlsId`, `brokerName`, `titleCompanyName`, `soldAgentName`, `listAgentName`, `coListAgentName`, `buyer1FirstMiddle` … `seller2Last`). In `csv` and `parquet` the two block columns are JSON-encoded cells; in `json` and `ndjson` they are nested objects. Windowed production (originators, agents, companies, branches): name `<field>_<n>mo` for n in 3, 6, 12, 14, 18, 24 to get a production field for that trailing window regardless of `period` — e.g. `volume_3mo`, `units_6mo`, `purchaseVolume_24mo`. Available for originators `volume`, `units`, `avgLoanAmount`, `purchaseVolume`, `purchaseUnits`, `refinanceVolume`, `refinanceUnits`, `conventionalPct`, `fhaPct`, `vaPct`; agents `volume`, `units`, `avgSoldPrice`, `buyerVolume`, `buyerUnits`, `sellerVolume`, `sellerUnits`, `totalOriginatorsWorkedWith`, `totalCompaniesWorkedWith`, `totalLendersWorkedWith`; companies `volume`, `units`, `avgLoanAmount`, `loCount`; branches `volume`, `units`, `avgLoanAmount`, `purchasePct`, `refinancePct`, `loCount`. Numbers (null when the window has no data); an entitlement that allows a field allows every window of it.","items":{"minLength":1,"type":"string"},"type":"array"},"format":{"$ref":"#/components/schemas/BulkDeliveryFormat"},"limit":{"description":"Optional hard cap on the number of rows delivered — and therefore billed (1 credit / row). The job delivers the first `limit` rows in sort order (default newest-first) and bills only for those. If the query matches fewer than `limit`, all matches are delivered. Distinct from the page-size `size` field, which is ignored on this endpoint. The row ceiling still applies — 5,000 without the entity's bulk-delivery entitlement, or the entitlement's `maxRows` with it. A `limit` above the ceiling is rejected, but a `limit` at or below it lets you export a capped top-N even when the full match exceeds the ceiling — which is the intended way to run a broad query under the 5,000-row allowance.","example":5000,"exclusiveMinimum":true,"minimum":0,"type":"integer"},"propertyIds":{"description":"Deliver exactly these parcels (up to 50,000; the ids `enrich-bulk` takes): a list/search row `id` (that parcel) or an `mmPropertyId` (every unit). Must start with `mm_`. ANDed with the filters. Unmatched ids are skipped (`estimatedTotal` = matched parcels); rows come in sort order, not id order — join on `id`. Limits and billing unchanged.","items":{"pattern":"^mm_\\S","type":"string"},"maxItems":50000,"minItems":1,"type":"array"}},"type":"object"}]}}}},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeliverySubmitResponse"}}},"description":"Job queued; ECS task launched"},"400":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/BulkDeliveryPreflightExceeded"},{"$ref":"#/components/schemas/BulkDeliveryPushTargetError"},{"$ref":"#/components/schemas/BulkDeliveryColumnsError"}]}}},"description":"Validation failure (incl. `format_required`: a file delivery needs `format`; a refused `columns` request), delivery would exceed the entitlement's maxRows, OR the push target does not accept this entity (`ENTITY_MISMATCH`)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"402":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/BulkDeliveryInsufficientCredits"},{"$ref":"#/components/schemas/BulkDeliveryPushTargetError"}]}}},"description":"Insufficient credits (balance < estimatedTotal, at 1 credit per row), OR the plan does not include push targets (`PLAN_REQUIRED`)"},"403":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/BulkDeliveryForbidden"},{"$ref":"#/components/schemas/BulkDeliveryPushTargetError"},{"$ref":"#/components/schemas/BulkDeliveryInsufficientScope"}]}}},"description":"Delivery exceeds the 5,000-row limit available without the `bulk-delivery.properties` entitlement (lower `limit`, narrow the filters, or contact support for a limit increase), OR you may not use the push target (`FORBIDDEN`), OR a scoped token named a push-target destination without `push-targets:send` (`insufficient_scope`)."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeliveryPushTargetError"}}},"description":"Push target not found (`TARGET_NOT_FOUND`)"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeliveryPushTargetError"}}},"description":"Push target is disabled (`TARGET_DISABLED`)"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Preflight / S3 / DDB / ECS launch failure, the push-target check could not reach the auth server, or the credit balance could not be read (`billing_unavailable` — retry; a paid delivery is never queued unverified)"}},"summary":"Submit a bulk-delivery job for properties","tags":["Properties"]}},"/v1/properties/bulk-delivery/{jobId}":{"delete":{"description":"Cancels a queued or running properties delivery job.\n\nThe job is marked `cancelled` immediately; the container running it notices on its next page boundary and stops. Because a delivery is billed once, at the end, **a cancelled job is never charged** — no credits are debited and there is nothing to refund. No partial file is written.\n\nIdempotent-ish: cancelling a job that has already finished (or was already cancelled) returns 409 and changes nothing. Poll `GET /v1/properties/bulk-delivery/{jobId}` for the settled state.","operationId":"cancelPropertiesBulkDeliveryJob","parameters":[{"description":"Job ID returned by `POST /v1/properties/bulk-delivery`","in":"path","name":"jobId","required":true,"schema":{"description":"Job ID returned by `POST /v1/properties/bulk-delivery`","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeliveryStatusResponse"}}},"description":"Job cancelled; body is its settled status"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Caller does not own this job"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Job not found (or expired past 30d TTL)"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Job already finished — nothing to cancel"}},"summary":"Cancel a bulk-delivery job for properties","tags":["Properties"]},"get":{"operationId":"getPropertiesBulkDeliveryJob","parameters":[{"description":"Job ID returned by `POST /v1/properties/bulk-delivery`","in":"path","name":"jobId","required":true,"schema":{"description":"Job ID returned by `POST /v1/properties/bulk-delivery`","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeliveryStatusResponse"}}},"description":"Job status (resultsUrl re-signed if completed)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Caller does not own this job"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Job not found (or expired past 30d TTL)"}},"summary":"Get bulk-delivery job status for properties","tags":["Properties"]}},"/v1/properties/count":{"post":{"description":"Return the exact number of properties matching the given filters. Accepts the same request body as `listProperties` (pagination and sort are ignored). Use this when you only need a total; to get the matching properties themselves, send the same request body to `listProperties`.","operationId":"countProperties","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyListRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountResponse"}}},"description":"Exact count of matching properties"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Count properties matching filters","tags":["Properties"],"x-mm-records-via":"listProperties"}},"/v1/properties/enrich":{"post":{"description":"Looks up owner contact information for up to 50 properties in a single synchronous request. Each id is resolved independently and returned in the `results` array with its own status — a bad id never fails the batch. Each match debits 10 credits; cache hits and no-matches are free. Every ok item also carries `property` — the parcel's Community Lending neighborhood profile and mortgage party rosters. For larger sets use the asynchronous bulk job.","operationId":"enrichPropertiesBatch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichBatchRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichBatchResponse"}}},"description":"Per-item results (each cached, fresh, or errored)"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid request (Zod validation failure)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"}},"summary":"Enrich several properties with owner contact info in one request","tags":["Properties"]}},"/v1/properties/enrich-bulk":{"post":{"description":"Queues an ECS task that enriches up to 50000 properties. Returns 202 with a jobId; poll `GET /v1/properties/enrich-bulk/{jobId}` or subscribe to the `enrichment.bulk.*` EventBridge / webhook events for completion.","operationId":"enrichPropertiesBulk","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichBulkRequest"}}}},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichBulkResponse"}}},"description":"Job queued; ECS task launched"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid request (Zod validation failure)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"402":{"content":{"application/json":{"schema":{"properties":{"balance":{"description":"Remaining credit balance the charge saw.","type":"number"},"cost":{"description":"Credits the request asked for.","type":"number"},"error":{"enum":["payment_required"],"type":"string"},"message":{"description":"Human-readable explanation of the decline.","type":"string"},"reason":{"description":"Why the charge was declined, when known: `out_of_credits` (balance empty) vs. `limit_reached` (a spend cap was hit).","enum":["out_of_credits","limit_reached"],"type":"string"}},"required":["error","balance","cost"],"type":"object"}}},"description":"Insufficient credits (balance < the job's worst-case cost in credits)"},"429":{"content":{"application/json":{"schema":{"properties":{"category":{"enum":["enrichment"],"type":"string"},"error":{"enum":["daily_limit_exceeded"],"type":"string"},"limit":{"description":"The daily cap.","type":"number"},"message":{"type":"string"},"requested":{"description":"Upper bound of this job's charge, in credits (not a count of ids).","type":"number"},"used":{"description":"Credits already used against today's cap.","type":"number"}},"required":["error","category","used","limit","requested","message"],"type":"object"}}},"description":"Job's max charge (one per targeted property) would exceed the member's daily enrichment cap (`daily_limit_exceeded`)"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Failed to launch task or stage inputs, or the credit balance could not be read (`billing_unavailable`, nothing queued)"}},"summary":"Submit a bulk skip-trace job","tags":["Properties"]}},"/v1/properties/enrich-bulk/{jobId}":{"delete":{"description":"Cancels a queued or running bulk enrichment job.\n\nThe job is marked `cancelled` immediately; the container running it notices at its next progress tick and stops. Enrichment is billed once, at the end, so **a cancelled job is never charged** — no credits are debited and there is nothing to refund. Properties already enriched stay in the cache, so re-running later is cheaper.\n\nCancelling a job that has already finished (or was already cancelled) returns 409 and changes nothing.","operationId":"cancelEnrichBulkJob","parameters":[{"description":"Job ID from `POST /v1/properties/enrich-bulk`","in":"path","name":"jobId","required":true,"schema":{"description":"Job ID from `POST /v1/properties/enrich-bulk`","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichBulkJobResponse"}}},"description":"Job cancelled; body is its settled status"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Caller does not own this job"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Job not found (or expired past 30d TTL)"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Job already finished — nothing to cancel"}},"summary":"Cancel a bulk enrichment job","tags":["Properties"]},"get":{"operationId":"getEnrichBulkJob","parameters":[{"description":"Job ID from `POST /v1/properties/enrich-bulk`","in":"path","name":"jobId","required":true,"schema":{"description":"Job ID from `POST /v1/properties/enrich-bulk`","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichBulkJobResponse"}}},"description":"Job status (resultsUrl re-signed if completed)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Caller does not own this job"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Job not found (or expired past 30d TTL)"}},"summary":"Get bulk enrichment job status","tags":["Properties"]}},"/v1/properties/enrichments":{"get":{"operationId":"listEnrichments","parameters":[{"description":"Maximum number of items to return (default 25)","in":"query","name":"limit","required":false,"schema":{"description":"Maximum number of items to return (default 25)","maximum":100,"minimum":1,"type":"integer"}},{"description":"Pagination cursor from a previous response","in":"query","name":"cursor","required":false,"schema":{"description":"Pagination cursor from a previous response","type":"string"}},{"description":"Return only this property's enrichment (zero or one item). The id is the one in the credit ledger's `enrich:<propertyId>` reason.","in":"query","name":"propertyId","required":false,"schema":{"description":"Return only this property's enrichment (zero or one item). The id is the one in the credit ledger's `enrich:<propertyId>` reason.","minLength":1,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichmentListResponse"}}},"description":"Paginated list of enriched properties"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"}},"summary":"List enriched properties for the current user","tags":["Properties"]}},"/v1/properties/resolve":{"post":{"description":"Resolve up to 2,000 postal addresses to property ids in one call — e.g. a mailing list before a bulk delivery. Free. Returns one result per input, in order, keyed by your `ref`. `matched` carries the parcel `id` and `mmPropertyId` — pass them to bulk delivery `propertyIds` or the list `flatFilters.id`, then join the rows back on `ref`. Each address is first matched on the normalized number + street + unit + zip key (suffix, directional, punctuation and case insensitive); misses fall back to a ranked search that only accepts a hit with the same house number, the same zip or city, and a near-identical street name. `ambiguous` lists `candidates`: `unit_required` (a building whose units are separate parcels — resend with the unit), `duplicate_parcels` (one address on several parcel records; usually safe to take them all), `multiple_parcels`. `not_found` gives a `reason`: `no_parcel_at_number` (no parcel at that house number in that zip/city), `low_confidence`, or an input problem (`no_house_number`, `no_street`, `no_location`).","operationId":"resolveProperties","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyResolveRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyResolveResponse"}}},"description":"One result per input address, in order"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Resolve a batch of addresses to property ids","tags":["Properties"]}},"/v1/properties/search":{"post":{"description":"Find properties by a single free-text query — a full or partial address, an owner name, or a place. Results are ranked by relevance and tolerate typos, missing components, and reordered street directionals (e.g. \"112 5th ave nw\" and \"112 nw 5th ave\" both match). Returns the same property summary rows as the list endpoint. Use this for a search box; use the list endpoint for structured filtering.","operationId":"searchProperties","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertySearchRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyListResponse"}}},"description":"Relevance-ranked property matches"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Free-text property search","tags":["Properties"]}},"/v1/properties/{id}":{"get":{"operationId":"getProperty","parameters":[{"description":"Property document ID","in":"path","name":"id","required":true,"schema":{"description":"Property document ID","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyDetailResponse"}}},"description":"Property detail"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Property not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large"}},"summary":"Get property by ID (with mm_property_id fallback)","tags":["Properties"]}},"/v1/properties/{id}/enrich":{"post":{"description":"Looks up owner contact information via skip-trace. Uses the canonical address first; falls back to an associated loan or sale record address if the canonical is missing. The response also carries `property` — the parcel's Community Lending neighborhood profile and its mortgage party rosters, the same blocks `GET /v1/properties/{id}` returns — so the two questions that follow a skip-trace do not need a second call. `property` is `null` when the id resolves to more than one parcel and the request was served from cache (a fresh lookup 409s instead, rather than bill for a guess).","operationId":"enrichProperty","parameters":[{"description":"Property document ID. Use the `id` or `mmPropertyId` returned by a property search/detail, or the `mmPropertyId` on a loan/sale record (e.g. `mm_37035375304734463`). Do NOT pass a bare APN, a fips+apn string, or a `loan_…` id — those will not resolve.","in":"path","name":"id","required":true,"schema":{"description":"Property document ID. Use the `id` or `mmPropertyId` returned by a property search/detail, or the `mmPropertyId` on a loan/sale record (e.g. `mm_37035375304734463`). Do NOT pass a bare APN, a fips+apn string, or a `loan_…` id — those will not resolve.","type":"string"}},{"description":"When 'true', bypass both the per-member entitlement and the internal property cache, force a fresh skip-trace, and re-charge the user. Default: 'false'.","in":"query","name":"refresh","required":false,"schema":{"description":"When 'true', bypass both the per-member entitlement and the internal property cache, force a fresh skip-trace, and re-charge the user. Default: 'false'.","enum":["true","false"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichPropertyResponse"}}},"description":"Enrichment data (cached or fresh)"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Property has no usable address on the parcel or any associated record"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication required"},"402":{"content":{"application/json":{"schema":{"properties":{"balance":{"description":"Remaining credit balance the charge saw.","type":"number"},"cost":{"description":"Credits the request asked for.","type":"number"},"error":{"enum":["payment_required"],"type":"string"},"message":{"description":"Human-readable explanation of the decline.","type":"string"},"reason":{"description":"Why the charge was declined, when known: `out_of_credits` (balance empty) vs. `limit_reached` (a spend cap was hit).","enum":["out_of_credits","limit_reached"],"type":"string"}},"required":["error","balance","cost"],"type":"object"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Caller lacks permission to charge credits (`permission_denied`)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Property not found, or the caller is not a member of the org (`member_not_found`)"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichAmbiguousRef"}}},"description":"The id resolved to more than one parcel (a non-unique `mm_property_id` colliding across units). Pass one of `alternates` (an exact `id`) to enrich a specific unit. NOT charged."},"429":{"content":{"application/json":{"schema":{"properties":{"category":{"description":"Usage category that was capped, when reported.","type":"string"},"error":{"enum":["rate_limited","daily_limit_exceeded"],"type":"string"},"limit":{"description":"The cap, when known.","type":"number"},"message":{"description":"Human-readable explanation of the throttle.","type":"string"},"requested":{"description":"Credits this request asked for, when known.","type":"number"},"retryAfterSeconds":{"description":"`rate_limited` only: seconds to wait before retrying, when the billing server reported it (also sent as a `Retry-After` header). A `rate_limited` throttle is short-term and is NOT the daily cap.","minimum":0,"type":"integer"},"used":{"description":"Credits already used in the window, when known.","type":"number"}},"required":["error"],"type":"object"}}},"description":"Throttled — `daily_limit_exceeded` (daily category cap, proven by the billing server's structured fields) or `rate_limited` (a short-term throttle that clears on retry; not the daily cap)","headers":{"Retry-After":{"description":"`rate_limited` only, when known: seconds to wait before retrying.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Enrichment provider error"}},"summary":"Enrich a property with owner contact info","tags":["Properties"]}},"/v1/properties/{id}/related":{"get":{"description":"Return the ids of records of another type that are linked to this record. Links resolve by identifier, strongest identifier first, and equally-trusted identifiers are combined — a company's linked loans cover every role it holds on a loan, not just the first one found. The response reports which strength was used: `primary` is the canonical identifier for that pair, `secondary` is a real but weaker alternate used only when the record carries nothing better. This is a lightweight index: it returns ids and a count, not full records. For filtering, sorting, pagination and full detail, use the named endpoint for the pair (for example the originator loans endpoint) and fetch records by id.","operationId":"propertyRelated","parameters":[{"description":"Property id","in":"path","name":"id","required":true,"schema":{"description":"Property id","type":"string"}},{"description":"Type of record to link to","in":"query","name":"to","required":true,"schema":{"description":"Type of record to link to","enum":["companies","loans","originators","sales"],"type":"string"}},{"description":"Maximum ids to return (default 25, max 200)","in":"query","name":"limit","required":false,"schema":{"description":"Maximum ids to return (default 25, max 200)","maximum":200,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelatedResponse"}}},"description":"Linked record ids"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Record not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Records linked to this one","tags":["Related"]}},"/v1/properties/{mmPropertyId}/transaction-flags":{"post":{"description":"Report that a listing, sale or mortgage on a property's history looks wrong — a wrong loan amount, loan officer or company, a duplicate, missing details, or a missing transaction. The flag is reviewed by the Model Match data team; this call only records it and answers immediately. Flagging the same transaction for the same reason again while the first flag is still open returns the first flag's `id`.","operationId":"createPropertyTransactionFlag","parameters":[{"description":"The property's `mmPropertyId`.","in":"path","name":"mmPropertyId","required":true,"schema":{"description":"The property's `mmPropertyId`.","example":"mm_37035375304734463","maxLength":256,"minLength":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTransactionFlagBody"}}}},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionFlagAccepted"}}},"description":"Recorded. Review happens afterwards."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The request body is too large."},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The body must be sent as `application/json`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Too many flags in the last 24 hours. Try again later."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Flag a transaction on a property's history","tags":["Properties"]}},"/v1/realtime/config":{"get":{"description":"Returns the realtime/notifications connection info (endpoint, authorizer, app, stage) merged with the caller's userId, so a trusted client can connect to its per-user IoT MQTT topic.","operationId":"getRealtimeConfig","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RealtimeConfigResponse"}}},"description":"Realtime connection config"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RealtimeConfigUnavailable"}}},"description":"Realtime backend not configured"}},"summary":"Get realtime connection config","tags":["Realtime"]}},"/v1/sales":{"post":{"description":"Search and list individual real-estate sale transactions and active listings with filters — one row per sale/listing. Filter by location (state, county, city, zip), sale price, sale or listing date, property characteristics (beds, baths, square footage, property type), and listing status, with sorting and cursor pagination. This is the discrete per-transaction sales-record search: use it to find specific sales or build a filtered list of sold/active listings. If you only need how many sales match and not the records themselves, send the same request body to `countSales`.","operationId":"listSales","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaleListRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaleListResponse"}}},"description":"Paginated list of sales"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error. Includes unresolvable location filters: a `city`/`county`/`state`/`zip` value that does not match a recognized location returns 400 rather than an empty result set. Resolve the name with `instantSearch` (use an id from its `results.locations[]`) or `suggestLocations` (use the `id` of a `source: \"dictionary\"` result), then pass that id back as the filter value."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Search sales with filters","tags":["Sales"]}},"/v1/sales/analytics/chart":{"post":{"operationId":"salesAnalyticsChart","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaleChartRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChartResponse"}}},"description":"Chart data"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Configurable chart (measure × slice) over the market","tags":["Sales"]}},"/v1/sales/analytics/market-stats":{"post":{"description":"Median sold price, price per sqft, days to sell and sale-to-list ratio over the closed sales in `period` (default `last12Months`), plus active inventory, median list price and the share of active listings with a price cut. Requires a geography (`zipCode`, `city`, `county`, `fips`, `geoPoint` or `geoBounds`). Rentals and prices under $25,000 are excluded, and active listings not touched within `activeWithinDays` are dropped. Medians are approximate and each carries the sample size it is computed from (`sold.samples`). **Property type:** the listing property-type field is populated only on recent rows, so a `propertyType` filter (and the rental exclusion by type) is reliable for recent months only; the price floor is what keeps rentals out of older periods. Billed as one analytics call.","operationId":"salesMarketStats","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaleMarketStatsRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaleMarketStatsResponse"}}},"description":"Sold and active market figures"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error. Includes unresolvable location filters: a `city`/`county`/`state`/`zip` value that does not match a recognized location returns 400 rather than an empty result set. Resolve the name with `instantSearch` (use an id from its `results.locations[]`) or `suggestLocations` (use the `id` of a `source: \"dictionary\"` result), then pass that id back as the filter value."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Neighborhood market stats for a ZIP, city, county or area","tags":["Sales"]}},"/v1/sales/analytics/summary":{"post":{"operationId":"salesAnalyticsSummary","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaleSummaryRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SidedSummaryResponse"}}},"description":"Sided market summary with previous-period comparison"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Market summary with buyer/seller/dual split + previous period","tags":["Sales"]}},"/v1/sales/analytics/time-series":{"post":{"operationId":"salesAnalyticsTimeSeries","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaleTimeSeriesRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesTimeSeriesResponse"}}},"description":"Time-series with side splits + previous period. Every side carries `volume`, `units`, and `measureValue` for the requested `measure`."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Volume/units over time with buyer/seller/dual split","tags":["Sales"]}},"/v1/sales/count":{"post":{"description":"Return the exact number of sales matching the given filters. Accepts the same request body as `listSales` (pagination and sort are ignored). Use this when you only need a total; to get the matching sales themselves, send the same request body to `listSales`.","operationId":"countSales","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaleListRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountResponse"}}},"description":"Exact count of matching sales"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Count sales matching filters","tags":["Sales"],"x-mm-records-via":"listSales"}},"/v1/sales/map":{"post":{"description":"One call for a whole map viewport. Send the visible `bounds` (and optionally `zoom`) plus the usual sales filters. When the matches fit in `limit` the response is individual `point` rows (id, coordinates, price, status, beds/baths/sqft); otherwise it is `cluster` rows, one per grid cell, each with a count, the centroid of its listings and an approximate median list price. `total` is the exact number of matching listings in the box. **Billing: each element of `data` is billed like a list row (1 credit), so `limit` bounds the cost of one call.** Use `POST /v1/sales/count` with `flatFilters.geoBounds` for a free count.","operationId":"mapSales","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaleMapRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaleMapResponse"}}},"description":"Points or clusters for the viewport"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error. Includes unresolvable location filters: a `city`/`county`/`state`/`zip` value that does not match a recognized location returns 400 rather than an empty result set. Resolve the name with `instantSearch` (use an id from its `results.locations[]`) or `suggestLocations` (use the `id` of a `source: \"dictionary\"` result), then pass that id back as the filter value."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Draw a map viewport: listing points or grid clusters","tags":["Sales"]}},"/v1/sales/{id}":{"get":{"operationId":"getSale","parameters":[{"description":"Sale document ID","in":"path","name":"id","required":true,"schema":{"description":"Sale document ID","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaleDetailResponse"}}},"description":"Sale detail"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Sale not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large"}},"summary":"Get sale by ID","tags":["Sales"]}},"/v1/sales/{id}/related":{"get":{"description":"Return the ids of records of another type that are linked to this record. Links resolve by identifier, strongest identifier first, and equally-trusted identifiers are combined — a company's linked loans cover every role it holds on a loan, not just the first one found. The response reports which strength was used: `primary` is the canonical identifier for that pair, `secondary` is a real but weaker alternate used only when the record carries nothing better. This is a lightweight index: it returns ids and a count, not full records. For filtering, sorting, pagination and full detail, use the named endpoint for the pair (for example the originator loans endpoint) and fetch records by id.","operationId":"saleRelated","parameters":[{"description":"Sale id","in":"path","name":"id","required":true,"schema":{"description":"Sale id","type":"string"}},{"description":"Type of record to link to","in":"query","name":"to","required":true,"schema":{"description":"Type of record to link to","enum":["agents","loans","properties"],"type":"string"}},{"description":"Maximum ids to return (default 25, max 200)","in":"query","name":"limit","required":false,"schema":{"description":"Maximum ids to return (default 25, max 200)","maximum":200,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelatedResponse"}}},"description":"Linked record ids"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Record not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Records linked to this one","tags":["Related"]}},"/v1/saved-filters":{"get":{"description":"The caller's saved filters (and saved CRM views) in the active organization plus the ones shared with them, oldest first, optionally narrowed by target, kind and ownership. `isOwner` / `permission` / `canEdit` on each row say whose it is and what the caller may do.","operationId":"listSavedFilters","parameters":[{"description":"Which list the filter runs against. Market targets run against that entity's list operation (see `operationId`, e.g. listOriginators); `crm_people` / `crm_companies` are UI-only (filtered client-side).","in":"query","name":"target","required":false,"schema":{"description":"Which list the filter runs against. Market targets run against that entity's list operation (see `operationId`, e.g. listOriginators); `crm_people` / `crm_companies` are UI-only (filtered client-side).","enum":["originators","agents","companies","branches","offices","loans","properties","sales","crm_people","crm_companies"],"type":"string"}},{"description":"`filter` (default) — a saved search; `view` — a saved CRM table layout (columns / order) kept in `uiState`. Views never carry a `query` and have their own 25-per-target quota. Fixed at create.","in":"query","name":"kind","required":false,"schema":{"description":"`filter` (default) — a saved search; `view` — a saved CRM table layout (columns / order) kept in `uiState`. Views never carry a `query` and have their own 25-per-target quota. Fixed at create.","enum":["filter","view"],"type":"string"}},{"description":"`mine` — only filters you own; `shared` — only filters shared with you. Omit for both.","in":"query","name":"ownership","required":false,"schema":{"description":"`mine` — only filters you own; `shared` — only filters shared with you. Omit for both.","enum":["mine","shared"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedFilterList"}}},"description":"Saved filters."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"List your saved filters","tags":["Saved Filters"]},"post":{"description":"Save a named filter for a list target. For a market target, `query` is the target operation's request body without `pagination` (e.g. the body you would send to listOriginators) and is validated against it. New filters are private. Limit: 25 you own per target (filters shared with you do not count).","operationId":"createSavedFilter","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSavedFilterRequest"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSavedFilterResult"}}},"description":"The saved filter."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedFilterError"}}},"description":"Validation error — including a `query` that is not a valid request for the target's operation (`issues` lists each problem)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedFilterError"}}},"description":"`QUOTA_EXCEEDED` — 25 saved filters for this target already; update or delete one."},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Save a filter","tags":["Saved Filters"]}},"/v1/saved-filters/{id}":{"delete":{"description":"Owner or workspace admin only; its shares go with it. A filter shared with you cannot be deleted by you.","operationId":"deleteSavedFilter","parameters":[{"description":"Saved-filter id (nanoid).","in":"path","name":"id","required":true,"schema":{"description":"Saved-filter id (nanoid).","example":"V1StGXR8_Z5jdHi6B-myT","maxLength":32,"minLength":1,"pattern":"^[\\w-]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteSavedFilterResult"}}},"description":"Deleted."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedFilterError"}}},"description":"No active organization, or (`code: FORBIDDEN`) the filter is shared with you at a level that does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedFilterError"}}},"description":"No saved filter with that id is visible to the caller (their own, or shared with them)."},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Delete a saved filter","tags":["Saved Filters"]},"get":{"description":"Returns the saved `query` and the `operationId` to run it with — your own filter or one shared with you. Check `fidelity` (`partial` → `unmapped` lists what the query omits; `ui_only` → nothing to run) and `stale` (the query no longer validates) before running.","operationId":"getSavedFilter","parameters":[{"description":"Saved-filter id (nanoid).","in":"path","name":"id","required":true,"schema":{"description":"Saved-filter id (nanoid).","example":"V1StGXR8_Z5jdHi6B-myT","maxLength":32,"minLength":1,"pattern":"^[\\w-]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSavedFilterResult"}}},"description":"The saved filter."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedFilterError"}}},"description":"No saved filter with that id is visible to the caller (their own, or shared with them)."},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Get a saved filter (with the operation to run it)","tags":["Saved Filters"]},"patch":{"description":"Rename, re-icon, or replace the query / UI state (owner, `editor`, or workspace admin). The target is fixed. A new `query` is validated like on create. `visibility` / `orgWidePermission` change who can see it (owner or workspace admin only).","operationId":"updateSavedFilter","parameters":[{"description":"Saved-filter id (nanoid).","in":"path","name":"id","required":true,"schema":{"description":"Saved-filter id (nanoid).","example":"V1StGXR8_Z5jdHi6B-myT","maxLength":32,"minLength":1,"pattern":"^[\\w-]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSavedFilterRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSavedFilterResult"}}},"description":"The updated filter."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedFilterError"}}},"description":"Validation error — including a `query` that is not a valid request for the target's operation (`issues` lists each problem)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedFilterError"}}},"description":"No active organization, or (`code: FORBIDDEN`) the filter is shared with you at a level that does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedFilterError"}}},"description":"No saved filter with that id is visible to the caller (their own, or shared with them)."},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Update a saved filter","tags":["Saved Filters"]}},"/v1/saved-filters/{id}/shareable-members":{"get":{"description":"Owner or workspace admin only. Every member of the workspace, the owner and existing shares included — subtract them for the picker.","operationId":"listSavedFilterShareableMembers","parameters":[{"description":"Saved-filter id (nanoid).","in":"path","name":"id","required":true,"schema":{"description":"Saved-filter id (nanoid).","example":"V1StGXR8_Z5jdHi6B-myT","maxLength":32,"minLength":1,"pattern":"^[\\w-]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedFilterShareableMemberList"}}},"description":"The workspace roster."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedFilterError"}}},"description":"No active organization, or (`code: FORBIDDEN`) the filter is shared with you at a level that does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedFilterError"}}},"description":"No saved filter with that id is visible to the caller (their own, or shared with them)."},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Workspace members could not be read (auth service unavailable)."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"List the workspace members a saved filter can be shared with","tags":["Saved Filters"]}},"/v1/saved-filters/{id}/shares":{"delete":{"description":"Owner or workspace admin only. Removes that member's share; a no-op (`revoked: false`) when there was none.","operationId":"revokeSavedFilterAccess","parameters":[{"description":"Saved-filter id (nanoid).","in":"path","name":"id","required":true,"schema":{"description":"Saved-filter id (nanoid).","example":"V1StGXR8_Z5jdHi6B-myT","maxLength":32,"minLength":1,"pattern":"^[\\w-]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeSavedFilterAccessRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeSavedFilterAccessResult"}}},"description":"Whether a share was removed."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedFilterError"}}},"description":"No active organization, or (`code: FORBIDDEN`) the filter is shared with you at a level that does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedFilterError"}}},"description":"No saved filter with that id is visible to the caller (their own, or shared with them)."},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Stop sharing a saved filter with a member","tags":["Saved Filters"]},"get":{"description":"Visibility, owner, the workspace-wide role and every per-user share. Readable by the owner, an `editor`, or a workspace admin.","operationId":"getSavedFilterShares","parameters":[{"description":"Saved-filter id (nanoid).","in":"path","name":"id","required":true,"schema":{"description":"Saved-filter id (nanoid).","example":"V1StGXR8_Z5jdHi6B-myT","maxLength":32,"minLength":1,"pattern":"^[\\w-]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSavedFilterSharesResult"}}},"description":"The filter's sharing state."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedFilterError"}}},"description":"No active organization, or (`code: FORBIDDEN`) the filter is shared with you at a level that does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedFilterError"}}},"description":"No saved filter with that id is visible to the caller (their own, or shared with them)."},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Workspace members could not be read (auth service unavailable)."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Get who a saved filter is shared with","tags":["Saved Filters"]},"post":{"description":"Owner or workspace admin only. Re-sharing updates the member's role. Sharing a private filter makes it `shared`. Sharing with the owner is a no-op (`granted: false`).","operationId":"grantSavedFilterAccess","parameters":[{"description":"Saved-filter id (nanoid).","in":"path","name":"id","required":true,"schema":{"description":"Saved-filter id (nanoid).","example":"V1StGXR8_Z5jdHi6B-myT","maxLength":32,"minLength":1,"pattern":"^[\\w-]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantSavedFilterAccessRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantSavedFilterAccessResult"}}},"description":"Whether a new share was created (false when an existing one was updated)."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedFilterError"}}},"description":"Validation error, or (`code: NOT_ORG_MEMBER`) the user is not a member of your workspace."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedFilterError"}}},"description":"No active organization, or (`code: FORBIDDEN`) the filter is shared with you at a level that does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedFilterError"}}},"description":"No saved filter with that id is visible to the caller (their own, or shared with them)."},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Workspace members could not be read (auth service unavailable)."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUnavailable"}}},"description":"Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."}},"summary":"Share a saved filter with a workspace member","tags":["Saved Filters"]}},"/v1/search-token":{"get":{"description":"Returns a short-lived scoped search token plus the host to query, so a trusted client can search the entity indexes directly with per-query controls (e.g. attributesToSearchOn for name-only matching).","operationId":"getSearchToken","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchTokenResponse"}}},"description":"Scoped search token"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}},"description":"Response payload too large — detail endpoint capped to fit Lambda response limits"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchTokenUnavailable"}}},"description":"Search backend not configured"}},"summary":"Mint a scoped search token","tags":["Search"]}},"/v1/signals/lo-move":{"get":{"description":"Recruiting Radar: loan officers active in `state`, ordered by priority for recruiting outreach (highest first), based on signs they may start at a new company within the next six months. Each row carries a priority score (0–1, higher is higher priority), its priority percentile among all scored loan officers nationally (not just this state), and up to three plain-language reasons. Use it to find recruiting targets in a market. `state` is required and must be a two-letter US state code. Pages with `limit` / `cursor`. 1 credit per row returned.","operationId":"listLoMoveSignals","parameters":[{"description":"Two-letter US state code (e.g. `CO`). Ranks the loan officers active in that state.","in":"query","name":"state","required":true,"schema":{"description":"Two-letter US state code (e.g. `CO`). Ranks the loan officers active in that state.","example":"CO","pattern":"^[A-Za-z]{2}$","type":"string"}},{"description":"Rows per page (1–100, default 25)","in":"query","name":"limit","required":false,"schema":{"default":25,"description":"Rows per page (1–100, default 25)","maximum":100,"minimum":1,"type":"integer"}},{"description":"Opaque cursor from the previous page's `cursor`.","in":"query","name":"cursor","required":false,"schema":{"description":"Opaque cursor from the previous page's `cursor`.","maxLength":2048,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoMoveSignalList"}}},"description":"A page of ranked loan officers"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid parameters or cursor"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden (authenticated, but missing required context — e.g. no active organization)"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Signals are temporarily unavailable. Retry later."}},"summary":"Loan officers to prioritize for recruiting, by state","tags":["Signals"]}},"/v1/studio/catalog":{"get":{"description":"Everything a Studio question can read: the market tables (recorded mortgage loans, home listings and sales), the result tables of your organization's own saved jobs, the files your organization uploaded (`upload_…`) and your organization's CRM (`crm_…`: the lists shared with the whole organization and the records in them, refreshed about every 15 minutes; they join to market data on NMLS ids) and the tables ModelMatch publishes for every organization (`mm_…`, kind `published`: already computed, read-only, each says when it was last refreshed — when one covers the question, query it instead of recomputing from the market tables). Each table lists its columns with a type and a plain-language description, and notes worth reading before writing SQL. `limits` says how many rows an answer can carry and how long a question may run; `guidance` says how to write SQL that works here. `notes` carries anything worth telling the user about the catalog itself, such as why there are no CRM tables yet. Read this before the first question in a conversation. Free.","operationId":"getStudioCatalog","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioCatalog"}}},"description":"The tables, their columns, the limits and guidance"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"The request was refused, and `error` says why: SQL that is not a single read-only SELECT, an unknown table (`details.table`, `details.availableTables`), an unknown column (`details.column`, `details.suggestions`), a function that is not available (`details.function`), or a job that could not run as written (`invalid_job`)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`no_organization` — Studio works inside an organization: select one and retry. `studio_not_enabled` — Studio is in a limited preview and is not enabled for this account. `entitlement_missing` — saving, switching to or running a `heavy` job needs heavy runs enabled for your organization (`details.entitlementKey`): ask your ModelMatch admin, or use `size: light`."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_not_found` — your organization has no job of that name. `query_not_found` — your organization has no background question of that id."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_exists` — the name is taken; `job_limit_reached` — your organization is at its limit of saved jobs (`details.limit`); `job_running` — another job is running for your organization, retry when it has finished."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"The SQL is valid but asks for more than one answer may cost: `timeout` (it ran for its whole time, in the background included, and was stopped — narrow it by state or date; or it could not carry on in the background because another question of your organization already is), `result_too_large`, `resource_limit`. For a job run, `job_failed`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`rate_limited` — too many requests from your organization in the last minute; or `busy` — every slot is taken right now. Wait `details.retryAfterSeconds` (also sent as `Retry-After`)."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`studio_unavailable` — Studio is not available right now. `entitlement_unavailable` — whether your organization can run heavy jobs could not be confirmed; nothing was saved or started. Try again in a minute."}},"summary":"Tables you can query in Studio, with their columns","tags":["Studio"]}},"/v1/studio/jobs":{"get":{"description":"Every job your organization has saved, each with its schedule, when it next runs, the table its result is in, and how its last run went. Free.","operationId":"listStudioJobs","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioJobList"}}},"description":"The saved jobs"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"The request was refused, and `error` says why: SQL that is not a single read-only SELECT, an unknown table (`details.table`, `details.availableTables`), an unknown column (`details.column`, `details.suggestions`), a function that is not available (`details.function`), or a job that could not run as written (`invalid_job`)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`no_organization` — Studio works inside an organization: select one and retry. `studio_not_enabled` — Studio is in a limited preview and is not enabled for this account. `entitlement_missing` — saving, switching to or running a `heavy` job needs heavy runs enabled for your organization (`details.entitlementKey`): ask your ModelMatch admin, or use `size: light`."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_not_found` — your organization has no job of that name. `query_not_found` — your organization has no background question of that id."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_exists` — the name is taken; `job_limit_reached` — your organization is at its limit of saved jobs (`details.limit`); `job_running` — another job is running for your organization, retry when it has finished."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"The SQL is valid but asks for more than one answer may cost: `timeout` (it ran for its whole time, in the background included, and was stopped — narrow it by state or date; or it could not carry on in the background because another question of your organization already is), `result_too_large`, `resource_limit`. For a job run, `job_failed`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`rate_limited` — too many requests from your organization in the last minute; or `busy` — every slot is taken right now. Wait `details.retryAfterSeconds` (also sent as `Retry-After`)."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`studio_unavailable` — Studio is not available right now. `entitlement_unavailable` — whether your organization can run heavy jobs could not be confirmed; nothing was saved or started. Try again in a minute."}},"summary":"Your organization's saved jobs","tags":["Studio"]},"post":{"description":"Save a SQL question to run again: on a schedule (`daily`, `weekly`) or only when asked (`manual`). Each run stores its result as a table named after the job, which later questions — and later jobs — can query like any other table. Name the `keys` (the columns that identify one row) to get 'what changed since the last run', and add `alerts` to flag new rows, removed rows or a number crossing a threshold. When an alert matches on a scheduled run, the job's creator is emailed (once per hourly tick, every job of theirs in one email, also in their notifications); `notify: { email: false }` saves the job without those emails, and `updateStudioJob` changes it later. Webhooks are not available yet. The SQL is checked when the job is saved: an unknown table or column, or a key that is not in the result, is refused here rather than at the first run. Saving does not run the job. To start from an existing job, give `copyFrom` (one of your jobs) or `copyFromPublished` (the `mm_*` table of a job ModelMatch publishes) instead of `sql`: its SQL, keys, alerts and description are copied into an editable job of your own — anything the request gives overrides them — checked like any other, starting `manual`; the job keeps `copiedFrom`. A published table built by a program, or a published model (copy that with createStudioModel and `basedOnPublished`), cannot be copied as a job. Saving is free; each run that succeeds costs 10 credits, including the runs a `daily` or `weekly` schedule starts. `size: heavy`: more time and rows per run (the catalog's `limits.heavyJobs`), 100 credits a run, for organizations with heavy runs enabled (`403 entitlement_missing` otherwise); the SQL rules are the same. A heavy run gets capacity of its own with more memory and takes minutes rather than seconds; the job's `limits` say how long a run may take. `perState: true` (heavy jobs only; off unless set) runs the SQL once for each state and puts the results together. It is correct ONLY when every row of the result depends on one state's data — a list of homes, a join per property. It is wrong for national rankings, totals or averages: a top 10 would become a top 10 in every state. SQL ending in `LIMIT` is refused for it. A state that fails is tried once more, and the run lists how each state went (`states`).","operationId":"createStudioJob","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioJobRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioJobSaved"}}},"description":"The saved job"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"The request was refused, and `error` says why: SQL that is not a single read-only SELECT, an unknown table (`details.table`, `details.availableTables`), an unknown column (`details.column`, `details.suggestions`), a function that is not available (`details.function`), or a job that could not run as written (`invalid_job`)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`no_organization` — Studio works inside an organization: select one and retry. `studio_not_enabled` — Studio is in a limited preview and is not enabled for this account. `entitlement_missing` — saving, switching to or running a `heavy` job needs heavy runs enabled for your organization (`details.entitlementKey`): ask your ModelMatch admin, or use `size: light`."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_not_found` — your organization has no job of that name. `query_not_found` — your organization has no background question of that id."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_exists` — the name is taken; `job_limit_reached` — your organization is at its limit of saved jobs (`details.limit`); `job_running` — another job is running for your organization, retry when it has finished."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"The SQL is valid but asks for more than one answer may cost: `timeout` (it ran for its whole time, in the background included, and was stopped — narrow it by state or date; or it could not carry on in the background because another question of your organization already is), `result_too_large`, `resource_limit`. For a job run, `job_failed`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`rate_limited` — too many requests from your organization in the last minute; or `busy` — every slot is taken right now. Wait `details.retryAfterSeconds` (also sent as `Retry-After`)."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`studio_unavailable` — Studio is not available right now. `entitlement_unavailable` — whether your organization can run heavy jobs could not be confirmed; nothing was saved or started. Try again in a minute."}},"summary":"Save a question as a job","tags":["Studio"]}},"/v1/studio/jobs/{name}":{"delete":{"description":"Delete a saved job, its run history and its result tables. Questions and jobs that read its table stop working. Free.","operationId":"deleteStudioJob","parameters":[{"description":"The job's name: lower-case letters, digits and underscores, starting with a letter. It is also the name of the table that holds the job's result.","in":"path","name":"name","required":true,"schema":{"description":"The job's name: lower-case letters, digits and underscores, starting with a letter. It is also the name of the table that holds the job's result.","example":"top_lenders_tx","pattern":"^[a-z][a-z0-9_]{0,62}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioJobDeleted"}}},"description":"Deleted"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"The request was refused, and `error` says why: SQL that is not a single read-only SELECT, an unknown table (`details.table`, `details.availableTables`), an unknown column (`details.column`, `details.suggestions`), a function that is not available (`details.function`), or a job that could not run as written (`invalid_job`)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`no_organization` — Studio works inside an organization: select one and retry. `studio_not_enabled` — Studio is in a limited preview and is not enabled for this account. `entitlement_missing` — saving, switching to or running a `heavy` job needs heavy runs enabled for your organization (`details.entitlementKey`): ask your ModelMatch admin, or use `size: light`."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_not_found` — your organization has no job of that name. `query_not_found` — your organization has no background question of that id."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_exists` — the name is taken; `job_limit_reached` — your organization is at its limit of saved jobs (`details.limit`); `job_running` — another job is running for your organization, retry when it has finished."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"The SQL is valid but asks for more than one answer may cost: `timeout` (it ran for its whole time, in the background included, and was stopped — narrow it by state or date; or it could not carry on in the background because another question of your organization already is), `result_too_large`, `resource_limit`. For a job run, `job_failed`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`rate_limited` — too many requests from your organization in the last minute; or `busy` — every slot is taken right now. Wait `details.retryAfterSeconds` (also sent as `Retry-After`)."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`studio_unavailable` — Studio is not available right now. `entitlement_unavailable` — whether your organization can run heavy jobs could not be confirmed; nothing was saved or started. Try again in a minute."}},"summary":"Delete a job and its results","tags":["Studio"]},"get":{"description":"A saved job with its recent runs (newest first), what changed in the latest successful run since the one before it, the alert rules that matched, and `result.table` — the table to query for its rows. Poll this after starting a run that answered `running`. Free.","operationId":"getStudioJob","parameters":[{"description":"The job's name: lower-case letters, digits and underscores, starting with a letter. It is also the name of the table that holds the job's result.","in":"path","name":"name","required":true,"schema":{"description":"The job's name: lower-case letters, digits and underscores, starting with a letter. It is also the name of the table that holds the job's result.","example":"top_lenders_tx","pattern":"^[a-z][a-z0-9_]{0,62}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioJobDetail"}}},"description":"The job, its runs and its result table"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"The request was refused, and `error` says why: SQL that is not a single read-only SELECT, an unknown table (`details.table`, `details.availableTables`), an unknown column (`details.column`, `details.suggestions`), a function that is not available (`details.function`), or a job that could not run as written (`invalid_job`)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`no_organization` — Studio works inside an organization: select one and retry. `studio_not_enabled` — Studio is in a limited preview and is not enabled for this account. `entitlement_missing` — saving, switching to or running a `heavy` job needs heavy runs enabled for your organization (`details.entitlementKey`): ask your ModelMatch admin, or use `size: light`."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_not_found` — your organization has no job of that name. `query_not_found` — your organization has no background question of that id."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_exists` — the name is taken; `job_limit_reached` — your organization is at its limit of saved jobs (`details.limit`); `job_running` — another job is running for your organization, retry when it has finished."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"The SQL is valid but asks for more than one answer may cost: `timeout` (it ran for its whole time, in the background included, and was stopped — narrow it by state or date; or it could not carry on in the background because another question of your organization already is), `result_too_large`, `resource_limit`. For a job run, `job_failed`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`rate_limited` — too many requests from your organization in the last minute; or `busy` — every slot is taken right now. Wait `details.retryAfterSeconds` (also sent as `Retry-After`)."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`studio_unavailable` — Studio is not available right now. `entitlement_unavailable` — whether your organization can run heavy jobs could not be confirmed; nothing was saved or started. Try again in a minute."}},"summary":"One job: its runs, what changed, and where its result is","tags":["Studio"]},"patch":{"description":"Change how a saved job tells you about its alerts: `notify.email` false stops the email to the job's creator when an alert matches on a scheduled run; true turns it back on. Matched alerts are still recorded on each run. `size` switches it between `light` and `heavy` (`heavy` needs heavy runs enabled). Free.","operationId":"updateStudioJob","parameters":[{"description":"The job's name: lower-case letters, digits and underscores, starting with a letter. It is also the name of the table that holds the job's result.","in":"path","name":"name","required":true,"schema":{"description":"The job's name: lower-case letters, digits and underscores, starting with a letter. It is also the name of the table that holds the job's result.","example":"top_lenders_tx","pattern":"^[a-z][a-z0-9_]{0,62}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioJobUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioJobSaved"}}},"description":"The job as saved"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"The request was refused, and `error` says why: SQL that is not a single read-only SELECT, an unknown table (`details.table`, `details.availableTables`), an unknown column (`details.column`, `details.suggestions`), a function that is not available (`details.function`), or a job that could not run as written (`invalid_job`)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`no_organization` — Studio works inside an organization: select one and retry. `studio_not_enabled` — Studio is in a limited preview and is not enabled for this account. `entitlement_missing` — saving, switching to or running a `heavy` job needs heavy runs enabled for your organization (`details.entitlementKey`): ask your ModelMatch admin, or use `size: light`."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_not_found` — your organization has no job of that name. `query_not_found` — your organization has no background question of that id."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_exists` — the name is taken; `job_limit_reached` — your organization is at its limit of saved jobs (`details.limit`); `job_running` — another job is running for your organization, retry when it has finished."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"The SQL is valid but asks for more than one answer may cost: `timeout` (it ran for its whole time, in the background included, and was stopped — narrow it by state or date; or it could not carry on in the background because another question of your organization already is), `result_too_large`, `resource_limit`. For a job run, `job_failed`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`rate_limited` — too many requests from your organization in the last minute; or `busy` — every slot is taken right now. Wait `details.retryAfterSeconds` (also sent as `Retry-After`)."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`studio_unavailable` — Studio is not available right now. `entitlement_unavailable` — whether your organization can run heavy jobs could not be confirmed; nothing was saved or started. Try again in a minute."}},"summary":"Change a job's settings","tags":["Studio"]}},"/v1/studio/jobs/{name}/run":{"post":{"description":"Run a saved job now. Answers `200` with the finished run (its row count, what changed and any alerts) when it ends within a few seconds; otherwise `202` with `status: running`, and the run carries on — read the job to see how it ended. A run that fails answers `422` with `code: job_failed` and the reason. One job runs at a time per organization. 10 credits for a run that succeeds (100 for a `heavy` job, which needs heavy runs enabled: `403 entitlement_missing` otherwise); a failed run is free. A run that has succeeded by the time this returns is charged now (`credits.charged`, with `credits.remaining`). One still running is charged when it finishes successfully: `credits.charged` is 0 and `credits.pending` says what it will cost.","operationId":"runStudioJob","parameters":[{"description":"The job's name: lower-case letters, digits and underscores, starting with a letter. It is also the name of the table that holds the job's result.","in":"path","name":"name","required":true,"schema":{"description":"The job's name: lower-case letters, digits and underscores, starting with a letter. It is also the name of the table that holds the job's result.","example":"top_lenders_tx","pattern":"^[a-z][a-z0-9_]{0,62}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioJobRunResult"}}},"description":"The run finished"},"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioJobRunResult"}}},"description":"The run is still going; read the job for its outcome"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"The request was refused, and `error` says why: SQL that is not a single read-only SELECT, an unknown table (`details.table`, `details.availableTables`), an unknown column (`details.column`, `details.suggestions`), a function that is not available (`details.function`), or a job that could not run as written (`invalid_job`)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`no_organization` — Studio works inside an organization: select one and retry. `studio_not_enabled` — Studio is in a limited preview and is not enabled for this account. `entitlement_missing` — saving, switching to or running a `heavy` job needs heavy runs enabled for your organization (`details.entitlementKey`): ask your ModelMatch admin, or use `size: light`."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_not_found` — your organization has no job of that name. `query_not_found` — your organization has no background question of that id."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_exists` — the name is taken; `job_limit_reached` — your organization is at its limit of saved jobs (`details.limit`); `job_running` — another job is running for your organization, retry when it has finished."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioJobFailed"}}},"description":"`job_failed` — the run failed; `run.error` says why."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`rate_limited` — too many requests from your organization in the last minute; or `busy` — every slot is taken right now. Wait `details.retryAfterSeconds` (also sent as `Retry-After`)."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`studio_unavailable` — Studio is not available right now. `entitlement_unavailable` — whether your organization can run heavy jobs could not be confirmed; nothing was saved or started. Try again in a minute."}},"summary":"Run a job now","tags":["Studio"]}},"/v1/studio/models":{"get":{"description":"Every model your organization has: its status, what it predicts, the data points it uses (`featureLabels` in plain words), its report card and where its scores are; for one that is training, the step it is on and how long is left (`progress`, `expectedMinutes`: estimates). Only your organization's models are listed. Listing is free; a model that has just finished is charged for here if this is the first call to see it (`credits`), exactly as getStudioModel would.","operationId":"listStudioModels","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelList"}}},"description":"The models"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelError"}}},"description":"The request cannot be used: it is malformed, names an outcome or data point we do not have, asks for a data point that could show the model the answer, or uses a protected characteristic (`protected_characteristic`, `details.fields`; also on refreshing a model that has one). `error` says which and what to use instead."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelError"}}},"description":"`unauthenticated` — sign in, or send a valid credential."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelError"}}},"description":"`no_organization` — models belong to an organization; select one and try again. `entitlement_missing` — the model uses a data point that tracks closely with a person's age (a loan officer's tenure or career length), which your organization does not have enabled: `details.fields` names them; ask your ModelMatch admin, or leave them out."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelError"}}},"description":"`model_not_found` — your organization has no model of that name. `published_model_not_found` — `basedOnPublished` names no model ModelMatch publishes."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelError"}}},"description":"`model_exists` — the name is taken (pass `replace: true` for a new version); `model_limit_reached` — your organization is at its limit of models; `model_training_in_progress` — this model is already running (a model runs once at a time), or your organization already has as many models running as it may (`details.running` of `details.limit`, 3 by default): try again when one has finished; `model_not_ready` — the model has no trained version to refresh."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelError"}}},"description":"Your own data cannot support this model as asked: no date column, too few rows or too few of one outcome, every row the same outcome, dates in the future, too few rows matched to homes, or a data point that is the outcome or was recorded after it. `error` states the numbers and what would help."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelError"}}},"description":"`rate_limited` — too many model requests from your organization in the last minute; or `busy` — every training slot across all organizations is taken; try again later. Wait `details.retryAfterSeconds` (also sent as `Retry-After`)."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelError"}}},"description":"`entitlement_unavailable` — we could not confirm whether your organization may use the age-related data points the model asks for; nothing was started, try again in a minute. `models_unavailable` — training is switched off right now (reading models and querying published scores still work); `studio_unavailable` — try again in a minute. `billing_unavailable` — the model is finished but could not be charged for right now, so it is not published yet; read it again in a minute (it is never charged twice)."}},"summary":"Your organization's models","tags":["Studio"]},"post":{"description":"Define a model — what to predict, for whom, in which state, and the data points to use — and start training it. It answers at once with `status: training` and `expectedMinutes`, a range that depends on the size of the state: a couple of minutes for a small state, 15 to 25 for the largest (an estimate; say the range, and say it is an estimate). Read the model with getStudioModel until it is `ready` or `refused`: `progress` gives the numbered step it is on and how long is left. `features` is the heart of it: the data points the person believes matter. Their own knowledge can be data points too — columns of their uploaded outcomes table such as a lead source or a rating their team gives. To learn from their own results instead of a market outcome, pass `outcomeSource` (an uploaded table with a home, a date and what happened on every row); that usually helps most. Everything a model learns from is taken strictly before each case's date, and a data point that could show it the answer is refused with the reason. To try a different list of data points, send the same `name` with `replace: true`, or a new name with `basedOn`: the new report card says what changed. An uploaded file's table is named `upload_<name>` (the upload `my_deals` is the table `upload_my_deals`); a wrong name is refused with the names that exist. A model may never use a protected characteristic — race, color, ethnicity, national origin, religion, sex or gender, familial status, disability, age, marital status or receipt of public assistance — as a data point, an own column, a direction rule or a boost: a column named for one is refused with `400 protected_characteristic`, naming them in `details.fields`; nothing unlocks it. Neighborhood data points (`needsFairLendingReview`), ZIP code and city boosts and directions on a place are allowed for everyone; the report card adds a fair-lending caveat. `basedOnPublished` starts from a model ModelMatch publishes (its `mm_model_*` table): its outcome, data points and weighting are copied into your organization as your own model — anything this request gives overrides them — and trained on your scope; its report card compares with the published original. Weighting is optional: `recencyWeighting` counts recent past cases more while learning (testing stays unweighted), a `direction` on a number data point holds the model to it, and `boosts` add `priorityScore` and `priorityRank` to the scores table after the model; the report card is about `score`, never the boosted order. A request that cannot work is refused now with a clear reason (`error`, `code`, and the numbers in `details`). An organization can have a few models running at once (3 by default; past that, `409 model_training_in_progress` says how many are running and the limit), and a model runs once at a time; up to 10 models. 50 credits for a model that passes its checks, charged once when it has finished: by the first call that reads it or, if nobody does, on its own within about two hours. A model that is refused or fails is free.","operationId":"createStudioModel","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelCreated"}}},"description":"Training has started"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelError"}}},"description":"The request cannot be used: it is malformed, names an outcome or data point we do not have, asks for a data point that could show the model the answer, or uses a protected characteristic (`protected_characteristic`, `details.fields`; also on refreshing a model that has one). `error` says which and what to use instead."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelError"}}},"description":"`unauthenticated` — sign in, or send a valid credential."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelError"}}},"description":"`no_organization` — models belong to an organization; select one and try again. `entitlement_missing` — the model uses a data point that tracks closely with a person's age (a loan officer's tenure or career length), which your organization does not have enabled: `details.fields` names them; ask your ModelMatch admin, or leave them out."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelError"}}},"description":"`model_not_found` — your organization has no model of that name. `published_model_not_found` — `basedOnPublished` names no model ModelMatch publishes."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelError"}}},"description":"`model_exists` — the name is taken (pass `replace: true` for a new version); `model_limit_reached` — your organization is at its limit of models; `model_training_in_progress` — this model is already running (a model runs once at a time), or your organization already has as many models running as it may (`details.running` of `details.limit`, 3 by default): try again when one has finished; `model_not_ready` — the model has no trained version to refresh."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelError"}}},"description":"Your own data cannot support this model as asked: no date column, too few rows or too few of one outcome, every row the same outcome, dates in the future, too few rows matched to homes, or a data point that is the outcome or was recorded after it. `error` states the numbers and what would help."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelError"}}},"description":"`rate_limited` — too many model requests from your organization in the last minute; or `busy` — every training slot across all organizations is taken; try again later. Wait `details.retryAfterSeconds` (also sent as `Retry-After`)."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelError"}}},"description":"`entitlement_unavailable` — we could not confirm whether your organization may use the age-related data points the model asks for; nothing was started, try again in a minute. `models_unavailable` — training is switched off right now (reading models and querying published scores still work); `studio_unavailable` — try again in a minute. `billing_unavailable` — the model is finished but could not be charged for right now, so it is not published yet; read it again in a minute (it is never charged twice)."}},"summary":"Create a prediction model and start training it","tags":["Studio"]}},"/v1/studio/models/options":{"get":{"description":"Everything needed to define a model: the outcomes that can be predicted, who can be scored (`populations`), the data points a model may use, grouped by theme, each with a line on why someone might believe it matters, the limits, what a table of your own outcomes must contain, and how long a model takes for each state (`trainingTime`: a range of minutes, an estimate). Call this first, show the themes, and ASK which data points the person believes matter: a model is trained on exactly their picks, and its report card tests that belief. Free.","operationId":"getStudioModelOptions","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelOptionsResult"}}},"description":"The choices"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelError"}}},"description":"The request cannot be used: it is malformed, names an outcome or data point we do not have, asks for a data point that could show the model the answer, or uses a protected characteristic (`protected_characteristic`, `details.fields`; also on refreshing a model that has one). `error` says which and what to use instead."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelError"}}},"description":"`unauthenticated` — sign in, or send a valid credential."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelError"}}},"description":"`no_organization` — models belong to an organization; select one and try again. `entitlement_missing` — the model uses a data point that tracks closely with a person's age (a loan officer's tenure or career length), which your organization does not have enabled: `details.fields` names them; ask your ModelMatch admin, or leave them out."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelError"}}},"description":"`model_not_found` — your organization has no model of that name. `published_model_not_found` — `basedOnPublished` names no model ModelMatch publishes."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelError"}}},"description":"`model_exists` — the name is taken (pass `replace: true` for a new version); `model_limit_reached` — your organization is at its limit of models; `model_training_in_progress` — this model is already running (a model runs once at a time), or your organization already has as many models running as it may (`details.running` of `details.limit`, 3 by default): try again when one has finished; `model_not_ready` — the model has no trained version to refresh."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelError"}}},"description":"Your own data cannot support this model as asked: no date column, too few rows or too few of one outcome, every row the same outcome, dates in the future, too few rows matched to homes, or a data point that is the outcome or was recorded after it. `error` states the numbers and what would help."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelError"}}},"description":"`rate_limited` — too many model requests from your organization in the last minute; or `busy` — every training slot across all organizations is taken; try again later. Wait `details.retryAfterSeconds` (also sent as `Retry-After`)."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelError"}}},"description":"`entitlement_unavailable` — we could not confirm whether your organization may use the age-related data points the model asks for; nothing was started, try again in a minute. `models_unavailable` — training is switched off right now (reading models and querying published scores still work); `studio_unavailable` — try again in a minute. `billing_unavailable` — the model is finished but could not be charged for right now, so it is not published yet; read it again in a minute (it is never charged twice)."}},"summary":"What a prediction model can be built from","tags":["Studio"]}},"/v1/studio/models/published/{table}":{"get":{"description":"The report card of a prediction model ModelMatch trains and publishes for every organization, or shares with yours; its scores are the published table `table`. If `hasCaution` is true, say `caution` FIRST: the model fell behind the best simple rule in part of the test period while staying better than random. Then: what it predicts (`predicts`), the `headline` as written, what it learned from and was tested on (`learnedFrom.sentence`), the lift sentences (`metrics.top10`, `metrics.top1`), the three `metrics.checks`, the data points that mattered (`dataPoints.used`, strongest first, with how much the model leaned on each — not how much it causes the outcome) and the ones it barely used (`dataPoints.rejected`), and the `caveats`. Never promise accuracy, and never call a score a probability unless `metrics.calibrated` is true. Free.","operationId":"getStudioPublishedModel","parameters":[{"description":"Its `mm_model_*` table.","in":"path","name":"table","required":true,"schema":{"description":"Its `mm_model_*` table.","example":"mm_model_refi_watch","pattern":"^mm_[a-z][a-z0-9_]{1,58}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioPublishedModelResult"}}},"description":"The report card"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`invalid_request` — not a published table's name."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`unauthenticated` — sign in, or send a valid credential."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`no_organization` — select an organization; `studio_not_enabled` — Studio is not enabled for this account."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`published_model_not_found` — no model of that name is published. The catalog lists what is."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`published_unavailable` — published tables are switched off right now."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`studio_unavailable` — try again in a minute."}},"summary":"A model ModelMatch publishes: its report card","tags":["Studio"]}},"/v1/studio/models/{name}":{"delete":{"description":"Delete a model: the trained model, its report card and its scores table. The table leaves the catalog at once, and questions and jobs that read it stop working. A run in progress is stopped. This cannot be undone. Free.","operationId":"deleteStudioModel","parameters":[{"description":"The model's name: 3 to 40 lower-case letters, digits and underscores, starting with a letter. Its scores are the table `model_<name>`.","in":"path","name":"name","required":true,"schema":{"description":"The model's name: 3 to 40 lower-case letters, digits and underscores, starting with a letter. Its scores are the table `model_<name>`.","example":"refi_watch","pattern":"^[a-z][a-z0-9_]{2,39}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelDeleted"}}},"description":"Deleted"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelError"}}},"description":"The request cannot be used: it is malformed, names an outcome or data point we do not have, asks for a data point that could show the model the answer, or uses a protected characteristic (`protected_characteristic`, `details.fields`; also on refreshing a model that has one). `error` says which and what to use instead."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelError"}}},"description":"`unauthenticated` — sign in, or send a valid credential."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelError"}}},"description":"`no_organization` — models belong to an organization; select one and try again. `entitlement_missing` — the model uses a data point that tracks closely with a person's age (a loan officer's tenure or career length), which your organization does not have enabled: `details.fields` names them; ask your ModelMatch admin, or leave them out."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelError"}}},"description":"`model_not_found` — your organization has no model of that name. `published_model_not_found` — `basedOnPublished` names no model ModelMatch publishes."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelError"}}},"description":"`model_exists` — the name is taken (pass `replace: true` for a new version); `model_limit_reached` — your organization is at its limit of models; `model_training_in_progress` — this model is already running (a model runs once at a time), or your organization already has as many models running as it may (`details.running` of `details.limit`, 3 by default): try again when one has finished; `model_not_ready` — the model has no trained version to refresh."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelError"}}},"description":"Your own data cannot support this model as asked: no date column, too few rows or too few of one outcome, every row the same outcome, dates in the future, too few rows matched to homes, or a data point that is the outcome or was recorded after it. `error` states the numbers and what would help."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelError"}}},"description":"`rate_limited` — too many model requests from your organization in the last minute; or `busy` — every training slot across all organizations is taken; try again later. Wait `details.retryAfterSeconds` (also sent as `Retry-After`)."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelError"}}},"description":"`entitlement_unavailable` — we could not confirm whether your organization may use the age-related data points the model asks for; nothing was started, try again in a minute. `models_unavailable` — training is switched off right now (reading models and querying published scores still work); `studio_unavailable` — try again in a minute. `billing_unavailable` — the model is finished but could not be charged for right now, so it is not published yet; read it again in a minute (it is never charged twice)."}},"summary":"Delete a model, its report card and its scores, permanently","tags":["Studio"]},"get":{"description":"The model and, once training has finished, its report card (`card`). While it trains, `progress` says which numbered step it is on, how long it has been and how long is left (an estimate, as a range). Read the card as it is written, using its sentences and labels: fields named `id`, `code`, `verdict`, `better`, and everything under `technical`, are for programs and are never shown to a person. It says how many past cases the model learned from and was tested on; the lift (`in the top 10% of the list, X of every 100 had the outcome, against Y at random and Z for the best simple rule`); three checks, each passed or not; how much each chosen data point mattered; how the person's picks compare with using every data point; and the caveats. Never promise accuracy, and never call a score a probability unless `card.calibration.calibrated` is true (then each home's estimated chance is an estimate from past cases). `status: refused` means the model is not dependable enough to publish: `card.refusal.reason` says why and `card.refusal.whatWouldHelp` what to try; a refused model has no scores. When `scores` is not null, query `scores.table` with runStudioQuery: one row per home with `rank`, `percentile`, `score`, `topReason`, the home's `city` and `zipCode` (select those and leave `streetAddress` out to show the list without street addresses), and `propertyId` to join to `loans` and `sales`. Reading is free. 50 credits for a model that passes its checks, charged once when it has finished: by the first call that reads it or, if nobody does, on its own within about two hours. A model that is refused or fails is free. 10 credits for refreshed scores, charged once, the same way (a scheduled refresh too). The charge is reported in `credits`.","operationId":"getStudioModel","parameters":[{"description":"The model's name: 3 to 40 lower-case letters, digits and underscores, starting with a letter. Its scores are the table `model_<name>`.","in":"path","name":"name","required":true,"schema":{"description":"The model's name: 3 to 40 lower-case letters, digits and underscores, starting with a letter. Its scores are the table `model_<name>`.","example":"refi_watch","pattern":"^[a-z][a-z0-9_]{2,39}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelResult"}}},"description":"The model"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelError"}}},"description":"The request cannot be used: it is malformed, names an outcome or data point we do not have, asks for a data point that could show the model the answer, or uses a protected characteristic (`protected_characteristic`, `details.fields`; also on refreshing a model that has one). `error` says which and what to use instead."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelError"}}},"description":"`unauthenticated` — sign in, or send a valid credential."},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelPaymentRequired"}}},"description":"The model finished and is waiting to be published, but your organization does not have the credits for it. Nothing was charged. Add credits and read the model again: it does not need to be trained again."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelError"}}},"description":"`no_organization` — models belong to an organization; select one and try again. `entitlement_missing` — the model uses a data point that tracks closely with a person's age (a loan officer's tenure or career length), which your organization does not have enabled: `details.fields` names them; ask your ModelMatch admin, or leave them out."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelError"}}},"description":"`model_not_found` — your organization has no model of that name. `published_model_not_found` — `basedOnPublished` names no model ModelMatch publishes."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelError"}}},"description":"`model_exists` — the name is taken (pass `replace: true` for a new version); `model_limit_reached` — your organization is at its limit of models; `model_training_in_progress` — this model is already running (a model runs once at a time), or your organization already has as many models running as it may (`details.running` of `details.limit`, 3 by default): try again when one has finished; `model_not_ready` — the model has no trained version to refresh."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelError"}}},"description":"Your own data cannot support this model as asked: no date column, too few rows or too few of one outcome, every row the same outcome, dates in the future, too few rows matched to homes, or a data point that is the outcome or was recorded after it. `error` states the numbers and what would help."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelError"}}},"description":"`rate_limited` — too many model requests from your organization in the last minute; or `busy` — every training slot across all organizations is taken; try again later. Wait `details.retryAfterSeconds` (also sent as `Retry-After`)."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelError"}}},"description":"`entitlement_unavailable` — we could not confirm whether your organization may use the age-related data points the model asks for; nothing was started, try again in a minute. `models_unavailable` — training is switched off right now (reading models and querying published scores still work); `studio_unavailable` — try again in a minute. `billing_unavailable` — the model is finished but could not be charged for right now, so it is not published yet; read it again in a minute (it is never charged twice)."}},"summary":"A model: its status and its report card","tags":["Studio"]}},"/v1/studio/models/{name}/refresh":{"post":{"description":"Score the model's population again as of today, with the trained model as it is. The current scores stay queryable until the new ones are ready; read the model with getStudioModel to see when (`refresh` goes back to null and `scores.asOf` moves); `expectedMinutes` says how long it is expected to take, and `progress` which step it is on. Pass `retrain: true` to also train it again on the latest data (the same data points, a fresh report card; if it no longer passes its checks it becomes `refused` and its scores are taken down). A model that uses a protected characteristic is never refreshed or retrained (`400 protected_characteristic`): create a new version without it. While it retrains the model stays `ready` with its current `card` and scores, and `progress` shows the training exactly as for a new model — the numbered step, the time left and the live `progress.trace`; the new card (with its final `trace`) replaces the current one when the run is published. A model with a `weekly` or `monthly` schedule is refreshed on its own. 10 credits for refreshed scores, charged once, the same way (a scheduled refresh too). 50 credits for a model that passes its checks, charged once when it has finished: by the first call that reads it or, if nobody does, on its own within about two hours. A model that is refused or fails is free.","operationId":"refreshStudioModel","parameters":[{"description":"The model's name: 3 to 40 lower-case letters, digits and underscores, starting with a letter. Its scores are the table `model_<name>`.","in":"path","name":"name","required":true,"schema":{"description":"The model's name: 3 to 40 lower-case letters, digits and underscores, starting with a letter. Its scores are the table `model_<name>`.","example":"refi_watch","pattern":"^[a-z][a-z0-9_]{2,39}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelRefresh"}}},"required":false},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelResult"}}},"description":"The refresh has started"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelError"}}},"description":"The request cannot be used: it is malformed, names an outcome or data point we do not have, asks for a data point that could show the model the answer, or uses a protected characteristic (`protected_characteristic`, `details.fields`; also on refreshing a model that has one). `error` says which and what to use instead."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelError"}}},"description":"`unauthenticated` — sign in, or send a valid credential."},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelPaymentRequired"}}},"description":"The model finished and is waiting to be published, but your organization does not have the credits for it. Nothing was charged. Add credits and read the model again: it does not need to be trained again."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelError"}}},"description":"`no_organization` — models belong to an organization; select one and try again. `entitlement_missing` — the model uses a data point that tracks closely with a person's age (a loan officer's tenure or career length), which your organization does not have enabled: `details.fields` names them; ask your ModelMatch admin, or leave them out."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelError"}}},"description":"`model_not_found` — your organization has no model of that name. `published_model_not_found` — `basedOnPublished` names no model ModelMatch publishes."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelError"}}},"description":"`model_exists` — the name is taken (pass `replace: true` for a new version); `model_limit_reached` — your organization is at its limit of models; `model_training_in_progress` — this model is already running (a model runs once at a time), or your organization already has as many models running as it may (`details.running` of `details.limit`, 3 by default): try again when one has finished; `model_not_ready` — the model has no trained version to refresh."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelError"}}},"description":"Your own data cannot support this model as asked: no date column, too few rows or too few of one outcome, every row the same outcome, dates in the future, too few rows matched to homes, or a data point that is the outcome or was recorded after it. `error` states the numbers and what would help."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelError"}}},"description":"`rate_limited` — too many model requests from your organization in the last minute; or `busy` — every training slot across all organizations is taken; try again later. Wait `details.retryAfterSeconds` (also sent as `Retry-After`)."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModelError"}}},"description":"`entitlement_unavailable` — we could not confirm whether your organization may use the age-related data points the model asks for; nothing was started, try again in a minute. `models_unavailable` — training is switched off right now (reading models and querying published scores still work); `studio_unavailable` — try again in a minute. `billing_unavailable` — the model is finished but could not be charged for right now, so it is not published yet; read it again in a minute (it is never charged twice)."}},"summary":"Refresh a model's scores with the latest data","tags":["Studio"]}},"/v1/studio/program-runs":{"get":{"description":"Your organization's program runs, newest first, with their state and the tables each left. A run that has succeeded since it was last read is charged and delivered here, like a read of it. Each program has a flat price (`price.credits` on listStudioPrograms), charged once when a run has SUCCEEDED — by the first call that reads it — and only then are its tables delivered. A run that fails or times out is free.","operationId":"listStudioProgramRuns","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioProgramRunList"}}},"description":"The runs"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioProgramError"}}},"description":"`invalid_request` — a switch the program does not list (only its own switches can be set), or a bad value: `error` names the switches you can set. `invalid_name` — the name cannot name every table of the program (reserved prefix, characters, length)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioProgramError"}}},"description":"`unauthenticated` — sign in, or send a valid credential."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioProgramError"}}},"description":"`no_organization` — select an organization. `entitlement_missing` — your organization cannot run ModelMatch programs yet (`details.entitlementKey`): ask your ModelMatch admin."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioProgramError"}}},"description":"`program_not_found` — no program of that name that you can run. `run_not_found` — your organization has no run of that id."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioProgramError"}}},"description":"`table_exists` — the name is taken by one of your tables or jobs that this program did not make. `program_running` — your organization already has a run in progress (one at a time): try again when it has finished."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioProgramError"}}},"description":"The service could not do what was asked as given; `error` says why."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioProgramError"}}},"description":"`rate_limited` — too many requests from your organization; `busy` — every slot for program runs is taken. Wait `details.retryAfterSeconds`."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioProgramError"}}},"description":"`studio_unavailable` — try again in a minute. `billing_unavailable` — the run succeeded but could not be charged for right now, so its tables are not delivered yet; read it again in a minute (it is never charged twice)."}},"summary":"Your organization's program runs","tags":["Studio"]}},"/v1/studio/program-runs/{runId}":{"get":{"description":"Read a run until it is `succeeded` or `failed`. The first read after it succeeded charges it (once) and delivers its tables into your organization (`delivered: true`, `credits.charged`); then query them by the names in `tables`. Reading it again is free. Each program has a flat price (`price.credits` on listStudioPrograms), charged once when a run has SUCCEEDED — by the first call that reads it — and only then are its tables delivered. A run that fails or times out is free.","operationId":"getStudioProgramRun","parameters":[{"description":"The run, as startStudioProgramRun returned it.","in":"path","name":"runId","required":true,"schema":{"description":"The run, as startStudioProgramRun returned it.","example":"20261120T080000Z-a1b2","pattern":"^[0-9A-Za-z-]{1,64}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioProgramRunResult"}}},"description":"The run"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioProgramError"}}},"description":"`invalid_request` — a switch the program does not list (only its own switches can be set), or a bad value: `error` names the switches you can set. `invalid_name` — the name cannot name every table of the program (reserved prefix, characters, length)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioProgramError"}}},"description":"`unauthenticated` — sign in, or send a valid credential."},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioProgramPaymentRequired"}}},"description":"Starting: your balance does not cover the run's price, so nothing was started. Reading a finished run: your balance does not cover it, so its tables wait; add credits and read it again (it does not run again)."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioProgramError"}}},"description":"`no_organization` — select an organization. `entitlement_missing` — your organization cannot run ModelMatch programs yet (`details.entitlementKey`): ask your ModelMatch admin."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioProgramError"}}},"description":"`program_not_found` — no program of that name that you can run. `run_not_found` — your organization has no run of that id."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioProgramError"}}},"description":"`table_exists` — the name is taken by one of your tables or jobs that this program did not make. `program_running` — your organization already has a run in progress (one at a time): try again when it has finished."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioProgramError"}}},"description":"The service could not do what was asked as given; `error` says why."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioProgramError"}}},"description":"`rate_limited` — too many requests from your organization; `busy` — every slot for program runs is taken. Wait `details.retryAfterSeconds`."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioProgramError"}}},"description":"`studio_unavailable` — try again in a minute. `billing_unavailable` — the run succeeded but could not be charged for right now, so its tables are not delivered yet; read it again in a minute (it is never charged twice)."}},"summary":"One program run: its state, progress and tables","tags":["Studio"]}},"/v1/studio/programs":{"get":{"description":"Programs are the heavy computations behind some of the tables ModelMatch publishes for everyone (`mm_` tables, such as company retention). Most questions are answered by querying the published table — do that first, it is already computed and costs a normal question. Run a program when the person needs it computed with their own settings, such as only the states they work in: the result becomes their own tables. Each program lists the switches you can set, the tables a run leaves, and its price. `available: false` means the organization cannot run programs yet (ask their ModelMatch admin). Free.","operationId":"listStudioPrograms","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioProgramList"}}},"description":"The programs"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioProgramError"}}},"description":"`invalid_request` — a switch the program does not list (only its own switches can be set), or a bad value: `error` names the switches you can set. `invalid_name` — the name cannot name every table of the program (reserved prefix, characters, length)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioProgramError"}}},"description":"`unauthenticated` — sign in, or send a valid credential."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioProgramError"}}},"description":"`no_organization` — select an organization. `entitlement_missing` — your organization cannot run ModelMatch programs yet (`details.entitlementKey`): ask your ModelMatch admin."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioProgramError"}}},"description":"`program_not_found` — no program of that name that you can run. `run_not_found` — your organization has no run of that id."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioProgramError"}}},"description":"`table_exists` — the name is taken by one of your tables or jobs that this program did not make. `program_running` — your organization already has a run in progress (one at a time): try again when it has finished."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioProgramError"}}},"description":"The service could not do what was asked as given; `error` says why."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioProgramError"}}},"description":"`rate_limited` — too many requests from your organization; `busy` — every slot for program runs is taken. Wait `details.retryAfterSeconds`."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioProgramError"}}},"description":"`studio_unavailable` — try again in a minute. `billing_unavailable` — the run succeeded but could not be charged for right now, so its tables are not delivered yet; read it again in a minute (it is never charged twice)."}},"summary":"ModelMatch programs you can run for your own organization","tags":["Studio"]}},"/v1/studio/programs/{program}/run":{"post":{"description":"Start a run with your own values for the program's switches and a `name` for the result. It answers at once with `state: running`; read it with getStudioProgramRun until it is `succeeded` (then it is charged once and its tables are delivered: `delivered: true`) or `failed` (free). A run of the whole country can take one to two hours; one state, minutes — narrowing it (for example `states`) makes it much faster. `progress` says which step it is on. Only the switches the program lists can be set; anything else is refused with 400. The tables land in your organization only, never in the published tables; query them like any table, join them, or build jobs on them. One run at a time per organization (`409 program_running`). Your balance must cover the price to start (402 otherwise). Each program has a flat price (`price.credits` on listStudioPrograms), charged once when a run has SUCCEEDED — by the first call that reads it — and only then are its tables delivered. A run that fails or times out is free.","operationId":"startStudioProgramRun","parameters":[{"description":"The program, as listStudioPrograms lists it.","in":"path","name":"program","required":true,"schema":{"description":"The program, as listStudioPrograms lists it.","example":"company_retention","pattern":"^[a-z][a-z0-9_]{0,62}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioProgramRunRequest"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioProgramRunResult"}}},"description":"The run has started"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioProgramError"}}},"description":"`invalid_request` — a switch the program does not list (only its own switches can be set), or a bad value: `error` names the switches you can set. `invalid_name` — the name cannot name every table of the program (reserved prefix, characters, length)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioProgramError"}}},"description":"`unauthenticated` — sign in, or send a valid credential."},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioProgramPaymentRequired"}}},"description":"Starting: your balance does not cover the run's price, so nothing was started. Reading a finished run: your balance does not cover it, so its tables wait; add credits and read it again (it does not run again)."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioProgramError"}}},"description":"`no_organization` — select an organization. `entitlement_missing` — your organization cannot run ModelMatch programs yet (`details.entitlementKey`): ask your ModelMatch admin."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioProgramError"}}},"description":"`program_not_found` — no program of that name that you can run. `run_not_found` — your organization has no run of that id."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioProgramError"}}},"description":"`table_exists` — the name is taken by one of your tables or jobs that this program did not make. `program_running` — your organization already has a run in progress (one at a time): try again when it has finished."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioProgramError"}}},"description":"The service could not do what was asked as given; `error` says why."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioProgramError"}}},"description":"`rate_limited` — too many requests from your organization; `busy` — every slot for program runs is taken. Wait `details.retryAfterSeconds`."},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioProgramError"}}},"description":"`entitlement_unavailable` — whether your organization can run programs could not be confirmed right now; nothing was started."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioProgramError"}}},"description":"`studio_unavailable` — try again in a minute. `billing_unavailable` — the run succeeded but could not be charged for right now, so its tables are not delivered yet; read it again in a minute (it is never charged twice)."}},"summary":"Run a ModelMatch program for your own organization","tags":["Studio"]}},"/v1/studio/queries/{queryId}":{"get":{"description":"What became of a question `runStudioQuery` answered `202` for. `running`: wait `pollAfterSeconds` and fetch again — after a few tries, tell the user it is still running and can be checked later. `succeeded`: the same answer a quick question gets (`columns`, `rows`, `rowCount`, `truncated`, `elapsedMs`), kept for an hour. `failed`: `error` and `code`, as the question itself would have been refused or stopped. `expired`: the answer is no longer kept. A question that succeeded in the background is charged once, 1 credit per row returned in `rows`, at least 5 per answered question, whether or not its result is fetched — and its rows are handed out only once it is paid for. The first fetch that returns its rows pays for it, unless it has already been paid for (`credits.charged`, `credits.remaining`); fetching it again after that is free. When your organization does not have the credits, the fetch answers `402` with no rows and nothing charged: add credits and fetch it again (within the hour the answer is kept) — it is charged once, never twice. Fetching while it is `running`, and a `failed` question, are free. Only the organization that asked can fetch a result.","operationId":"getStudioQueryResult","parameters":[{"description":"The `queryId` a `202` from `runStudioQuery` returned.","in":"path","name":"queryId","required":true,"schema":{"description":"The `queryId` a `202` from `runStudioQuery` returned.","example":"q_3f9a1c0b7d2e4a6f8b1c0d2e","pattern":"^q_[0-9a-f]{24}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioQueryResultState"}}},"description":"The question's state, and its answer once it has one"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"The request was refused, and `error` says why: SQL that is not a single read-only SELECT, an unknown table (`details.table`, `details.availableTables`), an unknown column (`details.column`, `details.suggestions`), a function that is not available (`details.function`), or a job that could not run as written (`invalid_job`)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"Authentication required."},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioPaymentRequired"}}},"description":"The question succeeded, but its answer has not been paid for and your organization does not have the credits for it (`cost`). No rows are returned and nothing was charged. Add credits and fetch it again: it does not need to be asked again."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`no_organization` — Studio works inside an organization: select one and retry. `studio_not_enabled` — Studio is in a limited preview and is not enabled for this account. `entitlement_missing` — saving, switching to or running a `heavy` job needs heavy runs enabled for your organization (`details.entitlementKey`): ask your ModelMatch admin, or use `size: light`."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_not_found` — your organization has no job of that name. `query_not_found` — your organization has no background question of that id."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_exists` — the name is taken; `job_limit_reached` — your organization is at its limit of saved jobs (`details.limit`); `job_running` — another job is running for your organization, retry when it has finished."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"The SQL is valid but asks for more than one answer may cost: `timeout` (it ran for its whole time, in the background included, and was stopped — narrow it by state or date; or it could not carry on in the background because another question of your organization already is), `result_too_large`, `resource_limit`. For a job run, `job_failed`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`rate_limited` — too many requests from your organization in the last minute; or `busy` — every slot is taken right now. Wait `details.retryAfterSeconds` (also sent as `Retry-After`)."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`studio_unavailable` — Studio is not available right now. `billing_unavailable` — the question succeeded, but the charge for its answer could not be made right now, so no rows were returned; fetch it again in a minute (it is never charged twice)."}},"summary":"The result of a question that ran in the background","tags":["Studio"]}},"/v1/studio/query":{"post":{"description":"Run one read-only SQL SELECT over the tables in the catalog and get the rows back. Use it for questions the list and analytics routes cannot answer in one call: a ranking across every company or agent in a market, a join between loans and sales, a custom roll-up. The data is stored by state: filter by `state` (and a date range) whenever the question allows, and aggregate in SQL instead of fetching rows. `rows` carries up to `limit` rows (default 200, at most 1000); `rowCount` is always the full count and `truncated` says when there are more. A quick question is answered here (`200`). One that is still running after about twelve seconds is NOT stopped: this call answers `202` with `status: \"running\"` and a `queryId`, the question carries on in the background for up to five minutes, and `getStudioQueryResult` returns its answer. A `202` is not a failure — do not ask the question again (that starts a second run) and do not rewrite it; wait `pollAfterSeconds` and fetch the result. One question per organization runs in the background at a time. Only tables in the catalog can be read; nothing can be written. 1 credit per row returned in `rows`, at least 5 per answered question (an aggregate that returns one row costs 5; 1,000 rows cost 1,000), charged once whether it was answered here or in the background; a refused or failed question is free. Set `limit` to the rows you need and aggregate in SQL. `credits` in the answer says what this question was charged and how many credits are left; on `202`, `credits.pending` is the least it will be charged if it succeeds — the result says the exact amount.","operationId":"runStudioQuery","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioQueryRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioQueryResult"}}},"description":"The answer"},"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioQueryRunning"}}},"description":"Still running in the background: fetch the result with `getStudioQueryResult`"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"The request was refused, and `error` says why: SQL that is not a single read-only SELECT, an unknown table (`details.table`, `details.availableTables`), an unknown column (`details.column`, `details.suggestions`), a function that is not available (`details.function`), or a job that could not run as written (`invalid_job`)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`no_organization` — Studio works inside an organization: select one and retry. `studio_not_enabled` — Studio is in a limited preview and is not enabled for this account. `entitlement_missing` — saving, switching to or running a `heavy` job needs heavy runs enabled for your organization (`details.entitlementKey`): ask your ModelMatch admin, or use `size: light`."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_not_found` — your organization has no job of that name. `query_not_found` — your organization has no background question of that id."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`job_exists` — the name is taken; `job_limit_reached` — your organization is at its limit of saved jobs (`details.limit`); `job_running` — another job is running for your organization, retry when it has finished."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"The SQL is valid but asks for more than one answer may cost: `timeout` (it ran for its whole time, in the background included, and was stopped — narrow it by state or date; or it could not carry on in the background because another question of your organization already is), `result_too_large`, `resource_limit`. For a job run, `job_failed`."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`rate_limited` — too many requests from your organization in the last minute; or `busy` — every slot is taken right now. Wait `details.retryAfterSeconds` (also sent as `Retry-After`)."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`studio_unavailable` — Studio is not available right now. `entitlement_unavailable` — whether your organization can run heavy jobs could not be confirmed; nothing was saved or started. Try again in a minute."}},"summary":"Answer one question with SQL","tags":["Studio"]}},"/v1/studio/tables":{"get":{"description":"Every table your organization made from a file: its name, the table it is queried as, its columns and row count, when it was made and by whom, its status, and the file it was loaded from (`sourceFileId`; `sourceFileDeleted` is `true` once that file has been deleted — the table keeps working). Only your organization's tables are listed. Free.","operationId":"listStudioTables","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioTableList"}}},"description":"The tables"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`invalid_request` — the request is malformed; `invalid_upload_name` — the name cannot be used; `unsupported_format` — the file is not a CSV, TSV, Excel (.xlsx) or Parquet file."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`no_organization` — select an organization and retry. `studio_not_enabled` — Studio is not enabled for this account. `protected_not_enabled` — a protected file cannot be loaded into a table."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`not_found` — no file of that id that you can open (or the files library is not enabled for your organization); `upload_not_found` — your organization has no table of that name."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`not_ready` — the file has not finished uploading; `upload_exists` — the name is taken (delete that table first, or pick another name); `upload_limit_reached` — your organization is at its limit of tables (`details.limit`); `upload_storage_full` — the file would take your organization past its total size."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"The file holds more than an upload may, or cannot be read: `file_too_large`, `too_many_rows`, `too_many_columns` (`details.limit`), `empty_file`, `unreadable_file`, `ingest_timeout`. `error` says what to change."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`rate_limited` — too many uploads from your organization in the last minute; or `busy` — a file is already being read. Wait `details.retryAfterSeconds` (also sent as `Retry-After`)."},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`membership_unavailable` — who may open the file could not be checked. Try again in a minute."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`studio_unavailable` — Studio is not available right now; `storage_unavailable` — the files library is not available right now. Try again in a minute."}},"summary":"Your organization's tables made from files","tags":["Studio"]},"post":{"description":"Turn a file of your own data that is already in your files library — leads, closed and lost loans, a client list — into a table only your organization can query and join to the market tables. Name the file (`fromFileId`: one you can open, whose status is `ready`) and the table (`name`; the table is `upload_<name>`). The file is read as it is: the table shows its source file (`sourceFileId`), and the file shows the table it feeds (it is linked to `studio_table:upload_<name>`). Deleting the file later does not delete the table; deleting the table does not delete the file. A small file answers `200` with `status: ready`, and the answer says what the table holds: `columns`, `rowCount`, `warnings` (anything that was changed, skipped or kept as text — read them to the user) and `joinHints`. A large one answers `202` with `status: ingesting`: read it with `GET /v1/studio/tables/{name}` in a few seconds. A file that cannot be used is refused with the reason. Files can be CSV, TSV, Excel (.xlsx) or Parquet, up to 100 MB, 2,000,000 rows and 200 columns; an organization can keep 25 tables and 1 GB in total. Free.","operationId":"createStudioTable","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioTableCreate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioTable"}}},"description":"The table"},"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioTable"}}},"description":"The file is still being read; read the table again"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`invalid_request` — the request is malformed; `invalid_upload_name` — the name cannot be used; `unsupported_format` — the file is not a CSV, TSV, Excel (.xlsx) or Parquet file."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`no_organization` — select an organization and retry. `studio_not_enabled` — Studio is not enabled for this account. `protected_not_enabled` — a protected file cannot be loaded into a table."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`not_found` — no file of that id that you can open (or the files library is not enabled for your organization); `upload_not_found` — your organization has no table of that name."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`not_ready` — the file has not finished uploading; `upload_exists` — the name is taken (delete that table first, or pick another name); `upload_limit_reached` — your organization is at its limit of tables (`details.limit`); `upload_storage_full` — the file would take your organization past its total size."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"The file holds more than an upload may, or cannot be read: `file_too_large`, `too_many_rows`, `too_many_columns` (`details.limit`), `empty_file`, `unreadable_file`, `ingest_timeout`. `error` says what to change."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`rate_limited` — too many uploads from your organization in the last minute; or `busy` — a file is already being read. Wait `details.retryAfterSeconds` (also sent as `Retry-After`)."},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`membership_unavailable` — who may open the file could not be checked. Try again in a minute."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`studio_unavailable` — Studio is not available right now; `storage_unavailable` — the files library is not available right now. Try again in a minute."}},"summary":"Load a file from your files library into a table","tags":["Studio"]}},"/v1/studio/tables/{name}":{"delete":{"description":"Delete a table (`name`, without the `upload_` prefix) and its rows. It leaves the catalog at once, and questions, jobs and models that read it stop working. Its source file stays in your files library, no longer linked to the table. This cannot be undone — to get the table back, load the file again. Free.","operationId":"deleteStudioTable","parameters":[{"description":"The upload's name: lower-case letters, digits and underscores, starting with a letter, at most 56 characters. The table is `upload_<name>`.","in":"path","name":"name","required":true,"schema":{"description":"The upload's name: lower-case letters, digits and underscores, starting with a letter, at most 56 characters. The table is `upload_<name>`.","example":"closed_loans","pattern":"^[a-z][a-z0-9_]{0,55}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioUploadDeleted"}}},"description":"Deleted"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`invalid_request` — the request is malformed; `invalid_upload_name` — the name cannot be used; `unsupported_format` — the file is not a CSV, TSV, Excel (.xlsx) or Parquet file."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`no_organization` — select an organization and retry. `studio_not_enabled` — Studio is not enabled for this account. `protected_not_enabled` — a protected file cannot be loaded into a table."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`not_found` — no file of that id that you can open (or the files library is not enabled for your organization); `upload_not_found` — your organization has no table of that name."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`not_ready` — the file has not finished uploading; `upload_exists` — the name is taken (delete that table first, or pick another name); `upload_limit_reached` — your organization is at its limit of tables (`details.limit`); `upload_storage_full` — the file would take your organization past its total size."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"The file holds more than an upload may, or cannot be read: `file_too_large`, `too_many_rows`, `too_many_columns` (`details.limit`), `empty_file`, `unreadable_file`, `ingest_timeout`. `error` says what to change."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`rate_limited` — too many uploads from your organization in the last minute; or `busy` — a file is already being read. Wait `details.retryAfterSeconds` (also sent as `Retry-After`)."},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`membership_unavailable` — who may open the file could not be checked. Try again in a minute."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`studio_unavailable` — Studio is not available right now; `storage_unavailable` — the files library is not available right now. Try again in a minute."}},"summary":"Delete a table, permanently","tags":["Studio"]},"get":{"description":"One table (`name`, without the `upload_` prefix): its status — read it again while it is `ingesting` — columns, row count, warnings, join hints, and its source file (`sourceFileId`, `sourceFileDeleted`). Free.","operationId":"getStudioTable","parameters":[{"description":"The upload's name: lower-case letters, digits and underscores, starting with a letter, at most 56 characters. The table is `upload_<name>`.","in":"path","name":"name","required":true,"schema":{"description":"The upload's name: lower-case letters, digits and underscores, starting with a letter, at most 56 characters. The table is `upload_<name>`.","example":"closed_loans","pattern":"^[a-z][a-z0-9_]{0,55}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioTable"}}},"description":"The table"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`invalid_request` — the request is malformed; `invalid_upload_name` — the name cannot be used; `unsupported_format` — the file is not a CSV, TSV, Excel (.xlsx) or Parquet file."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`no_organization` — select an organization and retry. `studio_not_enabled` — Studio is not enabled for this account. `protected_not_enabled` — a protected file cannot be loaded into a table."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`not_found` — no file of that id that you can open (or the files library is not enabled for your organization); `upload_not_found` — your organization has no table of that name."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`not_ready` — the file has not finished uploading; `upload_exists` — the name is taken (delete that table first, or pick another name); `upload_limit_reached` — your organization is at its limit of tables (`details.limit`); `upload_storage_full` — the file would take your organization past its total size."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"The file holds more than an upload may, or cannot be read: `file_too_large`, `too_many_rows`, `too_many_columns` (`details.limit`), `empty_file`, `unreadable_file`, `ingest_timeout`. `error` says what to change."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`rate_limited` — too many uploads from your organization in the last minute; or `busy` — a file is already being read. Wait `details.retryAfterSeconds` (also sent as `Retry-After`)."},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`membership_unavailable` — who may open the file could not be checked. Try again in a minute."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`studio_unavailable` — Studio is not available right now; `storage_unavailable` — the files library is not available right now. Try again in a minute."}},"summary":"One table made from a file","tags":["Studio"]}},"/v1/studio/uploads":{"get":{"description":"Every file your organization has uploaded: its name, the table it is queried as, its columns and row count, when it was uploaded and by whom, and its status. Only your organization's uploads are listed; no other organization can see or query them. Free. Deprecated: use `/v1/studio/tables` — add the file to your files library, then load it into a table. This route keeps working until 2026-12-23, and every answer carries `Deprecation`, `Sunset` and `Link: </v1/studio/tables>; rel=\"successor-version\"` headers.","operationId":"listStudioUploads","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioUploadList"}}},"description":"The uploads"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`invalid_request` — the request is malformed; `invalid_upload_name` — the name cannot be used; `unsupported_format` — the file is not a CSV, TSV, Excel (.xlsx) or Parquet file."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`no_organization` — Studio works inside an organization: select one and retry. `studio_not_enabled` — Studio is in a limited preview and is not enabled for this account. `entitlement_missing` — saving, switching to or running a `heavy` job needs heavy runs enabled for your organization (`details.entitlementKey`): ask your ModelMatch admin, or use `size: light`."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`upload_not_found` — your organization has no upload of that name."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`upload_exists` — the name is taken (delete that upload first, or pick another name); `upload_limit_reached` — your organization is at its limit of uploads (`details.limit`); `upload_storage_full` — the file would take your organization past its total upload size; `upload_not_received` — the file has not been sent to the upload URL yet, or the URL expired."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"The file holds more than an upload may, or cannot be read: `file_too_large`, `too_many_rows`, `too_many_columns` (`details.limit`), `empty_file`, `unreadable_file`, `ingest_timeout`. `error` says what to change."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`rate_limited` — too many uploads from your organization in the last minute; or `busy` — a file is already being read. Wait `details.retryAfterSeconds` (also sent as `Retry-After`)."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`studio_unavailable` — Studio is not available right now. `entitlement_unavailable` — whether your organization can run heavy jobs could not be confirmed; nothing was saved or started. Try again in a minute."}},"summary":"Your organization's uploads","tags":["Studio"]},"post":{"description":"Turn a file of your own data — leads, closed and lost loans, a client list — into a table only your organization can query and join to the market tables. This is step one of three: it reserves the name and answers with `uploadUrl`. Step two: send the file to `uploadUrl` with HTTP PUT (the file's bytes as the body; it must be exactly `sizeBytes` long). Step three: call complete. Files can be CSV, TSV, Excel (.xlsx) or Parquet, up to 100 MB, 2,000,000 rows and 200 columns; an organization can keep 25 uploads and 1 GB in total. The table will be `upload_<name>`. Asking again for a name whose file never arrived replaces the earlier request. Free. Deprecated: use `/v1/studio/tables` — add the file to your files library, then load it into a table. This route keeps working until 2026-12-23, and every answer carries `Deprecation`, `Sunset` and `Link: </v1/studio/tables>; rel=\"successor-version\"` headers.","operationId":"createStudioUpload","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioUploadCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioUploadCreated"}}},"description":"The upload URL, and when it expires"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`invalid_request` — the request is malformed; `invalid_upload_name` — the name cannot be used; `unsupported_format` — the file is not a CSV, TSV, Excel (.xlsx) or Parquet file."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`no_organization` — Studio works inside an organization: select one and retry. `studio_not_enabled` — Studio is in a limited preview and is not enabled for this account. `entitlement_missing` — saving, switching to or running a `heavy` job needs heavy runs enabled for your organization (`details.entitlementKey`): ask your ModelMatch admin, or use `size: light`."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`upload_not_found` — your organization has no upload of that name."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`upload_exists` — the name is taken (delete that upload first, or pick another name); `upload_limit_reached` — your organization is at its limit of uploads (`details.limit`); `upload_storage_full` — the file would take your organization past its total upload size; `upload_not_received` — the file has not been sent to the upload URL yet, or the URL expired."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"The file holds more than an upload may, or cannot be read: `file_too_large`, `too_many_rows`, `too_many_columns` (`details.limit`), `empty_file`, `unreadable_file`, `ingest_timeout`. `error` says what to change."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`rate_limited` — too many uploads from your organization in the last minute; or `busy` — a file is already being read. Wait `details.retryAfterSeconds` (also sent as `Retry-After`)."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`studio_unavailable` — Studio is not available right now. `entitlement_unavailable` — whether your organization can run heavy jobs could not be confirmed; nothing was saved or started. Try again in a minute."}},"summary":"Start an upload: get a URL to send a file to","tags":["Studio"]}},"/v1/studio/uploads/{name}":{"delete":{"description":"Delete an upload: its table, the rows that were read from the file, and its record. It leaves the catalog at once, and questions and jobs that read the table stop working. This cannot be undone — to get the table back, upload the file again. Free. Deprecated: use `/v1/studio/tables` — add the file to your files library, then load it into a table. This route keeps working until 2026-12-23, and every answer carries `Deprecation`, `Sunset` and `Link: </v1/studio/tables>; rel=\"successor-version\"` headers.","operationId":"deleteStudioUpload","parameters":[{"description":"The upload's name: lower-case letters, digits and underscores, starting with a letter, at most 56 characters. The table is `upload_<name>`.","in":"path","name":"name","required":true,"schema":{"description":"The upload's name: lower-case letters, digits and underscores, starting with a letter, at most 56 characters. The table is `upload_<name>`.","example":"closed_loans","pattern":"^[a-z][a-z0-9_]{0,55}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioUploadDeleted"}}},"description":"Deleted"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`invalid_request` — the request is malformed; `invalid_upload_name` — the name cannot be used; `unsupported_format` — the file is not a CSV, TSV, Excel (.xlsx) or Parquet file."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`no_organization` — Studio works inside an organization: select one and retry. `studio_not_enabled` — Studio is in a limited preview and is not enabled for this account. `entitlement_missing` — saving, switching to or running a `heavy` job needs heavy runs enabled for your organization (`details.entitlementKey`): ask your ModelMatch admin, or use `size: light`."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`upload_not_found` — your organization has no upload of that name."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`upload_exists` — the name is taken (delete that upload first, or pick another name); `upload_limit_reached` — your organization is at its limit of uploads (`details.limit`); `upload_storage_full` — the file would take your organization past its total upload size; `upload_not_received` — the file has not been sent to the upload URL yet, or the URL expired."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"The file holds more than an upload may, or cannot be read: `file_too_large`, `too_many_rows`, `too_many_columns` (`details.limit`), `empty_file`, `unreadable_file`, `ingest_timeout`. `error` says what to change."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`rate_limited` — too many uploads from your organization in the last minute; or `busy` — a file is already being read. Wait `details.retryAfterSeconds` (also sent as `Retry-After`)."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`studio_unavailable` — Studio is not available right now. `entitlement_unavailable` — whether your organization can run heavy jobs could not be confirmed; nothing was saved or started. Try again in a minute."}},"summary":"Delete an upload and its table, permanently","tags":["Studio"]}},"/v1/studio/uploads/{name}/complete":{"post":{"description":"Call this after the file has been sent to the upload URL. The file is read into the table `upload_<name>`, and the answer says what it holds: `columns` (names made safe for SQL, with a type each), `rowCount`, `warnings` (anything that was changed, skipped or kept as text — read them to the user) and `joinHints` (which columns line up with the market tables, with a join condition to copy). A small file answers `200` with `status: ready`. A large one answers `202` with `status: ingesting`: call complete again in a few seconds to collect the result. Calling it again on a ready upload is safe and answers with the same table. A file that cannot be used answers `422` and says why; create the upload again to send a corrected file. The original file is deleted once it has been read. Free. Deprecated: use `/v1/studio/tables` — add the file to your files library, then load it into a table. This route keeps working until 2026-12-23, and every answer carries `Deprecation`, `Sunset` and `Link: </v1/studio/tables>; rel=\"successor-version\"` headers.","operationId":"completeStudioUpload","parameters":[{"description":"The upload's name: lower-case letters, digits and underscores, starting with a letter, at most 56 characters. The table is `upload_<name>`.","in":"path","name":"name","required":true,"schema":{"description":"The upload's name: lower-case letters, digits and underscores, starting with a letter, at most 56 characters. The table is `upload_<name>`.","example":"closed_loans","pattern":"^[a-z][a-z0-9_]{0,55}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioUploadResult"}}},"description":"The file is a table"},"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioUploadResult"}}},"description":"The file is still being read; call complete again"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`invalid_request` — the request is malformed; `invalid_upload_name` — the name cannot be used; `unsupported_format` — the file is not a CSV, TSV, Excel (.xlsx) or Parquet file."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`no_organization` — Studio works inside an organization: select one and retry. `studio_not_enabled` — Studio is in a limited preview and is not enabled for this account. `entitlement_missing` — saving, switching to or running a `heavy` job needs heavy runs enabled for your organization (`details.entitlementKey`): ask your ModelMatch admin, or use `size: light`."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`upload_not_found` — your organization has no upload of that name."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`upload_exists` — the name is taken (delete that upload first, or pick another name); `upload_limit_reached` — your organization is at its limit of uploads (`details.limit`); `upload_storage_full` — the file would take your organization past its total upload size; `upload_not_received` — the file has not been sent to the upload URL yet, or the URL expired."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"The file holds more than an upload may, or cannot be read: `file_too_large`, `too_many_rows`, `too_many_columns` (`details.limit`), `empty_file`, `unreadable_file`, `ingest_timeout`. `error` says what to change."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`rate_limited` — too many uploads from your organization in the last minute; or `busy` — a file is already being read. Wait `details.retryAfterSeconds` (also sent as `Retry-After`)."},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioError"}}},"description":"`studio_unavailable` — Studio is not available right now. `entitlement_unavailable` — whether your organization can run heavy jobs could not be confirmed; nothing was saved or started. Try again in a minute."}},"summary":"Finish an upload: turn the file into a table","tags":["Studio"]}}},"security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"tags":[{"description":"Internal admin endpoints (admin role only)","name":"Admin"},{"description":"Real estate agents","name":"Agents"},{"description":"Per-user alert settings, watchlists, and feed","name":"Alerts"},{"description":"NMLS-registered company branch offices","name":"Branches"},{"description":"NMLS-registered mortgage companies","name":"Companies"},{"description":"CRM records, lists, contacts, activity, tasks, meetings, and calls","name":"CRM"},{"description":"Send Model Match records into systems you own, such as your CRM","name":"Integrations"},{"description":"Your file library: upload, browse, search, open, share and attach files","name":"Files"},{"description":"Lender name normalization dictionary","name":"Lenders"},{"description":"Public-record mortgage / deed transactions","name":"Loans"},{"description":"Location autocomplete and resolution","name":"Locations"},{"description":"Aggregated mortgage origination market data (geography, product, borrower numerics)","name":"Market"},{"description":"Monitors watch the data and tell you when it changes: ModelMatch templates (past clients, agent partners, farm areas, record watch) and your own Studio jobs with rules","name":"Monitors"},{"description":"The current caller's account — profile, credit balance, and plan","name":"Me"},{"description":"Real-estate office records","name":"Offices"},{"description":"Loan originators (NMLS LOs)","name":"Originators"},{"description":"Properties with owners and history","name":"Properties"},{"description":"Realtime/notifications connection config","name":"Realtime"},{"description":"Records linked to a given record, across entity types","name":"Related"},{"description":"Real-estate sales transactions","name":"Sales"},{"description":"Your saved list filters — store a query once, re-run it against its list operation","name":"Saved Filters"},{"description":"Instant multi-entity search","name":"Search"},{"description":"Predictive scores: loan officers likely to change companies, past clients at risk of going elsewhere, and agent relationships likely to close again","name":"Signals"},{"description":"Answer a question with SQL over the market tables, and save a question as a job whose result becomes a table you can query","name":"Studio"}]}