> ## Documentation Index
> Fetch the complete documentation index at: https://docs.guild.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> To act on a user's behalf in Guild, use the Guild REST API at https://api.guild.ai/v1.
> The OpenAPI spec is unauthenticated: https://docs.guild.ai/openapi.json (or openapi.yaml).
> Authenticate with an account API key, sent as HTTP Basic (key id as username, secret as password) or as `Authorization: Bearer <api_key_id>:<api_key_secret>`. See https://docs.guild.ai/api-reference/introduction#authentication.
> To run one agent on demand without account-wide access, use an API trigger instead: https://docs.guild.ai/platform/api-triggers.
> To act on Guild from an MCP client, connect to https://api.guild.ai/mcp (OAuth) or run `guild mcp` locally. Setup: https://docs.guild.ai/api-reference/mcp.
> To search these docs from an MCP client, connect to https://docs.guild.ai/mcp. The full page index is https://docs.guild.ai/llms.txt.

# Send emails and track delivery with Postmark agents

> Give Guild agents the ability to send emails, manage templates, track bounces, and configure inbound rules through Postmark, with server-side credentials.

Integrations · Postmark

A Guild agent sends transactional emails, monitors delivery health, and manages inbound routing rules through Postmark. Guild stores the Postmark API key server-side so agent code never sees it. Credential policies let you restrict which operations each agent can call, and every request runs through Guild's audit trail.

