Lob Campaign Tracking
Track postcard delivery status and scan events via the Lob API
Instructions
Lob Campaign Tracking
After sending postcards, track their delivery status through the Lob API. Lob provides USPS Intelligent Mail barcode tracking for letter-class mail, including postcards. Use this data to know when mail was delivered and correlate with inbound responses.
Retrieve a Single Postcard
curl https://api.lob.com/v1/postcards/psc_abc123 \
-u "$LOB_API_KEY:"
Response (tracking fields)
{
"id": "psc_abc123",
"tracking_events": [
{
"id": "evnt_xyz",
"type": "certified",
"name": "In Transit",
"time": "2026-04-02T14:30:00.000Z"
},
{
"id": "evnt_abc",
"type": "certified",
"name": "Processed for Delivery",
"time": "2026-04-04T08:15:00.000Z"
}
],
"expected_delivery_date": "2026-04-05",
"send_date": "2026-04-01"
}
Tracking Event Types
In Local Area— Mail is in the destination postal areaIn Transit— Mail is moving through USPS networkProcessed for Delivery— Mail is at the destination post office, out for delivery soonRe-Routed— Mail was redirected (address forwarding)Returned to Sender— Undeliverable, returned
List All Postcards (with filtering)
curl "https://api.lob.com/v1/postcards?limit=50&date_created=%7B%22gte%22%3A%222026-03-01%22%7D" \
-u "$LOB_API_KEY:"
Filter parameters:
limit— Number of results (max 100)offset— Pagination offsetdate_created— Filter by creation date range (usegte,lte)metadata[campaign_id]— Filter by custom metadata (if set at send time)
Webhook Events
Configure webhooks in the Lob dashboard to receive real-time delivery updates:
Dashboard URL: https://dashboard.lob.com/webhooks
Events you can subscribe to:
postcard.created— Postcard entered the print queuepostcard.rendered_pdf— PDF rendered, ready for printingpostcard.rendered_thumbnails— Thumbnails generatedpostcard.deleted— Postcard canceled before printingpostcard.delivered— Postcard marked as delivered by USPSpostcard.in_transit— Postcard is in transitpostcard.in_local_area— Postcard arrived in destination areapostcard.re-routed— Postcard was reroutedpostcard.returned_to_sender— Postcard returned to sender
Webhook Payload
{
"id": "evt_abc123",
"event_type": {
"id": "postcard.delivered",
"enabled_for_test": true
},
"body": {
"id": "psc_abc123",
"tracking_events": [ ... ]
},
"date_created": "2026-04-05T09:00:00.000Z"
}
Integration with n8n
Set up an n8n webhook node to receive Lob delivery events. When a postcard.delivered event fires:
- Parse the postcard ID from the webhook payload
- Look up the contact in Attio by the stored postcard ID
- Update the contact's
direct_mail_statusfield to "delivered" - Update
direct_mail_delivered_dateto the event timestamp - Start a 3-7 day timer — if no response by then, the postcard likely did not convert
Error Handling
| HTTP Code | Meaning | Action | |-----------|---------|--------| | 200 | Success | Process tracking data | | 401 | Invalid API key | Check credentials | | 404 | Postcard not found | Check the postcard ID |
Pricing
- Tracking is included with every postcard send at no additional cost
- Webhooks are free to configure
Notes
- USPS tracking for postcards is less granular than package tracking — you may only get 2-3 events total
expected_delivery_dateis an estimate; actual delivery can vary by 1-2 days- Use the delivery date to set follow-up timers in your CRM — trigger a digital follow-up (email/LinkedIn) 3-5 days after confirmed delivery
- Attach
metadatato postcards at send time (e.g.,metadata[campaign_id]=dm-q2-2026) to make filtering and reporting easier