Thread Intelligence API

API link: Swagger UI

Adding IPs/Domains

There are three ways to add IPs/Domains

  1. Bulk API: https://api.emailconsul.com/api/v1.0/doc/#/Traps/post_traps_add_bulk

  2. Add IPs within the netmask (only for IPs): https://api.emailconsul.com/api/v1.0/doc/#/Traps/post_traps_add_netmask

  3. 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.

Approval and Data Visibility

Once your domains and IP’s are approved, EmailConsul will begin to return data whenever it becomes available.

Getting a list of IPs/Domains

To get an added list of IPs/Domains, use the API https://api.emailconsul.com/api/v1.0/doc/#/Traps/get_traps

Getting one IP/Domain

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.

Delete IPs/Domains

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.

Deleting one IP/Domain

There are two ways to delete an IP:

  1. By ID with https://api.emailconsul.com/api/v1.0/doc/#/Traps/delete_traps__id_

  2. 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

IPs/Domain log

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.

Available count API

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.

Get aggregated data

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:

Get time-series data

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: