Skip to content

Add custom tracking hostname support to Python SDK - #484

Merged
quzhi1 merged 1 commit into
mainfrom
codex/EN-143-custom-tracking-domain
Jul 30, 2026
Merged

Add custom tracking hostname support to Python SDK#484
quzhi1 merged 1 commit into
mainfrom
codex/EN-143-custom-tracking-domain

Conversation

@quzhi1

@quzhi1 quzhi1 commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add optional domain_name support to the shared tracking-options request model used by message sends, scheduled sends, draft create/update, and Transactional Send
  • deserialize and serialize the response TrackingOptions.domain_name field while omitting it when unset, preserving existing output
  • add supplied and omitted-field wire coverage for regular, scheduled, draft, and Transactional request paths
  • add a runnable custom tracking hostname example and an unreleased changelog entry

Why

Implements EN-143 for the public tracking_options.domain_name contract. Python SDK users can now select an active organization-owned tracking hostname without untyped escape hatches.

For Transactional Send, the example and API docstring distinguish the verified sender domain in /v3/domains/{domain_name}/messages/send from the custom tracking hostname in the request body.

Developer impact

Callers can add domain_name alongside links, opens, or both:

"tracking_options": {
    "links": True,
    "opens": True,
    "domain_name": "tracking.example.com",
}

Requests that omit the field are unchanged. Hostname canonicalization, ownership, certificate status, and failure handling remain enforced by the API.

Verification

  • .venv/bin/pytest -q — 483 passed, 3 deselected
  • focused message, draft, and Transactional Send suite — 74 passed
  • compile, dependency, whitespace, and diff checks passed

@codecov

codecov Bot commented Jul 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.08%. Comparing base (00e3f81) to head (2f78689).
⚠️ Report is 26 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #484      +/-   ##
==========================================
+ Coverage   98.90%   99.08%   +0.17%     
==========================================
  Files          52       65      +13     
  Lines        2293     3074     +781     
==========================================
+ Hits         2268     3046     +778     
- Misses         25       28       +3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@quzhi1
quzhi1 merged commit bbd1324 into main Jul 30, 2026
10 checks passed
@quzhi1
quzhi1 deleted the codex/EN-143-custom-tracking-domain branch July 30, 2026 21:02
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.

2 participants