-
Notifications
You must be signed in to change notification settings - Fork 0
Server
Greg Svoboda edited this page Mar 4, 2026
·
1 revision
View and update the settings of the current server using ServerClient.
Note: These calls operate on the server associated with the token you initialized
ServerClientwith. To manage other servers across your account, useAccountClient— see Servers.
import postmark
client = postmark.ServerClient("your-server-token")import asyncio
async def main():
server = await client.server.get()
print(f"ID: {server.id}")
print(f"Name: {server.name}")
print(f"Color: {server.color.value}")
print(f"Delivery type: {server.delivery_type.value}")
print(f"SMTP enabled: {server.smtp_api_activated}")
print(f"Track opens: {server.track_opens}")
print(f"Track links: {server.track_links.value}")
print(f"Inbound address: {server.inbound_address}")
print(f"Spam threshold: {server.inbound_spam_threshold}")
asyncio.run(main())import asyncio
from postmark.models.servers import ServerColor, TrackLinks
async def main():
server = await client.server.edit(
name="My Updated Server",
color=ServerColor.GREEN,
track_opens=True,
track_links=TrackLinks.HTML_AND_TEXT,
inbound_spam_threshold=5,
)
print(f"Updated: {server.name} color={server.color.value}")
asyncio.run(main())ServerColor values: PURPLE, BLUE, TURQUOISE, GREEN, RED, YELLOW, GREY
TrackLinks values: NONE, HTML_AND_TEXT, HTML_ONLY, TEXT_ONLY
- Servers — Manage multiple servers with AccountClient
- Error Handling
- Postmark Server API