---
title: "Attentive + PostPilot Direct Mail Setup: Email Contacts"
description: Connect Attentive to PostPilot using email-based targeting. Attentive pushes subscriber email addresses into PostPilot via the API, and PostPilot uses MailMatch to find their physical mailing addresses and send personalized direct mail automatically.
---

[Skip to content](https://help.postpilot.com/knowledge/attentive-postpilot-direct-mail-setup-email-contacts#main-content)

English

Show submenu for translations

![Email banner | New Blue Logo 2024.png\]](https://help.postpilot.com/hs-fs/hubfs/Email%20banner%20%7C%20New%20Blue%20Logo%202024.png?width=152&height=28&name=Email%20banner%20%7C%20New%20Blue%20Logo%202024.png)

Open main navigation

Close main navigation

- English
  
  Show submenu for translations
- [Go to the PostPilot app](https://app.postpilot.com/)

[Go to the PostPilot app](https://app.postpilot.com/)

 How can we help?

- There are no suggestions because the search field is empty.

1. [Help Center](https://help.postpilot.com/knowledge?hsLang=en)
2. [Integrations](https://help.postpilot.com/knowledge/integrations?hsLang=en)

# Attentive + PostPilot Direct Mail Setup: Email Contacts

## Connect Attentive to PostPilot using email-based targeting. Attentive pushes subscriber email addresses into PostPilot via the API, and PostPilot uses MailMatch to find their physical mailing addresses and send personalized direct mail automatically.

### How it works

When your Attentive subscribers don't have mailing addresses on file, PostPilot can still reach them. By sending just the subscriber's email through the API, PostPilot uses MailMatch to look up their physical mailing address. Once the contacts are received and matched, you create a segment in PostPilot to group them, then set up an automated campaign that continuously mails new recipients as they flow in.

**End-to-end flow** (once live, this runs automatically):

Attentive Journey Triggers → Webhook Sends Email to PostPilot → MailMatch Finds Address → Contact Enters Segment → Postcard Mailed

 

**Note:** MailMatch address lookup is available for US addresses only. Not every email will result in a match and match rates vary depending on the audience.

#### What you'll need

- A PostPilot account
- An Attentive account
- An Attentive segment or journey you want to use as the trigger

#### Step-by-step guide

### Step 1: Create an API connection in PostPilot

1. Log in to PostPilot and navigate to **Integrations → API Connections**.
2. Click **New API Connection** and give it a descriptive name (e.g., "Attentive").
3. Once created, copy the full endpoint URL from the connection detail page — this contains your unique API key.
4. Keep this URL secure — Attentive will use it to send subscriber data to PostPilot.

### Step 2: Set up a webhook in Attentive

1. In Attentive, go to **Journeys → Create Journey**.
2. Choose a trigger: 
     - Select the event or segment that should send subscribers to PostPilot (e.g., "Added to Segment", "Custom Event", "Subscribed to Email").
     - Add any filters to narrow the audience as needed.
3. Add a **Webhook** step: 
     - In the journey builder, add a **Send Webhook** action.
     - **URL:** Paste the full endpoint URL from your PostPilot API connection, using the email contact endpoint. This is the same one you copied in Step 1 (the URL below is an example).
     - **Method:** `POST`
     - **Headers:** Add one header — Key: `Content-Type`, Value: `application/json`
     - **Body:** Paste the JSON below.
4. Activate the journey when ready.

**Webhook URL — email endpoint**

```
https://api.postpilot.com/v1/{YOUR_CONNECTION_KEY}/api_email_contact
```

**Request body — JSON**

```
{  "email": "",  "fullname": " ",  "custom_1": "your_unique_title_here",  "custom_2": "",  "custom_3": ""}
```

**Note:** The exact variable names for subscriber fields may vary depending on how your Attentive account is configured. Check Attentive's dynamic variables documentation or your subscriber profiles to confirm the correct field names before launching.

### Field reference

| Field | What it does |
| --- | --- |
| `email` | The subscriber's email address. PostPilot uses this to look up their physical mailing address via MailMatch. |
| `fullname` | The subscriber's full name, pulled from the Attentive profile. Used for personalization on the postcard. |
| `custom_1` | A unique title to identify this specific journey. Choose something descriptive (e.g., `email_winback`, `sms_subscribers`, `abandoned_cart`). This exact value is what you'll use in Step 3 to create a matching segment — it must be consistent. Each journey should have a different `custom_1` value. |
| `custom_2` | Optional additional data to print on the postcard (e.g., discount amount, product name). Leave blank if not needed. |
| `custom_3` | Optional additional personalization. Leave blank if not needed. |

### Step 3: Create a segment in PostPilot

1. From the API connection page, click **Create Segment**.
2. Add a filter: **Custom 1 equals** the unique title you entered in the `custom_1` field in Step 2 — it must match exactly.
3. Save. This segment will include all contacts pushed from Attentive with that title.

**Tip:** If you have multiple Attentive journeys sending to PostPilot, create a separate segment for each one by matching the unique `custom_1` title from each journey.

### Step 4: Test the integration

1. In Attentive, trigger the journey for a test subscriber (or add a test profile to the triggering segment).
2. Verify the webhook fires successfully. Attentive shows webhook delivery status in the journey analytics.
3. Wait for the contact to be processed in PostPilot. The email-to-address matching step takes some time before contacts appear in the segment (3–5 hours).
4. Refresh the segment count in PostPilot to confirm the contacts appear.
5. Send a proof to confirm everything looks correct before setting the automated campaign live.

### Step 5: Create an automated campaign in PostPilot

1. In PostPilot, go to **Campaigns → Create Campaign**.
2. Select **Automated** as the campaign type.
3. Choose the segment you just created as the audience.
4. Design your postcard and use merge tags for personalization: 
     - `` — Customer's first name
     - `` — Customer's last name
     - `` — Any additional value you sent (if used)
     - `` — Any additional value you sent (if used)
5. Set the campaign **Live**. PostPilot will automatically mail new recipients as they enter the segment from Attentive.

Once the automated campaign is live, the flow is fully hands-off: Attentive pushes subscriber emails → PostPilot matches the email to a physical address via MailMatch → the contact enters the segment → the automated campaign mails them a postcard.

#### Tips and best practices

| Tip | Details |
| --- | --- |
| **Not every email will match** | MailMatch looks up physical addresses from email. Match rates depend on the audience — some emails may not have a known mailing address on file, so your segment count may be smaller than the total contacts pushed. |
| **US addresses only** | MailMatch is currently available for US-based addresses only. |
| **Use `custom_1` consistently** | The value in the webhook body must match exactly what you enter in the segment filter. Even a small difference (capitalization, extra space) will result in 0 recipients. |
| **One journey per campaign type** | Create separate Attentive journeys, PostPilot segments, and automated campaigns for each use case using different `custom_1` values. |
| **Timing expectations** | Contacts are not available instantly after the webhook fires. They go through the MailMatch process before appearing in the segment. |
| **No rate limit concerns** | Typical Attentive volumes are well within PostPilot's API limits. |

*Questions? Reach out to your PostPilot account team.*

- [Integrations](https://help.postpilot.com/knowledge/integrations?hsLang=en)
- [Card Design](https://help.postpilot.com/knowledge/card-design?hsLang=en)
- [Segmentation](https://help.postpilot.com/knowledge/segmentation?hsLang=en)
- [Flows](https://help.postpilot.com/knowledge/flows?hsLang=en)
- [Coupons](https://help.postpilot.com/knowledge/coupons?hsLang=en)
- [Campaigns](https://help.postpilot.com/knowledge/campaigns?hsLang=en)
- [Account & Billing](https://help.postpilot.com/knowledge/account-billing?hsLang=en)
- [General](https://help.postpilot.com/knowledge/general?hsLang=en)

[![PostPilot, Primary - Color, Dark-1](https://help.postpilot.com/hs-fs/hubfs/PostPilot%2c%20Primary%20-%20Color%2c%20Dark-1.png?width=113&height=15&name=PostPilot%2c%20Primary%20-%20Color%2c%20Dark-1.png "PostPilot, Primary - Color, Dark-1")](https://app.postpilot.com)

© 2022 PostPilot, Inc. All rights reserved.

Copyright © 2026, PostPilot, Inc.