Search Persons
affinity_search_personsFind persons in Affinity CRM by email, first name, or last name. Supports partial domain matching and listing all contacts.
Instructions
Search for persons (contacts) in Affinity by email, first name, or last name.
This is a V1 API endpoint - search is NOT available in V2.
Use this tool to:
Find a person by their email address
Search for persons by first or last name
List all persons (omit term parameter)
Search Behavior:
Email search: Partial domain matching works (e.g., "@company.com" finds all at that domain)
Name search: Partial matching on first_name or last_name
Empty term: Returns all persons (paginated)
Parameters:
term: Email, first name, or last name to search
withInteractionDates: Include first/last email and event timestamps
withCurrentOrganizations: Include organization IDs the person belongs to
pageSize: Results per page (max 500)
pageToken: Pagination token for next page
Returns (JSON): { "persons": [ { "id": number, "first_name": string, "last_name": string, "primary_email": string | null, "emails": string[], "type": number, // 0=external, 1=internal "interaction_dates": {}, // if requested "current_organization_ids": [] // if requested } ], "next_page_token": string | null, "count": number, "hasMore": boolean }
Example use cases:
Look up person by email before creating: term="john@example.com"
Find all persons at a company: term="@acme.com"
Search by name: term="John"
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| term | No | Search term: email address, first name, or last name. Omit to list all persons. | |
| withInteractionDates | No | Include first/last email and event timestamps | |
| withInteractionPersons | No | Include persons involved in interactions | |
| withOpportunities | No | Include opportunity IDs associated with person | |
| withCurrentOrganizations | No | Include current organization IDs | |
| pageSize | No | Items per page (default 100, max 500) | |
| pageToken | No | Pagination token from previous response (next_page_token) | |
| responseFormat | No | Output format: "json" or "markdown". Default: "json" |