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

# Postscript

> Integration details and setup guide for the Postscript connector in Alloy Automation.

## Pre-Built Tooling

| Category                            | Details                                                     |
| ----------------------------------- | ----------------------------------------------------------- |
| **Authentication**                  | Bearer Token + Shop Token (Header: X-Postscript-Shop-Token) |
| **Two-Way Sync**                    | No                                                          |
| **Events Supported**                | No                                                          |
| **Realtime**                        | Polling                                                     |
| **Supports Rate Limiting**          | Yes                                                         |
| **Authentication Scopes Supported** | N/A (Token-based)                                           |

***

## Objects Supported

Alloy Automation supports syncing the following objects from **Postscript**:

* **Subscribers**
* **SMS Campaigns**
* **Keywords**
* **Message History**
* **Opt-ins/Opt-outs**

***

## Set Up Guide

### Trial Access

| Question                                           | Answer                                                                                                              |
| -------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| **Offers free trial?**                             | Yes. Postscript offers a free trial with limited SMS credits. [Start free trial](https://postscript.io/get-started) |
| **Requires paid sandbox?**                         | No. The trial account can be used for testing and development.                                                      |
| **Requires partnership to obtain authentication?** | No. However, you need an active Postscript account integrated with your e-commerce platform.                        |

***

### Authentication (Bearer Token + Shop Token)

For customers who want to completely whitelabel their authentication experience, you can provide your own developer keys instead of using Alloy Automation's.

<steps>
  <step title="Create Postscript Account">
    Sign up for Postscript at [https://postscript.io](https://postscript.io) or log in to your existing account
  </step>

  <step title="Navigate to API Settings">
    1. Log in to your Postscript dashboard at [https://app.postscript.io](https://app.postscript.io)
    2. Go to **Account Settings**
    3. Select **API** or **Integrations** from the menu
  </step>

  <step title="Generate API Keys">
    1. Look for the **Private Key** or **Shop Token** section
    2. Copy your **Private Key** (this is used as the Bearer token)
    3. Copy your **Shop Token** (this identifies your specific shop)
    4. If keys don't exist, click **Generate** or **Create New Key**
    5. Store both tokens securely
  </step>

  <step title="Configure in Alloy Automation">
    1. In Alloy Automation, provide your Postscript Private Key (used as Bearer token in `Authorization: Bearer <token>` header)
    2. Also provide your Shop Token (sent in `X-Postscript-Shop-Token` header)
    3. Test the connection to verify both authentication tokens work correctly
  </step>
</steps>

For detailed API documentation, visit [Postscript API Reference](https://docs.postscript.io/).

***

## Use Cases

### 1) SMS subscriber synchronization

Sync SMS subscriber data from Postscript to your CRM or customer data platform to coordinate marketing campaigns across email, SMS, and other channels.

### 2) Abandoned cart SMS automation

Trigger abandoned cart recovery SMS messages through Postscript when customers leave items in their cart, using data from your e-commerce platform.

### 3) Post-purchase engagement

Automatically send post-purchase SMS messages via Postscript for order confirmations, shipping updates, review requests, and cross-sell opportunities.

### 4) SMS campaign analytics

Pull SMS campaign metrics and subscriber engagement data from Postscript into your analytics platform to measure SMS marketing ROI.

### 5) Keyword-based automation

Set up automated SMS workflows triggered by customer keyword responses in Postscript, integrating with other systems to fulfill requests or gather data.

***

## API Gotchas

* **Dual authentication:** Postscript requires both a Bearer token (Private Key) and a Shop Token in separate headers. Ensure both are configured correctly or all API requests will fail.

* **Partner key requirement:** Some API operations may require a `POSTSCRIPT_PARTNER_KEY` configuration variable. Check with Postscript if you're a partner or need extended API access.

* **Subscriber consent:** Always respect SMS opt-in/opt-out status when working with subscriber data. Sending messages to opted-out subscribers can result in compliance violations and account suspension.

* **Rate limiting:** Postscript enforces rate limits to protect system performance. Implement exponential backoff retry logic for handling rate limit responses.

* **Phone number formatting:** Ensure phone numbers are properly formatted (typically E.164 format) before sending them to the Postscript API to avoid validation errors.

> For questions or troubleshooting, contact **[support@runalloy.com](mailto:support@runalloy.com)**.
