Prerequisites
To use the SpamZappr API, you need to have:
- An SpamZappr API token.
Endpoint
POST /api/v1/spam_detector
Request Parameters
Parameter | Type | Description |
---|---|---|
message | String | The message that you want to check for spam. |
Example Request
curl -X POST "https://spamzappr.com/api/v1/spam_detector" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_AUTH_TOKEN" \
-d '{"message": "Congratulations! You've won a free iPhone! Click here to claim your prize: http://example.com"}'
Example Response
{
"response": "true",
"message": {
"id": 1,
"body": "Congratulations! You've won a free iPhone! Click here to claim your prize: http://example.com",
"total_tokens": 24
}
}
Response Explanation
The response JSON object contains the following properties:
response
: A boolean value (true or false) indicating whether the provided message is spam or not.message
: An object containing the details of the message and the response generated by GPT-4.
The message
object includes:
id
: The ID of the message in your Rails application.body
: The original message that you wanted to check for spam.total_tokens
: Token usage information.
Usage
To use SpamZappr, send a POST request to the /api/v1/spam_detector
endpoint with the required parameters in the request body. The API will return a JSON object containing the spam detection result (response
) and other message details
To integrate the API into your application, simply make an HTTP request from your application's frontend or backend using a library or method appropriate for your programming language or framework. Be sure to include your authentication token in the request header.
Error Handling
If an error occurs while processing your request, SpamZappr will return an error response with a corresponding HTTP status code and a JSON object containing an error message.
Common error cases include:
- Missing or incorrect API key
- Invalid request parameters
- Server-side issues or rate limiting
When integrating SpamZappr, be sure to implement proper error handling to ensure a smooth user experience and gracefully handle any issues that may arise.
Support
If you need assistance or have any questions regarding SpamZappr, please feel free to contact our support team at [email protected].
Prerequisites
To use the SpamZappr API, you need to have:
- An SpamZappr API token.
Endpoint
POST /api/v1/spam_detector_pro
Request Parameters
Parameter | Type | Description |
---|---|---|
message | String | The message that you want to check for spam. |
Example Request
curl -X POST "https://spamzappr.com/api/v1/spam_detector_pro" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_AUTH_TOKEN" \
-d '{"message": "Congratulations! You've won a free iPhone! Click here to claim your prize: http://example.com"}'
Example Response
{
"response": "true",
"reason": "The message contains a false reward claim and an unrelated link to the user's website and app description.",
"message": {
"id": 1,
"body": "Congratulations! You've won a free iPhone! Click here to claim your prize: http://example.com",
"total_tokens": 24
}
}
Response Explanation
The response JSON object contains the following properties:
response
: A boolean value (true or false) indicating whether the provided message is spam or not.message
: An object containing the details of the message and the response generated by GPT-4.
The message
object includes:
id
: The ID of the message in your Rails application.body
: The original message that you wanted to check for spam.total_tokens
: Token usage information.
Usage
To use SpamZappr, send a POST request to the /api/v1/spam_detector_pro
endpoint with the required parameters in the request body. The API will return a JSON object containing the spam detection result (response
) and other message details
To integrate the API into your application, simply make an HTTP request from your application's frontend or backend using a library or method appropriate for your programming language or framework. Be sure to include your authentication token in the request header.
Error Handling
If an error occurs while processing your request, SpamZappr will return an error response with a corresponding HTTP status code and a JSON object containing an error message.
Common error cases include:
- Missing or incorrect API key
- Invalid request parameters
- Server-side issues or rate limiting
When integrating SpamZappr, be sure to implement proper error handling to ensure a smooth user experience and gracefully handle any issues that may arise.
Support
If you need assistance or have any questions regarding SpamZappr, please feel free to contact our support team at [email protected].