DMARC API

API link: Swagger UI

Add domains

There are three ways to add domains to DMARC monitoring

  1. Bulk API: https://api.emailconsul.com/api/v1.0/doc/#/DMARC/post_dmarc_add_bulk

  2. Import CSV: https://api.emailconsul.com/api/v1.0/doc/#/DMARC/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 a list of domains with DMARC stats

To get a list of domains with stats, use the API https://api.emailconsul.com/api/v1.0/doc/#/DMARC/get_dmarc. This API returns the list of domains with all related info (see Domain base model)

Response item description:

Get one domain with DMARC stats

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

Delete one domain

To delete a domain from DMARC monitoring, use https://api.emailconsul.com/api/v1.0/doc/#/DMARC/delete_dmarc__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.emailconsul.com/api/v1.0/doc/#/DMARC/post_dmarc__id__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.emailconsul.com/api/v1.0/doc/#/DMARC/get_dmarc_export to export domains with the related stats into CSV. Apply filters if needed.

Available count API

Use https://api.emailconsul.com/api/v1.0/doc/#/DMARC/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.emailconsul.com/api/v1.0/doc/#/DMARC/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.emailconsul.com/api/v1.0/doc/#/DMARC/get_dmarc_ip_org_names

Get Sources with stats

To get the list of sources (senders) with stats, use https://api.emailconsul.com/api/v1.0/doc/#/DMARC/get_dmarc__id__ip_org_names

Response item description:

Get IPs with stats

To get the list of IPs with stats, use https://api.emailconsul.com/api/v1.0/doc/#/DMARC/get_dmarc__id__ips

Response item description:

Get timeseries stats

To get stats for DMARC, use APIs:

By DMARC type: https://api.emailconsul.com/api/v1.0/doc/#/DMARC/get_dmarc_timeseries_dmarc_type

Available dmarc_type options:

threat, compliant

By Reporter (Receiver): https://api.emailconsul.com/api/v1.0/doc/#/DMARC/get_dmarc_timeseries_org_name

By Source (Sender): https://api.emailconsul.com/api/v1.0/doc/#/DMARC/get_dmarc_timeseries_ip_org_name

By Policy Applied: https://api.emailconsul.com/api/v1.0/doc/#/DMARC/get_dmarc_timeseries_disposition

Get aggregated stats

To get stats for DMARC, use APIs:

By total count: https://api.emailconsul.com/api/v1.0/doc/#/DMARC/get_dmarc_aggregated_count

By domain: https://api.emailconsul.com/api/v1.0/doc/#/DMARC/get_dmarc_aggregated_domain

By IP: https://api.emailconsul.com/api/v1.0/doc/#/DMARC/get_dmarc_aggregated_ip

By Reporter (Receiver): https://api.emailconsul.com/api/v1.0/doc/#/DMARC/get_dmarc_aggregated_org_name

By Source (Sender): https://api.emailconsul.com/api/v1.0/doc/#/DMARC/get_dmarc_aggregated_ip_org_name

By country: https://api.emailconsul.com/api/v1.0/doc/#/DMARC/get_dmarc_aggregated_ip_country