> 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

### 📋 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"
    }
  ]
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://api.senderwiz.com/admin/customer/get-all-customers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
