# Search Contacts

POST https://services.leadconnectorhq.com/contacts/search

Search contacts based on combinations of advanced filters. Documentation Link - https://doc.clickup.com/8631005/d/h/87cpx-158396/6e629989abe7fad

## Authentication

Send `Authorization: Bearer <token>` using:

- **Sub-Account token: OAuth access token or Private Integration Token.** Scopes: `contacts.readonly`

## Parameters

### Header Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `Version` | string | Yes | API Version. Send `v3`. |

## OpenAPI Specification

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "LeadConnector API",
    "version": "v3"
  },
  "servers": [
    {
      "url": "https://services.leadconnectorhq.com"
    }
  ],
  "paths": {
    "/contacts/search": {
      "post": {
        "summary": "Search Contacts",
        "operationId": "searchContacts",
        "description": "Search contacts based on combinations of advanced filters. Documentation Link - https://doc.clickup.com/8631005/d/h/87cpx-158396/6e629989abe7fad",
        "parameters": [
          {
            "name": "Version",
            "in": "header",
            "description": "API Version. Send `v3`.",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "v3"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchBodyV2DTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchContactSuccessResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          }
        },
        "security": [
          {
            "bearer": [
              "contacts.readonly"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.",
        "type": "http"
      },
      "Location-Access": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.",
        "type": "http"
      },
      "Location-Access-Only": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account.",
        "type": "http"
      },
      "Agency-Access": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Agency (OR) Private Integration Token of Agency.",
        "type": "http"
      },
      "Agency-Access-Only": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Agency.",
        "type": "http"
      }
    },
    "schemas": {
      "SearchBodyV2DTO": {
        "type": "object",
        "properties": {
          "locationId": {
            "type": "string",
            "description": "Location Id to search in. **Required.**",
            "example": "5DP41231LkQsiKESj6rh"
          },
          "pageLimit": {
            "type": "number",
            "description": "Number of contacts per page. **Required.** Maximum 500.",
            "maximum": 500,
            "example": 20
          },
          "page": {
            "type": "number",
            "description": "Page number for standard pagination, starting at 1.\n- Standard pagination returns up to **10,000** records in total, at most 500 per request: `page × pageLimit` must not exceed 10,000. For example, `page: 20` with `pageLimit: 500` returns the last set.\n- To go past 10,000 records, use `searchAfter`.\n- ⚠️ `page` is ignored when `searchAfter` is a non-empty array: results start right after the cursor. Send one or the other.",
            "default": 1,
            "example": 1
          },
          "searchAfter": {
            "type": "array",
            "description": "Use this to get the next page of results.\n\n• Copy the `searchAfter` value from the last contact in the previous response and send it here unchanged. Its values can be numbers or strings.\n\n• You need it to go past the first **10,000** contacts.\n\n• When you send it, `page` is ignored.\n\n• To start from the first page, leave it out or send an empty list (`[]`).\n\n• If the response has no contacts, you have reached the end.",
            "items": {
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                }
              ]
            },
            "example": [
              1700000000000,
              "ocQHyuzHvysMo5N5VsXc"
            ]
          },
          "query": {
            "type": "string",
            "description": "Text to search for. It is matched against the contact fields marked searchable in the location's Custom Fields Settings. For email and phone, it also matches additional emails and phone numbers. Maximum 75 characters.",
            "maxLength": 75,
            "example": "tom"
          },
          "filters": {
            "type": "array",
            "description": "Filters, or groups of filters, to narrow the results. Each filter has three parts:\n1. **Field**: the contact attribute the filter applies to, e.g. `firstNameLowerCase`.\n2. **Operator**: the comparison to run on the field, e.g. `eq` or `contains`.\n3. **Value**: the value the field is compared with; a string, number or other type that fits the field.\n\n- Each item is either a **filter** (`field`, `operator`, `value`) or a **group** (`group`: `AND` / `OR`, with nested `filters`).\n- ⚠️ By default every filter in the `filters` array is combined with **AND**.\n- Results can take a few seconds to reflect recent changes.\n\nExample: first name contains `john` and an email is set, and the city is New York or the state is California\n\n```json\n[\n  {\n    \"group\": \"AND\",\n    \"filters\": [\n      {\n        \"field\": \"firstNameLowerCase\",\n        \"operator\": \"contains\",\n        \"value\": \"john\"\n      },\n      {\n        \"field\": \"email\",\n        \"operator\": \"exists\"\n      }\n    ]\n  },\n  {\n    \"group\": \"OR\",\n    \"filters\": [\n      {\n        \"field\": \"city\",\n        \"operator\": \"eq\",\n        \"value\": \"New York\"\n      },\n      {\n        \"field\": \"state\",\n        \"operator\": \"eq\",\n        \"value\": \"California\"\n      }\n    ]\n  }\n]\n```\n\n**Contacts changed since a time** (incremental sync): Filter `dateUpdated` using `range` with `gte` set to your last sync time. Sort by `dateUpdated` ascending and paginate using `searchAfter`.\n- **Time range:** `gte` and `lte` are inclusive; `gt` and `lt` are exclusive. Use ISO 8601 timestamps with a time zone (e.g., `2026-11-05T20:21:00.000Z`). `dateUpdated` has millisecond precision.\n- **Updates:** `dateUpdated` changes when a contact is updated, including custom field updates. Formula field recalculations do not update `dateUpdated`.\n- **Indexing delay:** Changes appear in search results after a delay that can vary. Start each sync from a time earlier than your previous sync time so the windows overlap, and de-duplicate by contact `id`. For more reliable tracking, periodically reconcile records or use [ContactCreate](/docs/webhook/ContactCreate) and [ContactUpdate](/docs/webhook/ContactUpdate) webhooks.\n- **Pagination:** To get the next page, pass the `searchAfter` value of the last returned contact unchanged. Results are not a snapshot, so contacts updated during pagination may appear more than once. To resume a later sync, filter by `dateUpdated` again instead of reusing an old `searchAfter`.\n- **Deletions:** Deleted contacts are excluded from results. Use the [ContactDelete](/docs/webhook/ContactDelete) webhook to track deletions. If a deleted contact is restored, its `dateUpdated` changes and the next sync returns it.",
            "items": {
              "type": "object",
              "properties": {
                "field": {
                  "type": "string",
                  "description": "Field to filter on (filter item). The supported fields, grouped as in the Contacts Search API reference, with the operators each one supports:\n\n### Contact Information\n\n| Display name | Field name | Supported operators | Example |\n| --- | --- | --- | --- |\n| Contact Id | `id` | `eq`, `not_eq` | `{ \"field\": \"id\", \"operator\": \"eq\", \"value\": \"{contactId}\" }` |\n| Contact Name | `contactName` | `eq`, `not_eq`, `exists`, `not_exists` | `{ \"field\": \"contactName\", \"operator\": \"eq\", \"value\": \"John Doe\" }` |\n| Address | `address` | `eq`, `not_eq`, `contains`, `not_contains`, `exists`, `not_exists` | `{ \"field\": \"address\", \"operator\": \"contains\", \"value\": \"Main Street\" }` |\n| Assigned | `assignedTo` | `eq`, `not_eq`, `exists`, `not_exists` | `{ \"field\": \"assignedTo\", \"operator\": \"eq\", \"value\": \"{userId}\" }` |\n| Business Name | `businessName` | `eq`, `not_eq`, `contains`, `not_contains`, `exists`, `not_exists` | `{ \"field\": \"businessName\", \"operator\": \"contains\", \"value\": \"acme\" }` |\n| City | `city` | `eq`, `not_eq`, `contains`, `not_contains`, `exists`, `not_exists` | `{ \"field\": \"city\", \"operator\": \"eq\", \"value\": \"New York\" }` |\n| Country | `country` | `eq`, `not_eq`, `exists`, `not_exists` | `{ \"field\": \"country\", \"operator\": \"eq\", \"value\": \"US\" }` |\n| Company Name | `companyName` | `eq`, `not_eq`, `contains`, `not_contains`, `exists`, `not_exists` | `{ \"field\": \"companyName\", \"operator\": \"eq\", \"value\": \"XYZ Corp\" }` |\n| Created At | `dateAdded` | `range`, `exists`, `not_exists` | `{ \"field\": \"dateAdded\", \"operator\": \"range\", \"value\": { \"gte\": \"2026-01-01T00:00:00Z\", \"lte\": \"2026-12-31T23:59:59Z\" } }` |\n| Updated At | `dateUpdated` | `range`, `exists`, `not_exists` | `{ \"field\": \"dateUpdated\", \"operator\": \"range\", \"value\": { \"gte\": \"2026-11-01T00:00:00Z\" } }` |\n| DND | `dnd` | `eq`, `not_eq`, `exists`, `not_exists` | `{ \"field\": \"dnd\", \"operator\": \"eq\", \"value\": true }` |\n| Email | `email` | `eq`, `not_eq`, `exists`, `not_exists`<br>`contains` and `not_contains` are not yet supported | `{ \"field\": \"email\", \"operator\": \"eq\", \"value\": \"john@example.com\" }` |\n| Followers | `followers` | `eq`, `not_eq`, `exists`, `not_exists` | `{ \"field\": \"followers\", \"operator\": \"eq\", \"value\": \"{userId}\" }` |\n| First Name Lower Case | `firstNameLowerCase` | `eq`, `not_eq`, `contains`, `not_contains`, `exists`, `not_exists` | `{ \"field\": \"firstNameLowerCase\", \"operator\": \"eq\", \"value\": \"john\" }` |\n| First Name (Without Lower Case) | Coming soon! | Coming soon! | Coming soon! |\n| Last Name Lower Case | `lastNameLowerCase` | `eq`, `not_eq`, `contains`, `not_contains`, `exists`, `not_exists` | `{ \"field\": \"lastNameLowerCase\", \"operator\": \"contains\", \"value\": \"doe\" }` |\n| Last Name (Without Lower Case) | Coming soon! | Coming soon! | Coming soon! |\n| Is Valid Whatsapp | `isValidWhatsapp` | `eq`, `not_eq`, `exists`, `not_exists` | `{ \"field\": \"isValidWhatsapp\", \"operator\": \"eq\", \"value\": true }` |\n| Last Email Clicked Date | `lastEmailClickedDate` | `range`, `exists`, `not_exists` | `{ \"field\": \"lastEmailClickedDate\", \"operator\": \"range\", \"value\": { \"gte\": \"2026-01-01T00:00:00Z\", \"lte\": \"2026-12-31T23:59:59Z\" } }` |\n| Last Email Opened Date | `lastEmailOpenedDate` | `range`, `exists`, `not_exists` | `{ \"field\": \"lastEmailOpenedDate\", \"operator\": \"exists\" }` |\n| Phone<br>Pass the correct country code, e.g. `+917010000000` | `phone` | `eq`, `not_eq`, `contains`, `not_contains`, `exists`, `not_exists` | `{ \"field\": \"phone\", \"operator\": \"eq\", \"value\": \"+917010000000\" }` |\n| Postal Zip Code | `postalCode` | `eq`, `not_eq`, `contains`, `not_contains`, `exists`, `not_exists` | `{ \"field\": \"postalCode\", \"operator\": \"eq\", \"value\": \"10001\" }` |\n| Source | `source` | `eq`, `not_eq`, `contains`, `not_contains`, `exists`, `not_exists` | `{ \"field\": \"source\", \"operator\": \"eq\", \"value\": \"Website\" }` |\n| State | `state` | `eq`, `not_eq`, `contains`, `not_contains`, `exists`, `not_exists` | `{ \"field\": \"state\", \"operator\": \"eq\", \"value\": \"California\" }` |\n| Tags | `tags` | `eq`, `not_eq`, `contains`, `not_contains`, `exists`, `not_exists` | `{ \"field\": \"tags\", \"operator\": \"eq\", \"value\": \"vip\" }` |\n| Timezone<br>e.g. `Pacific/Honolulu` | `timezone` | `eq`, `not_eq`, `exists`, `not_exists` | `{ \"field\": \"timezone\", \"operator\": \"eq\", \"value\": \"Pacific/Honolulu\" }` |\n| Contact Type | `type` | `eq`, `not_eq`, `exists`, `not_exists` | `{ \"field\": \"type\", \"operator\": \"eq\", \"value\": \"lead\" }` |\n| Is Valid Email<br>Applies only if Email Validation is enabled for the location | `validEmail` | `eq`, `not_eq`, `exists`, `not_exists` | `{ \"field\": \"validEmail\", \"operator\": \"eq\", \"value\": true }` |\n| Website | `website` | `eq`, `not_eq`, `exists`, `not_exists`<br>`contains` and `not_contains` are not yet supported | `{ \"field\": \"website\", \"operator\": \"exists\" }` |\n| Date of Birth | `dateOfBirth` | `range`, `exists`, `not_exists` | `{ \"field\": \"dateOfBirth\", \"operator\": \"range\", \"value\": { \"gte\": \"1990-01-01\", \"lte\": \"1990-12-31\" } }` |\n\n### Contact Activity\n\n| Display name | Field name | Supported operators | Example |\n| --- | --- | --- | --- |\n| Last Appointment - Confirmed/Open | `lastAppointment` | `range`, `exists`, `not_exists` | `{ \"field\": \"lastAppointment\", \"operator\": \"range\", \"value\": { \"gte\": \"2026-01-01T00:00:00Z\", \"lte\": \"2026-12-31T23:59:59Z\" } }` |\n| Workflow (Active) | `activeWorkflows` | `eq`, `not_eq`, `exists`, `not_exists` | `{ \"field\": \"activeWorkflows\", \"operator\": \"eq\", \"value\": \"{workflowId}\" }` |\n| Workflow (Finished) | `finishedWorkflows` | `eq`, `not_eq`, `exists`, `not_exists` | `{ \"field\": \"finishedWorkflows\", \"operator\": \"eq\", \"value\": \"{workflowId}\" }` |\n| Last Activity | `lastActivity` | `range`, `exists`, `not_exists` | `{ \"field\": \"lastActivity\", \"operator\": \"range\", \"value\": { \"gte\": \"2026-10-01T00:00:00Z\" } }` |\n\n### Opportunity Information\n\n| Display name | Field name | Supported operators | Example |\n| --- | --- | --- | --- |\n| Pipeline | field `opportunities`<br>sub field `pipelineId` | field: `nested`<br>sub field: `eq`, `not_eq`, `exists`, `not_exists` | `{ \"field\": \"opportunities\", \"operator\": \"nested\", \"value\": [ { \"field\": \"pipelineId\", \"operator\": \"eq\", \"value\": \"{pipelineId}\" } ] }` |\n| Pipeline Stage | field `opportunities`<br>sub field `pipelineStageId` | field: `nested`<br>sub field: `eq`, `not_eq`, `exists`, `not_exists` | `{ \"field\": \"opportunities\", \"operator\": \"nested\", \"value\": [ { \"field\": \"pipelineStageId\", \"operator\": \"eq\", \"value\": \"{pipelineStageId}\" } ] }` |\n| Pipeline Status | field `opportunities`<br>sub field `status` | field: `nested`<br>sub field: `eq`, `not_eq`, `exists`, `not_exists` | `{ \"field\": \"opportunities\", \"operator\": \"nested\", \"value\": [ { \"field\": \"status\", \"operator\": \"eq\", \"value\": \"open\" } ] }` |\n\nExample: opportunities combination filter, open opportunities in one pipeline stage\n\n```json\n{\n  \"field\": \"opportunities\",\n  \"operator\": \"nested\",\n  \"value\": [\n    {\n      \"field\": \"pipelineId\",\n      \"operator\": \"eq\",\n      \"value\": \"{pipelineId}\"\n    },\n    {\n      \"field\": \"pipelineStageId\",\n      \"operator\": \"eq\",\n      \"value\": \"{pipelineStageId}\"\n    },\n    {\n      \"field\": \"status\",\n      \"operator\": \"eq\",\n      \"value\": \"open\"\n    }\n  ]\n}\n```\n\nYou can combine 2 or more sub-fields under the `opportunities` nested filter.\n\n### Custom Fields\n\n| Display name | Field name | Supported operators | Example |\n| --- | --- | --- | --- |\n| TEXT, LARGE_TEXT, SINGLE_OPTIONS, RADIO, PHONE | `customFields.{customFieldId}` | `eq`, `not_eq`, `contains`, `not_contains`, `exists`, `not_exists` | `{ \"field\": \"customFields.{customFieldId}\", \"operator\": \"contains\", \"value\": \"gold\" }` |\n| CHECKBOX, MULTIPLE_OPTIONS | `customFields.{customFieldId}` | `eq`, `not_eq`, `exists`, `not_exists` | `{ \"field\": \"customFields.{customFieldId}\", \"operator\": \"eq\", \"value\": [ \"Newsletter\", \"Promotions\" ] }` |\n| NUMERICAL, MONETORY | `customFields.{customFieldId}` | `range`, `exists`, `not_exists`, `eq`, `not_eq` | `{ \"field\": \"customFields.{customFieldId}\", \"operator\": \"range\", \"value\": { \"gte\": 100, \"lte\": 500 } }` |\n| DATE | `customFields.{customFieldId}` | `range`, `exists`, `not_exists` | `{ \"field\": \"customFields.{customFieldId}\", \"operator\": \"range\", \"value\": { \"gte\": \"2026-01-01\", \"lte\": \"2026-12-31\" } }` |\n| TEXTBOX_LIST | `customFields.{customFieldId}.{optionId}` | `eq`, `not_eq`, `contains`, `not_contains`, `exists`, `not_exists` | `{ \"field\": \"customFields.{customFieldId}.{optionId}\", \"operator\": \"eq\", \"value\": \"Line one\" }` |\n\n- Custom field: `customFields.{customFieldId}`, e.g. `customFields.OBj007JIEmLP0IEHdV1l`.\n- TEXTBOX_LIST: add the option id, `customFields.{customFieldId}.{optionId}`, e.g. `customFields.OBj007JIEmLP0IEHdV1l.c1b70ec9-664f-400f-a3fc-6f7912c5e310`.\n- CHECKBOX / MULTIPLE_OPTIONS: `value` is an option, or an array of options to match any of them.\n- `email` and `phone` match only the primary email and phone of a contact, not its additional emails or phone numbers. To find a contact by an additional email or phone, use `query` or Get Duplicate Contact.",
                  "example": "tags"
                },
                "operator": {
                  "type": "string",
                  "description": "Operator to apply (filter item). Each field supports only some operators; see the supported operators of each field.\n\n#### `eq`: Equals\n\n- **Value type:** Number, String, Boolean\n- **Character limit:** 75\n\nExample\n\n```json\n{\n  \"field\": \"tags\",\n  \"operator\": \"eq\",\n  \"value\": \"vip\"\n}\n```\n\n#### `not_eq`: Not Equals\n\n- **Value type:** Number, String, Boolean\n- **Character limit:** 75\n\nExample\n\n```json\n{\n  \"field\": \"type\",\n  \"operator\": \"not_eq\",\n  \"value\": \"lead\"\n}\n```\n\n#### `contains`: Contains\n\n- **Value type:** String, at least 3 characters\n- **Character limit:** 75\n- ⚠️ The `contains` operator does not support special characters.\n\nExample\n\n```json\n{\n  \"field\": \"firstNameLowerCase\",\n  \"operator\": \"contains\",\n  \"value\": \"john\"\n}\n```\n\n#### `not_contains`: Not Contains\n\n- **Value type:** String, at least 3 characters\n- **Character limit:** 75\n- ⚠️ The `not_contains` operator does not support special characters.\n\nExample\n\n```json\n{\n  \"field\": \"city\",\n  \"operator\": \"not_contains\",\n  \"value\": \"york\"\n}\n```\n\n#### `exists`: Exists (has a value)\n\n- **Value type:** Undefined\n- **Character limit:** None\n- ⚠️ **Do not pass any `value`**; `field` and `operator` are enough.\n\nExample\n\n```json\n{\n  \"field\": \"email\",\n  \"operator\": \"exists\"\n}\n```\n\n#### `not_exists`: Does not exist (no value)\n\n- **Value type:** Undefined\n- **Character limit:** None\n- ⚠️ **Do not pass any `value`**; `field` and `operator` are enough.\n\nExample\n\n```json\n{\n  \"field\": \"phone\",\n  \"operator\": \"not_exists\"\n}\n```\n\n#### `range`: Range\n\n- **Value type:** An object with `gte` / `lte` (or `gt` / `lt`) bounds: dates for date fields, numbers for number fields\n- **Character limit:** 75\n\nExample\n\n```json\n{\n  \"field\": \"dateAdded\",\n  \"operator\": \"range\",\n  \"value\": {\n    \"gte\": \"2026-01-01T00:00:00Z\",\n    \"lte\": \"2026-06-30T23:59:59Z\"\n  }\n}\n```\n\n#### `nested`: Opportunity filters\n\n- **Value type:** An array of filters on the `opportunities` sub-fields (`pipelineId`, `pipelineStageId`, `status`); all must match\n- **Character limit:** As for each sub-filter\n\nExample\n\n```json\n{\n  \"field\": \"opportunities\",\n  \"operator\": \"nested\",\n  \"value\": [\n    {\n      \"field\": \"pipelineId\",\n      \"operator\": \"eq\",\n      \"value\": \"{pipelineId}\"\n    },\n    {\n      \"field\": \"status\",\n      \"operator\": \"eq\",\n      \"value\": \"open\"\n    }\n  ]\n}\n```",
                  "example": "eq"
                },
                "value": {
                  "description": "Value to compare with (filter item). A string, number or boolean for most operators; `{ gte, lte, gt, lt }` for `range`; omitted for `exists` / `not_exists`. Text values can be up to 75 characters; `contains` / `not_contains` need at least 3.",
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "object"
                    }
                  ],
                  "example": "vip"
                },
                "group": {
                  "type": "string",
                  "enum": [
                    "AND",
                    "OR"
                  ],
                  "description": "Logical group operator for the nested `filters` (group item). Must be either `AND` or `OR`.",
                  "example": "OR"
                },
                "filters": {
                  "type": "array",
                  "description": "Array of filters or nested filter groups to be grouped together (group item), in the same form as this item",
                  "items": {
                    "type": "object"
                  },
                  "example": [
                    {
                      "field": "firstNameLowerCase",
                      "operator": "eq",
                      "value": "alex"
                    },
                    {
                      "field": "lastNameLowerCase",
                      "operator": "eq",
                      "value": "peter"
                    }
                  ]
                }
              }
            },
            "example": [
              {
                "field": "dnd",
                "operator": "eq",
                "value": true
              },
              {
                "field": "dateUpdated",
                "operator": "range",
                "value": {
                  "gte": "2026-11-01T00:00:00Z"
                }
              },
              {
                "group": "OR",
                "filters": [
                  {
                    "field": "firstNameLowerCase",
                    "operator": "eq",
                    "value": "alex"
                  },
                  {
                    "field": "lastNameLowerCase",
                    "operator": "eq",
                    "value": "peter"
                  }
                ]
              }
            ]
          },
          "sort": {
            "type": "array",
            "description": "Sort order, applied in the order given. Contacts that tie are ordered by id, so `searchAfter` paging is stable.",
            "items": {
              "type": "object",
              "properties": {
                "field": {
                  "type": "string",
                  "description": "Field to sort on (sort item). The supported sort fields:\n\n#### First Name (Lowercase): `firstNameLowerCase`\n\nExample: first names A to Z\n\n```json\n[\n  {\n    \"field\": \"firstNameLowerCase\",\n    \"direction\": \"asc\"\n  }\n]\n```\n\n#### Last Name (Lowercase): `lastNameLowerCase`\n\nExample: last names A to Z\n\n```json\n[\n  {\n    \"field\": \"lastNameLowerCase\",\n    \"direction\": \"asc\"\n  }\n]\n```\n\n#### Business Name: `businessName`\n\nExample: business names A to Z\n\n```json\n[\n  {\n    \"field\": \"businessName\",\n    \"direction\": \"asc\"\n  }\n]\n```\n\n#### Date Created: `dateAdded`\n\nExample: newest contacts first\n\n```json\n[\n  {\n    \"field\": \"dateAdded\",\n    \"direction\": \"desc\"\n  }\n]\n```\n\n#### Date Updated: `dateUpdated`\n\nExample: most recently updated contacts first\n\n```json\n[\n  {\n    \"field\": \"dateUpdated\",\n    \"direction\": \"desc\"\n  }\n]\n```\n\n#### Email: `email`\n\nExample: emails A to Z\n\n```json\n[\n  {\n    \"field\": \"email\",\n    \"direction\": \"asc\"\n  }\n]\n```\n\n#### DND: `dnd`\n\nExample: contacts with DND on first\n\n```json\n[\n  {\n    \"field\": \"dnd\",\n    \"direction\": \"desc\"\n  }\n]\n```\n\n#### Source: `source`\n\nExample: sources A to Z\n\n```json\n[\n  {\n    \"field\": \"source\",\n    \"direction\": \"asc\"\n  }\n]\n```\n\n#### Last Activity: `lastActivity`\n\nExample: most recent activity first\n\n```json\n[\n  {\n    \"field\": \"lastActivity\",\n    \"direction\": \"desc\"\n  }\n]\n```\n\n#### Combining sorts\n\nYou can combine 2 sorts at once; they apply in the order given.\n\nExample: newest contacts first, then by first name\n\n```json\n[\n  {\n    \"field\": \"dateAdded\",\n    \"direction\": \"desc\"\n  },\n  {\n    \"field\": \"firstNameLowerCase\",\n    \"direction\": \"asc\"\n  }\n]\n```",
                  "example": "dateAdded"
                },
                "direction": {
                  "type": "string",
                  "enum": [
                    "asc",
                    "desc"
                  ],
                  "description": "Sorting direction: `asc` for ascending, `desc` for descending",
                  "example": "desc"
                }
              }
            },
            "example": [
              {
                "field": "firstNameLowerCase",
                "direction": "desc"
              }
            ]
          },
          "assignedTo": {
            "type": "string",
            "description": "Only contacts assigned to this user. The same as a `filters` item on `assignedTo` with operator `eq`.",
            "example": "182goXVW3lIExEQPOnd3"
          },
          "fastPagination": {
            "type": "boolean",
            "description": "Faster pagination for large result sets: the matching contacts are not counted, so the response carries `hasMore` instead of `total`.\n- `hasMore`: `true` when another page exists, `false` on the last page.\n- `total` is **not returned**. For the exact count, send the same filters without `fastPagination`; `pageLimit: 0` returns only `total`.\n- With `page`, the last page inside the **10,000**-result window returns `hasMore: false` even when more contacts match. Use `searchAfter` to page past it.\n\nResponse without `fastPagination` (default)\n\n```json\n{\n  \"contacts\": [\n    {\n      \"id\": \"102goXVW3lIExEQPOnd3\",\n      \"searchAfter\": [\n        1730700000000,\n        \"102goXVW3lIExEQPOnd3\"\n      ]\n    }\n  ],\n  \"total\": 1245\n}\n```\n\nResponse with `fastPagination: true`\n\n```json\n{\n  \"contacts\": [\n    {\n      \"id\": \"102goXVW3lIExEQPOnd3\",\n      \"searchAfter\": [\n        1730700000000,\n        \"102goXVW3lIExEQPOnd3\"\n      ]\n    }\n  ],\n  \"hasMore\": true\n}\n```",
            "default": false,
            "example": false
          }
        },
        "title": "SearchBodyV2DTO"
      },
      "SearchContactSuccessResponseDto": {
        "type": "object",
        "properties": {
          "contacts": {
            "description": "List of contacts matching the search criteria. Omitted when `pageLimit` is 0.",
            "example": [
              {
                "id": "102goXVW3lIExEQPOnd3",
                "locationId": "502goXVW3lIExEQPOnd3",
                "firstName": "john",
                "lastName": "doe",
                "email": "john@example.com",
                "phone": "+123456789",
                "dateAdded": "2024-06-06T18:54:57.221Z"
              }
            ],
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Unique identifier of the contact",
                  "example": "102goXVW3lIExEQPOnd3"
                },
                "phoneLabel": {
                  "type": "string",
                  "description": "Label for the phone number type",
                  "example": "Mobile"
                },
                "country": {
                  "type": "string",
                  "description": "Country of the contact",
                  "example": "United States"
                },
                "address": {
                  "type": "string",
                  "description": "Street address of the contact",
                  "example": "123 Main Street"
                },
                "source": {
                  "type": "string",
                  "description": "Source from which the contact was created",
                  "example": "Website"
                },
                "type": {
                  "type": "string",
                  "description": "Contact type classification",
                  "example": "lead"
                },
                "locationId": {
                  "type": "string",
                  "description": "Location Id the contact belongs to",
                  "example": "502goXVW3lIExEQPOnd3"
                },
                "dnd": {
                  "type": "boolean",
                  "description": "Global Do Not Disturb switch for all channels; always returned, `false` when never set, and when `true` every channel is blocked irrespective of current `dndSettings`",
                  "example": false
                },
                "state": {
                  "type": "string",
                  "description": "State of the contact",
                  "example": "California"
                },
                "businessName": {
                  "type": "string",
                  "description": "Business name associated with the contact",
                  "example": "Acme Corporation"
                },
                "customFields": {
                  "description": "List of custom field values for the contact",
                  "example": [
                    {
                      "id": "6dvNaf7VhkQ9snc5vnjJ",
                      "value": "My Text"
                    }
                  ],
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique identifier of the custom field",
                        "example": "MgobCB14YMVKuE4Ka8p1"
                      },
                      "value": {
                        "type": "string",
                        "description": "Value of the custom field",
                        "example": "name"
                      }
                    },
                    "title": "CustomFieldSchema"
                  }
                },
                "tags": {
                  "description": "List of tags associated with the contact",
                  "example": [
                    "tag-1",
                    "tag-2"
                  ],
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "dateAdded": {
                  "type": "string",
                  "description": "Date and time the contact was added (ISO 8601)",
                  "example": "2024-06-06T18:54:57.221Z"
                },
                "additionalEmails": {
                  "description": "Additional email addresses of the contact",
                  "example": [
                    {
                      "email": "john@example.com"
                    },
                    {
                      "email": "jane@example.com"
                    }
                  ],
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "email": {
                        "type": "string",
                        "description": "Additional email address",
                        "example": "john.alt@example.com"
                      }
                    },
                    "title": "ContactAdditionalEmail"
                  }
                },
                "phone": {
                  "type": "string",
                  "description": "Phone number of the contact",
                  "example": "+123456789"
                },
                "companyName": {
                  "type": "string",
                  "description": "Company name of the contact",
                  "example": "XYZ Corp"
                },
                "additionalPhones": {
                  "description": "Additional phone numbers of the contact",
                  "example": [
                    {
                      "phone": "123456789",
                      "phoneLabel": "Home"
                    },
                    {
                      "phone": "987654321",
                      "phoneLabel": "Work"
                    }
                  ],
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "phone": {
                        "type": "string",
                        "description": "Additional phone number",
                        "example": "+15551234567"
                      },
                      "phoneLabel": {
                        "type": "string",
                        "description": "Label for the additional phone (e.g. Home, Work)",
                        "example": "Home"
                      }
                    },
                    "title": "ContactAdditionalPhone"
                  }
                },
                "dateUpdated": {
                  "type": "string",
                  "description": "Date and time the contact was last updated (ISO 8601)",
                  "example": "2024-06-06T18:54:57.221Z"
                },
                "lastActivity": {
                  "type": "string",
                  "description": "Date and time of the last conversation activity on the contact (ISO 8601)",
                  "example": "2024-06-06T18:54:57.221Z"
                },
                "city": {
                  "type": "string",
                  "description": "City of the contact",
                  "example": "New York"
                },
                "dateOfBirth": {
                  "type": "string",
                  "description": "Date of birth of the contact (ISO 8601)",
                  "example": "1990-01-01"
                },
                "firstName": {
                  "type": "string",
                  "description": "First name of the contact",
                  "example": "john"
                },
                "lastName": {
                  "type": "string",
                  "description": "Last name of the contact",
                  "example": "doe"
                },
                "firstNameLowerCase": {
                  "type": "string",
                  "description": "Lowercase version of the contact first name",
                  "example": "john"
                },
                "lastNameLowerCase": {
                  "type": "string",
                  "description": "Lowercase version of the contact last name",
                  "example": "doe"
                },
                "email": {
                  "type": "string",
                  "description": "Email address of the contact",
                  "example": "john@example.com"
                },
                "assignedTo": {
                  "type": "string",
                  "description": "User Id assigned to the contact",
                  "example": "182goXVW3lIExEQPOnd3"
                },
                "followers": {
                  "description": "List of user Ids following this contact",
                  "example": [
                    "682goXVW3lIExEQPOnd3",
                    "582goXVW3lIExEQPOnd3"
                  ],
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "validEmail": {
                  "type": "boolean",
                  "description": "Whether the contact email is valid",
                  "example": true
                },
                "dndSettings": {
                  "type": "object",
                  "description": "Per-channel DND settings, keyed by channel (`Call`, `Email`, `SMS`, `WhatsApp`, `GMB`, `FB`, `RCS`) on every Version, each with `status`, `message` and `code`; an empty object when never set, and a missing channel means `inactive`",
                  "example": {
                    "Call": {
                      "status": "active",
                      "message": "Do not call"
                    },
                    "Email": {
                      "status": "inactive"
                    }
                  }
                },
                "inboundDndSettings": {
                  "type": "object",
                  "description": "Do Not Disturb for inbound communication from the contact, independent of `dnd` and `dndSettings`; an empty object when never set, and when `all` is `active` inbound calls and SMS from the contact are blocked",
                  "example": {
                    "all": {
                      "status": "active",
                      "message": "Do not contact me"
                    }
                  }
                },
                "website": {
                  "type": "string",
                  "description": "Website URL of the contact",
                  "example": "https://www.tesla.com"
                },
                "contactName": {
                  "type": "string",
                  "description": "Full name of the contact",
                  "example": "john doe"
                },
                "timezone": {
                  "type": "string",
                  "description": "Timezone of the contact",
                  "example": "Asia/Calcutta"
                },
                "attributionSource": {
                  "type": "object",
                  "description": "First-touch attribution source details for the contact",
                  "example": {
                    "sessionSource": "Paid Search",
                    "medium": "cpc",
                    "campaign": "Summer Sale",
                    "referrer": "https://www.google.com"
                  }
                },
                "lastAttributionSource": {
                  "type": "object",
                  "description": "Last-touch attribution source details for the contact",
                  "example": {
                    "sessionSource": "Organic Search",
                    "medium": "organic",
                    "referrer": "https://www.google.com"
                  }
                },
                "opportunities": {
                  "type": "array",
                  "description": "List of opportunities associated with the contact, each with `id`, `pipeline_id`, `pipeline_stage_id`, `monetary_value` and `status`",
                  "items": {
                    "type": "object"
                  },
                  "example": [
                    {
                      "id": "1a2b3c4d5e6f7g8h9i0j",
                      "pipeline_id": "pipeline123",
                      "pipeline_stage_id": "stage456",
                      "monetary_value": 10000,
                      "status": "open"
                    }
                  ]
                },
                "postalCode": {
                  "type": "string",
                  "description": "Postal code of the contact",
                  "example": "12345"
                },
                "businessId": {
                  "type": "string",
                  "description": "Business Id the contact is associated with",
                  "example": "282goXVW3lIExEQPOnd3"
                },
                "searchAfter": {
                  "type": "array",
                  "description": "Cursor values for Elasticsearch search-after pagination",
                  "example": [
                    1234,
                    "102goXVW3lIExEQPOnd3"
                  ],
                  "items": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      }
                    ]
                  }
                }
              },
              "title": "Contact"
            }
          },
          "total": {
            "type": "number",
            "description": "Total number of contacts matching the search criteria. Not returned when `fastPagination` is true; for the exact count, send the same filters without `fastPagination`.",
            "example": 120
          },
          "hasMore": {
            "type": "boolean",
            "description": "Returned only when `fastPagination` is true, in place of `total`. `true` when another page exists, `false` on the last page.",
            "example": true
          }
        },
        "title": "SearchContactSuccessResponseDto"
      }
    }
  }
}
```

## Code Examples

**cURL**

```bash
curl -L -X POST 'https://services.leadconnectorhq.com/contacts/search' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Version: v3' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "locationId": "5DP41231LkQsiKESj6rh",
  "pageLimit": 20,
  "page": 1,
  "searchAfter": [
    1700000000000,
    "ocQHyuzHvysMo5N5VsXc"
  ],
  "query": "tom",
  "filters": [
    {
      "field": "dnd",
      "operator": "eq",
      "value": true
    },
    {
      "field": "dateUpdated",
      "operator": "range",
      "value": {
        "gte": "2026-11-01T00:00:00Z"
      }
    },
    {
      "group": "OR",
      "filters": [
        {
          "field": "firstNameLowerCase",
          "operator": "eq",
          "value": "alex"
        },
        {
          "field": "lastNameLowerCase",
          "operator": "eq",
          "value": "peter"
        }
      ]
    }
  ],
  "sort": [
    {
      "field": "firstNameLowerCase",
      "direction": "desc"
    }
  ],
  "assignedTo": "182goXVW3lIExEQPOnd3",
  "fastPagination": false
}'
```

**Node.js**

```javascript
const options = {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <TOKEN>',
    Version: 'v3',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
      "locationId": "5DP41231LkQsiKESj6rh",
      "pageLimit": 20,
      "page": 1,
      "searchAfter": [
        1700000000000,
        "ocQHyuzHvysMo5N5VsXc"
      ],
      "query": "tom",
      "filters": [
        {
          "field": "dnd",
          "operator": "eq",
          "value": true
        },
        {
          "field": "dateUpdated",
          "operator": "range",
          "value": {
            "gte": "2026-11-01T00:00:00Z"
          }
        },
        {
          "group": "OR",
          "filters": [
            {
              "field": "firstNameLowerCase",
              "operator": "eq",
              "value": "alex"
            },
            {
              "field": "lastNameLowerCase",
              "operator": "eq",
              "value": "peter"
            }
          ]
        }
      ],
      "sort": [
        {
          "field": "firstNameLowerCase",
          "direction": "desc"
        }
      ],
      "assignedTo": "182goXVW3lIExEQPOnd3",
      "fastPagination": false
  })
};

try {
  const response = await fetch('https://services.leadconnectorhq.com/contacts/search', options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

**Python**

```python
import requests

url = "https://services.leadconnectorhq.com/contacts/search"

headers = {
    "Authorization": "Bearer <TOKEN>",
    "Version": "v3"
}

payload = {
    "locationId": "5DP41231LkQsiKESj6rh",
    "pageLimit": 20,
    "page": 1,
    "searchAfter": [
        1700000000000,
        "ocQHyuzHvysMo5N5VsXc"
    ],
    "query": "tom",
    "filters": [
        {
            "field": "dnd",
            "operator": "eq",
            "value": true
        },
        {
            "field": "dateUpdated",
            "operator": "range",
            "value": {
                "gte": "2026-11-01T00:00:00Z"
            }
        },
        {
            "group": "OR",
            "filters": [
                {
                    "field": "firstNameLowerCase",
                    "operator": "eq",
                    "value": "alex"
                },
                {
                    "field": "lastNameLowerCase",
                    "operator": "eq",
                    "value": "peter"
                }
            ]
        }
    ],
    "sort": [
        {
            "field": "firstNameLowerCase",
            "direction": "desc"
        }
    ],
    "assignedTo": "182goXVW3lIExEQPOnd3",
    "fastPagination": false
}

response = requests.post(url, json=payload, headers=headers)
print(response.json())
```

**PHP**

```php
<?php
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://services.leadconnectorhq.com/contacts/search',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_HTTPHEADER => [
    'Authorization: Bearer <TOKEN>',
    'Version: v3',
    'Content-Type: application/json',
  ],
  CURLOPT_POSTFIELDS => '{
  "locationId": "5DP41231LkQsiKESj6rh",
  "pageLimit": 20,
  "page": 1,
  "searchAfter": [
    1700000000000,
    "ocQHyuzHvysMo5N5VsXc"
  ],
  "query": "tom",
  "filters": [
    {
      "field": "dnd",
      "operator": "eq",
      "value": true
    },
    {
      "field": "dateUpdated",
      "operator": "range",
      "value": {
        "gte": "2026-11-01T00:00:00Z"
      }
    },
    {
      "group": "OR",
      "filters": [
        {
          "field": "firstNameLowerCase",
          "operator": "eq",
          "value": "alex"
        },
        {
          "field": "lastNameLowerCase",
          "operator": "eq",
          "value": "peter"
        }
      ]
    }
  ],
  "sort": [
    {
      "field": "firstNameLowerCase",
      "direction": "desc"
    }
  ],
  "assignedTo": "182goXVW3lIExEQPOnd3",
  "fastPagination": false
}',
]);

$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

**Java**

```java
HttpResponse<String> response = Unirest
  .post("https://services.leadconnectorhq.com/contacts/search")
  .header("Authorization", "Bearer <TOKEN>")
  .header("Version", "v3")
  .header("Content-Type", "application/json")
  .body("{\"locationId\":\"5DP41231LkQsiKESj6rh\",\"pageLimit\":20,\"page\":1,\"searchAfter\":[1700000000000,\"ocQHyuzHvysMo5N5VsXc\"],\"query\":\"tom\",\"filters\":[{\"field\":\"dnd\",\"operator\":\"eq\",\"value\":true},{\"field\":\"dateUpdated\",\"operator\":\"range\",\"value\":{\"gte\":\"2026-11-01T00:00:00Z\"}},{\"group\":\"OR\",\"filters\":[{\"field\":\"firstNameLowerCase\",\"operator\":\"eq\",\"value\":\"alex\"},{\"field\":\"lastNameLowerCase\",\"operator\":\"eq\",\"value\":\"peter\"}]}],\"sort\":[{\"field\":\"firstNameLowerCase\",\"direction\":\"desc\"}],\"assignedTo\":\"182goXVW3lIExEQPOnd3\",\"fastPagination\":false}")
  .asString();
```

**Go**

```go
package main

import (
  "fmt"
  "net/http"
  "io"
  "strings"
)

func main() {
  url := "https://services.leadconnectorhq.com/contacts/search"
  payload := strings.NewReader(`{
  "locationId": "5DP41231LkQsiKESj6rh",
  "pageLimit": 20,
  "page": 1,
  "searchAfter": [
    1700000000000,
    "ocQHyuzHvysMo5N5VsXc"
  ],
  "query": "tom",
  "filters": [
    {
      "field": "dnd",
      "operator": "eq",
      "value": true
    },
    {
      "field": "dateUpdated",
      "operator": "range",
      "value": {
        "gte": "2026-11-01T00:00:00Z"
      }
    },
    {
      "group": "OR",
      "filters": [
        {
          "field": "firstNameLowerCase",
          "operator": "eq",
          "value": "alex"
        },
        {
          "field": "lastNameLowerCase",
          "operator": "eq",
          "value": "peter"
        }
      ]
    }
  ],
  "sort": [
    {
      "field": "firstNameLowerCase",
      "direction": "desc"
    }
  ],
  "assignedTo": "182goXVW3lIExEQPOnd3",
  "fastPagination": false
}`)
  req, _ := http.NewRequest("POST", url, payload)
  req.Header.Add("Authorization", "Bearer <TOKEN>")
  req.Header.Add("Version", "v3")

  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)
  fmt.Println(string(body))
}
```

**Ruby**

```ruby
require 'uri'
require 'net/http'

url = URI("https://services.leadconnectorhq.com/contacts/search")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <TOKEN>"
request["Version"] = "v3"
request["Content-Type"] = "application/json"
request.body = '{
  "locationId": "5DP41231LkQsiKESj6rh",
  "pageLimit": 20,
  "page": 1,
  "searchAfter": [
    1700000000000,
    "ocQHyuzHvysMo5N5VsXc"
  ],
  "query": "tom",
  "filters": [
    {
      "field": "dnd",
      "operator": "eq",
      "value": true
    },
    {
      "field": "dateUpdated",
      "operator": "range",
      "value": {
        "gte": "2026-11-01T00:00:00Z"
      }
    },
    {
      "group": "OR",
      "filters": [
        {
          "field": "firstNameLowerCase",
          "operator": "eq",
          "value": "alex"
        },
        {
          "field": "lastNameLowerCase",
          "operator": "eq",
          "value": "peter"
        }
      ]
    }
  ],
  "sort": [
    {
      "field": "firstNameLowerCase",
      "direction": "desc"
    }
  ],
  "assignedTo": "182goXVW3lIExEQPOnd3",
  "fastPagination": false
}'

response = http.request(request)
puts response.read_body
```

**PowerShell**

```powershell
$headers = @{
  "Authorization" = "Bearer <TOKEN>"
  "Version" = "v3"
}

$body = '{
  "locationId": "5DP41231LkQsiKESj6rh",
  "pageLimit": 20,
  "page": 1,
  "searchAfter": [
    1700000000000,
    "ocQHyuzHvysMo5N5VsXc"
  ],
  "query": "tom",
  "filters": [
    {
      "field": "dnd",
      "operator": "eq",
      "value": true
    },
    {
      "field": "dateUpdated",
      "operator": "range",
      "value": {
        "gte": "2026-11-01T00:00:00Z"
      }
    },
    {
      "group": "OR",
      "filters": [
        {
          "field": "firstNameLowerCase",
          "operator": "eq",
          "value": "alex"
        },
        {
          "field": "lastNameLowerCase",
          "operator": "eq",
          "value": "peter"
        }
      ]
    }
  ],
  "sort": [
    {
      "field": "firstNameLowerCase",
      "direction": "desc"
    }
  ],
  "assignedTo": "182goXVW3lIExEQPOnd3",
  "fastPagination": false
}'

$response = Invoke-RestMethod -Uri 'https://services.leadconnectorhq.com/contacts/search' -Method 'POST' -Headers $headers -Body $body -ContentType 'application/json'
$response | ConvertTo-Json
```
