---
title: "Discussion on \"How an AI agent reads mail volume and bounce rates on Cooper Email\" | Hashnode"
description: "Discussion on \"How an AI agent reads mail volume and bounce rates on Cooper Email\". GET /api/v1/metrics/events buckets message.received, message.sent, message.bounced, and message.complained by UTC hour or day (period hour|day, defaul"
url: "https://hashnode.com/posts/agent-email-metrics-volume-bounce-rates/6ad2268162afa5de92d99293"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How an AI agent reads mail volume and bounce rates on Cooper Email](https://cooperemail.hashnode.dev/agent-email-metrics-volume-bounce-rates?utm_source=hashnode&utm_medium=feed)

GET /api/v1/metrics/events buckets message.received, message.sent, message.bounced, and message.complained by UTC hour or day (period hour|day, defaul

Oct 16 · 9 min read · cooperemail.hashnode.dev  
Read the article

-   [#email](https://hashnode.com/tag/email)
-   [#ai-agents](https://hashnode.com/tag/ai-agents)
-   [#mcp](https://hashnode.com/tag/mcp)
-   [#api](https://hashnode.com/tag/api)

## Written by

[Cooper Email](https://hashnode.com/@cooperemail)

@cooperemail

  
[View profile](https://hashnode.com/@cooperemail)

Real email inboxes for AI agents, via API and MCP. By Avatar 8 LLC.

Real email inboxes for AI agents, via API and MCP. By Avatar 8 LLC.

## Responses 3

Markdown supported · ⌘↵ to post

[StackShortlist](https://hashnode.com/@veristria)

[Oct 17](https://hashnode.com/posts/agent-email-metrics-volume-bounce-rates/6ad2268162afa5de92d99293/comment/6ad2f1a813f22ae0d1413b18)

Reading counts instead of pulling every body to add them up is the right default for a bounce rate report. Defaulting types to received and sent when it's omitted makes sense too, so bounces and complaints only show up when someone asks for them. Are the UTC buckets returned for empty hours as zero counts, or skipped?

[Cooper Email](https://hashnode.com/@cooperemail)

[Oct 21](https://hashnode.com/posts/agent-email-metrics-volume-bounce-rates/6ad2268162afa5de92d99293/comment/6ad2f1a813f22ae0d1413b18#reply-6ad8384ba3dd117714d3e2b8)

Thanks. Empty buckets are returned, not skipped. Every UTC hour (or day) from the floored start through the bucket that contains the instant before end is in the series with zero counts, so you can chart it without filling gaps. The end instant is exclusive.

[StackShortlist](https://hashnode.com/@veristria)

[Oct 22](https://hashnode.com/posts/agent-email-metrics-volume-bounce-rates/6ad2268162afa5de92d99293/comment/6ad2f1a813f22ae0d1413b18#reply-6ad9e577adc92e337aa42dad)

Good, zero filled buckets make the chart code simple. One practical thing is to cap the window size per request so a long range doesn't return thousands of empty hourly rows. Do you switch from hourly to daily buckets automatically when the range gets long?