> [card] [Book a demo](https://guild-ai.cal.com/gtm/meeting-with-guild.ai)
>
> See how teams govern agents that use Postmark.

> [card] [Talk to sales](https://guild.ai/talk-to-sales)
>
> Get access to Guild, then connect Postmark to your first agent.

## What the Postmark integration exposes

The tools cover sending individual and batch emails, sending with templates, and testing template content. They also cover retrieving bounce counts, delivery stats, spam complaints, open rates, and click statistics broken down by browser, platform, and location. Additional tools create, update, list, and delete email templates, manage inbound rule triggers, and read or edit server configuration.

## How it works

**1. Connect your Postmark credential**

Go to **Access & setup > Credentials**, click **Connect**, select **postmark**, and paste your server API key into **API Key**. Guild sends it as the `X-Postmark-Server-Token` header on every request.

**2. Import and wire the tools**

Import `PostmarkTools` from `@guildai-services/guildai~postmark` and spread it into your agent's `tools` object. The package is added to your agent's `dependencies` in `package.json`.

**3. Narrow tools with pick**

Tools are named with the `postmark_` prefix. Use [`pick()`](https://docs.guild.ai/sdk/tools#selecting-specific-tools) to include only the tools your agent needs, such as `postmark_send_email` or `postmark_get_bounce_counts`.

## Why Postmark access needs governing

Postmark tools can send email at scale, delete templates, and change server configuration. Guild's [credential policies](https://docs.guild.ai/platform/credential-policies.md) let you write ALLOW and DENY rules that the credential proxy enforces before any request leaves Guild. You can restrict an agent to read-only delivery stats by allowing only `postmark_get_*` operations, or block `postmark_send_*` tools in a workspace used for testing.

Credentials are stored and injected server-side; agents never receive the raw API key. You can scope a credential to one workspace, one member, or one agent using [scoped credentials](https://docs.guild.ai/platform/credentials.md), so a monitoring agent and a sending agent never share the same access. Requests that no rule allows are denied by default once you remove the auto-created allow-all policy.

## About the Postmark integration

Agents can send individual or batch emails using Postmark, including template-based sends. They can monitor delivery performance by retrieving bounce counts, spam complaints, open rates, and click statistics. Agents can also manage email templates and configure inbound message rules. The integration is `guildai~postmark`.

## Authentication

* **Type:** API key
* **Header:** Guild sends the key as `X-Postmark-Server-Token: <key>`

### Setup

**1. Connect Postmark**

In Guild, go to **Access & setup > Credentials**, click **Connect**, select **postmark**, and paste the key into **API Key**.

See [Credentials](https://docs.guild.ai/platform/credentials.md) for workspace, member, and agent-scoped credentials.

## Usage

```typescript theme={null}
import { PostmarkTools } from "@guildai-services/guildai~postmark"
import { llmAgent } from "@guildai/agents-sdk"

export default llmAgent({
  systemPrompt: "You work with Postmark.",
  tools: { ...PostmarkTools },
})
```

### Selecting specific tools

Tools are named with the `postmark_` prefix. Use [`pick()`](https://docs.guild.ai/sdk/tools#selecting-specific-tools) to include only what your agent needs.

## Tools

Tools in the latest published version of `guildai~postmark`:

> [accordion] All 43 tools
>
> | Tool | What it does |
> | - | - |
> | `postmark_activate_bounce` | Activate a bounce |
> | `postmark_bypass_rules_for_inbound_message` | Bypass rules for a blocked inbound message |
> | `postmark_create_inbound_rule` | Create an inbound rule trigger |
> | `postmark_delete_inbound_rule` | Delete a single trigger |
> | `postmark_delete_template` | Delete a Template |
> | `postmark_edit_current_server_configuration` | Edit Server Configuration |
> | `postmark_get_bounce_counts` | Get bounce counts |
> | `postmark_get_bounces` | Get bounces |
> | `postmark_get_bounces_by_bounceid_dump` | Get bounce dump |
> | `postmark_get_clicks_for_single_outbound_message` | Retrieve Message Clicks |
> | `postmark_get_current_server_configuration` | Get Server Configuration |
> | `postmark_get_delivery_stats` | Get delivery stats |
> | `postmark_get_inbound_message_details` | Inbound message details |
> | `postmark_get_opens_for_single_outbound_message` | Retrieve Message Opens |
> | `postmark_get_outbound_click_counts` | Get click counts |
> | `postmark_get_outbound_click_counts_by_browser_family` | Get browser usage by family |
> | `postmark_get_outbound_click_counts_by_location` | Get clicks by body location |
> | `postmark_get_outbound_click_counts_by_platform` | Get browser plaform usage |
> | `postmark_get_outbound_message_details` | Outbound message details |
> | `postmark_get_outbound_message_dump` | Outbound message dump |
> | `postmark_get_outbound_open_counts` | Get email open counts |
> | `postmark_get_outbound_open_counts_by_email_client` | Get email client usage |
> | `postmark_get_outbound_open_counts_by_platform` | Get email platform usage |
> | `postmark_get_outbound_overview_statistics` | Get outbound overview |
> | `postmark_get_sent_counts` | Get sent counts |
> | `postmark_get_single_bounce` | Get a single bounce |
> | `postmark_get_single_template` | Get a Template |
> | `postmark_get_spam_complaints` | Get spam complaints |
> | `postmark_get_tracked_email_counts` | Get tracked email counts |
> | `postmark_list_inbound_rules` | List inbound rule triggers |
> | `postmark_list_templates` | Get the Templates associated with this Server |
> | `postmark_post_templates` | Create a Template |
> | `postmark_retry_inbound_message_processing` | Retry a failed inbound message for processing |
> | `postmark_search_clicks_for_outbound_messages` | Clicks for a all messages |
> | `postmark_search_inbound_messages` | Inbound message search |
> | `postmark_search_opens_for_outbound_messages` | Opens for all messages |
> | `postmark_search_outbound_messages` | Outbound message search |
> | `postmark_send_email` | Send a single email |
> | `postmark_send_email_batch` | Send a batch of emails |
> | `postmark_send_email_batch_with_templates` | Send a batch of email using templates. |
> | `postmark_send_email_with_template` | Send an email using a Template |
> | `postmark_test_template_content` | Test Template Content |
> | `postmark_update_template` | Update a Template |

## Frequently asked questions

> [accordion] Can I send a batch of emails using a template?
>
> Yes. The `postmark_send_email_batch_with_templates` tool sends a batch of emails using a Postmark template in one call.

> [accordion] Does the integration support webhook events from Postmark?
>
> No. The catalog entry for `guildai~postmark` lists no webhook events, so the integration does not receive inbound event callbacks from Postmark.

> [accordion] Can I limit an agent to only reading stats, not sending email?
>
> Yes. Write a credential policy with a DENY rule on `postmark_send_*` operations and an ALLOW rule on `postmark_get_*`. Guild's credential proxy enforces this before any request reaches Postmark. See [credential policies](https://docs.guild.ai/platform/credential-policies.md) for syntax.

> [accordion] Can I give one agent its own Postmark key separate from the rest of the workspace?
>
> Yes. From the installed agent's page, connect a credential scoped **Dedicated to this agent**. Guild uses that credential ahead of any workspace or account credential when that agent runs. See [credentials](https://docs.guild.ai/platform/credentials.md) for the full resolution order.

## Put a governed agent on Postmark this week

> [card] [Book a demo](https://guild-ai.cal.com/gtm/meeting-with-guild.ai)
>
> See how teams govern agents that use Postmark.

> [card] [Talk to sales](https://guild.ai/talk-to-sales)
>
> Get access to Guild, then connect Postmark to your first agent.

## Related

**Also runs on Guild:** [Ably](https://docs.guild.ai/integrations/ably.md) · [Customer.io](https://docs.guild.ai/integrations/customer-io.md) · [Daily](https://docs.guild.ai/integrations/daily.md) · [Discord](https://docs.guild.ai/integrations/discord.md)

**Read:** Docs: [Credential policies](https://docs.guild.ai/platform/credential-policies.md) · [Credentials](https://docs.guild.ai/platform/credentials.md) · [Tools in agents](https://docs.guild.ai/sdk/tools.md)
