{
  "swagger": "2.0",
  "info": {
    "title": "spamapi",
    "description": "Easily and directly scan and block spam security threats in input.",
    "version": "v1"
  },
  "host": "node39.cloudmersive.com",
  "schemes": [
    "https"
  ],
  "paths": {
    "/spam/detect/text-string": {
      "post": {
        "tags": [
          "SpamDetection"
        ],
        "summary": "Perform AI spam detection and classification against input text string",
        "description": "Analyzes input content as well as embedded URLs with AI deep learnign to detect spam, phishing and other unsafe content.  Uses 25-75 API calls depending on model selected.",
        "consumes": [
          "application/json",
          "text/json",
          "application/*+json"
        ],
        "produces": [
          "text/plain",
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "description": "Spam detection request",
            "schema": {
              "$ref": "#/definitions/SpamDetectionRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/SpamDetectionResponse"
            }
          }
        }
      }
    },
    "/spam/detect/text-string/advanced": {
      "post": {
        "tags": [
          "SpamDetection"
        ],
        "summary": "Perform advanced AI spam detection and classification against input text string",
        "description": "Analyzes input content as well as embedded URLs with AI deep learnign to detect spam, phishing and other unsafe content.  Uses 25-100 API calls depending on model selected.",
        "consumes": [
          "application/json",
          "text/json",
          "application/*+json"
        ],
        "produces": [
          "text/plain",
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "description": "Spam detection request",
            "schema": {
              "$ref": "#/definitions/SpamDetectionAdvancedRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/SpamDetectionAdvancedResponse"
            }
          }
        }
      }
    },
    "/spam/detect/form-submission/advanced": {
      "post": {
        "tags": [
          "SpamDetection"
        ],
        "summary": "Perform advanced AI spam detection and classification against a form submission",
        "description": "Analyzes form input content as well as embedded URLs with AI deep learnign to detect spam, phishing and other unsafe content.  Uses 25-100 API calls depending on model selected.",
        "consumes": [
          "application/json",
          "text/json",
          "application/*+json"
        ],
        "produces": [
          "text/plain",
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "description": "Spam detection request",
            "schema": {
              "$ref": "#/definitions/SpamDetectionAdvancedFormSubmissionRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/SpamDetectionFormSubmissionAdvancedResponse"
            }
          }
        }
      }
    },
    "/spam/detect/file": {
      "post": {
        "tags": [
          "SpamDetection"
        ],
        "summary": "Perform AI spam detection and classification on an input image or document",
        "description": "Analyzes input content as well as embedded URLs with AI deep learning to detect spam, phishing and other unsafe content.  Uses 100-125 API calls depending on model selected.  Supported file formats include PDF, DOC, DOCX, XLS, XLSX, PPT, PPTX, HTML, EML, MSG, PNG, JPG, JPEG and WEBP.",
        "consumes": [
          "multipart/form-data"
        ],
        "produces": [
          "text/plain",
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "model",
            "description": "Model to use; default setting is Advanced",
            "type": "string",
            "default": "Advanced"
          },
          {
            "in": "formData",
            "name": "inputFile",
            "type": "file"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/SpamDetectionResponse"
            }
          }
        }
      }
    },
    "/spam/detect/file/advanced": {
      "post": {
        "tags": [
          "SpamDetection"
        ],
        "summary": "Perform advanced AI spam detection and classification against input file.",
        "description": "Analyzes input content as well as embedded URLs with AI deep learning to detect spam, phishing and other unsafe content.  Uses 25-100 API calls depending on model selected.  Supported file formats include PDF, DOC, DOCX, XLS, XLSX, PPT, PPTX, HTML, EML, MSG, PNG, JPG, JPEG and WEBP.",
        "consumes": [
          "multipart/form-data"
        ],
        "produces": [
          "text/plain",
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "model",
            "description": "Optional: Specify which AI model to use.  Possible choices are Normal and Advanced.  Default is Advanced.",
            "type": "string",
            "default": "Advanced"
          },
          {
            "in": "header",
            "name": "preprocessing",
            "description": "Optional: Specify which preprocessing to Use.  Possible choices are None, Compatability and Auto.  Default is Auto.",
            "type": "string",
            "default": "Auto"
          },
          {
            "in": "header",
            "name": "allowPhishing",
            "description": "True if phishing should be allowed, false otherwise",
            "type": "boolean",
            "default": false
          },
          {
            "in": "header",
            "name": "allowUnsolicitedSales",
            "description": "True if unsolicited sales should be allowed, false otherwise",
            "type": "boolean",
            "default": false
          },
          {
            "in": "header",
            "name": "allowPromotionalContent",
            "description": "True if promotional content should be allowed, false otherwise",
            "type": "boolean",
            "default": true
          },
          {
            "in": "header",
            "name": "customPolicyId",
            "description": "Apply a Custom Policy for Spam Enforcement by providing the ID; to create a Custom Policy, navigate to the Cloudmersive Management Portal and select Custom Policies.  Requires Managed Instance or Private Cloud",
            "type": "string"
          },
          {
            "in": "formData",
            "name": "inputFile",
            "type": "file"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/SpamDetectionAdvancedResponse"
            }
          }
        }
      }
    }
  },
  "definitions": {
    "SpamDetectionAdvancedFormField": {
      "description": "Form field submitted to run spam detection on",
      "type": "object",
      "properties": {
        "FieldTitle": {
          "description": "Title of the field",
          "type": "string",
          "example": "LeadCompanyName"
        },
        "FieldValue": {
          "description": "Value of the field",
          "type": "string",
          "example": "Acme, Inc."
        }
      },
      "additionalProperties": false
    },
    "SpamDetectionAdvancedFormSubmissionRequest": {
      "description": "AI advanced spam detection request",
      "type": "object",
      "properties": {
        "InputFormFields": {
          "description": "Form fields and values that you received in your form submission",
          "type": "array",
          "items": {
            "$ref": "#/definitions/SpamDetectionAdvancedFormField"
          }
        },
        "AllowUnsolicitedSales": {
          "description": "True if unsolicited sales should be allowed, false otherwise",
          "type": "boolean",
          "example": false
        },
        "AllowPromotionalContent": {
          "description": "True if promotional content should be allowed, false otherwise",
          "type": "boolean",
          "example": false
        },
        "AllowPhishing": {
          "description": "True if phishing should be allowed, false otherwise",
          "type": "boolean",
          "example": false
        }
      },
      "additionalProperties": false
    },
    "SpamDetectionAdvancedRequest": {
      "description": "AI advanced spam detection request",
      "type": "object",
      "properties": {
        "InputString": {
          "description": "Input text string to detect spam against",
          "type": "string",
          "example": "Buy bitcoin now!!!!"
        },
        "Model": {
          "description": "Optional: Specify which AI model to use.  Possible choices are Normal and Advanced.  Default is Advanced.",
          "type": "string",
          "example": "Advanced"
        },
        "AllowUnsolicitedSales": {
          "description": "True if unsolicited sales should be allowed, false otherwise",
          "type": "boolean",
          "example": false
        },
        "AllowPromotionalContent": {
          "description": "True if promotional content should be allowed, false otherwise",
          "type": "boolean",
          "example": false
        },
        "AllowPhishing": {
          "description": "True if phishing should be allowed, false otherwise",
          "type": "boolean",
          "example": false
        },
        "CustomPolicyID": {
          "description": "Apply a Custom Policy for Spam Enforcement by providing the ID; to create a Custom Policy, navigate to the Cloudmersive Management Portal and select Custom Policies.  Requires Managed Instance or Private Cloud",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "SpamDetectionAdvancedResponse": {
      "description": "Result of detecting spam using AI",
      "type": "object",
      "properties": {
        "CleanResult": {
          "description": "True if the result is not spam (clean), and false otherwise",
          "type": "boolean"
        },
        "SpamRiskLevel": {
          "format": "double",
          "description": "Overall spam risk level between 0.0 and 1.0",
          "type": "number"
        },
        "ContainsSpam": {
          "description": "True if the input text contains spam, false otherwise",
          "type": "boolean"
        },
        "ContainsUnsolicitedSales": {
          "description": "True if the input text contains unsolicited sales, false otherwise",
          "type": "boolean"
        },
        "ContainsPromotionalContent": {
          "description": "True if the input text contains promotional content, false otherwise",
          "type": "boolean"
        },
        "ContainsPhishingAttempt": {
          "description": "True if the input text contains a phishing attempt, false otherwise",
          "type": "boolean"
        },
        "AnalysisRationale": {
          "description": "Rationale for why the conclusion was formed",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "SpamDetectionFormSubmissionAdvancedResponse": {
      "description": "Result of detecting spam using AI",
      "type": "object",
      "properties": {
        "CleanResult": {
          "description": "True if the result is not spam (clean), and false otherwise",
          "type": "boolean"
        },
        "SpamRiskLevel": {
          "format": "double",
          "description": "Overall spam risk level between 0.0 and 1.0",
          "type": "number"
        },
        "ContainsSpam": {
          "description": "True if the input text contains spam, false otherwise",
          "type": "boolean"
        },
        "ContainsUnsolicitedSales": {
          "description": "True if the input text contains unsolicited sales, false otherwise",
          "type": "boolean"
        },
        "ContainsPromotionalContent": {
          "description": "True if the input text contains promotional content, false otherwise",
          "type": "boolean"
        },
        "ContainsPhishingAttempt": {
          "description": "True if the input text contains a phishing attempt, false otherwise",
          "type": "boolean"
        },
        "AnalysisRationale": {
          "description": "Rationale for why the conclusion was formed",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "SpamDetectionRequest": {
      "description": "AI spam detection request",
      "type": "object",
      "properties": {
        "InputString": {
          "description": "Input text string to detect spam against",
          "type": "string",
          "example": "Get free crypto now!!!"
        },
        "Model": {
          "description": "Optional: Specify which AI model to use.  Possible choices are Normal and Advanced.  Default is Advanced.",
          "type": "string",
          "example": "Advanced"
        }
      },
      "additionalProperties": false
    },
    "SpamDetectionResponse": {
      "description": "Result of detecting spam using AI",
      "type": "object",
      "properties": {
        "CleanResult": {
          "description": "True if the result is not spam (clean), and false otherwise",
          "type": "boolean"
        }
      },
      "additionalProperties": false
    }
  },
  "securityDefinitions": {
    "Apikey": {
      "type": "apiKey",
      "name": "Apikey",
      "in": "header",
      "description": "Apikey"
    }
  },
  "security": [
    {
      "Apikey": [ ]
    }
  ]
}