Pre-Built Tooling
Category | Details |
---|---|
Authentication | HTTP Basic Auth (API Key as username, blank password) |
Two-Way Sync | No |
Events Supported | No |
Realtime | Polling |
Supports Rate Limiting | Yes |
Authentication Scopes Supported | N/A (API Key) |
Objects Supported
Alloy Automation supports syncing the following objects from Lob:- Custom actions and resources (refer to Lob API documentation for available endpoints)
Set Up Guide
Trial Access
Question | Answer |
---|---|
Offers free trial? | Yes. Lob offers test API keys for development and testing at no cost. Sign up at https://dashboard.lob.com/register. |
Requires paid sandbox | No. Test mode is free and includes full API access with test data. |
Requires partnership to obtain authentication? | No. Anyone can sign up and obtain API keys. |
Authentication (HTTP Basic Auth)
Lob uses HTTP Basic Authentication where your API Key acts as the username and the password field is left blank.How to obtain your API Key
- Sign up for a Lob account at https://dashboard.lob.com/register
- Log in to your Lob Dashboard at https://dashboard.lob.com
- Navigate to Settings > API Keys
- You’ll see two types of API keys:
- Test keys (prefix
test_
): For development and testing, no charges apply - Live keys (prefix
live_
): For production use, actual charges apply
- Test keys (prefix
- Copy your API key (start with test key for integration development)
- Configure in Alloy Automation:
- Authentication type: Basic Auth
- Username: Your Lob API Key (e.g.,
test_abc123...
) - Password: Leave blank (empty string)
Important Notes
- The API key must be base64-encoded as part of the Authorization header:
Authorization: Basic <base64(API_KEY:)>
- Note the colon after the API key (before encoding) - this represents the blank password
- Never commit API keys to version control or expose them in client-side code
API Documentation
- Lob API Documentation: https://docs.lob.com/
- API Reference: https://docs.lob.com/reference/introduction
- Authentication Guide: https://docs.lob.com/#authentication
Use Cases
1) Automated direct mail campaigns
Trigger personalized postcards, letters, or checks through Lob when customers reach specific milestones, abandon carts, or qualify for promotions, combining digital and physical marketing channels.2) Transactional mail automation
Automatically send physical documents like invoices, receipts, contracts, or welcome kits when transactions occur in your system, eliminating manual mailing processes.3) Address verification and enrichment
Validate and standardize addresses in your CRM, e-commerce platform, or customer database using Lob’s address verification API before shipping products or sending mail.4) Print and mail fulfillment
Integrate Lob into your order fulfillment workflow to automatically print and mail physical products like greeting cards, certificates, or promotional materials based on customer orders.5) Multi-channel customer engagement
Combine Lob’s direct mail capabilities with your digital marketing automation to create coordinated multi-channel campaigns that reach customers through both email and physical mail.API Gotchas
- Test vs Live modes: Lob maintains completely separate environments for test and live modes. Test mode uses
test_
API keys and doesn’t charge for mail, while live mode useslive_
keys and incurs actual costs. Always develop and test with test keys before switching to live keys. - Authentication format: The password field must be empty/blank when using Basic Auth. The correct format is
API_KEY:
(note the colon) before base64 encoding. Some HTTP clients may have issues with blank passwords - ensure your client properly handles this case. - Address validation requirements: Lob validates all addresses before accepting mail jobs. Invalid addresses will result in API errors. Always validate addresses using Lob’s verification endpoint before attempting to create mail pieces, or handle validation errors gracefully in your application.
- API versioning: Lob versions their API and may introduce breaking changes between versions. The current version is specified in the API URL path (e.g.,
/v1/
). Pin your integration to a specific version and test thoroughly before upgrading. - Idempotency: Lob supports idempotency keys to prevent duplicate mail sends if a request is retried. Use the
Idempotency-Key
header when creating mail to ensure the same request isn’t processed multiple times if there are network issues. - Webhooks for tracking: While the connector supports polling, Lob offers webhooks for real-time tracking events (print, transit, delivery). Consider implementing webhook listeners for more responsive tracking updates instead of frequent polling.
- Cost implications: Every successful API call in live mode that creates a mail piece incurs actual printing and postage costs. Implement proper error handling and testing to avoid accidentally creating unwanted mail pieces.
For questions or troubleshooting, contact support@runalloy.com.