HomeLight Partner API Documentation

HomeLight's API is centered around providing access to create leads in the HomeLight system.

Working with HomeLight's API

Before making any calls to the API you will need to acquire an API secret and token to be sent in with every request. To do so please reach out to your partnership point of contact or email support@homelight.com.

Environments

Test

https://staging.homelight.com
https://demo.homelight.com

Production

https://www.homelight.com

Endpoints

Creating a New Lead

Request

POST https://staging.homelight.com/api/partner_lead/v2

Parameters

NameTypeDescription
secretstringRequired. The secret key provided to you when you signed up for access to the HomeLight API.
tokenstringRequired. The secret token provided to you when you signed up for access to the HomeLight API.
leadsarrayRequired. An array of lead objects representing the leads to be created. See Lead Attributes section below for full definition of the lead object.

Lead Attributes

NameTypeDescription
addressstringRequired if the user_type is "seller". The street address for a seller's house.
citystringRequired if zip_code and county is NULL. The city the client is looking to transact in. In format “City Name, State Abbreviation”. Ex. “San Francisco, CA”
zip_codestringRequired if city and county is NULL. Zip code of the house being bought or sold
countystringRequired if city and zip_code is NULL. County of the house being bought or sold. In the format of "County Name, State Abreviation". Ex. "San Francisco County, CA"
emailstringRequired. The client’s primary email address.
phonestringRequired. The client's primary phone number, with or without formating.
user_typestringRequired. In list ["buyer", "seller"]
namestringRequired. Full name of the client
priceintegerHighly Recommended. The price the client wants to buy or sell for.
property_typestringHighly Recommended. The type of property the client wants to buy or sell. In the following list ["single_family_home", "condominium", "townhomes", "tenancy_in_common", "coop", "mobile", "multi_family", "land", "commercial", "other", "rental", "not_sure"]
timelinestringHighly Recommended. When is the client looking to transact. Value in ["asap", "2_months", "6_months", "10_months", "1_year", "unsure"]
already_has_agentbooleanAn indication of whether the client is in already working with an agent
interested_in_agentbooleanWhether the client wants to be connected with an agent
bankruptcybooleanIf the seller is in bankruptcy
bathsintegerThe number of bathrooms in the house being sold, or number of desired bathrooms for buying
bedsintegerThe number of bedrooms in the house being sold, or number of desired bedrooms for buying
client_notesstringAny additional information the client wants us to know
credit_ratingintegerAn approximate credit score for the client
down_paymentfloatPlanned down payment percent
email_altstringThe clients secondary email address
house_underwaterbooleanIf the seller's house is underwater
incomeintegerApproximate income of the client
intro_requestsstringOptional. Comma separated list Agent's external_id (preferred agents - up to 3)
ipstringAddress of the client
most_importantstringMost important aspect of an agent in list of value ["experience", "top_dollar", "finds_bargains", "availability", "sells_fast"])
phone_altstringThe client's secondary phone number, with or without formatting
prequalifiedbooleanIf the buyer is prequalified for a mortgage
sell_reasonstringReason for selling current house
short_salebooleanIs the house being sold as part of a short sale
source_formstringThe form that generated the lead
source_page_typestringThe page type that generate the lead
square_footageintegerNumber of square feet in current house or desired house
supplimental_datajsonAdditional data which doesn't belong in any other field here
timeframestringBest time for an agent to contact the client
utm_campaignstringReach out to your partnership point of contact or email support@homelight.com for this field
utm_contentstringReach out to your partnership point of contact or email support@homelight.com for this field
utm_mediumstringReach out to your partnership point of contact or email support@homelight.com for this field
utm_sourcestringReach out to your partnership point of contact or email support@homelight.com for this field
utm_termstringReach out to your partnership point of contact or email support@homelight.com for this field

Response Body

