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

# Postmarkapp Postmark API

The Postmark Server API provides transactional email sending, bounce management, delivery statistics, template handling, and inbound message processing across 43 endpoints. It supports single and batch email delivery with template rendering, bounce tracking with reactivation workflows, open and click analytics by platform and browser, inbound email processing with rule-based triggers, and server-level configuration.

## For AI agents

Send transactional emails, manage bounces, track delivery statistics, render templates, and process inbound messages for a specific Postmark server.

## Scope

Does not handle account-level infrastructure (server provisioning, domain management, sender signatures) - use for sending emails, tracking delivery, and managing bounces on a single server only.

## Capabilities

- Send single and batch transactional emails with HTML, plain text, and template rendering
- Track bounced emails with detailed dump data and trigger reactivation for resolved addresses
- Monitor delivery statistics including opens, clicks, spam complaints, and bounce rates
- Manage email templates with validation and server-level template storage
- Process inbound emails with configurable trigger rules for routing and automation
- Analyze engagement metrics by email client, platform, browser family, and geographic location
- Retrieve detailed message history for both outbound and inbound email traffic

## Use cases

### Transactional Email Delivery

Send transactional emails such as password resets, order confirmations, and shipping notifications. The Postmark API supports single message sending via /email, batch sending via /email/batch, and template-based sending via /email/withTemplate. Each request returns a message ID for tracking delivery status, opens, and clicks through the statistics endpoints.

Example prompt: Send a transactional email via POST /email/withTemplate with a template alias, recipient address, and template model variables, then verify delivery via GET /messages/outbound/{messageid}/details

### Bounce Management and Recovery

Monitor and manage email bounces to maintain sender reputation. The API provides bounce listing with filtering, detailed bounce dump information for diagnosis, and address reactivation for resolved delivery issues. Agents can identify patterns in bounce reasons, alert on spike events, and automatically reactivate addresses after infrastructure fixes.

Example prompt: Retrieve all bounces from GET /bounces filtered to the last 24 hours, identify hard bounces, and reactivate any addresses where the bounce reason was a temporary infrastructure issue using PUT /bounces/{bounceid}/activate

### Email Engagement Analytics

Track email open rates, click-through rates, and engagement patterns by platform, email client, and geographic location. The API provides aggregate statistics via /stats/outbound endpoints and per-message detail via /messages/outbound/opens and /messages/outbound/clicks. Agents can compile engagement dashboards and identify underperforming message types.

Example prompt: Retrieve outbound email statistics from GET /stats/outbound for the last 30 days, then pull open rates by email client from GET /stats/outbound/opens/emailclients and compile a summary of engagement by client

### AI Agent Email Operations

Enable AI agents to send transactional emails and monitor delivery through Jentic. Agents can discover email sending operations by intent, send templated messages, check bounce status, and pull analytics without hardcoding API paths or managing server tokens directly.

Example prompt: Search Jentic for 'send a transactional email with a template', load the operation schema for POST /email/withTemplate, and execute with recipient, template alias, and template variables

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /email | Send a single email message |
| POST | /email/withTemplate | Send an email using a template |
| POST | /email/batch | Send a batch of emails |
| GET | /bounces | List bounced messages |
| PUT | /bounces/{bounceid}/activate | Reactivate a bounced address |
| GET | /stats/outbound | Get outbound delivery statistics |
| GET | /messages/outbound | Search outbound message history |
| GET | /templates | List email templates on the server |

## Key resources

- **Email** — Single, batch, and template-based transactional email sending
- **Bounces** — Bounced message tracking with dump data and address reactivation
- **Messages** — Outbound and inbound message history with full detail retrieval
- **Stats** — Delivery, open, click, bounce, and spam statistics with platform breakdowns
- **Templates** — Email template storage, validation, and rendering
- **Triggers** — Inbound email processing rules for routing and automation

## Why Jentic

- **Setup:** Wiring the Postmark API by hand means configuring its X-Postmark-Server-Token header, targeting api.postmarkapp.com, and handling delivery tracking and bounce activation yourself. Through Jentic you install once, import the Postmark API from the API Directory, store the server token once, and your agent calls it.
- **Permission scoping:** Postmark takes the email target in the request body rather than the URL path, so scoping is by operation: you limit the agent to the operations it needs, such as sending email or reading bounces and outbound stats. Reactivating a bounce or batch sending are included only if you add those operations to the allowed set.
- **Credential handling:** Your Postmark server 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 'send a transactional email' or 'list outbound messages', and Jentic returns the matching Postmark operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Postmark Account-level API** — Account infrastructure management - servers, domains, and sender signatures
- **SendGrid Mail API** — High-volume email delivery with advanced templating and scheduling
- **Mandrill API** — Transactional email from Mailchimp with merge tags and conditional content

## FAQ

### What authentication does the Postmark Server API use?

The Postmark Server API uses a server token passed in the X-Postmark-Server-Token header with every request. Each server in your account has its own token. Through Jentic, server tokens are stored encrypted in the credential vault and injected automatically - agents never handle raw tokens directly.

### Can I send batch emails with the Postmark Server API?

Yes. POST to /email/batch sends up to 500 messages in a single request. Each message in the batch can have different recipients, subjects, and content. For template-based batch sending, use POST /email/batchWithTemplates to render different template variables per recipient.

### What are the rate limits for the Postmark Server API?

Postmark does not impose traditional rate limits. Instead, sending is governed by your account's sending credits and reputation. Batch endpoints accept up to 500 messages per request. If you exceed your plan's monthly volume, additional messages are queued rather than rejected.

### How do I send a templated email through Jentic?

Search Jentic for 'send email with template', load the operation schema for POST /email/withTemplate, and execute with the template alias, recipient email, and a model object containing your template variables. Jentic handles the X-Postmark-Server-Token injection. Install with pip install jentic and run it through Jentic One, the self-hosted execution layer.

### Can I track email opens and clicks with this API?

Yes. GET /stats/outbound/opens returns aggregate open statistics, and GET /messages/outbound/opens/{messageid} shows opens for a specific message. Similarly, /stats/outbound/clicks provides click analytics. Both support breakdowns by email client, platform, and browser family.

### How do I handle bounced emails with the Postmark API?

GET /bounces lists all bounced messages with filtering by type, date, and status. GET /bounces/{bounceid}/dump provides the raw SMTP response for diagnosis. Once an issue is resolved, PUT /bounces/{bounceid}/activate reactivates the address so future sends are attempted rather than suppressed.

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

Yes. Because the Postmark Server API takes the email target in the request body rather than the URL path, scoping is done per operation: in your own self-hosted Jentic One instance, your rules decide which Postmark operations the agent may call. You can allow only what it needs, such as sending email through POST /email or reading bounces and outbound stats via GET /bounces and GET /stats/outbound, while leaving out others. Higher-impact operations like reactivating a bounce with PUT /bounces/{bounceid}/activate or batch sending are available to the agent only if you add them to the allowed set, and your stored server token is injected at execution time rather than exposed to the agent.
