Description
This API is used to:
- Fetch summary of sent emails for a specific time range.
- Track email delivery by domain.
- Useful for monitoring outbound email performance via Webuzo.
Parameters
Simple code
curl --insecure -u "USERNAME:PASSWORD" -d "domain=example.com" -X POST "https://Server-IP-or-Hostname:2003/index.php?api=json&act=email_sent_summary"
<?php
$user = 'Webuzo Username';
$pass = 'Password';
$host = 'Server IP / Hostname';
$url = 'https://'.rawurlencode($user).':'.rawurlencode($pass).'@'.$host.':2003/index.php?api=json&act=email_sent_summary';
// Email sent summary for specific Date time
$post = array(
'start_date' => '2025-05-15T22:08', // Start Date
'end_date' => '2025-05-17T22:08', // Stop Date
);
// Track Email Delivery
$post = array(
'domain' => 'bob.res206.compilor.com',
);
// Set the curl parameters
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
if(!empty($post)){
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post));
}
// Get response from the server.
$resp = curl_exec($ch);
if(!empty(curl_error($ch))){
echo curl_error($ch); die();
}
// The response will hold a string as per the API response method.
$res = json_decode($resp, true);
print_r($res);
?>