v1
latestOpenAPI 3.0.12026-07-22120163333.7 KBLeads
Create Lead
Lead Assignment & Routing
Assignment priority:
- If assignedUserId is provided, the lead is directly assigned to that agent. No routing rules are applied.
- If assignedUserId is empty or omitted, the lead goes through automatic lead routing based on the configured routing rules.
Routing rule scope (when routing is triggered):
- assignGroupId = -1 → Apply company-level routing rules.
- assignGroupId = <officeId> → Apply routing rules for the specified office.
- assignGroupId not set → Default routing rules will be applied according to the lead’s ownership scope.
Routing location matching:
- For Seller (1) type leads, routing is determined by the property field (property address/location).
- For all other lead types (Buyer, Renter, etc.), routing is determined by inquiry.locations[] (interested areas).
Lead Ownership
Controls the visibility scope of the lead:
- ownershipScope = TEAM → Account-wide: visible to all users in this Lofty client account.
- ownershipScope = OFFICE → Visible to a specific office. Must provide ownershipId with the office ID.
- ownershipScope = PERSONAL → Visible only to the assigned agent. Must provide ownershipId with the agent's user ID.
- If not specified, defaults to PERSONAL scope owned by the API caller.
Note: ownershipScope = TEAM refers to the entire client account (the organization), not the Lofty "Team add-on" product.
Eventual consistency
Persistence is asynchronous. The lead ID is returned immediately, but subsequent GET /v1.0/leads/{leadId} and similar read endpoints may briefly return 404 right after create. Follow-up writes (PUT, POST inquiry, POST property, POST transaction) are unaffected.
Property block
The optional property block is persisted together with the lead:
- Omit it entirely if you don't need to attach an address — the lead is still created.
- If provided, at least one of city, state, zipCode, streetAddress must be non-blank; otherwise the request is rejected with 200057 PROPERTY_ADDRESS_EMPTY and no lead is created.
post/v1.0/leads
Headers
Authorizationstring required
Bearer [access_token]
Content-Typestring required
application/json
Request body
Example request
{
"firstName": "Bob",
"lastName": "Li",
"emails": [
"jane.doe@example.com",
"jdoe-work@company.com"
],
"phones": [
"+14155551234",
"+12125559876"
],
"leadTypes": [
2,
5
],
"assignedUserId": 10000000514,
"streetAddress": "The White House,1600 Pennsylvania Avenue NW",
"city": "Washington DC",
"state": "Washington DC",
"zipCode": "20500",
"referredBy": "Jeremy Kelly",
"stage": "Pending",
"groups": [
"VIP Clients",
"Open House Feb"
],
"segments": [
"First-Time Buyers",
"Downtown Area"
],
"tags": [
"Hot Lead",
"Zillow"
],
"tagsAdd": [
"Referral",
"Pre-Approved"
],
"source": "Open House",
"inquiry": {
"priceMin": 1,
"priceMax": 10000000,
"propertyType": [
"Single Family Home",
"Condo"
],
"bedroomsMin": 1,
"bathroomsMin": "1",
"locations": [
{
"city": "Austin",
"stateCode": "TX"
}
]
},
"property": {
"price": 100000,
"state": "California",
"city": "New York",
"streetAddress": "22348 Regnart RD",
"zipCode": "25401",
"propertyType": "Single Family Home",
"bedrooms": 3,
"bathrooms": 2,
"squareFeet": 100,
"lotSize": 26.33,
"parkingSpace": 1,
"floors": 1,
"priceMax": 10000000,
"priceMin": 100000
},
"customAttributeList": [
{
"attributeType": "number, text, date, anniversary_date, single_select, multi_select, percentage, currency"
}
],
"birthday": "Jun 5, 2001",
"buyingTimeFrame": "6-12",
"preQual": "Yes",
"houseToSell": "Yes",
"fthb": "Yes",
"withBuyerAgent": "Yes",
"sellingTimeFrame": "1-3",
"mortgage": "Yes",
"buyHouse": "Yes",
"withListingAgent": "Yes",
"leadTransaction": {
"created": 1518078026000,
"updated": 1518078026000,
"transactionId": 10001,
"transactionName": "123 Main St",
"leadName": "Bob",
"assignedAgent": 100001,
"transactionType": "Purchase",
"homePrice": 1000000,
"transactionStatus": "Pre-contract",
"expectedCloseDate": 1508580010000,
"closeDate": 1508580010000,
"commissionRate": 3,
"gci": 5000,
"teamRevenue": 1000,
"agentRevenue": 4000,
"appointmentDate": 1508580010000,
"agreementSignedDate": 1508580010000,
"offerDate": 1508580010000,
"contractDate": 1508580010000,
"appraisalDate": 1508580010000,
"homeInspectionDate": 1508580010000,
"escrowDate": 1508580010000,
"expiration": 1508580010000
},
"leadFamilyMemberList": [
{
"phones": [
"+14155551234"
],
"emails": [
"spouse@example.com"
]
}
],
"language": "en",
"content": "example_note"
}Response
Lead created.
Example response
{
"leadId": 651095960136641
}