LogoLogo
API DocsTemplate GalleryProduct UpdatesContact Us
  • 📬Print & Mail
    • Ready to get started?
      • Pricing details
      • Fast Track Guide
    • Integrations
      • API integrations
        • Action IQ
        • Adobe Marketo Engage
        • Blueshift
        • Braze
        • Customer.io
        • Hubspot
        • Iterable
        • Jotform
        • Klayvio
        • Listrak
        • Make
        • Optimove
        • Salesforce
        • Salesforce Marketing Cloud
        • Segment
        • Simon Data
        • Zapier
      • No-code integrations
        • Agile CRM
        • Freshsales Suite
        • HubSpot
        • Microsoft Dynamics 365
        • Pipedrive
        • Salesforce
        • Salesforce Marketing Cloud
        • Zoho
      • Creative conversion tools
        • Figma plugin
    • Reaching your audience
      • Lob Audience
        • Target Audiences
        • Lookalike Audiences
        • Purchasing Audiences
      • All about addresses
      • Campaign audience guide
      • Additional Lob NCOA functionality
    • Designing mail creatives
      • Artboard layout
      • Creative formatting
        • PDF preflight checklist
        • Exporting PDFs from InDesign
        • Rendering errors
      • Mail piece design specs
        • Postcards
        • Self-Mailers
        • Letters
        • Letter envelopes
        • Letter add-ons
        • Checks
        • Snap packs
        • Booklets
        • Custom mail
      • Maximizing engagement
        • Dynamic personalization
          • Advanced templating (Handlebars)
            • Dynamic table tutorial
        • Adding QR codes
        • Short URLs
        • Informed Delivery
    • Building a mail strategy
      • One-time campaigns or triggered sends?
      • Choosing a delivery strategy
      • Managing mail settings
        • Using metadata
        • Declaring mail use type
      • USPS Promotions Through Lob
        • Tactile, Sensory & Interactive Promotion
        • Integrated Technology Promotion
        • First Class Mail Advertising Promotion
        • Add-Ons
      • Mailing class and postage
        • Certified Mail or Registered Mail
      • International mail
    • Send mail!
      • Launch your first campaign
      • Send mail via Print & Mail API
      • Send campaigns via the Campaigns API
      • USPS Secure Destruction
    • Getting data & results
      • Tracking your mail
      • Mail analytics
      • Measuring attribution
      • Using webhooks
      • Exporting mail data
  • 🏠Address Verification
    • Ready to start AV?
      • US AV product suite
      • International AV suite
      • AV pricing
    • AV best practices
    • AV integrations & libraries
      • AV Elements
      • Shopify App: Address Cleanser
    • AV FAQs
  • 💻Developer Docs
    • API quickstart guide
    • SDKs & libraries
    • Postman & similar tools
    • Error reference
    • Upgrading API version
    • Technical use case guides
      • Mass deletion setup
      • NCOA responses
      • Override cancellation window
      • Visibility of address changes
      • Ingesting tracking events with webhooks
  • 🔑Account Management
    • Signing into Lob
    • API keys
    • Account settings
      • Account-level data logs
    • User settings
    • Billing
      • Lob Credits
      • Lob Payment Methods
      • Sales Tax FAQ
        • Applicable sales tax by state
          • ​Subscriptions and Services
          • Lob Audience
          • Delivery Location for Operational Mail
          • Customer Billing Address for Operational Mail
          • Delivery Location for Marketing Mail
          • Postage Exemption
          • Professional Services
        • Tax exemption guide
  • 📞Resources
    • Getting support
    • Security & privacy
    • Data retention
    • Sustainability
    • Private labeling Lob
    • Direct mail glossary
Powered by GitBook
On this page
  • Postman: How to create & test requests, then export source code
  • Requirements
  • Step 1: Launch Postman
  • Step 2: Create a request
  • Step 3: Configure your request
  • Step 4: Send your request and test the response
  • Step 5: Export the source code
  • Other tools

Was this helpful?

Export as PDF
  1. Developer Docs

Postman & similar tools

PreviousSDKs & librariesNextError reference

Last updated 1 year ago

Was this helpful?

Postman is a great way for developers to get started on using Lob’s APIs. Our public workspace allows you and your team to collaborate and make sure you have everything you need to get familiar with Lob’s APIs.

