Everything an AI agent can do with the EasyPost API.

A reference guide for building AI agents: every method, how to authenticate, and the permissions each one needs.

Endpoints38
API versionv2
Last updated23 June 2026
Orientation

How the EasyPost API works.

The EasyPost API is how an app or AI agent works with a shipping account: comparing carrier rates, buying and printing a label, verifying an address, and tracking a parcel. Access is granted through an API key, either a test key that moves no money or a production key for live operations, and there are no per-endpoint scopes, so the key itself is the boundary. A state change, like a tracker advancing, emits an Event that EasyPost can deliver to a registered endpoint.

38Endpoints
12Capability groups
10Read
28Write
1Permissions
Authentication
EasyPost authenticates every request with an API key sent through HTTP Basic auth, where the key is the username and the password is left blank, over TLS 1.2 or later. Each account has a test key for simulated data and a production key for live shipping. A compromised key can be disabled immediately in the Dashboard.
Permissions
EasyPost has no granular per-endpoint scopes. A production key can call every endpoint the account has access to, so the boundary is the key itself, not a set of scopes. The only built-in split is test versus production: a test key cannot move money, and some account-management calls, like creating carrier accounts, require a production key.
Versioning
EasyPost serves a single stable API under the v2 path, so there is no per-account dated version to pin. On top of it, EasyPost ships dated platform releases, mostly carrier integrations and additive features rather than breaking changes, and these are published in the releases feed.
Data model
EasyPost is resource-oriented REST with JSON requests and responses. Core objects, like Shipment, Parcel, Address, and CustomsItem, are immutable once created, so all details are set at creation. A Shipment combines a to_address, from_address, and parcel to produce rates, which are then bought to print a label. State changes, like a tracker advancing, emit an Event delivered by webhook.
Connect & authenticate

Connection & authentication methods.

How an app or AI agent connects to EasyPost determines what it can reach. There is a route for making calls, authenticated by an API key, and a route for receiving events, where EasyPost posts updates to a registered endpoint. The key it uses, test or production, sets what the agent can do.

Ways to connect

REST API

The REST API takes JSON request bodies, returns JSON, and pages through lists with before_id and after_id cursors, under the v2 path at https://api.easypost.com/v2. A call authenticates with an API key sent through HTTP Basic auth, with the key as the username and a blank password. A separate test key operates on simulated data so no money moves.

Best forConnecting an app or AI agent to EasyPost.
Governed byThe API key, test or production.
Docs ↗

Webhooks

EasyPost POSTs Event objects to an HTTPS endpoint registered through the Webhooks API or the Dashboard. When a webhook_secret is set, EasyPost signs each delivery and sends the signature in the X-Hmac-Signature header, so the receiver can verify it with the validate_webhook helper and reject anything that does not match. An endpoint must return a 2XX status to acknowledge receipt.

Best forReceiving EasyPost events, like tracking updates, at an app or AI agent.
Governed byThe webhook_secret on the endpoint.
Docs ↗
Authentication

Production API key

A production key operates on live data and moves real money when buying labels, pickups, or insurance. It is sent through HTTP Basic auth as the username, with a blank password, over TLS 1.2 or later. EasyPost has no granular per-endpoint scopes, so a production key can call every endpoint the account has access to. A compromised key can be disabled immediately in the Dashboard.

TokenAPI key (HTTP Basic username, blank password)
Best forLive shipping operations.
Docs ↗

Test API key

A test key operates on simulated data so an integration can be built and exercised without spending money or printing real postage. It authenticates the same way as a production key, as the HTTP Basic username with a blank password. Some account-management operations, like creating carrier accounts, require a production key.

TokenAPI key (HTTP Basic username, blank password)
Best forBuilding and testing without moving money.
Docs ↗
Capability map

What an AI agent can do in EasyPost.

The EasyPost API is split into areas an agent can act on, like shipments, rates, trackers, addresses, and customs. Each area has its own methods, and writes in some areas spend money, like buying a label or a pickup.

Shipments

7 endpoints

Methods for creating shipments, comparing rates, and buying, refunding, and insuring labels.

Buying, refunding, or insuring a shipment moves real money.
View endpoints

Rates

2 endpoints

Methods for retrieving and regenerating shipping rates.

Read-only; retrieving rates does not buy anything.
View endpoints

Trackers

4 endpoints

Methods for tracking parcels by tracking code.

A write here creates or deletes a real tracker and its webhook updates.
View endpoints

Addresses

4 endpoints

Methods for creating and verifying addresses.

Verification can return corrected address data for a real person or place.
View endpoints

Parcels

1 endpoint

Methods for describing the package being shipped.

A write here creates a real parcel object used for rating.
View endpoints

Customs

