Skip to content
Start here

Get DMARC Report Status

client.emailAuth.dmarcReports.get(DMARCReportGetParams { zone_id } params, RequestOptionsoptions?): DMARCReportGetResponse { approved_sources, created, created_at, 9 more }
GET/zones/{zone_id}/email/auth/dmarc-reports

Retrieves the current DMARC report configuration and status for a zone. Returns the RUA prefix, enabled status, approved sources, and DNS records.

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
ParametersExpand Collapse
params: DMARCReportGetParams { zone_id }
zone_id: string

Identifier.

maxLength32
ReturnsExpand Collapse
DMARCReportGetResponse { approved_sources, created, created_at, 9 more }

Response for GET/PATCH /dmarc-reports

approved_sources?: Array<ApprovedSource>

List of approved sending sources (omitted when empty)

Deprecatedcreated?: string

Deprecated, use created_at

formatdate-time
created_at?: string

Creation timestamp

formatdate-time
domain?: string

The source domain

ips?: Array<string>

Resolved IP addresses from SPF

Deprecatedmodified?: string

Deprecated, use modified_at

formatdate-time
modified_at?: string

Last modification timestamp

formatdate-time
name?: string

Source name (typically same as domain)

slug?: string

URL-friendly identifier

tag?: string

Source UUID

Deprecatedcreated?: string

Deprecated, use created_at

formatdate-time
created_at?: string

Creation timestamp

formatdate-time
enabled?: boolean

Whether DMARC reports are enabled

Deprecatedmodified?: string

Deprecated, use modified_at

formatdate-time
modified_at?: string

Last modification timestamp

formatdate-time
records?: Records { bimi_records, cname_dkim_records, cname_dmarc_records, 4 more }

Live DNS records for the zone, grouped by type

bimi_records?: Array<BimiRecord>

BIMI TXT records

id?: string

DNS record ID

content?: string

Record content

name?: string

DNS record name

ttl?: number

Time to live in seconds

type?: string

Record type

cname_dkim_records?: Array<CnamedkimRecord>

CNAME records for DKIM

id?: string

DNS record ID

content?: string

Record content

name?: string

DNS record name

ttl?: number

Time to live in seconds

type?: string

Record type

cname_dmarc_records?: Array<CnamedmarcRecord>

CNAME records at _dmarc (problematic)

id?: string

DNS record ID

content?: string

Record content

name?: string

DNS record name

ttl?: number

Time to live in seconds

type?: string

Record type

cname_spf_records?: Array<CnamespfRecord>

CNAME records for SPF

id?: string

DNS record ID

content?: string

Record content

name?: string

DNS record name

ttl?: number

Time to live in seconds

type?: string

Record type

dkim_records?: Array<DKIMRecord>

DKIM TXT records

id?: string

DNS record ID

content?: string

Record content

name?: string

DNS record name

ttl?: number

Time to live in seconds

type?: string

Record type

dmarc_records?: Array<DMARCRecord>

DMARC TXT records

id?: string

DNS record ID

content?: string

Record content

name?: string

DNS record name

ttl?: number

Time to live in seconds

type?: string

Record type

spf_records?: Array<SPFRecord>

SPF TXT records

id?: string

DNS record ID

content?: string

Record content

name?: string

DNS record name

ttl?: number

Time to live in seconds

type?: string

Record type

rua_prefix?: string

Prefix for DMARC RUA addresses (32-char hex string)

skip_wizard?: boolean

Whether to skip the setup wizard

status?: "missing-dmarc-report" | "multiple-dmarc-reports" | "missing-dmarc-rua" | "cname-on-dmarc-record"

DMARC configuration status

One of the following:
"missing-dmarc-report"
"multiple-dmarc-reports"
"missing-dmarc-rua"
"cname-on-dmarc-record"
Deprecatedtag?: string

Use zone_id instead

zone_id?: string

Zone identifier

Get DMARC Report Status

import Cloudflare from 'cloudflare';

const client = new Cloudflare({
  apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});

const dmarcReport = await client.emailAuth.dmarcReports.get({
  zone_id: '023e105f4ecef8ad9ca31a8372d0c353',
});

