Obtain a standard OAuth Bearer token from the USPS token endpoint at developers.usps.com using client_credentials grant with your USPS API client_id and client_secret
Obtain a Payment Authorization token by calling the payment authorization endpoint with your CRID and MID; this second token is required for all label purchase and postage rate calls
POST to /v3/labels/domestic with both tokens (Authorization: Bearer and X-Payment-Authorization-Token headers), specifying serviceCode, weight, dimensions, origin, and destination ZIP
The response includes a base64-encoded label (ZPL or PDF per your 'labelType' parameter) and a tracking number; decode and print the label
USPS Web Tools XML APIs were fully retired January 25 2026; any remaining Web Tools integration must be migrated to v3 before making further calls
Known gotchas
Two separate tokens are mandatory for label purchase: a standard OAuth Bearer token and a Payment Authorization token tied to your CRID/MID; sending only one token returns a 401
USPS announced an API Access Control initiative launching April 2026 that may add additional scoping requirements; monitor the developers.usps.com industry alerts page
USPS v1 and v2 APIs retired January 22 2025; v3 is the only supported version
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp