RapidAPI logo

Sign Up

Log In

Lob

FREE
By dimashirokov
Updated 3 months ago
Logistics
-/10
Popularity Score
-
Latency
-
Success Rate

Lob API Documentation

Programmatically send physical mail at scale.

View API Details
POSTcreateAddress
POSTcreateAreaMailing
POSTcreateBankAccount
POSTcreateCheck
POSTcreateLetter
POSTcreatePostcard
POSTdeleteAddress
POSTdeleteBankAccount
POSTgetAddress
POSTgetAllAddresses
POSTgetAllAreaMailings
POSTgetAllBankAccounts
POSTgetAllChecks
POSTgetAllCountries
POSTgetAllLetters
POSTgetAllPostcards
POSTgetAllRoutes
POSTgetAllStates
POSTretrieveAreaMailing
POSTretrieveBankAccount
POSTretrieveCheck
POSTretrieveLetter
POSTretrievePostcard
POSTretrieveRoutesByZipcode
POSTverifyAddress
POSTverifyBankAccount
POSTcreateAddress

Creates a new address object.

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
addressLine1STRING
REQUIREDThe total string must be no longer than 200 characters.
apiKeyCREDENTIALS
REQUIREDApi Key.
addressStateSTRING
REQUIREDRequired and must be a 2 letter state short-name code if address_country is US, otherwise optional and the total string can not be any longer than 200 characters.
addressCitySTRING
REQUIREDRequired if address_country is US, otherwise optional. The total string must be no longer than 200 characters.
companySTRING
REQUIREDEither name or company is required, you may also add both. The total string for company must be no longer than 200 characters. If both name and company are provided, they will be printed on two separate lines above the rest of the address.
addressLine2STRING
REQUIREDThe total string must be no longer than 200 characters.
addressZipSTRING
REQUIREDRequired and must follow the ZIP format of 12345 or ZIP+4 format of 12345-1234 if address_country is US, otherwise optional and the total string can not be any longer than 40 characters.
Optional Parameters
metadataARRAY
OPTIONALMust be an Array with up to 20 key-value pairs. Keys must at most 40 characters and values must be at most 500 characters. Neither can contain the characters and Nested objects are not supported. See Metadata for more information.
phoneSTRING
OPTIONALThe total string must be no longer than 40 characters.
addressCountrySTRING
OPTIONALMust be a 2 letter country short-name code (ISO 3166). Defaults to US.
nameSTRING
OPTIONALEither name or company is required, you may also add both. The total string for name must be no longer than 50 characters. If both name and company are provided, they will be printed on two separate lines above the rest of the address.
emailSTRING
OPTIONALThe total string must be no longer than 100 characters.
descriptionSTRING
OPTIONALAddress description.
Request Snippet
unirest.post("https://LobdimashirokovV1.p.rapidapi.com/createAddress")
.header("X-RapidAPI-Host", "LobdimashirokovV1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
Log inSign up

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.post("https://LobdimashirokovV1.p.rapidapi.com/createAddress")
.header("X-RapidAPI-Host", "LobdimashirokovV1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication