Skip to content

Sender Signatures

Greg Svoboda edited this page Mar 4, 2026 · 1 revision

Sender Signatures

Sender signature management is done through AccountClient. You will need an account API token.

import postmark

account = postmark.AccountClient("your-account-token")

List Sender Signatures

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())

Get a Sender Signature

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}")

Create a Sender Signature

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.

Edit a Sender Signature

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}")

Delete a Sender Signature

async def main():
    result = await account.signature.delete(signature_id=1234)
    print(result.message)

Resend Confirmation Email

Resend the confirmation email for an unconfirmed sender signature.

async def main():
    await account.signature.resend_confirmation(signature_id=1234)
    print("Confirmation email resent")

Further Reading

Clone this wiki locally