# Analytics API

> The Sendtide Analytics API: metrics and rates, dimensions such as tag, domain and template, filters, resolution, paging and usage.

URL: https://sendtide.ch/en/docs/analytics-api/

Count what happens to your email: delivered, opened, clicked, bounces and more, per hour, day or month, split by tag, domain, template, stream or sub-account.
POST /v1/analytics/metrics returns numbers from the events of your account, at most a minute behind. You need a key with scope read. The dashboard, CSV export, SDKs and the [MCP server](https://sendtide.ch/en/docs/mcp-server/) (tool get_analytics) show the same numbers. GET /v1/stats uses the same definitions.

```
curl https://api.sendtide.ch/v1/analytics/metrics \
  -H "Authorization: Bearer $SENDTIDE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "start": "2026-11-01",
    "end": "2026-12-01",
    "resolution": "day",
    "metrics": ["accepted", "delivered", "delivered_rate", "open_rate", "bounce_rate"],
    "dimensions": ["time", "template"],
    "filters": { "tag": { "include": ["invoice"] } }
  }'
```

```
{
  "start": "2026-11-01T00:00:00Z",
  "end": "2026-12-01T00:00:00Z",
  "resolution": "day",
  "metrics": ["accepted", "delivered", "delivered_rate", "open_rate", "bounce_rate"],
  "dimensions": ["time", "template"],
  "data": [
    {
      "dimensions": { "time": "2026-11-01T00:00:00Z", "template": "welcome" },
      "metrics": { "accepted": 412, "delivered": 405, "delivered_rate": 98.3, "open_rate": 61.2, "bounce_rate": 0.7 }
    }
  ],
  "next_cursor": null,
  "rows": 1,
  "total": { "metrics": { "accepted": 412, "delivered": 405, "delivered_rate": 98.3, "open_rate": 61.2, "bounce_rate": 0.7 } }
}
```
## Unit and time

Everything counts recipients (To, Cc and Bcc), the unit billing uses, by the time of the event in UTC. start and end (RFC 3339 or YYYY-MM-DD, end is exclusive) are widened to whole buckets. Without them end is now and start 7 days before.
| Resolution | Longest range |
| --- | --- |
| hour | 31 days (hourly values are kept 35 days) |
| day (default) | 366 days |
| month | 36 months |

start may not be older than the metadata retention of your plan, see [Retention and deletion](https://sendtide.ch/en/docs/retention-and-deletion/). The environment of the key (live or test) decides what is counted.
## Metrics
| Metric | Meaning |
| --- | --- |
| accepted | recipients accepted for sending |
| sent | recipients of mail handed to the provider |
| delivered | recipients the receiving server accepted |
| delayed | delivery delays per recipient |
| opened, unique_opened | opens by a person: every open, or once per mail and recipient |
| machine_opened | opens by privacy proxies and scanners, counted apart and never in opened |
| clicked, unique_clicked | every click, or once per mail and recipient |
| bounced, hard_bounced, soft_bounced | bounces per recipient, of which permanent and transient ones |
| complained | spam complaints |
| unsubscribed | unsubscribes (with the recipient domain as the only dimension) |
| failed | recipients of mail that failed or was rejected by the provider |
| suppressed | recipients not sent to because of the suppression list |

Rates are percent with two decimals, 0 when the denominator is 0: delivered_rate = delivered / sent, open_rate = unique_opened / delivered, click_rate = unique_clicked / delivered, bounce_rate = bounced / sent, complaint_rate = complained / sent (the way the automatic pause counts it) and unsubscribe_rate = unsubscribed / delivered. Without metrics the API returns accepted, delivered, opened, clicked, bounced and complained.
## Dimensions

With dimensions (at most 3) you split the numbers:
| Dimension | Values |
| --- | --- |
| time | start of the bucket |
| tag | tag of the mail. A mail with several tags counts under each, untagged mail is not listed. |
| domain | sending domain |
| recipient_domain | domain of the recipient, for example gmail.com |
| template | alias of the template |
| tenant | slug of the [sub-account](https://sendtide.ch/en/docs/sub-accounts/) |
| ip_pool | shared or dedicated, as of when the event was counted |

An empty value (no template, no tag, the account itself as tenant) is null. Without a dimension the answer has one row with the totals.
## Filters

filters is an object keyed by a dimension (never time) with include and exclude, up to 100 values each. All filters apply together (AND), include matches any of its values, exclude none of them. The empty string "" stands for “no value”. A filter on tag looks at all tags of a mail.

```
"filters": {
  "recipient_domain": { "include": ["gmail.com", "outlook.com"] },
  "template": { "exclude": [""] }
}
```

As a main account you also count the sub-accounts with "include_subaccounts": true.
## Pages and total

Rows are ordered by time, then by the first metric (largest first) and paged with limit (1 to 1,000, default 100) and cursor, see [Pagination](https://sendtide.ch/en/docs/pagination/). total always covers all matching mail, not only the page, and counts each recipient once even when tag is a dimension. rows is the number of groups over all pages.
## Usage

GET /v1/analytics/usage shows for main accounts what was accepted (accepted, sub-accounts included) and what is billed (billed). billed is lower where accepted mail was canceled. Parameters: start, end (exclusive, default tomorrow) and resolution (day or month). A sub-account gets 403, it is billed through its main account.

```
curl "https://api.sendtide.ch/v1/analytics/usage?resolution=month&start=2026-06-01" \
  -H "Authorization: Bearer $SENDTIDE_API_KEY"
```
## Errors

Unknown metrics or dimensions, a range that is too long or a start before the retention answer 422 validation_error. The endpoints are in the [API reference](https://sendtide.ch/en/docs/api/statistics/).

If you would rather analyze events in a product analytics tool, forward them to [PostHog](https://sendtide.ch/en/docs/posthog/).
