Install domain SPF record

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

SecurityBasicAuth
Request
query Parameters
domain
required
string <domain>

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

Note:

To install multiple SPF records, increment the parameter name. For example, use the domain-1=example-1.com, domain-2=example-2.com, and domain-3=example3.com parameters.

Examples:
domain=domain-1=example-1.com&domain-2=example-2.com&domain-3=example-3.com
domain=example.com
record
required
string

An SPF record.

You must provide this parameter for every domain parameter.

Example: record=v%3Dspf1%20%2Bip4%3A1192.0.2.0%20-all
Responses
200

HTTP Request was successful.

Response Schema: application/json
object
object
get/install_spf_records
Request samples
whmapi1 --output=jsonpretty \
  install_spf_records \
  domain='example.com' \
  record='v%3Dspf1%20%2Bip4%3A1192.0.2.0%20-all'
Response samples
application/json
{
  • "data": {
    • "payload": [
      • {
        • "domain": "example.com",
        • "msg": "[REPLACE:TXT@example.com.:v=spf1 ip4:192.0.2.0 -all]",
        • "status": 1
        }
      ]
    },
  • "metadata": {
    • "command": "install_spf_records",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}