# Update minimum spam score threshold value

This function sets a new minimum Apache SpamAssassin™ spam score threshold value.

Notes:

  * To disable spam filtering, use the UAPI Email::disable_spam_autodelete fuction.
  * For more information, read our Spam Filters documentation.

Important:

   When you disable the Spam Filter* role, the system disables this function.

Endpoint: GET /Email/add_spam_filter
Version: 11.137.9999.96
Security: BasicAuth

## Query parameters:

  - `account` (string)
    The email account to apply a spam score threshold value.

Note:

  If you do not specify a value, the function applies the new spam score threshold value to all accounts.
    Example: "username@example.com"

  - `required_score` (string)
    Set a spam score threshold value.

Notes:

  * You must specify a value greater than 0, and lower than the domain owner's spam score threshold value.
  * You cannot enter 0 as a value for this parameter.
  * You can retrieve the domain owner‘s spam score threshold value via the cpuser_spam_auto_delete_score return from the UAPI Email::get_spam_settings function.
  * The default value, 5, is an aggressive spam score.
  * The lower the spam score, the more likely that Apache SpamAssassin will label messages as spam and delete them.
  * Some systems may wish to use a more lenient spam score (for example, 8 or 10).
    Example: "8"

## Response 200 fields (application/json):

  - `apiversion` (integer)
    The version of the API.
    Example: 3

  - `func` (string)
    The name of the method called.
    Example: "add_spam_filter"

  - `module` (string)
    The name of the module called.
    Example: "Email"

  - `result` (object)

  - `result.data` (object,null)

  - `result.errors` (array,null)
    List of errors if the API failed.

  - `result.messages` (array,null)
    List of messages generated by the API.

  - `result.metadata` (object)

  - `result.metadata.transformed` (integer)
    Post-processing may have transformed the data.
    Enum: 1

  - `result.status` (integer)
    * 1 - Success.
* 0 - Failed. Check the errors field for more details.
    Enum: 0, 1

  - `result.warnings` (array,null)
    List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API.


