> For the complete documentation index, see [llms.txt](https://api.senderwiz.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api.senderwiz.com/customer/subscribers/search-by-custom-fields-in-a-list.md).

# Search by Custom Fields in a List

### 🧩 Search by Custom Fields in a List

Search subscribers using any available custom field (like `EMAIL`, `FNAME`, etc.) in a specific list.

***

#### 🔹 HTTP Request

```http
GET API-URL/lists/LIST-UNIQUE-ID/subscribers/search-by-custom-fields
```

***

#### 🔸 URL Segments

| Segment          | Required | Description                    |
| ---------------- | -------- | ------------------------------ |
| `LIST-UNIQUE-ID` | Yes      | Unique identifier of the list. |

***

#### 🔎 Query Parameters

| Parameter | Required / Default | Description                                   |
| --------- | ------------------ | --------------------------------------------- |
| array     | Yes                | Array of custom fields `{ 'FIELD' => 'VAL' }` |
| page      | 1                  | Page number to retrieve.                      |
| per\_page | 10                 | Items per page to retrieve.                   |

***

#### 🔐 Authorization Header

```
X-API-KEY: your-api-key-here
```

***

#### 💻 PHP Example

```php
// SEARCH BY CUSTOM FIELDS IN A LIST
$response = $endpoint->searchByCustomFields('LIST-UNIQUE-ID', [
    'EMAIL' => 'chloe.bennett@mockmail.net'
]);

// DISPLAY RESPONSE
echo '<hr /><pre>';
print_r($response->body);
echo '</pre>';
```

***

#### 📦 Sample JSON Response

```json
{
  "status": "success",
  "data": {
    "subscriber_uid": "uv445mnqsla78",
    "EMAIL": "chloe.bennett@mockmail.net",
    "FNAME": "",
    "LNAME": "",
    "status": "unsubscribed",
    "source": "import",
    "ip_address": "",
    "date_added": "2025-03-28 14:10:45"
  }
}
```
