
Building Automated Thank-You Campaigns with InkCourier API
For businesses that want full control over when, how, and why handwritten cards are sent, the InkCourier API offers a direct integration path. Instead of relying on third-party automation tools, your application can trigger cards programmatically in response to any event: a purchase, a subscription milestone, a support ticket resolution, or any custom logic you define.
API Overview
The InkCourier API is a RESTful JSON API with a straightforward resource model. The primary endpoint for sending cards is:
POST https://api.inkcourier.com/v1/cards
Each request creates a single card order. The payload includes recipient information, the card message, and optional parameters for card design, handwriting style, and delivery preferences. Authentication is handled via a Bearer token passed in the Authorization header.
A basic request payload looks like this:
{
"recipient": {
"first_name": "Sarah",
"last_name": "Chen",
"address_line_1": "742 Evergreen Terrace",
"city": "Springfield",
"state": "IL",
"zip": "62704"
},
"message": "Dear Sarah, thank you for your recent purchase...",
"card_design": "classic-thank-you",
"handwriting_style": "elegant"
}
The API responds with a card order ID that you can use to track the card through production, quality review, and mailing. Delivery status updates are available via polling or webhook.
Webhook Integration
The most powerful way to use the InkCourier API is in conjunction with webhooks from your existing systems. A webhook is an HTTP callback that your application sends when a specific event occurs. By pointing these webhooks at a small middleware service or serverless function, you can transform business events into handwritten card orders.
Common Webhook Sources
- E-commerce platforms (Shopify, WooCommerce, BigCommerce): Fire a webhook on "order completed" to trigger a thank-you card.
- Payment processors (Stripe, Square): Fire on "subscription created" or "invoice paid" to welcome new subscribers or thank repeat customers.
- Support platforms (Zendesk, Intercom): Fire on "ticket resolved" to follow up with a card after a support interaction.
- Custom applications: Fire webhooks from your own backend whenever a user reaches a milestone, refers a friend, or completes onboarding.
Middleware Pattern
The recommended architecture is a lightweight middleware function that receives the webhook, extracts the relevant data, transforms it into the InkCourier API payload format, and sends the request. This can be implemented as a serverless function on AWS Lambda, Google Cloud Functions, Vercel, or a similar platform.
The middleware handles several responsibilities:
- Data transformation: Maps fields from the source webhook to InkCourier's expected format.
- Message templating: Inserts dynamic data into your card message template.
- Validation: Checks that the recipient has a valid mailing address before sending the request.
- Deduplication: Ensures the same customer does not receive multiple cards for the same event.
- Logging: Records every card order for audit and analytics purposes.
Campaign Design Patterns
Simple Thank-You on Purchase
The most common pattern is a single card triggered by a purchase event. The webhook fires when an order is completed, the middleware looks up the customer's address and purchase details, and sends a personalized thank-you card. This pattern works well for e-commerce businesses, subscription services, and any company with a clear purchase event.
Tiered Campaigns
For businesses that want to differentiate their card program by customer value, a tiered approach works well. The middleware evaluates the order value or customer lifetime value and selects a different card design, message, or even card type based on the tier.
- Standard tier: Orders under $100 receive a postcard-style thank you.
- Premium tier: Orders between $100 and $500 receive a folded card with a personalized message.
- VIP tier: Orders above $500 receive a premium card with a handwritten note from the founder.
Milestone-Based Campaigns
Some of the most effective thank-you campaigns are triggered not by a single event but by a milestone. For example:
- A customer's 5th purchase triggers a loyalty thank-you card.
- A user's 1-year anniversary with the platform triggers an appreciation card.
- A subscriber who refers their 3rd friend receives a "super referrer" card.
Milestone triggers require your middleware to maintain state, either by querying your database or by using InkCourier's campaign rules to track progress toward thresholds.
Message Personalization
The InkCourier API supports dynamic message fields, allowing you to build templates with placeholders that are populated at send time. For example:
"message": "Dear {{first_name}}, thank you for being a customer
for {{tenure_months}} months. Your support means the world to us.
We look forward to many more {{product_category}} adventures together.
Warmly, The {{company_name}} Team"
The more relevant data you pass to the API, the more personal each card feels. Customers who receive a card that references their specific purchase, their tenure, or their name are far more likely to respond positively than those who receive a generic thank-you.
Delivery Status and Tracking
InkCourier provides webhook callbacks for card lifecycle events:
- card.created: The order has been received and queued for production.
- card.in_production: The card is being handwritten.
- card.mailed: The card has entered the postal system.
- card.delivered: The card has been confirmed delivered (where tracking is available).
By subscribing to these webhooks, your application can log the delivery status back into your CRM or customer profile, providing a complete record of the card's journey.
Measuring Campaign Impact
To measure the effectiveness of your API-driven thank-you campaigns, implement tracking at two levels:
Direct response tracking: Include a unique URL or QR code in your card message that links to a dedicated landing page. Track visits, conversions, and revenue generated from that page.
Cohort analysis: Compare customers who received cards with a randomly selected control group who did not. Measure differences in retention, repeat purchase rate, referral rate, and lifetime value over 30, 60, and 90-day periods.
The InkCourier dashboard provides campaign-level analytics including total cards sent, delivery success rate, and response metrics when tracking URLs are used. Combine this data with your own backend analytics for a comprehensive view of campaign performance.
The InkCourier API gives your engineering team the flexibility to build a handwritten card program that fits your exact business logic. Whether you are sending 50 cards a month or 5,000, the API handles production, quality assurance, and mailing so your team can focus on building the triggers and templates that make each card meaningful. Explore the InkCourier API documentation and start building your automated thank-you campaign today.
Ready to send your first handwritten card?
Start making lasting impressions with real pen-and-ink cards delivered to your customers.
Get Started Free