import requests
url = "https://api.sendpost.io/api/v1/subaccount/stat"
params = {"from": "2020-03-12", "to": "2020-04-14"}
headers = {
"accept": "application/json",
"X-SubAccount-ApiKey": "<subaccount_api_key>"
}
response = requests.get(url, headers=headers, params=params)
print(response.json())
curl --request GET \
--url https://api.sendpost.io/api/v1/account/subaccount/stat/{subaccount_id} \
--header 'X-Account-ApiKey: <api-key>'const options = {method: 'GET', headers: {'X-Account-ApiKey': '<api-key>'}};
fetch('https://api.sendpost.io/api/v1/account/subaccount/stat/{subaccount_id}', 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/subaccount/stat/{subaccount_id}",
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/subaccount/stat/{subaccount_id}"
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/subaccount/stat/{subaccount_id}")
.header("X-Account-ApiKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sendpost.io/api/v1/account/subaccount/stat/{subaccount_id}")
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[
{
"processed": 1000,
"sent": 990,
"dropped": 8,
"smtpDropped": 2,
"delivered": 975,
"softBounced": 10,
"hardBounced": 5,
"opened": 450,
"clicked": 120,
"unsubscribed": 3,
"spam": 1
}
]List Stats
Retrieve daily email statistics for a specific sub-account. Returns one record per day within the date range, perfect for charting trends and identifying patterns.
Metrics Per Day:
| Metric | Description |
|---|---|
processed | Emails submitted to SendPost |
delivered | Successfully delivered to recipient’s mailbox |
dropped | Blocked before sending (suppressed, invalid, etc.) |
hardBounced | Permanent failures (invalid address, domain doesn’t exist) |
softBounced | Temporary failures (mailbox full, server down) |
opens | Total email opens (includes multiple opens per recipient) |
clicks | Total link clicks |
unsubscribed | Recipients who unsubscribed |
spams | Emails marked as spam by recipients |
Key Rates to Calculate:
- Delivery Rate =
delivered / processed × 100 - Open Rate =
opens / delivered × 100 - Click Rate =
clicks / delivered × 100 - Bounce Rate =
(hardBounced + softBounced) / processed × 100
Use Cases:
- Daily performance dashboard
- Week-over-week trend analysis
- Identifying delivery issues early
- SLA monitoring and reporting
Note: Maximum date range is 31 days. Both from and to dates are inclusive.
import requests
url = "https://api.sendpost.io/api/v1/subaccount/stat"
params = {"from": "2020-03-12", "to": "2020-04-14"}
headers = {
"accept": "application/json",
"X-SubAccount-ApiKey": "<subaccount_api_key>"
}
response = requests.get(url, headers=headers, params=params)
print(response.json())
curl --request GET \
--url https://api.sendpost.io/api/v1/account/subaccount/stat/{subaccount_id} \
--header 'X-Account-ApiKey: <api-key>'const options = {method: 'GET', headers: {'X-Account-ApiKey': '<api-key>'}};
fetch('https://api.sendpost.io/api/v1/account/subaccount/stat/{subaccount_id}', 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/subaccount/stat/{subaccount_id}",
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/subaccount/stat/{subaccount_id}"
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/subaccount/stat/{subaccount_id}")
.header("X-Account-ApiKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sendpost.io/api/v1/account/subaccount/stat/{subaccount_id}")
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[
{
"processed": 1000,
"sent": 990,
"dropped": 8,
"smtpDropped": 2,
"delivered": 975,
"softBounced": 10,
"hardBounced": 5,
"opened": 450,
"clicked": 120,
"unsubscribed": 3,
"spam": 1
}
]Authorizations
This api key can be used for all account level operations
Path Parameters
The unique ID of the sub-account to retrieve stats for.
11
Query Parameters
Start date for stats retrieval (inclusive). Format YYYY-MM-DD.
"2024-01-01"
End date for stats retrieval (inclusive). Must be after from date with max 31 days range.
"2024-01-31"
Response
Successful response
Total number of emails accepted by SendPost API for processing. This is the starting point - all emails submitted through the API.
225
Number of emails sent to recipient mail servers. sent = processed - dropped - smtpDropped
220
Number of emails dropped before sending. Common reasons:
- Recipient email in suppression list (hard bounce, spam complaint, unsubscribe)
- Invalid recipient email format
- Sender domain not verified
10
Number of emails dropped at SMTP level due to policy violations or rate limiting by the receiving server before delivery attempt completed.
5
Number of emails successfully delivered to recipient mail servers. Note: Delivered means accepted by the server, not necessarily in inbox.
200
Number of temporary delivery failures (soft bounces). Common causes:
- Recipient mailbox full
- Server temporarily unavailable
- Message too large SendPost automatically retries soft bounces.
5
Number of permanent delivery failures (hard bounces). Common causes:
- Recipient email doesn't exist
- Domain doesn't exist
- Recipient has blocked sender Hard bounced addresses are automatically added to suppression list.
10
Number of emails opened (tracking pixel loaded). Requires trackOpens=true. Note: Some email clients block tracking pixels.
150
Number of emails with at least one link clicked. Requires trackClicks=true.
50
Number of recipients who clicked the unsubscribe link. Unsubscribed addresses are automatically added to suppression list.
6
Number of spam complaints (recipient marked email as spam). High spam rates can severely impact your sender reputation. Target: Keep spam rate below 0.1%.
2
Was this page helpful?