Get a Lead by Phone

Returns a lead’s details (First name, Last name, Email Address, Location, etc.) based on the phone number you pass in the API URL. You can use this API in 2 ways –

  • Retrieve a lead based on the “Phone” lead field only. This is the default behaviour of this API.
  • Retrieve a lead based on the “Phone” and “Mobile” lead fields. This requires you to pass an additional parameter “searchByOtherField=true” in the API URL. Here’s how the URL should look –
    https://api.leadsquared.com/v2/LeadManagement.svc/RetrieveLeadByPhoneNumber?accessKey=Access Key&secretKey=Secret Key&phone=phone&searchByOtherField=true

If more than one lead matches the phone number you pass, the API will return the lead with the most recent activity. You can pass the phone number with or without the country-code but don’t include spaces, hyphens or any other character.

Related APIs

  • To retrieve a lead’s details using their Id, use the Get Lead by Id API.
  • To retrieve a lead’s details using their email Id, use the Get Lead by Email API.

API URL

GET
https://{host}/v2/LeadManagement.svc/RetrieveLeadByPhoneNumber?accessKey=AccessKey&secretKey=SecretKey&phone=Phone
Copy URL

URL Parameters

Parameter Description
Phone The lead's phone number.

Response

200 OK

Content-Type: application/json

[
    {
        "ProspectID": "1bfdec89-f91b-46a3-85bd-fda3f3712518",
        "ProspectAutoId": "17",
        "FirstName": "Prashant",
        "LastName": "Singh",
        "EmailAddress": "prashant@leadsquared.com",
        "Company": null,
        "Origin": "Quick Add Form",
        "Phone": "9901111111",
        "Mobile": null,
        "Fax": null,
        "Website": null,
        "TimeZone": null,
        "Region": null,
        "JobTitle": null,
        "Source": "Referral Sites",
        "SourceMedium": "",
        "Notes": null,
        "SourceCampaign": "",
        "SourceContent": "",
        "DoNotEmail": "0",
        "DoNotCall": "0",
        "ProspectStage": "Customer",
        "Grade": null,
        "Score": "54",
        "Revenue": null,
        "EngagementScore": "0",
        "TotalVisits": "15",
        "PageViewsPerVisit": "1.67",
        "AvgTimePerVisit": "77.86",
        "RelatedProspectId": null,
        "ProspectActivityId_Min": "7b6dcb36-8303-11e4-b766-22000a9389c5",
        "ProspectActivityDate_Min": "2014-12-13 20:06:10.000",
        "Web_Referrer": "pages.myleadsquared.com",
        "Web_RefKeyword": "Unknown",
        "ProspectActivityId_Max": "05162f20-d9ed-40a5-b720-7be6745b7028",
        "ProspectActivityName_Max": "3 New Custom Activity Type",
        "ProspectActivityDate_Max": "2016-09-16 11:47:13.000",
        "ImportTransactionId": null,
        "RelatedLandingPageId": null,
        "FirstLandingPageSubmissionId": null,
        "FirstLandingPageSubmissionDate": null,
        "OwnerId": "48d4b3f2-85dd-11e4-ac76-22000a9700b4",
        "CreatedBy": "563fc7e8-797d-11e4-b2b6-22000a940c0c",
        "CreatedOn": "2014-12-10 06:56:42.000",
        "ModifiedBy": "563fc7e8-797d-11e4-b2b6-22000a940c0c",
        "ModifiedOn": "2016-09-13 10:22:13.000",
        "LeadConversionDate": null,
        "StatusCode": "0",
        "StatusReason": "0",
        "DeletionStatusCode": "0",
        "IsLead": "1",
        "mx_Street1": null,
        "mx_Street2": null,
        "mx_City": "TEST",
        "mx_State": "Karnataka",
        "mx_Country": "India",
        "mx_Zip": null,
        "mx_Geography": null,
        "mx_DOB": null,
        "mx_Anniversary": null,
        "mx_FaceBookURL": null,
        "mx_TwitterURL": null,
        "mx_LinkedInURL": null,
        "JobTitleLevel": null,
        "mx_Date_1": null,
        "mx_Date_2": null,
        "mx_Date_3": null,
        "mx_Date_4": null,
        "mx_Location": null,
        "mx_Pincode": null,
        "mx_Grade": null,
        "mx_Grade_1": null,
        "mx_Olark_Group": null,
        "mx_Page_Source": null,
        "mx_DRPDN": null,
        "mx_UTM_Term": null,
        "mx_UTM_Site": null,
        "mx_UTM_Device_Type": null,
        "mx_UTM_Network": null,
        "mx_College": null,
        "mx_CB_TEST": null,
        "mx_Date_test": null,
        "mx_Lead_Status": null,
        "mx_IsBuyer": null,
        "mx_Age": null,
        "mx_Product": null,
        "mx_Secondary_Email": null,
        "mx_Education_Board": null,
        "mx_Phone_Type": null,
        "mx_TimeTest": null,
        "mx_Test123": null,
        "mx_test1": null,
        "mx_State2": null,
        "LastModifiedOn": "10/13/2016 3:56:09 PM",
        "NotableEvent": "3 New Custom Activity Type",
        "NotableEventdate": "2016-09-16 11:47:13.000",
        "SourceReferrer": "Unknown",
        "LastVisitDate": "2016-09-16 11:47:13.000",
        "LeadAge": "742",
        "PhotoUrl": null,
        "mx_Percentag": null,
        "TwitterId": null,
        "FacebookId": null,
        "LinkedInId": null,
        "SkypeId": null,
        "GTalkId": null,
        "GooglePlusId": null,
        "QualityScore01": null,
        "mx_test_url": null,
        "mx_MSDD": null,
        "StageRottingFlagStatus": null,
        "StageRottingFlagMessage": null,
        "StageRottingFlagModifiedOn": null,
        "StageRottingFlagAdditionalInfo": null,
        "StageRottingFlagLevel": null,
        "MailingPreferences": "1",
        "mx_first_dropdown": null,
        "mx_Perc2": null,
        "mx_Second_dropdown": null,
        "OwnerIdName": "Demo User",
        "OwnerIdEmailAddress": "dumyleadsquared@yopmail.com",
        "Groups": null,
        "CreatedByName": "Prashant Singh",
        "ModifiedByName": "Prashant Singh",
        "CreatedByName1": "Prashant Singh",
        "ModifiedByName1": "Prashant Singh",
        "OwnerIdEmailAddress1": "dumyleadsquared@yopmail.com",
        "OwnerIdName1": "Demo User",
        "Total": "1",
        "CanUpdate": "true"
    }
]

HTTP Response Code

Code Description
200 OK

This is the status code for successful API call.

401 Unauthorized

The API call was made with invalid access credentials. Check your AccessKey and SecretKey.

400 Bad Request

The message body on the request is not as per API specification. Make sure that content type is set to “application/json” and the JSON body has correct attribute names and structure.

404 Not Found

The API could not be found. Please check the API signature.

429 Too Many Requests

API calls exceeded the limit of 25 in 5 second(s)

500 Internal Server Error

The API called failed. There could be many reasons for it. Check the exception message to get more details.