Returns the exact numbers of how many spam and valid submissions your project received in the last days.
Because mosparo deletes the submissions after 14 days, the statistic API will only return the data from the last 14 days.
To secure the API endpoint, authentication is required. The
Authorization header must be sent with the request. You must set the project's public key in the header as the username. An HMAC SHA256 hash of the API endpoint URL combined with the request data, serialized as JSON, must be set as the password. The private key will be used as the key for the HMAC SHA256 hash.
Authorization: [base64 of <publicKey>:<hmacHash>]
$privateKey = 'stH6Ugo4FcbQLp6_KPlOYltFMHfY59rxCUQRk3_AxYQ';
$apiEndpoint = '/api/v1/statistic/by-date';
$formData = ;
$hmacHash = hash_hmac('sha256', $apiEndpoint . json_encode($formData), $privateKey);
$authHeader = base64_encode($hmacHash);
|Integer||Optional||The number of seconds for which mosparo should return the numbers (|
If mosparo completed the request successfully, the following properties would be present in the answer:
|Boolean||If the request was successful, the |
|Object||Contains the statistic data (see Properties of |
If an error occurred, only the following properties would be present in the answer:
|Boolean||If true, an error occurred.|
|String||The description of the error which occurred.|
|Integer||The number of valid submissions in the selected range.|
|Integer||The number of submissions as spam in the selected range.|
|Object||Contains the statistic data for every day in the selected range (see Properties of |
|Integer||The number of valid submissions for the date.|
|Integer||The number of submissions as spam for the date.|