### Rate Limit Headers via oopspam endpoint Source: https://www.oopspam.com/docs/ Example response headers from the oopspam endpoint showing the rate limit and remaining requests. ```http X-RateLimit-Limit: 1000 X-RateLimit-Remaining: 998 ``` -------------------------------- ### Rate Limit Headers via RapidAPI endpoint Source: https://www.oopspam.com/docs/ Example response headers from the RapidAPI endpoint showing the rate limit and remaining requests. ```http x-ratelimit-requests-limit: 40 x-ratelimit-requests-remaining: 1 ``` -------------------------------- ### Report endpoint example request body Source: https://www.oopspam.com/docs/ Example JSON request body for POST /spamdetection/report. Includes the required shouldBeSpam field to indicate whether the reported content is spam (true) or ham (false). ```json { "senderIP": "91.203.67.110", "email": "[email protected]", "content": "Dear Agent, We are a manufacturing company which specializes in supplying Aluminum Rod with Zinc Alloy Rod to customers worldwide, based in Japan, Asia. We have been unable to follow up payments effectively for transactions with debtor customers in your country due to our distant locations, thus our reason for requesting for your services representation.", "blockTempEmail": false, "logIt": true, "source": "example.com", "checkForLength": true, "allowedLanguages" : ["en"], "allowedCountries" : ["it","us"], "blockedCountries" : ["ru"], "shouldBeSpam": true } ``` ```json { "message": "success" } ``` -------------------------------- ### Sample JSON response when senderIP is blocked Source: https://www.oopspam.com/docs/ Example response when the senderIP is blocked. The API returns early, so only isIPBlocked and isContentTooShort appear in Details. ```json { "Score": 6, "Details": { "isIPBlocked": true, "isContentTooShort": false } } ``` -------------------------------- ### Spam Detection Request in Ruby Source: https://www.oopspam.com/docs/ Ruby example using Net::HTTP to POST to the spam detection endpoint. Requires an API key and sends content, senderIP, and email. Raises an error on non-success response. ```ruby require 'uri' require 'net/http' require 'json' API_KEY = 'YOUR_API_KEY' API_URL = 'https://api.oopspam.com/v1/spamdetection' def check_for_spam uri = URI(API_URL) http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_PEER request = Net::HTTP::Post.new(uri) request['Content-Type'] = 'application/json' request['X-Api-Key'] = API_KEY request_body = { checkForLength: true, content: "Dear Agent, We are a manufacturing company which specializes in supplying Aluminum Rod with Zinc Alloy Rod to customers worldwide, based in Japan, Asia. We have been unable to follow up payments effectively for transactions with debtor customers in your country due to our distant locations, thus our reason for requesting for your services representation.", senderIP: "185.234.219.246", email: "[email protected]" } request.body = request_body.to_json response = http.request(request) if response.is_a?(Net::HTTPSuccess) JSON.parse(response.body) else raise "Request failed with status: #{response.code}, body: #{response.body}" end end begin result = check_for_spam puts result rescue StandardError => e puts "An error occurred: #{e.message}" end ``` -------------------------------- ### Spam Detection Request in Python Source: https://www.oopspam.com/docs/ Python example using requests to POST to the spam detection endpoint. Requires an API key and sends content, senderIP, and email. Prints the JSON response or an error message. ```python import requests import json API_KEY = 'YOUR_API_KEY' API_URL = 'https://api.oopspam.com/v1/spamdetection' def check_for_spam(): headers = { 'Content-Type': 'application/json', 'X-Api-Key': API_KEY } payload = { 'checkForLength': True, 'content': "Dear Agent, We are a manufacturing company which specializes in supplying Aluminum Rod with Zinc Alloy Rod to customers worldwide, based in Japan, Asia. We have been unable to follow up payments effectively for transactions with debtor customers in your country due to our distant locations, thus our reason for requesting for your services representation.", 'senderIP': "185.234.219.246", 'email': "[email protected]" } try: response = requests.post(API_URL, json=payload, headers=headers) response.raise_for_status() # Raises an HTTPError for bad responses return response.json() except requests.exceptions.RequestException as e: print(f"An error occurred: {e}") return None if __name__ == "__main__": result = check_for_spam() if result: print(json.dumps(result, indent=2)) # Pretty print the JSON response ``` -------------------------------- ### Sample JSON response from OOPSpam API Source: https://www.oopspam.com/docs/ Example response showing the structure returned by the OOPSpam API when all analyses are performed. Includes Score and Details with fields like isIPBlocked, isEmailBlocked, isContentSpam, and spamWords. ```json { "Score": 6, "Details": { "isIPBlocked": true, "isEmailBlocked": true, "isContentSpam": "spam", "langMatch": true, "countryMatch": false, "numberOfSpamWords": 1, "spamWords": [ "dear" ], "isContentTooShort": false } } ``` -------------------------------- ### Safe Domain Response Source: https://www.oopspam.com/docs/ Example JSON response when the domain is safe, showing Blocked as false and an empty Blocker array. ```json { "Blocked": false, "Blocker": [] } ``` -------------------------------- ### Blocked Domain Response Source: https://www.oopspam.com/docs/ Example JSON response when the domain is blocked, showing Blocked as true and the Blocker array listing the flagging providers. ```json { "Blocked": true, "Blocker": [ "SURBL", "Spamhaus" ] } ``` -------------------------------- ### Example response body for OOPSpam API Source: https://www.oopspam.com/docs/ JSON response body showing the Score and Details object with fields like isIPBlocked, isEmailBlocked, isContentSpam, langMatch, countryMatch, numberOfSpamWords, spamWords, and isContentTooShort. ```json { "Score": 6, "Details": { "isIPBlocked": false, "isEmailBlocked": true, "isContentSpam": "spam", "langMatch": true, "countryMatch": false, "numberOfSpamWords": 1, "spamWords": [ "dear" ], "isContentTooShort": false } } ``` -------------------------------- ### Domain Reputation Request Body Source: https://www.oopspam.com/docs/ Example JSON request body for the POST /reputation/domain endpoint. The domain field must be a fully qualified domain name without https, http, or www. ```json { "domain": "example.com" } ``` -------------------------------- ### Example request body for OOPSpam API Source: https://www.oopspam.com/docs/ JSON request body for the OOPSpam API. Includes fields like senderIP, email, content, blockTempEmail, logIt, source, checkForLength, urlFriendly, allowedLanguages, allowedCountries, and blockedCountries. ```json { "senderIP": "91.203.67.110", "email": "[email protected]", "content": "Dear Agent, We are a manufacturing company which specializes in supplying Aluminum Rod with Zinc Alloy Rod to customers worldwide, based in Japan, Asia. We have been unable to follow up payments effectively for transactions with debtor customers in your country due to our distant locations, thus our reason for requesting for your services representation.", "blockTempEmail": false, "logIt": true, "source": "example.com", "checkForLength": true, "urlFriendly": false, "allowedLanguages" : ["en"], "allowedCountries" : ["it","us"], "blockedCountries" : ["ru","cn"] } ``` -------------------------------- ### Go: Send spam detection request to OOPSpam API Source: https://www.oopspam.com/docs/ Sends a POST request to the OOPSpam spam detection endpoint using net/http. Requires a valid API key and the correct base URL. The payload includes content, senderIP, and email. The response status and body are printed. ```go package main import ( "fmt" "io/ioutil" "net/http" "strings" "log" ) func main() { // Make sure to use correct base URL url := "https://api.oopspam.com/v1/spamdetection" payload := strings.NewReader(`{ "checkForLength": true, "content": "Dear Agent, We are a manufacturing company which specializes in supplying Aluminum Rod with Zinc Alloy Rod to customers worldwide, based in Japan, Asia. We have been unable to follow up payments effectively for transactions with debtor customers in your country due to our distant locations, thus our reason for requesting for your services representation.", "senderIP": "185.234.219.246", "email": "[email protected]" }`) req, err := http.NewRequest("POST", url, payload) if err != nil { log.Fatalf("Error creating request: %v", err) } // Set the required headers req.Header.Add("Content-Type", "application/json") req.Header.Add("X-Api-Key", "YOUR_API_KEY") client := &http.Client{} res, err := client.Do(req) if err != nil { log.Fatalf("Error sending request: %v", err) } defer res.Body.Close() body, err := ioutil.ReadAll(res.Body) if err != nil { log.Fatalf("Error reading response body: %v", err) } fmt.Println("Response Status:", res.Status) fmt.Println("Response Body:", string(body)) } ``` -------------------------------- ### Request Body Parameters Source: https://www.oopspam.com/docs/ Lists all request body parameters accepted by the OOPspam API, with their types, defaults, and descriptions. ```APIDOC ## Request Body Parameters | Field | Definition | | --- | --- | | `content` | **string (optional)** Is a content/message you would like to be analyzed. | | `context` | **string (optional)** Briefly describe your website's purpose or business. For best results, include what types of submissions you consider spam and what you consider legitimate. For more details, please refer to [the announcement](https://www.oopspam.com/blog/introducing-contextual-spam-detection). Use this feature ONLY if your forms include a required textarea field, as it relies on message content to function properly.
When the context parameter with a value is passed to the API, standard spam detection will be disabled and only Contextual Detection will be applied. | | `senderIP` | **string (optional)** Is the IP address of the original content/message sender. This field value will be looked up in multiple IP denylists that previously detected sending spam. Although `senderIP` is an optional field, we recommend sending it. **Important:** - This field should include spammer's IP, in other words, whoever submitted content to you, not your IP. - IP addresses _127.0.0.1_, _1.1.1.1_, _::1_ including private IPs are by default blocked. | | `email` | **string (optional)** Is the email address of the original content/message sender. This field value will be looked up in multiple email denylists that previously detected sending spam. Although `email` is an optional field, we recommend sending it. **Important:** - This field should include spammer's email, in other words, whoever submitted content to you, not your email. | | `blockTempEmail` default:false | **boolean (optional)** Block temporary/disposable emails. | | `blockVPN` default:falsenew | **boolean (optional)** Block VPN, Proxy, Tor IPs | | `blockDC` default:falsenew | **boolean (optional)** Block Data Center IPs. Filters out submissions from cloud providers. | | `checkForLength` default:true | **boolean (optional)** If the content is shorter than 20 characters, it will be considered spam (`Score: 5`) and returns `isContentTooShort: true`. | | `logIt` default:false | **boolean (optional)** Allows you to view logs in the oopspam Dashboard. No logs are kept by default. Enable logs by setting this to `true` and including the `source` parameter with a unique identifier. | | `source` | **string (optional)** A unique identifier for your application or website (e.g., "example.com"). Required when `logIt` is set to `true` to enable logging in the oopspam Dashboard. | | `urlFriendly` default:falsebeta | **boolean (optional)** Make the `content` parameter more link-friendly and reduce the impact of links on the spam score. | | `allowedLanguages` | **array (optional)** This allows blocking content based on content language. Let us know in what language(s) you expect the content to be by passing [two-letter language(s) code](https://www.oopspam.com/docs/#iso-639) to the parameter as an array. | | `allowedCountries` | **array (optional)** Allow content only from a certain country or countries. All you need to do is pass [the two-letter country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) as an array. **Important:** `senderIP` is required for this to work. | | `blockedCountries` | **array (optional)** Block content from a certain country or countries. All you need to do is pass [the two-letter country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) as an array. **Important:** `senderIP` is required for this to work. | ``` -------------------------------- ### POST /reputation/domain Source: https://www.oopspam.com/docs/ Evaluates the reputation of a given domain name by cross-referencing it against multiple authoritative sources. Returns whether the domain is blocked and which providers flagged it. ```APIDOC ## POST /reputation/domain ### Description Evaluates the reputation of a given domain name by cross-referencing it against multiple authoritative sources, including Google, Microsoft, Mozilla, and various other reputable security providers. ### Method POST ### Endpoint /reputation/domain ### Parameters #### Request Body - **domain** (string) - Required - The fully qualified domain name to be checked without `https`, `http`, `www`. ### Request Example { "domain": "example.com" } ### Response #### Success Response (200) - **Blocked** (boolean) - Indicates whether the specified `domain` parameter is flagged as blocked or unsafe by any of the reputation sources. - **Blocker** (array) - Lists the names of specific providers that have flagged the domain, if any. #### Response Example (Blocked domain) { "Blocked": true, "Blocker": [ "SURBL", "Spamhaus" ] } #### Response Example (Safe domain) { "Blocked": false, "Blocker": [] } ``` -------------------------------- ### JavaScript fetch spam detection request Source: https://www.oopspam.com/docs/ Uses the fetch API to POST a spam detection request to the OOPSpam endpoint. Requires an API key and includes request data with checkForLength, blockTempEmail, logIt, source, content, senderIP, email, allowedCountries, allowedLanguages, and blockedCountries. Logs the response or an error if the HTTP request fails. ```JavaScript const apiKey = 'YOUR_API_KEY'; const apiUrl = 'https://api.oopspam.com/v1/spamdetection'; const requestData = { checkForLength: true, blockTempEmail: false, logIt: true, source: "example.com", content: "Dear Agent, We are a manufacturing company which specializes in supplying Aluminum Rod with Zinc Alloy Rod to customers worldwide, based in Japan, Asia. We have been unable to follow up payments effectively for transactions with debtor customers in your country due to our distant locations, thus our reason for requesting for your services representation.", senderIP: "185.234.219.246", email: "[email protected]", allowedCountries: ["it", "us"], allowedLanguages: ["en"], blockedCountries: ["ru"] }; async function checkForSpam() { try { const response = await fetch(apiUrl, { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-Api-Key': apiKey }, body: JSON.stringify(requestData) }); if (!response.ok) { throw new Error(`HTTP error! status: ${response.status}`); } const data = await response.json(); console.log(data); return data; } catch (error) { console.error('There was a problem with the fetch operation:', error); } } ``` -------------------------------- ### PHP: Send spam detection request to OOPSpam API Source: https://www.oopspam.com/docs/ Uses cURL to POST a JSON payload to the OOPSpam spam detection endpoint. Requires a valid API key. Throws exceptions on cURL errors or HTTP status >= 400. Returns the decoded JSON response. ```php true, 'blockTempEmail' => false, 'logIt' => false, 'content' => "Dear Agent, We are a manufacturing company which specializes in supplying Aluminum Rod with Zinc Alloy Rod to customers worldwide, based in Japan, Asia. We have been unable to follow up payments effectively for transactions with debtor customers in your country due to our distant locations, thus our reason for requesting for your services representation.", 'senderIP' => "185.234.219.246", 'email' => "[email protected]", ]); $ch = curl_init(API_URL); curl_setopt_array($ch, [ CURLOPT_POST => true, CURLOPT_POSTFIELDS => $payload, CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => [ 'Content-Type: application/json', 'X-Api-Key: ' . API_KEY ] ]); $response = curl_exec($ch); if ($response === false) { $error = curl_error($ch); curl_close($ch); throw new Exception("cURL Error: $error"); } $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); if ($httpCode >= 400) { throw new Exception("HTTP Error: $httpCode, Response: $response"); } return json_decode($response, true); } try { $result = checkForSpam(); echo json_encode($result, JSON_PRETTY_PRINT); } catch (Exception $e) { echo "An error occurred: " . $e->getMessage(); } ``` -------------------------------- ### POST /spamdetection/report Source: https://www.oopspam.com/docs/ Use this endpoint to report false positives and false negatives to OOPspam. The request body is identical to the /spamdetection endpoint, with an additional required boolean field 'shouldBeSpam' indicating whether the content should be considered spam (true) or ham (false). ```APIDOC ## POST /spamdetection/report ### Description Use this endpoint to report false positives and false negatives to OOPspam. All submissions will be available on the OOPspam Dashboard under the Reported page. The system (or human intervention) will analyze them and improve detection for your use case. ### Method POST ### Endpoint /spamdetection/report ### Parameters #### Request Body - `senderIP` (string) - Optional - The IP address of the sender. - `email` (string) - Optional - The email address of the sender. - `content` (string) - Required - The content to be checked for spam. - `blockTempEmail` (boolean) - Optional - Whether to block temporary email addresses. - `logIt` (boolean) - Optional - Whether to log the request. - `source` (string) - Optional - The source of the request. - `checkForLength` (boolean) - Optional - Whether to check for content length. - `allowedLanguages` (array of strings) - Optional - List of allowed language codes (ISO 639-1). - `allowedCountries` (array of strings) - Optional - List of allowed country codes. - `blockedCountries` (array of strings) - Optional - List of blocked country codes. - `shouldBeSpam` (boolean) - Required - Indicates whether the reported misdetection should be spam (true) or ham (false). ### Request Example { "senderIP": "91.203.67.110", "email": "[email protected]", "content": "Dear Agent, We are a manufacturing company which specializes in supplying Aluminum Rod with Zinc Alloy Rod to customers worldwide, based in Japan, Asia. We have been unable to follow up payments effectively for transactions with debtor customers in your country due to our distant locations, thus our reason for requesting for your services representation.", "blockTempEmail": false, "logIt": true, "source": "example.com", "checkForLength": true, "allowedLanguages" : ["en"], "allowedCountries" : ["it","us"], "blockedCountries" : ["ru"], "shouldBeSpam": true } ### Response #### Success Response (200) - `message` (string) - Success message. #### Response Example { "message": "success" } ``` -------------------------------- ### Spam Detection Request with cURL Source: https://www.oopspam.com/docs/ cURL command to POST to the spam detection endpoint with additional options like blockTempEmail, logIt, source, allowedCountries, allowedLanguages, and blockedCountries. ```bash curl --request POST \ --url https://api.oopspam.com/v1/spamdetection \ --header 'Content-Type: application/json' \ --header 'X-Api-Key: YOUR_API_KEY' \ --data '{ "checkForLength": true, "blockTempEmail": false, "logIt": true, "source": "example.com", "content": "Dear Agent, We are a manufacturing company which specializes in supplying Aluminum Rod with Zinc Alloy Rod to customers worldwide, based in Japan, Asia. We have been unable to follow up payments effectively for transactions with debtor customers in your country due to our distant locations, thus our reason for requesting for your services representation.", "senderIP": "185.234.219.246", "email": "[email protected]", "allowedCountries": [ "it", "us" ], "allowedLanguages": [ "en" ], "blockedCountries": [ "ru" ] }' ``` -------------------------------- ### Java HttpClient spam detection request Source: https://www.oopspam.com/docs/ Builds an HTTP POST request to the OOPSpam endpoint using java.net.http.HttpClient. Requires an API key in the X-Api-Key header. The request body is a JSON string with checkForLength, content, senderIP, and email. Prints the response body or prints the stack trace on exception. ```Java HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://api.oopspam.com/v1/spamdetection")) .header("content-type", "application/json") .header("X-Api-Key", "YOUR_API_KEY") // Replace with your actual API key .method("POST", HttpRequest.BodyPublishers.ofString("{\n \"checkForLength\": true,\n \"content\": \"Dear Agent, We are a manufacturing company which specializes in supplying Aluminum Rod with Zinc Alloy Rod to customers worldwide, based in Japan, Asia. We have been unable to follow up payments effectively for transactions with debtor customers in your country due to our distant locations, thus our reason for requesting for your services representation.\",\n \"senderIP\": \"185.234.219.246\",\n \"email\": \"[email protected]\"\n}")) .build(); try { HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString()); System.out.println(response.body()); } catch (Exception e) { e.printStackTrace(); } ``` -------------------------------- ### POST /spamdetection Source: https://www.oopspam.com/docs/ Analyzes the provided content, sender IP, and email to detect spam. Returns a spam score and detailed detection results. ```APIDOC ## POST /spamdetection ### Description Analyzes the provided content, sender IP, and email to detect spam. Returns a spam score and detailed detection results. ### Method POST ### Endpoint `/spamdetection` ### Base URLs - oopspam: `https://api.oopspam.com/v1` - RapidAPI: `https://oopspam.p.rapidapi.com/v1` ### Headers - `Content-Type: application/json` (Required) - `X-Api-Key: YOUR_API_KEY` (Required) ### Request Body - `checkForLength` (boolean) - Optional - Whether to check for content length. - `blockTempEmail` (boolean) - Optional - Whether to block temporary email addresses. - `logIt` (boolean) - Optional - Whether to log the request. - `content` (string) - Required - The content to analyze for spam. - `senderIP` (string) - Optional - The sender's IP address. - `email` (string) - Optional - The sender's email address. ### Request Example ```json { "checkForLength": true, "content": "Dear Agent, We are a manufacturing company which specializes in supplying Aluminum Rod with Zinc Alloy Rod to customers worldwide, based in Japan, Asia. We have been unable to follow up payments effectively for transactions with debtor customers in your country due to our distant locations, thus our reason for requesting for your services representation.", "senderIP": "185.234.219.246", "email": "[email protected]" } ``` ### Response #### Success Response (200) - `Score` (integer) - Overall spam score. - `Details` (object) - Detailed detection results. - `isIPBlocked` (boolean) - Whether the sender IP is blocked. - `isEmailBlocked` (boolean) - Whether the sender email is blocked. - `isContentSpam` (string) - Content spam classification (e.g., "spam"). - `langMatch` (boolean) - Whether language matches. - `countryMatch` (boolean) - Whether country matches. - `numberOfSpamWords` (integer) - Number of spam words found. - `spamWords` (array of strings) - List of spam words found. - `isContentTooShort` (boolean) - Whether content is too short. #### Response Example ```json { "Score": 6, "Details": { "isIPBlocked": true, "isEmailBlocked": true, "isContentSpam": "spam", "langMatch": true, "countryMatch": false, "numberOfSpamWords": 1, "spamWords": [ "dear" ], "isContentTooShort": false } } ``` ### Notes - The API may return partial results as soon as one analysis detects spam. For example, if the sender IP is blocked, the response may only include `Score` and `Details.isIPBlocked` and `Details.isContentTooShort`. ``` -------------------------------- ### POST /v1/spamdetection Source: https://www.oopspam.com/docs/ The spam detection endpoint allows you to check content for spam. It accepts a JSON payload with content and optional metadata, and returns a spam score and classification. ```APIDOC ## POST /v1/spamdetection ### Description This endpoint checks the provided content for spam. It returns a spam score and classification based on the content and optional parameters. ### Method POST ### Endpoint https://api.oopspam.com/v1/spamdetection ### Headers - **Content-Type** (string) - Required - Must be set to `application/json`. - **X-Api-Key** (string) - Required - Your API key for authentication. ### Request Body - **checkForLength** (boolean) - Optional - Whether to check for length-based spam signals. - **blockTempEmail** (boolean) - Optional - Whether to block temporary email addresses. - **logIt** (boolean) - Optional - Whether to log the request. - **source** (string) - Optional - The source of the request (e.g., domain). - **content** (string) - Required - The content to check for spam. - **senderIP** (string) - Optional - The IP address of the sender. - **email** (string) - Optional - The email address associated with the content. - **allowedCountries** (array of strings) - Optional - List of allowed country codes. - **allowedLanguages** (array of strings) - Optional - List of allowed language codes. - **blockedCountries** (array of strings) - Optional - List of blocked country codes. ### Request Example ```json { "checkForLength": true, "blockTempEmail": false, "logIt": true, "source": "example.com", "content": "Dear Agent, We are a manufacturing company which specializes in supplying Aluminum Rod with Zinc Alloy Rod to customers worldwide, based in Japan, Asia. We have been unable to follow up payments effectively for transactions with debtor customers in your country due to our distant locations, thus our reason for requesting for your services representation.", "senderIP": "185.234.219.246", "email": "[email protected]", "allowedCountries": ["it", "us"], "allowedLanguages": ["en"], "blockedCountries": ["ru"] } ``` ### Response #### Success Response (200) The response is a JSON object containing the spam detection result. The exact fields are not specified in the source, but typically include a spam score and classification. #### Response Example (Not provided in the source) ### Rate Limiting Rate limiting headers are included in responses. See the Rate Limiting section for details. ``` -------------------------------- ### C# RestSharp spam detection request Source: https://www.oopspam.com/docs/ Uses RestSharp and Newtonsoft.Json to send a POST request to the OOPSpam endpoint. Defines a SpamRequest class with JSON property names matching the API fields. Requires an API key in the X-Api-Key header. Serializes the request object and prints the response content. ```C# using RestSharp; using Newtonsoft.Json; // or System.Text.Json // Create a class to represent the request body public class SpamRequest { [JsonProperty("checkForLength")] public bool CheckForLength { get; set; } [JsonProperty("content")] public string Content { get; set; } [JsonProperty("senderIP")] public string SenderIP { get; set; } [JsonProperty("email")] public string Email { get; set; } } public class Program { public static void Main(string[] args) { // Create a client with the correct base URL var client = new RestClient("https://api.oopspam.com/v1/spamdetection"); // Create a request var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddHeader("X-Api-Key", "YOUR_API_KEY"); // Use actual API key // Create the request body object with exact property names var spamRequest = new SpamRequest { CheckForLength = true, Content = "Dear Agent, We are a manufacturing company which specializes in supplying Aluminum Rod with Zinc Alloy Rod to customers worldwide, based in Japan, Asia. We have been unable to follow up payments effectively for transactions with debtor customers in your country due to our distant locations, thus our reason for requesting for your services representation.", SenderIP = "185.234.219.246", Email = "[email protected]" }; // Serialize the object to JSON with the exact names string requestBody = JsonConvert.SerializeObject(spamRequest); // Add the JSON payload to the request body request.AddParameter("application/json", requestBody, ParameterType.RequestBody); // Execute the request IRestResponse response = client.Execute(request); System.Console.WriteLine(response.Content); } } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.