Supported Formats

JSON

GET api.dmarcreport.com/v1/domains/:domain_id/agg_reports.json
List, Search and Paginate Aggregte Reports

Supported Formats

JSON

Errors

Code Description
401 Unauthorized
404 Not Found
500 Server crashed for some reason

Examples

{
  "reports": [
    {
      "id": 1,
      "raw_xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>...",
      "org_name": "google.com",
      "email": "noreply-dmarc-support@google.com",
      "extra_contact_info": "https://support.google.com/a/answer/2466580",
      "report_id": "1627703331531660819",
      "date_begin": "2019-02-10T00:00:00.000Z",
      "date_end": "2019-02-10T23:59:59.000Z",
      "policy_domain": "twlnet.com",
      "dkim_alignment": "s",
      "spf_alignment": "s",
      "domain_policy": "reject",
      "subdomain_policy": "reject",
      "percentage": 100,
      "domain_id": 1,
      "created_at": "2019-10-10T11:47:11.613Z",
      "updated_at": "2019-10-10T11:47:11.613Z",
      "records_count": null,
      "report_email_message_id": null
    },
    {
      "id": 2,
      "raw_xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>...",
      "org_name": "google.com",
      "email": "noreply-dmarc-support@google.com",
      "extra_contact_info": "https://support.google.com/a/answer/2466580",
      "report_id": "949348866075514174",
      "date_begin": "2019-02-12T00:00:00.000Z",
      "date_end": "2019-02-12T23:59:59.000Z",
      "policy_domain": "borschow.com",
      "dkim_alignment": "r",
      "spf_alignment": "r",
      "domain_policy": "reject",
      "subdomain_policy": "reject",
      "percentage": 100,
      "domain_id": 1,
      "created_at": "2019-10-10T11:48:07.386Z",
      "updated_at": "2019-10-10T11:48:07.386Z",
      "records_count": null,
      "report_email_message_id": null
    },
    ...
  ],
  "meta": {
    "total_reports": 5,
    "current_page": 1,
    "per_page": 25,
    "total_pages": 2
  }
}

Params

Param name Description
q
optional

Params for Ransack Search

Validations:

  • Must be a Hash

q[org_name_eq]
optional

Search by Reporter

Validations:

  • Must be a String

q[date_begin_gteq]
optional

Search by date begin, Format: YYYY-MM-DD

Validations:

  • Must be a String

q[date_begin_lteq]
optional

Search by date end, Format: YYYY-MM-DD

Validations:

  • Must be a String

page
optional

Page Number

Validations:

  • Must be a String

per
optional

Entries per page.

Validations:

  • Must be a String


GET api.dmarcreport.com/v1/domains/:domain_id/agg_reports/records.json
Get all the details of a Aggregte Reports records

Supported Formats

JSON

Errors

Code Description
401 Unauthorized
404 Not Found
500 Server crashed for some reason

Examples

{
  "records": [
    {
      "id": 1,
      "count": 1,
      "disposition": "none",
      "dkim_status": "pass",
      "spf_status": "pass",
      "reason": "",
      "org_name": "google.com",
      "header_from": "",
      "dmarc_compliance": "",
      "ip_address": {
        "id": 3,
        "sane_source_ip": "87.106.127.28",
        "blacklisted": 0, // Tells you if ip is blacklisted in how-many lists.
        "ptr": "ec2-52-30-166-6.eu-west-1.compute.amazonaws.com",
        "country": "de"
      }
      "auth_results": [
        {
          "id": 1,
          "type": "Dkim",
          "domain": "twlnet.com",
          "result": "pass",
          "selector": "201810"
        },
        {
          "id": 2,
          "type": "Spf",
          "domain": "twlnet.com",
          "result": "pass",
          "selector": ""
        }
      ]
    }
  ]
}

Params

Param name Description
q
optional

Params for Ransack Search

Validations:

  • Must be a Hash

q[agg_report_date_begin_gteq]
optional

Search by start date of agg report format: “mm-dd-yyyy”

Validations:

  • Must be a String

q[agg_report_date_end_gteq]
optional

