Follow these steps and start using USPS APIs:
1. Sign Up
Sign Up for a Business Customer Gateway account using your USPS business account credentials (this will take you to the Business Customer Gateway signup page).
2. Log In
Log in to the USPS Developer Portal USPS Developer Portal (login using credentials from Step 1) using your USPS business account credentials once you have completed signing up.
3. Create an App (Must be logged into USPS Developer Portal)
Click the Apps button from the Menu Bar and complete the following steps to create an App:
- Click "Add app" button
- Enter "App Name" for your application (required)
- Enter "Callback URL" (optional)
- Enter "Description" (optional)
- Select the APIs Available (required)
- Click "ADD APP" Button
4. Retrieve your Consumer Key and Secret
Select the application you just registered and retrieve your Consumer Key and Consumer Secret from the credentials section. These credentials are required for generating the OAuth token.
5. Authorize Application to Access Protected Information Resources
Navigate to the USPS Customer Onboarding Portal to authorize the client application you registered on the USPS APIs Developer Portal in order to access your information resources shared with the USPS. This includes information resources such as payment accounts, permits, CRID's, MID's, and subscriptions. This step is required to access all Version 3 APIs.
6. Generate your OAuth 2.0 Access Token
All USPS APIs require an OAuth 2.0 access token to be conveyed in the Authorization header, using the Bearer token scheme. To retrieve your Bearer Token, you will need the consumer key (client_id) and consumer secret (client_secret) from the app you created.
Note: The OAuthv1 endpoint is required for API versions 1 and 2. Version 3 APIs will require the OAuthv3 endpoint.
7. Try Out USPS APIs
First review the published APIs through the API Catalog page on the USPS APIs Developer Portal. For any API you would like to try out and execute, please reference our USPS Github page for viewing API repository that contains example Postman requests and Curl commands.
Note: If you want to use the Label API it requires additional approval and configuration. The Label API requires you to be enrolled in USPS Ship for both outbound and return labels and have an Enterprise Payment Account or a Permit. If you are interested in using the Label API or have questions, please use the Contact information below.
If you have questions, please contact us at APISupport@usps.gov. In your email include the following information:
- Your Name
- Contact Phone Number
- Developer Portal Username
- URL being called (api.usps.com or api-cat.usps.com)
- Customer Registration Id (CRID)
- Mailer Id (MID)
- Developer Portal App Name