Skip to content
Start here

Get email DMARC validation time series

client.Radar.Email.Security.TimeseriesGroups.DMARC(ctx, query) (*EmailSecurityTimeseriesGroupDMARCResponse, error)
GET/radar/email/security/timeseries_groups/dmarc

Retrieves the distribution of emails by DMARC (Domain-based Message Authentication, Reporting and Conformance) validation over time.

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
Accepted Permissions (at least one required)
User Details WriteUser Details Read
ParametersExpand Collapse
query EmailSecurityTimeseriesGroupDMARCParams

Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to Aggregation intervals.

const EmailSecurityTimeseriesGroupDMARCParamsAggInterval15m EmailSecurityTimeseriesGroupDMARCParamsAggInterval = "15m"
const EmailSecurityTimeseriesGroupDMARCParamsAggInterval1h EmailSecurityTimeseriesGroupDMARCParamsAggInterval = "1h"
const EmailSecurityTimeseriesGroupDMARCParamsAggInterval1d EmailSecurityTimeseriesGroupDMARCParamsAggInterval = "1d"
const EmailSecurityTimeseriesGroupDMARCParamsAggInterval1w EmailSecurityTimeseriesGroupDMARCParamsAggInterval = "1w"
ARC param.Field[[]EmailSecurityTimeseriesGroupDMARCParamsARC]Optional

Filters results by ARC (Authenticated Received Chain) validation.

const EmailSecurityTimeseriesGroupDMARCParamsARCPass EmailSecurityTimeseriesGroupDMARCParamsARC = "PASS"
const EmailSecurityTimeseriesGroupDMARCParamsARCNone EmailSecurityTimeseriesGroupDMARCParamsARC = "NONE"
const EmailSecurityTimeseriesGroupDMARCParamsARCFail EmailSecurityTimeseriesGroupDMARCParamsARC = "FAIL"
DateEnd param.Field[[]Time]Optional

End of the date range (inclusive).

DateRange param.Field[[]string]Optional

Filters results by date range. For example, use 7d and 7dcontrol to compare this week with the previous week. Use this parameter or set specific start and end dates (dateStart and dateEnd parameters).

DateStart param.Field[[]Time]Optional

Start of the date range.

DKIM param.Field[[]EmailSecurityTimeseriesGroupDMARCParamsDKIM]Optional

Filters results by DKIM (DomainKeys Identified Mail) validation status.

const EmailSecurityTimeseriesGroupDMARCParamsDKIMPass EmailSecurityTimeseriesGroupDMARCParamsDKIM = "PASS"
const EmailSecurityTimeseriesGroupDMARCParamsDKIMNone EmailSecurityTimeseriesGroupDMARCParamsDKIM = "NONE"
const EmailSecurityTimeseriesGroupDMARCParamsDKIMFail EmailSecurityTimeseriesGroupDMARCParamsDKIM = "FAIL"

Format in which results will be returned.

const EmailSecurityTimeseriesGroupDMARCParamsFormatJson EmailSecurityTimeseriesGroupDMARCParamsFormat = "JSON"
const EmailSecurityTimeseriesGroupDMARCParamsFormatCsv EmailSecurityTimeseriesGroupDMARCParamsFormat = "CSV"
Name param.Field[[]string]Optional

Array of names used to label the series in the response.

SPF param.Field[[]EmailSecurityTimeseriesGroupDMARCParamsSPF]Optional

Filters results by SPF (Sender Policy Framework) validation status.

const EmailSecurityTimeseriesGroupDMARCParamsSPFPass EmailSecurityTimeseriesGroupDMARCParamsSPF = "PASS"
const EmailSecurityTimeseriesGroupDMARCParamsSPFNone EmailSecurityTimeseriesGroupDMARCParamsSPF = "NONE"
const EmailSecurityTimeseriesGroupDMARCParamsSPFFail EmailSecurityTimeseriesGroupDMARCParamsSPF = "FAIL"
TLSVersion param.Field[[]EmailSecurityTimeseriesGroupDMARCParamsTLSVersion]Optional

Filters results by TLS version.

