Update thresholds

Update global antispam thresholds

  • HTTP Method: PUT
  • URL: https://example.domain.tld/api/v1/antispam/thresholds/global/
  • Require authentication: Yes
  • Permission level required: MasterAdmin

Request parameters

Parameter Type Description Required
reject int Score at which message is rejected Required
add_header int Score at which X-Spam header is added (used for sieving to junk folder) Required
greylist int Score at which message is deferred (greylisted) Required

Response parameters

Parameter Type Description
scores dict The threshold scores object
add_header int Score at which X-Spam header is added (used for sieving to junk folder)
greylist int Score at which message is deferred (greylisted)
reject int Score at which message is rejected
status str Status

Example request (Python)

import requests
import json
from pprint import pprint

url = "https://example.domain.tld/api/v1/antispam/thresholds/global/"
data = {
"reject" : 10,
"add_header" : 4,
"greylist" : 3
}
r = requests.put(url, json=data, auth=("admin","long-auth_token-here"))
try:
    pprint(r.json())
except: 
    print(r.text)

Example response (JSON)

{'scores': {'add_header': 4, 'greylist': 3, 'reject': 10}, 'status': 'applying'}