Search by end date of agg report format: “mm-dd-yyyy”

Validations:

  • Must be a String

q[agg_report_org_name_eq]
optional

Search by search by reporter

Validations:

  • Must be a String

q[ip_address_source_ip_eq]
optional

Search by source ip

Validations:

  • Must be a String

q[ip_address_ptr_eq]
optional

Search by PTR

Validations:

  • Must be a String

q[ip_address_country_eq]
optional

Search by country alpha2 code e.g. “us” for “United States of America”

Validations:

  • Must be a String

q[count_eq]
optional

Search by for Volume

Validations:

  • Must be a Integer

q[disposition_eq]
optional

Search by Applied Policy

Validations:

  • Must be one of: none, quarantine, reject.

q[spf_alignment_eq]
optional

Search by SPF Alignment: true for Aligned, false for Unaligned

Validations:

  • Must be one of: true, false.

q[spf_status_eq]
optional

Search by SPF

Validations:

  • Must be one of: pass, fail.

q[spf_result_eq]
optional

Search by SPF Auth Result

Validations:

  • Must be one of: none, neutral, pass, fail, softfail.

q[spf_domain_eq]
optional

Search by SPF Domain

Validations:

  • Must be a String

q[spf_domain_eq]
optional

Search by SPF Auth Scope

Validations:

  • Must be a String

q[reason_eq]
optional

Search by Policy Override Reason

Validations:

  • Must be one of: forwarded, sampled_out, trusted_forwarder, mailing_list, local_policy, other.

q[dkim_alignment_eq]
optional

Search by DKIM Alignment: true for Aligned, false for Unaligned

Validations:

  • Must be one of: true, false.

q[dkim_status_eq]
optional

Search by DKIM

Validations:

  • Must be one of: pass, fail.

q[dkims_result_eq]
optional

Search by DKIM Auth result

Validations:

  • Must be one of: none, neutral, pass, fail, softfail.

q[dkims_domain_eq]
optional

Search by DKIM Domain

Validations:

  • Must be a String

q[dkims_selector_eq]
optional

Search by DKIM selector

Validations:

  • Must be a String

q[dmarc_compliance_eq]
optional

Search by DMARC Compliance: 0 for complaint, 1 for non compliant and 2 for forwarded

Validations:

  • Must be one of: 0, 1, 2.

page
optional

Page Number

Validations:

  • Must be a String

per
optional

Entries per page.

Validations:

  • Must be a String


GET api.dmarcreport.com/v1/domains/:domain_id/agg_reports/:id.json
Get all the details of a Aggregte Report

Supported Formats

JSON

Errors

Code Description
401 Unauthorized
404 Not Found
500 Server crashed for some reason

Examples

{
  "id": 1,
  "raw_xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>...",
  "report_id": "1627703331531660819",
  "org_name": "google.com",
  "email": "noreply-dmarc-support@google.com",
  "extra_contact_info": "https://support.google.com/a/answer/2466580",
  "date_begin": "2019-02-10T00:00:00.000Z",
  "date_end": "2019-02-10T23:59:59.000Z",
  "policy_domain": "twlnet.com",
  "dkim_alignment": "s",
  "spf_alignment": "s",
  "domain_policy": "reject",
  "subdomain_policy": "reject",
  "percentage": 100,
  "domain_id": 1,
  "records": [
    {
      "id": 1,
      "count": 1,
      "disposition": "none",
      "dkim_status": "pass",
      "spf_status": "pass",
      "reason": "",
      "header_from": "",
      "ip_address": {
        "id": 3,
        "sane_source_ip": "87.106.127.28",
        "blacklisted": 0, // Tells you if ip is blacklisted in how-many lists.
        "ptr": "ec2-52-30-166-6.eu-west-1.compute.amazonaws.com",
        "country": "de"
      }
      "auth_results": [
        {
          "id": 1,
          "type": "Dkim",
          "domain": "twlnet.com",
          "result": "pass",
          "selector": "201810"
        },
        {
          "id": 2,
          "type": "Spf",
          "domain": "twlnet.com",
          "result": "pass",
          "selector": ""
        }
      ]
    }
  ]
}