Address Verification Guide

The goal of this guide is to walk you through EasyPost's Address Verification services. We'll give you some background on general AVS, as well as a quick tutorial on how to verify addresses using the EasyPost API. Since this guide requires you to have some knowledge of the EasyPost API, we recommend you check out our Getting Started Guide if you haven't used EasyPost before.

Address verification works through our Address Object and our Verifications Object. Please note that EasyPost will not flag or verify any address unless the verify or verify_strict parameters are used.

When you create an Address Object for your shipment with the aforementioned parameters, you also create associated zip4 or delivery attributes. zip4 only works for U.S. addresses and is used to verify the Zip+4 code of the address. delivery checks the rest of the address to determine its deliverability, and will make minor corrections to spelling/format if applicable.

The results of the verification will show up in the Verifications Object of the Address. The possible responses are:

  • success: the address is verified successfully.
  • errors: the address can't be verified due to an error, which will include error messaging with the response.
  • details: extra data related to the verification, specifically the longitude and latitude of the address.

International AVS works slightly differently. The objects and responses are similar, but zip4 is no longer a valid input to the verify and verify_strict parameters, since international addresses don't have the USPS' Zip+4 postal code. International AVS is also a premium, stand-alone service that must be subscribed to in order to be used. If you'd like to learn more about International AVS, contact our representatives for more information.

Verifying an Address

POST /addresses
1curl -X POST https://api.easypost.com/v2/addresses \
2  -u "EASYPOST_API_KEY": \
3  -H 'Content-Type: application/json' \
4  -d '{
5    "address": {
6      "street1": "000 unknown street",
7      "city": "Not A City",
8      "state": "ZZ",
9      "zip": "00001",
10      "country": "US",
11      "email": "test@example.com",
12      "phone": "5555555555"
13    },
14    "verify": true
15  }'

Verifying an Invalid Address

POST /addresses
1curl -X POST https://api.easypost.com/v2/addresses \
2  -u "EASYPOST_API_KEY": \
3  -H 'Content-Type: application/json' \
4  -d '{
5    "address": {
6      "street1": "000 unknown street",
7      "city": "Not A City",
8      "state": "ZZ",
9      "zip": "00001",
10      "country": "US",
11      "email": "test@example.com",
12      "phone": "5555555555"
13    }
14  }'

Strict-Verifying an Address

POST /addresses
1curl -X POST https://api.easypost.com/v2/addresses \
2  -u "EASYPOST_API_KEY": \
3  -H 'Content-Type: application/json' \
4  -d '{
5    "address": {
6      "street1": "000 unknown street",
7      "city": "Not A City",
8      "state": "ZZ",
9      "zip": "00001",
10      "country": "US",
11      "email": "test@example.com",
12      "phone": "5555555555"
13    },
14    "verify_strict": true
15  }'

Verify an Existing Address

POST /addresses/:id/verify
1curl -X GET https://api.easypost.com/v2/addresses/adr_.../verify \
2  -u "EASYPOST_API_KEY":