feat(messages): surface provider-reported open/click engagement#69
Merged
Conversation
Adds the new read-only engagement timestamps returned by the messages API: - openedAt: first provider-reported email open (ISO 8601), or null. - clickedAt: first provider-reported link click (ISO 8601), or null. Both are set once on the first occurrence and are exposed on the SDK Message type and printed by `senderkit messages get`. Also documents the two new subscribable webhook events, message.opened and message.clicked (the latter carries the clicked link). README + changeset added.
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.
Summary
SenderKit now records provider-reported email opens and link clicks on messages and emits matching outgoing webhook events. This change brings the SDK, CLI, and webhook docs up to date with those new read surfaces.
Both timestamps are read-only and set once on the first occurrence — later opens/clicks never update them. They're purely additive and backwards compatible.
SDK (
@senderkit/sdk)Messagegains two fields, returned bymessages.getandmessages.list:openedAt— first provider-reported email open, as an ISO 8601 string, ornulluntil opened.clickedAt— first provider-reported link click, as an ISO 8601 string, ornulluntil a link is clicked.CLI (
@senderkit/cli)senderkit messages getnow printsopenedAt/clickedAt(shown as—when unset).Webhooks
message.openedandmessage.clicked.deliveredstays the terminal state).message.clickedpayload additionally carries the clickedlink.Testing
pnpm -r typecheck— cleanpnpm build— cleanpnpm test— all packages green (sdk 59, cli 80)A changeset is included (
@senderkit/sdkminor,@senderkit/climinor).The Python and PHP SDKs receive the equivalent field additions in their own PRs.
🤖 Generated with Claude Code
Generated by Claude Code