docs: add account metrics endpoint#76
Closed
dielduarte wants to merge 2 commits into
Closed
Conversation
Contributor
Author
|
Superseded by a 2-PR stack: overview (#77) and engagement (stacked). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
GET /metrics— account-level email metrics for a date range — under a new Metrics tag.Shape
Two blocks:
overview— volume/delivery counts (sent= delivered + bounced + failed), with optional per-periodtimeseriesand per-domaindomain_breakdown.engagement— unique opens/clicks as{ unique, delivered, rate }(delivered = tracking-eligible denominator; rate is a percentage capped at 100), with the same optional breakdowns.Params
start_date/end_date(required, ISO 8601)timezone(defaultUTC),domain_id(uuid)event_type— repeatable; projects theoverviewblock to the listed events (does not affect engagement)include— repeatable; addstimeseriesand/ordomain_breakdownto both blocks (default: totals only)Source of truth is
resend.yamlonly (resend.jsonis auto-generated on merge tomain). New tag: Metrics — the account endpoint has no parent entity, unlike the broadcast metrics endpoint which lives under Broadcasts.Implements the response contract from resend-monorepo #6302.