Watch the video below for an overview or read through the tutorial below.

Postman: How to create & test requests, then export source code

The following will guide you through the process of using Postman to create and test requests for Lob's API and then export the source code in your chosen programming language.

Lob provides an API for automating the sending of postcards, letters, checks, and more. With the help of Postman, we can easily test Lob's API endpoints, understand their behavior, and assist with the development of a custom Lob integration by exporting source code in any modern programming language.

Requirements

Step 1: Launch Postman

Once you’ve downloaded Postman, follow the installation instructions and launch the app once it’s ready.

Step 2: Create a request

  1. Click on the "New" button located in the top left corner of the application.

  2. From the modal that appears, select "HTTP".

  1. Once you’ve configured your request using the instructions below, you can used the “Save” button to select a name and save the request to a collection.

Step 3: Configure your request

  1. You will see a new tab open in Postman.

  2. From the dropdown menu on the left of the URL bar, select the required HTTP method (GET, POST, DELETE, etc.).

  1. Input the desired Lob API endpoint into the URL field (e.g., https://api.lob.com/v1/postcards).

  2. To authenticate, click on the Authorization tab below the URL field. Choose “Basic Auth” ****from the Type dropdown menu. In the Username field, enter your Lob API key, leave the Password field blank.

  1. Depending on the request type, you may need to include additional information. For example, for POST requests, navigate to the "Body" tab, select "raw" and choose "JSON" from the dropdown menu (defaulted to “Text”). Here, you can input the data for your request in JSON format.

For fields that are intended to accept only string values, submitting JSON objects in string format (stringified JSON objects) is not supported. Our system automatically parses and validates incoming data according to their expected types. As a result, providing a stringified JSON object in a field designated for string input can cause parsing errors or lead to unexpected validation results.

  1. If you’d like to send a file in your API request (for example, a PDF file), you can do so by following the instructions below. If you do not need to send a file (e.g. if you are not sending a POST request or you are using HTML templates), you can skip this step.

a. Select the “Body” tab and toggle into “form-data”.

b. From here, you should see a table with columns labelled “Key”, “Value”, and “Description”. In the first empty row, hover on the “Key” field cell to display a dropdown selector with the default datatype option “Text” selected. Click on this dropdown and select “File”.

c. You should se a button labelled “Select Files” appear in the “Value” field cell. Click this button to open the file browser and select the file you’d like to send.

d. Ensure the “Key” cell contains the value “file” (if creating a letter) or “front”/”back” (If creating a postcard or self-mailer).

Step 4: Send your request and test the response

  1. Click on the blue "Send" button to the right of the URL bar.

  2. The response will be displayed in the section below the request fields.

  3. You can review the status, time, size, and headers of the response.

Step 5: Export the source code

  1. Click on the "Code" button located on the far right side (it should look like an empty HTML tag, i.e., ”</>”).

  2. In the Code snippets panel that appears, select your preferred language from the dropdown on the left side.

  3. The right side will display the request code in the selected language.

  4. Click "Copy snippet" or manually select and copy the code.

That’s all you need to test requests for Lob's API, and export the source code in your chosen programming language!

Other tools

Usage

cURL is used in command lines or scripts to transfer data. We've included cURL code snippets in our documentation for each resource. By including your API key, you can run these commands from the terminal and see the response from Lob's API.

curl https://api.lob.com/v1/addresses \
-u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:

Usage

Insomnia REST client is a free cross-platform desktop framework for testing RESTful applications. We've created a collection for Lob's API endpoint for use with Insomnia.

Usage

We've written an OpenAPI v3 authored specification for the current Lob API. This provides users the ability to generate SDKs in languages not currently supported by Lob, import Lob operations and schemas into popular tools that support OpenAPI or define operations and schemas in middleware solutions.

Your Lob API key - Can be located under in your Lob dashboard

Postman can be an invaluable part of your API development and testing workflows. Always refer to the for any API-specific information and requirements.

Explore Lob's for more cURL examples.

Learn more in repository on GitHub.

Learn more at the repository on GitHub.

💻
Download Postman for free from their website
Account settings
Lob API documentation
API documentation
lob-insomnia
lob-openapi
Lob’s public workspace
Collections
curl.se
lob-insomnia
lob-openapi
Run in Insomnia}