Authentication
The SPAMhunter API uses API keys to identify and authorize calls.
SPAMhunter API expects the API key to be included in all API requests to the server in a header that looks like the following: X-API-Key
The base URL : https://api.spamhunter.io/v1
X-API-Key: 12345678901234567890123456789012
Spam Detection
To check the text for spam, the check method with parameters in the body of the POST request in JSON format is used:
{
"ip": "190.3.77.211",
"content": "That lengthy number on the front of your card is packed with crucial information."
}
In the response comes a spam score. Normally a value of 0.6 above can be considered spam.
Example cURL Command
curl https://api.spamhunter.io/v1/check \
-H "Content-Type: application/json" \
-H "X-API-Key: 12345678901234567890123456789012" \
-d '{
"ip": "190.3.77.211",
"content": "That lengthy number on the front of your card is packed with crucial information."
}'