Postman & similar tools
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.
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.
Once you’ve downloaded Postman, follow the installation instructions and launch the app once it’s ready.
- 1.Click on the "New" button located in the top left corner of the application.
- 2.From the modal that appears, select "HTTP".
- 3.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.
- 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.).
- 4.Input the desired Lob API endpoint into the URL field (e.g.,
- 5.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.
- 6.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.
- 7.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).
- 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.
- 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!
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 \
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.