{ "summary": { "failed_lead_indexes": [], "invalid_lead_indexes": [0], "leads_accepted": 1, "leads_rejected": 1, "leads_submitted": 2 }, "leads": [ { "name": "Finn Mertens", "accepted": true }, { "name": "John DiMaggio", "accepted": false, "reason": "invalid lead format, see documentation for correct format" } ] }
NameTypeDescription
summaryobjectAn object containing a high level summary of the results of the call.
summary.leads_submittedintegerThe number of leads submitted in the request object.
summary.leads_rejectedintegerThe number of leads rejected.
summary.leads_acceptedintegerThe number of leads accepted.
summary.invalid_lead_indexesarrayAn array of index numbers for leads that failed for validation reasons. You can use this to look up the leads in the response object. The indexes will likely match the input lead indexes, but this is not guaranteed so it is recommended to verify the lead by checking the name attribute.
summary.failed_lead_indexesarrayAn array of index numbers for leads that failed for non-validation reasons. You can use this to look up the leads in the response object. The indexes will likely match the input lead indexes, but this is not guaranteed so it is recommended to verify the lead by checking the name attribute. These type of exceptions should be rare and you may need to contact support@homelight.com.
leadsarrayAn array of lead objects representing the result of each individual lead.
lead.namestringThe inputed name field for this lead. It is only returned to help find a particular lead in the inputed values. Must include first and last name.
lead.acceptedbooleanA boolean value (true or false) indicating if the lead was accepted into the HomeLight system. True means that the lead was accepted, false means that the lead was rejected.
lead.reasonstringThe reason for the failing to be accepted. Only present when lead.accepted is false.

Examples

Create 1 lead
Input Format: JSONcurl 'https://staging.homelight.com/api/partner_lead/v2' -H 'Content-Type: application/json' -H 'Accept: application/json' -X POST -d '{'secret':'secret','token':'token','leads':[{'city':'San Francisco, CA','email':'daniel@homelight.com','name':'Daniel Duke','phone':'214.336.0515','price':'123456','property_type':'single_family_home','user_type':'buyer'}]}'Output Format: JSON{"summary":{"failed_lead_indexes":[],"invalid_lead_indexes":[],"leads_accepted":1,"leads_rejected":0,"leads_submitted":1},"leads":[{"name":"Daniel Duke","accepted":true}]}
Create 1 lead with 2 preferred agents (intro_request)
Input Format: JSONcurl "https://staging.homelight.com/api/partner_lead/v2" -H "Content-Type: application/json" -H "Accept: application/xml" -X POST -d '{"secret":"secret","token":"token","leads":[{"city":"San Antonio, TX","email":"mark@homelight.com","name":"Mark Johnson","phone":"972.288.6865","price":"300500","property_type":"single_family_home","user_type":"seller","address":"888 OFarrell", "intro_request":"3b003636-a830-4a24-a7b3-fa26202df259,8a502980-66c2-4976-a173-f71e0c62d5ba"}]}'Output Format: JSON{"summary": {"failed_lead_indexes": [], "invalid_lead_indexes": [], "leads_accepted": 1, "leads_rejected": 0, "leads_submitted": 1 }, "leads": [{ "name": "Daniel Duke", "accepted": true }] }
Create 2 leads
Input Format: JSONcurl "https://staging.homelight.com/api/partner_lead/v2" -H "Content-Type: application/json" -H "Accept: application/xml" -X POST -d '{"secret":"secret","token":"token","leads":[{"city":"San Francisco, CA","email":"daniel@homelight.com","name":"Daniel Duke","phone":"214.336.0515","price":"123456","property_type":"single_family_home","user_type":"buyer"},{"city":"San Antonio, TX","email":"mark@homelight.com","name":"Mark Johnson","phone":"972.288.6865","price":"300500","property_type":"single_family_home","user_type":"seller","address":"888 OFarrell"}]}'Output Format: XML<?xml version='1.0' encoding='UTF-8'?><partner_lead_response_v2><summary><failed_lead_indexes type='array'/><invalid_lead_indexes type='array'/><leads_accepted type='integer'>2</leads_accepted><leads_rejected type='integer'>0</leads_rejected><leads_submitted type='integer'>2</leads_submitted></summary><leads type='array'><lead><name>Daniel Duke</name><accepted type='boolean'>true</accepted></lead><lead><name>Mark Johnson</name><accepted type='boolean'>true</accepted></lead></leads></partner_lead_response_v2>
Create 1 lead
Input Format: XMLcurl 'https://staging.homelight.com/api/partner_lead/v2' -H 'Content-Type: text/xml' -H 'Accept: application/json' -X POST -d '<?xml version="1.0" encoding="UTF-8"?><homelight-partner-lead-request><secret>secret</secret><token>token</token><leads type="array"><lead><city>San Francisco, CA</city><email>daniel@homelight.com</email><name>Daniel Duke</name><phone>214.336.0515</phone><price>123456</price><property-type>single_family_home</property-type><user-type>buyer</user-type></lead></leads></homelight-partner-lead-request>'Output Format: JSON{"summary":{"failed_lead_indexes":[],"invalid_lead_indexes":[],"leads_accepted":1,"leads_rejected":0,"leads_submitted":1},"leads":[{"name":"Daniel Duke","accepted":true}]}
Create 2 leads
Input Format: XMLcurl 'https://staging.homelight.com/api/partner_lead/v2' -H 'Content-Type: text/xml' -H 'Accept: application/xml' -X POST -d '<?xml version="1.0" encoding="UTF-8"?><homelight-partner-lead-request><secret>secret</secret><token>token</token><leads type="array"><lead><city>San Francisco, CA</city><email>daniel@homelight.com</email><name>Daniel Duke</name><phone>214.336.0515</phone><price>123456</price><property-type>single_family_home</property-type><user-type>buyer</user-type></lead><lead><city>San Antonio, TX</city><email>mark@homelight.com</email><name>Mark Johnson</name><phone>972.288.6865</phone><price>300500</price><property-type>condo</property-type><user-type>seller</user-type><address>888 OFarrell</address></lead></leads></homelight-partner-lead-request>'Output Format: XML<?xml version="1.0" encoding="UTF-8"?><partner_lead_response_v2><summary><failed_lead_indexes type="array"/><invalid_lead_indexes type="array"/><leads_accepted type="integer">2</leads_accepted><leads_rejected type="integer">0</leads_rejected><leads_submitted type="integer">2</leads_submitted></summary><leads type="array"><lead><name>Daniel Duke</name><accepted type="boolean">true</accepted></lead><lead><name>Mark Johnson</name><accepted type="boolean">true</accepted></lead></leads></partner_lead_response_v2>

