---
title: "Return email account Apache SpamAssassin settings"
method: GET
path: "/Email/get_spam_settings"
tags: ["Email", "Spam Management"]
---

# Return email account Apache SpamAssassin settings

`GET /Email/get_spam_settings`

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

**Important:**

When you disable the [SpamFilter role](https://go.cpanel.net/serverroles), the system **disables** this function.

## Query parameters

- `account` string, email

## Response `200`

HTTP Request was successful.

- object
  - `apiversion` integer — The version of the API.
  - `func` string — The name of the method called.
  - `module` string — The name of the module called.
  - `result` object
    - `data` object
      - `cpuser_spam_auto_delete` 0 | 1, nullable — 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
      - `cpuser_spam_auto_delete_score` integer, nullable — 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
      - `rewrites_subjects` 0 | 1 — Whether the user's spam filter rewrites the subject lines of spam messages. * `1` - Rewrite. * `0` - No rewrites.
      - `spam_as_acl` 1 — 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.
      - `spam_auto_delete` 0 | 1, nullable — 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
      - `spam_auto_delete_score` integer, nullable — 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
      - `spam_box_enabled` 0 | 1 — Whether the user's spam box is enabled. * `1` - Enabled. * `0` - Not enabled.
      - `spam_enabled` 0 | 1 — 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.
      - `spam_status_changeable` 0 | 1 — Whether the server allows cPanel users to configure Apache SpamAssassin settings. * `1` - Allowed. * `0` - Not allowed.
    - `errors` string[], nullable — List of errors if the API failed.
    - `messages` string[], nullable — List of messages generated by the API.
    - `metadata` object
    - `status` 0 | 1 — - 1 - Success - 0 - Failed: Check the errors field for more details.
    - `warnings` string[], nullable — List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API.

---

[API](https://skmtc.net/cpanel/apis/cpanel-uapi.md) · [All operations](https://skmtc.net/cpanel/apis/cpanel-uapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cpanel/cpanel-uapi/revisions/632e2f8e6d04/schema)
