Add custom tracking domain support to the Node.js SDK - #758
Merged
Conversation
quzhi1
marked this pull request as ready for review
July 30, 2026 19:21
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #758 +/- ##
=======================================
Coverage 98.75% 98.75%
=======================================
Files 43 43
Lines 1041 1041
Branches 90 90
=======================================
Hits 1028 1028
Misses 12 12
Partials 1 1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
AaronDDM
approved these changes
Jul 30, 2026
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
trackingOptions.domainNameto the shared send and draft tracking-options request type.tracking_options.domain_nameexactly once and preserves existing payloads when the field is omitted.Why
The shared
SendMessageRequestandTrackingOptionstypes cover regular sends, Transactional Send, draft create/update, and scheduled sends. Adding the optional property to that shared type lets developers select a tracking hostname without type escape hatches or operation-specific serializers.Developer impact
Developers can supply an active organization-owned custom hostname as
trackingOptions.domainName. The SDK serializes it astracking_options.domain_name. Existing requests are unchanged when the optional property is omitted.For Transactional Send, the top-level
domainNameremains the verified sender domain in/v3/domains/{domainName}/messages/send;requestBody.trackingOptions.domainNameis the separate tracking hostname used in recipient-visible links and open pixels.Validation
npm test -- --runInBand— 30 suites, 484 tests passednpm run lintnpm run lint:prettier:checknpm run buildexamples/messages/messages.tsagainst the built packagegit diff --check