CleanTalk Anti-Spam "monitoring_services_add" API method description
This method is used to add new URLs for website monitoring.
For it to work, the user must have an active monitoring license with available slots remaining.
Request
Data JSON Example
{
"method_name": "monitoring_services_add",
"user_token": "your_user_token",
"URL": "https://cleantalk.org",
"http_method": "GET",
"checks_interval": "120",
"email_notification_delay": "900",
"checkpoints": "1,18"
}
Data Processing
Necessary information about the data processing.
Parameter | Explanation |
---|---|
HTTP Method | GET or POST |
Data format | JSON |
URL | https://api.cleantalk.org |
Required Parameters
These parameters are required.
Parameter | Explanation |
---|---|
method_name | Must be "monitoring_services_add". |
user_token | User token. To obtain a token please get an account here |
URL |
URL of the resource to monitor |
Additional parameters
These parameters can be used to customize your monitor.
Parameter | Explanation |
---|---|
http_method | The method that will be used to retrieve data from checkpoints. Supported types are HEAD and GET |
check_interval | Frequency of checks in seconds. Possible values: 60, 120, 180, 300, 600, 900, 1800, 3600 |
email_notification_delay |
Delay before sending email notification in seconds. Possible values: 0, 60, 300, 900, 1800, 3600 |
checkpoints |
Identifiers of specific checkpoints to use when monitoring this service (no more than 2 at a time). |
Response
Response example
The server's response is independent of the platform.
{
"data": {
"monitors": {
"0": {
"monitor_id": 123,
"operation_status": "SUCCESS"
},
"1": {
"operation_status": "FAILED'",
"operation_message": "Same URL already exists in your list. Please choose another one",
"operation_code": "6"
}
}
}
}
Response Explanation
Key | Explanation |
---|---|
monitors | List of monitors with operation results |
monitor_id | Monitor ID, provided if the operation has succeeded |
operation_status | Status of the operation, SUCCESS or FAILED |
operation_message | Error description in case of failure |
operation_code | Error code in case of failure |
Code Examples
Using Wget
CLI example
wget -O- https://api.cleantalk.org/?method_name=monitoring_services_add&URL=cleantalk.org&user_token=someTokenValue
Using PHP
PHP backend
<?php $url = "https://api.cleantalk.org/?method_name=monitoring_services_add&URL=cleantalk.org&user_token=someTokenValue"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // Use true in production $response = curl_exec($ch); $responseString = "Response:\n" . $response"; curl_close($ch);
Related Links
Available features related to the method:
It would also be interesting
- Anti-Spam API, Libraries, ClassesBuilt-in Libraries PHP Perl 5 Python 2/3 .NET 4.5 (C#) YII Framework YII 2 Framework Ruby ...
- CleanTalk Anti-Spam monitoring_services_get API MethodCleanTalk Anti-Spam "monitoring_services_get" API method description This method returns list of resources...
- Spam Check API - API Method email_check_cmsAPI Method "email_check_cms" CMS-related version of email_check This method performs short email checking...