All templates
Win-back
For customers who haven’t ordered in a while. Only sent if they don’t come back on their own.
Mailr prints
On every piece, in our layout. You send the data, not the design.
- The recipient’s name and address from
to, in our font, inside the address block at the bottom right of the back. - Your return address from
from(required), at the top of the address block. - Postage and the USPS Intelligent Mail barcode, inside the address block.
You can add
In your own style, outside the keep-clear zones.
- Your logo, colors, fonts and images anywhere outside the address block (PNG or JPG at 300 DPI; fonts as TTF, WOFF, WOFF2 or Google Fonts; all on public https URLs).
- Your own business address, phone or website in your own style. On the back keep it outside the address block; on the front keep it above the bottom 2.375 in, or use light text on a dark background.
- Personal touches from merge fields: first name, offer codes, product names, links. Any {{tag}} you add is filled from merge.
- A QR code at least 1 in wide, inside the safe area and outside the address block.
Don’t add
USPS can reject it, or it gets covered.
- Stamps, permit imprints, “postage paid” or “nonprofit org.” marks, or anything that looks like them. Mailr prints the right indicia for the mail class.
- Barcodes that look like USPS barcodes.
- The recipient’s address anywhere else on the card.
- Sensitive personal data: account numbers, amounts, health or money details. It mails without an envelope, so anyone handling the card can read it.
- Crop marks or printer marks.
- Anything inside the address block. A white box is printed over it.
Design files
Print-ready HTML your agent can fetch, copy into your repo and edit. Keep the page size, the safe area and the keep-clear zones.
Agent prompt
Paste it into Claude Code, Cursor or Codex. It points your agent at the files above.
Add the Mailr "Win-back" postcard to this app.
1. Read the spec first: https://mailr.dev/templates/tmpl_winback/template.json
It has the trim size, bleed, safe area, the keep-clear zone and a max_length for every merge field.
2. Design files (print-ready HTML at true size, with {{merge}} tags):
https://mailr.dev/templates/tmpl_winback/front.html
https://mailr.dev/templates/tmpl_winback/back.html
To use the design as-is, send template: "tmpl_winback".
To change it, save both files in this repo (mail/tmpl_winback/), edit them, keep the page size, bleed, safe area,
keep-clear zone and merge tags, and send the HTML as front and back instead of template.
Follow "content" in the spec: Mailr prints the recipient address, return address (from), postage and barcode,
so never draw those in the design. Logos, fonts, images, QR codes and your own contact details are fine.
3. Trigger: when a customer’s last order is 60+ days old (Your database nightly job).
4. Call POST https://api.mailr.dev/v1/postcards with size: "6x11", to: the customer's mailing address,
from: this business's return address (required; set it once in config),
and merge: { first_name, promo_code, last_product } from the customer record. Check each value against max_length before sending.
5. Auth: Authorization: Bearer <MAILR_API_KEY>, read from the MAILR_API_KEY environment variable.
6. Save the returned id on the customer so the same person is never mailed twice for the same event.
7. Check delivery with GET https://api.mailr.dev/v1/postcards/{id} (status and events; webhooks are not available yet).
API reference for agents: https://mailr.dev/llms.txtPrint spec
- Trim size
- 11 × 6 in, landscape
- Bleed
- 0.125 in on every side (page 11.25 × 6.25 in)
- Safe area
- 0.125 in inside the trim
- Keep clear
- 4 × 2.375 in address block on the back, 0.15 in from the right edge and 0.125 in from the bottom
- Mails as
- Letter-size card: letter rate on First-Class and Marketing Mail (it’s larger than 6 × 9 in)
- Paper
- 100 lb silk cover, full color on both sides
- Fonts
- Inter (Google Fonts)
- Endpoint
- POST /v1/postcards
Merge fields
| Tag | Max | Example |
|---|---|---|
{{first_name}} | 14 | Marcus |
{{promo_code}} | 12 | PEAK15 |
{{last_product}} | 22 | Trail Pack 30L |
START SENDING
Put your first postcard in the mail
Create a key, send a test to yourself, and check the proof before anything prints.
- Postcards, flats and folded mailers
- A proof before anything prints
- Free test mode: nothing prints, nothing charges
- A status for every piece