Search leads

GET {{baseUrl}}/leads/search?term=<string>&fields=<string>&exact_match=<boolean>&person_id=<integer>&organization_id=<integer>&include_fields=<string>&start=0&limit=<integer>

Searches all leads by title, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. Found leads can be filtered by the person ID and the organization ID.

Request Params

KeyDatatypeRequiredDescription
termstring(Required) The search term to look for. Minimum 2 characters (or 1 if using exact_match). Please note that the search term has to be URL encoded.
fieldsstringA comma-separated string array. The fields to perform the search from. Defaults to all of them.
exact_matchstringWhen enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive.
person_idstringWill filter leads by the provided person ID. The upper limit of found leads associated with the person is 2000.
organization_idstringWill filter leads by the provided organization ID. The upper limit of found leads associated with the organization is 2000.
include_fieldsstringSupports including optional fields in the results which are not provided by default
startnumberPagination start. Note that the pagination is based on main results and does not include related items when using search_for_related_items parameter.
limitstringItems shown per page

HEADERS

KeyDatatypeRequiredDescription
Acceptstring

RESPONSES

status: OK

{&quot;success&quot;:true,&quot;data&quot;:{&quot;items&quot;:[{&quot;result_score&quot;:0.29,&quot;item&quot;:{&quot;id&quot;:&quot;39c433f0-8a4c-11ec-8728-09968f0a1ca0&quot;,&quot;type&quot;:&quot;lead&quot;,&quot;title&quot;:&quot;John Doe lead&quot;,&quot;owner&quot;:{&quot;id&quot;:1},&quot;person&quot;:{&quot;id&quot;:1,&quot;name&quot;:&quot;John Doe&quot;},&quot;organization&quot;:{&quot;id&quot;:1,&quot;name&quot;:&quot;John company&quot;},&quot;phones&quot;:[],&quot;emails&quot;:[&quot;john@doe.com&quot;],&quot;custom_fields&quot;:[],&quot;notes&quot;:[],&quot;value&quot;:100,&quot;currency&quot;:&quot;USD&quot;,&quot;visible_to&quot;:3,&quot;is_archived&quot;:false}}]},&quot;additional_data&quot;:{&quot;description&quot;:&quot;The additional data of the list&quot;,&quot;type&quot;:&quot;object&quot;,&quot;properties&quot;:{&quot;start&quot;:{&quot;type&quot;:&quot;integer&quot;,&quot;description&quot;:&quot;Pagination start&quot;},&quot;limit&quot;:{&quot;type&quot;:&quot;integer&quot;,&quot;description&quot;:&quot;Items shown per page&quot;},&quot;more_items_in_collection&quot;:{&quot;type&quot;:&quot;boolean&quot;,&quot;description&quot;:&quot;If there are more list items in the collection than displayed or not&quot;}}}}