> **Building with AI coding agents?** Install the authstack plugin with one command. This equips your agent with accurate Scalekit implementation patterns.
>
> **Recommended** (the `-y` flags skip prompts, so the command runs without an interactive terminal):
> ```bash
> npx -y @scalekit-inc/cli setup -y
> ```
>
> Global:
> ```bash
> npm install -g @scalekit-inc/cli
> scalekit setup -y
> ```
>
> Supports Claude Code, Cursor, GitHub Copilot, Codex + skills for other Agent Skills-compatible agents in `~/.agents/skills`.
> Skills: integrate-agentkit, implement-saaskit, add-mcp-oauth, implement-sso, implement-scim.
> [Full setup guide](https://docs.scalekit.com/dev-kit/build-with-ai/)

---

# Connect AI agents to Lob

The Lob connector lets your AI agent act in each user's Lob account. Each user connects their own Lob API key once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 63 tools.

**Authentication:** API Key
**Categories:** Marketing, Communication
**Tools:** 63: 31 read, 21 write, 11 destructive
**Users sign in with:** API key
**Built by:** Scalekit connector
**Try it:** [Playground in the Scalekit dashboard](https://app.scalekit.com/ws/signup?sk_intent=playground&provider=LOB)

## Setup

1. ### Install the SDK

   **Node.js**

   ```bash
   npm install @scalekit-sdk/node dotenv
   ```

   **Python**

   ```bash
   pip install scalekit-sdk-python python-dotenv
   ```

2. ### Set your credentials

   Add your Scalekit credentials to your `.env` file. Find values in **[app.scalekit.com](https://app.scalekit.com)** > **Developers** > **API Credentials**.

   ```sh title=".env"
   SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
   SCALEKIT_CLIENT_ID=<your-client-id>
   SCALEKIT_CLIENT_SECRET=<your-client-secret>
   ```

3. ### Create the Lob connection

   In **AgentKit > Connections**, create a Lob connection. The name you give it is the `connection_name` your code passes. See [Configure connections](/agentkit/connections/).

## Tools

Pass the exact name to `execute_tool`, with an input like each tool's example. To ask for a tool that's missing, use the [request form](https://scalekitsupport.portal.usepylon.com/forms/request-a-connector-tool).

**Node.js**

```typescript
const result = await actions.executeTool({
  toolName: 'lob_autocomplete_us_address',
  toolInput: {
    address_prefix: '210 King',
  },
  connector: 'lob',
  identifier: 'user_123',
})
```

**Python**

```python
result = actions.execute_tool(
    tool_name="lob_autocomplete_us_address",
    tool_input={
        "address_prefix": "210 King",
    },
    connection_name="lob",
    identifier="user_123",
)
```

`result.data` is the app's response as JSON, and `result.execution_id` (`executionId` in Node.js) is the ID of the call.

### `lob_autocomplete_us_address`

Autocomplete US Address · Read-only

Suggest US street addresses that match a typed prefix, optionally filtered by city, state or ZIP.
Returns an object with `suggestions`, each holding a `primary_line`, `city`, `state` and `zip_code`.
Use autocomplete_us_address for type-ahead address entry. Use verify_us_address to confirm a full address.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `address_prefix` (`string`, required): Street number and street name typed so far, alphanumeric only. Example: `210 King`.
- `case` (`string`, optional): Casing of suggestions: `upper` (default) or `proper`. One of: `upper`, `proper`.
- `city` (`string`, optional): City to filter suggestions by. Case insensitive; partial names do not match.
- `state` (`string`, optional): State to filter suggestions by. Case insensitive.
- `valid_addresses_only` (`boolean`, optional): If true, every suggestion is a valid deliverable address. If false (default), suggestions may need verification.
- `zip_code` (`string`, optional): ZIP code to filter suggestions by. Partial entries match.

Example input: `{"address_prefix":"210 King"}`

### `lob_get_address`

Get Address · Read-only

Retrieve one saved address by ID.
Returns the address record with name, company, address lines, city, state, zip, country and metadata.
Use get_address when you already have an `adr_` ID. Use list_addresses to browse.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `address_id` (`string`, required): ID of the address, prefixed with `adr_`.

Example input: `{"address_id":"<address_id>"}`

### `lob_get_bank_account`

Get Bank Account · Read-only

Retrieve one bank account by ID.
Returns the bank account with `id`, masked `account_number`, `routing_number`, `signatory` and `verified`.
Use get_bank_account to check verification status before creating a check.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `bank_account_id` (`string`, required): ID of the bank account, prefixed with `bank_`.

Example input: `{"bank_account_id":"<bank_account_id>"}`

### `lob_get_billing_group`

Get Billing Group · Read-only

Retrieve one billing group by ID.
Returns the billing group with `id`, `name`, `description` and dates.
Use get_billing_group when you have a `bg_` ID.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `billing_group_id` (`string`, required): ID of the billing group, prefixed with `bg_`.

Example input: `{"billing_group_id":"<billing_group_id>"}`

### `lob_get_campaign`

Get Campaign · Read-only

Retrieve one campaign by ID.
Returns the campaign with `id`, `name`, `schedule_type`, `is_draft`, `creatives` and `uploads`.
Use get_campaign to inspect a campaign's state before sending it.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `campaign_id` (`string`, required): ID of the campaign, prefixed with `cmp_`.

Example input: `{"campaign_id":"<campaign_id>"}`

### `lob_get_check`

Get Check · Read-only

Retrieve one check by ID, including tracking events.
Returns the check record with `to`, `from`, `amount`, `bank_account`, `check_number`, `send_date`, `expected_delivery_date`, `tracking_events` and `url`.
Use get_check to see the status of a check you created.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `check_id` (`string`, required): ID of the check, prefixed with `chk_`.

Example input: `{"check_id":"<check_id>"}`

### `lob_get_creative`

Get Creative · Read-only

Retrieve one campaign creative by ID.
Returns the creative with `id`, `resource_type`, `details`, `template_preview_urls` and `campaigns`.
Use get_creative to inspect or preview a creative.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `creative_id` (`string`, required): ID of the creative, prefixed with `crv_`.

Example input: `{"creative_id":"<creative_id>"}`

### `lob_get_credits_balance`

Get Credits Balance · Read-only

Retrieve the Lob credits balance of the account.
Returns an object with the `balance` of Lob credits.
Use get_credits_balance to check available credits before a large mailing.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs: none.

Example input: `{}`

### `lob_get_domain`

Get Domain · Read-only

Retrieve one registered short-link domain by ID.
Returns the domain with `id`, `domain`, `status` and dates.
Use get_domain to check a domain's configuration status.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `domain_id` (`string`, required): ID of the domain, prefixed with `dom_`.

Example input: `{"domain_id":"<domain_id>"}`

### `lob_get_letter`

Get Letter · Read-only

Retrieve one letter by ID, including tracking events.
Returns the letter record with `to`, `from`, `color`, `send_date`, `expected_delivery_date`, `tracking_events`, `thumbnails` and `url`.
Use get_letter to check the status of a letter you created.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `letter_id` (`string`, required): ID of the letter, prefixed with `ltr_`.

Example input: `{"letter_id":"<letter_id>"}`

### `lob_get_link`

Get Short Link · Read-only

Retrieve one short link by ID.
Returns the link with `id`, `short_link`, `redirect_link`, `title` and `metadata`.
Use get_link when you have a link ID.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `link_id` (`string`, required): ID of the short link, prefixed with `link_`.

Example input: `{"link_id":"<link_id>"}`

### `lob_get_postcard`

Get Postcard · Read-only

Retrieve one postcard by ID, including tracking events.
Returns the postcard record with `to`, `from`, `size`, `send_date`, `expected_delivery_date`, `tracking_events`, `thumbnails` and `url`.
Use get_postcard to check the status of a postcard you created.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `postcard_id` (`string`, required): ID of the postcard, prefixed with `psc_`.

Example input: `{"postcard_id":"<postcard_id>"}`

### `lob_get_self_mailer`

Get Self Mailer · Read-only

Retrieve one self mailer by ID, including tracking events.
Returns the self mailer record with `to`, `from`, `size`, `send_date`, `expected_delivery_date`, `tracking_events` and `url`.
Use get_self_mailer to check a self mailer you created.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `self_mailer_id` (`string`, required): ID of the self mailer, prefixed with `sfm_`.

Example input: `{"self_mailer_id":"<self_mailer_id>"}`

### `lob_get_template`

Get Template · Read-only

Retrieve one template by ID, with its published version and version list.
Returns the template with `id`, `description`, `published_version`, `versions` and `metadata`.
Use get_template for a single template. Use list_templates to browse.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `template_id` (`string`, required): ID of the template, prefixed with `tmpl_`.

Example input: `{"template_id":"<template_id>"}`

### `lob_get_template_version`

Get Template Version · Read-only

Retrieve one version of a template, including its HTML.
Returns the version with `id`, `html`, `engine`, `required_vars` and `description`.
Use get_template_version to read a version's HTML. Use get_template for the template and its published version.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `template_id` (`string`, required): ID of the template, prefixed with `tmpl_`.
- `version_id` (`string`, required): ID of the template version, prefixed with `vrsn_`.

Example input: `{"template_id":"<template_id>","version_id":"<version_id>"}`

### `lob_list_addresses`

List Addresses · Read-only

List saved addresses in the address book, newest first.
Returns a list object with `data` (array of matching records), `count`, `total_count`, `next_url` and `previous_url` for paging.
Use list_addresses to browse the address book. Use get_address to fetch one saved address by ID.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `after` (`string`, optional): Pagination cursor taken from the `next_url` of a previous list response (its `after` query value). Do not combine with `before`.
- `before` (`string`, optional): Pagination cursor taken from the `previous_url` of a previous list response. Do not combine with `after`.
- `created_after` (`string`, optional): Only return resources created after this ISO 8601 date or datetime.
- `created_before` (`string`, optional): Only return resources created before this ISO 8601 date or datetime.
- `limit` (`integer`, optional): Number of results to return per page, from 1 to 100. Defaults to 10. Default: `10`.

Example input: `{}`

### `lob_list_bank_accounts`

List Bank Accounts · Read-only

List bank accounts used to pay checks, newest first.
Returns a list object with `data` (array of matching records), `count`, `total_count`, `next_url` and `previous_url` for paging.
Use list_bank_accounts to find the bank account to draw a check on.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `after` (`string`, optional): Pagination cursor taken from the `next_url` of a previous list response (its `after` query value). Do not combine with `before`.
- `before` (`string`, optional): Pagination cursor taken from the `previous_url` of a previous list response. Do not combine with `after`.
- `created_after` (`string`, optional): Only return resources created after this ISO 8601 date or datetime.
- `created_before` (`string`, optional): Only return resources created before this ISO 8601 date or datetime.
- `limit` (`integer`, optional): Number of results to return per page, from 1 to 100. Defaults to 10. Default: `10`.

Example input: `{}`

### `lob_list_billing_groups`

List Billing Groups · Read-only

List billing groups used to tag mailing usage.
Returns a list object with `data` (array of matching records), `count`, `total_count`, `next_url` and `previous_url` for paging.
Use list_billing_groups to find a billing group ID. Billing groups require activation on your Lob account.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `created_after` (`string`, optional): Only return resources created after this ISO 8601 date or datetime.
- `created_before` (`string`, optional): Only return resources created before this ISO 8601 date or datetime.
- `limit` (`integer`, optional): Number of results to return per page, from 1 to 100. Defaults to 10. Default: `10`.
- `offset` (`integer`, optional): Number of results to skip, for offset paging. Defaults to 0. Default: `0`.

Example input: `{}`

### `lob_list_campaigns`

List Campaigns · Read-only

List print-and-mail campaigns, newest first.
Returns a list object with `data` (array of matching records), `count`, `total_count`, `next_url` and `previous_url` for paging.
Use list_campaigns to browse campaigns. Use get_campaign for one campaign.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `after` (`string`, optional): Pagination cursor taken from the `next_url` of a previous list response (its `after` query value). Do not combine with `before`.
- `before` (`string`, optional): Pagination cursor taken from the `previous_url` of a previous list response. Do not combine with `after`.
- `limit` (`integer`, optional): Number of results to return per page, from 1 to 100. Defaults to 10. Default: `10`.

Example input: `{}`

### `lob_list_checks`

List Checks · Read-only

List checks, newest first, optionally filtered by status or scheduling.
Returns a list object with `data` (array of matching records), `count`, `total_count`, `next_url` and `previous_url` for paging.
Use list_checks to browse or filter sent checks. Use get_check for one record.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `after` (`string`, optional): Pagination cursor taken from the `next_url` of a previous list response (its `after` query value). Do not combine with `before`.
- `before` (`string`, optional): Pagination cursor taken from the `previous_url` of a previous list response. Do not combine with `after`.
- `created_after` (`string`, optional): Only return resources created after this ISO 8601 date or datetime.
- `created_before` (`string`, optional): Only return resources created before this ISO 8601 date or datetime.
- `limit` (`integer`, optional): Number of results to return per page, from 1 to 100. Defaults to 10. Default: `10`.
- `mail_type` (`string`, optional): Postage type: `usps_first_class` (default) or `usps_standard` (cheaper, slower, marketing only). One of: `usps_first_class`, `usps_standard`.
- `scheduled` (`boolean`, optional): `true` returns only pieces with a future or past scheduled send_date; `false` only those sent immediately.
- `sort_direction` (`string`, optional): Sort direction on `date_created`: `asc` for oldest first or `desc` for newest first. One of: `asc`, `desc`.
- `status` (`string`, optional): Filter by render status: `processed` (rendering underway), `rendered` (finished) or `failed`. One of: `processed`, `rendered`, `failed`.

Example input: `{}`

### `lob_list_domains`

List Domains · Read-only

List custom domains registered for short links.
Returns a list object with `data` (array of matching records), `count`, `total_count`, `next_url` and `previous_url` for paging.
Use list_domains to see custom short-link domains and their configuration status.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `after` (`string`, optional): Pagination cursor taken from the `next_url` of a previous list response (its `after` query value). Do not combine with `before`.
- `before` (`string`, optional): Pagination cursor taken from the `previous_url` of a previous list response. Do not combine with `after`.
- `limit` (`integer`, optional): Number of results to return per page, from 1 to 100. Defaults to 10. Default: `10`.
- `status` (`string`, optional): Filter by configuration status: `configured` or `not_configured`. One of: `configured`, `not_configured`.

Example input: `{}`

### `lob_list_letters`

List Letters · Read-only

List letters, newest first, optionally filtered by status, color, mail type or campaign.
Returns a list object with `data` (array of matching records), `count`, `total_count`, `next_url` and `previous_url` for paging.
Use list_letters to browse or filter sent letters. Use get_letter for one record.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `after` (`string`, optional): Pagination cursor taken from the `next_url` of a previous list response (its `after` query value). Do not combine with `before`.
- `before` (`string`, optional): Pagination cursor taken from the `previous_url` of a previous list response. Do not combine with `after`.
- `campaign_id` (`string`, optional): Only return resources created by this campaign (ID starts with `cmp_`).
- `color` (`boolean`, optional): `true` returns only color letters; `false` only black and white letters.
- `created_after` (`string`, optional): Only return resources created after this ISO 8601 date or datetime.
- `created_before` (`string`, optional): Only return resources created before this ISO 8601 date or datetime.
- `limit` (`integer`, optional): Number of results to return per page, from 1 to 100. Defaults to 10. Default: `10`.
- `mail_type` (`string`, optional): Postage type: `usps_first_class` (default) or `usps_standard` (cheaper, slower, marketing only). One of: `usps_first_class`, `usps_standard`.
- `scheduled` (`boolean`, optional): `true` returns only pieces with a future or past scheduled send_date; `false` only those sent immediately.
- `sort_direction` (`string`, optional): Sort direction on `date_created`: `asc` for oldest first or `desc` for newest first. One of: `asc`, `desc`.
- `status` (`string`, optional): Filter by render status: `processed` (rendering underway), `rendered` (finished) or `failed`. One of: `processed`, `rendered`, `failed`.

Example input: `{}`

### `lob_list_links`

List Short Links · Read-only

List shortened tracking links created for QR codes and mailpieces.
Returns a list object with `data` (array of matching records), `count`, `total_count`, `next_url` and `previous_url` for paging.
Use list_links to browse short links, optionally by campaign or domain. Use get_link for one link.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `after` (`string`, optional): Pagination cursor taken from the `next_url` of a previous list response (its `after` query value). Do not combine with `before`.
- `before` (`string`, optional): Pagination cursor taken from the `previous_url` of a previous list response. Do not combine with `after`.
- `campaign_id` (`string`, optional): Only return resources created by this campaign (ID starts with `cmp_`).
- `domain_id` (`string`, optional): Only return links on this registered domain ID.
- `limit` (`integer`, optional): Number of results to return per page, from 1 to 100. Defaults to 10. Default: `10`.

Example input: `{}`

### `lob_list_postcards`

List Postcards · Read-only

List postcards, newest first, optionally filtered by status, size, mail type or campaign.
Returns a list object with `data` (array of matching records), `count`, `total_count`, `next_url` and `previous_url` for paging.
Use list_postcards to browse or filter sent postcards. Use get_postcard for one record.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `after` (`string`, optional): Pagination cursor taken from the `next_url` of a previous list response (its `after` query value). Do not combine with `before`.
- `before` (`string`, optional): Pagination cursor taken from the `previous_url` of a previous list response. Do not combine with `after`.
- `campaign_id` (`string`, optional): Only return resources created by this campaign (ID starts with `cmp_`).
- `created_after` (`string`, optional): Only return resources created after this ISO 8601 date or datetime.
- `created_before` (`string`, optional): Only return resources created before this ISO 8601 date or datetime.
- `limit` (`integer`, optional): Number of results to return per page, from 1 to 100. Defaults to 10. Default: `10`.
- `mail_type` (`string`, optional): Postage type: `usps_first_class` (default) or `usps_standard` (cheaper, slower, marketing only). One of: `usps_first_class`, `usps_standard`.
- `scheduled` (`boolean`, optional): `true` returns only pieces with a future or past scheduled send_date; `false` only those sent immediately.
- `size` (`string`, optional): Only return postcards of this size: `4x6`, `6x9` or `6x11`. One of: `4x6`, `6x9`, `6x11`.
- `sort_direction` (`string`, optional): Sort direction on `date_created`: `asc` for oldest first or `desc` for newest first. One of: `asc`, `desc`.
- `status` (`string`, optional): Filter by render status: `processed` (rendering underway), `rendered` (finished) or `failed`. One of: `processed`, `rendered`, `failed`.

Example input: `{}`

### `lob_list_self_mailers`

List Self Mailers · Read-only

List self mailers, newest first, optionally filtered by status, size, mail type or campaign.
Returns a list object with `data` (array of matching records), `count`, `total_count`, `next_url` and `previous_url` for paging.
Use list_self_mailers to browse or filter sent self mailers. Use get_self_mailer for one record.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `after` (`string`, optional): Pagination cursor taken from the `next_url` of a previous list response (its `after` query value). Do not combine with `before`.
- `before` (`string`, optional): Pagination cursor taken from the `previous_url` of a previous list response. Do not combine with `after`.
- `campaign_id` (`string`, optional): Only return resources created by this campaign (ID starts with `cmp_`).
- `created_after` (`string`, optional): Only return resources created after this ISO 8601 date or datetime.
- `created_before` (`string`, optional): Only return resources created before this ISO 8601 date or datetime.
- `limit` (`integer`, optional): Number of results to return per page, from 1 to 100. Defaults to 10. Default: `10`.
- `mail_type` (`string`, optional): Postage type: `usps_first_class` (default) or `usps_standard` (cheaper, slower, marketing only). One of: `usps_first_class`, `usps_standard`.
- `scheduled` (`boolean`, optional): `true` returns only pieces with a future or past scheduled send_date; `false` only those sent immediately.
- `size` (`string`, optional): Only return self mailers of this size. One of: `6x18_bifold`, `11x9_bifold`, `12x9_bifold`, `17.75x9_trifold`.
- `sort_direction` (`string`, optional): Sort direction on `date_created`: `asc` for oldest first or `desc` for newest first. One of: `asc`, `desc`.
- `status` (`string`, optional): Filter by render status: `processed` (rendering underway), `rendered` (finished) or `failed`. One of: `processed`, `rendered`, `failed`.

Example input: `{}`

### `lob_list_template_versions`

List Template Versions · Read-only

List the versions of one template.
Returns a list object with `data` (array of matching records), `count`, `total_count`, `next_url` and `previous_url` for paging.
Use list_template_versions to see a template's revisions. Use get_template_version for one version's HTML.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `template_id` (`string`, required): ID of the template, prefixed with `tmpl_`.
- `after` (`string`, optional): Pagination cursor taken from the `next_url` of a previous list response (its `after` query value). Do not combine with `before`.
- `before` (`string`, optional): Pagination cursor taken from the `previous_url` of a previous list response. Do not combine with `after`.
- `created_after` (`string`, optional): Only return resources created after this ISO 8601 date or datetime.
- `created_before` (`string`, optional): Only return resources created before this ISO 8601 date or datetime.
- `limit` (`integer`, optional): Number of results to return per page, from 1 to 100. Defaults to 10. Default: `10`.

Example input: `{"template_id":"<template_id>"}`

### `lob_list_templates`

List Templates · Read-only

List HTML templates, newest first.
Returns a list object with `data` (array of matching records), `count`, `total_count`, `next_url` and `previous_url` for paging.
Use list_templates to find reusable artwork. Use get_template for one template including its versions.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `after` (`string`, optional): Pagination cursor taken from the `next_url` of a previous list response (its `after` query value). Do not combine with `before`.
- `before` (`string`, optional): Pagination cursor taken from the `previous_url` of a previous list response. Do not combine with `after`.
- `created_after` (`string`, optional): Only return resources created after this ISO 8601 date or datetime.
- `created_before` (`string`, optional): Only return resources created before this ISO 8601 date or datetime.
- `limit` (`integer`, optional): Number of results to return per page, from 1 to 100. Defaults to 10. Default: `10`.

Example input: `{}`

### `lob_lookup_zip_code`

Look Up ZIP Code · Read-only

Look up the cities and state that belong to a 5-digit US ZIP code.
Returns an object with `zip_code`, `zip_code_type` and `cities` (each with city name, state and preferred flag).
Use lookup_zip_code to resolve a ZIP into city and state. Use verify_us_address to validate a full address.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `zip_code` (`string`, required): A 5-digit US ZIP code.

Example input: `{"zip_code":"<zip_code>"}`

### `lob_reverse_geocode`

Reverse Geocode Location · Read-only

Find the US addresses closest to a latitude and longitude.
Returns an object with `addresses`, each a verified US address with components and the distance from the point.
Use reverse_geocode to turn coordinates into mailable US addresses.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `latitude` (`number`, required): Latitude in decimal degrees, from -90 to 90.
- `longitude` (`number`, required): Longitude in decimal degrees, from -180 to 180.
- `size` (`integer`, optional): Number of locations to return, 1 to 50. Defaults to 5. Default: `5`.

Example input: `{"latitude":1,"longitude":1}`

### `lob_verify_intl_address`

Verify International Address · Read-only

Verify an address outside the US and return it in a standardized format.
Returns the standardized address lines, `deliverability`, `status`, `coverage` and parsed `components`.
Use verify_intl_address for non-US addresses. Use verify_us_address for US addresses.
Provide either `address` as a freeform string, or `primary_line` with the other fields. `country` is always required.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `country` (`string`, required): Two-letter ISO 3166 country code of the address.
- `address` (`string`, optional): The whole address as one freeform string, used instead of the separate fields.
- `city` (`string`, optional): City of the address.
- `postal_code` (`string`, optional): Postal code of the address.
- `primary_line` (`string`, optional): Street line of the address. Required unless `address` is given.
- `recipient` (`string`, optional): Name of the recipient or company.
- `secondary_line` (`string`, optional): Second address line such as unit or suite.
- `state` (`string`, optional): State, province or region.

Example input: `{"country":"<country>"}`

### `lob_verify_us_address`

Verify US Address · Read-only

Verify and standardize a US address, checking it against USPS data.
Returns the standardized address lines, `deliverability` (deliverable, deliverable_unnecessary_unit, deliverable_incorrect_unit, deliverable_missing_unit or undeliverable), `valid_address` and parsed `components`.
Use verify_us_address before mailing to a US address. Use verify_intl_address for non-US addresses and autocomplete_us_address to suggest completions as a user types.
Provide either `address` as one freeform line, or `primary_line` with `city`, `state` and `zip_code`.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `address` (`string`, optional): The whole address as one freeform string, used instead of the separate fields. Example: `210 King St San Francisco CA 94107`.
- `case` (`string`, optional): Casing of the returned address: `upper` (default) or `proper`. One of: `upper`, `proper`.
- `city` (`string`, optional): City. Required with `primary_line` unless a `zip_code` is given.
- `primary_line` (`string`, optional): Street line of the address (number and street, or PO box). Required unless `address` is given.
- `recipient` (`string`, optional): Name of the recipient or company.
- `secondary_line` (`string`, optional): Apartment, suite or unit line.
- `state` (`string`, optional): Two-letter state code. Required with `primary_line` unless a `zip_code` is given.
- `urbanization` (`string`, optional): Urbanization code, used for Puerto Rico addresses only.
- `zip_code` (`string`, optional): 5 or 9 digit ZIP code. Required with `primary_line` unless city and state are given.

Example input: `{}`

### `lob_create_address`

Create Address · Write

Save a new address in the address book so it can be reused as a sender or recipient.
Returns the saved address with its `id` (starts with `adr_`) and normalized fields.
Use create_address to store an address for reuse. Use verify_us_address to check deliverability first; this tool does not verify.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `address_line1` (`string`, required): First line of the street address.
- `address_city` (`string`, optional): City. Required for US addresses.
- `address_country` (`string`, optional): Two-letter ISO 3166 country code. Defaults to `US`. Required for non-US addresses.
- `address_line2` (`string`, optional): Second line of the address, such as suite or unit.
- `address_state` (`string`, optional): Two-letter state code for US addresses, or the province or region elsewhere. Required for US addresses.
- `address_zip` (`string`, optional): ZIP code. Required for US addresses.
- `company` (`string`, optional): Company name. Required if `name` is not given.
- `description` (`string`, optional): Internal description for this resource, up to 255 characters.
- `email` (`string`, optional): Email address of the recipient, up to 100 characters.
- `metadata` (`object`, optional): Custom key-value pairs for tagging this resource (up to 20 pairs; keys up to 40 characters, values up to 500 characters; string values only). Example: {"customer_id": "cus_42"}.
- `name` (`string`, optional): Full name of the recipient. Required if `company` is not given.
- `phone` (`string`, optional): Phone number of the recipient, up to 40 characters.

Example input: `{"address_line1":"<address_line1>"}`

### `lob_create_bank_account`

Create Bank Account · Write

Register a US bank account for printing checks. The account must be verified before use.
Returns the bank account with `id` (starts with `bank_`), masked account number, `signatory` and `verified` status.
Use create_bank_account once per account, then verify_bank_account with the two micro-deposit amounts. Handles sensitive banking data.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `account_number` (`string`, required): Bank account number.
- `account_type` (`string`, required): Type of account holder: `company` or `individual`. One of: `company`, `individual`.
- `routing_number` (`string`, required): Valid 9-digit US routing number.
- `signatory` (`string`, required): Name of the signatory printed on checks.
- `check_template` (`string`, optional): Check template: `common` (default) or `jpm` for JP Morgan Chase Positive Pay. One of: `common`, `jpm`.
- `city` (`string`, optional): City of the home bank. Required for the `jpm` template only.
- `description` (`string`, optional): Internal description for this resource, up to 255 characters.
- `fractional_routing_number` (`string`, optional): Fractional routing number of the home bank. Required for the `jpm` template only.
- `metadata` (`object`, optional): Custom key-value pairs for tagging this resource (up to 20 pairs; keys up to 40 characters, values up to 500 characters; string values only). Example: {"customer_id": "cus_42"}.
- `state` (`string`, optional): State of the home bank. Required for the `jpm` template only.
- `zipcode` (`string`, optional): ZIP code of the home bank. Required for the `jpm` template only.

Example input: `{"account_number":"<account_number>","account_type":"company","routing_number":"<routing_number>","signatory":"<signatory>"}`

### `lob_create_billing_group`

Create Billing Group · Write

Create a billing group to tag mailpieces and usage for billing.
Returns the billing group with `id` (starts with `bg_`), `name` and `description`.
Use create_billing_group to organize spend, then pass its ID as billing_group_id when creating mailpieces.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `name` (`string`, required): Name of the billing group.
- `description` (`string`, optional): Description of the billing group.

Example input: `{"name":"<name>"}`

### `lob_create_campaign`

Create Campaign · Write

Create a draft campaign that groups creatives and an audience for a bulk mailing.
Returns the campaign with `id` (starts with `cmp_`), `name`, `schedule_type`, `is_draft` and its creatives.
Use create_campaign to start a bulk mailing, then attach creatives with create_creative and send it with send_campaign.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `name` (`string`, required): Name of the campaign.
- `schedule_type` (`string`, required): How the campaign is scheduled. Only `immediate` is available today. One of: `immediate`.
- `use_type` (`string`, required): Purpose of the mailpieces: `marketing` or `operational`. One of: `marketing`, `operational`.
- `auto_cancel_if_ncoa` (`boolean`, optional): Automatically cancel a mailpiece instead of sending it if its address changed via NCOA.
- `billing_group_id` (`string`, optional): ID of a billing group (starts with `bg_`) to tag usage with. Requires special activation on your Lob account.
- `cancel_window_campaign_minutes` (`integer`, optional): Minutes after sending during which the campaign can still be canceled.
- `description` (`string`, optional): Internal description for this resource, up to 255 characters.
- `metadata` (`object`, optional): Custom key-value pairs for tagging this resource (up to 20 pairs; keys up to 40 characters, values up to 500 characters; string values only). Example: {"customer_id": "cus_42"}.
- `print_speed` (`string`, optional): Production speed. Only `core` (2 production business days) is available. One of: `core`.
- `send_date` (`string`, optional): Date to send the campaign (ISO 8601), used with scheduled-send scheduling.
- `target_delivery_date` (`string`, optional): Target delivery date for the mailpieces (ISO 8601 date), used with target-delivery scheduling.

Example input: `{"name":"<name>","schedule_type":"immediate","use_type":"marketing"}`

### `lob_create_check`

Create Check · Write

Create and mail a physical check drawn on a verified bank account. In live mode this mails a real check and is billed.
Returns the check with `id` (starts with `chk_`), `to`, `from`, `amount`, `bank_account`, `check_number`, `expected_delivery_date`, `thumbnails` and `url`.
Use create_check to pay someone by mail. The bank account must first be created with create_bank_account and verified with verify_bank_account.
Provide either `message` (printed under the check) or `check_bottom` artwork.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `amount` (`number`, required): Payment amount in US dollars, up to 999999.99, rounded to two decimals.
- `bank_account` (`string`, required): ID of a verified bank account (starts with `bank_`) the check is drawn on.
- `from` (`string`, required): Sender address. Either the ID of a saved address (starts with `adr_`) or an inline address object. An inline object needs name, address_line1, address_city, address_state and address_zip for US addresses, or address_line1 and address_country for international ones; address_line2, company, phone and email are optional. Example: {"name": "Ada Lovelace", "address_line1": "210 King St", "address_city": "San Francisco", "address_state": "CA", "address_zip": "94107"}.
- `to` (`string`, required): Payee address. Checks can only be sent within the US. Either the ID of a saved address (starts with `adr_`) or an inline address object. An inline object needs name, address_line1, address_city, address_state and address_zip for US addresses, or address_line1 and address_country for international ones; address_line2, company, phone and email are optional. Example: {"name": "Ada Lovelace", "address_line1": "210 King St", "address_city": "San Francisco", "address_state": "CA", "address_zip": "94107"}.
- `use_type` (`string`, required): Declares the purpose of the mailpiece: `marketing` or `operational`. Required by Lob unless your account has a default use type set. One of: `marketing`, `operational`.
- `attachment` (`string`, optional): Document to include with the check: HTML, a template ID or a URL to a PDF.
- `billing_group_id` (`string`, optional): ID of a billing group (starts with `bg_`) to tag usage with. Requires special activation on your Lob account.
- `check_bottom` (`string`, optional): Artwork for the bottom of the check page: HTML, a template ID or a URL to a PDF, PNG or JPG. Required if `message` is not given.
- `check_number` (`integer`, optional): Check number, up to 500000000. If omitted, numbering starts at 10000 and increments.
- `description` (`string`, optional): Internal description for this resource, up to 255 characters.
- `idempotency_key` (`string`, optional): Unique string (up to 256 characters) that makes the create call safe to retry; repeating it returns the original resource instead of mailing twice.
- `logo` (`string`, optional): URL of an image printed in grayscale in the upper-left corner of the check.
- `mail_type` (`string`, optional): Checks are always sent `usps_first_class`; leave empty. One of: `usps_first_class`.
- `memo` (`string`, optional): Text for the memo line of the check.
- `merge_variables` (`object`, optional): Values for the merge variables in your HTML template or QR code redirect URL, as a JSON object. Example: {"first_name": "Ada"}.
- `message` (`string`, optional): Text printed at the bottom of the check page, up to 400 characters. Required if `check_bottom` is not given.
- `metadata` (`object`, optional): Custom key-value pairs for tagging this resource (up to 20 pairs; keys up to 40 characters, values up to 500 characters; string values only). Example: {"customer_id": "cus_42"}.
- `print_speed` (`string`, optional): Production speed. Only `core` (2 production business days) is available. One of: `core`.
- `send_date` (`string`, optional): ISO 8601 date or datetime, after now and up to 180 days ahead, at which to send the piece to production. Omit to send immediately.
- `service_request_number` (`string`, optional): Service request number of an approved USPS promotion to apply to this mailpiece.

Example input: `{"amount":1,"bank_account":"<bank_account>","from":"<from>","to":"<to>","use_type":"marketing"}`

### `lob_create_creative`

Create Creative · Write

Create the artwork for a campaign: a postcard, letter or self mailer design.
Returns the creative with `id` (starts with `crv_`), `resource_type`, `details` and preview URLs.
Use create_creative to attach artwork to a draft campaign. Use update_creative to change its description or sender.
Give `front` and `back` for postcards, `file` for letters, or `inside` and `outside` for self mailers.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `campaign_id` (`string`, required): ID of the campaign this creative belongs to (starts with `cmp_`).
- `details` (`object`, required): Settings for the mailpiece type. For a postcard, for example, `size`; for a letter `color` and `double_sided`; for a self mailer `size`. Example: {"size": "4x6"}.
- `resource_type` (`string`, required): Type of mailpiece: `postcard`, `letter` or `self_mailer`. One of: `postcard`, `letter`, `self_mailer`.
- `back` (`string`, optional): Postcard back artwork (HTML, template ID or URL). Postcards only.
- `description` (`string`, optional): Internal description for this resource, up to 255 characters.
- `file` (`string`, optional): Letter artwork (HTML, template ID or PDF URL). Letters only.
- `from` (`string`, optional): Sender address. Either the ID of a saved address (starts with `adr_`) or an inline address object. An inline object needs name, address_line1, address_city, address_state and address_zip for US addresses, or address_line1 and address_country for international ones; address_line2, company, phone and email are optional. Example: {"name": "Ada Lovelace", "address_line1": "210 King St", "address_city": "San Francisco", "address_state": "CA", "address_zip": "94107"}.
- `front` (`string`, optional): Postcard front artwork (HTML, template ID or URL). Postcards only.
- `inside` (`string`, optional): Self mailer inside artwork (HTML, template ID or URL). Self mailers only.
- `metadata` (`object`, optional): Custom key-value pairs for tagging this resource (up to 20 pairs; keys up to 40 characters, values up to 500 characters; string values only). Example: {"customer_id": "cus_42"}.
- `outside` (`string`, optional): Self mailer outside artwork (HTML, template ID or URL). Self mailers only.

Example input: `{"campaign_id":"<campaign_id>","details":{"size":"4x6"},"resource_type":"postcard"}`

### `lob_create_domain`

Create Domain · Write

Register a custom domain for short links.
Returns the domain with `id`, `domain`, `status` and `error_redirect_link`.
Use create_domain to add a branded short-link domain, then configure its DNS.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `domain` (`string`, required): The domain or hostname to register.
- `error_redirect_link` (`string`, optional): URL to redirect visitors to when a short link is broken or inactive.

Example input: `{"domain":"<domain>"}`

### `lob_create_letter`

Create Letter · Write

Create and mail a letter. In live mode this prints and mails a real piece and is billed.
Returns the letter with `id` (starts with `ltr_`), `to`, `from`, `color`, `expected_delivery_date`, `tracking_number` where applicable, `thumbnails` and `url`.
Use create_letter to send a letter. Use create_postcard for postcards and create_check for checks.
Test API keys render a proof without mailing anything.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `color` (`boolean`, required): `true` to print in color, `false` for black and white.
- `file` (`string`, required): Artwork for the letter pages (PDF pages must be 8.5x11 inches): an HTML string (up to 10,000 characters), a template ID (starts with `tmpl_`), or a publicly reachable URL to a PDF, PNG or JPG file of the correct dimensions.
- `from` (`string`, required): Sender address (a US address unless a custom envelope is used). Either the ID of a saved address (starts with `adr_`) or an inline address object. An inline object needs name, address_line1, address_city, address_state and address_zip for US addresses, or address_line1 and address_country for international ones; address_line2, company, phone and email are optional. Example: {"name": "Ada Lovelace", "address_line1": "210 King St", "address_city": "San Francisco", "address_state": "CA", "address_zip": "94107"}.
- `to` (`string`, required): Recipient address. Either the ID of a saved address (starts with `adr_`) or an inline address object. An inline object needs name, address_line1, address_city, address_state and address_zip for US addresses, or address_line1 and address_country for international ones; address_line2, company, phone and email are optional. Example: {"name": "Ada Lovelace", "address_line1": "210 King St", "address_city": "San Francisco", "address_state": "CA", "address_zip": "94107"}.
- `use_type` (`string`, required): Declares the purpose of the mailpiece: `marketing` or `operational`. Required by Lob unless your account has a default use type set. One of: `marketing`, `operational`.
- `address_placement` (`string`, optional): Where the address block sits for the window envelope: `top_first_page` (default), `insert_blank_page`, `bottom_first_page_center` or `bottom_first_page`. One of: `top_first_page`, `insert_blank_page`, `bottom_first_page_center`, `bottom_first_page`.
- `billing_group_id` (`string`, optional): ID of a billing group (starts with `bg_`) to tag usage with. Requires special activation on your Lob account.
- `custom_envelope` (`string`, optional): ID of a custom envelope with available inventory. The letter is not sent if there is none.
- `description` (`string`, optional): Internal description for this resource, up to 255 characters.
- `double_sided` (`boolean`, optional): `true` (default) prints on both sides of each sheet, `false` on one side.
- `extra_service` (`string`, optional): Add `certified`, `certified_return_receipt` or `registered` delivery. Not allowed with `usps_standard` mail. One of: `certified`, `certified_return_receipt`, `registered`.
- `fsc` (`boolean`, optional): Beta: print the mailpiece on Forest Stewardship Council certified paper. Contact Lob to enable.
- `idempotency_key` (`string`, optional): Unique string (up to 256 characters) that makes the create call safe to retry; repeating it returns the original resource instead of mailing twice.
- `mail_type` (`string`, optional): Postage type: `usps_first_class` (default) or `usps_standard` (cheaper, slower, marketing only). One of: `usps_first_class`, `usps_standard`.
- `merge_variables` (`object`, optional): Values for the merge variables in your HTML template or QR code redirect URL, as a JSON object. Example: {"first_name": "Ada"}.
- `metadata` (`object`, optional): Custom key-value pairs for tagging this resource (up to 20 pairs; keys up to 40 characters, values up to 500 characters; string values only). Example: {"customer_id": "cus_42"}.
- `perforated_page` (`integer`, optional): Page number to perforate for the return envelope, at least 1. Required when `return_envelope` is true.
- `print_speed` (`string`, optional): Production speed. Only `core` (2 production business days) is available. One of: `core`.
- `qr_code` (`object`, optional): Places a QR code on the artwork. Give a position (for example `top_left`, `bottom_right`) or explicit offsets, a redirect_url the code points to, and optionally width and pages. Example: {"position": "bottom_right", "redirect_url": "https://example.com/offer", "width": "1.5"}.
- `return_envelope` (`boolean`, optional): `true` includes a return envelope (then set `perforated_page`), or give a custom return envelope ID if your account has them.
- `send_date` (`string`, optional): ISO 8601 date or datetime, after now and up to 180 days ahead, at which to send the piece to production. Omit to send immediately.
- `service_request_number` (`string`, optional): Service request number of an approved USPS promotion to apply to this mailpiece.
- `size` (`string`, optional): Letter size: `us_letter` (default) or `us_legal`. One of: `us_letter`, `us_legal`.

Example input: `{"color":true,"file":"<file>","from":"<from>","to":"<to>","use_type":"marketing"}`

### `lob_create_link`

Create Short Link · Write

Create a shortened, trackable link that redirects to a target URL.
Returns the link with `id`, `short_link`, `redirect_link`, `domain_id` and `title`.
Use create_link to build a short URL for a mailpiece. Use list_domains to see which custom domains are available.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `redirect_link` (`string`, required): The original target URL the short link redirects to.
- `domain` (`string`, optional): Registered domain for the short URL. Defaults to `lob.st`.
- `metadata` (`object`, optional): Custom key-value pairs for tagging this resource (up to 20 pairs; keys up to 40 characters, values up to 500 characters; string values only). Example: {"customer_id": "cus_42"}.
- `slug` (`string`, optional): Path of the short URL. A unique path is generated if empty.
- `title` (`string`, optional): Title of the link.

Example input: `{"redirect_link":"<redirect_link>"}`

### `lob_create_postcard`

Create Postcard · Write

Create and mail a postcard. In live mode this prints and mails a real piece and is billed.
Returns the postcard with `id` (starts with `psc_`), `to`, `from`, `size`, `expected_delivery_date`, `thumbnails`, `url` and `carrier`.
Use create_postcard to send a postcard. Use create_letter for letters and create_self_mailer for folded mailers.
Test API keys render a proof without mailing anything.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `back` (`string`, required): Artwork for the back of the postcard: an HTML string (up to 10,000 characters), a template ID (starts with `tmpl_`), or a publicly reachable URL to a PDF, PNG or JPG file of the correct dimensions.
- `front` (`string`, required): Artwork for the front of the postcard: an HTML string (up to 10,000 characters), a template ID (starts with `tmpl_`), or a publicly reachable URL to a PDF, PNG or JPG file of the correct dimensions.
- `to` (`string`, required): Recipient address. Either the ID of a saved address (starts with `adr_`) or an inline address object. An inline object needs name, address_line1, address_city, address_state and address_zip for US addresses, or address_line1 and address_country for international ones; address_line2, company, phone and email are optional. Example: {"name": "Ada Lovelace", "address_line1": "210 King St", "address_city": "San Francisco", "address_state": "CA", "address_zip": "94107"}.
- `use_type` (`string`, required): Declares the purpose of the mailpiece: `marketing` or `operational`. Required by Lob unless your account has a default use type set. One of: `marketing`, `operational`.
- `billing_group_id` (`string`, optional): ID of a billing group (starts with `bg_`) to tag usage with. Requires special activation on your Lob account.
- `description` (`string`, optional): Internal description for this resource, up to 255 characters.
- `from` (`string`, optional): Sender address, required if the recipient is international. Either the ID of a saved address (starts with `adr_`) or an inline address object. An inline object needs name, address_line1, address_city, address_state and address_zip for US addresses, or address_line1 and address_country for international ones; address_line2, company, phone and email are optional. Example: {"name": "Ada Lovelace", "address_line1": "210 King St", "address_city": "San Francisco", "address_state": "CA", "address_zip": "94107"}.
- `fsc` (`boolean`, optional): Beta: print the mailpiece on Forest Stewardship Council certified paper. Contact Lob to enable.
- `idempotency_key` (`string`, optional): Unique string (up to 256 characters) that makes the create call safe to retry; repeating it returns the original resource instead of mailing twice.
- `mail_type` (`string`, optional): Postage type: `usps_first_class` (default) or `usps_standard` (cheaper, slower, marketing only). One of: `usps_first_class`, `usps_standard`.
- `merge_variables` (`object`, optional): Values for the merge variables in your HTML template or QR code redirect URL, as a JSON object. Example: {"first_name": "Ada"}.
- `metadata` (`object`, optional): Custom key-value pairs for tagging this resource (up to 20 pairs; keys up to 40 characters, values up to 500 characters; string values only). Example: {"customer_id": "cus_42"}.
- `print_speed` (`string`, optional): Production speed. Only `core` (2 production business days) is available. One of: `core`.
- `qr_code` (`object`, optional): Places a QR code on the artwork. Give a position (for example `top_left`, `bottom_right`) or explicit offsets, a redirect_url the code points to, and optionally width and pages. Example: {"position": "bottom_right", "redirect_url": "https://example.com/offer", "width": "1.5"}.
- `send_date` (`string`, optional): ISO 8601 date or datetime, after now and up to 180 days ahead, at which to send the piece to production. Omit to send immediately.
- `service_request_number` (`string`, optional): Service request number of an approved USPS promotion to apply to this mailpiece.
- `size` (`string`, optional): Postcard size: `4x6` (default), `6x9` or `6x11`. Only 4x6 can go to international addresses. One of: `4x6`, `6x9`, `6x11`.

Example input: `{"back":"<back>","front":"<front>","to":"<to>","use_type":"marketing"}`

### `lob_create_self_mailer`

Create Self Mailer · Write

Create and mail a folded self mailer. In live mode this prints and mails a real piece and is billed.
Returns the self mailer with `id` (starts with `sfm_`), `to`, `from`, `size`, `expected_delivery_date`, `thumbnails` and `url`.
Use create_self_mailer for bifold or trifold mailers. Use create_postcard for single-card pieces.
Test API keys render a proof without mailing anything.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `inside` (`string`, required): Artwork for the inside of the self mailer: an HTML string (up to 10,000 characters), a template ID (starts with `tmpl_`), or a publicly reachable URL to a PDF, PNG or JPG file of the correct dimensions.
- `outside` (`string`, required): Artwork for the outside of the self mailer: an HTML string (up to 10,000 characters), a template ID (starts with `tmpl_`), or a publicly reachable URL to a PDF, PNG or JPG file of the correct dimensions.
- `to` (`string`, required): Recipient address. Either the ID of a saved address (starts with `adr_`) or an inline address object. An inline object needs name, address_line1, address_city, address_state and address_zip for US addresses, or address_line1 and address_country for international ones; address_line2, company, phone and email are optional. Example: {"name": "Ada Lovelace", "address_line1": "210 King St", "address_city": "San Francisco", "address_state": "CA", "address_zip": "94107"}.
- `use_type` (`string`, required): Declares the purpose of the mailpiece: `marketing` or `operational`. Required by Lob unless your account has a default use type set. One of: `marketing`, `operational`.
- `billing_group_id` (`string`, optional): ID of a billing group (starts with `bg_`) to tag usage with. Requires special activation on your Lob account.
- `description` (`string`, optional): Internal description for this resource, up to 255 characters.
- `from` (`string`, optional): Sender address, required if the recipient is international. Either the ID of a saved address (starts with `adr_`) or an inline address object. An inline object needs name, address_line1, address_city, address_state and address_zip for US addresses, or address_line1 and address_country for international ones; address_line2, company, phone and email are optional. Example: {"name": "Ada Lovelace", "address_line1": "210 King St", "address_city": "San Francisco", "address_state": "CA", "address_zip": "94107"}.
- `fsc` (`boolean`, optional): Beta: print the mailpiece on Forest Stewardship Council certified paper. Contact Lob to enable.
- `idempotency_key` (`string`, optional): Unique string (up to 256 characters) that makes the create call safe to retry; repeating it returns the original resource instead of mailing twice.
- `mail_type` (`string`, optional): Postage type: `usps_first_class` (default) or `usps_standard` (cheaper, slower, marketing only). One of: `usps_first_class`, `usps_standard`.
- `merge_variables` (`object`, optional): Values for the merge variables in your HTML template or QR code redirect URL, as a JSON object. Example: {"first_name": "Ada"}.
- `metadata` (`object`, optional): Custom key-value pairs for tagging this resource (up to 20 pairs; keys up to 40 characters, values up to 500 characters; string values only). Example: {"customer_id": "cus_42"}.
- `print_speed` (`string`, optional): Production speed. Only `core` (2 production business days) is available. One of: `core`.
- `qr_code` (`object`, optional): Places a QR code on the artwork. Give a position (for example `top_left`, `bottom_right`) or explicit offsets, a redirect_url the code points to, and optionally width and pages. Example: {"position": "bottom_right", "redirect_url": "https://example.com/offer", "width": "1.5"}.
- `send_date` (`string`, optional): ISO 8601 date or datetime, after now and up to 180 days ahead, at which to send the piece to production. Omit to send immediately.
- `service_request_number` (`string`, optional): Service request number of an approved USPS promotion to apply to this mailpiece.
- `size` (`string`, optional): Self mailer size: `6x18_bifold` (default), `11x9_bifold`, `12x9_bifold` or `17.75x9_trifold` (beta). One of: `6x18_bifold`, `11x9_bifold`, `12x9_bifold`, `17.75x9_trifold`.

Example input: `{"inside":"<inside>","outside":"<outside>","to":"<to>","use_type":"marketing"}`

### `lob_create_template`

Create Template · Write

Create a reusable HTML template that can be used as artwork for mailpieces.
Returns the template with `id` (starts with `tmpl_`), `published_version` and a `versions` array holding the first version.
Use create_template to start a new template. Use create_template_version to add a revision to an existing one.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `html` (`string`, required): HTML for the first published version, under 100,000 characters. Use {{variable}} placeholders for merge variables.
- `description` (`string`, optional): Internal description for this resource, up to 255 characters.
- `engine` (`string`, optional): Template engine used to merge variables: `legacy` (default, Lob's original engine) or `handlebars`. One of: `legacy`, `handlebars`.
- `metadata` (`object`, optional): Custom key-value pairs for tagging this resource (up to 20 pairs; keys up to 40 characters, values up to 500 characters; string values only). Example: {"customer_id": "cus_42"}.
- `required_vars` (`array`, optional): Variables the template needs when used. Only for `handlebars` templates. Example: ["first_name", "offer_code"].

Example input: `{"html":"<html>"}`

### `lob_create_template_version`

Create Template Version · Write

Add a new version with new HTML to an existing template.
Returns the new version with `id` (starts with `vrsn_`), `html`, `engine` and `required_vars`.
Use create_template_version to revise a template's HTML. The new version is not published until update_template sets it as the published version.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `html` (`string`, required): HTML for the new version, under 100,000 characters.
- `template_id` (`string`, required): ID of the template, prefixed with `tmpl_`.
- `description` (`string`, optional): Internal description for this resource, up to 255 characters.
- `engine` (`string`, optional): Template engine used to merge variables: `legacy` (default, Lob's original engine) or `handlebars`. One of: `legacy`, `handlebars`.
- `required_vars` (`array`, optional): Variables the template needs when used. Only for `handlebars` templates. Example: ["first_name", "offer_code"].

Example input: `{"html":"<html>","template_id":"<template_id>"}`

### `lob_send_campaign`

Send Campaign · Write

Send a campaign, which prints and mails its pieces to the audience. In live mode this is billed and cannot be undone after the cancel window.
Returns the campaign with its updated scheduling state.
Use send_campaign after creatives and audience are ready. Use get_campaign first to verify.
The campaign needs at least one creative and an uploaded audience.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `campaign_id` (`string`, required): ID of the campaign, prefixed with `cmp_`.

Example input: `{"campaign_id":"<campaign_id>"}`

### `lob_update_billing_group`

Update Billing Group · Write

Update a billing group's name or description.
Returns the updated billing group.
Use update_billing_group to rename a group without changing its ID.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `billing_group_id` (`string`, required): ID of the billing group, prefixed with `bg_`.
- `description` (`string`, optional): Description of the billing group.
- `name` (`string`, optional): Name of the billing group.

Example input: `{"billing_group_id":"<billing_group_id>"}`

### `lob_update_campaign`

Update Campaign · Write

Update a campaign's name, scheduling or settings.
Returns the updated campaign.
Use update_campaign to change a draft campaign. Use send_campaign to launch it.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `campaign_id` (`string`, required): ID of the campaign, prefixed with `cmp_`.
- `auto_cancel_if_ncoa` (`boolean`, optional): Automatically cancel a mailpiece instead of sending it if its address changed via NCOA.
- `cancel_window_campaign_minutes` (`integer`, optional): Minutes after sending during which the campaign can still be canceled.
- `description` (`string`, optional): Internal description for this resource, up to 255 characters.
- `is_draft` (`boolean`, optional): Whether the campaign is still a draft. Leave empty or `false`.
- `metadata` (`object`, optional): Custom key-value pairs for tagging this resource (up to 20 pairs; keys up to 40 characters, values up to 500 characters; string values only). Example: {"customer_id": "cus_42"}.
- `name` (`string`, optional): New name of the campaign.
- `schedule_type` (`string`, optional): How the campaign is scheduled. Only `immediate` is available today. One of: `immediate`.
- `send_date` (`string`, optional): Date to send the campaign (ISO 8601), used with scheduled-send scheduling.
- `target_delivery_date` (`string`, optional): Target delivery date for the mailpieces (ISO 8601 date), used with target-delivery scheduling.
- `use_type` (`string`, optional): Purpose of the mailpieces: `marketing` or `operational`. One of: `marketing`, `operational`.

Example input: `{"campaign_id":"<campaign_id>"}`

### `lob_update_creative`

Update Creative · Write

Update a creative's sender address, description or metadata.
Returns the updated creative.
Use update_creative for these fields; artwork changes need a new creative from create_creative.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `creative_id` (`string`, required): ID of the creative, prefixed with `crv_`.
- `description` (`string`, optional): Internal description for this resource, up to 255 characters.
- `from` (`string`, optional): Sender address. Either the ID of a saved address (starts with `adr_`) or an inline address object. An inline object needs name, address_line1, address_city, address_state and address_zip for US addresses, or address_line1 and address_country for international ones; address_line2, company, phone and email are optional. Example: {"name": "Ada Lovelace", "address_line1": "210 King St", "address_city": "San Francisco", "address_state": "CA", "address_zip": "94107"}.
- `metadata` (`object`, optional): Custom key-value pairs for tagging this resource (up to 20 pairs; keys up to 40 characters, values up to 500 characters; string values only). Example: {"customer_id": "cus_42"}.

Example input: `{"creative_id":"<creative_id>"}`

### `lob_update_link`

Update Short Link · Write

Change the destination, title or metadata of a short link.
Returns the updated link.
Use update_link to repoint a link without changing its short URL.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `link_id` (`string`, required): ID of the short link, prefixed with `link_`.
- `redirect_link` (`string`, required): The new target URL. Required by Lob on every update.
- `metadata` (`object`, optional): Custom key-value pairs for tagging this resource (up to 20 pairs; keys up to 40 characters, values up to 500 characters; string values only). Example: {"customer_id": "cus_42"}.
- `title` (`string`, optional): New title of the link.

Example input: `{"link_id":"<link_id>","redirect_link":"<redirect_link>"}`

### `lob_update_template`

Update Template · Write

Update a template's description or switch which version is published.
Returns the updated template with `id`, `description` and `published_version`.
Use update_template to rename or publish a different version. Use create_template_version to change the HTML.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `template_id` (`string`, required): ID of the template, prefixed with `tmpl_`.
- `description` (`string`, optional): Internal description for this resource, up to 255 characters.
- `published_version` (`string`, optional): ID of the version (starts with `vrsn_`) to publish as the live version of this template.

Example input: `{"template_id":"<template_id>"}`

### `lob_update_template_version`

Update Template Version · Write

Update the description, engine or required variables of a template version.
Returns the updated version with `id`, `description`, `engine` and `required_vars`.
Use update_template_version for metadata changes. HTML cannot be edited; create a new version with create_template_version.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `template_id` (`string`, required): ID of the template, prefixed with `tmpl_`.
- `version_id` (`string`, required): ID of the template version, prefixed with `vrsn_`.
- `description` (`string`, optional): Internal description for this resource, up to 255 characters.
- `engine` (`string`, optional): Template engine used to merge variables: `legacy` (default, Lob's original engine) or `handlebars`. One of: `legacy`, `handlebars`.
- `required_vars` (`array`, optional): Variables the template needs when used. Only for `handlebars` templates. Example: ["first_name", "offer_code"].

Example input: `{"template_id":"<template_id>","version_id":"<version_id>"}`

### `lob_verify_bank_account`

Verify Bank Account · Write

Verify a bank account with the two micro-deposit amounts, or a descriptor code, sent by Lob.
Returns the bank account with `verified: true` when the check succeeds.
Use verify_bank_account after create_bank_account and the deposits arrive.
Provide either `amounts` (two amounts in cents) or `descriptor_code`.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `bank_account_id` (`string`, required): ID of the bank account, prefixed with `bank_`.
- `amounts` (`array`, optional): The two micro-deposit amounts in cents, as a two-element list of integers. Example: [11, 35]. Use this or `descriptor_code`.
- `descriptor_code` (`string`, optional): Descriptor code from the bank statement deposit, as an alternative to `amounts`.

Example input: `{"bank_account_id":"<bank_account_id>"}`

### `lob_cancel_check`

Cancel Check · Destructive

Cancel a check before it goes to production.
Returns an object with the deleted record's `id` and `deleted: true`.
Use cancel_check to stop a scheduled or recently created check. Cancellation fails once the check has been produced.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `check_id` (`string`, required): ID of the check, prefixed with `chk_`.

Example input: `{"check_id":"<check_id>"}`

### `lob_cancel_letter`

Cancel Letter · Destructive

Cancel a letter before it goes to production.
Returns an object with the deleted record's `id` and `deleted: true`.
Use cancel_letter to stop a scheduled or recently created letter. Cancellation fails once the piece has been produced.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `letter_id` (`string`, required): ID of the letter, prefixed with `ltr_`.

Example input: `{"letter_id":"<letter_id>"}`

### `lob_cancel_postcard`

Cancel Postcard · Destructive

Cancel a postcard before it goes to production.
Returns an object with the deleted record's `id` and `deleted: true`.
Use cancel_postcard to stop a scheduled or recently created postcard. Cancellation fails once the piece has been produced.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `postcard_id` (`string`, required): ID of the postcard, prefixed with `psc_`.

Example input: `{"postcard_id":"<postcard_id>"}`

### `lob_cancel_self_mailer`

Cancel Self Mailer · Destructive

Cancel a self mailer before it goes to production.
Returns an object with the deleted record's `id` and `deleted: true`.
Use cancel_self_mailer to stop a scheduled or recently created self mailer. Cancellation fails once the piece has been produced.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `self_mailer_id` (`string`, required): ID of the self mailer, prefixed with `sfm_`.

Example input: `{"self_mailer_id":"<self_mailer_id>"}`

### `lob_delete_address`

Delete Address · Destructive

Permanently delete a saved address from the address book.
Returns an object with the deleted record's `id` and `deleted: true`.
Use delete_address to remove an address you no longer need. Mailpieces already created keep their copy of the address.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `address_id` (`string`, required): ID of the address, prefixed with `adr_`.

Example input: `{"address_id":"<address_id>"}`

### `lob_delete_bank_account`

Delete Bank Account · Destructive

Permanently delete a bank account.
Returns an object with the deleted record's `id` and `deleted: true`.
Use delete_bank_account to remove an account that should no longer be used for checks.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `bank_account_id` (`string`, required): ID of the bank account, prefixed with `bank_`.

Example input: `{"bank_account_id":"<bank_account_id>"}`

### `lob_delete_campaign`

Delete Campaign · Destructive

Delete a campaign.
Returns an object with the deleted record's `id` and `deleted: true`.
Use delete_campaign to remove a campaign that has not been sent.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `campaign_id` (`string`, required): ID of the campaign, prefixed with `cmp_`.

Example input: `{"campaign_id":"<campaign_id>"}`

### `lob_delete_domain`

Delete Domain · Destructive

Delete a registered short-link domain.
Returns an object with the deleted record's `id` and `deleted: true`.
Use delete_domain to remove a domain you no longer use.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `domain_id` (`string`, required): ID of the domain, prefixed with `dom_`.

Example input: `{"domain_id":"<domain_id>"}`

### `lob_delete_link`

Delete Short Link · Destructive

Delete a short link.
Returns an object with the deleted record's `id` and `deleted: true`.
Use delete_link to deactivate a short link that is no longer needed.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `link_id` (`string`, required): ID of the short link, prefixed with `link_`.

Example input: `{"link_id":"<link_id>"}`

### `lob_delete_template`

Delete Template · Destructive

Permanently delete a template and all of its versions.
Returns an object with the deleted record's `id` and `deleted: true`.
Use delete_template only when the template is no longer used. Use delete_template_version to remove a single version.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `template_id` (`string`, required): ID of the template, prefixed with `tmpl_`.

Example input: `{"template_id":"<template_id>"}`

### `lob_delete_template_version`

Delete Template Version · Destructive

Permanently delete one version of a template.
Returns an object with the deleted record's `id` and `deleted: true`.
Use delete_template_version to remove a single revision. The published version cannot be deleted; use delete_template to remove everything.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `template_id` (`string`, required): ID of the template, prefixed with `tmpl_`.
- `version_id` (`string`, required): ID of the template version, prefixed with `vrsn_`.

Example input: `{"template_id":"<template_id>","version_id":"<version_id>"}`

## Related

Other Marketing connectors ([all 87](/agentkit/connectors/?category=marketing)):

- [HubSpot](/agentkit/connectors/hubspot/): Scalekit connector, OAuth, 457 tools
- [Mailchimp](/agentkit/connectors/mailchimp/): Scalekit connector, OAuth, 73 tools
- [Twitter / X](/agentkit/connectors/twitteroauth/): Scalekit connector, OAuth, 92 tools


---

## More Scalekit documentation

| Resource | What it contains | When to use it |
|----------|-----------------|----------------|
| [/llms.txt](/llms.txt) | Structured index with routing hints per product area | Start here — find which documentation set covers your topic before loading full content |
| [/llms-full.txt](/llms-full.txt) | Complete documentation for all Scalekit products in one file | Use when you need exhaustive context across multiple products or when the topic spans several areas |
| [sitemap-0.xml](https://docs.scalekit.com/sitemap-0.xml) | Full URL list of every documentation page | Use to discover specific page URLs you can fetch for targeted, page-level answers |
