# Return email account Apache SpamAssassin settings

This function retrieves the Apache SpamAssassin™ settings for the account.

Important:

When you disable the SpamFilter role, the system disables this function.

Endpoint: GET /Email/get_spam_settings
Version: 11.136.0.19
Security: BasicAuth

## Query parameters:

  - `account` (string)
    Retrieve a specific user account's SpamAssassin settings.

Note:

If you do not specify this parameter, the function returns the settings for the default email account.
    Example: "username@example.com"

## Response 200 fields (application/json):

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

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

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

  - `result` (object)

  - `result.data` (object)

  - `result.data.cpuser_spam_auto_delete` (integer,null)
    The cPanel user's account-wide spam filter setting

* 1 - Enabled.
* 0 - Not enabled.

NOTE:

This key only appears if the account parameter is passed and the account does not have a custom setting
    Enum: 0, 1

  - `result.data.cpuser_spam_auto_delete_score` (integer,null)
    The cPanel user's account-wide spam filter threshold score. For more information, see Email::add_spam_filter.

NOTE:

This key only appears if the account parameter is passed and the account does not have a custom setting
    Example: 8

  - `result.data.rewrites_subjects` (integer)
    Whether the user's spam filter rewrites the subject lines of spam messages.

* 1 -  Rewrite.
* 0 -  No rewrites.
    Enum: 0, 1

  - `result.data.spam_as_acl` (integer)
    Whether the user's spam filter uses Apache SpamAssassin as an ACL.

NOTE:

The value of this parameter is always 1
* 1 -  SpamAssassin is an ACL.
    Enum: 1

  - `result.data.spam_auto_delete` (integer,null)
    Whether the user's autodelete function is enabled.

* 1 -  Enabled.
* 0 -  Not enabled.

NOTE::

This key does not appear if the cpuser_spam_auto_delete key appears
    Enum: 0, 1

  - `result.data.spam_auto_delete_score` (integer,null)
    Displays the user's spam filter threshold.  For more information, see Email::add_spam_filter.

Note:

This key does not appear if the cpuser_spam_auto_delete_score key appears
    Example: 8

  - `result.data.spam_box_enabled` (integer)
    Whether the user's spam box is enabled.

* 1 -  Enabled.
* 0 -  Not enabled.
    Enum: 0, 1

  - `result.data.spam_enabled` (integer)
    Whether the server's global spam filtering is enabled.

* 1 -  Enabled.
* 0 -  Not enabled.

Note:

 This value will only return 0 if the cPanel user disables Apache SpamAssassin.
    Enum: 0, 1

  - `result.data.spam_status_changeable` (integer)
    Whether the server allows cPanel users to configure Apache SpamAssassin settings.

* 1 -  Allowed.
* 0 -  Not allowed.
    Enum: 0, 1

  - `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.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.


