On this page
What CASS-certified address verification checks for an API mailing
USPS certifies the software, not the address list. To be certified, a product has to code a USPS test file of about 150,000 addresses with at least 98.5% accuracy on ZIP+4, carrier route and five-digit ZIP, and 100% on delivery point coding. The current certification period is Cycle O, valid through July 31, 2028.
A CASS check does more than say yes or no. It returns the address in USPS’s standard form and adds the codes USPS sorts by. Certified products also include these USPS data sets: USPS’s own address API, which needs a paid license since August 2026, is covered in USPS address verification API.
- DPV (Delivery Point Validation): whether the address is in USPS’s delivery file as a known address.
- LACSLink: the new address for rural-style addresses converted to city-style, mostly for 911 service.
- SuiteLink: the suite number for a business address that was missing one.
DPV codes an address API returns
"verify": true stops only on N; read the code yourself to hold S and D.| DPV code | What USPS means | Mailr’s deliverability | What to do |
|---|---|---|---|
Y | Confirmed, including any apartment or suite | deliverable | Mail it |
S | Building confirmed; the apartment or suite sent wasn’t valid | deliverable_incorrect_unit | Check the unit first |
D | Building confirmed; it needs an apartment or suite that’s missing | deliverable_missing_unit | Get the unit first |
N | The street number isn’t a known delivery point | undeliverable | Don’t mail |
Two flags come with the code. Vacant means the address was active but is now empty, in most cases unoccupied for over 90 days; hold it. CMRA means a commercial mail receiving agency, a private business that receives mail for its clients, like a mailbox store. Mail there arrives, but it isn’t a home. Private mailbox addresses get their own footnotes, covered in CMRA addresses.
What happens to a bad address in an API mailing
For USPS Marketing Mail with no endorsement, a piece USPS can’t deliver is disposed of. You paid for the print and the postage, and nothing comes back to tell you. That’s why the check belongs before the send, not after.
With "verify": true on a postcard, flat or batch, Mailr checks every address before anything is created. If any address comes back undeliverable, the whole request is rejected with a 422 naming the bad recipients, and nothing is created or charged. If they all pass, each piece is mailed to the standardized address.
How to verify addresses with an API before you mail
"verify": trueon a send is one step. It stops on undeliverable addresses only; vacant addresses and missing apartment numbers still mail.POST /v1/addresses/verifychecks up to 1,000 addresses and returns each one’sdeliverability, the standardized address with ZIP+4, whether it’s residential, the vacant flag and the DPV footnotes. Use it when you want to hold vacant addresses or ask customers for a missing unit.
Both cost 7¢ an address on pay as you go. With a test key the check is a free simulation: any address with “undeliverable” in its first or second line fails, so you can test both paths. Each result also carries the ZIP+4, explained in ZIP+4 lookup.
# Check a list before you mail it. customers.csv: id, name, first_name, line1, line2, city, state, zip
import csv, os, requests
API = "https://api.mailr.dev/v1"
H = {"Authorization": f"Bearer {os.environ['MAILR_API_KEY']}"}
with open("customers.csv", newline="") as f:
rows = list(csv.DictReader(f))
send, fix, hold = [], [], []
for start in range(0, len(rows), 1000): # one verify call takes up to 1,000 addresses
chunk = rows[start:start + 1000]
res = requests.post(f"{API}/addresses/verify", headers=H, timeout=60, json={"addresses": [
{"name": r["name"][:40], "line1": r["line1"], "line2": r["line2"] or None,
"city": r["city"], "state": r["state"], "zip": r["zip"]} for r in chunk]})
res.raise_for_status()
for r, v in zip(chunk, res.json()["data"]):
if v["deliverability"] == "undeliverable" or v["vacant"]:
hold.append(r)
elif v["deliverability"] in ("deliverable_missing_unit", "deliverable_incorrect_unit"):
fix.append(r) # ask the customer for the apartment or suite
else:
send.append({"to": {**v["address"], "name": r["name"][:40]}, "merge": {"first_name": r["first_name"][:14]}})
print(len(send), "to mail,", len(fix), "to fix,", len(hold), "held")
# send holds standardized addresses (ZIP+4 included), so the batch doesn't need "verify" again.
for n, start in enumerate(range(0, len(send), 1000)):
b = requests.post(f"{API}/batches", headers={**H, "Idempotency-Key": f"checked-list-{n}"}, timeout=60, json={
"kind": "postcard", "size": "6x9", "template": "tmpl_thank_you",
"merge": {"promo_code": "TRAIL15"}, "recipients": send[start:start + 1000]})
b.raise_for_status()
print(b.json()["id"], b.json()["count"], b.json()["price"])What CASS can’t tell you about an API mailing list
- Who lives there. USPS says DPV doesn’t confirm the owners, occupants or residents at an address. A valid address can still be the wrong person: that’s what NCOA is for.
- The fix. DPV doesn’t add missing data or correct anything. It tells you the apartment is missing; you still have to get it.
- How good your file is overall. CASS processing doesn’t measure the accuracy of the codes in your list, only matches each address it’s given.
Address verification questions from API senders
Is CASS required to mail?
Not for every piece, but USPS requires CASS-certified address matching for mail sent at automation prices, in both First-Class Mail and USPS Marketing Mail. Even where it isn't required, it's the cheapest way to stop paying for mail that can't arrive.
What does Mailr's address check use?
Smarty's US Street API, which matches each address against USPS data. USPS publishes the vendors that hold CASS certification in its CASS Certified Products Guide on PostalPro.
What does a check cost?
7¢ an address on pay as you go and 6¢ on Agency, whether you add "verify": true to a send or call POST /v1/addresses/verify. Test keys get a free simulation.
Does CASS tell me if the person still lives there?
No. USPS says DPV doesn't confirm who lives at an address. For people who moved, run the list through NCOA.
What happens to a piece sent to a bad address?
USPS Marketing Mail that can't be delivered and carries no endorsement is disposed of by USPS. You don't get it back, and you don't hear about it.