2 endpoints

Methods for the customs information attached to international shipments.

A write here creates customs declarations for real cross-border shipments.
View endpoints

Insurance

2 endpoints

Methods for standalone insurance on parcels not shipped through EasyPost.

Buying or refunding insurance moves real money.
View endpoints

Batches

4 endpoints

Methods for buying and manifesting many shipments at once.

Buying a batch purchases labels for every shipment in it.
View endpoints

Pickups

3 endpoints

Methods for scheduling a carrier to collect parcels.

Buying a pickup books and pays for a real carrier collection.
View endpoints

Carrier Accounts

4 endpoints

Methods for the carrier credentials an account ships through.

A write here changes which carriers and credentials an account can ship on.
View endpoints

Events & Webhooks

4 endpoints

Methods for reading events and managing webhook endpoints.

A write here changes where EasyPost sends event notifications.
View endpoints

Refunds

1 endpoint

Methods for bulk-refunding purchased postage.

A write here requests refunds on real purchased labels.
View endpoints
Endpoint reference

Every EasyPost API method.

Filter by method, access, or permission, or search any path. Select a row for version detail, rate limits, the related webhook event, and the source.

MethodEndpointWhat it doesAccessPermissionVersion

Shipments

Methods for creating shipments, comparing rates, and buying, refunding, and insuring labels.7

A Shipment is immutable once created. Creating one does not buy a label. A test key creates test shipments.

Acts onshipment
Permission (capability)Production key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only.

Acts onshipment
Permission (capability)Production key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

A list endpoint, subject to the 5 requests-per-second index limit.

Acts onshipment
Permission (capability)Production key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limit5 requests/second (index endpoints)

Spends real money. Governed by the load-based limiter that protects buying and rating.

Acts onshipment
Permission (capability)Production key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Refund eligibility and timing depend on the carrier.

Acts onshipment
Permission (capability)Production key
VersionAvailable since the API’s base version
Webhook eventrefund.successful
Rate limitStandard limits apply

Spends money. Insure at buy time or with this endpoint after buying.

Acts onshipment
Permission (capability)Production key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Works on shipments that already have a label; conversion works best from a 4x6 PNG.

Acts onshipment
Permission (capability)Production key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Rates

Methods for retrieving and regenerating shipping rates.2

A beta endpoint for comparing rates; it does not buy anything.

Acts onrate
Permission (capability)Production key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Useful when a shipment is bought on a different day than it was created.

Acts onshipment
Permission (capability)Production key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Trackers

Methods for tracking parcels by tracking code.4

If carrier is omitted, EasyPost attempts to auto-detect it. Updates arrive by webhook.

Acts ontracker
Permission (capability)Production key
VersionAvailable since the API’s base version
Webhook eventtracker.created
Rate limitStandard limits apply

Read-only.

Acts ontracker
Permission (capability)Production key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

A list endpoint, subject to the 5 requests-per-second index limit.

Acts ontracker
Permission (capability)Production key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limit5 requests/second (index endpoints)

Stops webhook Event deliveries associated with the Tracker.

Acts ontracker
Permission (capability)Production key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Addresses

Methods for creating and verifying addresses.4

Verification can be requested at creation time with a verify parameter.

Acts onaddress
Permission (capability)Production key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Verification returns deliverability and residential flags used in rate calculation.

Acts onaddress
Permission (capability)Production key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Returns corrected data and whether the address is residential.

Acts onaddress
Permission (capability)Production key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

A list endpoint, subject to the 5 requests-per-second index limit.

Acts onaddress
Permission (capability)Production key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limit5 requests/second (index endpoints)

Parcels

Methods for describing the package being shipped.1

A Parcel is immutable once created; weight is required.

Acts onparcel
Permission (capability)Production key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Customs

Methods for the customs information attached to international shipments.2

Carries CustomsItems describing the goods; immutable once created.

Acts oncustoms_info
Permission (capability)Production key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

A CustomsItem is immutable once created.

Acts oncustoms_item
Permission (capability)Production key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Insurance

Methods for standalone insurance on parcels not shipped through EasyPost.2

Spends money. For EasyPost shipments, insure via the shipment instead.

Acts oninsurance
Permission (capability)Production key
VersionAvailable since the API’s base version
Webhook eventinsurance.purchased
Rate limitStandard limits apply

Only for standalone insurance; tracking status must be pre_transit, cancelled, or unknown.

Acts oninsurance
Permission (capability)Production key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Batches

Methods for buying and manifesting many shipments at once.4

Creating a batch does not buy labels.

Acts onbatch
Permission (capability)Production key
VersionAvailable since the API’s base version
Webhook eventbatch.created
Rate limitStandard limits apply

Spends real money across the whole batch.

