Skip to main content
GET
/
account
/
subaccount
/
stat
/
{subaccount_id}
/
aggregate
Python
import requests
url = "https://api.sendpost.io/api/v1/subaccount/stat/aggregate"
params = {"from": "2019-01-01", "to": "2019-12-31"}
headers = {
    "accept": "application/json",
    "X-SubAccount-ApiKey": "<subaccount_api_key>"
}
response = requests.get(url, headers=headers, params=params)
print(response.json())
{
  "processed": 225,
  "delivered": 200,
  "dropped": 10,
  "hardBounced": 10,
  "softBounced": 5,
  "unsubscribed": 6,
  "spam": 2
}

Authorizations

X-Account-ApiKey
string
header
required

This api key can be used for all account level operations

Path Parameters

subaccount_id
integer
required

The ID of the subaccount to retrieve

Example:

11

Query Parameters

from
string<date>
required

Start date for stats retrieval.

to
string<date>
required

Date to which stats should be retrieved ( Note than from date should be earlier than to date. Also the difference between from and to date shouldn't ne more than 60 days )

Response

200 - application/json

Successful response

processed
integer

Number of emails accepted by SendPost API.

Example:

225

delivered
integer

Number of emails we were able to successfully deliver at SMTP without encountering any error

Example:

200

dropped
integer

Number of emails drop without attempting to deliver either because the email is invalid or email in in existing suppression list

Example:

10

hardBounced
integer

Number of emails where we got SMTP hard bounce error code by the recipient mail provider

Example:

10

softBounced
integer

Number of emails where we got temporary soft bounce error by the recipent mail provider. Soft bounced emails are retried upto 5 times over 24 hour period before marking them as hardBounced.

Example:

5

unsubscribed
integer

Number of email recipients who unsubscribed from receiving further emails

Example:

6

spam
integer

Number of email recipients who marked emails as spam

Example:

2

I