{"openapi":"3.1.0","info":{"title":"Roofpeace Agent API","description":"Connect AI assistants to a Roofpeace roofing company over Streamable HTTP MCP (https://roofpeace.com/api/mcp with OAuth 2.1 + PKCE) or this versioned REST API with scoped keys issued by a company owner or admin at /settings/agent-access.","version":"0.2.0"},"servers":[{"url":"https://roofpeace.com","description":"Production"}],"paths":{"/api/v1/coverage/check":{"post":{"summary":"Check Agent Coverage","operationId":"check_agent_coverage_api_v1_coverage_check_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoverageCheckIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoverageCheckOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/api/v1/me":{"get":{"summary":"Get Agent Identity","operationId":"get_agent_identity_api_v1_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentIdentityOut"}}}}},"security":[{"AgentBearer":[]}]}},"/api/v1/service-areas":{"get":{"summary":"Get Agent Service Areas","operationId":"get_agent_service_areas_api_v1_service_areas_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceAreaListOut"}}}}},"security":[{"AgentBearer":[]}],"x-required-scope":"workspace:read"},"post":{"summary":"Create Agent Service Area","operationId":"create_agent_service_area_api_v1_service_areas_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceAreaCreateIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceAreaOut"}}}},"409":{"description":"Conflicting payload, concurrent mutation, or legacy request requiring reconciliation."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"AgentBearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":100},"description":"Unique mutation key. Repeating the same JSON payload replays its committed response; different data returns 409."}],"x-required-scope":"workspace:write"}},"/api/v1/buildings":{"get":{"summary":"Get Agent Buildings","operationId":"get_agent_buildings_api_v1_buildings_get","parameters":[{"name":"urgency_tier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Urgency Tier"},"description":"Urgency tier, for example high_urgency."},{"name":"roof_material","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Roof Material"},"description":"Roof material, for example asphalt_shingle, metal or tile."},{"name":"occupancy_class","in":"query","required":false,"schema":{"anyOf":[{"enum":["commercial","residential","mixed","unknown"],"type":"string"},{"type":"null"}],"title":"Occupancy Class"},"description":"Building use."},{"name":"min_score","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Score"},"description":"Minimum opportunity score, 0 to 10."},{"name":"max_years_remaining","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Years Remaining"},"description":"Only roofs with at most this many estimated years of life left."},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"},"description":"Text matched against address, city, ZIP, county, owner and business name."},{"name":"assignment_status","in":"query","required":false,"schema":{"anyOf":[{"enum":["assigned","unassigned"],"type":"string"},{"type":"null"}],"title":"Assignment Status"},"description":"Whether a rep already owns the building: assigned or unassigned."},{"name":"crm_stage","in":"query","required":false,"schema":{"anyOf":[{"enum":["lead","not_home","contacted","appointment","inspected","quoted","sold","not_interested","lost"],"type":"string"},{"type":"null"}],"title":"Crm Stage"},"description":"Only buildings at this pipeline stage."},{"name":"service_area_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Service Area Id"},"description":"Service area id from GET /service-areas."},{"name":"sort_by","in":"query","required":false,"schema":{"enum":["score","urgency","value","address"],"type":"string","default":"score","title":"Sort By"},"description":"Sort key."},{"name":"sort_dir","in":"query","required":false,"schema":{"enum":["asc","desc"],"type":"string","default":"desc","title":"Sort Dir"},"description":"Sort direction."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"},"description":"Maximum number of records to return."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"},"description":"Records to skip, for paging."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuildingListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"AgentBearer":[]}],"x-required-scope":"workspace:read"}},"/api/v1/buildings/{building_id}":{"get":{"summary":"Get Agent Building","operationId":"get_agent_building_api_v1_buildings__building_id__get","parameters":[{"name":"building_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Building Id"},"description":"Building id from GET /buildings or GET /strikes/{strike_id}."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuildingOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"AgentBearer":[]}],"x-required-scope":"workspace:read"}},"/api/v1/strikes":{"get":{"summary":"Get Agent Strikes","operationId":"get_agent_strikes_api_v1_strikes_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"},"description":"Maximum number of records to return."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrikeListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"AgentBearer":[]}],"x-required-scope":"workspace:read"}},"/api/v1/strikes/{strike_id}":{"get":{"summary":"Get Agent Strike","operationId":"get_agent_strike_api_v1_strikes__strike_id__get","parameters":[{"name":"strike_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Strike Id"},"description":"Storm alert id from GET /strikes."},{"name":"start_lat","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":90,"minimum":-90},{"type":"null"}],"title":"Start Lat"},"description":"Route start latitude; the route starts here when start_lng is also given."},{"name":"start_lng","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":180,"minimum":-180},{"type":"null"}],"title":"Start Lng"},"description":"Route start longitude."},{"name":"time_budget_minutes","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":720,"minimum":15},{"type":"null"}],"default":240,"title":"Time Budget Minutes"},"description":"Driving and stop time the route must fit."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrikeDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"AgentBearer":[]}],"x-required-scope":"workspace:read"}},"/api/v1/crm/pipeline":{"get":{"summary":"Get Agent Pipeline","operationId":"get_agent_pipeline_api_v1_crm_pipeline_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CRMPipelineEntryOut"},"type":"array","title":"Response Get Agent Pipeline Api V1 Crm Pipeline Get"}}}}},"security":[{"AgentBearer":[]}],"x-required-scope":"crm:read"}},"/api/v1/crm/buildings/{building_id}/summary":{"get":{"summary":"Get Agent Crm Summary","operationId":"get_agent_crm_summary_api_v1_crm_buildings__building_id__summary_get","parameters":[{"name":"building_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Building Id"},"description":"Building id from GET /buildings or GET /strikes/{strike_id}."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CRMBuildingSummaryOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"AgentBearer":[]}],"x-required-scope":"crm:read"}},"/api/v1/crm/buildings/{building_id}/notes":{"post":{"summary":"Create Agent Crm Note","operationId":"create_agent_crm_note_api_v1_crm_buildings__building_id__notes_post","parameters":[{"name":"building_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Building Id"},"description":"Building id from GET /buildings or GET /strikes/{strike_id}."},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":100},"description":"Unique mutation key. Repeating the same JSON payload replays its committed response; different data returns 409."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CRMBuildingNoteCreateIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CRMBuildingNoteOut"}}}},"409":{"description":"Conflicting payload, concurrent mutation, or legacy request requiring reconciliation."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"AgentBearer":[]}],"x-required-scope":"crm:write"}},"/api/v1/crm/buildings/{building_id}/stage":{"patch":{"summary":"Update Agent Crm Stage","operationId":"update_agent_crm_stage_api_v1_crm_buildings__building_id__stage_patch","parameters":[{"name":"building_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Building Id"},"description":"Building id from GET /buildings or GET /strikes/{strike_id}."},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":100},"description":"Unique mutation key. Repeating the same JSON payload replays its committed response; different data returns 409."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CRMAssignmentStageUpdateIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CRMBuildingAssignmentOut"}}}},"409":{"description":"Conflicting payload, concurrent mutation, or legacy request requiring reconciliation."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"AgentBearer":[]}],"x-required-scope":"crm:write"}},"/api/v1/marketing/ads":{"get":{"summary":"List provider ads and copy proposals","operationId":"get_agent_marketing_ads_api_v1_marketing_ads_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketingAdsOut"}}}}},"security":[{"AgentBearer":[]}],"x-required-scope":"marketing:read"}},"/api/v1/marketing/ads/{ad_id}/revisions":{"post":{"summary":"Propose ad copy for human review","operationId":"create_agent_marketing_ad_revision_api_v1_marketing_ads__ad_id__revisions_post","parameters":[{"name":"ad_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Ad Id"},"description":"Provider ad id from GET /marketing/ads."},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":100},"description":"Unique mutation key. Repeating the same JSON payload replays its committed response; different data returns 409."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketingAdRevisionIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketingAdMutationOut"}}}},"409":{"description":"Conflicting payload, concurrent mutation, or legacy request requiring reconciliation."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"AgentBearer":[]}],"x-required-scope":"marketing:draft"}},"/api/v1/marketing/ad-revisions/{revision_id}":{"patch":{"summary":"Update an agent-owned ad proposal","operationId":"update_agent_marketing_ad_revision_api_v1_marketing_ad_revisions__revision_id__patch","parameters":[{"name":"revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Revision Id"},"description":"Ad revision id from GET /marketing/ads."},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":100},"description":"Unique mutation key. Repeating the same JSON payload replays its committed response; different data returns 409."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketingAdRevisionIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketingAdMutationOut"}}}},"409":{"description":"Conflicting payload, concurrent mutation, or legacy request requiring reconciliation."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"AgentBearer":[]}],"x-required-scope":"marketing:draft"}},"/api/v1/marketing/ad-revisions/{revision_id}/comments":{"post":{"summary":"Comment on an ad proposal","operationId":"comment_on_agent_marketing_ad_revision_api_v1_marketing_ad_revisions__revision_id__comments_post","parameters":[{"name":"revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Revision Id"},"description":"Ad revision id from GET /marketing/ads."},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":100},"description":"Unique mutation key. Repeating the same JSON payload replays its committed response; different data returns 409."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketingAdCommentIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketingAdMutationOut"}}}},"409":{"description":"Conflicting payload, concurrent mutation, or legacy request requiring reconciliation."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"AgentBearer":[]}],"x-required-scope":"marketing:draft"}},"/api/v1/admin/overview":{"get":{"summary":"Get Agent Admin Overview","operationId":"get_agent_admin_overview_api_v1_admin_overview_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOverviewOut"}}}}},"security":[{"AgentBearer":[]}],"x-required-scope":"admin:read"}},"/api/v1/admin/usage":{"get":{"summary":"Get Agent Admin Usage","description":"Which parts of the product each company uses over the last `days` (default 60): per feature area, recorded actions, distinct people and distinct weeks with use. Homeowner workspaces are left out.","operationId":"get_agent_admin_usage_api_v1_admin_usage_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":365,"default":60},"description":"How many days back to count."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[{"AgentBearer":[]}],"x-required-scope":"admin:read"}},"/api/v1/admin/storms":{"get":{"summary":"Get Agent Admin Storms","operationId":"get_agent_admin_storms_api_v1_admin_storms_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"enum":["door_hit","coverage_gap"],"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"alerted","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Alerted"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"},"description":"Maximum number of records to return."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStormListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"AgentBearer":[]}],"x-required-scope":"admin:read"}},"/api/v1/admin/prospects":{"get":{"summary":"Get Agent Admin Prospects","operationId":"get_agent_admin_prospects_api_v1_admin_prospects_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Q"}},{"name":"stage","in":"query","required":false,"schema":{"anyOf":[{"enum":["researching","ready","contacted","engaged","demo","trial","proposal","nurture","won","lost","do_not_contact"],"type":"string"},{"type":"null"}],"title":"Stage"}},{"name":"coverage","in":"query","required":false,"schema":{"anyOf":[{"enum":["ready","available","not_loaded","unknown"],"type":"string"},{"type":"null"}],"title":"Coverage"}},{"name":"sort","in":"query","required":false,"schema":{"enum":["priority","coverage"],"type":"string","default":"priority","title":"Sort"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesProspectListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"AgentBearer":[]}],"x-required-scope":"admin:read"}},"/api/v1/crm/inquiries/{inquiry_id}/summary":{"get":{"summary":"Get Agent Inquiry Summary","operationId":"inquiry_summary_get","parameters":[{"name":"inquiry_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Building Id"},"description":"Inquiry id from GET /crm/pipeline or GET /marketing/leads."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CRMBuildingSummaryOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"AgentBearer":[]}],"x-required-scope":"crm:read"}},"/api/v1/crm/inquiries/{inquiry_id}/notes":{"post":{"summary":"Create Agent Inquiry Note","operationId":"inquiry_notes_post","parameters":[{"name":"inquiry_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Building Id"},"description":"Inquiry id from GET /crm/pipeline or GET /marketing/leads."},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":100},"description":"Unique mutation key. Repeating the same JSON payload replays its committed response; different data returns 409."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CRMBuildingNoteCreateIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CRMBuildingNoteOut"}}}},"409":{"description":"Conflicting payload, concurrent mutation, or legacy request requiring reconciliation."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"AgentBearer":[]}],"x-required-scope":"crm:write"}},"/api/v1/marketing/leads":{"get":{"summary":"Read workspace leads","operationId":"read_marketing_leads","security":[{"AgentBearer":[]}],"responses":{"200":{"description":"Workspace-scoped evidence"}},"parameters":[],"x-required-scope":"marketing:read"}},"/api/v1/marketing/learning":{"get":{"summary":"Read workspace learning","operationId":"read_marketing_learning","security":[{"AgentBearer":[]}],"responses":{"200":{"description":"Workspace-scoped evidence"}},"parameters":[{"name":"days","in":"query","schema":{"type":"integer","minimum":1,"maximum":365,"default":30},"description":"Lookback window in days."}],"x-required-scope":"marketing:read"}},"/api/v1/marketing/feedback":{"get":{"summary":"Read workspace feedback","operationId":"read_marketing_feedback","security":[{"AgentBearer":[]}],"responses":{"200":{"description":"Workspace-scoped evidence"}},"parameters":[],"x-required-scope":"marketing:read"}},"/api/v1/marketing/feedback/{id}":{"get":{"summary":"Read workspace feedback/{id}","operationId":"read_marketing_feedback_detail","security":[{"AgentBearer":[]}],"responses":{"200":{"description":"Workspace-scoped evidence"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Research record id from GET /marketing/feedback."}],"x-required-scope":"marketing:read"}},"/api/v1/crm/buildings/{building_id}/tasks":{"post":{"summary":"Create internal follow-up","operationId":"create_buildings_task","parameters":[{"name":"building_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Building Id"},"description":"Building id from GET /buildings or GET /strikes/{strike_id}."},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":100},"description":"Unique mutation key. Repeating the same JSON payload replays its committed response; different data returns 409."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title"],"properties":{"title":{"type":"string","minLength":1,"maxLength":300,"description":"Short title."},"details":{"type":"string","maxLength":10000,"description":"Context for whoever picks up the task."},"due_at":{"type":"string","format":"date-time","description":"Due time, ISO 8601 with offset."},"assigned_operator_user_id":{"type":"string","maxLength":200,"nullable":true,"description":"Workspace member to assign; omit or null to leave unassigned. Agents cannot be assignees."},"assigned_operator_email":{"type":"string","maxLength":320,"nullable":true,"description":"Email of the assigned workspace member."}}}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CRMBuildingTaskOut"}}}},"409":{"description":"Conflicting payload, concurrent mutation, or legacy request requiring reconciliation."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"AgentBearer":[]}],"description":"Creates internal work only. Omitted assignee leaves the task unassigned. Supply a verified workspace member ID to assign it. No customer message is sent.","x-required-scope":"crm:write"}},"/api/v1/crm/inquiries/{inquiry_id}/tasks":{"post":{"summary":"Create internal follow-up","operationId":"create_inquiries_task","parameters":[{"name":"inquiry_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Building Id"},"description":"Inquiry id from GET /crm/pipeline or GET /marketing/leads."},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":100},"description":"Unique mutation key. Repeating the same JSON payload replays its committed response; different data returns 409."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title"],"properties":{"title":{"type":"string","minLength":1,"maxLength":300,"description":"Short title."},"details":{"type":"string","maxLength":10000,"description":"Context for whoever picks up the task."},"due_at":{"type":"string","format":"date-time","description":"Due time, ISO 8601 with offset."},"assigned_operator_user_id":{"type":"string","maxLength":200,"nullable":true,"description":"Workspace member to assign; omit or null to leave unassigned. Agents cannot be assignees."},"assigned_operator_email":{"type":"string","maxLength":320,"nullable":true,"description":"Email of the assigned workspace member."}}}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CRMBuildingTaskOut"}}}},"409":{"description":"Conflicting payload, concurrent mutation, or legacy request requiring reconciliation."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"AgentBearer":[]}],"description":"Creates internal work only. Omitted assignee leaves the task unassigned. Supply a verified workspace member ID to assign it. No customer message is sent.","x-required-scope":"crm:write"}},"/api/v1/research":{"post":{"summary":"Submit research for human review","operationId":"submit_research_for_human_review","description":"Requires research:write. Owner-issued bearer key; workspace access must be active.","x-required-scope":"research:write","security":[{"AgentBearer":[]}],"responses":{"201":{"description":"Success"},"401":{"description":"Invalid, expired or revoked key"},"402":{"description":"Workspace billing inactive; owner action required"},"403":{"description":"Scope or delegation denied"},"404":{"description":"Unavailable record"},"409":{"description":"Conflicting idempotency payload or transition"},"422":{"description":"Invalid input"}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":100},"description":"Unique mutation key. Repeating the same JSON payload replays its committed response; different data returns 409."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["observation","source","received_on","evidence_url"],"properties":{"observation":{"type":"string","maxLength":5000,"minLength":1,"description":"What the source says or shows."},"source":{"type":"string","maxLength":300,"minLength":1,"description":"Interview, page or publication title."},"received_on":{"type":"string","format":"date","description":"Date the source was received, YYYY-MM-DD."},"evidence_url":{"type":"string","maxLength":2000,"format":"uri","pattern":"^https?://","description":"HTTP(S) link to the source; Roofpeace does not fetch it."},"hypothesis":{"type":"string","maxLength":5000,"description":"Your inference, kept separate from the observation."},"proposed_change":{"type":"string","maxLength":5000,"description":"Suggested change for the team to consider."}}}}}}}},"/api/v1/jobs":{"get":{"summary":"List jobs","operationId":"list_jobs","description":"Requires jobs:read. Owner-issued bearer key; workspace access must be active.","x-required-scope":"jobs:read","security":[{"AgentBearer":[]}],"responses":{"200":{"description":"Success"},"401":{"description":"Invalid, expired or revoked key"},"402":{"description":"Workspace billing inactive; owner action required"},"403":{"description":"Scope or delegation denied"},"404":{"description":"Unavailable record"},"409":{"description":"Conflicting idempotency payload or transition"},"422":{"description":"Invalid input"}}},"post":{"summary":"Create job","operationId":"create_job","description":"Requires jobs:write. Owner-issued bearer key; workspace access must be active.","x-required-scope":"jobs:write","security":[{"AgentBearer":[]}],"responses":{"201":{"description":"Success"},"401":{"description":"Invalid, expired or revoked key"},"402":{"description":"Workspace billing inactive; owner action required"},"403":{"description":"Scope or delegation denied"},"404":{"description":"Unavailable record"},"409":{"description":"Conflicting idempotency payload or transition"},"422":{"description":"Invalid input"}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":100},"description":"Unique mutation key. Repeating the same JSON payload replays its committed response; different data returns 409."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["source"],"properties":{"title":{"type":"string","maxLength":300,"description":"Short job title. Optional when source is customer (defaults to customer_name or roof_address); required for property or inquiry."},"source":{"type":"string","enum":["customer","property","inquiry"],"description":"How the job starts: customer (direct customer/address, no building or inquiry needed), property (with building_id), or inquiry (with inquiry_id)."},"customer_name":{"type":["string","null"],"maxLength":200,"description":"Customer full name when source is customer."},"customer_phone":{"type":["string","null"],"maxLength":40,"description":"Customer phone number when source is customer."},"customer_email":{"type":["string","null"],"maxLength":320,"description":"Customer email address when source is customer."},"roof_address":{"type":["string","null"],"maxLength":300,"description":"Street address, city, state and ZIP when source is customer."},"building_id":{"type":"string","format":"uuid","description":"Property id; required when source is property."},"inquiry_id":{"type":"string","format":"uuid","description":"Inquiry id; required when source is inquiry."},"assigned_operator_user_id":{"type":["string","null"],"maxLength":200,"description":"Workspace member to assign; omit or null to leave unassigned. Agents cannot be assignees."},"assigned_operator_email":{"type":["string","null"],"maxLength":320,"description":"Email of the assigned workspace member."},"state":{"type":"string","enum":["draft","active"],"default":"draft","description":"Initial job state: draft (Quote/Lead) or active (Sold job)."}},"oneOf":[{"properties":{"source":{"const":"customer"}},"not":{"anyOf":[{"required":["building_id"]},{"required":["inquiry_id"]}]}},{"required":["title","building_id"],"properties":{"source":{"const":"property"}},"not":{"required":["inquiry_id"]}},{"required":["title","inquiry_id"],"properties":{"source":{"const":"inquiry"}},"not":{"required":["building_id"]}}]}}}}}},"/api/v1/jobs/{job_id}":{"get":{"summary":"Read job","operationId":"read_job","description":"Requires jobs:read. Owner-issued bearer key; workspace access must be active.","x-required-scope":"jobs:read","security":[{"AgentBearer":[]}],"responses":{"200":{"description":"Success"},"401":{"description":"Invalid, expired or revoked key"},"402":{"description":"Workspace billing inactive; owner action required"},"403":{"description":"Scope or delegation denied"},"404":{"description":"Unavailable record"},"409":{"description":"Conflicting idempotency payload or transition"},"422":{"description":"Invalid input"}},"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Job id from GET /jobs."}]},"patch":{"summary":"Update job title and assignment","operationId":"update_job_title_and_assignment","description":"Requires jobs:write. Owner-issued bearer key; workspace access must be active.","x-required-scope":"jobs:write","security":[{"AgentBearer":[]}],"responses":{"200":{"description":"Success"},"401":{"description":"Invalid, expired or revoked key"},"402":{"description":"Workspace billing inactive; owner action required"},"403":{"description":"Scope or delegation denied"},"404":{"description":"Unavailable record"},"409":{"description":"Conflicting idempotency payload or transition"},"422":{"description":"Invalid input"}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":100},"description":"Unique mutation key. Repeating the same JSON payload replays its committed response; different data returns 409."},{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Job id from GET /jobs."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","maxLength":300,"minLength":1,"description":"Short title."},"assigned_operator_user_id":{"type":["string","null"],"maxLength":200,"description":"Workspace member to assign; omit or null to leave unassigned. Agents cannot be assignees."},"assigned_operator_email":{"type":["string","null"],"maxLength":320,"description":"Email of the assigned workspace member."}}}}}}}},"/api/v1/jobs/{job_id}/state":{"patch":{"summary":"Change job state","operationId":"change_job_state","description":"Requires jobs:write. Owner-issued bearer key; workspace access must be active.","x-required-scope":"jobs:write","security":[{"AgentBearer":[]}],"responses":{"200":{"description":"Success"},"401":{"description":"Invalid, expired or revoked key"},"402":{"description":"Workspace billing inactive; owner action required"},"403":{"description":"Scope or delegation denied"},"404":{"description":"Unavailable record"},"409":{"description":"Conflicting idempotency payload or transition"},"422":{"description":"Invalid input"}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":100},"description":"Unique mutation key. Repeating the same JSON payload replays its committed response; different data returns 409."},{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Job id from GET /jobs."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["state"],"properties":{"state":{"type":"string","enum":["draft","active","completed","cancelled"],"default":"draft","description":"Target job state; allowed transitions are enforced."}}}}}}}},"/api/v1/admin/people":{"get":{"summary":"Get Agent Admin People","description":"Everyone with an account: workspace, role, last sign-in (impersonated sessions excluded) and last recorded activity, most recent first.","operationId":"get_agent_admin_people_api_v1_admin_people_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[{"AgentBearer":[]}],"x-required-scope":"admin:read"}},"/api/v1/admin/people/{user_id}/activity":{"get":{"summary":"Get Agent Admin Person Activity","description":"One person's live sessions and recorded activity (sign-ins, page views, building views, searches and actions), newest first. Events recorded while an admin viewed the app as this person carry impersonated_by. Page with next_before.","operationId":"get_agent_admin_person_activity_api_v1_admin_people__user_id__activity_get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":1000,"default":200,"title":"Limit"}},{"name":"before","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Before"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"No such person"}},"security":[{"AgentBearer":[]}],"x-required-scope":"admin:read"}},"/api/v1/admin/inbound":{"get":{"summary":"Read saved inbound record metadata (internal agents only)","operationId":"readInboundRecords","security":[{"BearerAuth":[]}],"parameters":[{"name":"startAt","in":"query","required":true,"schema":{"type":"integer"},"description":"Inclusive start in Unix milliseconds"},{"name":"endAt","in":"query","required":true,"schema":{"type":"integer"},"description":"Inclusive end in Unix milliseconds, at most 366 days after start"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer"},"description":"Page size from 1 to 200"},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque nextCursor from this same window"}],"responses":{"200":{"description":"Record IDs, kinds, creation timestamps, complete and nextCursor; no contact data"}},"x-required-scope":"inbound:read"}}},"components":{"schemas":{"AdminAreaHitOut":{"properties":{"id":{"type":"string","title":"Id"},"org_id":{"type":"string","title":"Org Id"},"org_name":{"type":"string","title":"Org Name"},"org_slug":{"type":"string","title":"Org Slug"},"service_area_id":{"type":"string","title":"Service Area Id"},"service_area_name":{"type":"string","title":"Service Area Name"},"status":{"type":"string","title":"Status"},"storm_started_at":{"type":"string","format":"date-time","title":"Storm Started At"},"storm_ended_at":{"type":"string","format":"date-time","title":"Storm Ended At"},"max_hail_inches":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Hail Inches"},"max_wind_mph":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Wind Mph"},"event_count":{"type":"integer","title":"Event Count"},"candidate_building_count":{"type":"integer","title":"Candidate Building Count"},"nearest_building_distance_miles":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Nearest Building Distance Miles"},"coverage_counts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Coverage Counts"},"hit_lat":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hit Lat"},"hit_lng":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hit Lng"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","org_id","org_name","org_slug","service_area_id","service_area_name","status","storm_started_at","storm_ended_at","event_count","candidate_building_count","coverage_counts","created_at"],"title":"AdminAreaHitOut"},"AdminCountyDataQualityOut":{"properties":{"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"county":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"County"},"total":{"type":"integer","title":"Total"},"metrics":{"additionalProperties":{"$ref":"#/components/schemas/AdminCoverageValueOut"},"type":"object","title":"Metrics"}},"type":"object","required":["total","metrics"],"title":"AdminCountyDataQualityOut"},"AdminCoverageMetricOut":{"properties":{"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"},"category":{"type":"string","title":"Category"},"present":{"type":"integer","title":"Present"},"total":{"type":"integer","title":"Total"},"pct":{"type":"number","title":"Pct"},"target_pct":{"type":"number","title":"Target Pct"},"status":{"type":"string","title":"Status"},"description":{"type":"string","title":"Description"}},"type":"object","required":["key","label","category","present","total","pct","target_pct","status","description"],"title":"AdminCoverageMetricOut"},"AdminCoverageValueOut":{"properties":{"present":{"type":"integer","title":"Present"},"pct":{"type":"number","title":"Pct"}},"type":"object","required":["present","pct"],"title":"AdminCoverageValueOut"},"AdminDataQualityOut":{"properties":{"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"total_buildings":{"type":"integer","title":"Total Buildings"},"metrics":{"items":{"$ref":"#/components/schemas/AdminCoverageMetricOut"},"type":"array","title":"Metrics"},"counties":{"items":{"$ref":"#/components/schemas/AdminCountyDataQualityOut"},"type":"array","title":"Counties"},"year_built_focus":{"$ref":"#/components/schemas/AdminYearBuiltFocusOut"}},"type":"object","required":["generated_at","total_buildings","metrics","counties","year_built_focus"],"title":"AdminDataQualityOut"},"AdminLeadOut":{"properties":{"id":{"type":"string","title":"Id"},"kind":{"type":"string","title":"Kind"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"email":{"type":"string","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company"},"county":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"County"},"state_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State Code"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"source":{"type":"string","title":"Source"}},"type":"object","required":["id","kind","created_at","email","source"],"title":"AdminLeadOut"},"AdminOverviewOut":{"properties":{"summary":{"$ref":"#/components/schemas/AdminOverviewSummaryOut"},"data_quality":{"$ref":"#/components/schemas/AdminDataQualityOut"},"workspaces":{"items":{"$ref":"#/components/schemas/AdminWorkspaceOut"},"type":"array","title":"Workspaces"},"users":{"items":{"$ref":"#/components/schemas/AdminUserOut"},"type":"array","title":"Users"},"recent_area_hits":{"items":{"$ref":"#/components/schemas/AdminAreaHitOut"},"type":"array","title":"Recent Area Hits"},"recent_events":{"items":{"$ref":"#/components/schemas/AdminRecentUsageEventOut"},"type":"array","title":"Recent Events"},"recent_leads":{"items":{"$ref":"#/components/schemas/AdminLeadOut"},"type":"array","title":"Recent Leads"}},"type":"object","required":["summary","data_quality","workspaces","users","recent_area_hits","recent_events","recent_leads"],"title":"AdminOverviewOut"},"AdminOverviewSummaryOut":{"properties":{"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"total_workspaces":{"type":"integer","title":"Total Workspaces"},"paid_workspaces":{"type":"integer","title":"Paid Workspaces"},"total_users":{"type":"integer","title":"Total Users"},"service_areas":{"type":"integer","title":"Service Areas"},"workspace_properties":{"type":"integer","title":"Workspace Properties"},"active_assignments":{"type":"integer","title":"Active Assignments"},"open_tasks":{"type":"integer","title":"Open Tasks"},"events_last_7d":{"type":"integer","title":"Events Last 7D"},"strikes_last_7d":{"type":"integer","title":"Strikes Last 7D"},"area_hits_last_7d":{"type":"integer","title":"Area Hits Last 7D"},"coverage_gaps_last_7d":{"type":"integer","title":"Coverage Gaps Last 7D"},"weather_data_freshness_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Weather Data Freshness At"}},"type":"object","required":["generated_at","total_workspaces","paid_workspaces","total_users","service_areas","workspace_properties","active_assignments","open_tasks","events_last_7d","strikes_last_7d","area_hits_last_7d","coverage_gaps_last_7d"],"title":"AdminOverviewSummaryOut"},"AdminRecentUsageEventOut":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At"},"event_name":{"type":"string","title":"Event Name"},"org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id"},"org_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Name"},"org_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Slug"},"operator_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operator Email"},"operator_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operator Role"},"building_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Building Id"},"query":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Query"}},"type":"object","required":["created_at","event_name"],"title":"AdminRecentUsageEventOut"},"AdminStormIncidentOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"org_id":{"type":"string","format":"uuid","title":"Org Id"},"org_name":{"type":"string","title":"Org Name"},"service_area_id":{"type":"string","format":"uuid","title":"Service Area Id"},"service_area_name":{"type":"string","title":"Service Area Name"},"status":{"type":"string","title":"Status"},"storm_started_at":{"type":"string","format":"date-time","title":"Storm Started At"},"storm_ended_at":{"type":"string","format":"date-time","title":"Storm Ended At"},"max_hail_inches":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Hail Inches"},"max_wind_mph":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Wind Mph"},"event_count":{"type":"integer","title":"Event Count"},"candidate_building_count":{"type":"integer","title":"Candidate Building Count"},"nearest_building_distance_miles":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Nearest Building Distance Miles"},"hit_lat":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hit Lat"},"hit_lng":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hit Lng"},"strike_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Strike Id"},"ranked_door_count":{"type":"integer","title":"Ranked Door Count","default":0},"customer_email_sent":{"type":"boolean","title":"Customer Email Sent","default":false},"customer_alerted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Customer Alerted At"},"customer_recipients":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Recipients"},"owner_email_draft_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Owner Email Draft Id"},"owner_email_draft_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Email Draft Status"}},"type":"object","required":["id","org_id","org_name","service_area_id","service_area_name","status","storm_started_at","storm_ended_at","event_count","candidate_building_count"],"title":"AdminStormIncidentOut"},"AdminStormListOut":{"properties":{"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"incidents":{"items":{"$ref":"#/components/schemas/AdminStormIncidentOut"},"type":"array","title":"Incidents"}},"type":"object","required":["generated_at","incidents"],"title":"AdminStormListOut"},"AdminUserOut":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"name":{"type":"string","title":"Name"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"is_root_admin":{"type":"boolean","title":"Is Root Admin","default":false},"owns_workspace":{"type":"boolean","title":"Owns Workspace","default":false},"email_verified":{"type":"boolean","title":"Email Verified"},"banned":{"type":"boolean","title":"Banned"},"workspace_count":{"type":"integer","title":"Workspace Count"},"workspaces":{"items":{"type":"string"},"type":"array","title":"Workspaces"},"events_last_7d":{"type":"integer","title":"Events Last 7D"},"last_activity_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Activity At"}},"type":"object","required":["id","email","name","email_verified","banned","workspace_count","workspaces","events_last_7d"],"title":"AdminUserOut"},"AdminWorkspaceOut":{"properties":{"id":{"type":"string","title":"Id"},"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"tier":{"type":"string","title":"Tier"},"owner_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Email"},"member_count":{"type":"integer","title":"Member Count"},"service_area_count":{"type":"integer","title":"Service Area Count"},"property_count":{"type":"integer","title":"Property Count"},"active_assignment_count":{"type":"integer","title":"Active Assignment Count"},"open_task_count":{"type":"integer","title":"Open Task Count"},"strikes_last_7d":{"type":"integer","title":"Strikes Last 7D"},"events_last_7d":{"type":"integer","title":"Events Last 7D"},"last_activity_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Activity At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","slug","name","tier","member_count","service_area_count","property_count","active_assignment_count","open_task_count","strikes_last_7d","events_last_7d","created_at"],"title":"AdminWorkspaceOut"},"AdminYearBuiltFocusOut":{"properties":{"present":{"type":"integer","title":"Present"},"total":{"type":"integer","title":"Total"},"pct":{"type":"number","title":"Pct"},"score_uses_year_built":{"type":"integer","title":"Score Uses Year Built"},"stale_score_count":{"type":"integer","title":"Stale Score Count"},"enrichment_queue":{"type":"integer","title":"Enrichment Queue"}},"type":"object","required":["present","total","pct","score_uses_year_built","stale_score_count","enrichment_queue"],"title":"AdminYearBuiltFocusOut"},"AgentIdentityOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"kind":{"type":"string","title":"Kind"},"org_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Org Id"},"delegated_user_email":{"type":"string","title":"Delegated User Email"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"workspace":{"type":["object","null"],"description":"Bound workspace identity and entitlement fields"},"expires_at":{"type":["string","null"],"format":"date-time"},"access_active":{"type":"boolean"},"owner_setup_url":{"type":"string"},"billing_url":{"type":["string","null"]},"documentation_url":{"type":"string"}},"type":"object","required":["id","name","kind","org_id","delegated_user_email","scopes"],"title":"AgentIdentityOut"},"BuildingListItemOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"address":{"type":"string","title":"Address"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"zip_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip Code"},"county":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"County"},"lat":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lat"},"lng":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lng"},"owner_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Name"},"owner_mailing_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Mailing Address"},"is_absentee_owner":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Absentee Owner"},"assessed_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Assessed Value"},"year_built":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year Built"},"building_area_sqft":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Building Area Sqft"},"occupancy_class":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Occupancy Class"},"place_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Place Display Name"},"place_primary_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Place Primary Type"},"place_primary_type_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Place Primary Type Display Name"},"place_website_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Place Website Uri"},"place_national_phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Place National Phone Number"},"roof_material":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Roof Material"},"roof_area_sqft":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Roof Area Sqft"},"estimated_roof_squares":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Estimated Roof Squares"},"estimated_roof_age":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Estimated Roof Age"},"years_remaining":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Years Remaining"},"opportunity_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Opportunity Score"},"insurance_concern_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Insurance Concern Score"},"storm_exposure_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Storm Exposure Score"},"confidence_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence Score"},"urgency_tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Urgency Tier"},"crm_assigned_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Crm Assigned Email"},"crm_stage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Crm Stage"},"market_rank_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Market Rank Pct"},"market_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Market Size"},"market_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Market Name"}},"type":"object","required":["id","address"],"title":"BuildingListItemOut"},"BuildingListOut":{"properties":{"total":{"type":"integer","title":"Total"},"total_is_exact":{"type":"boolean","title":"Total Is Exact","default":true},"buildings":{"items":{"$ref":"#/components/schemas/BuildingListItemOut"},"type":"array","title":"Buildings"}},"type":"object","required":["total","buildings"],"title":"BuildingListOut"},"BuildingOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"address":{"type":"string","title":"Address"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"zip_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip Code"},"county":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"County"},"lat":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lat"},"lng":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lng"},"owner_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Name"},"owner_mailing_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Mailing Address"},"is_absentee_owner":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Absentee Owner"},"assessed_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Assessed Value"},"year_built":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year Built"},"building_area_sqft":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Building Area Sqft"},"occupancy_class":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Occupancy Class"},"place_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Place Display Name"},"place_primary_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Place Primary Type"},"place_primary_type_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Place Primary Type Display Name"},"place_website_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Place Website Uri"},"place_national_phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Place National Phone Number"},"roof_material":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Roof Material"},"roof_area_sqft":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Roof Area Sqft"},"estimated_roof_squares":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Estimated Roof Squares"},"estimated_roof_age":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Estimated Roof Age"},"years_remaining":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Years Remaining"},"opportunity_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Opportunity Score"},"insurance_concern_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Insurance Concern Score"},"storm_exposure_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Storm Exposure Score"},"confidence_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence Score"},"urgency_tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Urgency Tier"},"crm_assigned_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Crm Assigned Email"},"crm_stage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Crm Stage"},"market_rank_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Market Rank Pct"},"market_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Market Size"},"market_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Market Name"},"estimated_roof_install_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Estimated Roof Install Year"},"expected_useful_life_years":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expected Useful Life Years"},"field_confidence":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Field Confidence"},"score_breakdown":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Score Breakdown"},"scored_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scored At"},"last_refreshed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Refreshed At"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","address"],"title":"BuildingOut"},"CRMAssignmentStageUpdateIn":{"properties":{"stage":{"type":"string","enum":["lead","not_home","contacted","appointment","inspected","quoted","sold","not_interested","lost"],"title":"Stage","description":"New pipeline stage."}},"type":"object","required":["stage"],"title":"CRMAssignmentStageUpdateIn"},"CRMBuildingAssignmentOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"building_id":{"type":"string","format":"uuid","title":"Building Id"},"assigned_operator_user_id":{"type":"string","title":"Assigned Operator User Id"},"assigned_operator_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned Operator Email"},"assigned_by_operator_user_id":{"type":"string","title":"Assigned By Operator User Id"},"assigned_by_operator_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned By Operator Email"},"assigned_at":{"type":"string","format":"date-time","title":"Assigned At"},"released_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Released At"},"released_by_operator_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Released By Operator User Id"},"released_by_operator_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Released By Operator Email"},"stage":{"type":"string","enum":["lead","not_home","contacted","appointment","inspected","quoted","sold","not_interested","lost"],"title":"Stage"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","building_id","assigned_operator_user_id","assigned_by_operator_user_id","assigned_at","stage","created_at"],"title":"CRMBuildingAssignmentOut"},"CRMBuildingNoteCreateIn":{"properties":{"body":{"type":"string","maxLength":10000,"minLength":1,"title":"Body","description":"Note text for the team."},"client_mutation_id":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Client Mutation Id","description":"Client id that makes a retried note return the original; agent requests default it to the Idempotency-Key."}},"type":"object","required":["body"],"title":"CRMBuildingNoteCreateIn"},"CRMBuildingNoteOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"building_id":{"type":"string","format":"uuid","title":"Building Id"},"author_operator_user_id":{"type":"string","title":"Author Operator User Id"},"author_operator_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author Operator Email"},"body":{"type":"string","title":"Body"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","building_id","author_operator_user_id","body","created_at","updated_at"],"title":"CRMBuildingNoteOut"},"CRMBuildingSummaryOut":{"properties":{"assignment":{"anyOf":[{"$ref":"#/components/schemas/CRMBuildingAssignmentOut"},{"type":"null"}]},"notes":{"items":{"$ref":"#/components/schemas/CRMBuildingNoteOut"},"type":"array","title":"Notes"},"tasks":{"items":{"$ref":"#/components/schemas/CRMBuildingTaskOut"},"type":"array","title":"Tasks"}},"type":"object","required":["notes","tasks"],"title":"CRMBuildingSummaryOut"},"CRMBuildingTaskOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"building_id":{"type":"string","format":"uuid","title":"Building Id"},"title":{"type":"string","title":"Title"},"details":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Details"},"status":{"type":"string","enum":["open","in_progress","done"],"title":"Status"},"due_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Due At"},"assigned_operator_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned Operator User Id"},"assigned_operator_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned Operator Email"},"created_by_operator_user_id":{"type":"string","title":"Created By Operator User Id"},"created_by_operator_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Operator Email"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","building_id","title","status","created_by_operator_user_id","created_at","updated_at"],"title":"CRMBuildingTaskOut"},"CRMPipelineEntryOut":{"properties":{"assignment_id":{"type":"string","format":"uuid","title":"Assignment Id"},"building_id":{"type":"string","format":"uuid","title":"Building Id"},"address":{"type":"string","title":"Address"},"owner_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Name"},"urgency_tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Urgency Tier"},"opportunity_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Opportunity Score"},"assigned_operator_user_id":{"type":"string","title":"Assigned Operator User Id"},"assigned_operator_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned Operator Email"},"stage":{"type":"string","enum":["lead","not_home","contacted","appointment","inspected","quoted","sold","not_interested","lost"],"title":"Stage"},"assigned_at":{"type":"string","format":"date-time","title":"Assigned At"},"market_rank_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Market Rank Pct"},"market_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Market Size"},"market_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Market Name"}},"type":"object","required":["assignment_id","building_id","address","assigned_operator_user_id","stage","assigned_at"],"title":"CRMPipelineEntryOut"},"CoverageCheckIn":{"properties":{"location":{"type":"string","maxLength":300,"minLength":2,"title":"Location","description":"City, ZIP or street address."},"region_hint":{"anyOf":[{"type":"string","maxLength":2,"minLength":2},{"type":"null"}],"title":"Region Hint","description":"Two-letter state code that disambiguates the location."}},"type":"object","required":["location"],"title":"CoverageCheckIn"},"CoverageCheckOut":{"properties":{"supported":{"type":"boolean","title":"Supported"},"location":{"type":"string","title":"Location"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"state_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State Code"},"county":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"County"},"lat":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lat"},"lng":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lng"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"readiness":{"type":"string","enum":["ready","preparing","unavailable"],"title":"Readiness"},"nearby_property_count":{"type":"integer","title":"Nearby Property Count","default":0},"supported_states":{"items":{"type":"string"},"type":"array","title":"Supported States"}},"type":"object","required":["supported","location","readiness","supported_states"],"title":"CoverageCheckOut"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"MarketingAdCommentIn":{"properties":{"body":{"type":"string","maxLength":2000,"minLength":1,"title":"Body","description":"Comment text."}},"additionalProperties":false,"type":"object","required":["body"],"title":"MarketingAdCommentIn"},"MarketingAdMutationOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"type":"string","title":"Status"}},"type":"object","required":["id","status"],"title":"MarketingAdMutationOut"},"MarketingAdOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"provider":{"type":"string","title":"Provider"},"campaign_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign Name"},"ad_group_name":{"type":"string","title":"Ad Group Name"},"name":{"type":"string","title":"Name"},"status":{"type":"string","title":"Status"},"effective_status":{"type":"string","title":"Effective Status"},"review_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Review Status"},"title":{"type":"string","title":"Title"},"body":{"type":"string","title":"Body"},"target_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Url"},"management_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Management Url"},"source_updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Source Updated At"},"revisions":{"items":{"$ref":"#/components/schemas/MarketingAdRevisionOut"},"type":"array","title":"Revisions"}},"type":"object","required":["id","provider","campaign_name","ad_group_name","name","status","effective_status","review_status","title","body","target_url","management_url","source_updated_at","revisions"],"title":"MarketingAdOut"},"MarketingAdRevisionCommentOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"author_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author Email"},"body":{"type":"string","title":"Body"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","author_email","body","created_at"],"title":"MarketingAdRevisionCommentOut"},"MarketingAdRevisionEventOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"action":{"type":"string","title":"Action"},"actor_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor Email"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","action","actor_email","detail","created_at"],"title":"MarketingAdRevisionEventOut"},"MarketingAdRevisionIn":{"properties":{"title":{"type":"string","maxLength":50,"minLength":1,"title":"Title","description":"Proposed ad headline, up to 50 characters."},"body":{"type":"string","maxLength":100,"minLength":1,"title":"Body","description":"Proposed ad body copy, up to 100 characters."},"target_url":{"type":"string","maxLength":2000,"minLength":1,"title":"Target Url","description":"Landing page URL for the ad."},"note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Note","description":"Why this change, for the human reviewer."}},"additionalProperties":false,"type":"object","required":["title","body","target_url"],"title":"MarketingAdRevisionIn"},"MarketingAdRevisionOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"type":"string","title":"Status"},"title":{"type":"string","title":"Title"},"body":{"type":"string","title":"Body"},"target_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Url"},"created_by_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Email"},"reviewed_by_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewed By Email"},"reviewed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reviewed At"},"published_by_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Published By Email"},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Published At"},"provider_error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Error Code"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"can_edit":{"type":"boolean","title":"Can Edit"},"comments":{"items":{"$ref":"#/components/schemas/MarketingAdRevisionCommentOut"},"type":"array","title":"Comments"},"events":{"items":{"$ref":"#/components/schemas/MarketingAdRevisionEventOut"},"type":"array","title":"Events"}},"type":"object","required":["id","status","title","body","target_url","created_by_email","reviewed_by_email","reviewed_at","published_by_email","published_at","provider_error_code","created_at","updated_at","can_edit","comments","events"],"title":"MarketingAdRevisionOut"},"MarketingAdsOut":{"properties":{"can_publish":{"type":"boolean","title":"Can Publish"},"ads":{"items":{"$ref":"#/components/schemas/MarketingAdOut"},"type":"array","title":"Ads"}},"type":"object","required":["can_publish","ads"],"title":"MarketingAdsOut"},"SalesProspectListOut":{"properties":{"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"summary":{"$ref":"#/components/schemas/SalesProspectSummaryOut"},"prospects":{"items":{"$ref":"#/components/schemas/SalesProspectOut"},"type":"array","title":"Prospects"}},"type":"object","required":["generated_at","summary","prospects"],"title":"SalesProspectListOut"},"SalesProspectOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"company_name":{"type":"string","title":"Company Name"},"website_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website Url"},"company_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Domain"},"primary_contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Contact Name"},"primary_contact_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Contact Title"},"primary_contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Contact Email"},"primary_contact_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Contact Phone"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"county":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"County"},"state_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State Code"},"service_area_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Area Notes"},"business_focus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Focus"},"team_size_estimate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Size Estimate"},"research_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Research Notes"},"fit_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fit Notes"},"personalization_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Personalization Notes"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"},"source_kind":{"type":"string","title":"Source Kind"},"source_record_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Record Id"},"stage":{"type":"string","enum":["researching","ready","contacted","engaged","demo","trial","proposal","nurture","won","lost","do_not_contact"],"title":"Stage"},"fit_rating":{"anyOf":[{"type":"string","enum":["strong","possible","weak"]},{"type":"null"}],"title":"Fit Rating"},"owner_operator_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Operator User Id"},"owner_operator_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Operator Email"},"last_contacted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Contacted At"},"next_action_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Action At"},"next_action_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Action Kind"},"converted_org_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Converted Org Id"},"closed_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Closed Reason"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"data_coverage_status":{"type":"string","enum":["ready","available","not_loaded","unknown"],"title":"Data Coverage Status","default":"unknown"},"data_property_count":{"type":"integer","title":"Data Property Count","default":0},"data_high_priority_count":{"type":"integer","title":"Data High Priority Count","default":0},"data_market_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data Market Label"}},"type":"object","required":["id","company_name","source_kind","stage","created_at","updated_at"],"title":"SalesProspectOut"},"SalesProspectSummaryOut":{"properties":{"total":{"type":"integer","title":"Total"},"overdue":{"type":"integer","title":"Overdue"},"due_soon":{"type":"integer","title":"Due Soon"},"without_next_action":{"type":"integer","title":"Without Next Action"},"contacted_7d":{"type":"integer","title":"Contacted 7D"},"won":{"type":"integer","title":"Won"},"data_ready":{"type":"integer","title":"Data Ready"},"data_available":{"type":"integer","title":"Data Available"},"data_not_loaded":{"type":"integer","title":"Data Not Loaded"},"data_unknown":{"type":"integer","title":"Data Unknown"}},"type":"object","required":["total","overdue","due_soon","without_next_action","contacted_7d","won","data_ready","data_available","data_not_loaded","data_unknown"],"title":"SalesProspectSummaryOut"},"ServiceAreaCreateIn":{"properties":{"name":{"type":"string","maxLength":200,"minLength":2,"title":"Name","description":"Display name for the service area."},"location":{"type":"string","maxLength":300,"minLength":2,"title":"Location","description":"City, ZIP or street address."},"radius_miles":{"type":"number","maximum":100,"minimum":1,"title":"Radius Miles","default":12,"description":"Radius around the location, in miles."},"region_hint":{"anyOf":[{"type":"string","maxLength":2,"minLength":2},{"type":"null"}],"title":"Region Hint","description":"Two-letter state code that disambiguates the location."},"allow_unsupported":{"type":"boolean","title":"Allow Unsupported","default":false,"description":"Create the area where property data is not live yet; storm tracking still works there."}},"type":"object","required":["name","location"],"title":"ServiceAreaCreateIn"},"ServiceAreaListOut":{"properties":{"service_areas":{"items":{"$ref":"#/components/schemas/ServiceAreaOut"},"type":"array","title":"Service Areas"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"can_manage":{"type":"boolean","title":"Can Manage","description":"Whether this caller may draw, change, assign or delete territories (owners, admins and sales managers)."}},"type":"object","required":["service_areas","limit","can_manage"],"title":"ServiceAreaListOut"},"ServiceAreaOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"org_id":{"type":"string","format":"uuid","title":"Org Id"},"name":{"type":"string","title":"Name"},"location_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location Display Name"},"center_lat":{"type":"number","title":"Center Lat"},"center_lng":{"type":"number","title":"Center Lng"},"shape":{"type":"string","enum":["circle","drawn"],"title":"Shape","description":"circle from a location and radius, or drawn as an outline on the map."},"radius_miles":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Radius Miles","description":"Radius of a circle; null for a drawn area."},"reach_miles":{"type":"number","title":"Reach Miles","description":"Distance from the center to the farthest edge, in miles."},"area_square_miles":{"type":"number","title":"Area Square Miles"},"acres":{"type":"number","title":"Acres"},"assigned_user_ids":{"items":{"type":"string"},"type":"array","title":"Assigned User Ids","description":"Members assigned to work this territory."},"assigned_to_me":{"type":"boolean","title":"Assigned To Me"},"geometry":{"additionalProperties":true,"type":"object","title":"Geometry"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"seed_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Seed Status"},"seed_building_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed Building Count"},"seed_radius_miles":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Seed Radius Miles"},"seed_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Seed Error"},"seed_attempts":{"type":"integer","title":"Seed Attempts","default":0},"seed_requested_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Seed Requested At"},"seed_started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Seed Started At"},"seed_completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Seed Completed At"}},"type":"object","required":["id","org_id","name","center_lat","center_lng","shape","radius_miles","reach_miles","area_square_miles","acres","assigned_user_ids","assigned_to_me","geometry","created_at","updated_at"],"title":"ServiceAreaOut"},"StrikeBuildingOut":{"properties":{"strike_building_id":{"type":"string","format":"uuid","title":"Strike Building Id"},"rank":{"type":"integer","title":"Rank"},"strike_opportunity_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Strike Opportunity Score"},"expected_hail_inches":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Expected Hail Inches"},"roof_hail_inches":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Roof Hail Inches","description":"Radar-estimated hail in the building's own MRMS cell. expected_hail_inches is the evidence that listed it: radar within 1,200 m or a report within 5 miles. Null below 0.5 in and for report-based lists."},"strike_status":{"type":"string","title":"Strike Status"},"outreach_ready":{"type":"boolean","title":"Outreach Ready","default":false},"outreach_drafted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Outreach Drafted At"},"id":{"type":"string","format":"uuid","title":"Id"},"address":{"type":"string","title":"Address"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"zip_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip Code"},"county":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"County"},"lat":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lat"},"lng":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lng"},"owner_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Name"},"assessed_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Assessed Value"},"year_built":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year Built"},"building_area_sqft":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Building Area Sqft"},"occupancy_class":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Occupancy Class"},"roof_material":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Roof Material"},"roof_area_sqft":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Roof Area Sqft"},"estimated_roof_age":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Estimated Roof Age"},"years_remaining":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Years Remaining"},"opportunity_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Opportunity Score"},"insurance_concern_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Insurance Concern Score"},"storm_exposure_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Storm Exposure Score"},"confidence_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence Score"},"urgency_tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Urgency Tier"},"market_rank_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Market Rank Pct"},"market_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Market Size"},"market_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Market Name"},"route_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Route Order"},"route_leg_miles":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Route Leg Miles"},"route_cumulative_miles":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Route Cumulative Miles"},"route_cumulative_minutes":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Route Cumulative Minutes"}},"type":"object","required":["strike_building_id","rank","strike_status","id","address"],"title":"StrikeBuildingOut"},"StrikeDetailOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"service_area_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Service Area Id"},"service_area_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Area Name"},"source":{"type":"string","title":"Source","default":"storm"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"status":{"type":"string","title":"Status"},"storm_started_at":{"type":"string","format":"date-time","title":"Storm Started At"},"storm_ended_at":{"type":"string","format":"date-time","title":"Storm Ended At"},"max_hail_inches":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Hail Inches"},"max_wind_mph":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Wind Mph"},"event_count":{"type":"integer","title":"Event Count"},"building_count":{"type":"integer","title":"Building Count"},"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"lead_focus":{"type":"string","title":"Lead Focus","default":"balanced"},"buildings":{"items":{"$ref":"#/components/schemas/StrikeBuildingOut"},"type":"array","title":"Buildings"},"route":{"$ref":"#/components/schemas/StrikeRouteOut"}},"type":"object","required":["id","status","storm_started_at","storm_ended_at","event_count","building_count","generated_at","buildings","route"],"title":"StrikeDetailOut"},"StrikeListItemOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"service_area_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Service Area Id"},"service_area_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Area Name"},"source":{"type":"string","title":"Source","default":"storm"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"status":{"type":"string","title":"Status"},"storm_started_at":{"type":"string","format":"date-time","title":"Storm Started At"},"storm_ended_at":{"type":"string","format":"date-time","title":"Storm Ended At"},"max_hail_inches":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Hail Inches"},"max_wind_mph":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Wind Mph"},"event_count":{"type":"integer","title":"Event Count"},"building_count":{"type":"integer","title":"Building Count"},"generated_at":{"type":"string","format":"date-time","title":"Generated At"}},"type":"object","required":["id","status","storm_started_at","storm_ended_at","event_count","building_count","generated_at"],"title":"StrikeListItemOut"},"StrikeListOut":{"properties":{"strikes":{"items":{"$ref":"#/components/schemas/StrikeListItemOut"},"type":"array","title":"Strikes"}},"type":"object","required":["strikes"],"title":"StrikeListOut"},"StrikeRouteOut":{"properties":{"total_miles":{"type":"number","title":"Total Miles"},"total_minutes":{"type":"number","title":"Total Minutes"},"geojson_line":{"additionalProperties":true,"type":"object","title":"Geojson Line"},"skipped_building_ids":{"items":{"type":"string"},"type":"array","title":"Skipped Building Ids"}},"type":"object","required":["total_miles","total_minutes","geojson_line","skipped_building_ids"],"title":"StrikeRouteOut"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"AgentBearer":{"type":"http","scheme":"bearer","bearerFormat":"rp_live_*"}}}}