Search leads
The /search/leads resource is used to find leads using full text
search. For example, you can search for fred in texas using:
/search/leads?query=fred+tx
Search Criteria
- pass in the search text using the query parameter:
/search/leads?query=fred - the query parameter should be URL encoded
- searching is case-insensitive:
FREDandfredwill both matchFred - you don’t have to enter a complete word - searching will match the
beginning of words:
/search/leads?query=samwill matchsamandsamantha - queries with multiple words like
fred txwill match leads that have bothfredANDtx - to specify an exact phrase (with spaces), use double quotes -
"fred tx"will only match that exact text
The search results can be sorted and paginated. There are two query
parameter to control sorting: sort_by and sort_dir. The sort_by
parameter takes a field name (see list below) and sort_dir is ascending
(asc) or descending (desc). By default, the results are sorted by
relevance.
There are two query parameters to control paging: from and limit. The
from parameter specifies the starting offset of that page in the search
results and the limit parameter specifies how many search results to
return. From is zero-based so to get the first 10 results, use
from=0&limit=10, the second 10 using from=10&limit=10, etc… The
maximum limit is 100 at a time, with an overall maximum of 1,000 search
results.
Search Results
The search results has the total number of matching leads and an array of hits, where each hit is a matching Lead Search Result. Each lead search result contains basic information about the lead, the latest event for that lead, and highlighting of the matched text.
Documentation Index
Fetch the complete documentation index at: https://developers.activeprospect.com/llms.txt
Use this file to discover all available pages before exploring further.
Authorizations
LeadConduit uses HTTP Basic Authentication
with the username API and your API key as the password.
For example: API:1f1b96c9150d8050e858c043d543bb4eadae0e6f'
Query Parameters
text to search for
One of the following field names: lead_id, submission_timestamp,
first_name, last_name, email, phone_1, phone_2,
address_1, city, state, postal_code, reference
lead_id, submission_timestamp, first_name, last_name, email, phone_1, phone_2, address_1, city, state, postal_code, reference The sort direction: "asc" or "desc", default is by relevance
asc, desc The starting offset of leads to return in the matching result set, zero-based
The maximum number of leads to return (maximum is 100, default is 10)