Fetch and display the full list of customer groups created in your SenderWiz account, including group names, customer counts, and timestamps.
X-ADMIN-API-KEY: your-admin-api-key-here
// GET ALL CUSTOMER GROUPS
$response = $endpoint->getCustomerGroups($pageNumber = 1, $perPage = 10);
// DISPLAY RESPONSE
echo '<hr /><pre>';
print_r($response->body);
echo '</pre>';
{
"status": "success",
"data": {
"count": "7",
"total_pages": 1,
"current_page": 1,
"next_page": null,
"prev_page": null,
"records": [
{
"group_uid": "bg8432hl4n8pq",
"name": "Business-Group",
"customers_count": 0,
"date_added": "2023-12-17 20:21:00",
"last_updated": "2025-02-24 09:33:00"
},
{
"group_uid": "eg2187hj7kw37",
"name": "Enterprise Group",
"customers_count": 0,
"date_added": "2024-12-16 11:17:00",
"last_updated": "2025-02-24 09:31:00"
},
{
"group_uid": "ex4598pf4q2op",
"name": "Expired",
"customers_count": 4,
"date_added": "2023-11-05 18:59:00",
"last_updated": "2024-12-05 15:03:00"
},
{
"group_uid": "pg4372rk0os39",
"name": "Pro-Group",
"customers_count": 2,
"date_added": "2022-11-21 22:37:00",
"last_updated": "2025-04-09 22:36:00"
},
{
"group_uid": "sg3128vw4lt75",
"name": "Starter-Group",
"customers_count": 0,
"date_added": "2022-09-20 23:18:00",
"last_updated": "2025-02-24 09:32:00"
},
{
"group_uid": "tr7483as5mp29",
"name": "Trial",
"customers_count": 0,
"date_added": "2023-10-20 14:57:00",
"last_updated": "2025-02-01 23:42:00"
},
{
"group_uid": "ug2398pk7ad84",
"name": "Unlimited-Group",
"customers_count": 1,
"date_added": "2022-11-21 22:38:00",
"last_updated": "2025-03-30 11:07:00"
}
]
}
}