Analytics
Email analytics: overview, timeseries, domain breakdown, CSV export
7 endpoints
Endpoints
| Method | Path | Description |
| GET | /v1/analytics/aggregate | GET /v1/analytics/aggregate |
| GET | /v1/analytics/domains | GET /v1/analytics/domains |
| GET | /v1/analytics/export | GET /v1/analytics/export |
| GET | /v1/analytics/overview | GET /v1/analytics/overview |
| GET | /v1/analytics/tags | GET /v1/analytics/tags |
| GET | /v1/analytics/tags/{tag}/links | GET /v1/analytics/tags/{tag}/links |
| GET | /v1/analytics/timeseries | GET /v1/analytics/timeseries |
GET /v1/analytics/aggregate
GET /v1/analytics/aggregate
Parameters
| Name | In | Type | Required | Description |
period | query | `string | null` | No |
from | query | `string | null` | No |
to | query | `string | null` | No |
Responses
| Status | Description |
| 200 | Combined analytics across a parent account and its sub-accounts |
| 401 | Unauthorized |
| 403 | Caller is a sub-account (only parent accounts can view aggregate analytics) |
| 422 | Invalid period |
Example
curl -X GET https://api.euromail.dev/v1/analytics/aggregate \
-H "X-EuroMail-Api-Key: em_live_..."
import { EuroMail } from "@euromail/sdk";
const euromail = new EuroMail({ apiKey: "em_live_..." });
const result = await euromail.getAnalytic();
from euromail import EuroMail
client = EuroMail(api_key="em_live_...")
result = client.get_analytic()
use euromail::EuroMail;
let client = EuroMail::new("em_live_...");
let result = client.get_analytic().await?;
client := euromail.NewClient("em_live_...")
result, err := client.GetAnalytic(ctx)
GET /v1/analytics/domains
Returns email stats aggregated by recipient domain.
Parameters
| Name | In | Type | Required | Description |
period | query | string | No | Period shorthand: 7d, 30d, 90d |
from | query | string | No | Start date |
to | query | string | No | End date |
limit | query | integer | No | Number of top domains (default: 10) |
Responses
| Status | Description |
| 200 | Top domains by volume |
| 401 | Unauthorized |
| 422 | Invalid parameters |
Example
curl -X GET https://api.euromail.dev/v1/analytics/domains \
-H "X-EuroMail-Api-Key: em_live_..."
import { EuroMail } from "@euromail/sdk";
const euromail = new EuroMail({ apiKey: "em_live_..." });
const result = await euromail.getAnalytic();
from euromail import EuroMail
client = EuroMail(api_key="em_live_...")
result = client.get_analytic()
use euromail::EuroMail;
let client = EuroMail::new("em_live_...");
let result = client.get_analytic().await?;
client := euromail.NewClient("em_live_...")
result, err := client.GetAnalytic(ctx)
GET /v1/analytics/export
Export daily analytics as CSV download.
Parameters
| Name | In | Type | Required | Description |
period | query | string | No | Period shorthand: 7d, 30d, 90d |
from | query | string | No | Start date |
to | query | string | No | End date |
Responses
| Status | Description |
| 200 | CSV file download |
| 401 | Unauthorized |
| 422 | Invalid parameters |
Example
curl -X GET https://api.euromail.dev/v1/analytics/export \
-H "X-EuroMail-Api-Key: em_live_..."
import { EuroMail } from "@euromail/sdk";
const euromail = new EuroMail({ apiKey: "em_live_..." });
const result = await euromail.getAnalytic();
from euromail import EuroMail
client = EuroMail(api_key="em_live_...")
result = client.get_analytic()
use euromail::EuroMail;
let client = EuroMail::new("em_live_...");
let result = client.get_analytic().await?;
client := euromail.NewClient("em_live_...")
result, err := client.GetAnalytic(ctx)
GET /v1/analytics/overview
Returns summary statistics (totals + rates) for the authenticated account.
Parameters
| Name | In | Type | Required | Description |
period | query | string | No | Period shorthand: 7d, 30d, 90d (default: 30d) |
from | query | string | No | Start date (YYYY-MM-DD) |
to | query | string | No | End date (YYYY-MM-DD) |
Responses
| Status | Description |
| 200 | Analytics summary |
| 401 | Unauthorized |
| 422 | Invalid parameters |
Example
curl -X GET https://api.euromail.dev/v1/analytics/overview \
-H "X-EuroMail-Api-Key: em_live_..."
import { EuroMail } from "@euromail/sdk";
const euromail = new EuroMail({ apiKey: "em_live_..." });
const result = await euromail.getAnalytic();
from euromail import EuroMail
client = EuroMail(api_key="em_live_...")
result = client.get_analytic()
use euromail::EuroMail;
let client = EuroMail::new("em_live_...");
let result = client.get_analytic().await?;
client := euromail.NewClient("em_live_...")
result, err := client.GetAnalytic(ctx)
Per-tag click/open stats. Useful for comparing newsletter performance across sends.
Parameters
| Name | In | Type | Required | Description |
period | query | string | No | Period shorthand: 7d, 30d, 90d |
from | query | string | No | Start date |
to | query | string | No | End date |
Responses
| Status | Description |
| 200 | Per-tag click/open stats |
| 401 | Unauthorized |
| 422 | Invalid parameters |
Example
curl -X GET https://api.euromail.dev/v1/analytics/tags \
-H "X-EuroMail-Api-Key: em_live_..."
import { EuroMail } from "@euromail/sdk";
const euromail = new EuroMail({ apiKey: "em_live_..." });
const result = await euromail.getAnalytic();
from euromail import EuroMail
client = EuroMail(api_key="em_live_...")
result = client.get_analytic()
use euromail::EuroMail;
let client = EuroMail::new("em_live_...");
let result = client.get_analytic().await?;
client := euromail.NewClient("em_live_...")
result, err := client.GetAnalytic(ctx)
Breakdown of clicked URLs for emails with a given tag, sorted by click count.
Parameters
| Name | In | Type | Required | Description |
tag | path | string | Yes | Tag to break down |
period | query | string | No | Period shorthand: 7d, 30d, 90d |
from | query | string | No | Start date |
to | query | string | No | End date |
Responses
| Status | Description |
| 200 | Clicked URLs for the tag, sorted by click count |
| 401 | Unauthorized |
| 422 | Invalid parameters |
Example
curl -X GET https://api.euromail.dev/v1/analytics/tags/{tag}/links \
-H "X-EuroMail-Api-Key: em_live_..."
import { EuroMail } from "@euromail/sdk";
const euromail = new EuroMail({ apiKey: "em_live_..." });
const result = await euromail.getAnalytic("id_...");
from euromail import EuroMail
client = EuroMail(api_key="em_live_...")
result = client.get_analytic("id_...")
use euromail::EuroMail;
let client = EuroMail::new("em_live_...");
let result = client.get_analytic("id_...").await?;
client := euromail.NewClient("em_live_...")
result, err := client.GetAnalytic(ctx, "id_...")
GET /v1/analytics/timeseries
Returns daily stats over time for charting.
Parameters
| Name | In | Type | Required | Description |
period | query | string | No | Period shorthand: 7d, 30d, 90d |
from | query | string | No | Start date |
to | query | string | No | End date |
metrics | query | string | No | Comma-separated: sent,delivered,bounced,opens,clicks |
Responses
| Status | Description |
| 200 | Timeseries data points |
| 401 | Unauthorized |
| 422 | Invalid parameters |
Example
curl -X GET https://api.euromail.dev/v1/analytics/timeseries \
-H "X-EuroMail-Api-Key: em_live_..."
import { EuroMail } from "@euromail/sdk";
const euromail = new EuroMail({ apiKey: "em_live_..." });
const result = await euromail.getAnalytic();
from euromail import EuroMail
client = EuroMail(api_key="em_live_...")
result = client.get_analytic()
use euromail::EuroMail;
let client = EuroMail::new("em_live_...");
let result = client.get_analytic().await?;
client := euromail.NewClient("em_live_...")
result, err := client.GetAnalytic(ctx)