Press enter to see results or esc to cancel.

Lob API Profile: Send Physical Mail Programmatically

We’re back with #12DaysOfAPIs, our series to help you get inspired for a side project this holiday season.

Today, we’re talking about the Lob API with Growth Engineer Shrav Mehta.

screen-shot-2016-12-26-at-6-43-23-am

Ok, so what is the Lob API? 

Lob is an API company that lets you send physical mail programmatically and at scale. That means that you can send mail (scheduled or triggered by events) from a script calling their API. Fun fact: more than 1 in 2o houses in the USA have received mail from Lob. Where was this API when we were sending our Christmas cards?!

What are the use cases?

While there are some savvy developers that use Lob for their own nefarious purposes (see the Christmas card automation plan), the majority of its users are the following business purposes.

1) Deliver different types of mail

Lob has separate APIs for different types of different types of mail: postcards, letters, checks, regional mail, address verification cards and puppy delivery.

puppy-mail
Did someone write a puppy delivery script?

Ok, that last one was our wishful thinking. The different APIs open up a lot of use cases for Lob other than the obvious marketing spam mail. For example, health technology company Counsyl uses Lob to send HIPPA-compliant communications. Shrav also mentioned a use case with a parking ticket company called Passport Parking. They used to send invoices out every month when someone got a ticket, but now use the Lob API to trigger an automatic system where, once a citation is listed, a bill gets sent in the mail.  Another little known eCommerce company (*cough cough* AMAZON) uses their API, so you know it’s got to be legit.

We’ve combined all of Lob’s APIs into one package you can use to call the APIs from your browser. Check out the endpoints here.

2) Track the mail that you send

Lob just released a Webhooks feature that can keep you (or your mail’s recipient) updated on the snail mail’s progress.

webhooks

You can track when your Christmas card is being processed for delivery or re-routed/returned to sender. Webhooks allow you to log these tracking events all in one place, like your own naughty or nice list. You can read more about Webhooks here.

3) Design mail 

Finally, the API lets you actually design mail with HTML–another cool way snail mail becomes more developer-friendly. You can read their design guidelines here. Bonus points: they even uploaded a repo of design templates on GitHub.

Why we love it

Similar to the Postmates Delivery API, Lob’s APIs turns your code into real world deliveries. You write the code, and a human will move in the physical world, drive somewhere and deliver your mail. It’s honestly just cool to see something so tangible come from a simple API call.

Most of all though, we love that Lob was obviously built with the developer in mind. It just becomes obvious in the little things that they do. For example, Lob hands over the API keys immediately after you sign up (without having to go through a bunch of filler screens first). Shrav told us that even the docs are updated programmatically, so that you don’t have to worry about anything being out of date.

Make your own call with the Lob API

The first step in calling the Lob API is registering for an account and getting an API key. Like we said above, getting a API key with Lob is refreshingly easy. Like, only four clicks easy.

Here’s how to get started:

  1. Go to Lob.com
  2. Log in or register your app
  3. Click “I’m a developer looking for my API keys”
  4. Voila! You have your Live API key and Test API Key

Actually sending mail with Lob costs money (postage ain’t free–you can check out the pricing page here). However, you can use a free developer account and test API key to make calls before shelling out any dough.

Grab your test account key and head over to our RapidAPI Lob package. There, you can fill in the parameters and make a test call. Afterwords, you can export the code directly in the language of your choice and put the snippet right into your app.

Check out the GIF below where we call the API to create an address for Santa using the createAddress endpoint using RapidAPI.

lob-call-gif

You can use RapidAPI in your code as a way call multiple APIs (vs. calling each individually one individually). Browse the other APIs we have on the marketplace here.

Behind the scenes: how the Lob APIs were built

We asked Shrav to give us a bit more background on the API itself. He explained that the Lob APIs were initially built in PHP. However, they made a  transition to Node.js with the hapi.js framework and separated the front end and the back end.

nodejs hapi

The team to use AWS Lambda to asynchronously render thumbnails and proofs. These changes reduced response times down to 100 milliseconds!

More APIs to come!

Want even more side project inspiration? Follow along for the rest of our 12 Days of API series or check out our posts on Postmates Delivery API, Giphy’s API, or the Square eCommerce API.

Comments

5 Comments

tempat aborsi

… [Trackback]

[…] Find More here|Find More|Find More Informations here|There you will find 13893 more Informations|Informations to that Topic: blog.rapidapi.com/2016/12/26/lob-send-physical-mail-programmatically/ […]

digital marketing agency in huntingdon

… [Trackback]

[…] Read More here|Read More|Find More Informations here|Here you will find 38692 more Informations|Infos to that Topic: blog.rapidapi.com/2016/12/26/lob-send-physical-mail-programmatically/ […]

buy Facebook likes

… [Trackback]

[…] Find More here|Find More|Find More Infos here|Here you will find 20378 more Infos|Infos to that Topic: blog.rapidapi.com/2016/12/26/lob-send-physical-mail-programmatically/ […]

go to website

… [Trackback]

[…] Read More on|Read More|Read More Informations here|Here you will find 7474 more Informations|Informations to that Topic: blog.rapidapi.com/2016/12/26/lob-send-physical-mail-programmatically/ […]

Hur skrotar man en bil/du behöver registreringsbevis och leg

… [Trackback]

[…] Find More on|Find More|Read More Infos here|Here you will find 95898 additional Infos|Infos on that Topic: blog.rapidapi.com/2016/12/26/lob-send-physical-mail-programmatically/ […]


Leave a Comment

Tell us your thoughts!

Spread the API ❤️