Acts onbatch
Permission (capability)Production key
VersionAvailable since the API’s base version
Webhook eventbatch.updated
Rate limitStandard limits apply

Runs after the batch is bought.

Acts onbatch
Permission (capability)Production key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

A scan form lets a carrier scan one barcode for the whole batch.

Acts onbatch
Permission (capability)Production key
VersionAvailable since the API’s base version
Webhook eventscan_form.created
Rate limitStandard limits apply

Pickups

Methods for scheduling a carrier to collect parcels.3

Creating a pickup does not book it; a Pickup is immutable once created.

Acts onpickup
Permission (capability)Production key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Books and may pay for a real carrier collection.

Acts onpickup
Permission (capability)Production key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Cancellation rules depend on the carrier.

Acts onpickup
Permission (capability)Production key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Carrier Accounts

Methods for the carrier credentials an account ships through.4

Requires a production key. Adds carrier credentials used for rating and buying.

Acts oncarrier_account
Permission (capability)Production key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Requires a production key.

Acts oncarrier_account
Permission (capability)Production key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

The id may be the carrier_account id (ca_...) or its reference value.

Acts oncarrier_account
Permission (capability)Production key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Removes the carrier credentials from the account.

Acts oncarrier_account
Permission (capability)Production key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Events & Webhooks

Methods for reading events and managing webhook endpoints.4

A list endpoint, subject to the 5 requests-per-second index limit.

Acts onevent
Permission (capability)Production key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limit5 requests/second (index endpoints)

Set a webhook_secret so receivers can verify the X-Hmac-Signature header.

Acts onwebhook
Permission (capability)Production key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Used to re-enable a webhook that was disabled after repeated delivery failures.

Acts onwebhook
Permission (capability)Production key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Stops all future deliveries to that endpoint.

Acts onwebhook
Permission (capability)Production key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Refunds

Methods for bulk-refunding purchased postage.1

For a single shipment, use the shipment refund endpoint instead.

Acts onrefund
Permission (capability)Production key
VersionAvailable since the API’s base version
Webhook eventrefund.successful
Rate limitStandard limits apply
No endpoints match those filters.
Webhooks

Webhook events.

EasyPost can notify an app when something happens on an account, like a tracker advancing to a new status or a batch finishing. It posts an Event describing what changed, so an integration learns about activity without polling.

EventWhat it signalsTriggered by
tracker.createdA Tracker was created and is now following a parcel./v2/trackers
tracker.updatedA Tracker advanced to a new status or recorded a new tracking detail, like out for delivery or delivered./v2/trackers
batch.createdA Batch was created./v2/batches
batch.updatedA Batch changed state, for example as its shipments finish buying./v2/batches/:id/buy
scan_form.createdA ScanForm (manifest) was created for a batch of shipments./v2/batches/:id/scan_form
insurance.purchasedStandalone Insurance was purchased./v2/insurances
refund.successfulA requested Refund was approved by the carrier and completed./v2/shipments/:id/refund
/v2/refunds
No events match that search.
Rate limits & pagination

Rate limits, pagination & request size.

EasyPost limits how fast an app can call. A load-based limiter protects buying and rating, and a fixed limit of five requests per second applies to list endpoints, with going over returning an error.

Request rate

EasyPost uses a dual-layer rate-limiting strategy. A load-based limiter dynamically protects overall capacity for high-priority operations, like buying and rating, rather than enforcing a fixed number. A separate fixed limit of five requests per second applies to list (index) endpoints, like listing shipments or trackers. Going over returns HTTP 429 Too Many Requests, which should be handled with exponential backoff. A separate constraint caps a single rating request at 60 carrier accounts, and only the first 60 are used if more are supplied.

Pagination

List endpoints are cursor-based, paged with before_id and after_id parameters and a page_size parameter that sets how many records come back. The response indicates whether more pages remain. Listing endpoints are the ones subject to the five-requests-per-second index limit.

Request size

A single rating request uses at most 60 carrier accounts; any beyond that are ignored rather than failing the request. Label conversion works best on 4x6 labels converted from a PNG to ZPL or another format.

Errors

Status codes & error handling.

The status codes an agent should handle, and what to do about each.