console.log(dmarcReport.zone_id);
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "approved_sources": [
      {
        "created": "2024-01-15T10:30:00.12345Z",
        "created_at": "2024-01-15T10:30:00.12345Z",
        "domain": "sendgrid.net",
        "ips": [
          "192.168.1.1",
          "10.0.0.1"
        ],
        "modified": "2024-01-15T11:45:00.12345Z",
        "modified_at": "2024-01-15T11:45:00.12345Z",
        "name": "SendGrid",
        "slug": "sendgrid-net",
        "tag": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415"
      }
    ],
    "created": "2024-01-15T10:30:00.12345Z",
    "created_at": "2024-01-15T10:30:00.12345Z",
    "enabled": true,
    "modified": "2024-01-15T11:45:00.12345Z",
    "modified_at": "2024-01-15T11:45:00.12345Z",
    "records": {
      "bimi_records": [
        {
          "id": "e5bb46707a802688812d5d1c9f7977d4",
          "content": "\"v=DMARC1; p=none; rua=mailto:rua@dmarc-reports.cloudflare.net\"",
          "name": "_dmarc.example.com",
          "ttl": 300,
          "type": "TXT"
        }
      ],
      "cname_dkim_records": [
        {
          "id": "e5bb46707a802688812d5d1c9f7977d4",
          "content": "\"v=DMARC1; p=none; rua=mailto:rua@dmarc-reports.cloudflare.net\"",
          "name": "_dmarc.example.com",
          "ttl": 300,
          "type": "TXT"
        }
      ],
      "cname_dmarc_records": [
        {
          "id": "e5bb46707a802688812d5d1c9f7977d4",
          "content": "\"v=DMARC1; p=none; rua=mailto:rua@dmarc-reports.cloudflare.net\"",
          "name": "_dmarc.example.com",
          "ttl": 300,
          "type": "TXT"
        }
      ],
      "cname_spf_records": [
        {
          "id": "e5bb46707a802688812d5d1c9f7977d4",
          "content": "\"v=DMARC1; p=none; rua=mailto:rua@dmarc-reports.cloudflare.net\"",
          "name": "_dmarc.example.com",
          "ttl": 300,
          "type": "TXT"
        }
      ],
      "dkim_records": [
        {
          "id": "e5bb46707a802688812d5d1c9f7977d4",
          "content": "\"v=DMARC1; p=none; rua=mailto:rua@dmarc-reports.cloudflare.net\"",
          "name": "_dmarc.example.com",
          "ttl": 300,
          "type": "TXT"
        }
      ],
      "dmarc_records": [
        {
          "id": "e5bb46707a802688812d5d1c9f7977d4",
          "content": "\"v=DMARC1; p=none; rua=mailto:rua@dmarc-reports.cloudflare.net\"",
          "name": "_dmarc.example.com",
          "ttl": 300,
          "type": "TXT"
        }
      ],
      "spf_records": [
        {
          "id": "e5bb46707a802688812d5d1c9f7977d4",
          "content": "\"v=DMARC1; p=none; rua=mailto:rua@dmarc-reports.cloudflare.net\"",
          "name": "_dmarc.example.com",
          "ttl": 300,
          "type": "TXT"
        }
      ]
    },
    "rua_prefix": "9233c80fc89f43e3a7b749605f651868",
    "skip_wizard": false,
    "status": "missing-dmarc-report",
    "tag": "023e105f4ecef8ad9ca31a8372d0c353",
    "zone_id": "023e105f4ecef8ad9ca31a8372d0c353"
  }
}
Returns Examples
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "approved_sources": [
      {
        "created": "2024-01-15T10:30:00.12345Z",
        "created_at": "2024-01-15T10:30:00.12345Z",
        "domain": "sendgrid.net",
        "ips": [
          "192.168.1.1",
          "10.0.0.1"
        ],
        "modified": "2024-01-15T11:45:00.12345Z",
        "modified_at": "2024-01-15T11:45:00.12345Z",
        "name": "SendGrid",
        "slug": "sendgrid-net",
        "tag": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415"
      }
    ],
    "created": "2024-01-15T10:30:00.12345Z",
    "created_at": "2024-01-15T10:30:00.12345Z",
    "enabled": true,
    "modified": "2024-01-15T11:45:00.12345Z",
    "modified_at": "2024-01-15T11:45:00.12345Z",
    "records": {
      "bimi_records": [
        {
          "id": "e5bb46707a802688812d5d1c9f7977d4",
          "content": "\"v=DMARC1; p=none; rua=mailto:rua@dmarc-reports.cloudflare.net\"",
          "name": "_dmarc.example.com",
          "ttl": 300,
          "type": "TXT"
        }
      ],
      "cname_dkim_records": [
        {
          "id": "e5bb46707a802688812d5d1c9f7977d4",
          "content": "\"v=DMARC1; p=none; rua=mailto:rua@dmarc-reports.cloudflare.net\"",
          "name": "_dmarc.example.com",
          "ttl": 300,
          "type": "TXT"
        }
      ],
      "cname_dmarc_records": [
        {
          "id": "e5bb46707a802688812d5d1c9f7977d4",
          "content": "\"v=DMARC1; p=none; rua=mailto:rua@dmarc-reports.cloudflare.net\"",
          "name": "_dmarc.example.com",
          "ttl": 300,
          "type": "TXT"
        }
      ],
      "cname_spf_records": [
        {
          "id": "e5bb46707a802688812d5d1c9f7977d4",
          "content": "\"v=DMARC1; p=none; rua=mailto:rua@dmarc-reports.cloudflare.net\"",
          "name": "_dmarc.example.com",
          "ttl": 300,
          "type": "TXT"
        }
      ],
      "dkim_records": [
        {
          "id": "e5bb46707a802688812d5d1c9f7977d4",
          "content": "\"v=DMARC1; p=none; rua=mailto:rua@dmarc-reports.cloudflare.net\"",
          "name": "_dmarc.example.com",
          "ttl": 300,
          "type": "TXT"
        }
      ],
      "dmarc_records": [
        {
          "id": "e5bb46707a802688812d5d1c9f7977d4",
          "content": "\"v=DMARC1; p=none; rua=mailto:rua@dmarc-reports.cloudflare.net\"",
          "name": "_dmarc.example.com",
          "ttl": 300,
          "type": "TXT"
        }
      ],
      "spf_records": [
        {
          "id": "e5bb46707a802688812d5d1c9f7977d4",
          "content": "\"v=DMARC1; p=none; rua=mailto:rua@dmarc-reports.cloudflare.net\"",
          "name": "_dmarc.example.com",
          "ttl": 300,
          "type": "TXT"
        }
      ]
    },
    "rua_prefix": "9233c80fc89f43e3a7b749605f651868",
    "skip_wizard": false,
    "status": "missing-dmarc-report",
    "tag": "023e105f4ecef8ad9ca31a8372d0c353",
    "zone_id": "023e105f4ecef8ad9ca31a8372d0c353"
  }
}