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

Intelligent Mail barcode (IMb): what it encodes and how API mail is tracked

The Intelligent Mail barcode (IMb) is the 65-bar USPS barcode on letters, cards and flats. It holds up to 31 digits: a 20-digit tracking code that identifies the mailer and the piece, and up to 11 digits of routing that say where it’s going. USPS sorting machines read it, and every read becomes a scan event, which is how mail gets tracked. When you mail through Mailr, the barcode is printed on each piece for you and its scans come back as statuses and webhook events.

On this page
  1. What the Intelligent Mail barcode encodes for API mail, field by field
  2. Mailer IDs and the 45-day rule for API mail
  3. How IMb scans become API tracking statuses
  4. Where the IMb goes on a postcard or letter mailed by API
  5. Informed Delivery, the IMb and API mail
  6. Intelligent Mail barcode questions from API senders

What the Intelligent Mail barcode encodes for API mail, field by field

Each of the 65 bars is in one of four states: full, ascender, descender or tracker. Read together, they carry up to 31 digits in five fields:

00Barcode ID2 digits270Service type3 digits123456Mailer ID6 or 9 digits000123456Serial number9 or 6 digits85004123402Routing (ZIP+4 + delivery point)0, 5, 9 or 11 digits
65 bars, up to 31 digits. The first four fields are the 20-digit tracking code that identifies the mailer and the piece; the routing code says where it goes. The digits here are an example.
FieldDigitsWhat it holds
Barcode Identifier2A presort identifier; the second digit is 0 to 4
Service Type Identifier3The mail class and the services requested
Mailer ID6 or 9The mailer, assigned by USPS
Serial Number9 or 6The piece, numbered by the mailer
Routing code0, 5, 9 or 11The ZIP, ZIP+4, or ZIP+4 plus a delivery point

The first four fields make the 20-digit tracking code. A 6-digit Mailer ID leaves room for a 9-digit serial number and a 9-digit Mailer ID for 6, so the total stays 20. The IMb replaced USPS’s older POSTNET and PLANET barcodes, and it has been required for automation letters since January 27, 2013. What the ZIP+4 and delivery point digits mean is in ZIP+4 lookup.

Mailer IDs and the 45-day rule for API mail

USPS assigns Mailer IDs by volume. A mailer sending more than 10 million pieces a year gets a 6-digit ID; smaller mailers get 9 digits, assigned when they register on USPS’s Business Customer Gateway. For Full-Service mail, each barcode has to stay unique for at least 45 days, so a mailer can’t reuse a serial number on two pieces mailed weeks apart. What else mailing on your own permit takes is in USPS direct mail.

When you send through a mail API, all of this sits on the other side of the request. You send an address and a design; the barcode, its Mailer ID and its serial number are printed on the piece for you. The presort markings printed next to the postage are explained in presorted standard mail.

How IMb scans become API tracking statuses

USPS collects the scans in Informed Visibility. It covers letter and flat pieces as well as the bundles and containers they travel in, with the handling events machines record and delivery events USPS works out from its own rules. Letters and cards don’t get a physical “delivered” scan: USPS infers delivery from carrier data instead.

USPS sorting machine reads the IMbpostcard.in_transitpostcard.processed_for_delivery
Every read is a scan. USPS sorting machines read the barcode, and Mailr turns those scans into statuses and webhook events. Letters and cards get no physical “delivered” scan.

Mailr follows each piece through six statuses: queued, rendered, printed, mailed, in transit and processed for delivery. The last two come from USPS scans of the barcode. Each one is also a webhook event, postcard.in_transit or flat.processed_for_delivery for example, so your app hears about it without polling. The full list is in the API reference.

Where the IMb goes on a postcard or letter mailed by API

On cards and letter-size pieces, USPS keeps a barcode clear zone in the lower right of the address side: 4-3/4 inches wide and 5/8 inch tall. An automation letter can carry its IMb there or inside the address block. Mailr prints it inside the blank address block of each design, next to the address and postage, so the artwork never has to leave room for it. The sizes of that block are in USPS postcard size requirements.

Informed Delivery, the IMb and API mail

USPS Informed Delivery emails people grayscale images of the address side of their incoming letter-size mail, free. The barcode’s delivery point code is what ties a scanned piece to a household. Mailers can attach an interactive campaign to their pieces, a clickable image with an HTTPS link shown next to the scan, registered with USPS against a Mailer ID.

Intelligent Mail barcode questions from API senders

Do I need my own Mailer ID to mail through an API?

Not with Mailr. The Intelligent Mail barcode is printed on every piece for you, in the block your design leaves blank for the address.

Does the IMb show when a postcard is delivered?

Not with a scan. Letters and cards get no physical delivered scan; USPS's Informed Visibility can add delivery events it works out from carrier data. Mailr reports the scans USPS makes: in transit and processed for delivery.

Is the IMb the same as POSTNET?

No. The IMb replaced the POSTNET and PLANET barcodes, combining what both carried, and USPS has required it for automation letters since January 27, 2013.

What do the bars mean?

Each of the 65 bars is in one of four states: full, ascender, descender or tracker. Together they encode up to 31 digits.

Can people see my mail before it arrives?

Yes, if they use USPS Informed Delivery: it emails grayscale images of the address side of incoming letter-size mail, matched to their address through the barcode.

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.