StatusCodeMeaningWhat to do
401UNAUTHORIZEDAuthentication is required and failed, usually a missing or wrong API key.Send a valid key as the HTTP Basic username, and confirm test versus production mode.
402PAYMENT_REQUIREDBilling information is missing or there are insufficient funds to complete the request.Add a payment method or top up the balance before buying labels, pickups, or insurance.
403FORBIDDENThe request was valid but the server refused it, for example using a test key where a production key is required.Use a production key for account-management calls, and confirm the account has access.
404NOT_FOUNDThe requested resource could not be found.Check the object id, and confirm it belongs to the same mode and account.
422UNPROCESSABLE_ENTITYThe request was well-formed but the data could not be processed, like a failed address verification (ADDRESS.VERIFY.FAILURE).Read the errors array for the field, message, and suggestion, fix the input, and resend.
429TOO_MANY_REQUESTSToo many requests arrived too quickly, for example over five per second on a list endpoint.Slow down and retry with exponential backoff and jitter.
500INTERNAL_SERVER_ERRORAn unexpected error occurred on EasyPost's side. A 503 means the service is temporarily unavailable.Retry with backoff, and contact EasyPost support if it persists.
Versioning & freshness

Version history.

EasyPost serves a single stable API under the v2 path and ships dated platform releases on top of it, mostly carrier updates and additive features rather than breaking changes.

Version history

What changed, and when

Latest versionv2
v2Current version
Stable v2 API with dated platform releases

EasyPost serves a single stable API under the v2 path rather than pinning a dated version per account. Dated platform releases ship on top, mostly carrier integrations and additive features, published in the releases feed.

What changed
  • 2026.05.02: Roadie address name mapping and custom reference fields; improved USPS address verification fallback handling.
  • 2026.04.25: Amazon Shipping signature delivery confirmation for UK; Windsor Framework support for Great Britain to Northern Ireland; automatic label format conversion.
2026.04.04
April 2026 platform release

New carrier integrations and rate-shopping controls.

What changed
  • Added P2P and eHub carrier integrations.
  • Added a control to limit the number of carrier accounts used during rating.
  • Expanded USPS QR code label generation.
2026.03.28
March 2026 platform release

Returns workflows and timestamp standardization.

What changed
  • Added UPS return merchandise authorization workflows with QR code labels.
  • Added DHL Express importer registration number support.
  • Standardized timestamp formatting to ISO 8601 across supported endpoints.
2026.03.07
March 2026 platform release

FedEx SmartPost REST support.

What changed
  • Added REST-based rating and purchase support for FedEx SmartPost accounts using REST credentials.
  • Added support for multi-piece orders and service-level filtering on SmartPost.

The v2 API is stable; track the dated releases for carrier and feature changes.

EasyPost releases ↗
Questions

EasyPost API, answered.

How does EasyPost authenticate API requests?+
Every request uses HTTP Basic authentication with the API key as the username and no password. The key must be sent over TLS 1.2 or later. EasyPost issues a test key for simulated data and a production key for live operations, and a key should be protected like a password and can be disabled in the Dashboard if it leaks.
What's the difference between test and production keys?+
A test key operates on simulated data, so an integration can create shipments, buy test labels, and exercise flows without spending money or printing real postage. A production key operates on live data and moves real money. Some account-management calls, like creating carrier accounts, require a production key.
Does EasyPost support granular permissions or scopes?+
No. EasyPost has no per-endpoint scopes or fine-grained permission model. A production key can call any endpoint the account has access to, so anything finer than 'test versus production' has to be enforced outside EasyPost, by a layer that sits in front of the key and limits which calls an agent may make.
How are webhooks secured?+
When a webhook is created with a webhook_secret, EasyPost signs each delivery and sends the signature in the X-Hmac-Signature header. The receiver verifies it, using the validate_webhook helper in EasyPost's client libraries, and rejects any event whose signature does not match. The endpoint must use HTTPS with a trusted certificate and return a 2XX status.
What are the rate limits?+
EasyPost runs two layers. A load-based limiter dynamically protects buying and rating, and a fixed limit of five requests per second applies to list endpoints. Going over returns HTTP 429, which should be handled with exponential backoff. Separately, a single rating request uses at most 60 carrier accounts.
Why can't a Shipment be edited after it's created?+
Core EasyPost objects, including Shipment, Parcel, Address, and CustomsItem, are immutable once created, so every detail must be provided at creation. To change something, a new object is created. Rates on an existing shipment can be regenerated with the rerate endpoint without recreating it.
Related

More e-commerce API guides for agents

What is Bollard AI?

Control what every AI agent can do in EasyPost.

Bollard AI sits between a team's AI agents and EasyPost. Grant each agent exactly the access it needs, read or write, action by action, and every call is checked and logged.

  • Let an agent compare rates and track parcels without letting it buy labels or spend money.
  • Denied by default, so an agent reaches only what has been explicitly allowed.
  • Every call recorded in plain English: who, what, where, and the decision.
EasyPost
Fulfilment Agent
Compare rates ActionOffReadFull use
Track packages ResourceOffReadFull use
Buy labels ActionOffReadFull use
Refund shipments ActionOffReadFull use
Per-agent access, set in Bollard AI, not in EasyPost