Event
Webhook Events are triggered by changes in objects you've created via the API.
Every time an Event related to one of your objects is created, EasyPost guarantees at least one POST request will be sent to each of the webhook URLs set up for your account.
For this reason, we strongly encourage your webhook handler to be idempotent. See the webhooks guide for more information.
Endpoints
- A "batch.created"
Eventis created when the initial creation of aBatchobject is complete. - A "batch.updated"
Eventis created whenever the status of aBatchobject changes.
- An "insurance.purchased"
Eventis created whenever a standaloneInsurancecompletes purchasing and reporting to the insurer. - An "insurance.cancelled"
Eventis created whenever a standaloneInsurancefails purchasing, is refunded to your account balance, and is not reported to the insurer.
- A "payment.created"
Eventis created whenever a bank account or credit card is successfully charged. For credit card charges, this event indicates that the charge is complete and your account balance has already been updated. For bank account transfers (ACH) this indicates the beginning of the transfer process, which may still later fail. - A "payment.completed"
Eventis created when a bank account transfer is successfully completed and credited to your account balance. This event indicates that the accounting for that transfer is now complete. - A "payment.failed"
Eventis created when a bank account transfer or credit card charge has an issue and cannot be completed. For bank account transfers that fail your account balance may see a failure deduction and an EasyPost could possibly need to get in contact with you about your account status.
- A "refund.successful"
Eventis created whenever a non-instantaneousRefundrequest is completed. USPS is the best example of this, as USPS postage takes up to 15 days to be refunded after the initial refund creation.
- A "report.new"
Eventis created when aReportobject is initially created. The report won't be immediately ready for download. - A "report.empty"
Eventis created when aReportdid not generate because there was no data in the specified date range. - A "report.available"
Eventis created when aReportbecomes available to download. - A "report.failed"
Eventis created when aReportfails to generate.
- A "scan_form.created"
Eventis created when the initial creation of aScanFormobject is complete. - A "scan_form.updated"
Eventis created whenever the status of aScanFormobject changes.
- A "shipment.invoice.created"
Eventis created when aShipmentInvoiceobject is initially created. - A "shipment.invoice.updated"
Eventis created if aShipmentInvoiceis adjusted and updated.
- A "tracker.created"
Eventis created when the initial creation of aTrackerobject is complete. - A "tracker.updated"
Eventis created whenever aTrackerobject gets successfully updated.
object
string
"Event"
id
string
Unique identifier, begins with "evt_"
mode
string
"test" or "production"
description
string
Result type and event name. See Possible Event Types for more information.
previous_attributes
object
Previous values of relevant result attributes
result
object
The object associated with the
Event. See the object attribute on the result to determine its specific type. This field will not be returned when retrieving events directly from the API.status
string
The current status of the event. Possible values:
- "completed"
- "failed"
- "in_queue"
- "retrying"
pending_urls
string array
Webhook URLs that have not yet been successfully notified as of the time this webhook event was sent. The URL receiving the
Event will still be listed in pending_urls, as will any other URLs that receive the Event at the same time.completed_urls
string array
Webhook URLs that have already been successfully notified as of the time this webhook was sent
created_at
datetime
When the
Event was createdupdated_at
datetime
When the
Event was last updatedEvent Object
{
"mode": "production",
"description": "batch.created",
"previous_attributes": {
"state": "purchasing"
},
"pending_urls": [
"example.com/easypost-webhook"
],
"completed_urls": [],
"created_at": "2015-12-03T19:09:19Z",
"updated_at": "2015-12-03T19:09:19Z",
"result": {
"id": "batch_...",
"object": "Batch",
"mode": "production",
"state": "purchased",
"num_shipments": 1,
"reference": null,
"created_at": "2015-12-03T19:09:19Z",
"updated_at": "2015-12-03T19:09:19Z",
"scan_form": null,
"shipments": [
{
"batch_status": "postage_purchased",
"batch_message": null,
"id": "shp_a5b1348307694736aaqqqq8fqda53f93"
}
],
"status": {
"created": 0,
"queued_for_purchase": 0,
"creation_failed": 0,
"postage_purchased": 1,
"postage_purchase_failed": 0
},
"pickup": null,
"label_url": null
},
"id": "evt_...",
"object": "Event"
}A list of all Event objects associated with the given API Key can also be retrieved.
See the Pagination section of our docs for more details on retrieving all records when multiple pages are available.
Request Parameters
before_id
i.e. evt_...
Optional pagination parameter. Only events created before the given ID will be included. May not be used with
after_idafter_id
i.e. evt_...
Optional pagination parameter. Only events created after the given ID will be included. May not be used with
before_idstart_datetime
i.e. 2016-01-02T00:00:00Z
Only return events created after this timestamp. Defaults to 1 month ago, or 1 month before a passed
end_datetimeend_datetime
i.e. 2016-01-02T00:00:00Z
Only return events created before this timestamp. Defaults to end of the current day, or 1 month after a passed
start_datetimepage_size
i.e. 30
The number of records to return on each page. The maximum value is 100, and default is 20.
GET / events
1curl -X GET "https://api.easypost.com/v2/events?page_size=5" \
2 -u "EASYPOST_API_KEY":Response
1{
2 "events": [
3 {
4 "description": "tracker.created",
5 "id": "evt_ad2365c22d1511f0b5364ffbb3e7a1f1",
6 "user_id": "user_060ab38db3c04ffaa60f262e5781a9be",
7 "status": "pending",
8 "created_at": "2025-05-09T20:39:17.082Z",
9 "mode": "test",
10 "object": "Event"
11 }
12 ],
13 "has_more": true
14}An Event can be retrieved by its id.
GET / events/ :id
1curl -X GET https://api.easypost.com/v2/events/evt_... \
2 -u "EASYPOST_API_KEY":Response
1{
2 "description": "tracker.created",
3 "mode": "test",
4 "previous_attributes": {},
5 "created_at": "2025-05-09T20:39:17.000Z",
6 "pending_urls": [],
7 "completed_urls": [],
8 "updated_at": "2025-05-09T20:39:17.000Z",
9 "id": "evt_ad2365c22d1511f0b5364ffbb3e7a1f1",
10 "user_id": "user_060ab38db3c04ffaa60f262e5781a9be",
11 "status": "pending",
12 "object": "Event"
13}