Skip to content

API Schemas

Create Lead

Field Type Required Constraints
contact_name string min length: 1; max length: 200
contact_email pipeline
phone_primary pipeline
phone_secondary effects
preferred_contact enum values: phone, email, text, any
property_street string max length: 500
property_city string max length: 200
property_state string max length: 100
property_zip string max length: 20
property_type enum values: single_family, multi_family, townhouse, condo, commercial, other
property_lat number min: -90; max: 90
property_lng number min: -180; max: 180
project_types array
project_scope string max length: 200
urgency enum values: asap, within_2_weeks, within_month, flexible
insurance_claim string
booking_json string
preferred_contact_times array
referral_id string
utm_json string
raw_payload string
email_opt_in number integer; min: 0; max: 1

Update Lead

Field Type Required Constraints
contact_name string min length: 1; max length: 200
contact_email pipeline
phone_primary pipeline
phone_secondary effects
preferred_contact enum values: phone, email, text, any
property_street string max length: 500
property_city string max length: 200
property_state string max length: 100
property_zip string max length: 20
property_type enum values: single_family, multi_family, townhouse, condo, commercial, other
property_lat number min: -90; max: 90
property_lng number min: -180; max: 180
project_types array
project_scope string max length: 200
urgency enum values: asap, within_2_weeks, within_month, flexible
insurance_claim string
status enum values: pending, dnf, needs_initial_outreach, call_scheduled, onsite_scheduled, onsite_completed_pending_next_step, quote_sent, completed, expired, rejected
next_followup_at string
email_opt_in number integer; min: 0; max: 1

Create Customer

Field Type Required Constraints
contact_name string min length: 1; max length: 200
contact_email pipeline
phone_primary pipeline
phone_secondary effects
preferred_contact enum values: phone, email, text, any
property_street string max length: 500
property_city string max length: 200
property_state string max length: 100
property_zip string max length: 20
property_lat number min: -90; max: 90
property_lng number min: -180; max: 180
notes string max length: 5000
converted_from_lead_id string
email_opt_in number integer; min: 0; max: 1

Create Project

Field Type Required Constraints
customer_id string
lead_id string
title string min length: 1; max length: 200
description string max length: 5000
status enum values: pending, active, completed, on_hold
estimated_value number min: 0
priority enum values: low, normal, high
start_date string
end_date string

Create Estimate

Field Type Required Constraints

Login

Field Type Required Constraints
email string email format
password string min length: 8

Register

Field Type Required Constraints
email string email format
password string min length: 8; max length: 128
name string min length: 1; max length: 200
company_name string min length: 1; max length: 200
company_slug string min length: 2; max length: 50; pattern: /^[a-z0-9-]+$/