Webhooks are notifications that are sent to a URL designed to receive real time updates when changes occur. They are the most effective way to receive updates when a new 'event' takes place in an EasyPost object (tracker, shipment, batch, etc). Each time there is change to an object, EasyPost will send at least one POST request to all webhooks you have setup through your EasyPost dashboard.
The value of webhooks is that we alert you when there is any updates to an object. The alternative way to get updates is to make GET requests which returns the current state of the object. Using the GET request method of retrieval can be both wasteful and cause latency in retrieving updates. Inevitably, you will make wasteful requests when there has not yet been an update and also fail to make GET calls in a timely fashion after there is an available update.
Links to official documentation:
To set up a webhook, follow the simple steps below:
- Click 'Webhooks & Events'.
- Click 'Add Webhook'.
- Select your Environment and paste the URL you wish to receive webhooks to.