GET
/
account
/
subaccount
/
stat
/
{subaccount_id}
Python
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())
[
  {
    "date": "2020-03-12",
    "stats": {
      "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[].