-
Notifications
You must be signed in to change notification settings - Fork 0
Sender Signatures
Greg Svoboda edited this page Mar 4, 2026
·
1 revision
Sender signature management is done through AccountClient. You will need an account API token.
import postmark
account = postmark.AccountClient("your-account-token")import asyncio
async def main():
result = await account.signature.list()
print(f"Total sender signatures: {result.total}")
for sig in result.items:
print(f" [{sig.id}] {sig.name} <{sig.email_address}>")
print(f" Domain: {sig.domain}")
print(f" Confirmed: {sig.confirmed}")
asyncio.run(main())async def main():
sig = await account.signature.get(signature_id=1234)
print(f"Name: {sig.name}")
print(f"Email: {sig.email_address}")
print(f"DKIM host: {sig.dkim_host}")
print(f"Return-Path domain: {sig.return_path_domain}")
print(f"Confirmed: {sig.confirmed}")import asyncio
async def main():
sig = await account.signature.create(
sender="sender@example.com",
name="Sender Name",
reply_to="reply@example.com",
return_path_domain="pm-bounces.example.com",
)
print(f"Created: [{sig.id}] {sig.name} <{sig.email_address}>")
print(f"Confirmed: {sig.confirmed}")
asyncio.run(main())Note: After creating a sender signature, Postmark will send a confirmation email to the address. The signature is not active for sending until confirmed.
async def main():
sig = await account.signature.edit(
signature_id=1234,
name="Updated Sender Name",
reply_to="reply@example.com",
)
print(f"Updated: {sig.name}")async def main():
result = await account.signature.delete(signature_id=1234)
print(result.message)Resend the confirmation email for an unconfirmed sender signature.
async def main():
await account.signature.resend_confirmation(signature_id=1234)
print("Confirmation email resent")