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

The response is of type object.