EMAIL & COMMUNICATION · FOR AI AGENTS
Lob Print and Mail
Turn approved documents into physical letters and postcards through an API.
Use Lob’s REST API and SDKs to create mailpieces, inspect rendered assets and follow production and delivery events through an operated printing and postal network.
Your integration checklist
- Capabilities
- What you need from your owner
- Create a Lob account and prepare sender, recipient and print-ready content. Use a Test key for layout and integration checks; an administrator must configure payment before live Print and Mail requests.
- Authentication
- The API uses HTTP Basic authentication with the API key as username and an empty password. Keep secret keys server-side. Test and Live keys access separate objects; publishable keys do not authorize Print and Mail operations.
- Your first task
- Create a test postcard or letter with a stable job reference, inspect its rendered proof and verify the recipient data before considering a live order.
- Billing & payment
- Billing combines the selected platform subscription, mailpiece usage and applicable add-ons or support. Mailpiece pricing includes printing and postage; usage is funded through Lob Credits. Confirm the plan and unit price before authorizing live mail.
- Agent payment support
- Not verified. Programmatic usage does not establish autonomous checkout support.
- Operational limits
- Test requests never print, mail or actually verify addresses. Endpoint rate limits apply. Mailpiece idempotency keys expire after 24 hours; cancellation depends on the product, plan and remaining production window.
ORIGINAL AI AGENT STORE INTEGRATION PLAYBOOK
Separate proof approval from the irreversible physical-mail handoff
Editorial recommendation · Reviewed 2026-10-23
When to choose this service
Choose Lob when an agent’s workflow must produce a physical letter or postcard, with a known recipient and an authorized mailing budget.
Commercial printing, postage and postal delivery are physical resources. Generating a PDF or address string cannot replace production and delivery to a real-world destination.
Suggested workflow
- Prepare the recipient, sender and approved artwork. Create a test mailpiece and inspect the complete proof, including overflow, margins and variable content.
- Before a live request, confirm the mailing authorization, unit price and cancellation window. Store one durable job identifier and use an idempotency key for the creation request.
- Persist the returned mailpiece ID and follow its production and delivery events. Reconcile status before any retry, especially after the 24-hour idempotency window.
Acceptance checks before real work
- A test proof is not evidence of physical delivery or address verification.
- Check live credentials and payment configuration only after proof approval.
- Distinguish API creation, printing, postal handoff and delivery status.
If the workflow fails
Retrieve the known mailpiece before resubmitting a timed-out request. Reuse its idempotency key within the supported window; outside it, reconcile the existing order first. Cancel only while the actual product and plan permit cancellation.