# Postgrid

PostGrid provides APIs for automating direct mail and address verification services, enabling businesses to send letters, postcards, and checks, as well as verify and standardize addresses in real-time.

- **Category:** developer tools
- **Auth:** API_KEY
- **Composio Managed App Available?** N/A
- **Tools:** 60
- **Triggers:** 0
- **Slug:** `POSTGRID`
- **Version:** 20260223_00

## Tools

### Cancel Box

**Slug:** `POSTGRID_CANCEL_BOX`

Tool to cancel a box order by its ID. Use when you need to cancel a pending box shipment.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Unique identifier of the box to cancel (format: box_XXXX) |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Cancel Cheque

**Slug:** `POSTGRID_CANCEL_CHEQUE`

Tool to cancel a cheque order by its ID. Only works when the cheque has 'ready' status. Use when you need to cancel a pending cheque before it is mailed.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Unique identifier of the cheque to cancel (starts with cheque_). The cheque must have 'ready' status to be cancelled. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Cancel Cheque with Note

**Slug:** `POSTGRID_CANCEL_CHEQUE_WITH_NOTE`

Tool to cancel a cheque order with a cancellation note. Use when you need to cancel a cheque and provide a reason for the cancellation.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the cheque to cancel (format: cheque_*) |
| `note` | string | Yes | Cancellation note explaining the reason for cancellation. Must not be empty. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Cancel Postcard

**Slug:** `POSTGRID_CANCEL_POSTCARD`

Tool to cancel a postcard order. Use when you need to cancel a postcard that has status 'ready'.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The unique identifier of the postcard to cancel. Only postcards with status 'ready' can be cancelled. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Cancel Postcard With Note

**Slug:** `POSTGRID_CANCEL_POSTCARD_WITH_NOTE`

Tool to cancel a postcard order with an optional cancellation note. Use when you need to cancel a postcard that is in 'ready' status. Once cancelled, the status changes to 'cancelled' and the response includes cancellation details.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The postcard ID to cancel. The postcard must be in 'ready' status to be cancelled. |
| `note` | string | Yes | Cancellation note explaining why the postcard is being cancelled. This field is required and must not be empty. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Cancel Return Envelope Order

**Slug:** `POSTGRID_CANCEL_RETURN_ENVELOPE_ORDER`

Tool to cancel a return envelope order. Use when you need to cancel a pending return envelope order using the return envelope ID and order ID.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Unique identifier of the return envelope |
| `orderId` | string | Yes | Unique identifier of the return envelope order to cancel |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### CREATE_BANK_ACCOUNT

**Slug:** `POSTGRID_CREATE_BANK_ACCOUNT`

Tool to create a new bank account for print & mail service.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `bankName` | string | Yes | Name of the bank |
| `accountType` | string ("checking" | "savings") | Yes | Type of bank account |
| `contactEmail` | string | Yes | Contact email for the account |
| `contactPhone` | string | No | Contact phone number |
| `accountNumber` | string | Yes | Bank account number |
| `routingNumber` | string | Yes | 9-digit bank routing number |
| `signatureText` | string | No | Signature text |
| `signatureImage` | string | No | URL or file path for signature image |
| `bankCountryCode` | string | Yes | Country code (ISO 3166-1 alpha-2) |
| `accountHolderName` | string | Yes | Name of the bank account holder |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Box

**Slug:** `POSTGRID_CREATE_BOX`

Tool to create a box mailing order for letters with plastic cards or cheques. Use when you need to send multiple cheques in a secure box.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `to` | string | Yes | Contact ID (e.g., 'contact_xxx') or inline contact object for the recipient |
| `from` | string | Yes | Contact ID (e.g., 'contact_xxx') or inline contact object for the sender |
| `cheques` | array | Yes | Array of cheque objects to be included in the box (minimum 1, maximum 500). Each cheque must include to, from, bankAccount, amount, and number fields. |
| `mailingClass` | string | No | Mailing class for delivery (e.g., 'first_class'). Defaults to first_class. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Cheque

**Slug:** `POSTGRID_CREATE_CHEQUE`

