This allows you to trigger a generated event body to your specified URL on command. When first starting out, we recommend using our Debugger tool. To debug, you can trigger a mock event to your server by using our Debugger tool. Please note that webhooks created in the Test Environment will be triggered off events from your Test API Key, while webhooks created in the Live Environment will be triggered off events from your Live API Key.īecause tracking events only exist in the Live Environment, these event types cannot be subscribed to in the Test Environment. Note that Lob is unable to retrieve any payload information retroactively during the time when this account setting is set to "Redacted." Test vs live environmentĮvents are created in both your Test and Live Environment, and webhooks can also be created in both. However, you may adjust your redaction settings in your Account Settings in the Lob dashboard under the "Webhooks Payload" section.
These fields that may contain any sensitive PII/PHI information will be redacted by default. You can then select “Event Object” at the bottom of the screen to see what information will be redacted.īelow is an example webhook response: To preview what a sample redacted payload will look like, select “Webhooks” from the left-hand navigation menu in the dashboard, then select the yellow “Debugger” button on the Webhook dashboard or individual webhook subscription page. Everything in the “Bank Account” property (routing, account number, bank name, etc).“To” address for all form factors & events.
“From” address for all form factors & events.With each webhook sent for a given mailpiece, Lob redacts fields that could potentially contain Personally Identifiable Information (PII) or Protected Health Information (PHI). Our mailpiece creation API responses contain unredacted information about your mailpiece. NOTE: Although events may not be sent in real-time, for tracking events you can get the USPS timestamp of the event under tracking_events.time. However, customers should not assume all webhooks will be sent in real-time, and may occasionally experience some delays.įor example when subscribing to the postcard.processed_for_delivery event, you will receive a response with the previous tracking events such as postcard.in_local_area, postcard.in_transit, postcard.mailed. Lob will send webhook events as soon as they become available. While you can return anything (including HTML), we've found it most helpful to return a concise JSON object with anything that could be relevant. Therefore, we recommend responding with any information that you may find useful for debugging purposes. This should aid in preventing unwanted retry attempts caused by unexpected network timeouts.Īny other information sent back to Lob in the response will be captured and stored (regardless of status code) for you to view on your Dashboard, though we won't perform any processing on it. If your webhook endpoint has any additional complex logic to perform, we recommend immediately returning a 2xx to let Lob know that you do not want to receive this event again, and then performing that logic afterwards.
We will consider any other status code (or lack of status code) to be erroneous and attempt to retry the delivery. To confirm delivery of the webhook, Lob expects a 2xx status code returned in a timely manner. See our recommendations on securing your endpoint below. Keep in mind that it will need to be accessible by Lob, so if there's anything that could prevent Lob from access, it should be disabled for this endpoint. To receive webhooks from Lob, you just need to create another endpoint on your web server that will accept a POST request with a content type of application/json. NOTE: In Live mode, you can only have as many non-deleted webhooks as allotted in your current Print & Mail Edition.
See here for a full list of all available event types that you can subscribe to. Live), we will attempt to make a POST request with the entire event object to the URL provided. When an event occurs within our architecture and you have a webhook subscribed to that event type in that environment (Test vs.