Intelligent Mail Barcode (IMb)
The Intelligent Mail Barcode is the 65-bar USPS barcode printed on every piece of automation-eligible mail that encodes routing, sender ID, and a unique piece-level serial number, and that is scanned at every USPS sortation point in transit.
Acronym for: Intelligent Mail Barcode Also known as: IMb, OneCode
The Intelligent Mail Barcode — IMb for short, occasionally still called OneCode in older USPS documentation — is the 65-bar barcode USPS prints on, or accepts on, every piece of automation-eligible First-Class and Marketing Mail. It encodes 31 digits of information across four fields: a routing code (the ZIP+4 plus delivery point), a service type identifier, a mailer identifier, and a unique serial number per piece. Every time a USPS sortation machine reads the barcode — and they read every piece, every machine, every facility — the scan goes into a centralized log USPS exposes to the mailer through the Informed Visibility feed. That feed is the foundation of every modern direct mail tracking, attribution, and trigger workflow.
How we got here
USPS launched IMb in 2009 as the replacement for two older barcodes — POSTNET (the routing barcode that had been on automation mail since the 1980s) and PLANET (a tracking barcode rolled out in the early 2000s). The two-barcode setup was wasteful: machines had to read two codes per piece, the codes lived in different positions, and neither one carried enough digits to give every piece a globally unique identifier. IMb collapsed both functions into a single 65-bar code that fit in a smaller footprint, encoded more data per piece, and let USPS retire the old barcodes on a defined schedule. By 2013 IMb was effectively required for any mailer claiming automation discounts. The full retirement of POSTNET and PLANET concluded later that decade.
How it actually works
The barcode itself is a vertical stack of 65 bars, each in one of four heights (full, ascender, descender, tracker), encoding 31 decimal digits via a defined mathematical mapping. Those 31 digits split into four fields: a 5-digit Barcode Identifier (which presort tier and service class), a 6-digit Service Type Identifier (STID — what kind of services are requested for this piece, including Informed Visibility), a 6-digit Mailer Identifier (MID — assigned by USPS, identifies the entity originating the piece), and a 9-digit Serial Number (unique per piece per MID per mailing). Append the routing code — ZIP, ZIP+4, or full delivery point — and you have a code that uniquely identifies this exact piece of mail to USPS systems.
What happens after it’s printed is the part that actually drives marketing value. Every USPS sortation machine reads the IMb on every piece that passes through, multiple times per piece across the network — entry sortation, network transit, destination sortation, delivery unit. Each scan is logged with a timestamp, a facility code, and the piece’s identifier. USPS exposes that scan stream to the mailer through Informed Visibility, an API feed that delivers near-real-time scans. A mailer with the right plumbing knows when a piece left the origin facility, when it cleared the destination facility, and when it’s out for delivery — usually 4 to 24 hours before the piece hits the box.
What goes in, what comes out
Input: the four IMb fields plus the recipient’s routing code, encoded and rendered into the 65-bar pattern, printed on the mail piece in a USPS-approved position (typically the address block or the IMb-specific clear zone). Output: every scan event that piece generates as it moves through the USPS network, exposed through the Informed Visibility feed in near-real-time. The Mailer ID and Serial Number together let the mailer reconcile each scan back to the specific recipient, the specific list, and the specific campaign — which is what makes piece-level attribution possible.
Common pitfalls
The first pitfall is reusing serial numbers across drops or campaigns. The 9-digit serial space is not infinite, and most platforms assume serial numbers don’t collide within a 45-day window — the window USPS keeps scan history for. A list with reused serials produces unattributable scans, which means broken tracking. The second pitfall is leaving the Service Type Identifier on a default. The STID controls which services USPS actually applies to the piece — whether Informed Visibility is on, whether Informed Delivery preview is requested, whether the piece is eligible for return-to-sender treatment. Most teams discover this only after the first drop comes back with no scan data. The third pitfall is print quality: a smudged or compressed IMb fails to scan, which means the piece still delivers but produces no visibility events — effectively invisible to the marketing layer.
How DirectMail.io runs it
DirectMail.io generates the IMb for every piece on every drop, applies the right Service Type Identifier for the campaign (Informed Visibility on by default for any drop using USPS Scan Triggers), and ingests the resulting scan stream from the Informed Visibility feed back into the campaign record. The platform reconciles each scan to the originating piece, the recipient, and the campaign in real-time, which is what enables the trigger workflows. For the long-form mechanics of every field in the barcode, see the IMb explainer.
When to use this
- Anytime you want piece-level visibility. The IMb is the only USPS-supported way to track an individual mail piece through the network. Vendor-specific tracking workarounds don’t generalize.
- Anytime you want to build triggered workflows on the back of mail. Scan-triggered email, scan-triggered SMS, scan-triggered audience updates — all of them are built on the IMb scan stream.
- For automation discounts. Properly encoded IMb is a precondition of automation postage. Mail without it pays a meaningfully higher per-piece rate.