Tool to create a cheque order for physical cheque mailing. Use when you need to send a payment via printed cheque. Requires a valid bank account ID and recipient contact details.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `to` | object | Yes | Recipient contact details (payee) |
| `memo` | string | No | Memo line on the cheque |
| `amount` | integer | Yes | Cheque amount in cents. For example, 5000 = $50.00 |
| `number` | integer | No | Custom cheque number. If not provided, will auto-increment. |
| `message` | string | No | HTML message to include above the cheque (max 7 inches from top of page) |
| `metadata` | object | No | Custom key-value pairs for metadata |
| `sendDate` | string | No | Scheduled send date in ISO 8601 format |
| `bankAccount` | string | Yes | Bank account ID for the cheque. Must be created via bank_accounts endpoint first. |
| `extraService` | string | No | Extra service option: 'certified' or 'certified_return_receipt' |
| `from_address` | object | Yes | Sender contact details (payer) |
| `mailingClass` | string | No | Mailing class for delivery (e.g., 'first_class', 'standard') |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Contact

**Slug:** `POSTGRID_CREATE_CONTACT`

Tool to create a new contact in PostGrid. Use after collecting contact's name, address, and optional metadata.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `city` | string | Yes | City name |
| `email` | string | No | Email address |
| `lastName` | string | Yes | Last name of the contact |
| `metadata` | object | No | Custom metadata as key-value pairs |
| `firstName` | string | Yes | First name of the contact |
| `countryCode` | string | Yes | Country ISO code |
| `phoneNumber` | string | No | Phone number in E.164 format |
| `postalOrZip` | string | Yes | Postal or ZIP code |
| `addressLine1` | string | Yes | Street address line 1 |
| `addressLine2` | string | No | Street address line 2 |
| `organization` | string | No | Organization name |
| `provinceOrState` | string | Yes | Province or state |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Letter

**Slug:** `POSTGRID_CREATE_LETTER`

Tool to create and send a letter via PostGrid. Use when recipient, sender, and content details are ready.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `to` | object | Yes | Recipient's address details |
| `pdf` | string | No | URL to a PDF file for the letter content. Required if html is not provided |
| `html` | string | No | HTML content of the letter. Required if pdf is not provided |
| `express` | boolean | No | Request express shipping |
| `metadata` | object | No | Custom metadata associated with the letter |
| `description` | string | No | Description of the letter |
| `from_address` | object | Yes | Sender's address details |
| `mergeVariables` | object | No | Key-value pairs for merging data into the letter content |
| `perforatedPage` | integer | No | Page number to be perforated |
| `returnEnvelope` | string | No | Return envelope ID to include with the letter (e.g., 'return_envelope_...'). Pass 'true' to use the default return envelope. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Postcard

**Slug:** `POSTGRID_CREATE_POSTCARD`

Tool to create and send a postcard via PostGrid. Use when recipient, sender, and content (HTML, template, or PDF) are ready.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `to` | object | Yes | Recipient's address details |
| `pdf` | string | No | URL or file for a 2-page PDF (front and back). Required if HTML/template options are not provided |
| `from` | object | Yes | Sender's address details |
| `size` | string ("6x4" | "9x6" | "11x6") | No | Supported postcard sizes. |
| `backHTML` | string | No | HTML content for the back of the postcard. Required if backTemplate and pdf are not provided |
| `metadata` | object | No | Custom metadata associated with the postcard |
| `sendDate` | string | No | Scheduled send date in ISO8601 format |
| `frontHTML` | string | No | HTML content for the front of the postcard. Required if frontTemplate and pdf are not provided |
| `backTemplate` | string | No | Template ID for the back of the postcard. Required if backHTML and pdf are not provided |
| `mailingClass` | string | No | Mailing class for the postcard delivery |
| `frontTemplate` | string | No | Template ID for the front of the postcard. Required if frontHTML and pdf are not provided |
| `mergeVariables` | object | No | Key-value pairs for merging data into template content |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Return Envelope

**Slug:** `POSTGRID_CREATE_RETURN_ENVELOPE`

Tool to create a return envelope for mail recipients to respond. Use when you need to include a prepaid return envelope for recipients to send back responses.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `to` | object | Yes | Recipient contact information (return address where the envelope will be sent back to) |
| `description` | string | No | Optional description to identify the return envelope |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Return Envelope Order

**Slug:** `POSTGRID_CREATE_RETURN_ENVELOPE_ORDER`

Tool to create a batch order of return envelopes to be printed and delivered. Use when you need to order return envelopes in bulk (minimum 5000 units).

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the return envelope to create an order for |
| `quantityOrdered` | integer | Yes | The quantity of return envelopes to order. Must be at least 5000. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Template

