curl --request GET \
--url https://api.sendpost.io/api/v1/account/stat/aggregate/group \
--header 'X-Account-ApiKey: <api-key>'import requests
url = "https://api.sendpost.io/api/v1/account/stat/aggregate/group"
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/aggregate/group', 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/aggregate/group",
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/aggregate/group"
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/aggregate/group")
.header("X-Account-ApiKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sendpost.io/api/v1/account/stat/aggregate/group")
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
}Get Account Group Aggregate Stats
Retrieve summarized email statistics for a specific group across all sub-accounts. Returns a single aggregated record for the group—ideal for campaign reporting.
Use Cases:
- Annual performance report for a specific product integration
- Compare total metrics for different campaigns
- Summarize email performance for a specific customer segment
- Calculate ROI for a marketing campaign by group
Example: Get yearly stats for Shopify integration:
GET /account/stat/aggregate/group?group=shopify&from=2024-01-01&to=2024-12-31
Note: Maximum date range is 366 days (1 year).
curl --request GET \
--url https://api.sendpost.io/api/v1/account/stat/aggregate/group \
--header 'X-Account-ApiKey: <api-key>'import requests
url = "https://api.sendpost.io/api/v1/account/stat/aggregate/group"
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/aggregate/group', 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/aggregate/group",
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/aggregate/group"
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/aggregate/group")
.header("X-Account-ApiKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sendpost.io/api/v1/account/stat/aggregate/group")
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
Query Parameters
The group/tag name to filter and aggregate statistics by.
"shopify"
Start date for aggregation (inclusive). Format YYYY-MM-DD.
"2024-01-01"
End date for aggregation (inclusive). Max 366 days from from date.
"2024-12-31"
Response
Successfully retrieved aggregate stats by group.
Aggregated email statistics over a date range. Inherits all fields from Stat schema with the same meanings.
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?