Get sends by domains
Post /statistics/domains
Parameters:
Name | Description | Type | Mandatory |
---|---|---|---|
dateBegin | Date begin on YYYY-MM-ddThh:mm:ss format | Int | No |
dateEnd | Date end on YYYY-MM-ddThh:mm:ss format | Int | No |
froms | Array of Senders email | Array | No |
apiKeys | Array of api keys | Array | No |
tags | Array of tags | Array | No |
Response:
Return count of messages sent through the platform and their status define on the filter
Name | Description | Type | |||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
domain |
An array with information about each email on domain
|
Array |
Programming language:
Request exemple:
{ "dateBegin":1454545657, "dateEnd":1564564564, "froms":["from@example.com"], "apiKeys":[], "tags":[] }
Response exemple:
{ "gmail.com": { "error": 0, "rejected": 0, "requested": 1, "deferred": 0, "scheduled": 0, "filtered": 0, "delivered": 1, "hardbounced": 0, "softbounced": 0, "open": 0, "click": 0, "read": 0, "unsubscribed": 0, "complaint": 0, "opener": 0, "clicker": 0 }, "hotmail.fr": { "error": 0, "rejected": 0, "requested": 3, "deferred": 0, "scheduled": 0, "filtered": 0, "delivered": 3, "hardbounced": 0, "softbounced": 0, "open": 2, "click": 0, "read": 0, "unsubscribed": 0, "complaint": 0, "opener": 2, "clicker": 0 }, "yahoo.fr": { "error": 0, "rejected": 0, "requested": 9, "deferred": 0, "scheduled": 0, "filtered": 0, "delivered": 8, "hardbounced": 0, "softbounced": 0, "open": 0, "click": 0, "read": 0, "unsubscribed": 0, "complaint": 0, "opener": 0, "clicker": 0 } }
Code example:
curl -X POST -d '{"dateBegin":"1443046641","dateEnd":"1443219441","from":["email1@example.com", "email2@tipimail.com"]}' -H "Content-Type: application/json" -H "X-Tipimail-ApiUser:YOUR_API_USERNAME" -H "X-Tipimail-ApiKey:YOUR_API_KEY" https://api.tipimail.com/v1/statistics/domains
require 'vendor/autoload.php'; $tipimail = new Tipimail\Tipimail('YOUR_SMTP_USERNAME', 'YOUR_API_KEY'); try { $dateBegin = null; $dateEnd = null; $froms = null; $apiKeys = null; $tags = null; $result = $tipimail->getStatisticsService()->getSendsByDomain($dateBegin, $dateEnd, $froms, $tags, $apiKeys); var_dump($result); } catch(Tipimail\Exceptions\TipimailException $e) { echo 'Exception received :', $e->getMessage(), "\n"; }
... public class Example { public static void main(String[] args) { Tipimail tipimail = new Tipimail("YOUR_SMTP_USERNAME", "YOUR_API_KEY"); try { nteger dateBegin = null; Integer dateEnd = null; ArrayList<String> froms = null; ArrayList<String> tags = null; ArrayList<String> apiKeys = null; HashMap<String, StatisticsSends> sendsByDomain; sendsByDomain = tipimail.getStatisticsService().getSendsByDomain(dateBegin, dateEnd, froms, tags, apiKeys); } catch (TipimailException e) { } } }