> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://rockwell.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://rockwell.ferndocs.com/_mcp/server.

# Search Contacts

GET https://connect.plex.com/crm/v1/contacts/search

Search contacts using flexible query criteria.

Reference: https://rockwell.ferndocs.com/api-reference/contacts-api/search-contacts

## Request

### Query parameters

- `query` (string, optional) — Search term to match against name, email, or company name
- `firstName` (string, optional) — Filter by first name (partial match)
- `lastName` (string, optional) — Filter by last name (partial match)
- `email` (string, optional) — Filter by email address (partial match)
- `companyName` (string, optional) — Filter by company name (partial match)

## Response

### 200

Success Response

- `data` (list of CrmV1ContactsSearchGetResponsesContentApplicationJsonSchemaDataItems, optional)
- `total` (integer, optional)
- `query` (string, optional)

## Errors

### 400 Bad Request Error

Bad Request - Invalid Query Parameters

- `error` (CrmV1ContactsSearchGetResponsesContentApplicationJsonSchemaError, optional)

### 401 Unauthorized Error

Unauthorized - Missing Token

- `error` (CrmV1ContactsSearchGetResponsesContentApplicationJsonSchemaError, optional)

### 403 Forbidden Error

Forbidden - Insufficient Permissions

- `error` (CrmV1ContactsSearchGetResponsesContentApplicationJsonSchemaError, optional)

### 429 Too Many Requests Error

Rate Limit Exceeded

- `error` (CrmV1ContactsSearchGetResponsesContentApplicationJsonSchemaError, optional)

### 503 Service Unavailable Error

Service Unavailable

- `error` (CrmV1ContactsSearchGetResponsesContentApplicationJsonSchemaError, optional)

## Types

### CrmV1ContactsSearchGetResponsesContentApplicationJsonSchemaDataItems

- `id` (string, optional)
- `customerId` (string, optional)
- `firstName` (string, optional)
- `lastName` (string, optional)
- `email` (string, optional)
- `phone` (string, optional)
- `title` (string, optional)
- `companyName` (string, optional)
- `type` (string, optional)
- `matchedFields` (list of string, optional)
- `relevanceScore` (double, optional)

### CrmV1ContactsSearchGetResponsesContentApplicationJsonSchemaError

- `code` (string, optional)
- `message` (string, optional)
- `details` (list of CrmV1ContactsSearchGetResponsesContentApplicationJsonSchemaErrorDetailsItems, optional)
- `timestamp` (datetime, optional)
- `requestId` (string, optional)

### CrmV1ContactsSearchGetResponsesContentApplicationJsonSchemaErrorDetailsItems

- `issue` (string, optional)
- `estimatedRestoration` (datetime, optional)
- `retryAfter` (integer, optional)
- `action` (string, optional)
- `statusPage` (string, optional)

## Examples

**Response**

```json
{
  "data": [
    {
      "id": "contact-123e4567-e89b-12d3-a456-426614174000",
      "customerId": "123e4567-e89b-12d3-a456-426614174000",
      "firstName": "John",
      "lastName": "Smith",
      "email": "john.smith@example.com",
      "phone": "+1-555-0123",
      "title": "Senior Purchasing Manager",
      "companyName": "ACME Corporation",
      "type": "Business",
      "matchedFields": [
        "lastName",
        "email"
      ],
      "relevanceScore": 0.95
    }
  ],
  "total": 1,
  "query": "Smith"
}
```

**SDK Code**

```python searchContacts_example
import requests

url = "https://connect.plex.com/crm/v1/contacts/search"

response = requests.get(url)

print(response.json())
```

```javascript searchContacts_example
const url = 'https://connect.plex.com/crm/v1/contacts/search';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go searchContacts_example
package main

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

func main() {

	url := "https://connect.plex.com/crm/v1/contacts/search"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

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

url = URI("https://connect.plex.com/crm/v1/contacts/search")

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

request = Net::HTTP::Get.new(url)

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

```java searchContacts_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://connect.plex.com/crm/v1/contacts/search")
  .asString();
```

```php searchContacts_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://connect.plex.com/crm/v1/contacts/search');

echo $response->getBody();
```

```csharp searchContacts_example
using RestSharp;

var client = new RestClient("https://connect.plex.com/crm/v1/contacts/search");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift searchContacts_example
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://connect.plex.com/crm/v1/contacts/search")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```