**Slug:** `POSTGRID_CREATE_TEMPLATE`

Tool to create a new mail template in PostGrid. Use when you need to define reusable HTML content with dynamic placeholders. Use after confirming required template details.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `html` | string | Yes | HTML content of the template (supports Handlebars/Mustache syntax) |
| `name` | string | Yes | Name of the template |
| `description` | string | No | Description of the template |
| `testRenderModel` | object | No | Data model used for testing the template rendering |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Template Editor Session

**Slug:** `POSTGRID_CREATE_TEMPLATE_EDITOR_SESSION`

Tool to create a template editor session for interactive template editing. Use when you need to generate an embeddable URL for editing a template. The session URL allows users to modify template HTML content in a visual editor.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `template` | string | Yes | The ID of an existing template to open in the editor session. Must be a valid template ID with format template_* |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Tracker

**Slug:** `POSTGRID_CREATE_TRACKER`

Tool to create a tracker for monitoring mail delivery status via URL tracking. Use when you need to track recipient engagement with personalized URLs.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `metadata` | object | No | Custom metadata as key-value pairs |
| `description` | string | No | Optional description for the tracker |
| `urlExpireAfterDays` | integer ("30" | "60" | "90") | Yes | Number of days until generated URLs expire. Must be 30, 60, or 90 days. |
| `redirectURLTemplate` | string | Yes | The base URL template for personalized redirects. Supports merge variables like {{to.firstName}}, {{to.lastName}}, {{from.city}}, {{to.metadata.id}}, etc. Any merge variable available in the order can be accessed. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Webhook

**Slug:** `POSTGRID_CREATE_WEBHOOK`

Tool to create a new webhook to receive order event notifications. Use after configuring your endpoint to handle webhook payloads.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | Yes | The URL where webhook payloads will be sent. |
| `enabledEvents` | array | Yes | List of events that trigger the webhook. Possible values include: 'letter.created', 'letter.updated', 'postcard.created', 'postcard.updated', 'cheque.created', 'cheque.updated', 'self_mailer.created', 'self_mailer.updated', 'return_envelope_order.created', 'return_envelope_order.updated'. |
| `payloadFormat` | string ("jwt" | "json") | No | Format of the webhook payload: 'jwt' (signed) or 'json' (plain JSON). Defaults to 'jwt'. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Bank Account

**Slug:** `POSTGRID_DELETE_BANK_ACCOUNT`

Tool to delete a bank account by its ID. Use when you need to remove a bank account after confirming its identifier.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Unique identifier of the bank account to delete |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Contact

**Slug:** `POSTGRID_DELETE_CONTACT`

Tool to delete a contact by its ID. Use when you need to remove obsolete contacts after confirming their identifier.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Unique identifier of the contact to delete |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Template

**Slug:** `POSTGRID_DELETE_TEMPLATE`

Tool to delete a template by its ID. Use when you need to remove an existing template after confirming its identifier.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Unique identifier of the template to delete |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Template Editor Session

**Slug:** `POSTGRID_DELETE_TEMPLATE_EDITOR_SESSION`

Tool to delete a template editor session by its ID. Use when you need to remove an existing template editor session.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Unique identifier of the template editor session to delete |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Tracker

**Slug:** `POSTGRID_DELETE_TRACKER`

Tool to delete a tracker by its ID. Use when you need to remove an existing tracker after confirming its identifier.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Unique identifier of the tracker to delete |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Webhook

**Slug:** `POSTGRID_DELETE_WEBHOOK`

Tool to delete a webhook subscription. Use when you need to remove an existing webhook by its ID.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Unique identifier of the webhook to delete |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Fill Test Return Envelope Order

**Slug:** `POSTGRID_FILL_TEST_RETURN_ENVELOPE_ORDER`

Tool to fill a test return envelope order for testing purposes. This simulates filling a return envelope order in test mode, changing the status from 'placed' to 'filled'. Only works in test mode.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The return envelope ID (prefixed with return_envelope_) |
| `orderId` | string | Yes | The return envelope order ID (prefixed with return_envelope_order_) |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Bank Account

**Slug:** `POSTGRID_GET_BANK_ACCOUNT`

Tool to retrieve a bank account. Use after obtaining the bank account ID to fetch its details.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Unique identifier of the bank account to retrieve |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Box

**Slug:** `POSTGRID_GET_BOX`

