# Validate domains' SPF records This function retrieves the the Sender Policy Framework (SPF) records for one or more domains. Endpoint: GET /EmailAuth/validate_current_spfs Version: 11.134.0.5 Security: BasicAuth ## Query parameters: - `domain` (string, required) The domain for which to check the records. ## Response 200 fields (application/json): - `apiversion` (integer) The version of the API. Example: 3 - `func` (string) The name of the method called. Example: "validate_current_spfs" - `module` (string) The name of the module called. Example: "EmailAuth" - `result` (object) - `result.data` (array) A list of information about a domain's SPF records. - `result.data.domain` (string) The queried domain. Example: "example.com" - `result.data.error` (string) A message that details the reason why the DNS lookup failed. The function returns this value when the return is the value. Example: "(XID rm8h9f) DNS returned SERVFAIL (code 2)\nin response to the systems query for example2.coms\nTXT records." - `result.data.expected` (string) The SPF record for the domain in the DNS. Example: "ip6:0:0:0:0:0:ffff:c0a8:101" - `result.data.ip_address` (string) The domain's IP address. Example: "0:0:0:0:0:ffff:c0a8:101" - `result.data.ip_version` (integer) The IP address version. * * Enum: 4, 6 - `result.data.records` (array) The SPF records of the domain's DNS. - `result.data.records.current` (string) The SPF record's contents. Example: "v=spf1 +a +mx ip6:0:0:0:0:0:ffff:c0a8:101 ~all" - `result.data.records.reason` (string) The reason why the SPF record is correct, if one exists. If no errors exist, the function does return this value. Example: "'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)'" - `result.data.records.state` (string) The SPF record's status: * - The record confirms that the value is a valid sender. * - The current record configuration does not determine the value's validity. * - The record states that the value is a valid sender. * - The record states that the value is a valid sender, but does not state it. * - The record check resulted in a failure. For example, a network failure. * - The domain's records are and require manual correction. These values correspond with [RFC7208 section 2.6](https://tools.ietf.org/html/rfc7208#section-2.6). Enum: "PASS", "NEUTRAL", "FAIL", "SOFTFAIL", "TEMPERROR", "PERMERROR" - `result.data.state` (string) The SPF record's status: * - A single record exists in the domain's DNS with the correct value or redirect mechanism. * - An record exists for the domain that does match the value. * - Multiple records exist in the domain's DNS. * - No record exists for the domain's DNS. * - The record's DNS lookup failed. The function returns the reason in the error return. Enum: "VALID", "MISMATCHED", "MULTIPLE", "MISSING", "ERROR" - `result.errors` (array,null) List of errors if the API failed. - `result.messages` (array,null) List of messages generated by the API. - `result.metadata` (object) - `result.status` (integer) - - Success. - - Failed. Check the field for more details. Enum: 0, 1 - `result.warnings` (array,null) List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API.