List Account Stats
curl --request GET \
--url https://api.sendpost.io/api/v1/account/stat \
--header 'X-Account-ApiKey: <api-key>'import requests
url = "https://api.sendpost.io/api/v1/account/stat"
headers = {"X-Account-ApiKey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Account-ApiKey': '<api-key>'}};
fetch('https://api.sendpost.io/api/v1/account/stat', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sendpost.io/api/v1/account/stat",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Account-ApiKey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sendpost.io/api/v1/account/stat"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Account-ApiKey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sendpost.io/api/v1/account/stat")
.header("X-Account-ApiKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sendpost.io/api/v1/account/stat")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Account-ApiKey"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"date": "2020-03-12",
"stats": {
"processed": 1225,
"delivered": 1200,
"dropped": 10,
"hardBounced": 10,
"softBounced": 5,
"opens": 150,
"clicks": 130,
"unsubscribed": 15,
"spams": 12
}
},
{
"date": "2020-03-14",
"stats": {
"processed": 1340,
"delivered": 1300,
"dropped": 20,
"hardBounced": 15,
"softBounced": 5,
"opens": 172,
"clicks": 147,
"unsubscribed": 5,
"spams": 2
}
}
]Stats (A)
List Account Stats
Retrieve email statistics for all sub-accounts of a specific account for a given date range.
GET
/
account
/
stat
List Account Stats
curl --request GET \
--url https://api.sendpost.io/api/v1/account/stat \
--header 'X-Account-ApiKey: <api-key>'import requests
url = "https://api.sendpost.io/api/v1/account/stat"
headers = {"X-Account-ApiKey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Account-ApiKey': '<api-key>'}};
fetch('https://api.sendpost.io/api/v1/account/stat', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sendpost.io/api/v1/account/stat",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Account-ApiKey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sendpost.io/api/v1/account/stat"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Account-ApiKey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sendpost.io/api/v1/account/stat")
.header("X-Account-ApiKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sendpost.io/api/v1/account/stat")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Account-ApiKey"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"date": "2020-03-12",
"stats": {
"processed": 1225,
"delivered": 1200,
"dropped": 10,
"hardBounced": 10,
"softBounced": 5,
"opens": 150,
"clicks": 130,
"unsubscribed": 15,
"spams": 12
}
},
{
"date": "2020-03-14",
"stats": {
"processed": 1340,
"delivered": 1300,
"dropped": 20,
"hardBounced": 15,
"softBounced": 5,
"opens": 172,
"clicks": 147,
"unsubscribed": 5,
"spams": 2
}
}
]Authorizations
This api key can be used for all account level operations
Query Parameters
The start date for retrieving stats (inclusive)
Example:
"2020-03-12"
The end date for retrieving stats (inclusive). The difference between from and to should not exceed 31 days.
Example:
"2020-04-14"
Was this page helpful?
⌘I