Creating a Simple Sale Lead

Request

POST https://staging.homelight.com/leads/partner_simple_sale_lead

Parameters

NameTypeDescription
secretstringRequired. The secret key provided to you when you signed up for access to the HomeLight API.
tokenstringRequired. The token provided to you when you signed up for access to the HomeLight API.
leadobjectRequired. Lead object representing the lead to be created. See lead attributes below for full definition of the lead object.
lead.timelinestringRequired. Value in: [“asap”, “2_months”, “6_months”, “10_months”, “1_year”, "unsure"]
lead.property_typestringRequired. Value in: [“single_family_home”, “condominium”, “townhomes”, “other”]
lead.call_review_conditionstringRequired. Value in: [“Needs Nothing”, “Needs A Little Work”, “Needs Significant Work”, “Tear Down”]
lead.call_review_year_builtstringHighly Recommended. Value in: [“2000 or later”, “1990s”, “1980s”, “1970s”, “1960s”, “Before 1960”]
lead.call_review_interested_in_agentstringOptional. Value in: [true, false]
lead.sell_reasonstringRequired. Value in: [“Relocating To New Market”, “Buying/Selling Investment Property”, “Buying/Selling Vacation Property”, “Probate Property”, “Other”]
lead.full_namestringRequired. Client’s full name
lead.emailstringRequired. Client’s email
lead.phonestringRequired. Client’s primary phone number. With or without formatting
lead.addressstringRequired. Client’s address. Ex.“100 1st Street, San Francisco, California 94105”
lead.marketing_channelstringReach out to your partnership point of contact or email support@homelight.com for this field
lead.marketing_sourcestringReach out to your partnership point of contact or email support@homelight.com for this field
lead.utm_sourcestringReach out to your partnership point of contact or email support@homelight.com for this field
lead.utm_mediumstringReach out to your partnership point of contact or email support@homelight.com for this field
lead.utm_campaignstringReach out to your partnership point of contact or email support@homelight.com for this field

Response Body

{ 'validation_error': 'A request with invalid credentials was received and rejected. Please go to https://www.homelight.com and log in to retrieve valid credentials.',' 'token': '8dec6811defc43f793faf18bad2f734bb243023477bf0c844114800d2d1cf60a$$r3GjVgShkQMK0Kwsp8YFqUg=--9ddkRFzAeZ0t9Vl5--69qtSJWM/x00aYS1NPlvIQ==' }
NameTypeDescription
validation_errorstringOn lead creation failure. A description of the failure reason.
tokenstringOn lead creation success. The lead’s unique token.

Examples

Create Simple Sale lead
Input Format: JSONcurl 'https://staging.homelight.com/leads/partner_simple_sale_lead' -H 'Content-Type: application/json' -H 'Accept: application/json' -X POST -d '{'secret':'secret','token':'token','lead':{"timeline": "asap", "call_review_condition": "Needs Nothing", "property_type": "single_family_home", "call_review_year_built": "1990 or later", "full_name": "Daniel Duke", "email": "daniel@homelight.com", "phone": "(626) 823-9740", "address": "19 Clementina Street, San Francisco, California 94105", "marketing_channel": "partner", "marketing_source": "movoto", "utm_source": "movoto", "utm_medium": "partner", "utm_campaign": "1000050", "sell_reason": "Moving"}}'Output Format: JSON{:summary=>{:failed_lead_indexes=>[], :invalid_lead_indexes=>[], :leads_accepted=>1, :leads_rejected=>0, :leads_submitted=>1}, :leads=>[{:name=>"Daniel Duke", :accepted=>true}]}

Duplicate Lead Check

Request

POST https://staging.homelight.com/api/partner_dupe_lead_check

Parameters

NameTypeDescription
secretstringRequired. The secret key provided to you when you signed up for access to the HomeLight API.
tokenstringRequired. The secret token provided to you when you signed up for access to the HomeLight API.
full_namestringRequired if email and phone_number are blank. Lead's full name.
emailstringRequired if full_name and phone_number are blank. Lead's email address.
phone_numberstringRequired if full_name and email are blank. Lead's phone number.

Response Body

{ "duplicate": true, }
NameTypeDescription
duplicatebooleanA boolean value (true or false) indicating if the lead is a duplicate. True means that the lead is a duplicate, false means that the lead is not a duplicate.

FAQs

  1. Why is my request getting rejected?

    There are a number of reasons a request is rejected, the primary ones are outlined below

    1. Typos and Formatting
      1. Make sure your secret and token are exactly right and do not have extra spaces at the beginning or end.
      2. Are you using the correct secret/token? We provide different credentials for staging and production. You should use the secret/token that aligns with the correct URL.
      3. The URL for staging and production should include "www".
        1. Good: https://www.homelight.com/api/partner_lead/v2
        2. Bad: homelight.com/api/partner_lead/v2
      4. Request header should include:-H "Content-Type: text/xml"or-H "Content-Type: application/json"
    2. Required attributes - The following attributes are required and if you do not include these in your request, it will be rejected.
      1. city or zip_code
        1. City should be formatted like “City Name, State Abbreviation”. Ex. “San Francisco, CA”
      2. address (Seller or Simple Sale leads)
      3. email
      4. phone
      5. user_type
      6. name
      7. timeline (Simple Sale leads only)
      8. call_review_year_built (Simple Sale leads only)
      9. call_review_condition (Simple Sale leads only)
      10. sell_reason (Simple Sale leads only)
    3. Attributes that require specific answers - The following attributes require preset answers:
      1. user_type:
        1. "buyer"
        2. "seller"
      2. property_type:
        1. "single_family_home"
        2. "condominium"
        3. "townhomes"
        4. "tenancy_in_common"
        5. "coop"
        6. "mobile"
        7. "multi_family"
        8. "land"
        9. "commercial"
        10. "other"
        11. "rental"
        12. "not_sure"
      3. timeline:
        1. "asap"
        2. "2_months"
        3. "6_months"
        4. "10_months"
        5. "1_year"
        6. "unsure"
      4. call_review_condition (Simple Sale leads):
        1. “Needs Nothing”
        2. “Needs A Little Work”
        3. “Needs Significant Work”
        4. “Tear Down”
      5. call_review_year_built (Highly Recommended):
        1. “2000 or later”
        2. “1990s”
        3. “1980s”
        4. “1970s”
        5. “1960s”
        6. “Before 1960”
      6. sell_reason (Simple Sale leads):
        1. “Relocating To New Market”
        2. “Buying/Selling Investment Property”
        3. “Buying/Selling Vacation Property”
        4. “Probate Property”
        5. “Other”