# Analysis

{% hint style="info" %}
These endpoint are only available for customers on the **start-up** and **enterprise** plans. Any period selection is dependent on the plan's defined data retention;

* **Start-up** - 30 day retention period
* **Enterprise** - 2 year retention period
  {% endhint %}

## Get basic account usage for a period

<mark style="color:blue;">`GET`</mark> `https://api.smtpd.dev/api/v1/analysis/summary?from=2039823098&to=234987234`

<br>

#### Query Parameters

| Name | Type   | Description                                                                                                                                      |
| ---- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| to   | number | <p>Unix Timestamp (epoch) - defaults to the current time<br></p>                                                                                 |
| from | number | <p>Unix Timestamp (epoch) - defaults to current time minus 31 days<br>\* Max range between <code>from</code> and <code>to</code> is 365 days</p> |

#### Headers

| Name                                             | Type   | Description             |
| ------------------------------------------------ | ------ | ----------------------- |
| Authentication<mark style="color:red;">\*</mark> | string | `Bearer {access_token}` |

{% tabs %}
{% tab title="200 " %}

```
{
 	"group_by": {
		"accepted": {
			"current": 149,
			"previous": 0,
			"delta": 149
		},
		"bounce": {
			"current": 1,
			"previous": 0,
			"delta": 1
		},
		"click": {
			"current": 6,
			"previous": 0,
			"delta": 6
		},
		"delivered": {
			"current": 143,
			"previous": 0,
			"delta": 143
		},
		"open": {
			"current": 9,
			"previous": 0,
			"delta": 9
		},
		"processed": {
			"current": 149,
			"previous": 0,
			"delta": 149
		},
		"queued": {
			"current": 169,
			"previous": 0,
			"delta": 169
		},
		"rejected": {
			"current": 6,
			"previous": 0,
			"delta": 6
		},
		"sent": {
			"current": 149,
			"previous": 0,
			"delta": 149
		}
	},
 	"period": {
   		"from": 1606901470,
    		"to": 1607912472
  	}
}
```

{% endtab %}
{% endtabs %}
