Lob
FREE
By dimashirokov
Updated a year ago

Lob API Documentation

Programmatically send physical mail at scale.

Learn more about this API
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
POSTcreatePostcard

Create a new postcard.

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
apiKeyCREDENTIALS
REQUIREDApi Key.
cardToSTRING
REQUIREDMust either be an address ID or an JSON object with correct address parameters. If an JSON object is used, an address will be created for you and returned with an ID
frontFILE
REQUIREDA 4.25x6.25, 6.25x9.25, or 6.25x11.25 image to use as the front of the postcard. This can be a URL, local file, or an HTML string. Supported file types are PDF, PNG, and JPEG. For HTML examples, please see Postcard Examples Appendix.
cardFromSTRING
REQUIREDMust either be an address ID or an JSON object with correct address parameters. If an JSON object is used, an address will be created for you and returned with an ID.
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.
merge_variablesJSON
OPTIONALMust be an JSON object with up to 40 key-value pairs. Keys must be at most 40 characters and values must be at most 500 characters. Neither can contain the characters and Nested objects are not supported. For parameters that accept HTML strings, you can provide optional data variables that will be merged with your HTML. To add a variable, insert double curly braces into your HTML like so: {{variable_name}}.
sizeSELECT
OPTIONALSpecifies the size of the postcard. Must be either 4x6, 6x9, or 6x11. Defaults to 4x6. Only 4x6 postcards can be sent to international destinations.
messageSTRING
OPTIONALEither message or back is required, choose one. Max of 350 characters to be included on the back of postcard. If included, we will generate the back based off to, from, and message arguments.
backFILE
OPTIONALEither message or back is required, choose one. A 4.25x6.25, 6.25x9.25, or 6.25x11.25 image to use as the back of the postcard, supplied as a URL, local file, or HTML string. This allows you to customize your back design, but we will still insert the recipient address for you. Follow the templates provided here: 4x6 template, 6x9 template, 6x11 template. For HTML examples, please see Postcard Examples Appendix..
descriptionSTRING
OPTIONALAn internal description that identifies this resource.
Code Snippet
Install SDK
Response ExampleSchema

Install SDK for (Node.js)Unirest

OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication