Account Spam Settings

Updated Oct 4, 2026 Markdown

DELETE /api/v1/accounts/{username}/spam/{email}

Delete per-mailbox spam settings

Removes the per-user overrides. The mailbox falls back to global Rspamd config.

Path parameters:

Name Type Required Notes
username string yes —
email string yes —

Responses:

Status Schema Description
200 ApiSuccess_dict_str__Any__ Successful Response
422 HTTPValidationError Validation Error

Response example (200):

JSON
{
  "data": {},
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X DELETE \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  https://your-server:2000/api/v1/accounts/{username}/spam/{email}

GET /api/v1/accounts/{username}/spam/{email}

Get per-mailbox spam settings

Spam score overrides + per-user white / black lists for the specified mailbox.

Path parameters:

Name Type Required Notes
username string yes —
email string yes —

Responses:

Status Schema Description
200 ApiSuccess_dict_str__Any__ Successful Response
422 HTTPValidationError Validation Error

Response example (200):

JSON
{
  "data": {},
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X GET \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  https://your-server:2000/api/v1/accounts/{username}/spam/{email}

PUT /api/v1/accounts/{username}/spam/{email}

Update per-mailbox spam settings

Patch the mailbox's per-user overrides — score thresholds, white / black entries.

Path parameters:

Name Type Required Notes
username string yes —
email string yes —

Body fields:

Field Type Required Notes
blacklist array no —
spam_enabled boolean no default True
whitelist array no —

Request body example:

JSON
{
  "blacklist": [
    "string"
  ],
  "spam_enabled": true,
  "whitelist": [
    "string"
  ]
}

Responses:

Status Schema Description
200 ApiSuccess_dict_str__Any__ Successful Response
422 HTTPValidationError Validation Error

Response example (200):

JSON
{
  "data": {},
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X PUT \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  -H "Content-Type: application/json" \
  -d @body.json \
  https://your-server:2000/api/v1/accounts/{username}/spam/{email}
Still Need Help?

Our support team is here around the clock for anything you can't find above.