All templates
Welcome letter
A letter-style 8.5×11 flat that lands a few days after signup. Feels personal, reads like a founder note.
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 panel at the top right of the back. - Your return address from
from(required), at the top of the address panel. - Postage and the USPS Intelligent Mail barcode, inside the address panel.
You can add
In your own style, outside the keep-clear zones.
- Your logo, colors, fonts and images anywhere outside the address panel (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 panel; on the front keep it out of the top half, or use light text on a dark background.
- A full letter’s worth of copy: the whole front and most of the back are yours.
- 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 panel.
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 flat.
- Sensitive personal data: account numbers, amounts, health or money details. It mails without an envelope, so anyone handling the flat can read it.
- Crop marks or printer marks.
- Anything inside the address panel. 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 "Welcome letter" flat to this app.
1. Read the spec first: https://mailr.dev/templates/tmpl_welcome/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_welcome/front.html
https://mailr.dev/templates/tmpl_welcome/back.html
To use the design as-is, send template: "tmpl_welcome".
To change it, save both files in this repo (mail/tmpl_welcome/), 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 new account confirms its email (Your app user.created).
4. Call POST https://api.mailr.dev/v1/flats with size: "8.5x11", to: the customer's mailing address,
from: this business's return address (required; set it once in config),
and merge: { first_name, company, founder_name } 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/flats/{id} (status and events; webhooks are not available yet).
API reference for agents: https://mailr.dev/llms.txtPrint spec
- Trim size
- 8.5 × 11 in, portrait
- Bleed
- 0.125 in on every side (page 8.75 × 11.25 in)
- Safe area
- 0.125 in inside the trim
- Keep clear
- 4 × 2.375 in address panel at the top right of the back. USPS wants a flat’s address in the top half
- Mails as
- Flat: USPS flat rate, no envelope
- Paper
- 100 lb silk cover, full color on both sides
- Fonts
- Inter, Caveat (Google Fonts)
- Endpoint
- POST /v1/flats
Merge fields
| Tag | Max | Example |
|---|---|---|
{{first_name}} | 14 | Priya |
{{company}} | 24 | Northwind |
{{founder_name}} | 16 | Sam |
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