const EmailSecurityTimeseriesGroupDMARCParamsTLSVersionTlSv1_0 EmailSecurityTimeseriesGroupDMARCParamsTLSVersion = "TLSv1_0"
const EmailSecurityTimeseriesGroupDMARCParamsTLSVersionTlSv1_1 EmailSecurityTimeseriesGroupDMARCParamsTLSVersion = "TLSv1_1"
const EmailSecurityTimeseriesGroupDMARCParamsTLSVersionTlSv1_2 EmailSecurityTimeseriesGroupDMARCParamsTLSVersion = "TLSv1_2"
const EmailSecurityTimeseriesGroupDMARCParamsTLSVersionTlSv1_3 EmailSecurityTimeseriesGroupDMARCParamsTLSVersion = "TLSv1_3"
ReturnsExpand Collapse
type EmailSecurityTimeseriesGroupDMARCResponse struct{…}
Meta EmailSecurityTimeseriesGroupDMARCResponseMeta

Metadata for the results.

AggInterval EmailSecurityTimeseriesGroupDMARCResponseMetaAggInterval

Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to Aggregation intervals.

One of the following:
const EmailSecurityTimeseriesGroupDMARCResponseMetaAggIntervalFifteenMinutes EmailSecurityTimeseriesGroupDMARCResponseMetaAggInterval = "FIFTEEN_MINUTES"
const EmailSecurityTimeseriesGroupDMARCResponseMetaAggIntervalOneHour EmailSecurityTimeseriesGroupDMARCResponseMetaAggInterval = "ONE_HOUR"
const EmailSecurityTimeseriesGroupDMARCResponseMetaAggIntervalOneDay EmailSecurityTimeseriesGroupDMARCResponseMetaAggInterval = "ONE_DAY"
const EmailSecurityTimeseriesGroupDMARCResponseMetaAggIntervalOneWeek EmailSecurityTimeseriesGroupDMARCResponseMetaAggInterval = "ONE_WEEK"
const EmailSecurityTimeseriesGroupDMARCResponseMetaAggIntervalOneMonth EmailSecurityTimeseriesGroupDMARCResponseMetaAggInterval = "ONE_MONTH"
ConfidenceInfo EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfo
Annotations []EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotation
DataSource EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource

Data source for annotations.

One of the following:
const EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceAll EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"
const EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceAIBots EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"
const EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"
const EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceBGP EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"
const EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceBots EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"
const EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"
const EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceCT EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "CT"
const EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceDNS EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"
const EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"
const EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"
const EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceDos EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"
const EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"
const EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"
const EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceFw EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "FW"
const EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceFwPg EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"
const EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTP EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"
const EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"
const EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"
const EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"
const EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceIQI EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"
const EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"
const EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceNet EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "NET"
const EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"
const EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceSpeed EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"
const EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"
Description string
EndDate Time
formatdate-time
EventType EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventType

Event type for annotations.

One of the following:
const EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventTypeEvent EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"
const EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventTypeGeneral EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"
const EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventTypeOutage EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"
const EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"
const EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventTypePipeline EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"
const EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"
IsInstantaneous bool

Whether event is a single point in time or a time range.

LinkedURL string
formaturi
StartDate Time
formatdate-time
Tags []stringOptional
Level int64

Provides an indication of how much confidence Cloudflare has in the data.

DateRange []EmailSecurityTimeseriesGroupDMARCResponseMetaDateRange
EndTime Time

Adjusted end of date range.

formatdate-time
StartTime Time

Adjusted start of date range.

formatdate-time
LastUpdated Time

Timestamp of the last dataset update.

formatdate-time
Normalization EmailSecurityTimeseriesGroupDMARCResponseMetaNormalization

Normalization method applied to the results. Refer to Normalization methods.

One of the following:
const EmailSecurityTimeseriesGroupDMARCResponseMetaNormalizationPercentage EmailSecurityTimeseriesGroupDMARCResponseMetaNormalization = "PERCENTAGE"
const EmailSecurityTimeseriesGroupDMARCResponseMetaNormalizationMin0Max EmailSecurityTimeseriesGroupDMARCResponseMetaNormalization = "MIN0_MAX"
const EmailSecurityTimeseriesGroupDMARCResponseMetaNormalizationMinMax EmailSecurityTimeseriesGroupDMARCResponseMetaNormalization = "MIN_MAX"
const EmailSecurityTimeseriesGroupDMARCResponseMetaNormalizationRawValues EmailSecurityTimeseriesGroupDMARCResponseMetaNormalization = "RAW_VALUES"
const EmailSecurityTimeseriesGroupDMARCResponseMetaNormalizationPercentageChange EmailSecurityTimeseriesGroupDMARCResponseMetaNormalization = "PERCENTAGE_CHANGE"
const EmailSecurityTimeseriesGroupDMARCResponseMetaNormalizationRollingAverage EmailSecurityTimeseriesGroupDMARCResponseMetaNormalization = "ROLLING_AVERAGE"
const EmailSecurityTimeseriesGroupDMARCResponseMetaNormalizationOverlappedPercentage EmailSecurityTimeseriesGroupDMARCResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"
const EmailSecurityTimeseriesGroupDMARCResponseMetaNormalizationRatio EmailSecurityTimeseriesGroupDMARCResponseMetaNormalization = "RATIO"
Units []EmailSecurityTimeseriesGroupDMARCResponseMetaUnit

Measurement units for the results.

Name string
Value string
Fail []string
None []string
Pass []string

Get email DMARC validation time series

package main

import (
  "context"
  "fmt"

  "github.com/stainless-sdks/cloudflare-go"
  "github.com/stainless-sdks/cloudflare-go/option"
  "github.com/stainless-sdks/cloudflare-go/radar"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  response, err := client.Radar.Email.Security.TimeseriesGroups.DMARC(context.TODO(), radar.EmailSecurityTimeseriesGroupDMARCParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.Meta)
}
{
  "result": {
    "meta": {
      "aggInterval": "FIFTEEN_MINUTES",
      "confidenceInfo": {
        "annotations": [
          {
            "dataSource": "ALL",
            "description": "Cable cut in Tonga",
            "endDate": "2019-12-27T18:11:19.117Z",
            "eventType": "EVENT",
            "isInstantaneous": true,
            "linkedUrl": "https://example.com",
            "startDate": "2019-12-27T18:11:19.117Z",
            "tags": [
              "BOT_CLASS"
            ]
          }
        ],
        "level": 0
      },
      "dateRange": [
        {
          "endTime": "2022-09-17T10:22:57.555Z",
          "startTime": "2022-09-16T10:22:57.555Z"
        }
      ],
      "lastUpdated": "2019-12-27T18:11:19.117Z",
      "normalization": "PERCENTAGE",
      "units": [
        {
          "name": "*",
          "value": "requests"
        }
      ]
    },
    "serie_0": {
      "FAIL": [
        "10"
      ],
      "NONE": [
        "10"
      ],
      "PASS": [
        "10"
      ]
    }
  },
  "success": true
}
Returns Examples
{
  "result": {
    "meta": {
      "aggInterval": "FIFTEEN_MINUTES",
      "confidenceInfo": {
        "annotations": [
          {
            "dataSource": "ALL",
            "description": "Cable cut in Tonga",
            "endDate": "2019-12-27T18:11:19.117Z",
            "eventType": "EVENT",
            "isInstantaneous": true,
            "linkedUrl": "https://example.com",
            "startDate": "2019-12-27T18:11:19.117Z",
            "tags": [
              "BOT_CLASS"
            ]
          }
        ],
        "level": 0
      },
      "dateRange": [
        {
          "endTime": "2022-09-17T10:22:57.555Z",
          "startTime": "2022-09-16T10:22:57.555Z"
        }
      ],
      "lastUpdated": "2019-12-27T18:11:19.117Z",
      "normalization": "PERCENTAGE",
      "units": [
        {
          "name": "*",
          "value": "requests"
        }
      ]
    },
    "serie_0": {
      "FAIL": [
        "10"
      ],
      "NONE": [
        "10"
      ],
      "PASS": [
        "10"
      ]
    }
  },
  "success": true
}