v1

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

Add domains' SPF records

This function installs a Sender Policy Framework (SPF) record for a domain on the DNS server.

get/EmailAuth/install_spf_records

Query parameters

domainstring required

The domain for which to install an SPF record on the DNS server.

Note:

To install multiple SPF records, duplicate the parameter name. For example, use the domain=example.com, domain=example2.com, and domain=example3.com parameters.

recordstring required
Example:"v=spf1 ip4:10.0.0.1 %2Ba %2Bmx %2Bip4:10.0.0.2 %2Bip4:10.0.0.3 -all"

An SPF record.

Note:

You must provide this parameter for each domain parameter.

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": "install_spf_records",
  "module": "EmailAuth",
  "result": {
    "data": [
      {
        "domain": "example.com",
        "msg": "[ADD:TXT@example.com.:v=spf1 ip4:10.0.0.1 %2Ba %2Bmx %2Bip4:10.0.0.2 %2Bip4:10.0.0.3 -all]",
        "status": 1
      }
    ],
    "status": 1
  }
}