Sending Statistics
This request is used to retrieve sending statistics over a specific period. It returns the number of SMS sent and the associated cost.
URL
Required Parameters
Name
Value
Requests
<?php
$apiKey = 'YOUR_API_KEY';
$url = 'https://api.smspartner.fr/v1/statistics/cost-resume?apiKey=' . $apiKey . '&interval=last_twelve_months';
// Initialise cURL session
$ch = curl_init($url);
// Set cURL options
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// Execute cURL session and fetch the result
$response = curl_exec($ch);
// Handle errors
if (curl_errno($ch)) {
echo 'Erreur: ' . curl_error($ch);
} else {
// Decode the result
$data = json_decode($response, true);
print_r($data);
}
// Close cURL session
curl_close($ch);
?>Response
Last updated