Skip to main content
POST
/
api
/
ext
/
generic
/
email
/
dmarc-generator
Generate DMARC record
curl --request POST \
  --url https://app.spotzee.com/api/ext/generic/email/dmarc-generator \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data domain=example.com \
  --data failure_response=quarantine \
  --data subdomains=none
{
  "status": "success",
  "data": {
    "record": "v=DMARC1; p=quarantine; rua=mailto:dmarc-reports@example.com; pct=100; sp=none",
    "parsedPolicy": {
      "version": "DMARC1",
      "policy": "quarantine",
      "subdomain_policy": "none",
      "percentage": 100,
      "aggregate_reports": [
        "<string>"
      ],
      "forensic_reports": [
        "<string>"
      ],
      "alignment": {
        "spf": "r",
        "dkim": "r"
      }
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer token authentication. Use format: Bearer YOUR_API_KEY

Body

application/x-www-form-urlencoded
domain
string
required

Domain name

Example:

"example.com"

failure_response
enum<string>
required

Action to take when DMARC authentication fails

Available options:
none,
quarantine,
reject
Example:

"quarantine"

subdomains
enum<string>
required

Policy for subdomains

Available options:
none,
quarantine,
reject
Example:

"none"

aggregate_reporting_email
string
failure_reporting_email
string
percent
number

Percentage of messages to apply the policy to (0-100)

Required range: 0 <= x <= 100
Example:

100

format
string
generate_everything_fails
boolean

Generate report when all authentication mechanisms fail

Example:

"true"

generate_anything_fails
boolean

Generate report when any authentication mechanism fails

Example:

"true"

generate_dkim_fails
boolean

Generate report when DKIM authentication fails

Example:

"false"

generate_spf_fails
boolean

Generate report when SPF authentication fails

Example:

"false"

interval
number

Reporting interval in seconds

Example:

86400

spf_alignment
enum<string>

SPF alignment mode: r (relaxed) or s (strict)

Available options:
r,
s
Example:

"r"

dkim_alignment
enum<string>

DKIM alignment mode: r (relaxed) or s (strict)

Available options:
r,
s
Example:

"r"

Response

Successfully generated DMARC record

status
enum<string>
required

Indicates successful operation

Available options:
success
data
object
required