Tool to retrieve a specific box order by ID. Use after obtaining the box ID to fetch its details.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Unique identifier of the box to retrieve. Format: box_[alphanumeric] |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Cheque

**Slug:** `POSTGRID_GET_CHEQUE`

Tool to retrieve a specific cheque by ID. Use when you need to fetch details of a specific cheque order.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Unique identifier of the cheque to retrieve (starts with 'cheque_') |
| `expand` | array | No | Array of nested resources to expand (e.g., ['bankAccount', 'template']). When expanded, the response will include full objects instead of just IDs. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Contact

**Slug:** `POSTGRID_GET_CONTACT`

Tool to retrieve a contact. Use after obtaining the contact ID to fetch its details.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Unique identifier of the contact to retrieve |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Letter

**Slug:** `POSTGRID_GET_LETTER`

Tool to retrieve a letter. Use after you have the letter ID to fetch its details.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Unique identifier of the letter to retrieve |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Postcard

**Slug:** `POSTGRID_GET_POSTCARD`

Tool to retrieve a specific postcard by ID. Use when you have a postcard ID and need to fetch its details.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Unique identifier of the postcard to retrieve |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Return Envelope

**Slug:** `POSTGRID_GET_RETURN_ENVELOPE`

Tool to retrieve a return envelope. Use after obtaining the return envelope ID to fetch its details.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Unique identifier of the return envelope to retrieve, prefixed with 'return_envelope_' |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Return Envelope Order

**Slug:** `POSTGRID_GET_RETURN_ENVELOPE_ORDER`

Tool to retrieve a specific return envelope order. Use when you need to get details about an order by its return envelope ID and order ID.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Unique identifier of the return envelope |
| `orderId` | string | Yes | Unique identifier of the return envelope order |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Template

**Slug:** `POSTGRID_GET_TEMPLATE`

Tool to retrieve a template. Use when you have the template ID and need its details.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Unique identifier of the template to retrieve |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Tracker

**Slug:** `POSTGRID_GET_TRACKER`

Tool to retrieve a tracker. Use when you have the tracker ID and need its details.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Unique identifier of the tracker to retrieve |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Webhook

**Slug:** `POSTGRID_GET_WEBHOOK`

Tool to retrieve details of a specific webhook by its ID. Use after creating a webhook to fetch its configuration and status.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Unique identifier of the webhook to retrieve |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Bank Accounts

**Slug:** `POSTGRID_LIST_BANK_ACCOUNTS`

Tool to list bank accounts. Use when retrieving bank accounts with optional status filter and pagination.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `skip` | integer | No | Number of records to skip for pagination (default 0) |
| `limit` | integer | No | Maximum number of bank accounts to return (default 10, max 100) |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Box Orders

**Slug:** `POSTGRID_LIST_BOXES`

Tool to list box orders. Use when you need to retrieve a paginated list of box orders from PostGrid.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `skip` | integer | No | Number of box orders to skip for pagination |
| `limit` | integer | No | Maximum number of box orders to return per page (1-100, default 10) |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Cheques

**Slug:** `POSTGRID_LIST_CHEQUES`

Tool to list cheques with optional filters and pagination. Use when you need to retrieve batches of cheque records for processing or reporting.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `after` | string | No | Cursor for pagination. Fetch items after this cursor. |
| `count` | integer | No | Number of items to return per page. Maximum is 100. |
| `status` | string ("created" | "mailed" | "failed") | No | Filter by cheque status. |
| `to_date` | string | No | ISO-8601 timestamp. Only return cheques created before this time. |
| `from_date` | string | No | ISO-8601 timestamp. Only return cheques created after this time. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Contacts

**Slug:** `POSTGRID_LIST_CONTACTS`

Tool to list contacts. Use when you need to retrieve a paginated list of contacts with optional filters like date range, metadata, name, or email.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `skip` | integer | No | Number of contacts to skip for pagination |
| `limit` | integer | No | Maximum number of contacts to return per page (1-100) |
| `search` | string | No | Search query to filter contacts by name, address, email, or other fields |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Webhook Events

**Slug:** `POSTGRID_LIST_EVENTS`

Tool to retrieve a list of webhook events with optional pagination. Use when you need to view all webhook events that have occurred.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `skip` | integer | No | Number of events to skip for pagination |
| `limit` | integer | No | Maximum number of events to return per page (1-100) |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Letters

