Leads API
Endpoints
Create Lead
POST /api/leads
Authorization: Bearer <jwt>
Content-Type: application/jsonRequest Body:
| Field | Type | Required | Description |
|---|---|---|---|
name | string | ✓ | Lead’s full name |
email | string | ✓ | Email address |
phone | string | Phone number | |
source | portal|referral|direct|social|manual | ✓ | Lead source |
listing_id | uuid | Associated listing (if known) | |
notes | string | Initial notes |
Get Lead
GET /api/dashboard/leads/[id]
Authorization: Bearer <jwt>Update Lead
PATCH /api/dashboard/leads/[id]
Authorization: Bearer <jwt>
Content-Type: application/jsonPatchable fields: status, notes, next_contact_at, listing_id
Claim Lead
POST /api/leads/[id]/claim
Authorization: Bearer <jwt>Returns 409 if already claimed.
Convert Lead to Deal
POST /api/dashboard/leads/[id]/convert
Authorization: Bearer <jwt>
Content-Type: application/json
{ "listing_id": "uuid", "initial_stage": "new" }Lead Status Values
| Status | Description |
|---|---|
new | Freshly created, unclaimed |
claimed | Assigned to an agent |
contacted | First contact made |
qualified | Buyer/seller intent confirmed |
converted | Deal created |
dead | No longer active |
Last updated on