While this page is accurate for what the API will do, the API is currently only on Version 1
If you're using an older version of the API, make sure that your inputs are compatible. Some versions may take inputs differently and may behave in unexpected ways or not function at all!
The current stable version of the lob.li API will always be available at api.lob.li/c/ and is there for your convenience if you like to use the newest features that have been proven to work.
Version 1 only does very basic functions, and at the time of this writing, is in the process of being phased out in favour of Version 2.
This version is very easy to use, everything is processed through GET requests.
Requests need to be URLENCODED, so make sure that they are. If they are not, you may get unexpected behavior.
Everything returned will be mime: text/plain or text/html
If you wanted to shorten a link for 24 hours, you would simply send the following request:
If you wanted to keep the link for a little longer than 24 hours, your request would look similar to:
Version 1 does not support resolving links or looking up any statistics on current links, maybe you should switch to Version 2.
API version 1 can be found at api.lob.li/v2/
This version is pretty easy to use, but not as much so as Version 1.
With this version, we are able to send requests in both POST and GET formats, and the endpoint will use https if you so choose to use it. Requests need to be URLENCODED, so make sure that they are. If they are not, you may get unexpected behavior.
Everything returned will be mime: text/json, text/plain or text/html
For a detailed explination of this version, including examples for usage, please refer to its GitHub page.
This is the version of the API where things can change and break at any time. It's not generally recommended that you use this version unless I'm developing a feature that you want.