Get daily email activity trend
Email Statistics
Daily Email Activity Trend
Retrieves the trend of incoming and sent emails across the specified date range. - If no startDate or endDate is provided, the system defaults to the last 7 days (a week from today). - Each label in labels corresponds to a date in the range, and series contains counts of sent and received emails for each day.
GET
Get daily email activity trend
Retrieves the trend of incoming and sent emails across the specified date range. Each label in
labels corresponds to a date in the range, and series contains counts of sent and received emails for each day.
Request
Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | Bearer token |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| startDate | string | Yes | Start date of the range (ISO 8601). Defaults to 7 days before today |
| endDate | string | Yes | End date of the range (ISO 8601). Defaults to today |
Parameter Format
- Format:
YYYY-MM-DD(ISO 8601 date) - Timezone: UTC
- Default: Last 7 days if not provided
Response
200 OK - Successfully retrieved email activity trend
401 Unauthorized
500 Internal Server Error
Example
Data Structure
Series Array
Each object in the series represents:| Field | Type | Description |
|---|---|---|
| name | string | Series name (“Incoming” or “Sent”) |
| data | array | Email counts corresponding to each date |
Labels Array
| Field | Type | Description |
|---|---|---|
| labels | array | Dates in YYYY-MM-DD format |
Data Alignment
series[0].data[i]corresponds tolabels[i]for Incoming emailsseries[1].data[i]corresponds tolabels[i]for Sent emails- All arrays have the same length
Use Cases
- Trend Analysis: Visualize email volume over time
- Capacity Planning: Identify peak email periods
- Performance Monitoring: Track daily email patterns
- Dashboard Visualization: Create line charts and graphs
- Seasonal Patterns: Identify weekly/monthly trends
Visualization Examples
Line Chart
Bar Chart
Analysis Metrics
Daily Totals
Trend Calculations
Best Practices
- Date Range: Use reasonable ranges (recommended: max 90 days)
- Caching: Cache trend data for dashboard performance
- Real-time Updates: Update trends periodically for live dashboards
- Empty Data: Handle days with zero emails gracefully
- Time Zones: Consider converting to local time zones for display
Performance Considerations
- Large Ranges: Longer date ranges may take more time to process
- Data Points: Each day represents a data point
- Caching: Results are cached for 15 minutes by default
- Memory Usage: Large datasets may impact client-side rendering
Related Endpoints
- Use
/email-meter/stats/hourly-trendsfor hourly breakdown - Use
/email-meter/stats/email-countsfor aggregate statistics - Use
/email-meter/stats/clients/incoming-trendsfor client-specific trends
Notes
- Data includes all email types (incoming, outgoing, internal)
- Weekends and holidays are included in the trend
- Zero-value days are included for complete timeline
- Data is calculated based on email timestamps in UTC
- Automated emails are included in counts unless filtered
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Start date of the range (ISO 8601). Defaults to 7 days before today if not provided.
End date of the range (ISO 8601). Defaults to today if not provided.