Skip to content

feat: add BroadcastClickedLinksAsync() method - #147

Merged
dielduarte merged 3 commits into
mainfrom
feat/broadcasts-clicked-links-method
Aug 24, 2026
Merged

feat: add BroadcastClickedLinksAsync() method#147
dielduarte merged 3 commits into
mainfrom
feat/broadcasts-clicked-links-method

Conversation

@dielduarte

@dielduarte dielduarte commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Adds GET /broadcasts/{id}/clicked-links — paginated list of a broadcast's clicked links (url, clicks, unique_clicks).

Spec: resend/resend-openapi#95
Reference implementation: resend/resend-node#1077


Summary by cubic

Adds BroadcastClickedLinksAsync(), GET /broadcasts/{id}/clicked-links, and a broadcast clicked-links CLI command to fetch a broadcast’s per-link click aggregates with cursor pagination. Previously, clients couldn’t retrieve per-link clicks; now they can read url, clicks, and unique_clicks without affecting delivery or tracking.

  • Introduces BroadcastClickedLink; its id is an opaque cursor for pagination, not a stable identifier.
  • Supports PaginatedQuery (limit, before, after); returns PaginatedResult<BroadcastClickedLink>.
  • CLI: resend broadcast clicked-links <broadcastId> [-l|--limit N] [-b|--before CURSOR] [-a|--after CURSOR] [--json]; escapes console markup in URLs for safe rendering.
  • Adds tests for default and paginated queries; mock API returns sample data for shape validation.
  • No changes to existing broadcast endpoints; read-only addition.
  • Required: If you implement IResend, add BroadcastClickedLinksAsync() to your implementation.

Written for commit bf84407. Summary will update on new commits.

Review in cubic

klotty
klotty previously approved these changes Aug 22, 2026

@klotty klotty left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 5 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Auto-approved: Adds the BroadcastClickedLinksAsync method to retrieve click statistics for a broadcast. The change includes the data model, client implementation, and unit tests, following established SDK patterns.

Re-trigger cubic

@dielduarte
dielduarte marked this pull request as ready for review August 22, 2026 01:46

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 2 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread tools/Resend.Cli/Broadcast/BroadcastClickedLinksCommand.cs Outdated
Comment thread tools/Resend.Cli/Broadcast/BroadcastClickedLinksCommand.cs Outdated
@cubic-dev-ai
cubic-dev-ai Bot dismissed klotty’s stale review August 24, 2026 14:05

Dismissed because Cubic found issues in a newer review.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 issues found across 1 file (changes from recent commits).

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Requires human review: Adds broadcast click tracking to the SDK and CLI. This introduces a breaking change to the IResend interface and new public API surface area that requires human architectural sign-off.

Re-trigger cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants