Print and mail postcards, letters, checks and self-mailers, verify and autocomplete addresses, and manage address books, templates and bank accounts through Lob.
Lob ships in the w6w first-party pack. It declares 37 actions, 2 health checks, and the host runs its code in a sandbox that never sees the credential.
io.w6w.lobLob is a developer API for physical mail and address data. This app lets a workflow put a real postcard, letter, self-mailer or check in the post from any trigger, and verify the address it is going to before it does.
It covers the full lifecycle of each mailpiece: create it (inline address or a saved one, HTML or a saved template as the artwork, optionally scheduled up to 180 days ahead), list and look it up with its tracking events, and cancel it while Lob still allows. Around that it manages the address book, HTML templates and their versions, and the bank accounts checks are drawn on, including micro-deposit verification.
Address verification covers US addresses, international addresses, US autocomplete for typeahead and ZIP code lookup. Lob issues separate test and live keys against the same host, so connect one of each: a test key prints and bills nothing. The app sends an idempotency key with every mailpiece create, so a retried step does not mail twice, and it keeps a bank account’s full number out of workflow results.
Three routes to the same 37 actions. The Workflow tab is generated from Lob's own manifest and carries its real ids, so it is copy-pasteable; the Code and CLI examples are the same call for any action on any app, so every app-specific value in them is a blank you fill in.
address-create Save an address to the address book. Lob does not deduplicate: creating the same address twice makes two records.
address-delete Permanently delete a saved address from the address book. Mailpieces already created from it are unaffected.
address-list List the saved addresses in the address book, newest first, with cursor paging.
bank-account-create Register a US bank account that checks can be drawn on. It must then be verified (Verify Bank Account) before Lob will create a check from it. The returned record omits the full account number.
bank-account-delete Delete a bank account. Checks already created from it are unaffected.
bank-account-get Retrieve a bank account by id, including whether it is verified. The full account number is removed from the result (Lob echoes it back).
bank-account-list List bank accounts that checks can be drawn on, with cursor paging. The full account number is removed from the result (Lob echoes it back).
bank-account-verify Verify a bank account with the two micro-deposit amounts (in cents) or the 6-character descriptor code from the bank statement. The bank account record says which one it needs (microdeposit_type).
check-cancel Cancel a check before it goes to production. Lob documents this as possible only when the mailpiece has a send date that has not yet passed; a cancelled piece is not charged. Scheduling and cancellation are a paid-edition feature.
check-create Create and mail a check drawn on a verified bank account (or schedule it with a send date). On a live key this issues a real check; on a test key nothing is mailed.
check-get Retrieve one check by id, including its tracking events and expected delivery date.
check-list List checks sent from this account, with status, mail type, send date and metadata filters and cursor paging.
intl-verify Verify and standardize an address outside the US and US territories (use Verify US Address for those). Needs the country; pass separate fields or a free-form address. A test key returns a dummy response based on the primary line you send.
letter-cancel Cancel a letter before it goes to production. Lob documents this as possible only when the mailpiece has a send date that has not yet passed; a cancelled piece is not charged. Scheduling and cancellation are a paid-edition feature.
letter-create Create and mail a letter (or schedule it with a send date). On a live key this prints, bills and mails a real letter; on a test key nothing is mailed.
letter-get Retrieve one letter by id, including its tracking events and expected delivery date.
letter-list List letters sent from this account, with status, mail type, send date and metadata filters and cursor paging.
postcard-cancel Cancel a postcard before it goes to production. Lob documents this as possible only when the mailpiece has a send date that has not yet passed; a cancelled piece is not charged. Scheduling and cancellation are a paid-edition feature.
postcard-create Create and mail a postcard (or schedule it with a send date). On a live key this prints, bills and mails a real postcard; on a test key nothing is mailed.
postcard-get Retrieve one postcard by id, including its tracking events and expected delivery date.
postcard-list List postcards sent from this account, with status, mail type, send date and metadata filters and cursor paging.
self-mailer-create Create and mail a self-mailer (a folded piece addressed on its outside), or schedule it with a send date. On a live key this mails a real piece; on a test key nothing is mailed.
self-mailer-delete Delete a self mailer before it goes to production. Lob documents this as possible only when the mailpiece has a send date that has not yet passed; a cancelled piece is not charged. Scheduling and cancellation are a paid-edition feature.
self-mailer-get Retrieve one self mailer by id, including its tracking events and expected delivery date.
self-mailer-list List self mailers sent from this account, with status, mail type, send date and metadata filters and cursor paging.
template-create Create a reusable HTML template (its first version). Reference the returned tmpl_ id as the artwork of a postcard, letter, self-mailer or check.
template-delete Delete a template and all of its versions. Mailpieces that reference it by id will fail afterwards.
template-update Change a template's description and/or which version is published (the one mailpieces render). To change the HTML, create a new version instead.
template-version-create Add a new version (new HTML) to an existing template. It is NOT published automatically; use Update Template to publish it.
us-autocomplete Suggest up to 10 US addresses from a street-line prefix. Useful behind a typeahead field; set Only deliverable to drop unverifiable suggestions.
us-verify Verify and standardize a US address. Pass either the separate fields or one free-form address string. A test key returns a canned result rather than a real verification.
us-zip-lookup Return the cities, states and counties a 5-digit US ZIP code covers, and the ZIP type.
A workflow step names the app and the action, and the editor fills in the
connection when you pick one. This is the Step shape from the
workflow spec, carrying Lob's real ids.
{
"manifestVersion": "2",
"name": "lob-example",
"steps": [
{
"id": "address-create",
"uses": {
"app": "io.w6w.lob",
"action": "address-create",
"connection": "conn_YOUR_CONNECTION_ID"
},
"with": {
"addressLine1": "<addressLine1>"
}
}
]
}address-create address-get address-list bank-account-create bank-account-get +32 more actions available
Every app-specific value here is a blank you have to fill in. An
app action is reached through the connection that authenticates it, so the
address is a connection id, not the app id — and connections belong to your account,
so a public page cannot know yours. Create one for Lob, then fill in
the three blanks: conn_YOUR_CONNECTION_ID, the action key, and the
parameters that action declares. The call itself is real — the shape is transcribed
from the studio's own snippet builder, which prints the same kind of blanks — but
nothing in it is specific to Lob. The Workflow tab is where this app's
real ids are.
npm install @w6w/sdkyarn add @w6w/sdkpnpm add @w6w/sdkdeno add npm:@w6w/sdkimport { W6wClient, isActionRun } from "@w6w/sdk";
// Reads W6W_BASE_URL and W6W_TOKEN from the environment when omitted.
const client = new W6wClient();
const envelope = await client.run({
urn: "conn_YOUR_CONNECTION_ID",
action: "address-create",
payload: {
// name: "<value>",
// company: "<value>",
addressLine1: "<value>",
// addressLine2: "<value>",
// addressCity: "<value>",
// addressState: "<value>",
// addressZip: "<value>",
// addressCountry: "<value>",
// phone: "<value>",
// email: "<value>",
// metadata: "<value>",
},
});
if (isActionRun(envelope)) console.log(envelope.value); npm install -g @w6w/cli w6w run conn_YOUR_CONNECTION_ID --action address-create --payload '{"addressLine1":"<value>"}' Give an AI agent Lob — without giving it Lob's credentials. One MCP endpoint exposes every app, function and workflow the caller is entitled to, as tools it can discover and run. Access is granted per team while we onboard.
One tool call{
"name": "w6w_invoke",
"arguments": {
"ref": "app:io.w6w.lob#address-create",
"input": {
"addressLine1": "<addressLine1>"
}
}
}
Every tool names its target with a single ref. The
app: form above doesn't name a connection at all — the
host resolves which of the caller's Lob connections to sign
with, and refuses rather than guesses when the answer is ambiguous.
The token is attached host-side, at the moment of the call. It is never a tool argument, never in the model's context, and never in a transcript — so a prompt injection has nothing to exfiltrate.
Tools are derived per end user from what that person has actually connected and is entitled to — not one shared bot identity carrying the union of everyone's access.
Multi-step work runs on the workflow engine and returns a run handle the agent can poll — retries, branching and state survive the conversation that started them.
Lob's declared health checks are on the surface too, so an agent can tell "the vendor is down" from "your credential expired" before it burns a retry on either.
The MCP surface is part of the hosted platform. Lob itself is MIT, and the runtime that executes it is source-available (FSL).
Lob declares its own checks, so its health is a property of the app rather than something the host guesses at.
Component status from status.lob.com (served from lob.statuspage.io): the API, the Dashboard and Webhooks.