On this page
Direct mail design for the front of an API postcard
- One headline. Short, large and about them. Mailr’s own templates set headlines between 0.42 and 0.64 inch tall.
- One picture. The product they bought, the place, the people. A collage of five photos says nothing at a glance.
- The offer, with an end date and the person’s own code.
- What to do next: a short link, a QR code or a phone number. Pick one.
If the headline holds a name, design for the longest one. A first_name can be up to 14 characters, so check the proof with a long name as well as a short one. Which fields are worth changing per card is in personalized direct mail.
Direct mail design for the back, around the API address block
The back of a postcard has a block in the lower right that stays blank: 4 x 2.375 inches (3.2835 x 2.375 on a 4x6), 0.15 inch from the right edge and 0.125 inch from the bottom. Mailr prints the return address, the recipient’s address, the postage and the Intelligent Mail barcode inside it. On an 8.5x11 flat the same block sits at the top right, 0.25 inch in from the top and right edges.
The rest of the back is yours: the details the front left out, the code again, opening hours, a map, the QR code. Keep all of it out of the block, and keep the word “Postcard” off the design: a piece marked that way has to go First-Class, and Mailr mails USPS Marketing Mail.
Print rules for API designs: bleed, safe area and type
- Bleed. The page is the card plus 0.125 inch on every side, so a 6x9 is a 9.25 x 6.25 inch page. Backgrounds and pictures run to the page edge; the extra is cut off.
- Safe area. Text and logos stay at least 0.125 inch inside the cut. The page size for every card is in USPS postcard size requirements.
- No thin borders near the edge. A cut a hair off shows on a border; it doesn’t on a picture that runs off the card.
- Type size. Mailr’s templates set body text between 9.5 and 12.5 point. Smaller than that gets hard to read on paper.
- Contrast. Light text over a photo needs a dark, quiet part of the photo or a solid panel behind it.
- Color. Presses print with four inks, so a very bright screen color, such as a neon green or an electric blue, can come out duller on paper than on screen.
Designing in HTML for a direct mail API
The quickest start is a template’s front.html and back.html, which have the page size, the bleed, the safe area and the address block already set. A design of your own looks like this:
<!doctype html>
<html><head><meta charset="utf-8">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap" rel="stylesheet">
<style>
@page { size: 9.25in 6.25in; margin: 0; } /* a 6x9 card plus 0.125in of bleed on every side */
* { box-sizing: border-box; margin: 0; }
html, body { width: 9.25in; height: 6.25in; }
body { position: relative; overflow: hidden; font-family: Inter, Arial, sans-serif;
-webkit-print-color-adjust: exact; print-color-adjust: exact; }
.bleed { position: absolute; inset: 0; /* the picture runs past the cut */
background: #1e1530 url("https://example.com/mail/trail.jpg") center / cover; }
.safe { position: absolute; inset: 0.25in; } /* bleed + 0.125in: text stays inside this */
h1 { max-width: 5in; font-size: 0.5in; line-height: 1.05; font-weight: 700; color: #fff; }
.offer { position: absolute; left: 0; bottom: 0; padding: 0.12in 0.2in; border-radius: 0.08in;
background: #fff; font-size: 14pt; font-weight: 700; }
</style></head>
<body>
<div class="bleed"></div>
<div class="safe">
<h1>Your trail pack misses you, {{first_name}}</h1>
<p class="offer">15% off with {{promo_code}}</p>
</div>
</body></html>- Fonts and images load from public https links. Google Fonts works, and images have to stay online until the card prints.
- Each side can be up to 500 KB of HTML, so pictures go in as links, not pasted in.
- Merge tags such as
{{first_name}}are filled with each person’s values as plain text, anywhere in the HTML.
Send it with a test key to /v1/postcards, or as a batch, and open the proof in the dashboard. The request fields are in the API reference.
Designs from Figma, Canva or images by API
If the artwork is already made, export each side as a PNG, JPEG or WebP at the card’s proportions with the bleed included, put it at an https link, and send it as front_image and back_image. Print shops usually ask for 300 pixels per inch, which makes a 6x9 with bleed 2,775 x 1,875 pixels. Mailr keeps the back’s address block white, so the address always prints on white. An image design prints the same on every card, though: to put a name or a code on it, the design has to be HTML.
Direct mail design questions from API senders
What file format does a direct mail API take?
Mailr takes a template id, your own HTML for each side (up to 500 KB, with merge tags), or https links to PNG, JPEG or WebP images at the card's proportions with bleed.
Can I use my own fonts?
Yes, from any public https link. Google Fonts works; so does a font file on your own site.
Can the person's name go on the picture?
In an HTML design, yes: set the text over the image and the name is merged in. A design sent as an image prints exactly as the image, so nothing on it can change per person.
Do I need to leave room for the postage and return address?
Leave the address block blank. Mailr prints the return address, the recipient's address, the postage and the barcode inside it.
What size should a direct mail postcard be?
A 6x9 suits most single offers. Use a 4x6 for a short message and a 6x11 when the card has to carry more. Prices and what each size is good for are in postcard marketing.