Search contacts

distru-search-contactsRead

Searches the contacts of the caller's company — the people it deals with at its customers, vendors and its own company.

Inputs

Every tool also takes the common inputs.

FieldTypeRequiredDescription
limitintegerNoDefault: 10
cursorstringNonextCursor of the previous call; keep the other arguments unchanged.
companyIdsstring[]NoResolve via distru-search-companies.
customFieldsobject[]NoSet one of contains, anyOf or onOrAfter/onOrBefore per entry. Records with no value for the field never match.
customFields[].customFieldIdstringYesResolve via distru-search-custom-fields.
customFields[].containsstringNoTEXT: case-insensitive substring.
customFields[].anyOfstring[]NoDROPDOWN, CHECKBOX: any of these options, case-sensitive.
customFields[].onOrAfterstringNoDATE: YYYY-MM-DD, company timezone.
customFields[].onOrBeforestringNoDATE: YYYY-MM-DD, company timezone.
idsstring[]No
searchstringNoCase-insensitive substring of full name, company name or email. Unranked; sortBy applies.
sortByobjectNoDefault UPDATED_AT DESC.
sortBy.directionenum
ASCDESC
Yes
sortBy.fieldenum
FULL_NAMEINSERTED_ATUPDATED_AT
Yes

Output

Presence on a nested field assumes its parent exists.

FieldTypePresenceDescription
hasMorebooleanAlways
nextCursorstringCan be absent
totalCountintegerCan be absent
itemsobject[]Always
items[].idstringAlways
items[].firstNamestringAlways
items[].lastNamestringNull or absent
items[].titlestringNull or absent
items[].descriptionstringNull or absent
items[].emailstringNull or absent
items[].phonestringNull or absent
items[].workPhonestringNull or absent
items[].ownerobjectNull or absent
items[].owner.idstringAlways
items[].owner.fullNamestringNull or absent
items[].driverLicenseNumberstringNull or absent
items[].driverLicenseIssuingStatestringNull or absent
items[].customFieldsobject[]Always
items[].customFields[].customFieldobjectAlways
items[].customFields[].customField.idstringAlways
items[].customFields[].customField.namestringAlways
items[].customFields[].customField.fieldTypeenum
CHECKBOXDATEDROPDOWNTEXT
Always
items[].customFields[].valuestringCan be nullNull when unset. DATE values are days (YYYY-MM-DD) in the company timezone; CHECKBOX values are the selected option names, separated by commas.
items[].companyobjectNull or absent
items[].company.idstringAlways
items[].company.namestringNull or absent
items[].insertedAtstringAlways
items[].updatedAtstringAlways
What the AI reads

Searches the contacts of the caller's company — the people it deals with at its customers, vendors and its own company. Use it to find a person's email or phone, or who the contacts at a company are. owner is the Distru user responsible for the contact, not someone at the contact's company.