> 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/admin/customer/get-all-customers.md).

# Get All Customers

Fetch a paginated list of all customers from your SenderWiz account using the Admin API with optional filters.

### 📋 Get All Customers

Retrieve a list of all customers created in your SenderWiz account using the Admin API. This endpoint returns paginated results.

#### 🔹 HTTP Request

```html
GET ADMIN-API-URL/customers
```

#### 🔸 Query Parameters (Optional)

| Parameter  | Type   | Required | Description                                           |
| ---------- | ------ | -------- | ----------------------------------------------------- |
| `page`     | int    | No       | The result page number (default is 1)                 |
| `per_page` | int    | No       | Number of records per page (default is 10, max is 50) |
| `search`   | string | No       | Search by name or email                               |
| `status`   | string | No       | Search by status 'active' or 'inactive'               |

#### 🔐 Authorization Header

Include your Admin API key:

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

#### 💻 PHP Example

```php
// GET ALL CUSTOMERS
$response = $endpoint->getCustomers([
    'page'     => 1,
    'per_page' => 20,
    'search'   => 'Smith'
]);

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

#### 📦 Sample JSON Response

```json
{
  "status": "success",
  "current_page": 1,
  "per_page": 20,
  "total": 48,
  "data": [
    {
      "customer_uid": "ab382plq98zr7",
      "first_name": "Emma",
      "last_name": "Smith",
      "email": "emma.waters@demo.com",
      "status": "active",
      "group": "Pro-Group"
    },
    {
      "customer_uid": "h3k92mrb7s8qt",
      "first_name": "Liam",
      "last_name": "Smith",
      "email": "liam.smith@demo.com",
      "status": "inactive",
      "group": "Basic-Group"
    }
  ]
}
```
