Lob Help Center

All about addresses

Anatomy of a Mailpiece

When you send an API request to Lob, you are sending 3 pieces of information: 

  1. the "To" address, 
  2. the "From" address, and 
  3. the content.

Below are some best practices to follow around formatting your address data with Lob.

What's an address?

An address gives the location of a structure or land using identifiers to help with navigation to that location. They also aid in the routing of mail.

The delivery address is the most important information on your mail piece. Use the following format for your delivery addresses:

  1. Name or attention line
  2. Company (if applicable)
  3. Delivery address
  4. City, State, ZIP Code, Country

Address book

The Address Book is a collection of a customer’s addresses uploaded and stored in our system, which can be accessed in the Lob dashboard or you can leverage the address_id to retrieve that entry's information programmatically. Rather than passing the full address + mail information in one API call, customers can also pass the address_id (provided upon creating the address in the address book) that will look for the associated address information. This makes requests faster and simpler.

Standardization & verification

We cleanse all newly created addresses in order to optimize for maximum deliverability. All US addresses will be automatically standardized, cleansed, and verified through our CASS-Certified Address Verification system before being returned back to you in the API response. All international addresses will simply be standardized by being transformed to all uppercase. 

Afterward, mail requests will be run through NCOALink (National Change of Address) and CASS, as these are requirements for sending with USPS. This may result in the final mailing address being different from the ones you see in your API requests and Dashboard.

Coding Accuracy Support Systems (CASS)

The CASS certification process is designed in cooperation with the mailing industry to improve the accuracy of postal codes, i.e., Five-Digit ZIP Code, ZIP+4, delivery point codes (DPCs), and carrier route codes that appear on mail pieces.

Lob's CASS certified process, ensures your addresses are standardized before any mail is sent.

Adding & deleting addresses

You cannot edit any existing addresses via the dashboard or API request. You can however delete the current address and add a new one with the updated information. For more details on adding a new address to your address book, refer to the API documentation.

If you are interested in mass-deleting addresses, you will need to set up a delete address request script. See more details on deleting in our API documentation.

Note that Lob is not permitted to add or delete addresses on behalf of customers.

Autoverify

Autoverify is included in all US Print & Mail subscriptions. Lob verifies the deliverability of all addresses before sending a request to our print partners. 

Strictness settings

Depending on what business logic you'd like to take, based on your verification result, you can toggle your US address strictness settings in your Lob dashboard. There are three possible strictness levels: Strict, Normal, and Relaxed

Learn more about the importance of mail strictness settings and how to adjust them as required by your business.

National Change of Address (NCOA)

National Change of Address (NCOA) is a service offered by the USPS, which allows individuals or businesses who have recently moved within the US to have any mail forwarded from their previous address to their new address.

As a CASS-certified Address Verification Provider, Lob also offers NCOA functionality to our Print & Mail customers. With the Lob NCOA feature enabled, Postcards, Self-Mailers, Letters, Checks and Addresses can automatically be corrected to reflect an individual's or business' new address in the case that they have moved (only if they have registered an NCOA with the USPS).

Due to privacy concerns and USPS constraints, for customers with NCOA enabled, our API responses for a limited set of endpoints differ slightly in the case when an address has been changed through NCOA (see more below).

The National Change of Address (NCOALink) database check only runs for US-based addresses. It does not run for non-US addresses or for non-deliverable US addresses.

NOTE: This feature is exclusive to certain customers. Upgrade to the appropriate Print & Mail edition to gain access.

Signing a Processing Acknowledgement Form (PAF)

In order to have the Lob NCOA feature enabled, our customers must sign a Processing Acknowledgement Form (PAF), which is required by the USPS. NCOA cannot be enabled if a PAF has not been signed.

Reach out to your Account Manager or your Customer Success Manager to see if you are eligible to sign a PAF.

Endpoints affected

With Lob NCOA enabled, there are no changes to API requests sent to Lob. This is true whether you are using our client-facing libraries, or making raw HTTP(S) requests to our API. If you have Lob NCOA enabled, all live API requests to the following endpoints will be run through NCOA. However, there are some changes to API responses for the following endpoints:

  • POST /v1/addresses
  • POST /v1/checks
  • POST /v1/letters
  • POST /v1/self_mailers
  • POST /v1/postcards