**Slug:** `POSTGRID_LIST_LETTERS`

Tool to list letters. Use when retrieving letters with optional filters and pagination.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `after` | string | No | Cursor for pagination to fetch records created after a specific ID |
| `limit` | integer | No | Maximum number of records to return (default 10, max 100) |
| `before` | string | No | Cursor for pagination to fetch records created before a specific ID |
| `dateTo` | string | No | Filter letters created on or before this date (ISO 8601) |
| `status` | string ("draft" | "ready" | "printing" | "processed" | "completed" | "cancelled") | No | Filter letters by status (ready, printing, processed, completed, cancelled) |
| `dateFrom` | string | No | Filter letters created on or after this date (ISO 8601) |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Postal Statements

**Slug:** `POSTGRID_LIST_POSTAL_STATEMENTS`

Tool to list all postal statements for billing and tracking purposes. Use when you need to retrieve statements for accounting or audit purposes.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `skip` | integer | No | Number of postal statements to skip for pagination |
| `limit` | integer | No | Maximum number of postal statements to return per page (1-100) |
| `search` | string | No | Search query to filter postal statements by various fields |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Postcards

**Slug:** `POSTGRID_LIST_POSTCARDS`

Tool to retrieve a list of postcards with optional filtering and pagination. Use when you need to browse or filter postcards list.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `skip` | integer | No | Number of records to skip (offset). |
| `limit` | integer | No | Number of records per page (1-100). |
| `status` | string ("draft" | "queued" | "processing" | "completed" | "failed") | No | Filter by postcard status. |
| `to_date` | string | No | Return postcards created before this ISO8601 timestamp. |
| `metadata` | object | No | Filter by custom metadata key-value pairs. |
| `from_date` | string | No | Return postcards created after this ISO8601 timestamp. |
| `contact_id` | string | No | Filter by the contact's unique ID. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Return Envelope Orders

**Slug:** `POSTGRID_LIST_RETURN_ENVELOPE_ORDERS`

Tool to list all return envelope orders for a specific return envelope. Use when retrieving orders associated with a return envelope ID.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The return envelope ID (prefixed with return_envelope_) |
| `skip` | integer | No | Number of records to skip for pagination |
| `limit` | integer | No | Maximum number of records to return (default 10, max 100) |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Return Envelopes

**Slug:** `POSTGRID_LIST_RETURN_ENVELOPES`

Tool to list return envelopes. Use when you need to retrieve a paginated list of business reply envelopes (BREs) with optional pagination.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `skip` | integer | No | Number of return envelopes to skip for pagination |
| `limit` | integer | No | Maximum number of return envelopes to return per page (1-100) |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Self-Mailers

**Slug:** `POSTGRID_LIST_SELF_MAILERS`

Tool to list self-mailers. Use when you need to fetch self-mailers with filters and pagination.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `skip` | integer | No | Number of records to skip (offset) |
| `limit` | integer | No | Number of records per page (1-100) |
| `status` | string | No | Filter by status (e.g., 'draft', 'queued', 'processing', 'completed', 'failed') |
| `to_date` | string | No | Filter self-mailers created on or before this ISO 8601 timestamp (inclusive) |
| `metadata` | object | No | Key-value metadata pairs to filter self-mailers |
| `from_date` | string | No | Filter self-mailers created on or after this ISO 8601 timestamp (inclusive) |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Sub-Organizations

**Slug:** `POSTGRID_LIST_SUB_ORGANIZATIONS`

Tool to list sub-organizations. Use when you need to retrieve a paginated list of sub-organizations with optional search filter.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `skip` | integer | No | Number of records to skip for pagination (default 0) |
| `limit` | integer | No | Maximum number of sub-organizations to return (default 10, max 100) |
| `search` | string | No | Search query to filter sub-organizations by name or other fields |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Template Editor Sessions

**Slug:** `POSTGRID_LIST_TEMPLATE_EDITOR_SESSIONS`

Tool to list template editor sessions. Use when you need to retrieve a paginated list of template editor sessions.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `skip` | integer | No | Number of sessions to skip for pagination |
| `limit` | integer | No | Maximum number of sessions to return per page (1-100) |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Templates

**Slug:** `POSTGRID_LIST_TEMPLATES`

Tool to list templates. Use when you need to retrieve a paginated list of templates with optional type filtering.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `skip` | integer | No | Number of templates to skip for pagination |
| `limit` | integer | No | Maximum number of templates to return per page (1-100) |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Trackers

