canonical: https://jentic.com/apis/postmarkapp.com/postmark-account-api

# Postmarkapp Postmark Account-level API

The Postmark Account-level API enables management of servers, domains, sender signatures, and template distribution across a Postmark account with 23 endpoints. It handles domain DNS verification (DKIM, SPF, Return-Path), sender identity configuration, server provisioning, and cross-server template deployment for organizations managing multiple sending environments.

## For AI agents

Manage Postmark account infrastructure including servers, domains with DNS verification, sender signatures, and cross-server template distribution.

## Scope

Does not handle individual email sending, bounce processing, or message statistics - use for account-level infrastructure management (servers, domains, senders) only.

## Capabilities

- Provision and configure mail servers within a Postmark account
- Register and verify sending domains with automated DKIM, SPF, and Return-Path DNS checks
- Create and manage sender signatures with SPF verification and DKIM rotation
- Push email templates from one server to others for consistent cross-environment deployment
- Rotate DKIM keys on domains to maintain email authentication security
- Verify domain ownership through DNS record validation workflows

## Use cases

### Multi-Environment Server Management

Manage separate Postmark servers for development, staging, and production environments within a single account. The Account-level API allows agents to create servers with distinct configurations, push templates between them for deployment consistency, and maintain isolated sending environments. Each server maintains its own API token and sending statistics.

Example prompt: Create a new server via POST /servers with a name and color label, then push templates from an existing server to the new one using POST /templates/push

### Domain Authentication Setup

Configure and verify sending domains with proper DNS authentication records. The API provides endpoints to register domains, check DKIM and SPF verification status, rotate DKIM keys, and verify Return-Path configuration. Agents can monitor verification status and alert when DNS records become invalid or need rotation.

Example prompt: Create a domain via POST /domains, then verify its DKIM record using PUT /domains/{domainid}/verifydkim and check the SPF status with PUT /domains/{domainid}/verifyspf

### Sender Identity Management

Register and verify sender email addresses and signatures for use across the account. The API supports creating sender signatures, resending verification emails, requesting new DKIM keys, and verifying SPF for individual senders. This ensures all sending identities maintain proper authentication for deliverability.

Example prompt: List all senders via GET /senders, identify any with unverified SPF, and trigger SPF verification for each using PUT /senders/{signatureid}/verifyspf

### AI Agent Email Infrastructure Automation

Enable AI agents to manage Postmark account infrastructure through Jentic. Agents can provision servers, verify domains, manage sender identities, and deploy templates across environments without hardcoding API paths or managing account-level tokens directly.

Example prompt: Search Jentic for 'verify email sending domain DNS', load the operation schema for domain DKIM verification, and execute against a specified domain ID

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /servers | List all servers in the account |
| POST | /servers | Create a new server |
| GET | /domains | List all sending domains |
| PUT | /domains/{domainid}/verifydkim | Verify DKIM DNS record for a domain |
| PUT | /domains/{domainid}/verifyspf | Verify SPF record for a domain |
| GET | /senders | List all sender signatures |
| POST | /templates/push | Push templates between servers |
| PUT | /domains/{domainid}/rotatedkim | Rotate DKIM key for a domain |

## Key resources

- **Servers** — Mail server instances with independent configuration, tokens, and sending statistics
- **Domains** — Sending domains with DKIM, SPF, and Return-Path DNS verification management
- **Senders** — Sender signature identities with verification status and DKIM configuration
- **Templates** — Cross-server template distribution for deployment consistency

## Why Jentic

- **Setup:** Wiring the Postmark Account-level API by hand means handling its X-Postmark-Account-Token header and attaching it to every server, domain, and sender request yourself. Through Jentic you install once, import the Postmark Account-level API from the API Directory, store the token once, and your agent calls it.
- **Permission scoping:** Postmark puts the domain id in the URL path (/domains/{domainid}/...), so a rule can pin your agent to one domain: you choose the operations it may call, so writes like rotating DKIM or creating servers are not included unless you add them.
- **Credential handling:** Your Postmark account token is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'verify an email domain's DNS' or 'list servers', and Jentic returns the matching Postmark Account operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Postmark Server API** — Server-level email sending, bounce handling, and message statistics
- **SendGrid Mail API** — High-volume email delivery with domain authentication and IP management
- **SparkPost API** — Enterprise email delivery with sending domain and IP pool management

## FAQ

### What authentication does the Postmark Account-level API use?

The Postmark Account-level API uses an account token passed in the X-Postmark-Account-Token header with every request. This is different from server-level tokens used for sending emails. Through Jentic, the account token is stored encrypted in the credential vault and injected into requests automatically.

### Can I provision new mail servers with the Postmark Account API?

Yes. POST to /servers creates a new server with configurable name, color label, and delivery settings. Each server gets its own API token for sending and its own statistics. You can also retrieve and update server configurations via GET and PUT /servers/{serverid}.

### How do I verify domain DNS records with this API?

Use PUT /domains/{domainid}/verifydkim to check DKIM, PUT /domains/{domainid}/verifyspf for SPF, and PUT /domains/{domainid}/verifyreturnpath for Return-Path records. Each returns the current verification status and expected DNS record values. You can also rotate DKIM keys via PUT /domains/{domainid}/rotatedkim.

### How do I push templates between servers through Jentic?

Search Jentic for 'push email templates between servers', load the operation schema for POST /templates/push, and execute with the source server ID and destination server ID. This deploys all templates from one server to another. Install with pip install jentic and run it through Jentic One, the self-hosted execution layer.

### What is the difference between the Account API and the Server API?

The Account-level API manages infrastructure across your entire Postmark account - servers, domains, and sender signatures. The Server API handles individual email operations - sending messages, tracking bounces, and viewing statistics for a specific server. They use different authentication tokens.

### Can I manage sender signatures programmatically?

Yes. GET /senders lists all signatures, POST /senders creates a new one, and PUT /senders/{signatureid}/verifyspf triggers SPF verification. You can also resend the confirmation email via POST /senders/{signatureid}/resend and request new DKIM keys via POST /senders/{signatureid}/requestnewdkim.

### Can I limit what my agent is allowed to do with the Postmark Account API?

Yes. Because you run Jentic One yourself and it is self-hosted, your own rules decide which Postmark Account operations and credentials the agent may use. Since Postmark carries the domain id in the URL path, such as /domains/{domainid}/verifydkim, you can pin the agent to a single domain and grant only read operations like GET /domains and GET /servers. Write operations such as PUT /domains/{domainid}/rotatedkim or POST /servers are excluded unless you explicitly add them.