Response format

Though there are no changes to API requests received, there are significant changes to our API responses, but only in the event that an address has been changed through NCOA. If an address has not been changed through NCOA, the response would be identical to our standard API responses, except with the addition of a recipient_moved field, which is false for unchanged addresses.

Due to the USPS constraints mentioned above, if an address has been changed through NCOA, we are required to suppress the following response fields for that address:

  • address_line1
  • address_line2
  • The +4 portion of the ZIP+4 (5-digit ZIP code will still be present).

In addition, if an address has been changed through NCOA, the address will have a recipient_moved: true flag. For more details about the response format, see the NCOA information in our API docs.

In addition to our API responses, the suppressed fields will (almost) always be suppressed in other places within the Lob platform as well. This includes:

  • In the PDF proofs and thumbnails generated for Print & Mail requests
  • In Exports for Postcards, Self-Mailers, Letters, Checks and Addresses resources
  • API Logs & Event Logs
  • Webhooks
  • Dashboard Search

There are two locations where these fields are not suppressed:

  • In the physical mail piece that will be sent to your customer.
  • In an NCOA export from the Lob Dashboard (discussed in more detail below).

The NCOA export is the only way in which you will be able to access the suppressed response data for addresses that have been changed through NCOA.

Accessing suppressed data

In order to allow our customers to access NCOA'd data, the USPS has given us the following constraint:

Customers must send at least 100 addresses through NCOA within one week in order to gain access to NCOA'd data.

This means that in order to access this data, you must send at least 100 live API requests in a one-week time span to any of the following endpoints:

  • POST /v1/addresses
  • POST /v1/checks
  • POST /v1/letters
  • POST /v1/self_mailers
  • POST /v1/postcards

Additionally, the USPS has defined a "week" to be the following time ranges:

  • 1st-7th of the month (inclusive)
  • 8th-14th of the month (inclusive)
  • 15th-21st of the month (inclusive)
  • 22nd-28th of the month (inclusive)
  • 29th-30th or 31st of the month (inclusive, when a month has more than 28 days)

Once you have sent at least 100 live API requests in a one-week time span, you can access suppressed data through an NCOA export, which can be accessed in the Lob Dashboard Settings, under the Reporting tab.

Once in the Reporting Tab, you can select any week from the previous month or the current month, and generate an export for that week. Additionally, you have the option of only exporting addresses that have been changed during the NCOA process. This option is selected by default, as this tends to be the more useful option.

Once you have clicked the "Export" button, an email should arrive in your inbox with the exported data. Depending on how many requests you've sent and how many addresses have been changed through NCOA, this can take anywhere from a few seconds to a few hours.

The export is a CSV, which has the following fields:

  • id - The Address ID (not the mailpiece ID) for the address that has been changed.
  • name - The name passed with the API request.
  • company - The company passed with the API request.
  • phone - The phone passed with the API request.
  • email - The email passed with the API request.
  • address_line1 - The full, unsuppressed address_line1, which represents the new address for the recipient.
  • address_line2 - The full, unsuppressed address_line2, part of the new address for the recipient.
  • address_city - The city of the recipient's new address.
  • address_state - The state of the recipient's new address.
  • address_zip - The ZIP code (including the +4) of the recipient's new address.
  • address_country - The country of the recipient's new address. Always UNITED STATES.
  • metadata - The metadata associated with this address.
  • date_created - The timestamp this address was created.

One important thing to note is that the export only includes an address ID, and not a resource (postcard/self-mailer/letter/check) ID. This means that you must keep track of address ID for inline addresses created in Postcard, Self-Mailer, Letter and Check requests.

Whenever you send a mailing through Lob, you reap the benefits of accurate address cleansing and verification powered by our CASS-Certified Address Verification API. Verifying addresses is a necessary part of sending mail at scale, to optimize the efficiency and accuracy of your mail delivery.

Was this article helpful?