There are three ways to add IPs/Domains
Bulk API: https://api.emailconsul.com/api/v1.0/doc/#/Traps/post_traps_add_bulk
Add IPs within the netmask (only for IPs): https://api.emailconsul.com/api/v1.0/doc/#/Traps/post_traps_add_netmask
Import CSV: https://api.emailconsul.com/api/v1.0/doc/#/Ips/post_ips_import
All of these methods are upserting your IPs/Domains, which means that if an IP/domain is already added, it will not be added again, preventing duplication.
Once your domains and IP’s are approved, EmailConsul will begin to return data whenever it becomes available.
To get an added list of IPs/Domains, use the API https://api.emailconsul.com/api/v1.0/doc/#/Traps/get_traps
To get one added IP/Domain, use the Get List API (https://api.emailconsul.com/api/v1.0/doc/#/Traps/get_traps) with the filter by ip or domain, like
, where we send a request to get info just for 1.1.1.1 IP, and we expect to get just one result by applying limit=1 and offset=0.
To delete a bunch of IPs/domains, use the API https://api.emailconsul.com/api/v1.0/doc/#/Traps/delete_traps. With this API, you can delete IPs/domains that satisfy a filter from the passed parameters. Without parameters (filters), it will remove all IPs/domains.
There are two ways to delete an IP:
By ID with https://api.emailconsul.com/api/v1.0/doc/#/Traps/delete_traps__id_
By using the Delete Many API (https://api.emailconsul.com/api/v1.0/doc/#/Traps/delete_traps)
To delete some specific IP/Domain, use the Delete Many API with the filter by IP, like
, where we send a request to delete 1.1.1.1 IP
Use https://api.emailconsul.com/api/v1.0/doc/#/Traps/get_traps_log to see when any traps occur. The info does not add retroactively; the info is collected after the IP/Domain is added and approved, and until it is deleted.
Use https://api.emailconsul.com/api/v1.0/doc/#/Traps/get_traps_available_count to see how many IPs/Domains can be added within the current Usage Plan.
To get aggregated data, use the API https://api.emailconsul.com/api/v1.0/doc/#/Traps/get_traps_stats_aggregated
Send the group parameter to indicate what data to summarize.
Response item description:
To get time-series data on how many traps occur over time, use the API https://api.emailconsul.com/api/v1.0/doc/#/Traps/get_traps_stats_timeseries
Response item description: