Direct mail API for developers and growth teams. Read the docs →

Business thank you cards by API: a printed card for every new customer

Business thank you cards work best when they arrive soon after the moment they’re for, and that’s the part nobody keeps up by hand. Sent through a direct mail API, the card goes out on its own when a customer places a first order, signs a contract or has a job finished: a printed 6x9 postcard with their name and, if you like, a code for next time, for $0.89 with postage. Below: which event sends it in the systems you already use, what the card can say by USPS Marketing Mail, what it costs, and the code.

On this page
  1. When to send business thank you cards by API
  2. What a business thank you card says, by Marketing Mail via API
  3. Code: mail business thank you cards to yesterday’s new customers by API
  4. What business thank you cards cost by API
  5. How to tell whether thank you cards by API bring customers back
  6. Business thank you card questions from API senders

When to send business thank you cards by API

Shopifyorders/paidHubSpotDeal: Closed wonJobberJOB_CLOSEDGoHighLevelTag: send-thank-youPOST /v1/postcards tmpl_thank_youOne thank-you card
The moment is already in your systems. An order, a won deal or a finished job fires an event, and the event sends one card. An Idempotency-Key built from the record’s id means a repeated event never sends a second card.

Every business has a moment worth a thank-you, and most already record it somewhere. These are the events Mailr’s integration pages use:

SystemThe eventWhat it sends
Shopifyorders/paid on a first orderThe 6x9 thank-you card
WooCommerceA first order marked completedThe 6x9 thank-you card
HubSpotA deal moves to Closed wonA welcome letter, mailed flat
SalesforceAn opportunity changes to Closed WonA welcome letter, mailed flat
JobberJOB_CLOSEDA card a few days after the job
GoHighLevelA tag such as send-thank-youThe 6x9 thank-you card

No code at all? Zapier can send the card from a new paid order. And if a customer came to you through someone else, thank the person who sent them too: a card to the referrer when the referred customer’s first order ships.

What a business thank you card says, by Marketing Mail via API

Name and thanks“Ada, thanks for your first order.”Marketing MailWhat they bought, with an offer“Enjoy the Trail Pack. Your next order is 15% off with ADA15.”Marketing MailA handwritten noteWritten by hand, or typed on each cardFirst-Class only
What a thank-you card can say by Marketing Mail. The name and a thanks printed for everyone are fine. Details about what one customer bought need an offer on the card that they support. A handwritten note has to go First-Class.

Mailr’s thank-you template is a 6x9 card with two fields: the first name on the front, up to 14 characters, and a code for the next order on the back, up to 12. Your own design can say more, within what USPS Marketing Mail allows:

  • The name and a thank-you printed the same for everyone are fine on any card.
  • Details about one customer, such as the product they bought or the job you did, count as personal information. Marketing Mail allows them only on a card that advertises something for sale, such as the code for next time, and only when the details are there to support that offer.
  • Handwritten or typewritten notes have to go First-Class Mail, which Mailr doesn’t send. A handwriting-style font is printed, so it’s fine.

Which fields are worth changing on each card is in personalized direct mail, and what goes on each side in direct mail design.

Code: mail business thank you cards to yesterday’s new customers by API

If your system can call a webhook, send each card from the event itself, as in the Shopify guide. If it can only export, run this once a day: it takes yesterday’s first-time customers, skips anyone already thanked, and mails the 6x9 template with a code of their own.

# Nightly. new_customers.csv: yesterday's first-time customers, exported from your store, CRM or billing system:
#   id, name, first_name, line1, line2, city, state, zip
# thanked.csv: ids already sent a card (this script appends to it)
import csv, datetime, os, requests

today = datetime.date.today().isoformat()
thanked = set()
if os.path.exists("thanked.csv"):
    with open("thanked.csv", newline="") as f:
        thanked = {row[0] for row in csv.reader(f)}

with open("new_customers.csv", newline="") as f:
    todo = [c for c in csv.DictReader(f) if c["id"] not in thanked]

for n, start in enumerate(range(0, len(todo), 1000)):
    chunk = todo[start:start + 1000]
    r = requests.post("https://api.mailr.dev/v1/batches", timeout=120,
        headers={"Authorization": f"Bearer {os.environ['MAILR_API_KEY']}",
                 "Idempotency-Key": f"thanks-{today}-{n}"},  # a re-run the same day never sends twice
        json={"kind": "postcard", "size": "6x9", "template": "tmpl_thank_you", "verify": True,
              "recipients": [{"to": {"name": c["name"][:40], "line1": c["line1"], "line2": c["line2"] or None,
                                     "city": c["city"], "state": c["state"], "zip": c["zip"]},
                              "merge": {"first_name": (c["first_name"] or "friend")[:14],
                                        "promo_code": f"THX-{c['id']}"[:12]}}
                             for c in chunk],
              "description": f"Thank-you cards {today}"})
    if r.status_code == 422:  # the error names the row to fix; nothing in this batch was sent
        print("batch", n, r.json()["error"]["message"])
        continue
    r.raise_for_status()
    with open("thanked.csv", "a", newline="") as f:
        csv.writer(f).writerows([c["id"]] for c in chunk)
    print(r.json()["id"], r.json()["count"], r.json()["price"])
Run it with an mlr_test_ key first: every card is checked, priced and proofed, and nothing prints or charges.

What business thank you cards cost by API

New customers a month4x66x9
50$42.50$44.50
100$85.00$89.00
250$212.50$222.50
500$425.00$445.00

Pay as you go prices, with printing in full color on both sides, addressing and postage. Checking each address first with "verify": true is extra. Prices on plans are on the pricing page.

How to tell whether thank you cards by API bring customers back

Give every card its own code, as the script does with THX- and the customer id, and count the codes used at checkout. To see what the cards add on top of customers who’d have come back anyway, leave a random tenth of new customers without a card for a month and compare, the way direct mail campaign sets up a holdout.

Business thank you card questions from API senders

When should a business send a thank you card?

Soon after the moment you're thanking them for: the first order, the signed contract, the finished job. A daily job or an event handler sends it the same day, and USPS Marketing Mail takes 3 to 10 business days from there.

Should a thank you card include a discount?

It doesn't have to. A code on the card is how you tell who came back because of it, and it's what lets the card mention what they bought when it goes by Marketing Mail.

Can the cards be handwritten?

Mailr prints them, in any font you choose, including a handwriting-style one. Notes written by hand have to go First-Class Mail; the trade-offs are in handwritten letter services.

Can I send thank you cards to other businesses?

Yes. Add the company name to the address, and send a card when a deal closes or a contract renews.

How much do business thank you cards cost?

$0.85 for a 4x6 and $0.89 for a 6x9 on pay as you go, printing and postage included. Plans cost less per card.

START SENDING

Put your first postcard in the mail

Create a key, send a test to yourself, and check the proof before anything prints.

Start sending
  • Postcards, flats and folded mailers
  • A proof before anything prints
  • Free test mode: nothing prints, nothing charges
  • A status for every piece

Free price sheet

Get the price sheet by email

Every postcard, letter, mailer and print product on every plan, with postage included.

We’ll email you the price sheet. By continuing you agree to the Terms and Privacy Policy.

Download the template kit?

mailr-kit.zip · about 310 KB · 59 text files

Only HTML, JSON and Markdown files. No programs, scripts or macros, nothing that installs or runs.