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

NCOA for API mailings: what it is and when your list needs it

NCOA, the National Change of Address check, compares your mailing list with about 160 million change-of-address records filed with USPS and gives back the new address for people, families and businesses who moved. Run it on any list that hasn’t been updated in the last 95 days before you mail it. Mailr doesn’t run NCOA, so it happens before your list reaches the API: a USPS-licensed provider processes the file, and you send the updated addresses.

On this page
  1. What NCOA checks that an address API doesn’t
  2. How NCOA matching works on an API mailing list
  3. When to run NCOA before an API mailing
  4. How to run NCOA, then send the list through the API
  5. What NCOA can’t do for an API mailing list
  6. NCOA questions from API senders

What NCOA checks that an address API doesn’t

An address check and a change-of-address check answer different questions. An address check, like Smarty’s USPS verification or Mailr’s "verify": true, confirms that 2 Elm St, Phoenix is a real place USPS delivers to. NCOA tells you whether Ada Park, the person on your list at 2 Elm St, filed a change of address and where she went. USPS’s own API for the first kind is in USPS address verification API.

What that first check returns, code by code, is in CASS-certified address verification. A list can pass it and still be wrong. The house is real; the customer left two years ago. Every card sent there is printed, paid for and handed to whoever lives there now.

USPS builds the NCOA data from the change-of-address orders people and businesses file. Licensed companies get it on a schedule and match lists against it. You don’t buy the data; you send your file to one of them, or use software that has a license. If it’s your own business that’s moving, we’ve moved postcards covers filing one and telling your customers.

nameaddresscoderesult
Ada Park2 Elm St, PhoenixAMoved to 88 Oak Ave, Tempe
Sam Lee14 Pine Rd, Mesa02Moved, left no address
Lena Ortiz9 Bay Ct, Chandler00No change of address
J. RiveraPO Box 120, Gilbert03PO box closed
What comes back. Each record gets a USPS return code: a new address to mail, a move with no new address to drop, or no change. Names and addresses here are made up.

How NCOA matching works on an API mailing list

NCOA matches on name and address together, in three ways. An individual match needs the first name, middle name, surname and title to line up. A family match needs only the surname. A business match uses the business name. For lists you mail at commercial prices, USPS says to run it in its standard name-matching mode.

A match comes back with the new address and the month the move took effect. Every record also gets a return code. These are the ones you’ll see most:

CodeWhat USPS meansWhat to do before sending
A, 91, 92Matched, with a new addressMail the new address
00No change of address on fileMail the address you have
02Moved, left no addressStop mailing that record
03PO box closed, no forwarding orderStop mailing that record
01Moved out of the countryStop mailing that record
19New address can’t be confirmed, or a temporary moveHold it until you can confirm

How far back the data goes depends on the provider’s license. Full Service Providers get 48 months of moves. Limited Service Providers and companies licensed only for their own files get 18 months. For a list that sat unused for two years, ask for the 48-month data.

When to run NCOA before an API mailing

USPS has a rule for this called Move Update. For mail sent at commercial First-Class Mail or USPS Marketing Mail prices, the addresses must have been updated within 95 days before the mailing date, using an approved method such as NCOALink or USPS’s Address Change Service. Even when the rule isn’t yours to meet, the 95 days is a good line for your own lists:

  • A house list you mail a few times a year: run it before each mailing. A yearly donor file, like the one behind a nonprofit year-end appeal, needs it every time.
  • A list you bought: ask the seller when it was last run through NCOA. If they can’t say, run it yourself.
  • Addresses matched from an email list: treat them like a bought list, since they’re only as current as the matching service’s records. How that match works is in email to address lookup.
  • Addresses from this week’s orders or signups: the customer just typed them in, so there is nothing to update yet. An address check is enough.
  • Triggered mail that goes out the day something happens, like a thank-you after a first order: same as above.

How to run NCOA, then send the list through the API

  1. Pick a provider. USPS publishes its licensees on PostalPro, split into Full Service and Limited Service Providers. Each sets its own process and price, so compare a few.
  2. Sign the Processing Acknowledgement Form. A service provider has to have this form from the list owner before it can run your file. It’s renewed every year.
  3. Upload name and address columns. Keep your own record id in the file so the results map back to your data.
  4. Apply the return codes. Swap in new addresses, drop the moves that left no address, and store the date you ran it on each record.
  5. Send the list. Batches of up to 1,000 per request, with "verify": true if you also want each address confirmed as a delivery point (7¢ an address on pay as you go).
Your mailing listNCOA"verify": trueBatches of 1,000
Clean first, then send. NCOA updates people who moved; the address check confirms each address is a real delivery point; then the cleaned list goes out as batches.

The script below takes a provider’s results file, applies the codes from the table above and mails what’s left. It’s the same batch request as in the variable data printing guide, with the NCOA step in front.

# After NCOA. ncoa_results.csv comes back from your NCOALink provider with a USPS return code per row.
# Column names differ by provider: map yours to these.
# id, name, first_name, line1, line2, city, state, zip, ncoa_code, new_line1, new_line2, new_city, new_state, new_zip
import csv, os, requests

NEW_ADDRESS = {"A", "91", "92"}  # matched, and USPS gave a new address
DROP = {"01", "02", "03"}        # foreign move, moved and left no address, PO box closed
HOLD = {"19"}                    # new address can't be confirmed, or a temporary move

def addr(r, prefix=""):
    return {"line1": r[prefix + "line1"], "line2": r[prefix + "line2"] or None, "city": r[prefix + "city"],
            "state": r[prefix + "state"], "zip": r[prefix + "zip"]}

send, skipped = [], {"drop": 0, "hold": 0}
with open("ncoa_results.csv", newline="") as f:
    for r in csv.DictReader(f):
        code = r["ncoa_code"].strip()
        if code in DROP or code in HOLD:
            skipped["drop" if code in DROP else "hold"] += 1
            continue
        to = addr(r, "new_") if code in NEW_ADDRESS else addr(r)  # 00 and anything else: no move on file
        send.append({"to": {"name": r["name"][:40], **to}, "merge": {"first_name": r["first_name"][:14]}})

print(len(send), "to mail", skipped)
for n, start in enumerate(range(0, len(send), 1000)):  # one batch holds up to 1,000
    resp = requests.post(
        "https://api.mailr.dev/v1/batches",
        headers={"Authorization": f"Bearer {os.environ['MAILR_API_KEY']}",
                 "Idempotency-Key": f"spring-mailing-2026-{n}"},
        json={
            "kind": "postcard", "size": "6x9",
            "front": open("mail/front.html").read(), "back": open("mail/back.html").read(),
            "verify": True,  # also confirm each address is a real USPS delivery point
            "recipients": send[start:start + 1000],
            "description": f"Spring mailing after NCOA, part {n + 1}",
        },
        timeout=60,
    )
    resp.raise_for_status()
    print(resp.json()["id"], resp.json()["count"], resp.json()["price"])
Test it with an mlr_test_ key first: the batch is checked and priced, nothing prints, and nothing is charged.

What NCOA can’t do for an API mailing list

  • Moves nobody reported. NCOA only knows about change-of-address orders filed with USPS. Someone who moved without filing one still looks current. Leaving a private mailbox store is one of them: no change of address is filed, as explained in CMRA addresses.
  • Temporary moves. USPS doesn’t give out the new address when someone files a temporary change of address.
  • Old moves on 18-month data. A move from three years ago won’t show up unless your provider has the 48-month data.
  • New-mover lists. The form you sign says NCOALink may not be used to create or maintain new movers’ lists. For people who just moved into your area, use county sale records, as in the public records guide. More list sources are in targeted direct mail. Building one from recorded sales is covered in new homeowner mailing list.

NCOA questions from API senders

Does Mailr run NCOA on my list?

No. Mailr mails the addresses you send. Run NCOA with an NCOALink provider first, then send the updated list. Mailr can check each address against USPS data with "verify": true, but that confirms the address exists, not that your customer still lives there.

How often should I run NCOA?

Before each mailing of a list that hasn't been updated in the last 95 days. That is the window USPS uses in its Move Update standard for commercial First-Class Mail and USPS Marketing Mail prices, and it's a sound rule for any house list.

Is NCOA the same as address verification?

No. Address verification (CASS and DPV) tells you an address is a real delivery point. NCOA tells you the person or business at that address filed a change of address. A list needs both: a valid address with the wrong person on it is still a wasted piece.

Can I use NCOA to find people who just moved into my area?

No. NCOA only updates records already on your list, and the USPS form every list owner signs says NCOALink may not be used to create or maintain new movers' lists.

How far back does NCOA go?

48 months with a Full Service Provider and 18 months with a Limited Service Provider or End User licensee. Ask your provider which one you're getting; an older list needs the 48-month data.

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.