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

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

// 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

{
  "status": "success",
  "current_page": 1,
  "per_page": 20,
  "total": 48,
  "data": [
    {
      "customer_uid": "ab382plq98zr7",
      "first_name": "Emma",
      "last_name": "Smith",
      "email": "[email protected]",
      "status": "active",
      "group": "Pro-Group"
    },
    {
      "customer_uid": "h3k92mrb7s8qt",
      "first_name": "Liam",
      "last_name": "Smith",
      "email": "[email protected]",
      "status": "inactive",
      "group": "Basic-Group"
    }
  ]
}

Last updated