v1

latestOpenAPI 3.0.2cPanel License2026-08-06657427.1 MB
EmailAuth
Email DNS Settings

Validate domains' SPF records

This function retrieves the the Sender Policy Framework (SPF) records for one or more domains.

get/EmailAuth/validate_current_spfs

Query parameters

domainstring domain required

The domain for which to check the SPF records.

Response

HTTP Request was successful.

apiversioninteger

The version of the API.

funcstring

The name of the method called.

modulestring

The name of the module called.

Example response

{
  "apiversion": 3,
  "func": "validate_current_spfs",
  "module": "EmailAuth",
  "result": {
    "data": [
      {
        "domain": "example.com",
        "error": "(XID rm8h9f) DNS returned SERVFAIL (code 2)\nin response to the systems query for example2.coms\nTXT records.",
        "expected": "ip6:0:0:0:0:0:ffff:c0a8:101",
        "ip_address": "0:0:0:0:0:ffff:c0a8:101",
        "ip_version": 6,
        "records": [
          {
            "current": "v=spf1 +a +mx ip6:0:0:0:0:0:ffff:c0a8:101 ~all",
            "reason": "'example.com: Sender\nis not authorized by default to use ''example.com''\nin ''helo'' identity, however domain is not\ncurrently prepared for false failures (mechanism\n''~all'' matched)'",
            "state": "PASS"
          }
        ],
        "state": "VALID"
      }
    ],
    "status": 1
  }
}