**Slug:** `POSTGRID_LIST_TRACKERS`

Tool to list all trackers. Use when you need to retrieve a paginated list of trackers for tracking mail interactions.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `skip` | integer | No | Number of trackers to skip for pagination (defaults to 0) |
| `limit` | integer | No | Maximum number of trackers to return per page (defaults to 10, max 100) |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Tracker Visits

**Slug:** `POSTGRID_LIST_TRACKER_VISITS`

Tool to list all visits for a tracker. Use when you need to retrieve visit information including device, IP address, and referred tracker/order ID for each visit.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Unique identifier of the tracker to retrieve visits for |
| `skip` | integer | No | Number of visits to skip for pagination |
| `limit` | integer | No | Maximum number of visits to return per page (1-100) |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Webhook Invocations

**Slug:** `POSTGRID_LIST_WEBHOOK_INVOCATIONS`

Tool to list previous invocations of a webhook with response status codes. Use when you need to view the history of webhook delivery attempts and their outcomes.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The unique identifier of the webhook to retrieve invocations for. |
| `skip` | integer | No | Number of invocations to skip for pagination (default: 0). |
| `limit` | integer | No | Number of invocations to return (default: 40, max: 100). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Webhooks

**Slug:** `POSTGRID_LIST_WEBHOOKS`

Tool to retrieve a list of configured webhooks with optional filtering and pagination. Use when you need to view your webhooks.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `skip` | integer | No | Number of webhooks to skip for pagination. |
| `limit` | integer | No | Maximum number of webhooks to return per page (1-100). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Progress Test Box

**Slug:** `POSTGRID_PROGRESS_TEST_BOX`

Tool to progress a test box through processing stages for webhook testing. Use when testing webhook integration by advancing box status.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the test box to progress through stages. Must be a test mode box. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Progress Test Cheque

**Slug:** `POSTGRID_PROGRESS_TEST_CHEQUE`

Tool to progress a test cheque through processing stages for webhook testing. Use when you need to simulate cheque status changes (ready -> printing -> processed_for_delivery -> completed) to test webhook integrations.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Unique identifier of the test cheque to progress. Must be a test cheque (not a live cheque). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Progress Test Postcard

**Slug:** `POSTGRID_PROGRESS_TEST_POSTCARD`

Tool to progress a test postcard through processing stages for webhook testing. Use when testing webhook integration by advancing postcard status.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the test postcard to progress through stages. Must be a test mode postcard. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Template

**Slug:** `POSTGRID_UPDATE_TEMPLATE`

Tool to update an existing mail template in PostGrid. Use when you need to modify the HTML content, description, or metadata of a template.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Unique identifier of the template to update. Must start with 'template_' |
| `html` | string | Yes | Updated HTML content for the template (supports Handlebars/Mustache syntax) |
| `metadata` | object | No | Custom key-value pairs for organizing and tracking the template |
| `description` | string | No | Updated description for the template |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Tracker

**Slug:** `POSTGRID_UPDATE_TRACKER`

Tool to update an existing tracker's redirect URL template and/or expiration settings. Use when you need to modify tracker configuration after obtaining its identifier.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Unique identifier of the tracker to update |
| `urlExpireAfterDays` | integer | No | Number of days before generated URLs expire. Must be 30, 60, or 90 |
| `redirectURLTemplate` | string | No | The base URL template for personalized redirects, supporting merge variables like {{to.firstName}} and {{to.metadata.id}} |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Webhook

**Slug:** `POSTGRID_UPDATE_WEBHOOK`

Tool to update an existing webhook configuration. Use when you need to modify webhook URL, events, or other settings.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Unique identifier of the webhook to update (path parameter). |
| `url` | string | No | The URL where webhook payloads will be sent. |
| `enabled` | boolean | No | Whether the webhook is enabled or disabled. |
| `enabledEvents` | array | No | List of events that trigger the webhook. Possible values include: 'letter.created', 'letter.updated', 'postcard.created', 'postcard.updated', 'cheque.created', 'cheque.updated', 'self_mailer.created', 'self_mailer.updated', 'return_envelope_order.created', 'return_envelope_order.updated'. |
| `payloadFormat` | string ("jwt" | "json") | No | Format of the webhook payload: 'jwt' (signed) or 'json' (plain JSON). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
