diff --git a/examples/domains.py b/examples/domains.py index 119d6fb..7d846bd 100644 --- a/examples/domains.py +++ b/examples/domains.py @@ -10,6 +10,7 @@ create_params: resend.Domains.CreateParams = { "name": "example.com", "region": "us-east-1", + "custom_return_path": "outbound", } domain: resend.Domain = resend.Domains.create(params=create_params) print(domain) diff --git a/resend/domains/_domains.py b/resend/domains/_domains.py index 83425f5..052c210 100644 --- a/resend/domains/_domains.py +++ b/resend/domains/_domains.py @@ -60,6 +60,12 @@ class CreateParams(TypedDict): The region where emails will be sent from. Possible values: us-east-1' | 'eu-west-1' | 'sa-east-1' | 'ap-northeast-1' """ + custom_return_path: NotRequired[str] + """ + By default, Resend will use the `send` subdomain for the Return-Path address. + You can change this by setting the optional `custom_return_path` parameter + when creating a domain via the API or under Advanced options in the dashboard. + """ @classmethod def create(cls, params: CreateParams) -> Domain: diff --git a/tests/domains_test.py b/tests/domains_test.py index 3204b2d..307262a 100644 --- a/tests/domains_test.py +++ b/tests/domains_test.py @@ -62,6 +62,8 @@ def test_domains_create(self) -> None: create_params: resend.Domains.CreateParams = { "name": "example.com", + "region": "us-east-1", + "custom_return_path": "send", } domain = resend.Domains.create(params=create_params) assert domain["id"] == "4dd369bc-aa82-4ff3-97de-514ae3000ee0"