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.


Possible Event Types

Batch

  • A "batch.created" Event is created when the initial creation of a Batch object is complete.
  • A "batch.updated" Event is created whenever the status of a Batch object changes.

Claims

  • A "claims.submitted" Event is created when a claim is submitted through the EasyPost claim form or via the API.
  • A "claims.cancelled" Event is created when an existing claim is cancelled, either through a customer request or by EasyPost due to eligibility or processing requirements.
  • A "claims.updated" Event is created whenever the status or details of an in-progress claim change. This includes updates triggered by incoming customer correspondence or responses from EasyPost's claims team.
  • A "claims.rejected" Event is created when a claim is denied due to ineligibility, insufficient documentation, policy restrictions, or other disqualifying conditions.
  • A "claims.approved" Event is created when a claim is approved, either partially or in full, based on the reimbursable amount determined during claim review.

Insurance

  • An "insurance.purchased" Event is created whenever a standalone Insurance completes purchasing and reporting to the insurer.
  • An "insurance.cancelled" Event is created whenever a standalone Insurance fails purchasing, is refunded to your account balance, and is not reported to the insurer.

Payment

  • A “payment.created” Event is created when a bank account or credit card is successfully charged for a transaction that generates a PaymentLog. This includes charges used to fund the EasyPost wallet. For credit card charges, this event indicates that the charge is complete and the account balance has already been updated. For bank account transfers (ACH), this event indicates that the transfer process has begun; the transfer may still fail at a later stage.
  • A "payment.completed" Event is 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" Event is 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.

Refund

  • A "refund.successful" Event is created whenever a non-instantaneous Refund request 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.

Report

  • A "report.new" Event is created when a Report object is initially created. The report won't be immediately ready for download.
  • A "report.empty" Event is created when a Report did not generate because there was no data in the specified date range.
  • A "report.available" Event is created when a Report becomes available to download.
  • A "report.failed" Event is created when a Report fails to generate.

ScanForm

  • A "scan_form.created" Event is created when the initial creation of a ScanForm object is complete.
  • A "scan_form.updated" Event is created whenever the status of a ScanForm object changes.

Shipment Invoice

  • A "shipment.invoice.created" Event is created when a ShipmentInvoice object is initially created.
  • A "shipment.invoice.updated" Event is created if a ShipmentInvoice is adjusted and updated.

Tracker

  • A "tracker.created" Event is created when the initial creation of a Tracker object is complete.
  • A "tracker.updated" Event is created whenever a Tracker object gets successfully updated.

Event object

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 created
updated_at
datetime
When the Event was last updated
Event 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"
}

Retrieve all Events

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_id
after_id
i.e. evt_...
Optional pagination parameter. Only events created after the given ID will be included. May not be used with before_id
start_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_datetime
end_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_datetime
page_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}

Retrieve an Event

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}