Skip to content

Commit 3854817

Browse files
rehanvdmclaudedrish
authored
feat(domains): add click_tracking and open_tracking to CreateParams (#200)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: drish <carlosderich@gmail.com>
1 parent 54a412e commit 3854817

4 files changed

Lines changed: 13 additions & 1 deletion

File tree

resend/domains/_domains.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,14 @@ class CreateParams(TypedDict):
162162
"""
163163
The custom subdomain used for click and open tracking links (e.g., "links").
164164
"""
165+
click_tracking: NotRequired[bool]
166+
"""
167+
Track clicks within the body of each HTML email.
168+
"""
169+
open_tracking: NotRequired[bool]
170+
"""
171+
Track the open rate of each email.
172+
"""
165173

166174
@classmethod
167175
def create(cls, params: CreateParams) -> CreateDomainResponse:

resend/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "2.28.1"
1+
__version__ = "2.29.0"
22

33

44
def get_version() -> str:

tests/domains_async_test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,8 @@ async def test_domains_create_async_with_tracking_subdomain(self) -> None:
190190
"name": "example.com",
191191
"region": "us-east-1",
192192
"tracking_subdomain": "links",
193+
"click_tracking": True,
194+
"open_tracking": True,
193195
}
194196
domain = await resend.Domains.create_async(params=create_params)
195197
assert domain["id"] == "4dd369bc-aa82-4ff3-97de-514ae3000ee0"

tests/domains_test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,8 @@ def test_domains_create_with_tracking_subdomain(self) -> None:
224224
"name": "example.com",
225225
"region": "us-east-1",
226226
"tracking_subdomain": "links",
227+
"click_tracking": True,
228+
"open_tracking": True,
227229
}
228230
domain: resend.Domains.CreateDomainResponse = resend.Domains.create(
229231
params=create_params

0 commit comments

Comments
 (0)