DMARC API

API link: Explore API

Add domains

There are two ways to add domains to DMARC monitoring

  1. Bulk API: https://api-doc.emailconsul.com/post-dmarc-add-bulk

  2. Import CSV: https://api-doc.emailconsul.com/post-dmarc-import

    CSV must contain a "domain" column.

All of these methods are upserting your domains, which means that if a domain is already added, it will not be added again, preventing duplication.

After adding a domain will have status equal WAITING, and will be sent to validation. When validation is complete, the status will be changed to UPDATED. If anything goes wrong, thestatus goes to FAILED.

Validation needs to get the current value for the p tag in dmarc DNS record, and verify if the rua tag is set properly to process DMARC reports by EmailConsul. If any issues are found, then warnings field will be populated with the related messages. Otherwise, the warnings will be empty of undefined.

Get catch-up email for DMARC Reports

To get a valid catch-up email, use the API https://api-doc.emailconsul.com/get-dmarc-catch-up-email. This API returns the email that must be added to the rua tag in your DMARC DNS record.

Get a list of domains with DMARC stats

To get a list of domains with stats, use the API https://api-doc.emailconsul.com/get-dmarc. This API returns the list of domains with all related info

Response item description:

Get one domain with DMARC stats

To get one domain with DMARC stats, use the Get List API (https://api-doc.emailconsul.com/get-dmarc) with the filter by domain

Delete one domain

To delete a domain from DMARC monitoring, use https://api-doc.emailconsul.com/delete-dmarc-by-id.

Refreshing the domain info

By default, the domain in DMARC updates info every 24 hours to check the current p tag in the DNS dmarc record. In some cases, we want to see the updates now, without waiting ~24 hours to get the updated info (For example, we just updated the DNS and want to see if the dmarc record is set properly to process DMARC reports by EmailConsul). In this scenario, we can use https://api-doc.emailconsul.com/post-dmarc-refresh. By sending this request, you trigger the validation for this domain right away, and usually, the data for the info is updated within a couple of seconds. While updating, the status goes back to WAITING until validation is complete, and the status is updated to UPDATED.

Export to CSV

Use https://api-doc.emailconsul.com/get-dmarc-export to export domains with the related stats into CSV. Apply filters if needed.

Available count API

Use https://api-doc.emailconsul.com/get-dmarc-available-count to see how many domains can be added within the current Usage Plan.

Get list of Reporters

To get the list of all unique reporters (receivers) that were captured from DMARC reports, use https://api-doc.emailconsul.com/get-dmarc-org-names

Get list of Sources

To get the list of all unique sources (senders) that were captured from DMARC reports, use https://api-doc.emailconsul.com/get-dmarc-ip-org-names

Get Sources with stats

To get the list of sources (senders) with stats, use https://api-doc.emailconsul.com/get-dmarc-ip-org-names-by-id

Response item description:

Get IPs with stats

To get the list of IPs with stats, use https://api-doc.emailconsul.com/get-dmarc-ips-by-id

Response item description:

Get timeseries stats

To get stats for DMARC, use APIs:

By DMARC type: https://api-doc.emailconsul.com/get-dmarc-timeseries-dmarc-type

Available dmarc_type options:

threat, compliant

By Reporter (Receiver): https://api-doc.emailconsul.com/get-dmarc-timeseries-org-name

By Source (Sender): https://api-doc.emailconsul.com/get-dmarc-timeseries-ip-org-name

By Policy Applied: https://api-doc.emailconsul.com/get-dmarc-timeseries-disposition

Get aggregated stats

To get stats for DMARC, use APIs:

By total count: https://api-doc.emailconsul.com/get-dmarc-aggregated-count

By domain: https://api-doc.emailconsul.com/get-dmarc-aggregated-domain

By IP: https://api-doc.emailconsul.com/get-dmarc-aggregated-ip

By Reporter (Receiver): https://api-doc.emailconsul.com/get-dmarc-aggregated-org-name

By Source (Sender): https://api-doc.emailconsul.com/get-dmarc-aggregated-ip-org-name

By country: https://api-doc.emailconsul.com/get-dmarc-aggregated-ip-country

By Policy Evaluated Reason Type: https://api-doc.emailconsul.com/get-dmarc-aggregated-policy-evaluated-reason-type

By Policy Evaluated Reason Comment: https://api-doc.emailconsul.com/get-dmarc-aggregated-policy-evaluated-reason-comment

Get DMARC record logs

To get the log of records from DMARC reports, use https://api-doc.emailconsul.com/get-dmarc-records

Response item description: