curl --request GET \
--url https://api.sendpost.io/api/v1/account/subaccount/stat/{subaccount_id}/group \
--header 'X-Account-ApiKey: <api-key>'import requests
url = "https://api.sendpost.io/api/v1/account/subaccount/stat/{subaccount_id}/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/subaccount/stat/{subaccount_id}/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/subaccount/stat/{subaccount_id}/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/subaccount/stat/{subaccount_id}/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/subaccount/stat/{subaccount_id}/group")
.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}/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": 22500,
"delivered": 20000,
"dropped": 1000,
"hardBounced": 1000,
"softBounced": 500,
"opened": 5000,
"clicked": 3000,
"unsubscribed": 500,
"spam": 200
}Get Group Aggregate Stats
Retrieve aggregated email statistics filtered by a specific group/tag. Groups are labels you assign when sending emails to categorize and segment your analytics.
What are Groups? Groups (also called tags) are strings you attach to emails when sending. They help you:
- Track different email types (transactional vs marketing)
- Segment by campaign or feature
- Compare performance across categories
Setting Groups When Sending:
{
"from": { "email": "orders@shop.com" },
"to": [{ "email": "customer@example.com" }],
"subject": "Order Confirmation",
"groups": ["order-confirmations", "transactional"]
}
Use Cases:
- Compare welcome email vs password reset performance
- Track marketing campaign performance by campaign ID
- Measure transactional vs promotional email metrics
- Analyze A/B test results by variant group
Example: Get stats for “welcome-emails” group:
GET /account/subaccount/stat/11/group?group=welcome-emails&from=2024-01-01&to=2024-03-31
Note: Maximum date range is 366 days.
curl --request GET \
--url https://api.sendpost.io/api/v1/account/subaccount/stat/{subaccount_id}/group \
--header 'X-Account-ApiKey: <api-key>'import requests
url = "https://api.sendpost.io/api/v1/account/subaccount/stat/{subaccount_id}/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/subaccount/stat/{subaccount_id}/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/subaccount/stat/{subaccount_id}/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/subaccount/stat/{subaccount_id}/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/subaccount/stat/{subaccount_id}/group")
.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}/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": 22500,
"delivered": 20000,
"dropped": 1000,
"hardBounced": 1000,
"softBounced": 500,
"opened": 5000,
"clicked": 3000,
"unsubscribed": 500,
"spam": 200
}Authorizations
This api key can be used for all account level operations
Path Parameters
The ID of the subaccount to retrieve
11
Query Parameters
The group/tag name to filter statistics by. Must match the group name used when sending emails.
"order-confirmations"
Start date for aggregation (inclusive). Format YYYY-MM-DD.
"2024-01-01"
The ending date for the aggregated stats (Note: from should be earlier than to and the date range should not exceed 366 days)
Response
Aggregated email stats for the group within the specified date range
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?