Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions examples/domains.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 6 additions & 0 deletions resend/domains/_domains.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions tests/domains_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down